aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-03-08 16:00:28 -0500
committerCorey Minyard <cminyard@mvista.com>2018-03-12 08:02:47 -0400
commit4866b1dce0389013a268f0ab63f7229b30c6e5fe (patch)
tree75bf57ecdb3857eebcaab112b13faab50d8f3296
parent532ed9264da27eb3062f49e4283f9b393a8e17d0 (diff)
ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver
The IPMI spec states: The purpose of the SPMI Table is to provide a mechanism that can be used by the OSPM (an ACPI term for “OS Operating System-directed configuration and Power Management” essentially meaning an ACPI-aware OS or OS loader) very early in the boot process, e.g., before the ability to execute ACPI control methods in the OS is available. When we are probing IPMI in Linux, ACPI control methods are available, so we shouldn't be probing using SPMI. It could cause some confusion during the probing process. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Jiandi An <anjiandi@codeaurora.org>
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c105
1 files changed, 0 insertions, 105 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 9d3b0fa27560..cd7693634e91 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1902,108 +1902,6 @@ static const struct acpi_device_id ssif_acpi_match[] = {
1902 { }, 1902 { },
1903}; 1903};
1904MODULE_DEVICE_TABLE(acpi, ssif_acpi_match); 1904MODULE_DEVICE_TABLE(acpi, ssif_acpi_match);
1905
1906/*
1907 * Once we get an ACPI failure, we don't try any more, because we go
1908 * through the tables sequentially. Once we don't find a table, there
1909 * are no more.
1910 */
1911static int acpi_failure;
1912
1913/*
1914 * Defined in the IPMI 2.0 spec.
1915 */
1916struct SPMITable {
1917 s8 Signature[4];
1918 u32 Length;
1919 u8 Revision;
1920 u8 Checksum;
1921 s8 OEMID[6];
1922 s8 OEMTableID[8];
1923 s8 OEMRevision[4];
1924 s8 CreatorID[4];
1925 s8 CreatorRevision[4];
1926 u8 InterfaceType;
1927 u8 IPMIlegacy;
1928 s16 SpecificationRevision;
1929
1930 /*
1931 * Bit 0 - SCI interrupt supported
1932 * Bit 1 - I/O APIC/SAPIC
1933 */
1934 u8 InterruptType;
1935
1936 /*
1937 * If bit 0 of InterruptType is set, then this is the SCI
1938 * interrupt in the GPEx_STS register.
1939 */
1940 u8 GPE;
1941
1942 s16 Reserved;
1943
1944 /*
1945 * If bit 1 of InterruptType is set, then this is the I/O
1946 * APIC/SAPIC interrupt.
1947 */
1948 u32 GlobalSystemInterrupt;
1949
1950 /* The actual register address. */
1951 struct acpi_generic_address addr;
1952
1953 u8 UID[4];
1954
1955 s8 spmi_id[1]; /* A '\0' terminated array starts here. */
1956};
1957
1958static int try_init_spmi(struct SPMITable *spmi)
1959{
1960 unsigned short myaddr;
1961
1962 if (num_addrs >= MAX_SSIF_BMCS)
1963 return -1;
1964
1965 if (spmi->IPMIlegacy != 1) {
1966 pr_warn("IPMI: Bad SPMI legacy: %d\n", spmi->IPMIlegacy);
1967 return -ENODEV;
1968 }
1969
1970 if (spmi->InterfaceType != 4)
1971 return -ENODEV;
1972
1973 if (spmi->addr.space_id != ACPI_ADR_SPACE_SMBUS) {
1974 pr_warn(PFX "Invalid ACPI SSIF I/O Address type: %d\n",
1975 spmi->addr.space_id);
1976 return -EIO;
1977 }
1978
1979 myaddr = spmi->addr.address & 0x7f;
1980
1981 return new_ssif_client(myaddr, NULL, 0, 0, SI_SPMI, NULL);
1982}
1983
1984static void spmi_find_bmc(void)
1985{
1986 acpi_status status;
1987 struct SPMITable *spmi;
1988 int i;
1989
1990 if (acpi_disabled)
1991 return;
1992
1993 if (acpi_failure)
1994 return;
1995
1996 for (i = 0; ; i++) {
1997 status = acpi_get_table(ACPI_SIG_SPMI, i+1,
1998 (struct acpi_table_header **)&spmi);
1999 if (status != AE_OK)
2000 return;
2001
2002 try_init_spmi(spmi);
2003 }
2004}
2005#else
2006static void spmi_find_bmc(void) { }
2007#endif 1905#endif
2008 1906
2009#ifdef CONFIG_DMI 1907#ifdef CONFIG_DMI
@@ -2108,9 +2006,6 @@ static int init_ipmi_ssif(void)
2108 ssif_i2c_driver.driver.acpi_match_table = 2006 ssif_i2c_driver.driver.acpi_match_table =
2109 ACPI_PTR(ssif_acpi_match); 2007 ACPI_PTR(ssif_acpi_match);
2110 2008
2111 if (ssif_tryacpi)
2112 spmi_find_bmc();
2113
2114 if (ssif_trydmi) { 2009 if (ssif_trydmi) {
2115 rv = platform_driver_register(&ipmi_driver); 2010 rv = platform_driver_register(&ipmi_driver);
2116 if (rv) 2011 if (rv)