mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: linux-kernel@vger.kernel.org
Subject: [2.6 patch] i386: intel_cacheinfo.c:find_num_cache_leaves() should be __cpuinit
Date: Tue, 10 Jul 2007 14:44:44 +0200	[thread overview]
Message-ID: <20070710124444.GW3492@stusta.de> (raw)

This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: arch/i386/kernel/built-in.o(.text+0xb6a7): Section mismatch: reference to .init.text:find_num_cache_leaves (between 'init_intel_cacheinfo' and 'cache_shared_cpu_map_setup')
...

<--  snip  -->

It could be __init_refok, but gcc >= 4.0 anyway inlines it into the 
__cpuinit init_intel_cacheinfo(), and IMHO it's too small
for "noinline __init".

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/arch/i386/kernel/cpu/intel_cacheinfo.c.old	2007-07-10 04:21:03.000000000 +0200
+++ linux-2.6.22-rc6-mm1/arch/i386/kernel/cpu/intel_cacheinfo.c	2007-07-10 04:24:27.000000000 +0200
@@ -275,8 +275,7 @@
 	return 0;
 }
 
-/* will only be called once; __init is safe here */
-static int __init find_num_cache_leaves(void)
+static int __cpuinit find_num_cache_leaves(void)
 {
 	unsigned int		eax, ebx, ecx, edx;
 	union _cpuid4_leaf_eax	cache_eax;


                 reply	other threads:[~2007-07-10 12:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070710124444.GW3492@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome