Loading arch/i386/kernel/acpi/boot.c +5 −12 Original line number Original line Diff line number Diff line Loading @@ -716,33 +716,26 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) printk(KERN_WARNING PREFIX "Unable to map FADT\n"); printk(KERN_WARNING PREFIX "Unable to map FADT\n"); return 0; return 0; } } /* initialize sci_int early for INT_SRC_OVR MADT parsing */ acpi_fadt.sci_int = fadt->sci_int; /* initialize rev and apic_phys_dest_mode for x86_64 genapic */ acpi_fadt.revision = fadt->revision; acpi_fadt.force_apic_physical_destination_mode = fadt->force_apic_physical_destination_mode; #ifdef CONFIG_X86_PM_TIMER #ifdef CONFIG_X86_PM_TIMER /* detect the location of the ACPI PM Timer */ /* detect the location of the ACPI PM Timer */ if (fadt->revision >= FADT2_REVISION_ID) { if (fadt->header.revision >= FADT2_REVISION_ID) { /* FADT rev. 2 */ /* FADT rev. 2 */ if (fadt->xpm_tmr_blk.address_space_id != if (fadt->xpm_timer_block.space_id != ACPI_ADR_SPACE_SYSTEM_IO) ACPI_ADR_SPACE_SYSTEM_IO) return 0; return 0; pmtmr_ioport = fadt->xpm_tmr_blk.address; pmtmr_ioport = fadt->xpm_timer_block.address; /* /* * "X" fields are optional extensions to the original V1.0 * "X" fields are optional extensions to the original V1.0 * fields, so we must selectively expand V1.0 fields if the * fields, so we must selectively expand V1.0 fields if the * corresponding X field is zero. * corresponding X field is zero. */ */ if (!pmtmr_ioport) if (!pmtmr_ioport) pmtmr_ioport = fadt->V1_pm_tmr_blk; pmtmr_ioport = fadt->pm_timer_block; } else { } else { /* FADT rev. 1 */ /* FADT rev. 1 */ pmtmr_ioport = fadt->V1_pm_tmr_blk; pmtmr_ioport = fadt->pm_timer_block; } } if (pmtmr_ioport) if (pmtmr_ioport) printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", Loading arch/ia64/kernel/acpi.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,7 @@ const char *acpi_get_sysname(void) { { #ifdef CONFIG_IA64_GENERIC #ifdef CONFIG_IA64_GENERIC unsigned long rsdp_phys; unsigned long rsdp_phys; struct acpi20_table_rsdp *rsdp; struct acpi_table_rsdp *rsdp; struct acpi_table_xsdt *xsdt; struct acpi_table_xsdt *xsdt; struct acpi_table_header *hdr; struct acpi_table_header *hdr; Loading @@ -87,8 +87,8 @@ const char *acpi_get_sysname(void) return "dig"; return "dig"; } } rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys); if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) { printk(KERN_ERR printk(KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); return "dig"; return "dig"; Loading @@ -96,7 +96,7 @@ const char *acpi_get_sysname(void) xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); hdr = &xsdt->header; hdr = &xsdt->header; if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) { printk(KERN_ERR printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); return "dig"; return "dig"; Loading arch/ia64/sn/kernel/io_common.c +12 −5 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ #include "xtalk/xwidgetdev.h" #include "xtalk/xwidgetdev.h" #include <linux/acpi.h> #include <linux/acpi.h> #include <asm/sn/sn2/sn_hwperf.h> #include <asm/sn/sn2/sn_hwperf.h> #include <asm/sn/acpi.h> extern void sn_init_cpei_timer(void); extern void sn_init_cpei_timer(void); extern void register_sn_procfs(void); extern void register_sn_procfs(void); Loading @@ -37,7 +36,6 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64); extern void sn_io_acpi_init(void); extern void sn_io_acpi_init(void); extern void sn_io_init(void); extern void sn_io_init(void); static struct list_head sn_sysdata_list; static struct list_head sn_sysdata_list; /* sysdata list struct */ /* sysdata list struct */ Loading @@ -50,6 +48,15 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */ struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ int sn_acpi_base_support() { struct acpi_table_header *header; (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); if (header && header->oem_revision >= 0x20101) return 1; return 0; } /* /* * Hooks and struct for unsupported pci providers * Hooks and struct for unsupported pci providers */ */ Loading Loading @@ -286,7 +293,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev) list_add_tail(&pcidev_info->pdi_list, list_add_tail(&pcidev_info->pdi_list, &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_acpi_slot_fixup(dev, pcidev_info); sn_acpi_slot_fixup(dev, pcidev_info); else else sn_more_slot_fixup(dev, pcidev_info); sn_more_slot_fixup(dev, pcidev_info); Loading Loading @@ -498,7 +505,7 @@ void __devinit sn_pci_fixup_bus(struct pci_bus *bus) sn_pci_fixup_bus(struct pci_bus *bus) { { if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_acpi_bus_fixup(bus); sn_acpi_bus_fixup(bus); else else sn_bus_fixup(bus); sn_bus_fixup(bus); Loading Loading @@ -546,7 +553,7 @@ sn_io_early_init(void) printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", acpi_gbl_DSDT->oem_revision); acpi_gbl_DSDT->oem_revision); if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_io_acpi_init(); sn_io_acpi_init(); else else sn_io_init(); sn_io_init(); Loading arch/ia64/sn/kernel/iomv.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ #include <asm/sn/pda.h> #include <asm/sn/pda.h> #include <asm/sn/sn_cpuid.h> #include <asm/sn/sn_cpuid.h> #include <asm/sn/shub_mmr.h> #include <asm/sn/shub_mmr.h> #include <asm/sn/acpi.h> #define IS_LEGACY_VGA_IOPORT(p) \ #define IS_LEGACY_VGA_IOPORT(p) \ (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) Loading @@ -29,6 +28,9 @@ * on IA64. This routine will convert a port number into a valid * on IA64. This routine will convert a port number into a valid * SN i/o address. Used by sn_in*() and sn_out*(). * SN i/o address. Used by sn_in*() and sn_out*(). */ */ extern int sn_acpi_base_support(); void *sn_io_addr(unsigned long port) void *sn_io_addr(unsigned long port) { { if (!IS_RUNNING_ON_SIMULATOR()) { if (!IS_RUNNING_ON_SIMULATOR()) { Loading @@ -37,7 +39,7 @@ void *sn_io_addr(unsigned long port) /* On sn2, legacy I/O ports don't point at anything */ /* On sn2, legacy I/O ports don't point at anything */ if (port < (64 * 1024)) if (port < (64 * 1024)) return NULL; return NULL; if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) return (__ia64_mk_io_addr(port)); return (__ia64_mk_io_addr(port)); else else return ((void *)(port | __IA64_UNCACHED_OFFSET)); return ((void *)(port | __IA64_UNCACHED_OFFSET)); Loading arch/x86_64/kernel/time.c +9 −9 Original line number Original line Diff line number Diff line Loading @@ -498,7 +498,7 @@ static unsigned long get_cmos_time(void) { { unsigned int year, mon, day, hour, min, sec; unsigned int year, mon, day, hour, min, sec; unsigned long flags; unsigned long flags; unsigned extyear = 0; unsigned century = 0; spin_lock_irqsave(&rtc_lock, flags); spin_lock_irqsave(&rtc_lock, flags); Loading @@ -510,9 +510,9 @@ static unsigned long get_cmos_time(void) mon = CMOS_READ(RTC_MONTH); mon = CMOS_READ(RTC_MONTH); year = CMOS_READ(RTC_YEAR); year = CMOS_READ(RTC_YEAR); #ifdef CONFIG_ACPI #ifdef CONFIG_ACPI if (acpi_fadt.revision >= FADT2_REVISION_ID && if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && acpi_fadt.century) acpi_gbl_FADT.century) extyear = CMOS_READ(acpi_fadt.century); century = CMOS_READ(acpi_gbl_FADT.century); #endif #endif } while (sec != CMOS_READ(RTC_SECONDS)); } while (sec != CMOS_READ(RTC_SECONDS)); Loading @@ -530,10 +530,10 @@ static unsigned long get_cmos_time(void) BCD_TO_BIN(mon); BCD_TO_BIN(mon); BCD_TO_BIN(year); BCD_TO_BIN(year); if (extyear) { if (century) { BCD_TO_BIN(extyear); BCD_TO_BIN(century); year += extyear; year += century * 100; printk(KERN_INFO "Extended CMOS year: %d\n", extyear); printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); } else { } else { /* /* * x86-64 systems only exists since 2002. * x86-64 systems only exists since 2002. Loading Loading @@ -954,7 +954,7 @@ __cpuinit int unsynchronized_tsc(void) if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { #ifdef CONFIG_ACPI #ifdef CONFIG_ACPI /* But TSC doesn't tick in C3 so don't use it there */ /* But TSC doesn't tick in C3 so don't use it there */ if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 1000) if (acpi_gbl_FADT.header.length > 0 && acpi_gbl_FADT.C3latency < 1000) return 1; return 1; #endif #endif return 0; return 0; Loading Loading
arch/i386/kernel/acpi/boot.c +5 −12 Original line number Original line Diff line number Diff line Loading @@ -716,33 +716,26 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) printk(KERN_WARNING PREFIX "Unable to map FADT\n"); printk(KERN_WARNING PREFIX "Unable to map FADT\n"); return 0; return 0; } } /* initialize sci_int early for INT_SRC_OVR MADT parsing */ acpi_fadt.sci_int = fadt->sci_int; /* initialize rev and apic_phys_dest_mode for x86_64 genapic */ acpi_fadt.revision = fadt->revision; acpi_fadt.force_apic_physical_destination_mode = fadt->force_apic_physical_destination_mode; #ifdef CONFIG_X86_PM_TIMER #ifdef CONFIG_X86_PM_TIMER /* detect the location of the ACPI PM Timer */ /* detect the location of the ACPI PM Timer */ if (fadt->revision >= FADT2_REVISION_ID) { if (fadt->header.revision >= FADT2_REVISION_ID) { /* FADT rev. 2 */ /* FADT rev. 2 */ if (fadt->xpm_tmr_blk.address_space_id != if (fadt->xpm_timer_block.space_id != ACPI_ADR_SPACE_SYSTEM_IO) ACPI_ADR_SPACE_SYSTEM_IO) return 0; return 0; pmtmr_ioport = fadt->xpm_tmr_blk.address; pmtmr_ioport = fadt->xpm_timer_block.address; /* /* * "X" fields are optional extensions to the original V1.0 * "X" fields are optional extensions to the original V1.0 * fields, so we must selectively expand V1.0 fields if the * fields, so we must selectively expand V1.0 fields if the * corresponding X field is zero. * corresponding X field is zero. */ */ if (!pmtmr_ioport) if (!pmtmr_ioport) pmtmr_ioport = fadt->V1_pm_tmr_blk; pmtmr_ioport = fadt->pm_timer_block; } else { } else { /* FADT rev. 1 */ /* FADT rev. 1 */ pmtmr_ioport = fadt->V1_pm_tmr_blk; pmtmr_ioport = fadt->pm_timer_block; } } if (pmtmr_ioport) if (pmtmr_ioport) printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", Loading
arch/ia64/kernel/acpi.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,7 @@ const char *acpi_get_sysname(void) { { #ifdef CONFIG_IA64_GENERIC #ifdef CONFIG_IA64_GENERIC unsigned long rsdp_phys; unsigned long rsdp_phys; struct acpi20_table_rsdp *rsdp; struct acpi_table_rsdp *rsdp; struct acpi_table_xsdt *xsdt; struct acpi_table_xsdt *xsdt; struct acpi_table_header *hdr; struct acpi_table_header *hdr; Loading @@ -87,8 +87,8 @@ const char *acpi_get_sysname(void) return "dig"; return "dig"; } } rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys); if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) { printk(KERN_ERR printk(KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); return "dig"; return "dig"; Loading @@ -96,7 +96,7 @@ const char *acpi_get_sysname(void) xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); hdr = &xsdt->header; hdr = &xsdt->header; if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) { printk(KERN_ERR printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); return "dig"; return "dig"; Loading
arch/ia64/sn/kernel/io_common.c +12 −5 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,6 @@ #include "xtalk/xwidgetdev.h" #include "xtalk/xwidgetdev.h" #include <linux/acpi.h> #include <linux/acpi.h> #include <asm/sn/sn2/sn_hwperf.h> #include <asm/sn/sn2/sn_hwperf.h> #include <asm/sn/acpi.h> extern void sn_init_cpei_timer(void); extern void sn_init_cpei_timer(void); extern void register_sn_procfs(void); extern void register_sn_procfs(void); Loading @@ -37,7 +36,6 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64); extern void sn_io_acpi_init(void); extern void sn_io_acpi_init(void); extern void sn_io_init(void); extern void sn_io_init(void); static struct list_head sn_sysdata_list; static struct list_head sn_sysdata_list; /* sysdata list struct */ /* sysdata list struct */ Loading @@ -50,6 +48,15 @@ int sn_ioif_inited; /* SN I/O infrastructure initialized? */ struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ int sn_acpi_base_support() { struct acpi_table_header *header; (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); if (header && header->oem_revision >= 0x20101) return 1; return 0; } /* /* * Hooks and struct for unsupported pci providers * Hooks and struct for unsupported pci providers */ */ Loading Loading @@ -286,7 +293,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev) list_add_tail(&pcidev_info->pdi_list, list_add_tail(&pcidev_info->pdi_list, &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_acpi_slot_fixup(dev, pcidev_info); sn_acpi_slot_fixup(dev, pcidev_info); else else sn_more_slot_fixup(dev, pcidev_info); sn_more_slot_fixup(dev, pcidev_info); Loading Loading @@ -498,7 +505,7 @@ void __devinit sn_pci_fixup_bus(struct pci_bus *bus) sn_pci_fixup_bus(struct pci_bus *bus) { { if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_acpi_bus_fixup(bus); sn_acpi_bus_fixup(bus); else else sn_bus_fixup(bus); sn_bus_fixup(bus); Loading Loading @@ -546,7 +553,7 @@ sn_io_early_init(void) printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", acpi_gbl_DSDT->oem_revision); acpi_gbl_DSDT->oem_revision); if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) sn_io_acpi_init(); sn_io_acpi_init(); else else sn_io_init(); sn_io_init(); Loading
arch/ia64/sn/kernel/iomv.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ #include <asm/sn/pda.h> #include <asm/sn/pda.h> #include <asm/sn/sn_cpuid.h> #include <asm/sn/sn_cpuid.h> #include <asm/sn/shub_mmr.h> #include <asm/sn/shub_mmr.h> #include <asm/sn/acpi.h> #define IS_LEGACY_VGA_IOPORT(p) \ #define IS_LEGACY_VGA_IOPORT(p) \ (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) Loading @@ -29,6 +28,9 @@ * on IA64. This routine will convert a port number into a valid * on IA64. This routine will convert a port number into a valid * SN i/o address. Used by sn_in*() and sn_out*(). * SN i/o address. Used by sn_in*() and sn_out*(). */ */ extern int sn_acpi_base_support(); void *sn_io_addr(unsigned long port) void *sn_io_addr(unsigned long port) { { if (!IS_RUNNING_ON_SIMULATOR()) { if (!IS_RUNNING_ON_SIMULATOR()) { Loading @@ -37,7 +39,7 @@ void *sn_io_addr(unsigned long port) /* On sn2, legacy I/O ports don't point at anything */ /* On sn2, legacy I/O ports don't point at anything */ if (port < (64 * 1024)) if (port < (64 * 1024)) return NULL; return NULL; if (SN_ACPI_BASE_SUPPORT()) if (sn_acpi_base_support()) return (__ia64_mk_io_addr(port)); return (__ia64_mk_io_addr(port)); else else return ((void *)(port | __IA64_UNCACHED_OFFSET)); return ((void *)(port | __IA64_UNCACHED_OFFSET)); Loading
arch/x86_64/kernel/time.c +9 −9 Original line number Original line Diff line number Diff line Loading @@ -498,7 +498,7 @@ static unsigned long get_cmos_time(void) { { unsigned int year, mon, day, hour, min, sec; unsigned int year, mon, day, hour, min, sec; unsigned long flags; unsigned long flags; unsigned extyear = 0; unsigned century = 0; spin_lock_irqsave(&rtc_lock, flags); spin_lock_irqsave(&rtc_lock, flags); Loading @@ -510,9 +510,9 @@ static unsigned long get_cmos_time(void) mon = CMOS_READ(RTC_MONTH); mon = CMOS_READ(RTC_MONTH); year = CMOS_READ(RTC_YEAR); year = CMOS_READ(RTC_YEAR); #ifdef CONFIG_ACPI #ifdef CONFIG_ACPI if (acpi_fadt.revision >= FADT2_REVISION_ID && if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && acpi_fadt.century) acpi_gbl_FADT.century) extyear = CMOS_READ(acpi_fadt.century); century = CMOS_READ(acpi_gbl_FADT.century); #endif #endif } while (sec != CMOS_READ(RTC_SECONDS)); } while (sec != CMOS_READ(RTC_SECONDS)); Loading @@ -530,10 +530,10 @@ static unsigned long get_cmos_time(void) BCD_TO_BIN(mon); BCD_TO_BIN(mon); BCD_TO_BIN(year); BCD_TO_BIN(year); if (extyear) { if (century) { BCD_TO_BIN(extyear); BCD_TO_BIN(century); year += extyear; year += century * 100; printk(KERN_INFO "Extended CMOS year: %d\n", extyear); printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); } else { } else { /* /* * x86-64 systems only exists since 2002. * x86-64 systems only exists since 2002. Loading Loading @@ -954,7 +954,7 @@ __cpuinit int unsynchronized_tsc(void) if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { #ifdef CONFIG_ACPI #ifdef CONFIG_ACPI /* But TSC doesn't tick in C3 so don't use it there */ /* But TSC doesn't tick in C3 so don't use it there */ if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 1000) if (acpi_gbl_FADT.header.length > 0 && acpi_gbl_FADT.C3latency < 1000) return 1; return 1; #endif #endif return 0; return 0; Loading