Skip to contentSkip to conversation

ipmi: discovery precedence and update core driver with dev_printk

PATCH In review Myron Stowe 2 participants 7 messages Mar 13, 2010 – Mar 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover ipmi: discovery precedence and update core driver with dev_printk

These patches change the precedence of PNP based discovery mechanisms and update the driver's core to use dev_printk() and its constructs.

As part of this patch series I wanted to remove the 'PFX' argument from ipmi_of_probe()'s dev_printk constructs as I believe it produces redundant output but I do not have a PPC platform to test against.

---

v2 - I dropped the contentious attempt to remove the ACPI SPMI static
table as a discovery mechanism.

Myron Stowe (3):
ipmi: Raise precedence of PNP based discovery mechanisms (ACPI, PCI)
ipmi: Convert tracking of the ACPI device pointer to a PNP device
ipmi: Update driver to use 'dev_printk()' and its constructs

Corey: If you encounter any issues applying this series let me know,
including your current basis, and I'll re-work the series.

 drivers/char/ipmi/ipmi_msghandler.c |   11 +-
 drivers/char/ipmi/ipmi_si_intf.c    |  205 ++++++++++++++++-------------------
 2 files changed, 96 insertions(+), 120 deletions(-)
#1 lore raw

PATCH v2 1/3 ipmi: Raise precedence of PNP based discovery mechanisms (ACPI, PCI)

This raises the precedence of PNP discovery mechanisms, ACPI and PCI, above SMBIOS and SPMI as indicated by Appendix C1 of the IPMI specification.

Reference: IPMI - Intelligent Platform Management Interface Specification

           v2.0, Document Revision 1.0, 05.05.2005 Markup

Appendix C1 - Locating IPMI System Interfaces via SMBIOS Tables
"Note that the settings that this structure reports may be over- ridden by Plug-and-Play' reassignment by the OS. Therefore, this structure should be used only when the interface cannot be discovered via Plug-and-Play' discovery mechanisms incorporated in interfaces such as PCI and ACPI."

---

 drivers/char/ipmi/ipmi_si_intf.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +8 -7
index 176f175..86a7dd7 100644
@@ -3197,13 +3197,6 @@ static __devinit int init_ipmi_si(void)
 
 	hardcode_find_bmc();
 
-#ifdef CONFIG_DMI
-	dmi_find_bmc();
-#endif
-
-#ifdef CONFIG_ACPI
-	spmi_find_bmc();
-#endif
 #ifdef CONFIG_ACPI
 	pnp_register_driver(&ipmi_pnp_driver);
 #endif
@@ -3220,6 +3213,14 @@ static __devinit int init_ipmi_si(void)
 	of_register_platform_driver(&ipmi_of_platform_driver);
 #endif
 
