arch/sh/kernel/ftrace.c:368:17: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot
Date: Wed Feb 17 2021 - 01:15:32 EST


Hi Luc,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 6 months ago
config: sh-randconfig-s032-20210217 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


"sparse warnings: (new ones prefixed by >>)"
>> arch/sh/kernel/ftrace.c:368:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long *parent @@
arch/sh/kernel/ftrace.c:368:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:368:17: sparse: got unsigned long *parent
--
>> arch/sh/kernel/cpu/sh3/serial-sh7720.c:16:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:16:32: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:16:32: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:17:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:17:25: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:17:25: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:20:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:20:32: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:20:32: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:21:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:21:25: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:21:25: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:26:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:26:32: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:26:32: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:27:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:27:25: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:27:25: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:30:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:30:32: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:30:32: sparse: got unsigned long
arch/sh/kernel/cpu/sh3/serial-sh7720.c:31:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/kernel/cpu/sh3/serial-sh7720.c:31:25: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/serial-sh7720.c:31:25: sparse: got unsigned long
--
>> arch/sh/boards/board-magicpanelr2.c:39:13: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:39:13: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:39:13: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:44:21: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:44:21: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:44:21: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:54:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:59:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:66:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:66:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:66:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:68:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:68:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:68:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:72:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:72:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:72:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:74:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:74:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:74:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:78:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:78:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:78:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:80:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:80:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:80:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:84:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:84:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:84:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:86:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:86:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:86:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:90:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:90:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:90:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:92:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:92:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:92:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:100:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:100:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:100:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:105:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:105:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:105:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:110:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:110:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:110:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:115:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:115:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:115:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:120:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:120:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:120:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:125:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:125:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:125:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:130:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:130:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:130:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:135:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:135:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:135:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:140:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:140:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:140:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:145:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:145:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:145:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:150:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:150:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:150:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:156:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:164:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:164:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:164:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:173:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:173:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:173:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:174:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:174:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:174:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:191:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:191:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:191:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:196:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:196:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/boards/board-magicpanelr2.c:196:9: sparse: got unsigned long
arch/sh/boards/board-magicpanelr2.c:201:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long @@
arch/sh/boards/board-magicpanelr2.c:201:9: sparse: expected void const volatile [noderef] __iomem *ptr
--
>> drivers/mmc/host/dw_mmc.c:602:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/mmc/host/dw_mmc.c:602:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:602:29: sparse: got unsigned int *
>> drivers/mmc/host/dw_mmc.c:602:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/mmc/host/dw_mmc.c:602:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:602:29: sparse: got unsigned int *
drivers/mmc/host/dw_mmc.c:615:25: sparse: sparse: restricted __le32 degrades to integer
drivers/mmc/host/dw_mmc.c:615:25: sparse: sparse: restricted __le32 degrades to integer
>> drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/mmc/host/dw_mmc.c:674:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:674:29: sparse: got restricted __le32 *
drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: restricted __le32 degrades to integer
>> drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/mmc/host/dw_mmc.c:674:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:674:29: sparse: got restricted __le32 *
drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: restricted __le32 degrades to integer
--
drivers/vhost/vringh.c:567:18: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected restricted __virtio16 const *__gu_addr @@ got restricted __virtio16 [noderef] [usertype] __user * @@
drivers/vhost/vringh.c:567:18: sparse: expected restricted __virtio16 const *__gu_addr
drivers/vhost/vringh.c:567:18: sparse: got restricted __virtio16 [noderef] [usertype] __user *
>> drivers/vhost/vringh.c:567:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got restricted __virtio16 const *__gu_addr @@
drivers/vhost/vringh.c:567:18: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/vringh.c:567:18: sparse: got restricted __virtio16 const *__gu_addr
--
>> drivers/soc/qcom/smp2p.c:218:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int [usertype] *value @@
drivers/soc/qcom/smp2p.c:218:23: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/soc/qcom/smp2p.c:218:23: sparse: got unsigned int [usertype] *value
drivers/soc/qcom/smp2p.c:325:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int [usertype] *value @@
drivers/soc/qcom/smp2p.c:325:22: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/soc/qcom/smp2p.c:325:22: sparse: got unsigned int [usertype] *value
drivers/soc/qcom/smp2p.c:328:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int [usertype] *value @@
drivers/soc/qcom/smp2p.c:328:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/soc/qcom/smp2p.c:328:9: sparse: got unsigned int [usertype] *value
--
drivers/watchdog/pcwd_usb.c:375:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gu_addr @@ got char const [noderef] __user * @@
drivers/watchdog/pcwd_usb.c:375:37: sparse: expected char const *__gu_addr
drivers/watchdog/pcwd_usb.c:375:37: sparse: got char const [noderef] __user *
>> drivers/watchdog/pcwd_usb.c:375:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char const *__gu_addr @@
drivers/watchdog/pcwd_usb.c:375:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:375:37: sparse: got char const *__gu_addr
drivers/watchdog/pcwd_usb.c:423:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/pcwd_usb.c:423:21: sparse: expected int const *__gu_addr
drivers/watchdog/pcwd_usb.c:423:21: sparse: got int [noderef] __user *p
>> drivers/watchdog/pcwd_usb.c:423:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/pcwd_usb.c:423:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:423:21: sparse: got int const *__gu_addr
drivers/watchdog/pcwd_usb.c:447:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/pcwd_usb.c:447:21: sparse: expected int const *__gu_addr
drivers/watchdog/pcwd_usb.c:447:21: sparse: got int [noderef] __user *p
drivers/watchdog/pcwd_usb.c:447:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/pcwd_usb.c:447:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:447:21: sparse: got int const *__gu_addr
--
drivers/watchdog/mv64x60_wdt.c:163:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gu_addr @@ got char const [noderef] __user * @@
drivers/watchdog/mv64x60_wdt.c:163:37: sparse: expected char const *__gu_addr
drivers/watchdog/mv64x60_wdt.c:163:37: sparse: got char const [noderef] __user *
>> drivers/watchdog/mv64x60_wdt.c:163:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char const *__gu_addr @@
drivers/watchdog/mv64x60_wdt.c:163:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/mv64x60_wdt.c:163:37: sparse: got char const *__gu_addr
drivers/watchdog/mv64x60_wdt.c:206:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/watchdog/mv64x60_wdt.c:206:21: sparse: expected int const *__gu_addr
drivers/watchdog/mv64x60_wdt.c:206:21: sparse: got int [noderef] __user *
>> drivers/watchdog/mv64x60_wdt.c:206:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/mv64x60_wdt.c:206:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/mv64x60_wdt.c:206:21: sparse: got int const *__gu_addr
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: expected int const *__gu_addr
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: got int [noderef] __user *
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/mv64x60_wdt.c:222:21: sparse: got int const *__gu_addr

