Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128077
b: refs/heads/master
c: 8a383ef
h: refs/heads/master
i:
  128075: bfc96a3
v: v3
  • Loading branch information
Roel Kluin authored and Len Brown committed Dec 31, 2008
1 parent b915173 commit 3447eca
Show file tree
Hide file tree
Showing 192 changed files with 3,069 additions and 3,173 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: b8ef914e58e90c3b4dba5f5bdd8ab04c45d3e008
refs/heads/master: 8a383ef0be01e0e6e84c85f8bf35e4e6fcfb8981
1 change: 1 addition & 0 deletions trunk/arch/ia64/include/asm/acpi-ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define _ASM_IA64_ACPI_EXT_H

#include <linux/types.h>
#include <acpi/actypes.h>

extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length);

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/ia64/include/asm/sn/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _ASM_IA64_SN_ACPI_H
#define _ASM_IA64_SN_ACPI_H

#include "acpi/acglobal.h"

extern int sn_acpi_rev;
#define SN_ACPI_BASE_SUPPORT() (sn_acpi_rev >= 0x20101)

Expand Down
103 changes: 47 additions & 56 deletions trunk/arch/ia64/sn/kernel/io_acpi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <asm/sn/sn_sal.h>
#include "xtalk/hubdev.h"
#include <linux/acpi.h>
#include <acpi/acnamesp.h>


/*
Expand Down Expand Up @@ -63,7 +64,6 @@ static acpi_status __init
sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
u64 addr;
struct hubdev_info *hubdev;
struct hubdev_info *hubdev_ptr;
Expand All @@ -77,25 +77,23 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
&sn_uuid, &buffer);
if (ACPI_FAILURE(status)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"sn_acpi_hubdev_init: acpi_get_vendor_resource() "
"(0x%x) failed for: %s\n", status,
(char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"(0x%x) failed for: ", status);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
return AE_OK; /* Continue walking namespace */
}

resource = buffer.pointer;
vendor = &resource->data.vendor_typed;
if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
sizeof(struct hubdev_info *)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"sn_acpi_hubdev_init: Invalid vendor data length: "
"%d for: %s\n",
vendor->byte_length, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"sn_acpi_hubdev_init: Invalid vendor data length: %d for: ",
vendor->byte_length);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
goto exit;
}

Expand All @@ -122,7 +120,6 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
{
u64 addr;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
acpi_handle handle;
struct pcibus_bussoft *prom_bussoft_ptr;
struct acpi_resource *resource;
Expand All @@ -134,11 +131,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
&sn_uuid, &buffer);
if (ACPI_FAILURE(status)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR "%s: "
"acpi_get_vendor_resource() failed (0x%x) for: %s\n",
__func__, status, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"acpi_get_vendor_resource() failed (0x%x) for: ",
__func__, status);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
return NULL;
}
resource = buffer.pointer;
Expand Down Expand Up @@ -171,7 +168,6 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
{
u64 addr;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct sn_irq_info *irq_info, *irq_info_prom;
struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr;
struct acpi_resource *resource;
Expand All @@ -186,24 +182,23 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
&sn_uuid, &buffer);
if (ACPI_FAILURE(status)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"%s: acpi_get_vendor_resource() failed (0x%x) for: %s\n",
__func__, status, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"%s: acpi_get_vendor_resource() failed (0x%x) for: ",
__func__, status);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
return 1;
}

resource = buffer.pointer;
vendor = &resource->data.vendor_typed;
if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
sizeof(struct pci_devdev_info *)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"%s: Invalid vendor data length: %d for: %s\n",
__func__, vendor->byte_length,
(char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"%s: Invalid vendor data length: %d for: ",
__func__, vendor->byte_length);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
ret = 1;
goto exit;
}
Expand Down Expand Up @@ -244,9 +239,6 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
acpi_handle parent;
int slot;
acpi_status status;
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };

acpi_get_name(device_handle, ACPI_FULL_PATHNAME, &name_buffer);

