lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202512141354.zefMnJb2-lkp@intel.com>
Date: Sun, 14 Dec 2025 13:13:55 +0800
From: kernel test robot <lkp@...el.com>
To: Paul Mackerras <paulus@...abs.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Madhavan Srinivasan <maddy@...ux.ibm.com>
Subject: arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: cast
 removes address space '__iomem' of expression

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0dfb36b2dcb666f116ba314e631bd3bc632c44d1
commit: aca95fb6bb572a77f39d42d83ab72a965026577d powerpc/microwatt: Add SMP support
date:   10 months ago
config: powerpc64-randconfig-r134-20251214 (https://download.01.org/0day-ci/archive/20251214/202512141354.zefMnJb2-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251214/202512141354.zefMnJb2-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512141354.zefMnJb2-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/math-emu/fctiw.c:8:
   include/math-emu/double.h:59:21: warning: '__BIG_ENDIAN' is not defined, evaluates to 0 [-Wundef]
      59 | #if __BYTE_ORDER == __BIG_ENDIAN
         |                     ^
>> arch/powerpc/math-emu/fctiw.c:14:2: warning: variable '_fex' set but not used [-Wunused-but-set-variable]
      14 |         FP_DECL_EX;
         |         ^
   include/math-emu/soft-fp.h:94:24: note: expanded from macro 'FP_DECL_EX'
      94 | #define FP_DECL_EX int _fex = 0
         |                        ^
   2 warnings generated.
--
   In file included from arch/powerpc/math-emu/fsel.c:8:
   include/math-emu/double.h:59:21: warning: '__BIG_ENDIAN' is not defined, evaluates to 0 [-Wundef]
      59 | #if __BYTE_ORDER == __BIG_ENDIAN
         |                     ^
>> arch/powerpc/math-emu/fsel.c:14:2: warning: variable '_fex' set but not used [-Wunused-but-set-variable]
      14 |         FP_DECL_EX;
         |         ^
   include/math-emu/soft-fp.h:94:24: note: expanded from macro 'FP_DECL_EX'
      94 | #define FP_DECL_EX int _fex = 0
         |                        ^
   2 warnings generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PPC_RADIX_BROADCAST_TLBIE
   Depends on [n]: PPC_RADIX_MMU [=n]
   Selected by [y]:
   - PPC_POWERNV [=y] && PPC64 [=y] && PPC_BOOK3S [=y]
   - PPC_PSERIES [=y] && PPC64 [=y] && PPC_BOOK3S [=y]

sparse warnings: (new ones prefixed by >>)
   arch/powerpc/math-emu/lfs.c: note: in included file:
   include/math-emu/double.h:59:21: sparse: sparse: undefined preprocessor identifier '__BIG_ENDIAN'
   arch/powerpc/math-emu/lfs.c: note: in included file:
   include/math-emu/single.h:50:21: sparse: sparse: undefined preprocessor identifier '__BIG_ENDIAN'
>> arch/powerpc/math-emu/lfs.c:23:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void *ea @@
   arch/powerpc/math-emu/lfs.c:23:32: sparse:     expected void const [noderef] __user *from
   arch/powerpc/math-emu/lfs.c:23:32: sparse:     got void *ea
--
   arch/powerpc/math-emu/lfd.c: note: in included file:
   include/math-emu/double.h:59:21: sparse: sparse: undefined preprocessor identifier '__BIG_ENDIAN'
>> arch/powerpc/math-emu/lfd.c:12:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void *ea @@
   arch/powerpc/math-emu/lfd.c:12:33: sparse:     expected void const [noderef] __user *from
   arch/powerpc/math-emu/lfd.c:12:33: sparse:     got void *ea
   arch/powerpc/math-emu/lfd.c:10:1: sparse: sparse: symbol 'lfd' was not declared. Should it be static?
--
>> arch/powerpc/math-emu/stfiwx.c:13:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void *ea @@
   arch/powerpc/math-emu/stfiwx.c:13:26: sparse:     expected void [noderef] __user *to
   arch/powerpc/math-emu/stfiwx.c:13:26: sparse:     got void *ea
--
>> arch/powerpc/math-emu/stfd.c:17:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void *ea @@
   arch/powerpc/math-emu/stfd.c:17:26: sparse:     expected void [noderef] __user *to
   arch/powerpc/math-emu/stfd.c:17:26: sparse:     got void *ea
--
   arch/powerpc/math-emu/stfs.c: note: in included file:
   include/math-emu/double.h:59:21: sparse: sparse: undefined preprocessor identifier '__BIG_ENDIAN'
   arch/powerpc/math-emu/stfs.c: note: in included file:
   include/math-emu/single.h:50:21: sparse: sparse: undefined preprocessor identifier '__BIG_ENDIAN'
>> arch/powerpc/math-emu/stfs.c:38:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void *ea @@
   arch/powerpc/math-emu/stfs.c:38:34: sparse:     expected void [noderef] __user *to
   arch/powerpc/math-emu/stfs.c:38:34: sparse:     got void *ea
--
>> arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem *addr @@     got void * @@
   arch/powerpc/platforms/microwatt/smp.c:79:24: sparse:     expected void [noderef] __iomem *addr
   arch/powerpc/platforms/microwatt/smp.c:79:24: sparse:     got void *

vim +/__iomem +79 arch/powerpc/platforms/microwatt/smp.c

    42	
    43	void __init microwatt_init_smp(void)
    44	{
    45		volatile unsigned char __iomem *syscon;
    46		int ncpus;
    47		int timeout;
    48	
    49		syscon = early_ioremap(SYSCON_BASE, SYSCON_LENGTH);
    50		if (syscon == NULL) {
    51			pr_err("Failed to map SYSCON\n");
    52			return;
    53		}
    54		ncpus = (readl(syscon + SYSCON_CPU_CTRL) >> 8) & 0xff;
    55		if (ncpus < 2)
    56			goto out;
    57	
    58		smp_ops = &microwatt_smp_ops;
    59	
    60		/*
    61		 * Write two instructions at location 0:
    62		 * mfspr r3, PIR
    63		 * b __secondary_hold
    64		 */
    65		*(unsigned int *)KERNELBASE = PPC_RAW_MFSPR(3, SPRN_PIR);
    66		*(unsigned int *)(KERNELBASE+4) = PPC_RAW_BRANCH(&__secondary_hold - (char *)(KERNELBASE+4));
    67	
    68		/* enable the other CPUs, they start at location 0 */
    69		writel((1ul << ncpus) - 1, syscon + SYSCON_CPU_CTRL);
    70	
    71		timeout = 10000;
    72		while (!__secondary_hold_acknowledge) {
    73			if (--timeout == 0)
    74				break;
    75			barrier();
    76		}
    77	
    78	 out:
  > 79		early_iounmap((void *)syscon, SYSCON_LENGTH);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