Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits)
  classmate-laptop: add support for Classmate PC ACPI devices
  hp-wmi: Fix two memleaks
  acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIAS
  dell-wmi: do not keep driver loaded on unsupported boxes
  wmi: Free the allocated acpi objects through wmi_get_event_data
  drivers/platform/x86/acerhdf.c: check BIOS information whether it begins with string of table
  acerhdf: add new BIOS versions
  acerhdf: limit modalias matching to supported
  toshiba_acpi: convert to seq_file
  asus_acpi: convert to seq_file
  ACPI: do not select ACPI_DOCK from ATA_ACPI
  sony-laptop: enumerate rfkill devices using SN06
  sony-laptop: rfkill support for newer models
  ACPI: fix OSC regression that caused aer and pciehp not to load
  MAINTAINERS: add maintainer for msi-wmi driver
  fujitu-laptop: fix tests of acpi_evaluate_integer() return value
  arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any()
  ACPI: processor: remove _PDC object list from struct acpi_processor
  ACPI: processor: change acpi_processor_set_pdc() interface
  ACPI: processor: open code acpi_processor_cleanup_pdc
  ...
  • Loading branch information
torvalds committed Dec 24, 2009
2 parents 45e6297 + fcb1123 commit 71492fd
Show file tree
Hide file tree
Showing 32 changed files with 1,432 additions and 664 deletions.
11 changes: 11 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,12 @@ L: [email protected]
S: Supported
F: drivers/scsi/fnic/

CMPC ACPI DRIVER
M: Thadeu Lima de Souza Cascardo <[email protected]>
M: Daniel Oliveira Nascimento <[email protected]>
S: Supported
F: drivers/platform/x86/classmate-laptop.c

CODA FILE SYSTEM
M: Jan Harkes <[email protected]>
M: [email protected]
Expand Down Expand Up @@ -3646,6 +3652,11 @@ W: http://0pointer.de/lennart/tchibo.html
S: Maintained
F: drivers/platform/x86/msi-laptop.c

MSI WMI SUPPORT
M: Anisse Astier <[email protected]>
S: Supported
F: drivers/platform/x86/msi-wmi.c

MULTIFUNCTION DEVICES (MFD)
M: Samuel Ortiz <[email protected]>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
Expand Down
6 changes: 6 additions & 0 deletions arch/ia64/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
#endif

static inline bool arch_has_acpi_pdc(void) { return true; }
static inline void arch_acpi_set_pdc_bits(u32 *buf)
{
buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP;
}

#define acpi_unlazy_tlb(x)

#ifdef CONFIG_ACPI_NUMA
Expand Down
4 changes: 0 additions & 4 deletions arch/ia64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += acpi-processor.o
endif

obj-$(CONFIG_IA64_PALINFO) += palinfo.o
obj-$(CONFIG_IOSAPIC) += iosapic.o
obj-$(CONFIG_MODULES) += module.o
Expand Down
85 changes: 0 additions & 85 deletions arch/ia64/kernel/acpi-processor.c

This file was deleted.

26 changes: 26 additions & 0 deletions arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,32 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
return max_cstate;
}

static inline bool arch_has_acpi_pdc(void)
{
struct cpuinfo_x86 *c = &cpu_data(0);
return (c->x86_vendor == X86_VENDOR_INTEL ||
c->x86_vendor == X86_VENDOR_CENTAUR);
}

static inline void arch_acpi_set_pdc_bits(u32 *buf)
{
struct cpuinfo_x86 *c = &cpu_data(0);

buf[2] |= ACPI_PDC_C_CAPABILITY_SMP;

if (cpu_has(c, X86_FEATURE_EST))
buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP;

if (cpu_has(c, X86_FEATURE_ACPI))
buf[2] |= ACPI_PDC_T_FFH;

/*
* If mwait/monitor is unsupported, C2/C3_FFH will be disabled
*/
if (!cpu_has(c, X86_FEATURE_MWAIT))
buf[2] &= ~(ACPI_PDC_C_C2C3_FFH);
}

