Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177595
b: refs/heads/master
c: 3563ff9
h: refs/heads/master
i:
  177593: 1a27e33
  177591: ad40369
v: v3
  • Loading branch information
Shaohua Li authored and Len Brown committed Dec 16, 2009
1 parent e724502 commit e08a4d8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a9622dc4659af44a8098a233f65c51e495ff0a5
refs/heads/master: 3563ff964fdc36358cef0330936fdac28e65142a
26 changes: 26 additions & 0 deletions trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,30 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
}
EXPORT_SYMBOL(acpi_run_osc);

static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48";
static void acpi_bus_osc_support(void)
{
u32 capbuf[2];
struct acpi_osc_context context = {
.uuid_str = sb_uuid_str,
.rev = 1,
.cap.length = 8,
.cap.pointer = capbuf,
};
acpi_handle handle;

capbuf[OSC_QUERY_TYPE] = OSC_QUERY_ENABLE;
capbuf[OSC_SUPPORT_TYPE] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */
#ifdef CONFIG_ACPI_PROCESSOR_AGGREGATOR
capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PAD_SUPPORT;
#endif
if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
return;
if (ACPI_SUCCESS(acpi_run_osc(handle, &context)))
kfree(context.ret.pointer);
/* do we need to check the returned cap? Sounds no */
}

/* --------------------------------------------------------------------------
Event Management
-------------------------------------------------------------------------- */
Expand Down Expand Up @@ -856,6 +880,8 @@ static int __init acpi_bus_init(void)
status = acpi_ec_ecdt_probe();
/* Ignore result. Not having an ECDT is not fatal. */

acpi_bus_osc_support();

status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ struct acpi_osc_context {

acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);

/* platform-wide _OSC bits */
#define OSC_SB_PAD_SUPPORT 1
#define OSC_SB_PPC_OST_SUPPORT 2
#define OSC_SB_PR3_SUPPORT 4
#define OSC_SB_CPUHP_OST_SUPPORT 8
#define OSC_SB_APEI_SUPPORT 16

/* PCI defined _OSC bits */
/* _OSC DW1 Definition (OS Support Fields) */
#define OSC_EXT_PCI_CONFIG_SUPPORT 1
Expand Down

0 comments on commit e08a4d8

Please sign in to comment.