* [PATCH] Drop __init from init_8259A()
@ 2007-02-20 11:08 Atsushi Nemoto
2007-02-20 15:11 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Atsushi Nemoto @ 2007-02-20 11:08 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
init_8259A() is called from i8259A_resume() so should not be marked as
__init. And add some tests for whether 8259A was already initialized
or not.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index b33ba6c..9c79703 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -28,7 +28,7 @@
* moves to arch independent land
*/
-static int i8259A_auto_eoi;
+static int i8259A_auto_eoi = -1;
DEFINE_SPINLOCK(i8259A_lock);
/* some platforms call this... */
void mask_and_ack_8259A(unsigned int);
@@ -216,7 +216,8 @@ spurious_8259A_irq:
static int i8259A_resume(struct sys_device *dev)
{
- init_8259A(i8259A_auto_eoi);
+ if (i8259A_auto_eoi >= 0)
+ init_8259A(i8259A_auto_eoi);
return 0;
}
@@ -226,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev)
* the kernel initialization code can get it
* out of.
*/
- outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
- outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
+ if (i8259A_auto_eoi >= 0) {
+ outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
+ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
+ }
return 0;
}
@@ -252,7 +255,7 @@ static int __init i8259A_init_sysfs(void)
device_initcall(i8259A_init_sysfs);
-void __init init_8259A(int auto_eoi)
+void init_8259A(int auto_eoi)
{
unsigned long flags;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Drop __init from init_8259A()
2007-02-20 11:08 [PATCH] Drop __init from init_8259A() Atsushi Nemoto
@ 2007-02-20 15:11 ` Ralf Baechle
2007-02-20 16:49 ` section mismatches (Re: [PATCH] Drop __init from init_8259A()) Atsushi Nemoto
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2007-02-20 15:11 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Tue, Feb 20, 2007 at 08:08:45PM +0900, Atsushi Nemoto wrote:
> init_8259A() is called from i8259A_resume() so should not be marked as
> __init. And add some tests for whether 8259A was already initialized
> or not.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Thanks, applied.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* section mismatches (Re: [PATCH] Drop __init from init_8259A())
2007-02-20 15:11 ` Ralf Baechle
@ 2007-02-20 16:49 ` Atsushi Nemoto
0 siblings, 0 replies; 3+ messages in thread
From: Atsushi Nemoto @ 2007-02-20 16:49 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
On Tue, 20 Feb 2007 15:11:28 +0000, Ralf Baechle <ralf@linux-mips.org> wrote:
> > init_8259A() is called from i8259A_resume() so should not be marked as
> > __init. And add some tests for whether 8259A was already initialized
> > or not.
> >
> > Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
> Thanks, applied.
Thanks. Apparently modpost can not detect section mismatchs in kernel.
Here is an excerpt from
find . \! -name scripts -name '*.o' | xargs -n 1 scripts/mod/modpost
in malta build directory:
WARNING: ./arch/mips/kernel/built-in.o - Section mismatch: reference to .init.text:cpu_probe from .text between 'start_secondary' (at offset 0x8c1c) and 'smp_prepare_boot_cpu'
WARNING: ./arch/mips/kernel/built-in.o - Section mismatch: reference to .init.text:cpu_report from .text between 'start_secondary' (at offset 0x8c24) and 'smp_prepare_boot_cpu'
WARNING: ./arch/mips/kernel/built-in.o - Section mismatch: reference to .init.text:per_cpu_trap_init from .text between 'start_secondary' (at offset 0x8c2c) and 'smp_prepare_boot_cpu'
WARNING: ./arch/mips/pci/built-in.o - Section mismatch: reference to .init.text: from .text between 'pcibios_fixup_bus' (at offset 0x1ac) and 'pcibios_enable_device'
WARNING: ./arch/mips/pci/built-in.o - Section mismatch: reference to .init.text: from .text between 'pcibios_fixup_bus' (at offset 0x1f8) and 'pcibios_enable_device'
WARNING: ./arch/mips/pci/pci.o - Section mismatch: reference to .init.text: from .text between 'pcibios_fixup_bus' (at offset 0x1ac) and 'pcibios_enable_device'
WARNING: ./arch/mips/pci/pci.o - Section mismatch: reference to .init.text: from .text between 'pcibios_fixup_bus' (at offset 0x1f8) and 'pcibios_enable_device'
In pci.c, __devinit pcibios_fixup_bus() calls __init
pcibios_fixup_device_resources(), so it seems to be fixed.
Maybe it is worth looking at others...
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-20 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20 11:08 [PATCH] Drop __init from init_8259A() Atsushi Nemoto
2007-02-20 15:11 ` Ralf Baechle
2007-02-20 16:49 ` section mismatches (Re: [PATCH] Drop __init from init_8259A()) Atsushi Nemoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.