#else /* !CONFIG_ACPI */

#define acpi_lapic 0
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ obj-$(CONFIG_ACPI) += boot.o
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_rm.o wakeup_$(BITS).o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
obj-y += cstate.o
endif

$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin
Expand Down
101 changes: 0 additions & 101 deletions arch/x86/kernel/acpi/processor.c

This file was deleted.

4 changes: 3 additions & 1 deletion arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ static void do_drv_write(void *_cmd)

static void drv_read(struct drv_cmd *cmd)
{
int err;
cmd->val = 0;

smp_call_function_single(cpumask_any(cmd->mask), do_drv_read, cmd, 1);
err = smp_call_function_any(cmd->mask, do_drv_read, cmd, 1);
WARN_ON_ONCE(err); /* smp_call_function_any() was buggy? */
}

static void drv_write(struct drv_cmd *cmd)
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ acpi-$(CONFIG_ACPI_SLEEP) += proc.o
#
acpi-y += bus.o glue.o
acpi-y += scan.o
acpi-y += processor_pdc.o
acpi-y += ec.o
acpi-$(CONFIG_ACPI_DOCK) += dock.o
acpi-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
Expand Down
14 changes: 14 additions & 0 deletions drivers/acpi/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ static int __init dmi_disable_osi_vista(const struct dmi_system_id *d)
acpi_osi_setup("!Windows 2006");
return 0;
}
static int __init dmi_disable_osi_win7(const struct dmi_system_id *d)
{
printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
acpi_osi_setup("!Windows 2009");
return 0;
}

static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
{
Expand All @@ -211,6 +217,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "Sony VGN-SR290J"),
},
},
{
.callback = dmi_disable_osi_win7,
.ident = "ASUS K50IJ",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "K50IJ"),
},
},

/*
* BIOS invocation of _OSI(Linux) is almost always a BIOS bug.
Expand Down
28 changes: 20 additions & 8 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
union acpi_object *out_obj;
u8 uuid[16];
u32 errors;
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};

if (!context)
return AE_ERROR;
Expand All @@ -419,16 +420,16 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
in_params[3].buffer.length = context->cap.length;
in_params[3].buffer.pointer = context->cap.pointer;

status = acpi_evaluate_object(handle, "_OSC", &input, &context->ret);
status = acpi_evaluate_object(handle, "_OSC", &input, &output);
if (ACPI_FAILURE(status))
return status;

/* return buffer should have the same length as cap buffer */
if (context->ret.length != context->cap.length)
if (!output.length)
return AE_NULL_OBJECT;

out_obj = context->ret.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) {
out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER
|| out_obj->buffer.length != context->cap.length) {
acpi_print_osc_error(handle, context,
"_OSC evaluation returned wrong type");
status = AE_TYPE;
Expand Down Expand Up @@ -457,11 +458,20 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
goto out_kfree;
}
out_success:
return AE_OK;
context->ret.length = out_obj->buffer.length;
context->ret.pointer = kmalloc(context->ret.length, GFP_KERNEL);
if (!context->ret.pointer) {
status = AE_NO_MEMORY;
goto out_kfree;
}
memcpy(context->ret.pointer, out_obj->buffer.pointer,
context->ret.length);
status = AE_OK;

out_kfree:
kfree(context->ret.pointer);
context->ret.pointer = NULL;
kfree(output.pointer);
if (status != AE_OK)
context->ret.pointer = NULL;
return status;
}
EXPORT_SYMBOL(acpi_run_osc);
Expand Down Expand Up @@ -888,6 +898,8 @@ static int __init acpi_bus_init(void)
goto error1;
}

acpi_early_processor_set_pdc();

/*
* Maybe EC region is required at bus_scan/acpi_get_devices. So it
* is necessary to enable it as early as possible.
Expand Down
Loading

0 comments on commit 71492fd

Please sign in to comment.