Skip to content

Commit

Permalink
parisc: delete __cpuinit usage from all users
Browse files Browse the repository at this point in the history
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 5e427ec ("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.

This removes all the parisc uses of the __cpuinit macros.

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

Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
  • Loading branch information
Paul Gortmaker committed Jul 14, 2013
1 parent ab39c77 commit 60ffef0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
14 changes: 8 additions & 6 deletions arch/parisc/kernel/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void convert_to_wide(unsigned long *addr)
}

#ifdef CONFIG_64BIT
void __cpuinit set_firmware_width_unlocked(void)
void set_firmware_width_unlocked(void)
{
int ret;

Expand All @@ -167,19 +167,21 @@ void __cpuinit set_firmware_width_unlocked(void)
* This function must be called before any pdc_* function that uses the
* convert_to_wide function.
*/
void __cpuinit set_firmware_width(void)
void set_firmware_width(void)
{
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
set_firmware_width_unlocked();
spin_unlock_irqrestore(&pdc_lock, flags);
}
#else
void __cpuinit set_firmware_width_unlocked(void) {
void set_firmware_width_unlocked(void)
{
return;
}

void __cpuinit set_firmware_width(void) {
void set_firmware_width(void)
{
return;
}
#endif /*CONFIG_64BIT*/
Expand Down Expand Up @@ -301,7 +303,7 @@ int pdc_chassis_warn(unsigned long *warn)
return retval;
}

int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
int pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
{
int ret;

Expand All @@ -322,7 +324,7 @@ int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
* This PDC call returns the presence and status of all the coprocessors
* attached to the processor.
*/
int __cpuinit pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
{
int ret;
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id)


/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
enum cpu_type __cpuinit
enum cpu_type
parisc_get_cpu_type(unsigned long hversion)
{
struct hp_cpu_type_mask *ptr;
Expand Down
6 changes: 3 additions & 3 deletions arch/parisc/kernel/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
*
* FIXME: doesn't do much yet...
*/
static void __cpuinit
static void
init_percpu_prof(unsigned long cpunum)
{
struct cpuinfo_parisc *p;
Expand All @@ -92,7 +92,7 @@ init_percpu_prof(unsigned long cpunum)
* (return 1). If so, initialize the chip and tell other partners in crime
* they have work to do.
*/
static int __cpuinit processor_probe(struct parisc_device *dev)
static int processor_probe(struct parisc_device *dev)
{
unsigned long txn_addr;
unsigned long cpuid;
Expand Down Expand Up @@ -299,7 +299,7 @@ void __init collect_boot_cpu_data(void)
*
* o Enable CPU profiling hooks.
*/
int __cpuinit init_per_cpu(int cpunum)
int init_per_cpu(int cpunum)
{
int ret;
struct pdc_coproc_cfg coproc_cfg;
Expand Down
8 changes: 4 additions & 4 deletions arch/parisc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ static int smp_debug_lvl = 0;
volatile struct task_struct *smp_init_current_idle_task;

/* track which CPU is booting */
static volatile int cpu_now_booting __cpuinitdata;
static volatile int cpu_now_booting;

static int parisc_max_cpus __cpuinitdata = 1;
static int parisc_max_cpus = 1;

static DEFINE_PER_CPU(spinlock_t, ipi_lock);

Expand Down Expand Up @@ -328,7 +328,7 @@ void __init smp_callin(void)
/*
* Bring one cpu online.
*/
int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle)
int smp_boot_one_cpu(int cpuid, struct task_struct *idle)
{
const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid);
long timeout;
Expand Down Expand Up @@ -424,7 +424,7 @@ void smp_cpus_done(unsigned int cpu_max)
}


int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
{
if (cpu != 0 && cpu < parisc_max_cpus)
smp_boot_one_cpu(cpu, tidle);
Expand Down

0 comments on commit 60ffef0

Please sign in to comment.