Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210009
b: refs/heads/master
c: d4348c6
h: refs/heads/master
i:
  210007: a5c3c33
v: v3
  • Loading branch information
Linus Torvalds committed Aug 25, 2010
1 parent 46d49de commit 58165bd
Show file tree
Hide file tree
Showing 38 changed files with 996 additions and 528 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d330919927ea31fa083b5a80084dc991da813a0
refs/heads/master: d4348c678977c7093438bbbf2067c49396ae941b
3 changes: 1 addition & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1676,8 +1676,7 @@ F: kernel/cgroup*
F: mm/*cgroup*

CORETEMP HARDWARE MONITORING DRIVER
M: Rudolf Marek <r.marek@assembler.cz>
M: Huaxu Wan <huaxu.wan@intel.com>
M: Fenghua Yu <fenghua.yu@intel.com>
L: lm-sensors@lm-sensors.org
S: Maintained
F: Documentation/hwmon/coretemp
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ extern void check_tsc_sync_source(int cpu);
extern void check_tsc_sync_target(void);

extern int notsc_setup(char *);
extern void save_sched_clock_state(void);
extern void restore_sched_clock_state(void);

#endif /* _ASM_X86_TSC_H */
38 changes: 38 additions & 0 deletions trunk/arch/x86/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,44 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
local_irq_restore(flags);
}

static unsigned long long cyc2ns_suspend;

void save_sched_clock_state(void)
{
if (!sched_clock_stable)
return;

cyc2ns_suspend = sched_clock();
}

/*
* Even on processors with invariant TSC, TSC gets reset in some the
* ACPI system sleep states. And in some systems BIOS seem to reinit TSC to
* arbitrary value (still sync'd across cpu's) during resume from such sleep
* states. To cope up with this, recompute the cyc2ns_offset for each cpu so
* that sched_clock() continues from the point where it was left off during
* suspend.
*/
void restore_sched_clock_state(void)
{
unsigned long long offset;
unsigned long flags;
int cpu;

if (!sched_clock_stable)
return;

local_irq_save(flags);

get_cpu_var(cyc2ns_offset) = 0;
offset = cyc2ns_suspend - sched_clock();

for_each_possible_cpu(cpu)
per_cpu(cyc2ns_offset, cpu) = offset;

local_irq_restore(flags);
}

#ifdef CONFIG_CPU_FREQ

/* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/power/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ static void __save_processor_state(struct saved_context *ctxt)
void save_processor_state(void)
{
__save_processor_state(&saved_context);
save_sched_clock_state();
}
#ifdef CONFIG_X86_32
EXPORT_SYMBOL(save_processor_state);
Expand Down Expand Up @@ -229,6 +230,7 @@ static void __restore_processor_state(struct saved_context *ctxt)
void restore_processor_state(void)
{
__restore_processor_state(&saved_context);
restore_sched_clock_state();
}
#ifdef CONFIG_X86_32
EXPORT_SYMBOL(restore_processor_state);
Expand Down
38 changes: 19 additions & 19 deletions trunk/drivers/hwmon/ads7871.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,30 +160,12 @@ static const struct attribute_group ads7871_group = {

static int __devinit ads7871_probe(struct spi_device *spi)
{
int status, ret, err = 0;
int ret, err;
uint8_t val;
struct ads7871_data *pdata;

dev_dbg(&spi->dev, "probe\n");

pdata = kzalloc(sizeof(struct ads7871_data), GFP_KERNEL);
if (!pdata) {
err = -ENOMEM;
goto exit;
}

status = sysfs_create_group(&spi->dev.kobj, &ads7871_group);
if (status < 0)
goto error_free;

pdata->hwmon_dev = hwmon_device_register(&spi->dev);
if (IS_ERR(pdata->hwmon_dev)) {
err = PTR_ERR(pdata->hwmon_dev);
goto error_remove;
}

spi_set_drvdata(spi, pdata);

/* Configure the SPI bus */
spi->mode = (SPI_MODE_0);
spi->bits_per_word = 8;
Expand All @@ -201,6 +183,24 @@ static int __devinit ads7871_probe(struct spi_device *spi)
we need to make sure we really have a chip*/
if (val != ret) {
err = -ENODEV;
goto exit;
}

