arch specific changes for SMBIOS and System Firmware
Subsystems (7)
RFC PATCH 3/35 arch specific changes for SMBIOS and System Firmware
arch specific changes for SMBIOS and System Firmware
--- arch/ia64/kernel/setup.c | 8 +- arch/x86/include/asm/mmconfig.h | 4 +- arch/x86/include/asm/pci_x86.h | 6 +- arch/x86/kernel/acpi/boot.c | 177 ++++++++-------- arch/x86/kernel/acpi/sleep.c | 1 - arch/x86/kernel/apic/apic.c | 20 +- arch/x86/kernel/apic/bigsmp_32.c | 37 ++-- arch/x86/kernel/apm_32.c | 391 ++++++++++++++++++++++-------------- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/vmware.c | 17 ++- arch/x86/kernel/io_delay.c | 40 ++-- arch/x86/kernel/mmconf-fam10h_64.c | 28 ++-- arch/x86/kernel/probe_roms.c | 1 - arch/x86/kernel/process.c | 8 +- arch/x86/kernel/reboot.c | 126 ++++++------ arch/x86/kernel/setup.c | 14 +- arch/x86/kernel/tsc.c | 16 +- arch/x86/pci/acpi.c | 18 +- arch/x86/pci/broadcom_bus.c | 1 - arch/x86/pci/common.c | 163 ++++++++-------- arch/x86/pci/direct.c | 7 +- arch/x86/pci/fixup.c | 33 ++-- arch/x86/pci/init.c | 4 +- arch/x86/pci/irq.c | 26 ++-- arch/x86/pci/mmconfig-shared.c | 10 +- arch/x86/pci/mrst.c | 1 - drivers/cpufreq/acpi-cpufreq.c | 16 +- drivers/cpufreq/powernow-k7.c | 14 +- 28 files changed, 653 insertions(+), 536 deletions(-)
arch/ia64/kernel/setup.c +4 -4
@@ -36,7 +36,7 @@#include <linux/string.h> #include <linux/threads.h> #include <linux/screen_info.h> -#include <linux/dmi.h> +#include <linux/smbios.h> #include <linux/serial.h> #include <linux/serial_core.h> #include <linux/efi.h>
@@ -1043,9 +1043,9 @@ check_bugs (void) (unsigned long) __end___mckinley_e9_bundles); } -static int __init run_dmi_scan (void ) +static int __init run_smbios_scan (void ) { -dmi_scan_machine (); +smbios_init ();return 0 ; } -core_initcall (run_dmi_scan); +core_initcall (run_smbios_scan);
arch/x86/include/asm/mmconfig.h +2 -2
@@ -3,10 +3,10 @@#ifdef CONFIG_PCI_MMCONFIG extern void __cpuinit fam10h_check_enable_mmcfg (void ); -extern void __cpuinit check_enable_amd_mmconf_dmi (void ); +extern void __cpuinit check_enable_amd_pci_mmconf (void );#else static inline void fam10h_check_enable_mmcfg (void ) { } -static inline void check_enable_amd_mmconf_dmi (void ) { } +static inline void check_enable_amd_pci_mmconf (void ) { }#endif #endif /* _ASM_X86_MMCONFIG_H */
arch/x86/include/asm/pci_x86.h +3 -3
@@ -39,7 +39,7 @@ enum pci_bf_sort_state { pci_bf_sort_default, pci_force_nobf, pci_force_bf, - pci_dmi_bf, + pci_smbios_bf, };/* pci-i386.c */
@@ -109,8 +109,8 @@ extern bool port_cf9_safe;extern int pci_direct_probe (void );extern void pci_direct_init (int type);extern void pci_pcbios_init (void ); -extern void __init dmi_check_pciprobe (void ); -extern void __init dmi_check_skip_isa_align (void ); +extern void __init smbios_check_pciprobe (void ); +extern void __init smbios_check_skip_isa_align (void );/* some common used subsys_initcalls */ extern int __init pci_acpi_init (void );
arch/x86/kernel/acpi/boot.c +89 -88
263 lines not on this page · raw message
arch/x86/kernel/acpi/sleep.c +0 -1
@@ -8,7 +8,6 @@#include <linux/acpi.h> #include <linux/bootmem.h> #include <linux/memblock.h> -#include <linux/dmi.h> #include <linux/cpumask.h> #include <asm/segment.h> #include <asm/desc.h>
arch/x86/kernel/apic/apic.c +10 -10
@@ -30,7 +30,7 @@#include <linux/dmar.h> #include <linux/init.h> #include <linux/cpu.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/smp.h> #include <linux/mm.h>
@@ -162,7 +162,7 @@ early_param("nox2apic", setup_nox2apic);unsigned long mp_lapic_addr;int disable_apic; -/* Disable local APIC timer from the kernel commandline or via dmi quirk */ +/* Disable local APIC timer from the kernel commandline or via smbios quirk */ static int disable_apic_timer__initdata ;/* Local APIC timer works in C2 */ int local_apic_timer_c2_ok;
@@ -2230,7 +2230,7 @@ static int __cpuinit apic_cluster_num(void)static int __cpuinitdata multi_checked;static int __cpuinitdata multi; -static int __cpuinit set_multi (const struct dmi_system_id *d) +static int __cpuinit set_multi (const struct sysfw_id *d) {if (multi)return 0 ;
@@ -2239,24 +2239,24 @@ static int __cpuinit set_multi(const struct dmi_system_id *d)return 0 ; } -static const __cpuinitconst struct dmi_system_id multi_dmi_table[] = { +static const __cpuinitconst struct sysfw_id set_multi_table[] = { { .callback = set_multi, .ident ="IBM System Summit2" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"IBM" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"Summit2" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"IBM" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"Summit2" ), }, }, {} }; -static void __cpuinit dmi_check_multi (void ) +static void __cpuinit check_set_multi (void ) {if (multi_checked)return ; -dmi_check_system (multi_dmi_table); +sysfw_callback (set_multi_table); multi_checked =1 ; }
@@ -2266,11 +2266,11 @@ static void __cpuinit dmi_check_multi(void)* Thus far, the major user of this is IBM's Summit2 series: * Clustered boxes may have unsynced TSC problems if they are * multi-chassis. -* Use DMI to check them +* Use SMBIOS to check them */ __cpuinit int apic_is_clustered_box (void ) { -dmi_check_multi (); +check_set_multi ();if (multi)return 1 ;
arch/x86/kernel/apic/bigsmp_32.c +21 -16
@@ -7,7 +7,7 @@#include <linux/cpumask.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/smp.h> #include <asm/apicdef.h>
@@ -151,30 +151,35 @@ static void bigsmp_send_IPI_all(int vector)bigsmp_send_IPI_mask (cpu_online_mask, vector); } -static int dmi_bigsmp;/* can be set by dmi scanners */ +static int smbios_bigsmp;/* can be set by smbios scanners */ -static int hp_ht_bigsmp (const struct dmi_system_id *d) +static int hp_ht_bigsmp (const struct sysfw_id *d) {printk (KERN_NOTICE "%s detected: force use of apic=bigsmp\n" , d->ident); - dmi_bigsmp =1 ; + smbios_bigsmp =1 ;return 0 ; } -static const struct dmi_system_id bigsmp_dmi_table[] = { - { hp_ht_bigsmp,"HP ProLiant DL760 G2" , - {DMI_MATCH (DMI_BIOS_VENDOR ,"HP" ), -DMI_MATCH (DMI_BIOS_VERSION ,"P44-" ), +static const struct sysfw_id bigsmp_id_table[] = { + { + .callback = hp_ht_bigsmp, + .ident ="HP ProLiant DL760 G2" , + { +SYSFW_MATCH (SYSFW_BIOS_VENDOR ,"HP" ), +SYSFW_MATCH (SYSFW_BIOS_VERSION ,"P44-" ), } }, - - { hp_ht_bigsmp,"HP ProLiant DL740" , - {DMI_MATCH (DMI_BIOS_VENDOR ,"HP" ), -DMI_MATCH (DMI_BIOS_VERSION ,"P47-" ), + { + .callback = hp_ht_bigsmp, + .ident ="HP ProLiant DL740" , + { +SYSFW_MATCH (SYSFW_BIOS_VENDOR ,"HP" ), +SYSFW_MATCH (SYSFW_BIOS_VERSION ,"P47-" ), } }, - { }/* NULL entry stops DMI scanning */ + {}/* NULL entry stops SMBIOS scanning */ };static void bigsmp_vector_allocation_domain (int cpu,struct cpumask *retmask)
@@ -186,11 +191,11 @@ static void bigsmp_vector_allocation_domain(int cpu, struct cpumask *retmask)static int probe_bigsmp (void ) {if (def_to_bigsmp) - dmi_bigsmp =1 ; + smbios_bigsmp =1 ;else -dmi_check_system (bigsmp_dmi_table); +sysfw_callback (bigsmp_id_table); -return dmi_bigsmp; +return smbios_bigsmp; }static struct apic apic_bigsmp = {
arch/x86/kernel/apm_32.c +245 -146
544 lines not on this page · raw message
arch/x86/kernel/cpu/amd.c +1 -1
@@ -587,7 +587,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)if (c->x86 ==0x10 ) {/* do this for boot cpu */ if (c == &boot_cpu_data) -check_enable_amd_mmconf_dmi (); +check_enable_amd_pci_mmconf ();fam10h_check_enable_mmcfg (); }
arch/x86/kernel/cpu/vmware.c +13 -4
@@ -21,7 +21,7 @@* */ -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/module.h> #include <asm/div64.h> #include <asm/x86_init.h>
@@ -85,8 +85,18 @@ static void __init vmware_platform_setup(void) "Failed to get TSC freq from the hypervisor\n"); } +static struct sysfw_id vmware_id_table[] = { + { + .ident ="VMware" , + .matches = { +SYSFW_MATCH (SYSFW_PRODUCT_SERIAL ,"VMWare" ), + }, + }, + {}, +}; +/* -* While checking the dmi string information, just checking the product +* While checking the smbios string information, just checking the product * serial key should be enough, as this will always have a VMware * specific string when running under VMware hypervisor. */
@@ -100,8 +110,7 @@ static bool __init vmware_platform(void) &hyper_vendor_id[1], &hyper_vendor_id[2]);if (!memcmp (hyper_vendor_id,"VMwareVMware" ,12 ))return true; - }else if (dmi_available &&dmi_name_in_serial ("VMware" ) && -__vmware_platform ()) + }else if (sysfw_callback (vmware_id_table) &&__vmware_platform ())return true;return false;
arch/x86/kernel/io_delay.c +20 -20
@@ -1,7 +1,7 @@/* * I/O delay strategies for inb_p/outb_p * -* Allow for a DMI based override of port 0x80, needed for certain HP laptops +* Allow for a SMBIOS based override of port 0x80, needed for certain HP laptops * and possibly other systems. Also allow for the gradual elimination of * outb_p/inb_p API uses. */
@@ -9,7 +9,7 @@#include <linux/module.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/io.h> int io_delay_type__read_mostly =CONFIG_DEFAULT_IO_DELAY_TYPE ;
@@ -44,7 +44,7 @@ void native_io_delay(void) }EXPORT_SYMBOL (native_io_delay); -static int __init dmi_io_delay_0xed_port (const struct dmi_system_id *id) +static int __init io_delay_0xed_port (const struct sysfw_id *id) {if (io_delay_type ==CONFIG_IO_DELAY_TYPE_0X80 ) {pr_notice ("%s: using 0xed I/O delay port\n" , id->ident);
@@ -58,45 +58,45 @@ static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)* Quirk table for systems that misbehave (lock up, etc.) if port * 0x80 is used: */ -static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = { +static struct sysfw_id __initdata io_delay_0xed_port_table[] = { { - .callback = dmi_io_delay_0xed_port, + .callback = io_delay_0xed_port, .ident ="Compaq Presario V6000" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"Quanta" ), -DMI_MATCH (DMI_BOARD_NAME ,"30B7" ) +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"Quanta" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"30B7" ) } }, { - .callback = dmi_io_delay_0xed_port, + .callback = io_delay_0xed_port, .ident ="HP Pavilion dv9000z" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"Quanta" ), -DMI_MATCH (DMI_BOARD_NAME ,"30B9" ) +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"Quanta" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"30B9" ) } }, { - .callback = dmi_io_delay_0xed_port, + .callback = io_delay_0xed_port, .ident ="HP Pavilion dv6000" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"Quanta" ), -DMI_MATCH (DMI_BOARD_NAME ,"30B8" ) +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"Quanta" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"30B8" ) } }, { - .callback = dmi_io_delay_0xed_port, + .callback = io_delay_0xed_port, .ident ="HP Pavilion tx1000" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"Quanta" ), -DMI_MATCH (DMI_BOARD_NAME ,"30BF" ) +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"Quanta" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"30BF" ) } }, { - .callback = dmi_io_delay_0xed_port, + .callback = io_delay_0xed_port, .ident ="Presario F700" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"Quanta" ), -DMI_MATCH (DMI_BOARD_NAME ,"30D3" ) +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"Quanta" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"30D3" ) } }, { }
@@ -105,7 +105,7 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {void __init io_delay_init (void ) {if (!io_delay_override) -dmi_check_system (io_delay_0xed_port_dmi_table); +sysfw_callback (io_delay_0xed_port_table); }static int __init io_delay_param (char *s)
arch/x86/kernel/mmconf-fam10h_64.c +14 -14
@@ -6,7 +6,7 @@#include <linux/mm.h> #include <linux/string.h> #include <linux/pci.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/range.h> #include <asm/pci-direct.h>
@@ -213,25 +213,25 @@ void __cpuinit fam10h_check_enable_mmcfg(void)wrmsrl (address, val); } -static int __init set_check_enable_amd_mmconf (const struct dmi_system_id *d) +static int __init set_check_enable_amd_mmconf (const struct sysfw_id *d) { - pci_probe |=PCI_CHECK_ENABLE_AMD_MMCONF ; -return 0 ; + pci_probe |=PCI_CHECK_ENABLE_AMD_MMCONF ; +return 0 ; } -static const struct dmi_system_id __initconst mmconf_dmi_table[] = { - { - .callback = set_check_enable_amd_mmconf, - .ident ="Sun Microsystems Machine" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Sun Microsystems" ), - }, - }, +static const struct sysfw_id __initconst mmconf_id_table[] = { + { + .callback = set_check_enable_amd_mmconf, + .ident ="Sun Microsystems Machine" , + .matches = { +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"Sun Microsystems" ), + }, + }, {} };/* Called from a __cpuinit function, but only on the BSP. */ -void __ref check_enable_amd_mmconf_dmi (void ) +void __ref check_enable_amd_pci_mmconf (void ) { -dmi_check_system (mmconf_dmi_table); +sysfw_callback (mmconf_id_table); }
arch/x86/kernel/probe_roms.c +0 -1
@@ -7,7 +7,6 @@#include <linux/console.h> #include <linux/init.h> #include <linux/edd.h> -#include <linux/dmi.h> #include <linux/pfn.h> #include <linux/pci.h> #include <asm/pci-direct.h>
arch/x86/kernel/process.c +4 -4
@@ -10,7 +10,7 @@#include <linux/clockchips.h> #include <linux/random.h> #include <linux/user-return-notifier.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/utsname.h> #include <trace/events/power.h> #include <linux/hw_breakpoint.h>
@@ -94,15 +94,15 @@ void show_regs_common(void) {const char *vendor, *product, *board; - vendor =dmi_get_system_info (DMI_SYS_VENDOR ); + vendor =sysfw_lookup (SYSFW_SYS_VENDOR );if (!vendor) vendor ="" ; - product =dmi_get_system_info (DMI_PRODUCT_NAME ); + product =sysfw_lookup (SYSFW_PRODUCT_NAME );if (!product) product ="" ;/* Board Name is optional */ - board =dmi_get_system_info (DMI_BOARD_NAME ); + board =sysfw_lookup (SYSFW_BOARD_NAME );printk (KERN_CONT "\n" ); printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s",
arch/x86/kernel/reboot.c +67 -59
302 lines not on this page · raw message
arch/x86/kernel/setup.c +7 -7
@@ -44,7 +44,7 @@#include <linux/iscsi_ibft.h> #include <linux/nodemask.h> #include <linux/kexec.h> -#include <linux/dmi.h> +#include <linux/smbios.h> #include <linux/pfn.h> #include <linux/pci.h> #include <asm/pci-direct.h>
@@ -81,7 +81,7 @@#include <asm/timer.h> #include <asm/i8259.h> #include <asm/sections.h> -#include <asm/dmi.h> +#include <asm/smbios.h> #include <asm/io_apic.h> #include <asm/ist.h> #include <asm/setup_arch.h>
@@ -123,8 +123,8 @@unsigned long max_low_pfn_mapped;unsigned long max_pfn_mapped; -#ifdef CONFIG_DMI -RESERVE_BRK (dmi_alloc,65536 ); +#ifdef CONFIG_SMBIOS +RESERVE_BRK (smbios_alloc,SMBIOS_SIZE );#endif
@@ -834,11 +834,11 @@ void __init setup_arch(char **cmdline_p)if (efi_enabled)efi_init (); -dmi_scan_machine (); +smbios_init ();/* -* VMware detection requires dmi to be available, so this -* needs to be done after dmi_scan_machine, for the BP. +* VMware detection requires smbios to be available, so this +* needs to be done after smbios_init(), for the BP. */ init_hypervisor_platform ();
arch/x86/kernel/tsc.c +8 -8
@@ -5,7 +5,7 @@#include <linux/timer.h> #include <linux/acpi_pmtmr.h> #include <linux/cpufreq.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/delay.h> #include <linux/clocksource.h> #include <linux/percpu.h>
@@ -800,22 +800,22 @@ void mark_tsc_unstable(char *reason)EXPORT_SYMBOL_GPL (mark_tsc_unstable); -static int __init dmi_mark_tsc_unstable (const struct dmi_system_id *d) +static int __init quirk_mark_tsc_unstable (const struct sysfw_id *d) {printk (KERN_NOTICE "%s detected: marking TSC unstable.\n" , - d->ident); + d->ident); tsc_unstable =1 ;return 0 ; }/* List of systems that have known TSC problems */ -static struct dmi_system_id __initdata bad_tsc_dmi_table[] = { +static struct sysfw_id __initdata bad_tsc_table[] = { { - .callback = dmi_mark_tsc_unstable, + .callback = quirk_mark_tsc_unstable, .ident ="IBM Thinkpad 380XD" , .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"IBM" ), -DMI_MATCH (DMI_BOARD_NAME ,"2635FA0" ), +SYSFW_MATCH (SYSFW_BOARD_VENDOR ,"IBM" ), +SYSFW_MATCH (SYSFW_BOARD_NAME ,"2635FA0" ), }, }, {}
@@ -1011,7 +1011,7 @@ void __init tsc_init(void)use_tsc_delay ();/* Check and install the TSC clocksource */ -dmi_check_system (bad_tsc_dmi_table); +sysfw_callback (bad_tsc_table);if (unsynchronized_tsc ())mark_tsc_unstable ("TSCs unsynchronized" );
arch/x86/pci/acpi.c +8 -10
@@ -2,7 +2,7 @@#include <linux/acpi.h> #include <linux/init.h> #include <linux/irq.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/slab.h> #include <asm/numa.h> #include <asm/pci_x86.h>
@@ -18,20 +18,20 @@ struct pci_root_info {static bool pci_use_crs = true; -static int __init set_use_crs (const struct dmi_system_id *id) +static int __init set_use_crs (const struct sysfw_id *id) { pci_use_crs = true;return 0 ; } -static const struct dmi_system_id pci_use_crs_table[]__initconst = { +static const struct sysfw_id pci_use_crs_table[]__initconst = {/* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */ { .callback = set_use_crs, .ident ="IBM System x3800" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"IBM" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"x3800" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"IBM" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"x3800" ), }, },/* https://bugzilla.kernel.org/show_bug.cgi?id=16007 */
@@ -40,7 +40,7 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { .callback = set_use_crs, .ident = "ASRock ALiveSATA2-GLAN", .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "ALiveSATA2-GLAN"), + SYSFW_MATCH(SYSFW_PRODUCT_NAME, "ALiveSATA2-GLAN"), }, }, {}
@@ -48,12 +48,10 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = {void __init pci_acpi_crs_quirks (void ) { -int year; - -if (dmi_get_date (DMI_BIOS_DATE , &year,NULL ,NULL ) && year <2008 ) +if (!(sysfw_get_date () >=20080000 )) pci_use_crs = false; -dmi_check_system (pci_use_crs_table); +sysfw_callback (pci_use_crs_table);/* * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that
arch/x86/pci/broadcom_bus.c +0 -1
@@ -11,7 +11,6 @@#include <linux/acpi.h> #include <linux/delay.h> -#include <linux/dmi.h> #include <linux/pci.h> #include <linux/init.h> #include <asm/pci_x86.h>
arch/x86/pci/common.c +84 -79
391 lines not on this page · raw message
arch/x86/pci/direct.c +3 -4
@@ -4,7 +4,7 @@#include <linux/pci.h> #include <linux/init.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <asm/pci_x86.h> /*
@@ -192,14 +192,13 @@ struct pci_raw_ops pci_direct_conf2 = {static int __init pci_sanity_check (struct pci_raw_ops *o) {u32 x =0 ; -int year, devfn; +int devfn;if (pci_probe &PCI_NO_CHECKS )return 1 ;/* Assume Type 1 works for newer systems. This handles machines that don't have anything on PCI Bus 0. */ -dmi_get_date (DMI_BIOS_DATE , &year,NULL ,NULL ); -if (year >=2001 ) +if (sysfw_get_date () >=20010000 )return 1 ;for (devfn =0 ; devfn <0x100 ; devfn++) {
arch/x86/pci/fixup.c +17 -16
@@ -3,7 +3,7 @@*/ #include <linux/delay.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/pci.h> #include <linux/init.h> #include <asm/pci_x86.h>
@@ -356,12 +356,12 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)DECLARE_PCI_FIXUP_FINAL (PCI_ANY_ID ,PCI_ANY_ID , pci_fixup_video); -static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = { +static const struct sysfw_id __devinitconst msi_k8t_quirk_table[] = { { .ident ="MSI-K8T-Neo2Fir" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"MSI" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"MS-6702E" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"MSI" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"MS-6702E" ), }, }, {}
@@ -375,12 +375,12 @@ static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = {* the corresponding register-value to enable the soundcard. * * The soundcard is only enabled, if the mainborad is identified -* via DMI-tables and the soundcard is detected to be off. +* via SMBIOS tables and the soundcard is detected to be off. */ static void __devinit pci_fixup_msi_k8t_onboard_sound (struct pci_dev *dev) {unsigned char val; -if (!dmi_check_system (msi_k8t_dmi_table)) +if (!sysfw_callback (msi_k8t_quirk_table))return ;/* only applies to MSI K8T Neo2-FIR */ pci_read_config_byte (dev,0x50 , &val);
@@ -413,34 +413,35 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,*/ static u16 toshiba_line_size; -static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = { +static const struct sysfw_id __devinitconst +toshiba_ohci1394_quirk_table[] = { { .ident ="Toshiba PS5 based laptop" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"TOSHIBA" ), -DMI_MATCH (DMI_PRODUCT_VERSION ,"PS5" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"TOSHIBA" ), +SYSFW_MATCH (SYSFW_PRODUCT_VERSION ,"PS5" ), }, }, { .ident ="Toshiba PSM4 based laptop" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"TOSHIBA" ), -DMI_MATCH (DMI_PRODUCT_VERSION ,"PSM4" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"TOSHIBA" ), +SYSFW_MATCH (SYSFW_PRODUCT_VERSION ,"PSM4" ), }, }, { .ident ="Toshiba A40 based laptop" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"TOSHIBA" ), -DMI_MATCH (DMI_PRODUCT_VERSION ,"PSA40U" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"TOSHIBA" ), +SYSFW_MATCH (SYSFW_PRODUCT_VERSION ,"PSA40U" ), }, }, - { } + {} };static void __devinit pci_pre_fixup_toshiba_ohci1394 (struct pci_dev *dev) { -if (!dmi_check_system (toshiba_ohci1394_dmi_table)) +if (!sysfw_callback (toshiba_ohci1394_quirk_table))return ;/* only applies to certain Toshibas (so far) */ dev->current_state = PCI_D3cold;
@@ -451,7 +452,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032,static void __devinit pci_post_fixup_toshiba_ohci1394 (struct pci_dev *dev) { -if (!dmi_check_system (toshiba_ohci1394_dmi_table)) +if (!sysfw_callback (toshiba_ohci1394_quirk_table))return ;/* only applies to certain Toshibas (so far) */ /* Restore config space on Toshiba laptops */
arch/x86/pci/init.c +2 -2
@@ -35,9 +35,9 @@ static __init int pci_arch_init(void)printk (KERN_ERR "PCI: Fatal: No config space access function found\n" ); -dmi_check_pciprobe (); +smbios_check_pciprobe (); -dmi_check_skip_isa_align (); +smbios_check_skip_isa_align ();return 0 ; }
arch/x86/pci/irq.c +13 -13
@@ -9,7 +9,7 @@#include <linux/pci.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/io.h> #include <linux/smp.h> #include <asm/io_apic.h>
@@ -1070,7 +1070,7 @@ void __init pcibios_fixup_irqs(void)* Work around broken HP Pavilion Notebooks which assign USB to * IRQ 9 even though it is actually wired to IRQ 11 */ -static int __init fix_broken_hp_bios_irq9 (const struct dmi_system_id *d) +static int __init fix_broken_hp_bios_irq9 (const struct sysfw_id *d) {if (!broken_hp_bios_irq9) { broken_hp_bios_irq9 =1 ;
@@ -1084,7 +1084,7 @@ static int __init fix_broken_hp_bios_irq9(const struct dmi_system_id *d)* Work around broken Acer TravelMate 360 Notebooks which assign * Cardbus to IRQ 11 even though it is actually wired to IRQ 10 */ -static int __init fix_acer_tm360_irqrouting (const struct dmi_system_id *d) +static int __init fix_acer_tm360_irqrouting (const struct sysfw_id *d) {if (!acer_tm360_irqrouting) { acer_tm360_irqrouting =1 ;
@@ -1094,27 +1094,27 @@ static int __init fix_acer_tm360_irqrouting(const struct dmi_system_id *d)return 0 ; } -static struct dmi_system_id __initdata pciirq_dmi_table[] = { +static struct sysfw_id __initdata pciirq_quirk_table[] = { { .callback = fix_broken_hp_bios_irq9, .ident ="HP Pavilion N5400 Series Laptop" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), -DMI_MATCH (DMI_BIOS_VERSION ,"GE.M1.03" ), -DMI_MATCH (DMI_PRODUCT_VERSION , -"HP Pavilion Notebook Model GE" ), -DMI_MATCH (DMI_BOARD_VERSION ,"OmniBook N32N-736" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"Hewlett-Packard" ), +SYSFW_MATCH (SYSFW_BIOS_VERSION ,"GE.M1.03" ), +SYSFW_MATCH (SYSFW_PRODUCT_VERSION , +"HP Pavilion Notebook Model GE" ), +SYSFW_MATCH (SYSFW_BOARD_VERSION ,"OmniBook N32N-736" ), }, }, { .callback = fix_acer_tm360_irqrouting, .ident ="Acer TravelMate 36x Laptop" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"TravelMate 360" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"Acer" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"TravelMate 360" ), }, }, - { } + {} };void __init pcibios_irq_init (void )
@@ -1124,7 +1124,7 @@ void __init pcibios_irq_init(void)if (raw_pci_ops ==NULL )return ; -dmi_check_system (pciirq_dmi_table); +sysfw_callback (pciirq_quirk_table); pirq_table =pirq_find_routing_table ();
arch/x86/pci/mmconfig-shared.c +3 -7
@@ -15,7 +15,7 @@#include <linux/acpi.h> #include <linux/sfi_acpi.h> #include <linux/bitmap.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/slab.h> #include <asm/e820.h> #include <asm/pci_x86.h>
@@ -514,19 +514,15 @@ static int __initdata known_bridge;static int __init acpi_mcfg_check_entry (struct acpi_table_mcfg *mcfg,struct acpi_mcfg_allocation *cfg) { -int year; -if (cfg->address <0xFFFFFFFF )return 0 ;if (!strcmp (mcfg->header.oem_id,"SGI" ))return 0 ; -if (mcfg->header.revision >=1 ) { -if (dmi_get_date (DMI_BIOS_DATE , &year,NULL ,NULL ) && - year >=2010 ) +if (mcfg->header.revision >=1 ) +if (sysfw_get_date () >=20100000 )return 0 ; - } printk(KERN_ERR PREFIX "MCFG region for %04x [bus %02x-%02x] at %#llx " "is above 4GB, ignored\n", cfg->pci_segment,
arch/x86/pci/mrst.c +0 -1
@@ -22,7 +22,6 @@#include <linux/pci.h> #include <linux/ioport.h> #include <linux/init.h> -#include <linux/dmi.h> #include <asm/acpi.h> #include <asm/segment.h>
drivers/cpufreq/acpi-cpufreq.c +8 -8
@@ -32,7 +32,7 @@#include <linux/sched.h> #include <linux/cpufreq.h> #include <linux/compiler.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/slab.h> #include <linux/acpi.h>
@@ -462,23 +462,23 @@ static int __init acpi_cpufreq_early_init(void)*/ static int bios_with_sw_any_bug; -static int sw_any_bug_found (const struct dmi_system_id *d) +static int sw_any_bug_found (const struct sysfw_id *d) { bios_with_sw_any_bug =1 ;return 0 ; } -static const struct dmi_system_id sw_any_bug_dmi_table[] = { +static const struct sysfw_id sw_any_bug_table[] = { { .callback = sw_any_bug_found, .ident ="Supermicro Server X6DLP" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Supermicro" ), -DMI_MATCH (DMI_BIOS_VERSION ,"080010" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X6DLP" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"Supermicro" ), +SYSFW_MATCH (SYSFW_BIOS_VERSION ,"080010" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"X6DLP" ), }, }, - { } + {} };static int acpi_cpufreq_blacklist (struct cpuinfo_x86 *c)
@@ -554,7 +554,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)cpumask_copy (policy->related_cpus, perf->shared_cpu_map);#ifdef CONFIG_SMP -dmi_check_system (sw_any_bug_dmi_table); +sysfw_callback (sw_any_bug_table);if (bios_with_sw_any_bug &&cpumask_weight (policy->cpus) ==1 ) { policy->shared_type =CPUFREQ_SHARED_TYPE_ALL ;cpumask_copy (policy->cpus,cpu_core_mask (cpu));
drivers/cpufreq/powernow-k7.c +7 -7
@@ -21,7 +21,7 @@#include <linux/cpufreq.h> #include <linux/slab.h> #include <linux/string.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/timex.h> #include <linux/io.h>
@@ -598,7 +598,7 @@ static unsigned int powernow_get(unsigned int cpu) } -static int __cpuinit acer_cpufreq_pst (const struct dmi_system_id *d) +static int __cpuinit acer_cpufreq_pst (const struct sysfw_id *d) { printk(KERN_WARNING PFX "%s laptop with broken PST tables in BIOS detected.\n",
@@ -616,16 +616,16 @@ static int __cpuinit acer_cpufreq_pst(const struct dmi_system_id *d)* A BIOS update is all that can save them. * Mention this, and disable cpufreq. */ -static struct dmi_system_id __cpuinitdata powernow_dmi_table[] = { +static struct sysfw_id __cpuinitdata powernow_id_table[] = { { .callback = acer_cpufreq_pst, .ident ="Acer Aspire" , .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Insyde Software" ), -DMI_MATCH (DMI_BIOS_VERSION ,"3A71" ), +SYSFW_MATCH (SYSFW_SYS_VENDOR ,"Insyde Software" ), +SYSFW_MATCH (SYSFW_BIOS_VERSION ,"3A71" ), }, }, - { } + {} };static int __cpuinit powernow_cpu_init (struct cpufreq_policy *policy)
@@ -647,7 +647,7 @@ static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy) }pr_debug ("FSB: %3dMHz\n" , fsb/1000 ); -if (dmi_check_system (powernow_dmi_table) || acpi_force) { +if (sysfw_callback (powernow_id_table) || acpi_force) { printk(KERN_INFO PFX "PSB/PST known to be broken. " "Trying ACPI instead\n"); result =powernow_acpi_init ();
Signature · 1 line
1.7.5.1