From c72b844ed2f55c442b464e382a2eb2ecab5292a8 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 22 Oct 2010 16:18:47 -0700 Subject: ibm_rtl: fix printk format warning Fix printk format warning: drivers/platform/x86/ibm_rtl.c:305:warning: format '%#llx' expects type 'long long unsigned int', but argument 2 has type 'phys_addr_t' Signed-off-by: Randy Dunlap Cc: Keith Mannthey Cc: Vernon Mauery Cc: platform-driver-x86@vger.kernel.org Cc: Matthew Garrett Signed-off-by: Matthew Garrett --- drivers/platform/x86/ibm_rtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/platform/x86/ibm_rtl.c') diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 3c2c6b9..a884f54 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c @@ -302,7 +302,7 @@ static int __init ibm_rtl_init(void) { RTL_DEBUG("rtl_cmd_width = %u, rtl_cmd_type = %u\n", rtl_cmd_width, rtl_cmd_type); addr = ioread32(&rtl_table->cmd_port_address); - RTL_DEBUG("addr = %#llx\n", addr); + RTL_DEBUG("addr = %#llx\n", (unsigned long long)addr); plen = rtl_cmd_width/sizeof(char); rtl_cmd_addr = rtl_port_map(addr, plen); RTL_DEBUG("rtl_cmd_addr = %#llx\n", (u64)rtl_cmd_addr); -- cgit v1.1 From a2262260f9eaee4acd56b5624b5d2bf4be9bb38a Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 2 Nov 2010 13:08:10 -0700 Subject: ibm_rtl: Loosen the DMI criteria to all IBM machines Allow all IBM machines to pass the DMI check so that we don't have to add them one by one to the driver. Any IBM machine that has the _RTL_ table in the EBDA will work. Signed-off-by: Vernon Mauery Signed-off-by: Matthew Garrett --- drivers/platform/x86/ibm_rtl.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'drivers/platform/x86/ibm_rtl.c') diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index a884f54..5c975ed 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c @@ -220,32 +220,13 @@ static void rtl_teardown_sysfs(void) { sysdev_class_unregister(&class_rtl); } -static int dmi_check_cb(const struct dmi_system_id *id) -{ - RTL_DEBUG("found IBM server '%s'\n", id->ident); - return 0; -} - -#define ibm_dmi_entry(NAME, TYPE) \ -{ \ - .ident = NAME, \ - .matches = { \ - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), \ - DMI_MATCH(DMI_PRODUCT_NAME, TYPE), \ - }, \ - .callback = dmi_check_cb \ -} static struct dmi_system_id __initdata ibm_rtl_dmi_table[] = { - ibm_dmi_entry("BladeCenter LS21", "7971"), - ibm_dmi_entry("BladeCenter LS22", "7901"), - ibm_dmi_entry("BladeCenter HS21 XM", "7995"), - ibm_dmi_entry("BladeCenter HS22", "7870"), - ibm_dmi_entry("BladeCenter HS22V", "7871"), - ibm_dmi_entry("System x3550 M2", "7946"), - ibm_dmi_entry("System x3650 M2", "7947"), - ibm_dmi_entry("System x3550 M3", "7944"), - ibm_dmi_entry("System x3650 M3", "7945"), + { \ + .matches = { \ + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), \ + }, \ + }, { } }; -- cgit v1.1 From 1d37db77c1aa199ae9a4114af7c0412c8417e949 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 2 Nov 2010 13:08:11 -0700 Subject: ibm_rtl: _RTL_ is not available in UEFI mode Some of the IBM servers that are supported by ibm_rtl can run in both Legacy mode (BIOS) and in UEFI mode. When running in UEFI mode, it is possible that the EBDA table exists but cannot be mapped and reports errors. We need to make sure that by default we don't try to probe the machines if they are running in UEFI mode. Signed-off-by: Vernon Mauery Signed-off-by: Matthew Garrett --- drivers/platform/x86/ibm_rtl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/platform/x86/ibm_rtl.c') diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 5c975ed..94a114a 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -238,7 +239,7 @@ static int __init ibm_rtl_init(void) { if (force) pr_warning("ibm-rtl: module loaded by force\n"); /* first ensure that we are running on IBM HW */ - else if (!dmi_check_system(ibm_rtl_dmi_table)) + else if (efi_enabled || !dmi_check_system(ibm_rtl_dmi_table)) return -ENODEV; /* Get the address for the Extended BIOS Data Area */ -- cgit v1.1