vim +368 arch/sh/kernel/ftrace.c

327933f5d6cdf0 Matt Fleming 2009-07-11 303
327933f5d6cdf0 Matt Fleming 2009-07-11 304 /*
327933f5d6cdf0 Matt Fleming 2009-07-11 305 * Hook the return address and push it in the stack of return addrs
327933f5d6cdf0 Matt Fleming 2009-07-11 306 * in the current thread info.
327933f5d6cdf0 Matt Fleming 2009-07-11 307 *
327933f5d6cdf0 Matt Fleming 2009-07-11 308 * This is the main routine for the function graph tracer. The function
327933f5d6cdf0 Matt Fleming 2009-07-11 309 * graph tracer essentially works like this:
327933f5d6cdf0 Matt Fleming 2009-07-11 310 *
327933f5d6cdf0 Matt Fleming 2009-07-11 311 * parent is the stack address containing self_addr's return address.
327933f5d6cdf0 Matt Fleming 2009-07-11 312 * We pull the real return address out of parent and store it in
327933f5d6cdf0 Matt Fleming 2009-07-11 313 * current's ret_stack. Then, we replace the return address on the stack
327933f5d6cdf0 Matt Fleming 2009-07-11 314 * with the address of return_to_handler. self_addr is the function that
327933f5d6cdf0 Matt Fleming 2009-07-11 315 * called mcount.
327933f5d6cdf0 Matt Fleming 2009-07-11 316 *
327933f5d6cdf0 Matt Fleming 2009-07-11 317 * When self_addr returns, it will jump to return_to_handler which calls
327933f5d6cdf0 Matt Fleming 2009-07-11 318 * ftrace_return_to_handler. ftrace_return_to_handler will pull the real
327933f5d6cdf0 Matt Fleming 2009-07-11 319 * return address off of current's ret_stack and jump to it.
327933f5d6cdf0 Matt Fleming 2009-07-11 320 */
327933f5d6cdf0 Matt Fleming 2009-07-11 321 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
327933f5d6cdf0 Matt Fleming 2009-07-11 322 {
327933f5d6cdf0 Matt Fleming 2009-07-11 323 unsigned long old;
bc715ee4dbc5db Steven Rostedt (VMware 2018-11-18 324) int faulted;
327933f5d6cdf0 Matt Fleming 2009-07-11 325 unsigned long return_hooker = (unsigned long)&return_to_handler;
327933f5d6cdf0 Matt Fleming 2009-07-11 326
7fa322dba30ced Steven Rostedt (Red Hat 2014-06-25 327) if (unlikely(ftrace_graph_is_dead()))
7fa322dba30ced Steven Rostedt (Red Hat 2014-06-25 328) return;
7fa322dba30ced Steven Rostedt (Red Hat 2014-06-25 329)
327933f5d6cdf0 Matt Fleming 2009-07-11 330 if (unlikely(atomic_read(&current->tracing_graph_pause)))
327933f5d6cdf0 Matt Fleming 2009-07-11 331 return;
327933f5d6cdf0 Matt Fleming 2009-07-11 332
327933f5d6cdf0 Matt Fleming 2009-07-11 333 /*
327933f5d6cdf0 Matt Fleming 2009-07-11 334 * Protect against fault, even if it shouldn't
327933f5d6cdf0 Matt Fleming 2009-07-11 335 * happen. This tool is too much intrusive to
327933f5d6cdf0 Matt Fleming 2009-07-11 336 * ignore such a protection.
327933f5d6cdf0 Matt Fleming 2009-07-11 337 */
327933f5d6cdf0 Matt Fleming 2009-07-11 338 __asm__ __volatile__(
327933f5d6cdf0 Matt Fleming 2009-07-11 339 "1: \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 340 "mov.l @%2, %0 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 341 "2: \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 342 "mov.l %3, @%2 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 343 "mov #0, %1 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 344 "3: \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 345 ".section .fixup, \"ax\" \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 346 "4: \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 347 "mov.l 5f, %0 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 348 "jmp @%0 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 349 " mov #1, %1 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 350 ".balign 4 \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 351 "5: .long 3b \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 352 ".previous \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 353 ".section __ex_table,\"a\" \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 354 ".long 1b, 4b \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 355 ".long 2b, 4b \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 356 ".previous \n\t"
327933f5d6cdf0 Matt Fleming 2009-07-11 357 : "=&r" (old), "=r" (faulted)
327933f5d6cdf0 Matt Fleming 2009-07-11 358 : "r" (parent), "r" (return_hooker)
327933f5d6cdf0 Matt Fleming 2009-07-11 359 );
327933f5d6cdf0 Matt Fleming 2009-07-11 360
327933f5d6cdf0 Matt Fleming 2009-07-11 361 if (unlikely(faulted)) {
327933f5d6cdf0 Matt Fleming 2009-07-11 362 ftrace_graph_stop();
327933f5d6cdf0 Matt Fleming 2009-07-11 363 WARN_ON(1);
327933f5d6cdf0 Matt Fleming 2009-07-11 364 return;
327933f5d6cdf0 Matt Fleming 2009-07-11 365 }
327933f5d6cdf0 Matt Fleming 2009-07-11 366
bc715ee4dbc5db Steven Rostedt (VMware 2018-11-18 367) if (function_graph_enter(old, self_addr, 0, NULL))
327933f5d6cdf0 Matt Fleming 2009-07-11 @368 __raw_writel(old, parent);

:::::: The code at line 368 was first introduced by commit
:::::: 327933f5d6cdf083284d3c06e0370d1de464aef4 sh: Function graph tracer support

:::::: TO: Matt Fleming <matt@xxxxxxxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip