aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>2007-02-02 11:48:19 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:22 -0500
commitad71860a17ba33eb0e673e9e2cf5ba0d8e3e3fdd (patch)
tree9f60547a2e8782c04d7cd1c41bc874047008458c /arch/ia64
parenta4bbb810dedaecf74d54b16b6dd3c33e95e1024c (diff)
ACPICA: minimal patch to integrate new tables into Linux
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/acpi.c8
-rw-r--r--arch/ia64/sn/kernel/io_common.c17
-rw-r--r--arch/ia64/sn/kernel/iomv.c10
3 files changed, 22 insertions, 13 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index ef2fe474f107..aa6f96720984 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -76,7 +76,7 @@ const char *acpi_get_sysname(void)
76{ 76{
77#ifdef CONFIG_IA64_GENERIC 77#ifdef CONFIG_IA64_GENERIC
78 unsigned long rsdp_phys; 78 unsigned long rsdp_phys;
79 struct acpi20_table_rsdp *rsdp; 79 struct acpi_table_rsdp *rsdp;
80 struct acpi_table_xsdt *xsdt; 80 struct acpi_table_xsdt *xsdt;
81 struct acpi_table_header *hdr; 81 struct acpi_table_header *hdr;
82 82
@@ -87,8 +87,8 @@ const char *acpi_get_sysname(void)
87 return "dig"; 87 return "dig";
88 } 88 }
89 89
90 rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); 90 rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys);
91 if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { 91 if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) {
92 printk(KERN_ERR 92 printk(KERN_ERR
93 "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); 93 "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n");
94 return "dig"; 94 return "dig";
@@ -96,7 +96,7 @@ const char *acpi_get_sysname(void)
96 96
97 xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); 97 xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address);
98 hdr = &xsdt->header; 98 hdr = &xsdt->header;
99 if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { 99 if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) {
100 printk(KERN_ERR 100 printk(KERN_ERR
101 "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); 101 "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n");
102 return "dig"; 102 return "dig";
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index d4dd8f4b6b8d..65979f1fb353 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -25,7 +25,6 @@
25#include "xtalk/xwidgetdev.h" 25#include "xtalk/xwidgetdev.h"
26#include <linux/acpi.h> 26#include <linux/acpi.h>
27#include <asm/sn/sn2/sn_hwperf.h> 27#include <asm/sn/sn2/sn_hwperf.h>
28#include <asm/sn/acpi.h>
29 28
30extern void sn_init_cpei_timer(void); 29extern void sn_init_cpei_timer(void);
31extern void register_sn_procfs(void); 30extern void register_sn_procfs(void);
@@ -37,7 +36,6 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64);
37extern void sn_io_acpi_init(void); 36extern void sn_io_acpi_init(void);
38extern void sn_io_init(void); 37extern void sn_io_init(void);
39 38
40
41static struct list_head sn_sysdata_list; 39static struct list_head sn_sysdata_list;
42 40
43/* sysdata list struct */ 41/* sysdata list struct */
@@ -50,6 +48,15 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */
50 48
51struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ 49struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */
52 50
51int sn_acpi_base_support()
52{
53 struct acpi_table_header *header;
54 (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
55 if (header && header->oem_revision >= 0x20101)
56 return 1;
57 return 0;
58}
59
53/* 60/*
54 * Hooks and struct for unsupported pci providers 61 * Hooks and struct for unsupported pci providers
55 */ 62 */
@@ -286,7 +293,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
286 list_add_tail(&pcidev_info->pdi_list, 293 list_add_tail(&pcidev_info->pdi_list,
287 &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); 294 &(SN_PLATFORM_DATA(dev->bus)->pcidev_info));
288 295
289 if (SN_ACPI_BASE_SUPPORT()) 296 if (sn_acpi_base_support())
290 sn_acpi_slot_fixup(dev, pcidev_info); 297 sn_acpi_slot_fixup(dev, pcidev_info);
291 else 298 else
292 sn_more_slot_fixup(dev, pcidev_info); 299 sn_more_slot_fixup(dev, pcidev_info);
@@ -498,7 +505,7 @@ void __devinit
498sn_pci_fixup_bus(struct pci_bus *bus) 505sn_pci_fixup_bus(struct pci_bus *bus)
499{ 506{
500 507
501 if (SN_ACPI_BASE_SUPPORT()) 508 if (sn_acpi_base_support())
502 sn_acpi_bus_fixup(bus); 509 sn_acpi_bus_fixup(bus);
503 else 510 else
504 sn_bus_fixup(bus); 511 sn_bus_fixup(bus);
@@ -546,7 +553,7 @@ sn_io_early_init(void)
546 553
547 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", 554 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n",
548 acpi_gbl_DSDT->oem_revision); 555 acpi_gbl_DSDT->oem_revision);
549 if (SN_ACPI_BASE_SUPPORT()) 556 if (sn_acpi_base_support())
550 sn_io_acpi_init(); 557 sn_io_acpi_init();
551 else 558 else
552 sn_io_init(); 559 sn_io_init();
diff --git a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c
index 4aa4f301d56d..b1a47da118b1 100644
--- a/arch/ia64/sn/kernel/iomv.c
+++ b/arch/ia64/sn/kernel/iomv.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * This file is subject to the terms and conditions of the GNU General Public 2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
@@ -16,7 +16,6 @@
16#include <asm/sn/pda.h> 16#include <asm/sn/pda.h>
17#include <asm/sn/sn_cpuid.h> 17#include <asm/sn/sn_cpuid.h>
18#include <asm/sn/shub_mmr.h> 18#include <asm/sn/shub_mmr.h>
19#include <asm/sn/acpi.h>
20 19
21#define IS_LEGACY_VGA_IOPORT(p) \ 20#define IS_LEGACY_VGA_IOPORT(p) \
22 (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) 21 (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df))
@@ -26,9 +25,12 @@
26 * @port: port to convert 25 * @port: port to convert
27 * 26 *
28 * Legacy in/out instructions are converted to ld/st instructions 27 * Legacy in/out instructions are converted to ld/st instructions
29 * on IA64. This routine will convert a port number into a valid 28 * on IA64. This routine will convert a port number into a valid
30 * SN i/o address. Used by sn_in*() and sn_out*(). 29 * SN i/o address. Used by sn_in*() and sn_out*().
31 */ 30 */
31
32extern int sn_acpi_base_support();
33
32void *sn_io_addr(unsigned long port) 34void *sn_io_addr(unsigned long port)
33{ 35{
34 if (!IS_RUNNING_ON_SIMULATOR()) { 36 if (!IS_RUNNING_ON_SIMULATOR()) {
@@ -37,7 +39,7 @@ void *sn_io_addr(unsigned long port)
37 /* On sn2, legacy I/O ports don't point at anything */ 39 /* On sn2, legacy I/O ports don't point at anything */
38 if (port < (64 * 1024)) 40 if (port < (64 * 1024))
39 return NULL; 41 return NULL;
40 if (SN_ACPI_BASE_SUPPORT()) 42 if (sn_acpi_base_support())
41 return (__ia64_mk_io_addr(port)); 43 return (__ia64_mk_io_addr(port));
42 else 44 else
43 return ((void *)(port | __IA64_UNCACHED_OFFSET)); 45 return ((void *)(port | __IA64_UNCACHED_OFFSET));