forked from Minki/linux
metag: delete __cpuinit usage from all metag files
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0
("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.
After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.
Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.
This removes all the arch/metag uses of the __cpuinit macros from
all C files. Currently metag does not have any __CPUINIT used in
assembly files.
[1] https://lkml.org/lkml/2013/5/20/589
Cc: James Hogan <james.hogan@imgtec.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
parent
18f894c145
commit
54be16e7b2
@ -813,8 +813,8 @@ static struct metag_pmu _metag_pmu = {
|
||||
};
|
||||
|
||||
/* PMU CPU hotplug notifier */
|
||||
static int __cpuinit metag_pmu_cpu_notify(struct notifier_block *b,
|
||||
unsigned long action, void *hcpu)
|
||||
static int metag_pmu_cpu_notify(struct notifier_block *b, unsigned long action,
|
||||
void *hcpu)
|
||||
{
|
||||
unsigned int cpu = (unsigned int)hcpu;
|
||||
struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
|
||||
@ -828,7 +828,7 @@ static int __cpuinit metag_pmu_cpu_notify(struct notifier_block *b,
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block __cpuinitdata metag_pmu_notifier = {
|
||||
static struct notifier_block metag_pmu_notifier = {
|
||||
.notifier_call = metag_pmu_cpu_notify,
|
||||
};
|
||||
|
||||
|
@ -68,7 +68,7 @@ static DECLARE_COMPLETION(cpu_running);
|
||||
/*
|
||||
* "thread" is assumed to be a valid Meta hardware thread ID.
|
||||
*/
|
||||
int __cpuinit boot_secondary(unsigned int thread, struct task_struct *idle)
|
||||
int boot_secondary(unsigned int thread, struct task_struct *idle)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
@ -118,11 +118,9 @@ int __cpuinit boot_secondary(unsigned int thread, struct task_struct *idle)
|
||||
* If the cache partition has changed, prints a message to the log describing
|
||||
* those changes.
|
||||
*/
|
||||
static __cpuinit void describe_cachepart_change(unsigned int thread,
|
||||
const char *label,
|
||||
unsigned int sz,
|
||||
unsigned int old,
|
||||
unsigned int new)
|
||||
static void describe_cachepart_change(unsigned int thread, const char *label,
|
||||
unsigned int sz, unsigned int old,
|
||||
unsigned int new)
|
||||
{
|
||||
unsigned int lor1, land1, gor1, gand1;
|
||||
unsigned int lor2, land2, gor2, gand2;
|
||||
@ -170,7 +168,7 @@ static __cpuinit void describe_cachepart_change(unsigned int thread,
|
||||
* Ensures that coherency is enabled and that the threads share the same cache
|
||||
* partitions.
|
||||
*/
|
||||
static __cpuinit void setup_smp_cache(unsigned int thread)
|
||||
static void setup_smp_cache(unsigned int thread)
|
||||
{
|
||||
unsigned int this_thread, lflags;
|
||||
unsigned int dcsz, dcpart_this, dcpart_old, dcpart_new;
|
||||
@ -215,7 +213,7 @@ static __cpuinit void setup_smp_cache(unsigned int thread)
|
||||
icpart_old, icpart_new);
|
||||
}
|
||||
|
||||
int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
{
|
||||
unsigned int thread = cpu_2_hwthread_id[cpu];
|
||||
int ret;
|
||||
@ -268,7 +266,7 @@ static DECLARE_COMPLETION(cpu_killed);
|
||||
/*
|
||||
* __cpu_disable runs on the processor to be shutdown.
|
||||
*/
|
||||
int __cpuexit __cpu_disable(void)
|
||||
int __cpu_disable(void)
|
||||
{
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
@ -299,7 +297,7 @@ int __cpuexit __cpu_disable(void)
|
||||
* called on the thread which is asking for a CPU to be shutdown -
|
||||
* waits until shutdown has completed, or it is timed out.
|
||||
*/
|
||||
void __cpuexit __cpu_die(unsigned int cpu)
|
||||
void __cpu_die(unsigned int cpu)
|
||||
{
|
||||
if (!wait_for_completion_timeout(&cpu_killed, msecs_to_jiffies(1)))
|
||||
pr_err("CPU%u: unable to kill\n", cpu);
|
||||
@ -311,7 +309,7 @@ void __cpuexit __cpu_die(unsigned int cpu)
|
||||
* Note that we do not return from this function. If this cpu is
|
||||
* brought online again it will need to run secondary_startup().
|
||||
*/
|
||||
void __cpuexit cpu_die(void)
|
||||
void cpu_die(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
idle_task_exit();
|
||||
@ -326,7 +324,7 @@ void __cpuexit cpu_die(void)
|
||||
* Called by both boot and secondaries to move global data into
|
||||
* per-processor storage.
|
||||
*/
|
||||
void __cpuinit smp_store_cpu_info(unsigned int cpuid)
|
||||
void smp_store_cpu_info(unsigned int cpuid)
|
||||
{
|
||||
struct cpuinfo_metag *cpu_info = &per_cpu(cpu_data, cpuid);
|
||||
|
||||
|
@ -812,7 +812,7 @@ static void set_trigger_mask(unsigned int mask)
|
||||
}
|
||||
#endif
|
||||
|
||||
void __cpuinit per_cpu_trap_init(unsigned long cpu)
|
||||
void per_cpu_trap_init(unsigned long cpu)
|
||||
{
|
||||
TBIRES int_context;
|
||||
unsigned int thread = cpu_2_hwthread_id[cpu];
|
||||
|
Loading…
Reference in New Issue
Block a user