Skip to content

Commit

Permalink
cpu: Make init_hid() local to cpu.c
Browse files Browse the repository at this point in the history
No point doing that from init on the main CPU while it's
done already inside cpu.c for secondaries.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Jun 26, 2017
1 parent b137ad4 commit 42f9a14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion core/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ void trigger_attn(void)
__trigger_attn();
}

void init_hid(void)
static void init_hid(void)
{
/* attn is enabled even when HV=0, so make sure it's off */
disable_attn();
Expand Down Expand Up @@ -929,6 +929,8 @@ void cpu_callin(struct cpu_thread *cpu)
{
cpu->state = cpu_state_active;
cpu->job_has_no_return = false;

init_hid();
}

static void opal_start_thread_job(void *data)
Expand Down
2 changes: 0 additions & 2 deletions core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,8 +1055,6 @@ void __noreturn __secondary_cpu_entry(void)
/* Secondary CPU called in */
cpu_callin(cpu);

init_hid();

/* Some XIVE setup */
xive_cpu_callin(cpu);

Expand Down
1 change: 0 additions & 1 deletion include/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ static inline void __nomcount cpu_relax(void)
void pre_init_boot_cpu(void);
void init_boot_cpu(void);
void init_all_cpus(void);
void init_hid(void);

/* This brings up our secondaries */
extern void cpu_bringup(void);
Expand Down

0 comments on commit 42f9a14

Please sign in to comment.