* [PATCH] x86_64: fix section mismatch warnings in tce
@ 2007-07-26 6:23 Sam Ravnborg
2007-07-26 9:06 ` [PATCH] x86-64: Calgary - " Muli Ben-Yehuda
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-07-26 6:23 UTC (permalink / raw)
To: Andi Kleen, Andrew Morton; +Cc: LKML
Fix the following two section mismatch warnings:
WARNING: vmlinux.o(.text+0x1ce84): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
WARNING: vmlinux.o(.text+0x1d04d): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')
In both cases the functions was used only from __init
context so mark them __init.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index 3aeae2f..acef53a 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -165,7 +165,7 @@ done:
return ret;
}
-void* alloc_tce_table(void)
+void* __init alloc_tce_table(void)
{
unsigned int size;
@@ -175,7 +175,7 @@ void* alloc_tce_table(void)
return __alloc_bootmem_low(size, size, 0);
}
-void free_tce_table(void *tbl)
+void __init free_tce_table(void *tbl)
{
unsigned int size;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] x86-64: Calgary - fix section mismatch warnings in tce
2007-07-26 6:23 [PATCH] x86_64: fix section mismatch warnings in tce Sam Ravnborg
@ 2007-07-26 9:06 ` Muli Ben-Yehuda
2007-07-26 10:02 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Muli Ben-Yehuda @ 2007-07-26 9:06 UTC (permalink / raw)
To: Sam Ravnborg, Andrew Morton, Andi Kleen; +Cc: LKML
On Thu, Jul 26, 2007 at 08:23:30AM +0200, Sam Ravnborg wrote:
> Fix the following two section mismatch warnings:
>
> WARNING: vmlinux.o(.text+0x1ce84): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
> WARNING: vmlinux.o(.text+0x1d04d): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')
>
> In both cases the functions was used only from __init
> context so mark them __init.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
There was a more complete patch by Randy Dunlap posted a couple of
days ago that I queued for the next Calgary update. However, since
people are tripping over this and are bothered enough to send patches,
Andi or Andrew, could you please expedite the attached patch upstream?
====
From: Randy Dunlap <randy.dunlap@oracle.com>
Subject: x86-64: Calgary - fix section mismatch warnings in tce
Fix section mismatch warnings:
these functions are called only from __init functions.
WARNING: vmlinux.o(.text+0x1861c): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
WARNING: vmlinux.o(.text+0x187e5): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
---
arch/x86_64/kernel/tce.c | 6 +++---
include/asm-x86_64/tce.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1.orig/arch/x86_64/kernel/tce.c
+++ linux-2.6.23-rc1/arch/x86_64/kernel/tce.c
@@ -131,7 +131,7 @@ done:
return ret;
}
-int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
+int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar)
{
struct iommu_table *tbl;
int ret;
@@ -165,7 +165,7 @@ done:
return ret;
}
-void* alloc_tce_table(void)
+void* __init alloc_tce_table(void)
{
unsigned int size;
@@ -175,7 +175,7 @@ void* alloc_tce_table(void)
return __alloc_bootmem_low(size, size, 0);
}
-void free_tce_table(void *tbl)
+void __init free_tce_table(void *tbl)
{
unsigned int size;
--- linux-2.6.23-rc1.orig/include/asm-x86_64/tce.h
+++ linux-2.6.23-rc1/include/asm-x86_64/tce.h
@@ -41,8 +41,8 @@ struct iommu_table;
extern void tce_build(struct iommu_table *tbl, unsigned long index,
unsigned int npages, unsigned long uaddr, int direction);
extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages);
-extern void* alloc_tce_table(void);
-extern void free_tce_table(void *tbl);
-extern int build_tce_table(struct pci_dev *dev, void __iomem *bbar);
+extern void* __init alloc_tce_table(void);
+extern void __init free_tce_table(void *tbl);
+extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar);
#endif /* _ASM_X86_64_TCE_H */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86-64: Calgary - fix section mismatch warnings in tce
2007-07-26 9:06 ` [PATCH] x86-64: Calgary - " Muli Ben-Yehuda
@ 2007-07-26 10:02 ` Sam Ravnborg
2007-07-26 10:09 ` Muli Ben-Yehuda
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-07-26 10:02 UTC (permalink / raw)
To: Muli Ben-Yehuda; +Cc: Andrew Morton, Andi Kleen, LKML
On Thu, Jul 26, 2007 at 12:06:11PM +0300, Muli Ben-Yehuda wrote:
> On Thu, Jul 26, 2007 at 08:23:30AM +0200, Sam Ravnborg wrote:
> > Fix the following two section mismatch warnings:
> >
> > WARNING: vmlinux.o(.text+0x1ce84): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
> > WARNING: vmlinux.o(.text+0x1d04d): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')
> >
> > In both cases the functions was used only from __init
> > context so mark them __init.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
>
> There was a more complete patch by Randy Dunlap posted a couple of
> days ago that I queued for the next Calgary update. However, since
> people are tripping over this and are bothered enough to send patches,
> Andi or Andrew, could you please expedite the attached patch upstream?
Now I recall I saw it too :-(
This one is beeter although the __init in the prototype declaration
should have no effect. (Also wonder why the prototypes are extern - that
should be a no-op too).
Sam
>
> ====
>
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Subject: x86-64: Calgary - fix section mismatch warnings in tce
>
> Fix section mismatch warnings:
> these functions are called only from __init functions.
>
> WARNING: vmlinux.o(.text+0x1861c): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
> WARNING: vmlinux.o(.text+0x187e5): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
> ---
> arch/x86_64/kernel/tce.c | 6 +++---
> include/asm-x86_64/tce.h | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> --- linux-2.6.23-rc1.orig/arch/x86_64/kernel/tce.c
> +++ linux-2.6.23-rc1/arch/x86_64/kernel/tce.c
> @@ -131,7 +131,7 @@ done:
> return ret;
> }
>
> -int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
> +int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar)
> {
> struct iommu_table *tbl;
> int ret;
> @@ -165,7 +165,7 @@ done:
> return ret;
> }
>
> -void* alloc_tce_table(void)
> +void* __init alloc_tce_table(void)
> {
> unsigned int size;
>
> @@ -175,7 +175,7 @@ void* alloc_tce_table(void)
> return __alloc_bootmem_low(size, size, 0);
> }
>
> -void free_tce_table(void *tbl)
> +void __init free_tce_table(void *tbl)
> {
> unsigned int size;
>
> --- linux-2.6.23-rc1.orig/include/asm-x86_64/tce.h
> +++ linux-2.6.23-rc1/include/asm-x86_64/tce.h
> @@ -41,8 +41,8 @@ struct iommu_table;
> extern void tce_build(struct iommu_table *tbl, unsigned long index,
> unsigned int npages, unsigned long uaddr, int direction);
> extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages);
> -extern void* alloc_tce_table(void);
> -extern void free_tce_table(void *tbl);
> -extern int build_tce_table(struct pci_dev *dev, void __iomem *bbar);
> +extern void* __init alloc_tce_table(void);
> +extern void __init free_tce_table(void *tbl);
> +extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar);
>
> #endif /* _ASM_X86_64_TCE_H */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86-64: Calgary - fix section mismatch warnings in tce
2007-07-26 10:02 ` Sam Ravnborg
@ 2007-07-26 10:09 ` Muli Ben-Yehuda
0 siblings, 0 replies; 4+ messages in thread
From: Muli Ben-Yehuda @ 2007-07-26 10:09 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Andrew Morton, Andi Kleen, LKML
On Thu, Jul 26, 2007 at 12:02:38PM +0200, Sam Ravnborg wrote:
> Now I recall I saw it too :-(
> This one is beeter although the __init in the prototype declaration
> should have no effect. (Also wonder why the prototypes are extern -
> that should be a no-op too).
The __init in the prototype is for consistency's sake with the
definition. The extern I have no idea... probably legacy from some
other code, but they don't bother me.
Anyway, forgot to mention earlier - thanks for your patch!
Cheers,
Muli
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-26 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26 6:23 [PATCH] x86_64: fix section mismatch warnings in tce Sam Ravnborg
2007-07-26 9:06 ` [PATCH] x86-64: Calgary - " Muli Ben-Yehuda
2007-07-26 10:02 ` Sam Ravnborg
2007-07-26 10:09 ` Muli Ben-Yehuda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®