From e4e38cfcb6e1f049bd22b402e0b73bf53d1d820c Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 2 Feb 2007 22:14:22 -0500 Subject: [PATCH] --- yaml --- r: 46423 b: refs/heads/master c: 647fb47dfabeffd2f1706013ebf5cfc92b70d273 h: refs/heads/master i: 46421: 10769dac7121ac6e8f78ac733429704b31243143 46419: 3c24ca4ffccc6a96330f6360eaaa1cda03b74d6d 46415: 9f28f532ce0a26b54e43327b7259876e1387036c v: v3 --- [refs] | 2 +- trunk/arch/ia64/sn/kernel/io_common.c | 18 ++++++++++++------ trunk/arch/ia64/sn/kernel/iomv.c | 5 ++--- trunk/include/asm-ia64/sn/acpi.h | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 trunk/include/asm-ia64/sn/acpi.h diff --git a/[refs] b/[refs] index 0dc1e5a8aee8..032af4f99ba5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: defad23020bb7701b3ad414135c73fc03054507b +refs/heads/master: 647fb47dfabeffd2f1706013ebf5cfc92b70d273 diff --git a/trunk/arch/ia64/sn/kernel/io_common.c b/trunk/arch/ia64/sn/kernel/io_common.c index 65979f1fb353..75f0379958f9 100644 --- a/trunk/arch/ia64/sn/kernel/io_common.c +++ b/trunk/arch/ia64/sn/kernel/io_common.c @@ -25,6 +25,7 @@ #include "xtalk/xwidgetdev.h" #include #include +#include extern void sn_init_cpei_timer(void); extern void register_sn_procfs(void); @@ -36,6 +37,7 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64); extern void sn_io_acpi_init(void); extern void sn_io_init(void); + static struct list_head sn_sysdata_list; /* sysdata list struct */ @@ -48,7 +50,7 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */ struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ -int sn_acpi_base_support() +int sn_acpi_base_support(void) { struct acpi_table_header *header; (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); @@ -293,7 +295,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev) list_add_tail(&pcidev_info->pdi_list, &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); - if (sn_acpi_base_support()) + if (SN_ACPI_BASE_SUPPORT()) sn_acpi_slot_fixup(dev, pcidev_info); else sn_more_slot_fixup(dev, pcidev_info); @@ -505,7 +507,7 @@ void __devinit sn_pci_fixup_bus(struct pci_bus *bus) { - if (sn_acpi_base_support()) + if (SN_ACPI_BASE_SUPPORT()) sn_acpi_bus_fixup(bus); else sn_bus_fixup(bus); @@ -551,9 +553,13 @@ sn_io_early_init(void) register_sn_procfs(); #endif - printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", - acpi_gbl_DSDT->oem_revision); - if (sn_acpi_base_support()) + { + struct acpi_table_header *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); + } + if (SN_ACPI_BASE_SUPPORT()) sn_io_acpi_init(); else sn_io_init(); diff --git a/trunk/arch/ia64/sn/kernel/iomv.c b/trunk/arch/ia64/sn/kernel/iomv.c index b1a47da118b1..ab7e2fd40798 100644 --- a/trunk/arch/ia64/sn/kernel/iomv.c +++ b/trunk/arch/ia64/sn/kernel/iomv.c @@ -16,6 +16,7 @@ #include #include #include +#include #define IS_LEGACY_VGA_IOPORT(p) \ (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) @@ -29,8 +30,6 @@ * SN i/o address. Used by sn_in*() and sn_out*(). */ -extern int sn_acpi_base_support(); - void *sn_io_addr(unsigned long port) { if (!IS_RUNNING_ON_SIMULATOR()) { @@ -39,7 +38,7 @@ void *sn_io_addr(unsigned long port) /* On sn2, legacy I/O ports don't point at anything */ if (port < (64 * 1024)) return NULL; - if (sn_acpi_base_support()) + if (SN_ACPI_BASE_SUPPORT()) return (__ia64_mk_io_addr(port)); else return ((void *)(port | __IA64_UNCACHED_OFFSET)); diff --git a/trunk/include/asm-ia64/sn/acpi.h b/trunk/include/asm-ia64/sn/acpi.h new file mode 100644 index 000000000000..7d6cb3b686e7 --- /dev/null +++ b/trunk/include/asm-ia64/sn/acpi.h @@ -0,0 +1,18 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved. + */ + +#ifndef _ASM_IA64_SN_ACPI_H +#define _ASM_IA64_SN_ACPI_H + +#include "acpi/acglobal.h" + +#define SN_ACPI_BASE_SUPPORT() sn_acpi_base_support() + +extern int sn_acpi_base_support(void); + +#endif /* _ASM_IA64_SN_ACPI_H */