+#ifdef CONFIG_DMI
+	dmi_find_bmc();
+#endif
+
+#ifdef CONFIG_ACPI
+	spmi_find_bmc();
+#endif
+
 	if (si_trydefaults) {
 		mutex_lock(&smi_infos_lock);
 		if (list_empty(&smi_infos)) {

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

#2 lore raw

Re: [PATCH v2 1/3] ipmi: Raise precedence of PNP based discovery mechanisms (ACPI, PCI)

Quoted 5 lines · Myron Stowe

This raises the precedence of PNP discovery mechanisms, ACPI and PCI, above SMBIOS and SPMI as indicated by Appendix C1 of the IPMI specification.

Reference: IPMI - Intelligent Platform Management Interface Specification

Quoted 8 lines
           v2.0, Document Revision 1.0, 05.05.2005 Markup

Appendix C1 - Locating IPMI System Interfaces via SMBIOS Tables
"Note that the settings that this structure reports may be over- ridden by Plug-and-Play' reassignment by the OS. Therefore, this structure should be used only when the interface cannot be discovered via Plug-and-Play' discovery mechanisms incorporated in interfaces such as PCI and ACPI."

Hi,
The SPMI detection mechanism belongs to one of two ACPI detection
mechanisms.
Can we put it before DMI detection mechanism?

Anyway, it is right that the pnp discovery mechanism has higher
priority than PCI/SPMI/SMBIOS.

Thanks.
Yakui

Quoted 45 lines

---

 drivers/char/ipmi/ipmi_si_intf.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +8 -8
index 176f175..86a7dd7 100644
@@ -3197,13 +3197,6 @@ static __devinit int init_ipmi_si(void)
 
 	hardcode_find_bmc();
 
-#ifdef CONFIG_DMI
-	dmi_find_bmc();
-#endif
-
-#ifdef CONFIG_ACPI
-	spmi_find_bmc();
-#endif
 #ifdef CONFIG_ACPI
 	pnp_register_driver(&ipmi_pnp_driver);
 #endif
@@ -3220,6 +3213,14 @@ static __devinit int init_ipmi_si(void)
 	of_register_platform_driver(&ipmi_of_platform_driver);
 #endif
 
+#ifdef CONFIG_DMI
+	dmi_find_bmc();
+#endif
+
+#ifdef CONFIG_ACPI
+	spmi_find_bmc();
+#endif
+
 	if (si_trydefaults) {
 		mutex_lock(&smi_infos_lock);
 		if (list_empty(&smi_infos)) {
 
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Re: [PATCH v2 1/3] ipmi: Raise precedence of PNP based discovery mechanisms (ACPI, PCI)

Quoted 15 lines · ykzhao
Quoted 5 lines · Myron Stowe

This raises the precedence of PNP discovery mechanisms, ACPI and PCI, above SMBIOS and SPMI as indicated by Appendix C1 of the IPMI specification.

Reference: IPMI - Intelligent Platform Management Interface Specification

Quoted 8 lines
           v2.0, Document Revision 1.0, 05.05.2005 Markup

Appendix C1 - Locating IPMI System Interfaces via SMBIOS Tables
"Note that the settings that this structure reports may be over- ridden by Plug-and-Play' reassignment by the OS. Therefore, this structure should be used only when the interface cannot be discovered via Plug-and-Play' discovery mechanisms incorporated in interfaces such as PCI and ACPI."

Quoted 3 lines

Hi,
The SPMI detection mechanism belongs to one of two ACPI detection
mechanisms. Can we put it before DMI detection mechanism?

The SPMI detection method is similar to the DMI (SMBIOS) in that they are both static tables and thus should be after methods capable of changes from OS reassignment.

The order between these two probably does not make a great deal of difference. The logic I used was to maintain the original order, just copy and paste, which kept SPMI after SMBIOS which also seemed natural since SMBIOS is older, a possible indication that it is the more widely used method of the two.

Myron

Quoted 52 lines

Anyway, it is right that the pnp discovery mechanism has higher
priority than PCI/SPMI/SMBIOS.

Thanks.
Yakui

Quoted 45 lines

---

 drivers/char/ipmi/ipmi_si_intf.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +8 -8
index 176f175..86a7dd7 100644
@@ -3197,13 +3197,6 @@ static __devinit int init_ipmi_si(void)
 
 	hardcode_find_bmc();
 
-#ifdef CONFIG_DMI
-	dmi_find_bmc();
-#endif
-
-#ifdef CONFIG_ACPI
-	spmi_find_bmc();
-#endif
 #ifdef CONFIG_ACPI
 	pnp_register_driver(&ipmi_pnp_driver);
 #endif
@@ -3220,6 +3213,14 @@ static __devinit int init_ipmi_si(void)
 	of_register_platform_driver(&ipmi_of_platform_driver);
 #endif
 
+#ifdef CONFIG_DMI
+	dmi_find_bmc();
+#endif
+
+#ifdef CONFIG_ACPI
+	spmi_find_bmc();
+#endif
+
 	if (si_trydefaults) {
 		mutex_lock(&smi_infos_lock);
 		if (list_empty(&smi_infos)) {
 
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Myron Stowe                             HP Open Source Linux Lab (OSLL)
#4 lore raw

PATCH v2 2/3 ipmi: Convert tracking of the ACPI device pointer to a PNP device

In reply to Myron Stowe

Convert PNP patch (git 9e368fa011d4e0aa050db348d69514900520e40b) to maintain a pointer to a PNP device, 'pnp_dev', instead of the ACPI device, 'acpi_dev', that is currently being tracked with PNP based IPMI device discovery.

---

 drivers/char/ipmi/ipmi_si_intf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +1 -1
index 86a7dd7..0e31aa9 100644
@@ -2093,7 +2093,7 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
 		info->irq_setup = std_irq_setup;
 	}
 
-	info->dev = &acpi_dev->dev;
+	info->dev = &dev->dev;
 	pnp_set_drvdata(dev, info);
 
 	return try_smi_init(info);

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

Acked-by on v2 2/3
#5 lore raw

Re: [PATCH v2 2/3] ipmi: Convert tracking of the ACPI device pointer to a PNP device

Quoted 7 lines · Myron Stowe

Convert PNP patch (git 9e368fa011d4e0aa050db348d69514900520e40b) to maintain a pointer to a PNP device, 'pnp_dev', instead of the ACPI device, 'acpi_dev', that is currently being tracked with PNP based IPMI device discovery.

Quoted 19 lines

---

 drivers/char/ipmi/ipmi_si_intf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +1 -1
index 86a7dd7..0e31aa9 100644
@@ -2093,7 +2093,7 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
 		info->irq_setup = std_irq_setup;
 	}
 
-	info->dev = &acpi_dev->dev;
+	info->dev = &dev->dev;
 	pnp_set_drvdata(dev, info);
 
 	return try_smi_init(info);
#6 lore raw

PATCH v2 3/3 ipmi: Update driver to use 'dev_printk()' and its constructs

In reply to Myron Stowe

Update core IPMI driver printk()'s with dev_printk(), and its constructs, to provide additional device topology information.

An example of the additional device topology for a PNP device -
ipmi_si 00:02: probing via ACPI
ipmi_si 00:02: [io 0x0ca2-0x0ca3] regsize 1 spacing 1 irq 0 ipmi_si 00:02: Found new BMC (man_id: 0x00000b, prod_id: 0x0000, ... ipmi_si 00:02: IPMI kcs interface initialized

and for a PCI device -
ipmi_si 0000:01:04.6: probing via PCI
ipmi_si 0000:01:04.6: PCI INT A -> GSI 21 (level, low) -> IRQ 21 ipmi_si 0000:01:04.6: [mem 0xf1ef0000-0xf1ef00ff] regsize 1 spaci... ipmi_si 0000:01:04.6: IPMI kcs interface initialized

---

 drivers/char/ipmi/ipmi_msghandler.c |   11 +-
 drivers/char/ipmi/ipmi_si_intf.c    |  188 +++++++++++++++--------------------
 2 files changed, 87 insertions(+), 112 deletions(-)
drivers/char/ipmi/ipmi_msghandler.c +5 -6
index ec5e3f8..0e30114 100644
@@ -2495,12 +2495,11 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
 			return rv;
 		}
 
-		printk(KERN_INFO
-		       "ipmi: Found new BMC (man_id: 0x%6.6x, "
-		       " prod_id: 0x%4.4x, dev_id: 0x%2.2x)\n",
-		       bmc->id.manufacturer_id,
-		       bmc->id.product_id,
-		       bmc->id.device_id);
+		dev_info(intf->si_dev, "Found new BMC (man_id: 0x%6.6x, "
+			 "prod_id: 0x%4.4x, dev_id: 0x%2.2x)\n",
+			 bmc->id.manufacturer_id,
+			 bmc->id.product_id,
+			 bmc->id.device_id);
 	}
 
 	/*
drivers/char/ipmi/ipmi_si_intf.c +82 -106

464 lines not on this page · raw message