public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i386/io_apic init section fixups
@ 2004-10-15  5:34 Randy.Dunlap
  2004-10-15 18:23 ` [PATCH] x86_64/io_apic " Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2004-10-15  5:34 UTC (permalink / raw)
  To: lkml, akpm

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]


scripts/reference_init.pl found a couple of errors in i386/io_apic.c.
When changing them, one more function had to be un-init-ed.

I should check x86_64 also ... tomorrow.

-- 
~Randy

[-- Attachment #2: ioapic_not_init.patch --]
[-- Type: text/x-patch, Size: 1835 bytes --]


Code section errors in i386/io_apic.c found by scripts/reference_init.pl.
Looks like they could cause problems for a few drivers or in
a real hotplug environment.

Error: ./arch/i386/kernel/io_apic.o .text refers to 000018ff R_386_PC32        .init.text

call chain:
  snd_mpu401_acpi_resource
    acpi_register_gsi
      mp_register_gsi
	io_apic_set_pci_routing
{A}	  ioapic_register_intr
	    IO_APIC_irq_trigger
	      find_irq_entry

Error: ./arch/i386/kernel/io_apic.o .text refers to 00001967 R_386_PC32        .init.text

	(as above thru {A}, then:)
	  IO_APIC_irq_trigger
	    irq_trigger
	      MPBIOS_trigger	>> removing __init from this led to
				   needing to remove __init from
				   EISA_ELCR also.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>

diffstat:=
 arch/i386/kernel/io_apic.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -Naurp ./arch/i386/kernel/io_apic.c~ioapic_not_init ./arch/i386/kernel/io_apic.c
--- ./arch/i386/kernel/io_apic.c~ioapic_not_init	2004-10-11 21:09:52.000000000 -0700
+++ ./arch/i386/kernel/io_apic.c	2004-10-14 22:23:28.882239448 -0700
@@ -728,7 +728,7 @@ __setup("pirq=", ioapic_pirq_setup);
 /*
  * Find the IRQ entry number of a certain pin.
  */
-static int __init find_irq_entry(int apic, int pin, int type)
+static int find_irq_entry(int apic, int pin, int type)
 {
 	int i;
 
@@ -838,7 +838,7 @@ void __init setup_ioapic_dest(void)
 /*
  * EISA Edge/Level control register, ELCR
  */
-static int __init EISA_ELCR(unsigned int irq)
+static int EISA_ELCR(unsigned int irq)
 {
 	if (irq < 16) {
 		unsigned int port = 0x4d0 + (irq >> 3);
@@ -955,7 +955,7 @@ static int __init MPBIOS_polarity(int id
 	return polarity;
 }
 
-static int __init MPBIOS_trigger(int idx)
+static int MPBIOS_trigger(int idx)
 {
 	int bus = mp_irqs[idx].mpc_srcbus;
 	int trigger;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] x86_64/io_apic init section fixups
  2004-10-15  5:34 [PATCH] i386/io_apic init section fixups Randy.Dunlap
@ 2004-10-15 18:23 ` Randy.Dunlap
  2004-10-15 19:49   ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2004-10-15 18:23 UTC (permalink / raw)
  To: ak; +Cc: lkml, akpm

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Randy.Dunlap wrote:
> 
> scripts/reference_init.pl found a couple of errors in i386/io_apic.c.
> When changing them, one more function had to be un-init-ed.
> 
> I should check x86_64 also ... tomorrow.

Here's the x86_64 version of this patch.

There was one function in i386 where __init was already removed,
and 'make buildcheck' flagged it on x86_64, so I changed it also.

-- 
~Randy


[-- Attachment #2: ioapic_init_x64.patch --]
[-- Type: text/x-patch, Size: 2279 bytes --]


Code section errors in i386/io_apic.c found by scripts/reference_init.pl.
Looks like they could cause problems for a few drivers or in
a real hotplug environment.

Error: ./arch/i386/kernel/io_apic.o .text refers to 000018ff R_386_PC32        .init.text

call chain:
  snd_mpu401_acpi_resource
    acpi_register_gsi
      mp_register_gsi
	io_apic_set_pci_routing
{A}	  ioapic_register_intr
	    IO_APIC_irq_trigger
	      find_irq_entry

Error: ./arch/i386/kernel/io_apic.o .text refers to 00001967 R_386_PC32        .init.text

	(as above thru {A}, then:)
	  IO_APIC_irq_trigger
	    irq_trigger
	      MPBIOS_trigger	>> removing __init from this led to
				   needing to remove __init from
				   EISA_ELCR also.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>


diffstat:=
 arch/x86_64/kernel/io_apic.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -Naurp ./arch/x86_64/kernel/io_apic.c~ioapic_init_x64 ./arch/x86_64/kernel/io_apic.c
--- ./arch/x86_64/kernel/io_apic.c~ioapic_init_x64	2004-10-11 21:17:55.000000000 -0700
+++ ./arch/x86_64/kernel/io_apic.c	2004-10-15 10:56:29.000000000 -0700
@@ -83,7 +83,7 @@ int vector_irq[NR_VECTORS] = { [0 ... NR
  * shared ISA-space IRQs, so we have to support them. We are super
  * fast in the common case, and fast for shared ISA-space IRQs.
  */
-static void __init add_pin_to_irq(unsigned int irq, int apic, int pin)
+static void add_pin_to_irq(unsigned int irq, int apic, int pin)
 {
 	static int first_free_entry = NR_IRQS;
 	struct irq_pin_list *entry = irq_2_pin + irq;
@@ -315,7 +315,7 @@ __setup("pirq=", ioapic_pirq_setup);
 /*
  * Find the IRQ entry number of a certain pin.
  */
-static int __init find_irq_entry(int apic, int pin, int type)
+static int find_irq_entry(int apic, int pin, int type)
 {
 	int i;
 
@@ -399,7 +399,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, 
 /*
  * EISA Edge/Level control register, ELCR
  */
-static int __init EISA_ELCR(unsigned int irq)
+static int EISA_ELCR(unsigned int irq)
 {
 	if (irq < 16) {
 		unsigned int port = 0x4d0 + (irq >> 3);
@@ -504,7 +504,7 @@ static int __init MPBIOS_polarity(int id
 	return polarity;
 }
 
-static int __init MPBIOS_trigger(int idx)
+static int MPBIOS_trigger(int idx)
 {
 	int bus = mp_irqs[idx].mpc_srcbus;
 	int trigger;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64/io_apic init section fixups
  2004-10-15 18:23 ` [PATCH] x86_64/io_apic " Randy.Dunlap
@ 2004-10-15 19:49   ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2004-10-15 19:49 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: ak, lkml, akpm

On Fri, Oct 15, 2004 at 11:23:07AM -0700, Randy.Dunlap wrote:
> Randy.Dunlap wrote:
> >
> >scripts/reference_init.pl found a couple of errors in i386/io_apic.c.
> >When changing them, one more function had to be un-init-ed.
> >
> >I should check x86_64 also ... tomorrow.
> 
> Here's the x86_64 version of this patch.

Thanks Randy. I added it to my tree.

-Andi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-15 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15  5:34 [PATCH] i386/io_apic init section fixups Randy.Dunlap
2004-10-15 18:23 ` [PATCH] x86_64/io_apic " Randy.Dunlap
2004-10-15 19:49   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox