From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-28 12:13:46
From: Nicholas Piggin <npiggin@gmail.com>
Use the different spin loop primitives in some simple powerpc
spin loops, including those which will spin as a common case.
This will help to test the spin loop primitives before more
conversions are done.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/include/asm/delay.h | 15 +++++++++++----
arch/powerpc/kernel/smp.c | 3 +--
arch/powerpc/kernel/time.c | 6 ++++--
arch/powerpc/mm/hash_native_64.c | 4 +++-
4 files changed, 19 insertions(+), 9 deletions(-)
@@ -767,8 +767,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)smp_ops->give_timebase();/* Wait until cpu puts itself in the online & active maps */-while(!cpu_online(cpu))-cpu_relax();+spin_until_cond(cpu_online(cpu));return0;}
From: kbuild test robot <hidden> Date: 2017-07-02 09:30:37
Hi Nicholas,
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.12-rc7 next-20170630]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Michael-Ellerman/powerpc-64-implement-spin-loop-primitives/20170630-210421
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-ppc6xx_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/io.h:32:0,
from arch/powerpc/include/asm/book3s/32/pgtable.h:95,
from arch/powerpc/include/asm/book3s/pgtable.h:7,
from arch/powerpc/include/asm/pgtable.h:16,
from include/linux/mm.h:70,
from drivers/soc/fsl/qe/qe.c:23:
drivers/soc/fsl/qe/qe.c: In function 'qe_issue_cmd':
quoted
arch/powerpc/include/asm/delay.h:67:3: error: implicit declaration of function 'spin_begin' [-Werror=implicit-function-declaration]
spin_begin(); \
^
quoted
drivers/soc/fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
quoted
arch/powerpc/include/asm/delay.h:70:4: error: implicit declaration of function 'spin_cpu_relax' [-Werror=implicit-function-declaration]
spin_cpu_relax(); \
^
quoted
drivers/soc/fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
quoted
arch/powerpc/include/asm/delay.h:71:3: error: implicit declaration of function 'spin_end' [-Werror=implicit-function-declaration]
spin_end(); \
^
quoted
drivers/soc/fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/powerpc/include/asm/io.h:32:0,
from arch/powerpc/include/asm/book3s/32/pgtable.h:95,
from arch/powerpc/include/asm/book3s/pgtable.h:7,
from arch/powerpc/include/asm/pgtable.h:16,
from include/linux/mm.h:70,
from drivers/soc//fsl/qe/qe.c:23:
drivers/soc//fsl/qe/qe.c: In function 'qe_issue_cmd':
quoted
arch/powerpc/include/asm/delay.h:67:3: error: implicit declaration of function 'spin_begin' [-Werror=implicit-function-declaration]
spin_begin(); \
^
drivers/soc//fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
quoted
arch/powerpc/include/asm/delay.h:70:4: error: implicit declaration of function 'spin_cpu_relax' [-Werror=implicit-function-declaration]
spin_cpu_relax(); \
^
drivers/soc//fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
quoted
arch/powerpc/include/asm/delay.h:71:3: error: implicit declaration of function 'spin_end' [-Werror=implicit-function-declaration]
spin_end(); \
^
drivers/soc//fsl/qe/qe.c:142:8: note: in expansion of macro 'spin_event_timeout'
ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/spin_begin +67 arch/powerpc/include/asm/delay.h
61 \
62 if (delay) { \
63 while (!(__ret = (condition)) && \
64 (tb_ticks_since(__start) <= __loops)) \
65 udelay(delay); \
66 } else { \
> 67 spin_begin(); \
68 while (!(__ret = (condition)) && \
69 (tb_ticks_since(__start) <= __loops)) \
> 70 spin_cpu_relax(); \
> 71 spin_end(); \
72 } \
73 if (!__ret) \
74 __ret = (condition); \
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
These warnings seem like they're correct, but that code should never
But they're only warnings, so they shouldn't be breaking the build AFAICS.
Can be this issue associated with a module? i have this feeling because last time i have successiful
build the kernel but without some lan modules (but i cant have lan working).
Thanks
Luigi