提交 e2741f17 编写于 作者: P Paul Gortmaker

s390: delete __cpuinit usage from all s390 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 5e427ec2 ("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/s390 uses of the __cpuinit macros from
all C files.  Currently s390 does not have any __CPUINIT used in
assembly files.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
上级 13dff62d
...@@ -173,7 +173,7 @@ static void __init cache_build_info(void) ...@@ -173,7 +173,7 @@ static void __init cache_build_info(void)
} }
} }
static struct cache_dir *__cpuinit cache_create_cache_dir(int cpu) static struct cache_dir *cache_create_cache_dir(int cpu)
{ {
struct cache_dir *cache_dir; struct cache_dir *cache_dir;
struct kobject *kobj = NULL; struct kobject *kobj = NULL;
...@@ -289,9 +289,8 @@ static struct kobj_type cache_index_type = { ...@@ -289,9 +289,8 @@ static struct kobj_type cache_index_type = {
.default_attrs = cache_index_default_attrs, .default_attrs = cache_index_default_attrs,
}; };
static int __cpuinit cache_create_index_dir(struct cache_dir *cache_dir, static int cache_create_index_dir(struct cache_dir *cache_dir,
struct cache *cache, int index, struct cache *cache, int index, int cpu)
int cpu)
{ {
struct cache_index_dir *index_dir; struct cache_index_dir *index_dir;
int rc; int rc;
...@@ -313,7 +312,7 @@ static int __cpuinit cache_create_index_dir(struct cache_dir *cache_dir, ...@@ -313,7 +312,7 @@ static int __cpuinit cache_create_index_dir(struct cache_dir *cache_dir,
return rc; return rc;
} }
static int __cpuinit cache_add_cpu(int cpu) static int cache_add_cpu(int cpu)
{ {
struct cache_dir *cache_dir; struct cache_dir *cache_dir;
struct cache *cache; struct cache *cache;
...@@ -335,7 +334,7 @@ static int __cpuinit cache_add_cpu(int cpu) ...@@ -335,7 +334,7 @@ static int __cpuinit cache_add_cpu(int cpu)
return 0; return 0;
} }
static void __cpuinit cache_remove_cpu(int cpu) static void cache_remove_cpu(int cpu)
{ {
struct cache_index_dir *index, *next; struct cache_index_dir *index, *next;
struct cache_dir *cache_dir; struct cache_dir *cache_dir;
...@@ -354,8 +353,8 @@ static void __cpuinit cache_remove_cpu(int cpu) ...@@ -354,8 +353,8 @@ static void __cpuinit cache_remove_cpu(int cpu)
cache_dir_cpu[cpu] = NULL; cache_dir_cpu[cpu] = NULL;
} }
static int __cpuinit cache_hotplug(struct notifier_block *nfb, static int cache_hotplug(struct notifier_block *nfb, unsigned long action,
unsigned long action, void *hcpu) void *hcpu)
{ {
int cpu = (long)hcpu; int cpu = (long)hcpu;
int rc = 0; int rc = 0;
......
...@@ -639,8 +639,8 @@ static struct pmu cpumf_pmu = { ...@@ -639,8 +639,8 @@ static struct pmu cpumf_pmu = {
.cancel_txn = cpumf_pmu_cancel_txn, .cancel_txn = cpumf_pmu_cancel_txn,
}; };
static int __cpuinit cpumf_pmu_notifier(struct notifier_block *self, static int cpumf_pmu_notifier(struct notifier_block *self, unsigned long action,
unsigned long action, void *hcpu) void *hcpu)
{ {
unsigned int cpu = (long) hcpu; unsigned int cpu = (long) hcpu;
int flags; int flags;
......
...@@ -21,7 +21,7 @@ static DEFINE_PER_CPU(struct cpuid, cpu_id); ...@@ -21,7 +21,7 @@ static DEFINE_PER_CPU(struct cpuid, cpu_id);
/* /*
* cpu_init - initializes state that is per-CPU. * cpu_init - initializes state that is per-CPU.
*/ */
void __cpuinit cpu_init(void) void cpu_init(void)
{ {
struct s390_idle_data *idle = &__get_cpu_var(s390_idle); struct s390_idle_data *idle = &__get_cpu_var(s390_idle);
struct cpuid *id = &__get_cpu_var(cpu_id); struct cpuid *id = &__get_cpu_var(cpu_id);
......
...@@ -165,7 +165,7 @@ static void pcpu_ec_call(struct pcpu *pcpu, int ec_bit) ...@@ -165,7 +165,7 @@ static void pcpu_ec_call(struct pcpu *pcpu, int ec_bit)
pcpu_sigp_retry(pcpu, order, 0); pcpu_sigp_retry(pcpu, order, 0);
} }
static int __cpuinit pcpu_alloc_lowcore(struct pcpu *pcpu, int cpu) static int pcpu_alloc_lowcore(struct pcpu *pcpu, int cpu)
{ {
struct _lowcore *lc; struct _lowcore *lc;
...@@ -616,10 +616,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void) ...@@ -616,10 +616,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void)
return info; return info;
} }
static int __cpuinit smp_add_present_cpu(int cpu); static int smp_add_present_cpu(int cpu);
static int __cpuinit __smp_rescan_cpus(struct sclp_cpu_info *info, static int __smp_rescan_cpus(struct sclp_cpu_info *info, int sysfs_add)
int sysfs_add)
{ {
struct pcpu *pcpu; struct pcpu *pcpu;
cpumask_t avail; cpumask_t avail;
...@@ -685,7 +684,7 @@ static void __init smp_detect_cpus(void) ...@@ -685,7 +684,7 @@ static void __init smp_detect_cpus(void)
/* /*
* Activate a secondary processor. * Activate a secondary processor.
*/ */
static void __cpuinit smp_start_secondary(void *cpuvoid) static void smp_start_secondary(void *cpuvoid)
{ {
S390_lowcore.last_update_clock = get_tod_clock(); S390_lowcore.last_update_clock = get_tod_clock();
S390_lowcore.restart_stack = (unsigned long) restart_stack; S390_lowcore.restart_stack = (unsigned long) restart_stack;
...@@ -708,7 +707,7 @@ static void __cpuinit smp_start_secondary(void *cpuvoid) ...@@ -708,7 +707,7 @@ static void __cpuinit smp_start_secondary(void *cpuvoid)
} }
/* Upping and downing of CPUs */ /* Upping and downing of CPUs */
int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) int __cpu_up(unsigned int cpu, struct task_struct *tidle)
{ {
struct pcpu *pcpu; struct pcpu *pcpu;
int rc; int rc;
...@@ -964,8 +963,8 @@ static struct attribute_group cpu_online_attr_group = { ...@@ -964,8 +963,8 @@ static struct attribute_group cpu_online_attr_group = {
.attrs = cpu_online_attrs, .attrs = cpu_online_attrs,
}; };
static int __cpuinit smp_cpu_notify(struct notifier_block *self, static int smp_cpu_notify(struct notifier_block *self, unsigned long action,
unsigned long action, void *hcpu) void *hcpu)
{ {
unsigned int cpu = (unsigned int)(long)hcpu; unsigned int cpu = (unsigned int)(long)hcpu;
struct cpu *c = &pcpu_devices[cpu].cpu; struct cpu *c = &pcpu_devices[cpu].cpu;
...@@ -983,7 +982,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self, ...@@ -983,7 +982,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
return notifier_from_errno(err); return notifier_from_errno(err);
} }
static int __cpuinit smp_add_present_cpu(int cpu) static int smp_add_present_cpu(int cpu)
{ {
struct cpu *c = &pcpu_devices[cpu].cpu; struct cpu *c = &pcpu_devices[cpu].cpu;
struct device *s = &c->dev; struct device *s = &c->dev;
......
...@@ -418,7 +418,7 @@ void s390_adjust_jiffies(void) ...@@ -418,7 +418,7 @@ void s390_adjust_jiffies(void)
/* /*
* calibrate the delay loop * calibrate the delay loop
*/ */
void __cpuinit calibrate_delay(void) void calibrate_delay(void)
{ {
s390_adjust_jiffies(); s390_adjust_jiffies();
/* Print the good old Bogomips line .. */ /* Print the good old Bogomips line .. */
......
...@@ -371,14 +371,14 @@ EXPORT_SYMBOL(del_virt_timer); ...@@ -371,14 +371,14 @@ EXPORT_SYMBOL(del_virt_timer);
/* /*
* Start the virtual CPU timer on the current CPU. * Start the virtual CPU timer on the current CPU.
*/ */
void __cpuinit init_cpu_vtimer(void) void init_cpu_vtimer(void)
{ {
/* set initial cpu timer */ /* set initial cpu timer */
set_vtimer(VTIMER_MAX_SLICE); set_vtimer(VTIMER_MAX_SLICE);
} }
static int __cpuinit s390_nohz_notify(struct notifier_block *self, static int s390_nohz_notify(struct notifier_block *self, unsigned long action,
unsigned long action, void *hcpu) void *hcpu)
{ {
struct s390_idle_data *idle; struct s390_idle_data *idle;
long cpu = (long) hcpu; long cpu = (long) hcpu;
......
...@@ -639,8 +639,8 @@ static void pfault_interrupt(struct ext_code ext_code, ...@@ -639,8 +639,8 @@ static void pfault_interrupt(struct ext_code ext_code,
put_task_struct(tsk); put_task_struct(tsk);
} }
static int __cpuinit pfault_cpu_notify(struct notifier_block *self, static int pfault_cpu_notify(struct notifier_block *self, unsigned long action,
unsigned long action, void *hcpu) void *hcpu)
{ {
struct thread_struct *thread, *next; struct thread_struct *thread, *next;
struct task_struct *tsk; struct task_struct *tsk;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册