From: "Jan Beulich" <jbeulich@novell.com>
To: "Andi Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>, <patches@x86-64.org>
Subject: [PATCH] x86: fix improper .init-type section references
Date: Tue, 12 Jun 2007 09:48:15 +0200 [thread overview]
Message-ID: <466E6BDF.76E4.0078.0@novell.com> (raw)
.. which modpost is warning about.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/cpu/intel_cacheinfo.c | 6 +++---
arch/i386/kernel/cpu/mcheck/therm_throt.c | 2 +-
arch/i386/kernel/cpu/mtrr/generic.c | 2 +-
arch/i386/kernel/cpu/mtrr/main.c | 2 +-
arch/i386/kernel/smpboot.c | 2 +-
arch/x86_64/kernel/mce.c | 6 +++---
arch/x86_64/mm/init.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
--- linux-2.6.22-rc4/arch/i386/kernel/cpu/intel_cacheinfo.c 2007-06-11 18:09:52.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/i386/kernel/cpu/intel_cacheinfo.c 2007-06-11 09:10:41.000000000 +0200
@@ -240,7 +240,7 @@ static int __cpuinit cpuid4_cache_lookup
}
/* will only be called once; __init is safe here */
-static int __init find_num_cache_leaves(void)
+static int noinline __init_refok find_num_cache_leaves(void)
{
unsigned int eax, ebx, ecx, edx;
union _cpuid4_leaf_eax cache_eax;
@@ -448,7 +448,7 @@ static void __cpuinit cache_shared_cpu_m
}
}
}
-static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
+static void __cpuexit cache_remove_shared_cpu_map(unsigned int cpu, int index)
{
struct _cpuid4_info *this_leaf, *sibling_leaf;
int sibling;
@@ -461,7 +461,7 @@ static void __cpuinit cache_remove_share
}
#else
static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {}
-static void __init cache_remove_shared_cpu_map(unsigned int cpu, int index) {}
+static void __exit cache_remove_shared_cpu_map(unsigned int cpu, int index) {}
#endif
static void free_cache_attributes(unsigned int cpu)
--- linux-2.6.22-rc4/arch/i386/kernel/cpu/mcheck/therm_throt.c 2007-06-11 18:09:52.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/i386/kernel/cpu/mcheck/therm_throt.c 2007-06-11 09:10:41.000000000 +0200
@@ -150,7 +150,7 @@ static __cpuinit int thermal_throttle_cp
return NOTIFY_OK;
}
-static struct notifier_block thermal_throttle_cpu_notifier =
+static __cpuinitdata struct notifier_block thermal_throttle_cpu_notifier =
{
.notifier_call = thermal_throttle_cpu_callback,
};
--- linux-2.6.22-rc4/arch/i386/kernel/cpu/mtrr/generic.c 2007-06-11 18:09:52.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/i386/kernel/cpu/mtrr/generic.c 2007-06-11 09:10:41.000000000 +0200
@@ -78,7 +78,7 @@ static void __cpuinit print_fixed(unsign
}
/* Grab all of the MTRR state for this CPU into *state */
-void get_mtrr_state(void)
+void __init get_mtrr_state(void)
{
unsigned int i;
struct mtrr_var_range *vrs;
--- linux-2.6.22-rc4/arch/i386/kernel/cpu/mtrr/main.c 2007-06-11 18:09:52.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/i386/kernel/cpu/mtrr/main.c 2007-06-11 09:10:41.000000000 +0200
@@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_
* initialized (i.e. before smp_init()).
*
*/
-void mtrr_bp_init(void)
+void __init mtrr_bp_init(void)
{
init_ifs();
--- linux-2.6.22-rc4/arch/i386/kernel/smpboot.c 2007-06-11 18:09:52.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/i386/kernel/smpboot.c 2007-06-11 09:10:41.000000000 +0200
@@ -118,7 +118,7 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 };
* has made sure it's suitably aligned.
*/
-static unsigned long __devinit setup_trampoline(void)
+static unsigned long __cpuinit setup_trampoline(void)
{
memcpy(trampoline_base, trampoline_data, trampoline_end - trampoline_data);
return virt_to_phys(trampoline_base);
--- linux-2.6.22-rc4/arch/x86_64/kernel/mce.c 2007-06-11 18:10:04.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/x86_64/kernel/mce.c 2007-06-11 09:10:41.000000000 +0200
@@ -701,7 +701,7 @@ static __cpuinit int mce_create_device(u
return err;
}
-static void mce_remove_device(unsigned int cpu)
+static __cpuexit void mce_remove_device(unsigned int cpu)
{
int i;
@@ -713,7 +713,7 @@ static void mce_remove_device(unsigned i
}
/* Get notified when a cpu comes on/off. Be hotplug friendly. */
-static int
+static __cpuinit int
mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
@@ -731,7 +731,7 @@ mce_cpu_callback(struct notifier_block *
return NOTIFY_OK;
}
-static struct notifier_block mce_cpu_notifier = {
+static __cpuinitdata struct notifier_block mce_cpu_notifier = {
.notifier_call = mce_cpu_callback,
};
--- linux-2.6.22-rc4/arch/x86_64/mm/init.c 2007-06-11 18:10:04.000000000 +0200
+++ 2.6.22-rc4-x86-init-attribs/arch/x86_64/mm/init.c 2007-06-11 10:28:44.000000000 +0200
@@ -762,7 +762,7 @@ int in_gate_area_no_task(unsigned long a
return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
}
-void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
+void *__init alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
{
return __alloc_bootmem_core(pgdat->bdata, size,
SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
next reply other threads:[~2007-06-12 7:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-12 7:48 Jan Beulich [this message]
2007-06-12 11:14 ` [PATCH] x86: fix improper .init-type section references Satyam Sharma
2007-06-12 12:09 ` Satyam Sharma
2007-06-12 12:43 ` Jan Beulich
2007-06-12 13:32 ` Satyam Sharma
2007-06-12 13:49 ` Jan Beulich
2007-06-12 14:09 ` Satyam Sharma
2007-06-12 18:00 ` Sam Ravnborg
2007-06-13 3:18 ` Satyam Sharma
2007-06-13 4:35 ` Sam Ravnborg
2007-06-13 6:59 ` Jan Beulich
2007-06-13 7:39 ` Satyam Sharma
2007-06-13 7:49 ` Jan Beulich
2007-06-13 8:10 ` Sam Ravnborg
2007-06-12 17:56 ` Sam Ravnborg
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=466E6BDF.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@x86-64.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 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.