pdata = kzalloc(sizeof(struct ads7871_data), GFP_KERNEL);
if (!pdata) {
err = -ENOMEM;
goto exit;
}

err = sysfs_create_group(&spi->dev.kobj, &ads7871_group);
if (err < 0)
goto error_free;

spi_set_drvdata(spi, pdata);

pdata->hwmon_dev = hwmon_device_register(&spi->dev);
if (IS_ERR(pdata->hwmon_dev)) {
err = PTR_ERR(pdata->hwmon_dev);
goto error_remove;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ static struct notifier_block coretemp_cpu_notifier __refdata = {
static int __init coretemp_init(void)
{
int i, err = -ENODEV;
struct pdev_entry *p, *n;

/* quick check if we run Intel */
if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL)
Expand Down
35 changes: 32 additions & 3 deletions trunk/drivers/hwmon/k8temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,37 @@ static const struct pci_device_id k8temp_ids[] = {

MODULE_DEVICE_TABLE(pci, k8temp_ids);

static int __devinit is_rev_g_desktop(u8 model)
{
u32 brandidx;

if (model < 0x69)
return 0;

if (model == 0xc1 || model == 0x6c || model == 0x7c)
return 0;

/*
* Differentiate between AM2 and ASB1.
* See "Constructing the processor Name String" in "Revision
* Guide for AMD NPT Family 0Fh Processors" (33610).
*/
brandidx = cpuid_ebx(0x80000001);
brandidx = (brandidx >> 9) & 0x1f;

/* Single core */
if ((model == 0x6f || model == 0x7f) &&
(brandidx == 0x7 || brandidx == 0x9 || brandidx == 0xc))
return 0;

/* Dual core */
if (model == 0x6b &&
(brandidx == 0xb || brandidx == 0xc))
return 0;

return 1;
}

static int __devinit k8temp_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
Expand Down Expand Up @@ -179,9 +210,7 @@ static int __devinit k8temp_probe(struct pci_dev *pdev,
"wrong - check erratum #141\n");
}

if ((model >= 0x69) &&
!(model == 0xc1 || model == 0x6c || model == 0x7c ||
model == 0x6b || model == 0x6f || model == 0x7f)) {
if (is_rev_g_desktop(model)) {
/*
* RevG desktop CPUs (i.e. no socket S1G1 or
* ASB1 parts) need additional offset,
Expand Down
21 changes: 16 additions & 5 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ static inline unsigned long *cpu_evtchn_mask(int cpu)
#define VALID_EVTCHN(chn) ((chn) != 0)

static struct irq_chip xen_dynamic_chip;
static struct irq_chip xen_percpu_chip;

/* Constructor for packed IRQ information. */
static struct irq_info mk_unbound_info(void)
Expand Down Expand Up @@ -377,7 +378,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
irq = find_unbound_irq();

set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
handle_level_irq, "event");
handle_edge_irq, "event");

evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_evtchn_info(evtchn);
Expand All @@ -403,8 +404,8 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)
if (irq < 0)
goto out;

set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
handle_level_irq, "ipi");
set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_percpu_irq, "ipi");

bind_ipi.vcpu = cpu;
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
Expand Down Expand Up @@ -444,8 +445,8 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)

irq = find_unbound_irq();

set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
handle_level_irq, "virq");
set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_percpu_irq, "virq");

evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_virq_info(evtchn, virq);
Expand Down Expand Up @@ -964,6 +965,16 @@ static struct irq_chip xen_dynamic_chip __read_mostly = {
.retrigger = retrigger_dynirq,
};

static struct irq_chip xen_percpu_chip __read_mostly = {
.name = "xen-percpu",

.disable = disable_dynirq,
.mask = disable_dynirq,
.unmask = enable_dynirq,

.ack = ack_dynirq,
};

int xen_set_callback_via(uint64_t via)
{
struct xen_hvm_param a;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/cifs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ config CIFS
tristate "CIFS support (advanced network filesystem, SMBFS successor)"
depends on INET
select NLS
select CRYPTO_MD5
select CRYPTO_ARC4
help
This is the client VFS module for the Common Internet File System
(CIFS) protocol which is the successor to the Server Message Block
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/cifs/asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,13 @@ decode_negTokenInit(unsigned char *security_blob, int length,
if (compare_oid(oid, oidlen, MSKRB5_OID,
MSKRB5_OID_LEN))
server->sec_mskerberos = true;
else if (compare_oid(oid, oidlen, KRB5U2U_OID,
if (compare_oid(oid, oidlen, KRB5U2U_OID,
KRB5U2U_OID_LEN))
server->sec_kerberosu2u = true;
else if (compare_oid(oid, oidlen, KRB5_OID,
if (compare_oid(oid, oidlen, KRB5_OID,
KRB5_OID_LEN))
server->sec_kerberos = true;
else if (compare_oid(oid, oidlen, NTLMSSP_OID,
if (compare_oid(oid, oidlen, NTLMSSP_OID,
NTLMSSP_OID_LEN))
server->sec_ntlmssp = true;

Expand Down
18 changes: 11 additions & 7 deletions trunk/fs/cifs/cifs_unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* This is a compressed table of upper and lower case conversion.
*
*/
#ifndef _CIFS_UNICODE_H
#define _CIFS_UNICODE_H

#include <asm/byteorder.h>
#include <linux/types.h>
Expand Down Expand Up @@ -67,8 +69,8 @@ extern const struct UniCaseRange CifsUniUpperRange[];
#endif /* UNIUPR_NOUPPER */

#ifndef UNIUPR_NOLOWER
extern signed char UniLowerTable[512];
extern struct UniCaseRange UniLowerRange[];
extern signed char CifsUniLowerTable[512];
extern const struct UniCaseRange CifsUniLowerRange[];
#endif /* UNIUPR_NOLOWER */

#ifdef __KERNEL__
Expand Down Expand Up @@ -337,15 +339,15 @@ UniStrupr(register wchar_t *upin)
* UniTolower: Convert a unicode character to lower case
*/
static inline wchar_t
UniTolower(wchar_t uc)
UniTolower(register wchar_t uc)
{
register struct UniCaseRange *rp;
register const struct UniCaseRange *rp;

if (uc < sizeof(UniLowerTable)) {
if (uc < sizeof(CifsUniLowerTable)) {
/* Latin characters */
return uc + UniLowerTable[uc]; /* Use base tables */
return uc + CifsUniLowerTable[uc]; /* Use base tables */
} else {
rp = UniLowerRange; /* Use range tables */
rp = CifsUniLowerRange; /* Use range tables */
while (rp->start) {
if (uc < rp->start) /* Before start of range */
return uc; /* Uppercase = input */
Expand Down Expand Up @@ -374,3 +376,5 @@ UniStrlwr(register wchar_t *upin)
}

#endif

#endif /* _CIFS_UNICODE_H */
16 changes: 8 additions & 8 deletions trunk/fs/cifs/cifs_uniupr.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const struct UniCaseRange CifsUniUpperRange[] = {
/*
* Latin lower case
*/
static signed char CifsUniLowerTable[512] = {
signed char CifsUniLowerTable[512] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 000-00f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 010-01f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 020-02f */
Expand Down Expand Up @@ -242,12 +242,12 @@ static signed char UniCaseRangeLff20[27] = {
/*
* Lower Case Range
*/
static const struct UniCaseRange CifsUniLowerRange[] = {
0x0380, 0x03ab, UniCaseRangeL0380,
0x0400, 0x042f, UniCaseRangeL0400,
0x0490, 0x04cb, UniCaseRangeL0490,
0x1e00, 0x1ff7, UniCaseRangeL1e00,
0xff20, 0xff3a, UniCaseRangeLff20,
0, 0, 0
const struct UniCaseRange CifsUniLowerRange[] = {
{0x0380, 0x03ab, UniCaseRangeL0380},
{0x0400, 0x042f, UniCaseRangeL0400},
{0x0490, 0x04cb, UniCaseRangeL0490},
{0x1e00, 0x1ff7, UniCaseRangeL1e00},
{0xff20, 0xff3a, UniCaseRangeLff20},
{0}
};
#endif
Loading

0 comments on commit 58165bd

Please sign in to comment.