/*
* Do an upward search to find the root bus device, and
Expand All @@ -257,29 +249,32 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
status = acpi_get_parent(child, &parent);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR "%s: acpi_get_parent() failed "
"(0x%x) for: %s\n", __func__, status,
(char *)name_buffer.pointer);
"(0x%x) for: ", __func__, status);
acpi_ns_print_node_pathname(child, NULL);
printk("\n");
panic("%s: Unable to find host devfn\n", __func__);
}
if (parent == rootbus_handle)
break;
child = parent;
}
if (!child) {
printk(KERN_ERR "%s: Unable to find root bus for: %s\n",
__func__, (char *)name_buffer.pointer);
printk(KERN_ERR "%s: Unable to find root bus for: ",
__func__);
acpi_ns_print_node_pathname(device_handle, NULL);
printk("\n");
BUG();
}

status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: %s\n",
__func__, status, (char *)name_buffer.pointer);
printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ",
__func__, status);
acpi_ns_print_node_pathname(child, NULL);
printk("\n");
panic("%s: Unable to find host devfn\n", __func__);
}

kfree(name_buffer.pointer);

slot = (adr >> 16) & 0xffff;
function = adr & 0xffff;
devfn = PCI_DEVFN(slot, function);
Expand All @@ -305,28 +300,27 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
int function;
int slot;
struct sn_pcidev_match *info = context;
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };

status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
&adr);
if (ACPI_SUCCESS(status)) {
status = acpi_get_parent(handle, &parent);
if (ACPI_FAILURE(status)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"%s: acpi_get_parent() failed (0x%x) for: %s\n",
__func__, status, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"%s: acpi_get_parent() failed (0x%x) for: ",
__func__, status);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
return AE_OK;
}
status = acpi_evaluate_integer(parent, METHOD_NAME__BBN,
NULL, &bbn);
if (ACPI_FAILURE(status)) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR
"%s: Failed to find _BBN in parent of: %s\n",
__func__, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"%s: Failed to find _BBN in parent of: ",
__func__);
acpi_ns_print_node_pathname(handle, NULL);
printk("\n");
return AE_OK;
}

Expand Down Expand Up @@ -356,27 +350,24 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
acpi_handle rootbus_handle;
unsigned long long segment;
acpi_status status;
struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };

rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
&segment);
if (ACPI_SUCCESS(status)) {
if (segment != pci_domain_nr(dev)) {
acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME,
&name_buffer);
printk(KERN_ERR
"%s: Segment number mismatch, 0x%llx vs 0x%x for: %s\n",
__func__, segment, pci_domain_nr(dev),
(char *)name_buffer.pointer);
kfree(name_buffer.pointer);
"%s: Segment number mismatch, 0x%llx vs 0x%x for: ",
__func__, segment, pci_domain_nr(dev));
acpi_ns_print_node_pathname(rootbus_handle, NULL);
printk("\n");
return 1;
}
} else {
acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, &name_buffer);
printk(KERN_ERR "%s: Unable to get __SEG from: %s\n",
__func__, (char *)name_buffer.pointer);
kfree(name_buffer.pointer);
printk(KERN_ERR "%s: Unable to get __SEG from: ",
__func__);
acpi_ns_print_node_pathname(rootbus_handle, NULL);
printk("\n");
return 1;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/ia64/sn/kernel/io_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/acpi.h>
#include <asm/sn/sn2/sn_hwperf.h>
#include <asm/sn/acpi.h>
#include "acpi/acglobal.h"

extern void sn_init_cpei_timer(void);
extern void register_sn_procfs(void);
Expand Down Expand Up @@ -472,7 +473,7 @@ sn_io_early_init(void)
{
struct acpi_table_header *header = NULL;

acpi_get_table(ACPI_SIG_DSDT, 1, &header);
acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
BUG_ON(header == NULL);
sn_acpi_rev = header->oem_revision;
}
Expand Down Expand Up @@ -504,7 +505,7 @@ sn_io_early_init(void)

{
struct acpi_table_header *header;
(void)acpi_get_table(ACPI_SIG_DSDT, 1, &header);
(void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n",
header->oem_revision);
}
Expand Down
11 changes: 0 additions & 11 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,17 +1359,6 @@ static void __init acpi_process_madt(void)
"Invalid BIOS MADT, disabling ACPI\n");
disable_acpi();
}
} else {
/*
* ACPI found no MADT, and so ACPI wants UP PIC mode.
* In the event an MPS table was found, forget it.
* Boot with "acpi=off" to use MPS on such a system.
*/
if (smp_found_config) {
printk(KERN_WARNING PREFIX
"No APIC-table, disabling MPS\n");
smp_found_config = 0;
}
}
#endif
return;
Expand Down
22 changes: 13 additions & 9 deletions trunk/drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
# Makefile for the Linux ACPI interpreter
#

ccflags-y := -Os
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
export ACPI_CFLAGS

ACPI_CFLAGS := -Os

ifdef CONFIG_ACPI_DEBUG
ACPI_CFLAGS += -DACPI_DEBUG_OUTPUT
endif

EXTRA_CFLAGS += $(ACPI_CFLAGS)

#
# ACPI Boot-Time Table Parsing
Expand All @@ -15,13 +22,9 @@ obj-$(CONFIG_X86) += blacklist.o
# ACPI Core Subsystem (Interpreter)
#
obj-y += osl.o utils.o reboot.o\
acpica/

# sleep related files
obj-y += wakeup.o
obj-y += main.o
obj-$(CONFIG_ACPI_SLEEP) += proc.o

dispatcher/ events/ executer/ hardware/ \
namespace/ parser/ resources/ tables/ \
utilities/

#
# ACPI Bus and Device Drivers
Expand All @@ -32,6 +35,7 @@ ifdef CONFIG_CPU_FREQ
processor-objs += processor_perflib.o
endif

obj-y += sleep/
obj-y += bus.o glue.o
obj-y += scan.o
# Keep EC driver first. Initialization of others depend on it.
Expand Down
44 changes: 0 additions & 44 deletions trunk/drivers/acpi/acpica/Makefile

This file was deleted.

Loading

0 comments on commit 3447eca

Please sign in to comment.