Skip to contentSkip to conversation

warning: implicit declaration of function mp_config_ioapic_for_sci

PATCH In review Sérgio Monteiro Basto 2 participants 7 messages Oct 8, 2002 – Oct 10, 2002 4 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 warning: implicit declaration of function mp_config_ioapic_for_sci

bus.c:1887: warning: implicit declaration of function `mp_config_ioapic_for_sci'

A trivial patch

include/asm-i386/mpspec.h renamed from include/asm-i386/mpspec.h.orig +3 -1
@@ -228,9 +228,11 @@
 extern void mp_register_ioapic (u8 id, u32 address, u32 irq_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 global_irq);
 extern void mp_config_acpi_legacy_irqs (void);
-extern void mp_config_ioapic_for_sci(int irq);
 extern void mp_parse_prt (void);
 #endif /*CONFIG_X86_IO_APIC*/
+#ifdef CONFIG_X86
+extern void mp_config_ioapic_for_sci(int irq);
+#endif /*CONFIG_X86*/
 
 #endif /*CONFIG_ACPI_BOOT*/
 
#2 lore raw
In reply to a message not in the archive
Quoted 1 line · Sérgio Monteiro Basto

+++ linux-2.4.19acpi/include/asm-i386/mpspec.h Sun Oct 6 21:34:06 2002

                               ^^^^^^^^

include/asm-i386/mpspec.h line 235

Quoted 3 lines
include/asm-i386/mpspec.h renamed from include/asm-i386/mpspec.h.orig +3 -0
+#ifdef CONFIG_X86
+extern void mp_config_ioapic_for_sci(int irq);
+#endif /*CONFIG_X86*/

you really don't need to encase this in CONFIG_X86. if it's in asm-i386 and some other cpu type is including this file, things are already hideously wrong.

Signature · 7 lines
Revolutions do not require corporate support.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#4 lore raw
In reply to a message not in the archive

First of all thanks for replying to this email and for the information.

so I remade the patch, and (I think) now is a good patch, because is not need declared the mp_config_ioapic_for_sci function.

Quoted 14 lines · Matthew Wilcox
Quoted 1 line · Sérgio Monteiro Basto

+++ linux-2.4.19acpi/include/asm-i386/mpspec.h Sun Oct 6 21:34:06 2002

                               ^^^^^^^^

Review

Quoted 3 lines
(quoted diff) +3 -0
+#ifdef CONFIG_X86
+extern void mp_config_ioapic_for_sci(int irq);
+#endif /*CONFIG_X86*/

you really don't need to encase this in CONFIG_X86. if it's in asm-i386 and some other cpu type is including this file, things are already hideously wrong.

Signature · 1 line
Revolutions do not require corporate support.
drivers/acpi/bus.c +4 -0
@@ -1883,10 +1883,14 @@
 
 #ifdef CONFIG_X86
         /* Ensure the SCI is set to level-triggered, active-low */
+#ifdef CONFIG_X86_IO_APIC
         if (acpi_ioapic)
          	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
                 eisa_set_level_irq(acpi_fadt.sci_int);
+#else
+	eisa_set_level_irq(acpi_fadt.sci_int);
+#endif
 #endif
 
 	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
#6 lore raw
In reply to a message not in the archive
Quoted 12 lines · Sérgio Monteiro Basto

First of all thanks for replying to this email and for the information.

so I remade the patch, and (I think) now is a good patch, because is not need declared the mp_config_ioapic_for_sci function.

drivers/acpi/bus.c +1 -0
@@ -1883,10 +1883,14 @@
 
 #ifdef CONFIG_X86
         /* Ensure the SCI is set to level-triggered, active-low */
+#ifdef CONFIG_X86_IO_APIC

drivers/acpi/bus.c line 1896

Quoted 10 lines
drivers/acpi/bus.c +3 -0
         if (acpi_ioapic)
          	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
                 eisa_set_level_irq(acpi_fadt.sci_int);
+#else
+	eisa_set_level_irq(acpi_fadt.sci_int);
+#endif
 #endif
 
 	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);

the normal way to do this kind of this is:

drivers/acpi/bus.c line 1894

Quoted 9 lines
 #ifdef CONFIG_X86
         /* Ensure the SCI is set to level-triggered, active-low */
drivers/acpi/bus.c +2 -0
+#ifdef CONFIG_X86_IO_APIC
         if (acpi_ioapic)
          	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
+#endif
                 eisa_set_level_irq(acpi_fadt.sci_int);
 #endif

(could someone fix the indenting here? it's a mess!)

Signature · 7 lines
Revolutions do not require corporate support.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#8 lore raw
In reply to a message not in the archive
Quoted 1 line · Matthew Wilcox

(could someone fix the indenting here? it's a mess!)

drivers/acpi/bus.c +7 -4
@@ -1883,11 +1883,14 @@
 
 #ifdef CONFIG_X86
         /* Ensure the SCI is set to level-triggered, active-low */
-        if (acpi_ioapic)
-         	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_ioapic)
+		mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
-                eisa_set_level_irq(acpi_fadt.sci_int);
-#endif
+#else
+		eisa_set_level_irq(acpi_fadt.sci_int);
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_X86 */
 
 	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
 	if (ACPI_FAILURE(status)) {
#9 lore raw
In reply to a message not in the archive
Quoted 1 line · Matthew Wilcox

(could someone fix the indenting here? it's a mess!)

sorry 2nd time ..., please ignore my last message.

drivers/acpi/bus.c +7 -4
@@ -1883,11 +1883,14 @@
 
 #ifdef CONFIG_X86
         /* Ensure the SCI is set to level-triggered, active-low */
-        if (acpi_ioapic)
-         	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_ioapic)
+		mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
-                eisa_set_level_irq(acpi_fadt.sci_int);
-#endif
+#else
+		eisa_set_level_irq(acpi_fadt.sci_int);
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_X86 */
 
 	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
 	if (ACPI_FAILURE(status)) {
#10 lore raw
In reply to a message not in the archive
Quoted 1 line · Matthew Wilcox

(could someone fix the indenting here? it's a mess!)

sorry 3rd time ..., please ignore and delete, my last message again. thanks
Sérgio Basto

drivers/acpi/bus.c +8 -5
@@ -1882,12 +1882,15 @@
 	}
 
 #ifdef CONFIG_X86
-        /* Ensure the SCI is set to level-triggered, active-low */
-        if (acpi_ioapic)
-         	mp_config_ioapic_for_sci(acpi_fadt.sci_int);
+	/* Ensure the SCI is set to level-triggered, active-low */
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_ioapic)
+		mp_config_ioapic_for_sci(acpi_fadt.sci_int);
 	else
-                eisa_set_level_irq(acpi_fadt.sci_int);
-#endif
+#else
+		eisa_set_level_irq(acpi_fadt.sci_int);
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_X86 */
 
 	status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
 	if (ACPI_FAILURE(status)) {