OSDN Git Service

powerpc/powernv: Include asm/smp.h to fix UP build failure
authorShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Fri, 6 Jun 2014 10:21:05 +0000 (15:51 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jun 2014 07:03:06 +0000 (17:03 +1000)
commitb2a80878693256ab97e1e3667e24b3ecdc951de1
tree427b9de79ca9826f5740f1ba92e24a29725d6bd7
parent59a53afe70fd530040bdc69581f03d880157f15a
powerpc/powernv: Include asm/smp.h to fix UP build failure

Build throws following errors when CONFIG_SMP=n
arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
    rc = opal_query_cpu_status(get_hard_smp_processor_id(i),

The usage of get_hard_smp_processor_id() needs the declaration from
<asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
only on SMP configs and hence UP builds fail.

Fix this by directly including <asm/smp.h> in setup.c unconditionally.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/setup.c