Skip to contentSkip to conversation

MADT printk cleanups

PATCH New Bjorn Helgaas 1 participant 1 message May 25, 2004 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MADT printk cleanups

Here's a fairly straightforward patch to go along with the switch to printing GSIs in decimal instead of hex. It
- uses "gsi" rather than "global_irq"
- prints GSIs as %u rather than 0x%x
- places the "polarity trigger" stuff at the end consistently
- reorders IOSAPIC info to be consistent with IOAPIC
- changes a couple addresses from %p to 0x%08lx for consistency

No functional change. This is against current BK of linux-2.5.

===== drivers/acpi/tables.c 1.23 vs edited =====

drivers/acpi/tables.c +16 -14
@@ -131,7 +131,7 @@
 	{
 		struct acpi_table_ioapic *p =
 			(struct acpi_table_ioapic*) header;
-		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] global_irq_base[0x%x])\n",
+		printk(KERN_INFO PREFIX "IOAPIC (id[0x%02x] address[0x%08x] gsi_base[%u])\n",
 			p->id, p->address, p->global_irq_base);
 	}
 		break;
@@ -140,7 +140,7 @@
 	{
 		struct acpi_table_int_src_ovr *p =
 			(struct acpi_table_int_src_ovr*) header;
-		printk(KERN_INFO PREFIX "INT_SRC_OVR (bus %d bus_irq %d global_irq %d %s %s)\n",
+		printk(KERN_INFO PREFIX "INT_SRC_OVR (bus %d bus_irq %d gsi %u %s %s)\n",
 			p->bus, p->bus_irq, p->global_irq,
 			mps_inti_flags_polarity[p->flags.polarity],
 			mps_inti_flags_trigger[p->flags.trigger]);
@@ -155,9 +155,10 @@
 	{
 		struct acpi_table_nmi_src *p =
 			(struct acpi_table_nmi_src*) header;
-		printk(KERN_INFO PREFIX "NMI_SRC (%s %s global_irq %d)\n",
+		printk(KERN_INFO PREFIX "NMI_SRC (gsi %u %s %s)\n",
+			p->global_irq,
 			mps_inti_flags_polarity[p->flags.polarity],
-			mps_inti_flags_trigger[p->flags.trigger], p->global_irq);
+			mps_inti_flags_trigger[p->flags.trigger]);
 	}
 		break;
 
@@ -165,10 +166,10 @@
 	{
 		struct acpi_table_lapic_nmi *p =
 			(struct acpi_table_lapic_nmi*) header;
-		printk(KERN_INFO PREFIX "LAPIC_NMI (acpi_id[0x%02x] %s %s lint[0x%x])\n",
-			p->acpi_id,
+		printk(KERN_INFO PREFIX "LAPIC_NMI (acpi_id[0x%02x] lint[0x%x] %s %s)\n",
+			p->acpi_id, p->lint,
 			mps_inti_flags_polarity[p->flags.polarity],
-			mps_inti_flags_trigger[p->flags.trigger], p->lint);
+			mps_inti_flags_trigger[p->flags.trigger]);
 	}
 		break;
 
@@ -176,8 +177,8 @@
 	{
 		struct acpi_table_lapic_addr_ovr *p =
 			(struct acpi_table_lapic_addr_ovr*) header;
-		printk(KERN_INFO PREFIX "LAPIC_ADDR_OVR (address[%p])\n",
-			(void *) (unsigned long) p->address);
+		printk(KERN_INFO PREFIX "LAPIC_ADDR_OVR (address[0x%08lx])\n",
+			(unsigned long) p->address);
 	}
 		break;
 
@@ -185,8 +186,9 @@
 	{
 		struct acpi_table_iosapic *p =
 			(struct acpi_table_iosapic*) header;
-		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] global_irq_base[0x%x] address[%p])\n",
-			p->id, p->global_irq_base, (void *) (unsigned long) p->address);
+		printk(KERN_INFO PREFIX "IOSAPIC (id[0x%x] address[0x%08lx] gsi_base[%u])\n",
+			p->id, (unsigned long) p->address,
+			p->global_irq_base);
 	}
 		break;
 
@@ -203,10 +205,10 @@
 	{
 		struct acpi_table_plat_int_src *p =
 			(struct acpi_table_plat_int_src*) header;
-		printk(KERN_INFO PREFIX "PLAT_INT_SRC (%s %s type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n",
+		printk(KERN_INFO PREFIX "PLAT_INT_SRC (type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] gsi[%u] %s %s)\n",
+			p->type, p->id, p->eid, p->iosapic_vector, p->global_irq,
 			mps_inti_flags_polarity[p->flags.polarity],
-			mps_inti_flags_trigger[p->flags.trigger],
-			p->type, p->id, p->eid, p->iosapic_vector, p->global_irq);
+			mps_inti_flags_trigger[p->flags.trigger]);
 	}
 		break;
 

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click