mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xen: x86: mark xen_find_pt_base as __init
@ 2017-09-15 19:29 Arnd Bergmann
  2017-09-16 13:17 ` Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-09-15 19:29 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross, x86
  Cc: Arnd Bergmann, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Andy Lutomirski, Kirill A. Shutemov, Vitaly Kuznetsov, xen-devel,
	linux-kernel

gcc-4.6 causes a harmless link-time warning:

WARNING: vmlinux.o(.text.unlikely+0x48e): Section mismatch in reference from the function xen_find_pt_base() to the function .init.text:m2p()
The function xen_find_pt_base() references
the function __init m2p().
This is often because xen_find_pt_base lacks a __init
annotation or the annotation of m2p is wrong.

Newer compilers inline this function, so it never shows up, but marking
it __init is the right way to avoid the warning.

Fixes: 70e61199559a ("xen: move p2m list if conflicting with e820 map")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/xen/mmu_pv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index 509f560bd0c6..7330cb3b2283 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -2220,7 +2220,7 @@ static void __init xen_write_cr3_init(unsigned long cr3)
  * not the first page table in the page table pool.
  * Iterate through the initial page tables to find the real page table base.
  */
-static phys_addr_t xen_find_pt_base(pmd_t *pmd)
+static phys_addr_t __init xen_find_pt_base(pmd_t *pmd)
 {
 	phys_addr_t pt_base, paddr;
 	unsigned pmdidx;
-- 
2.9.0

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

* Re: [PATCH] xen: x86: mark xen_find_pt_base as __init
  2017-09-15 19:29 [PATCH] xen: x86: mark xen_find_pt_base as __init Arnd Bergmann
@ 2017-09-16 13:17 ` Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Ostrovsky @ 2017-09-16 13:17 UTC (permalink / raw)
  To: Arnd Bergmann, Juergen Gross, x86
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Andy Lutomirski,
	Kirill A. Shutemov, Vitaly Kuznetsov, xen-devel, linux-kernel

On 09/15/2017 03:29 PM, Arnd Bergmann wrote:
> gcc-4.6 causes a harmless link-time warning:
>
> WARNING: vmlinux.o(.text.unlikely+0x48e): Section mismatch in reference from the function xen_find_pt_base() to the function .init.text:m2p()
> The function xen_find_pt_base() references
> the function __init m2p().
> This is often because xen_find_pt_base lacks a __init
> annotation or the annotation of m2p is wrong.
>
> Newer compilers inline this function, so it never shows up, but marking
> it __init is the right way to avoid the warning.
>
> Fixes: 70e61199559a ("xen: move p2m list if conflicting with e820 map")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to for-linus-14b.

-boris

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

end of thread, other threads:[~2017-09-16 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 19:29 [PATCH] xen: x86: mark xen_find_pt_base as __init Arnd Bergmann
2017-09-16 13:17 ` Boris Ostrovsky

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®