[chanwoo:devfreq-testing 37/37] drivers//devfreq/devfreq.c:1176:16: error: redefinition of 'name_show'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head: c91d2f8bcd6c70d4b540413df8405ed64fa6fa99
commit: c91d2f8bcd6c70d4b540413df8405ed64fa6fa99 [37/37] PM / devfreq: Change time stats to 64-bit
config: x86_64-rhel (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
git checkout c91d2f8bcd6c70d4b540413df8405ed64fa6fa99
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers//devfreq/devfreq.c:1176:16: error: redefinition of 'name_show'
static ssize_t name_show(struct device *dev,
^~~~~~~~~
drivers//devfreq/devfreq.c:1168:16: note: previous definition of 'name_show' was here
static ssize_t name_show(struct device *dev,
^~~~~~~~~
In file included from include/linux/devfreq.h:13:0,
from drivers//devfreq/devfreq.c:20:
>> include/linux/device.h:839:26: error: redefinition of 'dev_attr_name'
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers//devfreq/devfreq.c:1182:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
include/linux/device.h:839:26: note: previous definition of 'dev_attr_name' was here
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers//devfreq/devfreq.c:1174:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
include/linux/device.h:839:26: warning: 'dev_attr_name' defined but not used [-Wunused-variable]
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers//devfreq/devfreq.c:1174:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
--
drivers/devfreq/devfreq.c:1176:16: error: redefinition of 'name_show'
static ssize_t name_show(struct device *dev,
^~~~~~~~~
drivers/devfreq/devfreq.c:1168:16: note: previous definition of 'name_show' was here
static ssize_t name_show(struct device *dev,
^~~~~~~~~
In file included from include/linux/devfreq.h:13:0,
from drivers/devfreq/devfreq.c:20:
>> include/linux/device.h:839:26: error: redefinition of 'dev_attr_name'
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers/devfreq/devfreq.c:1182:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
include/linux/device.h:839:26: note: previous definition of 'dev_attr_name' was here
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers/devfreq/devfreq.c:1174:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
include/linux/device.h:839:26: warning: 'dev_attr_name' defined but not used [-Wunused-variable]
struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
^
drivers/devfreq/devfreq.c:1174:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(name);
^~~~~~~~~~~~~~
vim +/name_show +1176 drivers//devfreq/devfreq.c
1175
> 1176 static ssize_t name_show(struct device *dev,
1177 struct device_attribute *attr, char *buf)
1178 {
1179 struct devfreq *devfreq = to_devfreq(dev);
1180 return sprintf(buf, "%s\n", dev_name(devfreq->dev.parent));
1181 }
1182 static DEVICE_ATTR_RO(name);
1183
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[thierryreding:for-5.6/nouveau 117/138] drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
by kbuild test robot
tree: https://github.com/thierryreding/linux for-5.6/nouveau
head: 3a536588f14e8684b2d6b6257dfa1d8f6f88becd
commit: f465e8eba396ce6a62067718135cc29644029964 [117/138] dma-buf: Remove kernel map/unmap hooks
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f465e8eba396ce6a62067718135cc29644029964
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
.map = kmap_udmabuf,
^~~
mmap
>> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.map = kmap_udmabuf,
^~~~~~~~~~~~
drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
>> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
.unmap = kunmap_udmabuf,
^~~~~
vunmap
drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.unmap = kunmap_udmabuf,
^~~~~~~~~~~~~~
drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
cc1: some warnings being treated as errors
vim +114 drivers/dma-buf/udmabuf.c
fbb0de79507819 Gerd Hoffmann 2018-08-27 109
a34852891ba45d Gerd Hoffmann 2018-09-11 110 static const struct dma_buf_ops udmabuf_ops = {
fbb0de79507819 Gerd Hoffmann 2018-08-27 111 .map_dma_buf = map_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 112 .unmap_dma_buf = unmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 113 .release = release_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 @114 .map = kmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 @115 .unmap = kunmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 116 .mmap = mmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 117 };
fbb0de79507819 Gerd Hoffmann 2018-08-27 118
:::::: The code at line 114 was first introduced by commit
:::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device
:::::: TO: Gerd Hoffmann <kraxel(a)redhat.com>
:::::: CC: Gerd Hoffmann <kraxel(a)redhat.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[frank-w-bpi-r2-4.14:5.4-main 15/35] drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.h:24:10: fatal error: osal.h: No such file or directory
by kbuild test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.4-main
head: 098c6d4673ddec4c110921f42437239ecb572a2e
commit: 150d20543d310454e1e2534bb0df253d21fdf9d4 [15/35] mt6625l: try to fix wakeup_source_prepare build-error
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 150d20543d310454e1e2534bb0df253d21fdf9d4
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.c:15:0:
>> drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.h:24:10: fatal error: osal.h: No such file or directory
#include "osal.h"
^~~~~~~~
compilation terminated.
vim +24 drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.h
d949597be4949e Frank Wunderlich 2019-10-04 17
d949597be4949e Frank Wunderlich 2019-10-04 18 #include <linux/of.h>
d949597be4949e Frank Wunderlich 2019-10-04 19 #include <linux/of_gpio.h>
d949597be4949e Frank Wunderlich 2019-10-04 20 #include <linux/pinctrl/consumer.h>
d949597be4949e Frank Wunderlich 2019-10-04 21 #include <linux/pinctrl/pinctrl.h>
d949597be4949e Frank Wunderlich 2019-10-04 22 #include <linux/gpio.h>
d949597be4949e Frank Wunderlich 2019-10-04 23 #include <linux/platform_device.h>
d949597be4949e Frank Wunderlich 2019-10-04 @24 #include "osal.h"
d949597be4949e Frank Wunderlich 2019-10-04 25
:::::: The code at line 24 was first introduced by commit
:::::: d949597be4949eaf35694edf9d8271fc5bceffa5 mt6625l: add driver-folder from 5.3
:::::: TO: Frank Wunderlich <frank-w(a)public-files.de>
:::::: CC: Frank Wunderlich <frank-w(a)public-files.de>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[sashal-linux-stable:queue-4.19 276/309] include/linux/compiler.h:348:38: error: call to '__compiletime_assert_192' declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.19
head: 4b01732de5278618d8b013fa300638742392d507
commit: 78d05b0360dd6e0b3a12d1183ce109ea8e05d24c [276/309] x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise
config: i386-randconfig-d001-20191129 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
git checkout 78d05b0360dd6e0b3a12d1183ce109ea8e05d24c
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:51,
from arch/x86/mm/cpu_entry_area.c:3:
In function 'setup_cpu_entry_area_ptes',
inlined from 'setup_cpu_entry_areas' at arch/x86/mm/cpu_entry_area.c:209:2:
>> include/linux/compiler.h:348:38: error: call to '__compiletime_assert_192' declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:329:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:348:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
arch/x86/mm/cpu_entry_area.c:192:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON((CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE);
^~~~~~~~~~~~
--
In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:51,
from arch/x86//mm/cpu_entry_area.c:3:
In function 'setup_cpu_entry_area_ptes',
inlined from 'setup_cpu_entry_areas' at arch/x86//mm/cpu_entry_area.c:209:2:
>> include/linux/compiler.h:348:38: error: call to '__compiletime_assert_192' declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:329:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:348:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:69:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
arch/x86//mm/cpu_entry_area.c:192:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON((CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE);
^~~~~~~~~~~~
vim +/__compiletime_assert_192 +348 include/linux/compiler.h
9a8ab1c39970a4 Daniel Santos 2013-02-21 334
9a8ab1c39970a4 Daniel Santos 2013-02-21 335 #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 336 __compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c39970a4 Daniel Santos 2013-02-21 337
9a8ab1c39970a4 Daniel Santos 2013-02-21 338 /**
9a8ab1c39970a4 Daniel Santos 2013-02-21 339 * compiletime_assert - break build and emit msg if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 340 * @condition: a compile-time constant condition to check
9a8ab1c39970a4 Daniel Santos 2013-02-21 341 * @msg: a message to emit if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 342 *
9a8ab1c39970a4 Daniel Santos 2013-02-21 343 * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 344 * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 345 * compiler has support to do so.
9a8ab1c39970a4 Daniel Santos 2013-02-21 346 */
9a8ab1c39970a4 Daniel Santos 2013-02-21 347 #define compiletime_assert(condition, msg) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 @348 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c39970a4 Daniel Santos 2013-02-21 349
:::::: The code at line 348 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
:::::: TO: Daniel Santos <daniel.santos(a)pobox.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[rcar:gmsl/dev 7/55] drivers/media/usb/au0828/au0828-core.c:504:26: error: passing argument 1 of '__media_pipeline_stop' from incompatible pointer type
by kbuild test robot
Hi Sakari,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 01c61f2df5d4db5bedbef75a11e7446163251cc9
commit: 2ca7a690da53c1fd40d4c52ae5d5603db8947cb5 [7/55] media: entity: Use pad as the starting point for a pipeline
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
git checkout 2ca7a690da53c1fd40d4c52ae5d5603db8947cb5
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/media/usb/au0828/au0828-core.c: In function 'au0828_disable_source':
>> drivers/media/usb/au0828/au0828-core.c:504:26: error: passing argument 1 of '__media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
__media_pipeline_stop(dev->active_link_owner);
^~~
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/usb/au0828/au0828.h:18,
from drivers/media/usb/au0828/au0828-core.c:8:
include/media/media-entity.h:980:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void __media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~~~
>> drivers/media/usb/au0828/au0828-core.c:509:6: error: passing argument 1 of '__media_pipeline_start' from incompatible pointer type [-Werror=incompatible-pointer-types]
dev->active_link_user,
^~~
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/usb/au0828/au0828.h:18,
from drivers/media/usb/au0828/au0828-core.c:8:
include/media/media-entity.h:957:18: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
__must_check int __media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/stm32/stm32-dcmi.c: In function 'dcmi_start_streaming':
>> drivers/media/platform/stm32/stm32-dcmi.c:739:29: error: passing argument 1 of 'media_pipeline_start' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = media_pipeline_start(&dcmi->vdev->entity, &dcmi->pipeline);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/stm32/stm32-dcmi.c:836:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&dcmi->vdev->entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/stm32/stm32-dcmi.c: In function 'dcmi_stop_streaming':
drivers/media/platform/stm32/stm32-dcmi.c:864:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&dcmi->vdev->entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c: In function 'sun4i_csi_start_streaming':
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:269:29: error: passing argument 1 of 'media_pipeline_start' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = media_pipeline_start(&csi->vdev.entity, &csi->vdev.pipe);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:325:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&csi->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c: In function 'sun4i_csi_stop_streaming':
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:354:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&csi->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c: In function 'sun6i_video_start_streaming':
>> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:144:29: error: passing argument 1 of 'media_pipeline_start' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = media_pipeline_start(&video->vdev.entity, &video->vdev.pipe);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:208:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&video->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c: In function 'sun6i_video_stop_streaming':
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:232:22: error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types]
media_pipeline_stop(&video->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__media_pipeline_stop +504 drivers/media/usb/au0828/au0828-core.c
c94903f1f7cc76 Shuah Khan 2016-02-11 440
90cd366bc61cd5 Shuah Khan 2016-11-29 441 /* Callers should hold graph_mutex */
c94903f1f7cc76 Shuah Khan 2016-02-11 442 static void au0828_disable_source(struct media_entity *entity)
c94903f1f7cc76 Shuah Khan 2016-02-11 443 {
c94903f1f7cc76 Shuah Khan 2016-02-11 444 int ret = 0;
c94903f1f7cc76 Shuah Khan 2016-02-11 445 struct media_device *mdev = entity->graph_obj.mdev;
c94903f1f7cc76 Shuah Khan 2016-02-11 446 struct au0828_dev *dev;
c94903f1f7cc76 Shuah Khan 2016-02-11 447
c94903f1f7cc76 Shuah Khan 2016-02-11 448 if (!mdev)
c94903f1f7cc76 Shuah Khan 2016-02-11 449 return;
c94903f1f7cc76 Shuah Khan 2016-02-11 450
c94903f1f7cc76 Shuah Khan 2016-02-11 451 dev = mdev->source_priv;
c94903f1f7cc76 Shuah Khan 2016-02-11 452
90cd366bc61cd5 Shuah Khan 2016-11-29 453 if (!dev->active_link)
90cd366bc61cd5 Shuah Khan 2016-11-29 454 return;
c94903f1f7cc76 Shuah Khan 2016-02-11 455
383b0e5b6ebb08 Shuah Khan 2019-04-01 456 /* link is active - stop pipeline from source
383b0e5b6ebb08 Shuah Khan 2019-04-01 457 * (tuner/s-video/Composite) to the entity
383b0e5b6ebb08 Shuah Khan 2019-04-01 458 * When DVB/s-video/Composite owns tuner, it won't be in
383b0e5b6ebb08 Shuah Khan 2019-04-01 459 * shared state.
383b0e5b6ebb08 Shuah Khan 2019-04-01 460 */
c94903f1f7cc76 Shuah Khan 2016-02-11 461 if (dev->active_link->sink->entity == dev->active_sink &&
c94903f1f7cc76 Shuah Khan 2016-02-11 462 dev->active_link->source->entity == dev->active_source) {
c94903f1f7cc76 Shuah Khan 2016-02-11 463 /*
383b0e5b6ebb08 Shuah Khan 2019-04-01 464 * Prevent video from deactivating link when audio
383b0e5b6ebb08 Shuah Khan 2019-04-01 465 * has active pipeline and vice versa. In addition
383b0e5b6ebb08 Shuah Khan 2019-04-01 466 * handle the case when more than one video/vbi
383b0e5b6ebb08 Shuah Khan 2019-04-01 467 * application is sharing the link.
c94903f1f7cc76 Shuah Khan 2016-02-11 468 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 469 bool owner_is_audio = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 470
383b0e5b6ebb08 Shuah Khan 2019-04-01 471 if (dev->active_link_owner->function ==
383b0e5b6ebb08 Shuah Khan 2019-04-01 472 MEDIA_ENT_F_AUDIO_CAPTURE)
383b0e5b6ebb08 Shuah Khan 2019-04-01 473 owner_is_audio = true;
383b0e5b6ebb08 Shuah Khan 2019-04-01 474
383b0e5b6ebb08 Shuah Khan 2019-04-01 475 if (dev->active_link_shared) {
383b0e5b6ebb08 Shuah Khan 2019-04-01 476 pr_debug("Shared link owner %s user %s %d\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 477 dev->active_link_owner->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 478 entity->name, dev->users);
383b0e5b6ebb08 Shuah Khan 2019-04-01 479
383b0e5b6ebb08 Shuah Khan 2019-04-01 480 /* Handle video device users > 1
383b0e5b6ebb08 Shuah Khan 2019-04-01 481 * When audio owns the shared link with
383b0e5b6ebb08 Shuah Khan 2019-04-01 482 * more than one video users, avoid
383b0e5b6ebb08 Shuah Khan 2019-04-01 483 * disabling the source and/or switching
383b0e5b6ebb08 Shuah Khan 2019-04-01 484 * the owner until the last disable_source
383b0e5b6ebb08 Shuah Khan 2019-04-01 485 * call from video _close(). Use dev->users to
383b0e5b6ebb08 Shuah Khan 2019-04-01 486 * determine when to switch/disable.
383b0e5b6ebb08 Shuah Khan 2019-04-01 487 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 488 if (dev->active_link_owner != entity) {
383b0e5b6ebb08 Shuah Khan 2019-04-01 489 /* video device has users > 1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 490 if (owner_is_audio && dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 491 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 492
383b0e5b6ebb08 Shuah Khan 2019-04-01 493 dev->active_link_user = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 494 dev->active_link_user_pipe = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 495 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 496 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 497 }
383b0e5b6ebb08 Shuah Khan 2019-04-01 498
383b0e5b6ebb08 Shuah Khan 2019-04-01 499 /* video owns the link and has users > 1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 500 if (!owner_is_audio && dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 501 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 502
383b0e5b6ebb08 Shuah Khan 2019-04-01 503 /* stop pipeline */
383b0e5b6ebb08 Shuah Khan 2019-04-01 @504 __media_pipeline_stop(dev->active_link_owner);
383b0e5b6ebb08 Shuah Khan 2019-04-01 505 pr_debug("Pipeline stop for %s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 506 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 507
383b0e5b6ebb08 Shuah Khan 2019-04-01 508 ret = __media_pipeline_start(
383b0e5b6ebb08 Shuah Khan 2019-04-01 @509 dev->active_link_user,
383b0e5b6ebb08 Shuah Khan 2019-04-01 510 dev->active_link_user_pipe);
383b0e5b6ebb08 Shuah Khan 2019-04-01 511 if (ret) {
383b0e5b6ebb08 Shuah Khan 2019-04-01 512 pr_err("Start Pipeline: %s->%s %d\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 513 dev->active_source->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 514 dev->active_link_user->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 515 ret);
383b0e5b6ebb08 Shuah Khan 2019-04-01 516 goto deactivate_link;
383b0e5b6ebb08 Shuah Khan 2019-04-01 517 }
383b0e5b6ebb08 Shuah Khan 2019-04-01 518 /* link user is now the owner */
383b0e5b6ebb08 Shuah Khan 2019-04-01 519 dev->active_link_owner = dev->active_link_user;
383b0e5b6ebb08 Shuah Khan 2019-04-01 520 dev->active_link_user = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 521 dev->active_link_user_pipe = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 522 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 523
383b0e5b6ebb08 Shuah Khan 2019-04-01 524 pr_debug("Pipeline started for %s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 525 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 526 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 527 } else if (!owner_is_audio && dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 528 /* video/vbi owns the link and has users > 1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 529 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 530
c94903f1f7cc76 Shuah Khan 2016-02-11 531 if (dev->active_link_owner != entity)
90cd366bc61cd5 Shuah Khan 2016-11-29 532 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 533
383b0e5b6ebb08 Shuah Khan 2019-04-01 534 /* stop pipeline */
2ca7a690da53c1 Sakari Ailus 2016-11-21 535 __media_pipeline_stop(dev->active_link_owner->pads);
383b0e5b6ebb08 Shuah Khan 2019-04-01 536 pr_debug("Pipeline stop for %s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 537 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 538
383b0e5b6ebb08 Shuah Khan 2019-04-01 539 deactivate_link:
c94903f1f7cc76 Shuah Khan 2016-02-11 540 ret = __media_entity_setup_link(dev->active_link, 0);
c94903f1f7cc76 Shuah Khan 2016-02-11 541 if (ret)
c94903f1f7cc76 Shuah Khan 2016-02-11 542 pr_err("Deactivate link Error %d\n", ret);
c94903f1f7cc76 Shuah Khan 2016-02-11 543
383b0e5b6ebb08 Shuah Khan 2019-04-01 544 pr_info("Disabled Source: %s->%s->%s Ret %d\n",
c94903f1f7cc76 Shuah Khan 2016-02-11 545 dev->active_source->name, dev->active_sink->name,
c94903f1f7cc76 Shuah Khan 2016-02-11 546 dev->active_link_owner->name, ret);
c94903f1f7cc76 Shuah Khan 2016-02-11 547
c94903f1f7cc76 Shuah Khan 2016-02-11 548 dev->active_link = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 549 dev->active_link_owner = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 550 dev->active_source = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 551 dev->active_sink = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 552 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 553 dev->active_link_user = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 554 }
c94903f1f7cc76 Shuah Khan 2016-02-11 555 }
0a82edd011f5cd Arnd Bergmann 2016-03-04 556 #endif
c94903f1f7cc76 Shuah Khan 2016-02-11 557
:::::: The code at line 504 was first introduced by commit
:::::: 383b0e5b6ebb087bde22fbb5fcd9d567c5dbdb92 media: au0828: fix enable and disable source audio and video inconsistencies
:::::: TO: Shuah Khan <shuah(a)kernel.org>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[avpatel:riscv_kvm_v10 6/31] arch/riscv/kernel/sbi.c:214:12: error: 'SBI_EXT_TIME' undeclared; did you mean 'STA_PPSTIME'?
by kbuild test robot
tree: https://github.com/avpatel/linux.git riscv_kvm_v10
head: adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: 522547d7acac1b1d65bb7567415ea038ba02381d [6/31] RISC-V: Implement new SBI v0.2 extensions
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 522547d7acac1b1d65bb7567415ea038ba02381d
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function '__sbi_send_ipi_dummy_warn':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:71:2: note: in expansion of macro 'pr_warn'
pr_warn("IPI extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:71:52: note: format string is defined here
pr_warn("IPI extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:71:2: note: in expansion of macro 'pr_warn'
pr_warn("IPI extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:71:56: note: format string is defined here
pr_warn("IPI extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function '__sbi_rfence_dummy_warn':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:61: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:65: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
arch/riscv/kernel/sbi.c: In function '__sbi_set_timer_v02':
>> arch/riscv/kernel/sbi.c:214:12: error: 'SBI_EXT_TIME' undeclared (first use in this function); did you mean 'STA_PPSTIME'?
sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
^~~~~~~~~~~~
STA_PPSTIME
>> arch/riscv/kernel/sbi.c:214:26: error: 'SBI_EXT_TIME_SET_TIMER' undeclared (first use in this function); did you mean 'SBI_EXT_TIME'?
sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
^~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_TIME
arch/riscv/kernel/sbi.c: In function '__sbi_send_ipi_v02':
>> arch/riscv/kernel/sbi.c:222:9: error: variable 'ret' has initializer but incomplete type
struct sbiret ret = {0};
^~~~~~
arch/riscv/kernel/sbi.c:222:23: warning: excess elements in struct initializer
struct sbiret ret = {0};
^
arch/riscv/kernel/sbi.c:222:23: note: (near initialization for 'ret')
arch/riscv/kernel/sbi.c:222:16: error: storage size of 'ret' isn't known
struct sbiret ret = {0};
^~~
>> arch/riscv/kernel/sbi.c:230:18: error: 'SBI_EXT_IPI' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
^~~~~~~~~~~
arch/riscv/kernel/sbi.c:230:31: error: 'SBI_EXT_IPI_SEND_IPI' undeclared (first use in this function); did you mean 'SBI_EXT_IPI'?
ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
^~~~~~~~~~~~~~~~~~~~
SBI_EXT_IPI
arch/riscv/kernel/sbi.c:222:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c: In function '__sbi_rfence_v02':
arch/riscv/kernel/sbi.c:249:9: error: variable 'ret' has initializer but incomplete type
struct sbiret ret = {0};
^~~~~~
arch/riscv/kernel/sbi.c:249:23: warning: excess elements in struct initializer
struct sbiret ret = {0};
^
arch/riscv/kernel/sbi.c:249:23: note: (near initialization for 'ret')
arch/riscv/kernel/sbi.c:249:16: error: storage size of 'ret' isn't known
struct sbiret ret = {0};
^~~
>> arch/riscv/kernel/sbi.c:251:22: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
unsigned long ext = SBI_EXT_RFENCE;
^~~~~~~~~~~~~~
RISCV_FENCE
>> arch/riscv/kernel/sbi.c:259:7: error: 'SBI_EXT_RFENCE_REMOTE_FENCE_I' undeclared (first use in this function)
case SBI_EXT_RFENCE_REMOTE_FENCE_I:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:262:7: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_FENCE_I
>> arch/riscv/kernel/sbi.c:266:7: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
arch/riscv/kernel/sbi.c:271:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
arch/riscv/kernel/sbi.c:275:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c:279:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA
arch/riscv/kernel/sbi.c:283:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c:249:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_fence_i':
arch/riscv/kernel/sbi.c:335:15: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, SBI_EXT_RFENCE_REMOTE_FENCE_I,
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:335:43: error: 'SBI_EXT_RFENCE_REMOTE_FENCE_I' undeclared (first use in this function); did you mean 'SBI_EXT_0_1_REMOTE_FENCE_I'?
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, SBI_EXT_RFENCE_REMOTE_FENCE_I,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_FENCE_I
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
arch/riscv/kernel/sbi.c:353:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:354:8: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA' undeclared (first use in this function); did you mean 'SBI_EXT_0_1_REMOTE_SFENCE_VMA'?
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_SFENCE_VMA
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
arch/riscv/kernel/sbi.c:375:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:376:8: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function); did you mean 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID'?
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma':
arch/riscv/kernel/sbi.c:394:22: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
^~~~~~~~~~~~~~
RISCV_FENCE
>> arch/riscv/kernel/sbi.c:394:38: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA' undeclared (first use in this function)
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma_vmid':
arch/riscv/kernel/sbi.c:415:22: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE,
^~~~~~~~~~~~~~
RISCV_FENCE
>> arch/riscv/kernel/sbi.c:416:8: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID' undeclared (first use in this function)
SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma':
arch/riscv/kernel/sbi.c:434:22: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
^~~~~~~~~~~~~~
RISCV_FENCE
>> arch/riscv/kernel/sbi.c:434:38: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA' undeclared (first use in this function)
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma_asid':
arch/riscv/kernel/sbi.c:456:22: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE,
^~~~~~~~~~~~~~
RISCV_FENCE
>> arch/riscv/kernel/sbi.c:457:8: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID' undeclared (first use in this function)
SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
arch/riscv/kernel/sbi.c:470:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:472:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:472:32: error: 'SBI_BASE_PROBE_EXT' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:470:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:483:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:485:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:485:32: error: 'SBI_BASE_GET_SPEC_VERSION' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:483:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:495:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:497:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:497:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:495:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:507:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:509:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:509:32: error: 'SBI_BASE_GET_IMP_VERSION' undeclared (first use in this function); did you mean '__GXX_ABI_VERSION'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~
__GXX_ABI_VERSION
arch/riscv/kernel/sbi.c:507:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_power_off':
arch/riscv/kernel/sbi.c:519:2: error: implicit declaration of function 'sbi_shutdown' [-Werror=implicit-function-declaration]
sbi_shutdown();
^~~~~~~~~~~~
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function 'sbi_init':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:531:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:531:32: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:531:2: note: in expansion of macro 'pr_info'
vim +214 arch/riscv/kernel/sbi.c
75
76 static int __sbi_rfence_dummy_warn(unsigned long extid,
77 unsigned long fid,
78 const unsigned long *hart_mask,
79 unsigned long hbase, unsigned long start,
80 unsigned long size, unsigned long arg4,
81 unsigned long arg5)
82 {
> 83 pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
84 sbi_major_version(), sbi_minor_version());
85 return 0;
86 }
87
88 #ifdef CONFIG_RISCV_SBI_V01
89 /**
90 * sbi_console_putchar() - Writes given character to the console device.
91 * @ch: The data to be written to the console.
92 *
93 * Return: None
94 */
95 void sbi_console_putchar(int ch)
96 {
97 sbi_ecall(SBI_EXT_0_1_CONSOLE_PUTCHAR, 0, ch, 0, 0, 0, 0, 0);
98 }
99 EXPORT_SYMBOL(sbi_console_putchar);
100
101 /**
102 * sbi_console_getchar() - Reads a byte from console device.
103 *
104 * Returns the value read from console.
105 */
106 int sbi_console_getchar(void)
107 {
108 struct sbiret ret;
109
110 ret = sbi_ecall(SBI_EXT_0_1_CONSOLE_GETCHAR, 0, 0, 0, 0, 0, 0, 0);
111
112 return ret.error;
113 }
114 EXPORT_SYMBOL(sbi_console_getchar);
115
116 /**
117 * sbi_shutdown() - Remove all the harts from executing supervisor code.
118 *
119 * Return: None
120 */
121 void sbi_shutdown(void)
122 {
123 sbi_ecall(SBI_EXT_0_1_SHUTDOWN, 0, 0, 0, 0, 0, 0, 0);
124 }
125 EXPORT_SYMBOL(sbi_set_timer);
126
127 /**
128 * sbi_clear_ipi() - Clear any pending IPIs for the calling hart.
129 *
130 * Return: None
131 */
132 void sbi_clear_ipi(void)
133 {
134 sbi_ecall(SBI_EXT_0_1_CLEAR_IPI, 0, 0, 0, 0, 0, 0, 0);
135 }
136 EXPORT_SYMBOL(sbi_shutdown);
137
138 /**
139 * sbi_set_timer_v01() - Program the timer for next timer event.
140 * @stime_value: The value after which next timer event should fire.
141 *
142 * Return: None
143 */
144 static void __sbi_set_timer_v01(uint64_t stime_value)
145 {
146 #if __riscv_xlen == 32
147 sbi_ecall(SBI_EXT_0_1_SET_TIMER, 0, stime_value,
148 stime_value >> 32, 0, 0, 0, 0);
149 #else
150 sbi_ecall(SBI_EXT_0_1_SET_TIMER, 0, stime_value, 0, 0, 0, 0, 0);
151 #endif
152 }
153
154 static int __sbi_send_ipi_v01(const unsigned long *hart_mask)
155 {
156 sbi_ecall(SBI_EXT_0_1_SEND_IPI, 0, (unsigned long)hart_mask,
157 0, 0, 0, 0, 0);
158 return 0;
159 }
160
161 static int __sbi_rfence_v01(unsigned long ext, unsigned long fid,
162 const unsigned long *hart_mask,
163 unsigned long hbase, unsigned long start,
164 unsigned long size, unsigned long arg4,
165 unsigned long arg5)
166 {
167 switch (ext) {
168 case SBI_EXT_0_1_REMOTE_FENCE_I:
169 sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
170 (unsigned long)hart_mask, 0, 0, 0, 0, 0);
171 break;
172 case SBI_EXT_0_1_REMOTE_SFENCE_VMA:
173 sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
174 (unsigned long)hart_mask, start, size,
175 0, 0, 0);
176 break;
177 case SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID:
178 sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
179 (unsigned long)hart_mask, start, size,
180 arg4, 0, 0);
181 break;
182 default:
183 pr_err("extid [%lu]not supported in SBI v0.1\n", ext);
184 }
185
186 return 0;
187 }
188 #else
189 static void __sbi_set_timer_v01(uint64_t stime_value)
190 {
191 __sbi_set_timer_dummy_warn(0);
192 }
193 static int __sbi_send_ipi_v01(const unsigned long *hart_mask)
194 {
195 return __sbi_send_ipi_dummy_warn(NULL);
196 }
197 static int __sbi_rfence_v01(unsigned long ext, unsigned long fid,
198 const unsigned long *hart_mask,
199 unsigned long hbase, unsigned long start,
200 unsigned long size, unsigned long arg4,
201 unsigned long arg5)
202 {
203 return __sbi_rfence_dummy_warn(0, 0, 0, 0, 0, 0, 0, 0);
204
205 }
206 #endif /* CONFIG_RISCV_SBI_V01 */
207
208 static void __sbi_set_timer_v02(uint64_t stime_value)
209 {
210 #if __riscv_xlen == 32
211 sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value,
212 stime_value >> 32, 0, 0, 0, 0);
213 #else
> 214 sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
215 0, 0, 0, 0);
216 #endif
217 }
218
219 static int __sbi_send_ipi_v02(const unsigned long *hart_mask)
220 {
221 unsigned long hmask_val;
> 222 struct sbiret ret = {0};
223 int result;
224
225 if (!hart_mask)
226 hmask_val = *(cpumask_bits(cpu_online_mask));
227 else
228 hmask_val = *hart_mask;
229
> 230 ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
231 0, 0, 0, 0, 0);
232 if (ret.error) {
233 pr_err("%s: failed with error [%d]\n", __func__,
234 sbi_err_map_linux_errno(ret.error));
235 result = ret.error;
236 } else
237 result = ret.value;
238
239 return result;
240 }
241
242 static int __sbi_rfence_v02(unsigned long extid, unsigned long fid,
243 const unsigned long *hart_mask,
244 unsigned long hbase, unsigned long start,
245 unsigned long size, unsigned long arg4,
246 unsigned long arg5)
247 {
248 unsigned long hmask_val;
> 249 struct sbiret ret = {0};
250 int result;
> 251 unsigned long ext = SBI_EXT_RFENCE;
252
253 if (!hart_mask)
254 hmask_val = *(cpumask_bits(cpu_online_mask));
255 else
256 hmask_val = *hart_mask;
257
258 switch (fid) {
> 259 case SBI_EXT_RFENCE_REMOTE_FENCE_I:
260 ret = sbi_ecall(ext, fid, hmask_val, 0, 0, 0, 0, 0);
261 break;
> 262 case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
263 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
264 size, 0, 0);
265 break;
> 266 case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
267 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
268 size, arg4, 0);
269 break;
270 /*TODO: Handle non zero hbase cases */
271 case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA:
272 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
273 size, 0, 0);
274 break;
275 case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
276 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
277 size, arg4, 0);
278 break;
279 case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
280 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
281 size, 0, 0);
282 break;
283 case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
284 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
285 size, arg4, 0);
286 break;
287 default:
288 pr_err("unknown function ID [%lu] for SBI extension [%lu]\n",
289 fid, ext);
290 result = -EINVAL;
291 }
292
293 if (ret.error) {
294 pr_err("%s: failed with error [%d]\n", __func__,
295 sbi_err_map_linux_errno(ret.error));
296 result = ret.error;
297 } else
298 result = ret.value;
299
300 return result;
301 }
302
303 /**
304 * sbi_set_timer() - Program the timer for next timer event.
305 * @stime_value: The value after which next timer event should fire.
306 *
307 * Return: None
308 */
309 void sbi_set_timer(uint64_t stime_value)
310 {
311 __sbi_set_timer(stime_value);
312 }
313
314 /**
315 * sbi_send_ipi() - Send an IPI to any hart.
316 * @hart_mask: A cpu mask containing all the target harts.
317 *
318 * Return: None
319 */
320 void sbi_send_ipi(const unsigned long *hart_mask)
321 {
322 __sbi_send_ipi(hart_mask);
323 }
324 EXPORT_SYMBOL(sbi_send_ipi);
325
326
327 /**
328 * sbi_remote_fence_i() - Execute FENCE.I instruction on given remote harts.
329 * @hart_mask: A cpu mask containing all the target harts.
330 *
331 * Return: None
332 */
333 void sbi_remote_fence_i(const unsigned long *hart_mask)
334 {
> 335 __sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, SBI_EXT_RFENCE_REMOTE_FENCE_I,
336 hart_mask, 0, 0, 0, 0, 0);
337 }
338 EXPORT_SYMBOL(sbi_remote_fence_i);
339
340 /**
341 * sbi_remote_sfence_vma() - Execute SFENCE.VMA instructions on given remote
342 * harts for the specified virtual address range.
343 * @hart_mask: A cpu mask containing all the target harts.
344 * @start: Start of the virtual address
345 * @size: Total size of the virtual address range.
346 *
347 * Return: None
348 */
349 void sbi_remote_sfence_vma(const unsigned long *hart_mask,
350 unsigned long start,
351 unsigned long size)
352 {
353 __sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA,
354 SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
355 hart_mask, 0, start, size, 0, 0);
356 }
357 EXPORT_SYMBOL(sbi_remote_sfence_vma);
358
359 /**
360 * sbi_remote_sfence_vma_asid() - Execute SFENCE.VMA instructions on given
361 * remote harts for a virtual address range belonging to a specific ASID.
362 *
363 * @hart_mask: A cpu mask containing all the target harts.
364 * @start: Start of the virtual address
365 * @size: Total size of the virtual address range.
366 * @asid: The value of address space identifier (ASID).
367 *
368 * Return: None
369 */
370 void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask,
371 unsigned long start,
372 unsigned long size,
373 unsigned long asid)
374 {
375 __sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID,
> 376 SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
377 hart_mask, 0, start, size, asid, 0);
378 }
379 EXPORT_SYMBOL(sbi_remote_sfence_vma_asid);
380
381 /**
382 * sbi_remote_hfence_gvma() - Execute HFENCE.GVMA instructions on given remote
383 * harts for the specified guest physical address range.
384 * @hart_mask: A cpu mask containing all the target harts.
385 * @start: Start of the guest physical address
386 * @size: Total size of the guest physical address range.
387 *
388 * Return: None
389 */
390 int sbi_remote_hfence_gvma(const unsigned long *hart_mask,
391 unsigned long start,
392 unsigned long size)
393 {
> 394 return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
395 hart_mask, 0, start, size, 0, 0);
396 }
397 EXPORT_SYMBOL_GPL(sbi_remote_hfence_gvma);
398
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[avpatel:riscv_kvm_v10 5/31] arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown'
by kbuild test robot
tree: https://github.com/avpatel/linux.git riscv_kvm_v10
head: adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: ccdc1f5cf0b366a9a0600bfd4b5333f2fc8b7351 [5/31] RISC-V: Introduce a new config for SBI v0.1
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ccdc1f5cf0b366a9a0600bfd4b5333f2fc8b7351
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:61: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:65: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
arch/riscv/kernel/sbi.c: In function 'sbi_remote_fence_i':
arch/riscv/kernel/sbi.c:240:15: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
arch/riscv/kernel/sbi.c:258:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
arch/riscv/kernel/sbi.c:279:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
arch/riscv/kernel/sbi.c:292:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:294:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:294:32: error: 'SBI_BASE_PROBE_EXT' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:292:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:305:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:307:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:307:32: error: 'SBI_BASE_GET_SPEC_VERSION' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:305:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:317:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:319:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:319:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:317:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:329:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:331:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:331:32: error: 'SBI_BASE_GET_IMP_VERSION' undeclared (first use in this function); did you mean '__GXX_ABI_VERSION'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~
__GXX_ABI_VERSION
arch/riscv/kernel/sbi.c:329:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_power_off':
>> arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown' [-Werror=implicit-function-declaration]
sbi_shutdown();
^~~~~~~~~~~~
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function 'sbi_init':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:353:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:353:32: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:353:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:353:36: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
arch/riscv/kernel/sbi.c:356:7: error: implicit declaration of function 'sbi_spec_is_0_1' [-Werror=implicit-function-declaration]
if (!sbi_spec_is_0_1()) {
^~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:313:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:325:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:337:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/sbi_shutdown +341 arch/riscv/kernel/sbi.c
16e90702b40cf6 Atish Patra 2019-11-26 326
16e90702b40cf6 Atish Patra 2019-11-26 327 static long sbi_get_firmware_version(void)
16e90702b40cf6 Atish Patra 2019-11-26 328 {
16e90702b40cf6 Atish Patra 2019-11-26 329 struct sbiret ret;
16e90702b40cf6 Atish Patra 2019-11-26 330
16e90702b40cf6 Atish Patra 2019-11-26 @331 ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
16e90702b40cf6 Atish Patra 2019-11-26 332 0, 0, 0, 0, 0, 0);
16e90702b40cf6 Atish Patra 2019-11-26 333 if (!ret.error)
16e90702b40cf6 Atish Patra 2019-11-26 334 return ret.value;
16e90702b40cf6 Atish Patra 2019-11-26 335 else
16e90702b40cf6 Atish Patra 2019-11-26 336 return sbi_err_map_linux_errno(ret.error);
16e90702b40cf6 Atish Patra 2019-11-26 337 }
16e90702b40cf6 Atish Patra 2019-11-26 338
3320648ecc3819 Christoph Hellwig 2019-10-28 339 static void sbi_power_off(void)
3320648ecc3819 Christoph Hellwig 2019-10-28 340 {
3320648ecc3819 Christoph Hellwig 2019-10-28 @341 sbi_shutdown();
3320648ecc3819 Christoph Hellwig 2019-10-28 342 }
3320648ecc3819 Christoph Hellwig 2019-10-28 343
:::::: The code at line 341 was first introduced by commit
:::::: 3320648ecc38190caad298fbbce949f591a10253 riscv: cleanup the default power off implementation
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Paul Walmsley <paul.walmsley(a)sifive.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[rcar:gmsl/single 8/13] drivers/media/i2c/max9286.c:736:18: error: 'MAX9286_0F_RESERVED' undeclared; did you mean 'MAX9286_0X15_RESV'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/single
head: 70725b3ae940f61064ad8273bec0f8c86325a9bf
commit: 5947d330b6dd336a034246e2eaf837d307a2a440 [8/13] max9286: Add GPIO chip controller
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5947d330b6dd336a034246e2eaf837d307a2a440
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/media/i2c/max9286.c:14:0:
drivers/media/i2c/max9286.c: In function 'max9286_gpio_set':
>> drivers/media/i2c/max9286.c:736:18: error: 'MAX9286_0F_RESERVED' undeclared (first use in this function); did you mean 'MAX9286_0X15_RESV'?
offset, value, MAX9286_0F_RESERVED | priv->gpio_state);
^
include/linux/device.h:1741:32: note: in definition of macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/media/i2c/max9286.c:736:18: note: each undeclared identifier is reported only once for each function it appears in
offset, value, MAX9286_0F_RESERVED | priv->gpio_state);
^
include/linux/device.h:1741:32: note: in definition of macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
vim +736 drivers/media/i2c/max9286.c
723
724 static void max9286_gpio_set(struct gpio_chip *chip,
725 unsigned int offset, int value)
726 {
727 struct max9286_priv *priv = gpiochip_get_data(chip);
728
729 if (value)
730 priv->gpio_state |= BIT(offset);
731 else
732 priv->gpio_state &= ~BIT(offset);
733
734 dev_err(&priv->client->dev,
735 "GPIOSET: Offset %d, Value %d gpio_state = 0x%lx",
> 736 offset, value, MAX9286_0F_RESERVED | priv->gpio_state);
737
738 max9286_write(priv, 0x0f, MAX9286_0F_RESERVED | priv->gpio_state);
739 }
740
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[avpatel:riscv_kvm_v10 4/31] arch/riscv/kernel/setup.c:78:2: error: implicit declaration of function 'sbi_init'; did you mean 'smp_init'?
by kbuild test robot
tree: https://github.com/avpatel/linux.git riscv_kvm_v10
head: adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: 16e90702b40cf6a48017387bdfe1fb991d79077c [4/31] RISC-V: Add basic support for SBI v0.2
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 16e90702b40cf6a48017387bdfe1fb991d79077c
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/riscv/kernel/setup.c: In function 'setup_arch':
>> arch/riscv/kernel/setup.c:78:2: error: implicit declaration of function 'sbi_init'; did you mean 'smp_init'? [-Werror=implicit-function-declaration]
sbi_init();
^~~~~~~~
smp_init
cc1: some warnings being treated as errors
--
>> arch/riscv/kernel/sbi.c:8:34: error: 'SBI_SPEC_VERSION_DEFAULT' undeclared here (not in a function); did you mean 'PIDS_PER_CPU_DEFAULT'?
unsigned long sbi_spec_version = SBI_SPEC_VERSION_DEFAULT;
^~~~~~~~~~~~~~~~~~~~~~~~
PIDS_PER_CPU_DEFAULT
>> arch/riscv/kernel/sbi.c:11:15: error: return type is an incomplete type
struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
^~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_ecall':
>> arch/riscv/kernel/sbi.c:16:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:33:9: warning: 'return' with a value, in function returning void
return ret;
^~~
arch/riscv/kernel/sbi.c:11:15: note: declared here
struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
^~~~~~~~~
arch/riscv/kernel/sbi.c:16:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_err_map_linux_errno':
>> arch/riscv/kernel/sbi.c:40:7: error: 'SBI_SUCCESS' undeclared (first use in this function)
case SBI_SUCCESS:
^~~~~~~~~~~
arch/riscv/kernel/sbi.c:40:7: note: each undeclared identifier is reported only once for each function it appears in
>> arch/riscv/kernel/sbi.c:42:7: error: 'SBI_ERR_DENIED' undeclared (first use in this function); did you mean 'TIMER_PINNED'?
case SBI_ERR_DENIED:
^~~~~~~~~~~~~~
TIMER_PINNED
>> arch/riscv/kernel/sbi.c:44:7: error: 'SBI_ERR_INVALID_PARAM' undeclared (first use in this function)
case SBI_ERR_INVALID_PARAM:
^~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:46:7: error: 'SBI_ERR_INVALID_ADDRESS' undeclared (first use in this function); did you mean 'SBI_ERR_INVALID_PARAM'?
case SBI_ERR_INVALID_ADDRESS:
^~~~~~~~~~~~~~~~~~~~~~~
SBI_ERR_INVALID_PARAM
>> arch/riscv/kernel/sbi.c:48:7: error: 'SBI_ERR_NOT_SUPPORTED' undeclared (first use in this function)
case SBI_ERR_NOT_SUPPORTED:
^~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:49:7: error: 'SBI_ERR_FAILURE' undeclared (first use in this function); did you mean 'SBI_ERR_DENIED'?
case SBI_ERR_FAILURE:
^~~~~~~~~~~~~~~
SBI_ERR_DENIED
arch/riscv/kernel/sbi.c: In function 'sbi_console_putchar':
arch/riscv/kernel/sbi.c:63:12: error: 'SBI_EXT_0_1_CONSOLE_PUTCHAR' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_CONSOLE_PUTCHAR, 0, ch, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_console_getchar':
arch/riscv/kernel/sbi.c:74:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:76:18: error: 'SBI_EXT_0_1_CONSOLE_GETCHAR' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_0_1_CONSOLE_GETCHAR, 0, 0, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:74:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_set_timer':
arch/riscv/kernel/sbi.c:94:12: error: 'SBI_EXT_0_1_SET_TIMER' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_SET_TIMER, 0, stime_value, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_shutdown':
arch/riscv/kernel/sbi.c:106:12: error: 'SBI_EXT_0_1_SHUTDOWN' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_SHUTDOWN, 0, 0, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_clear_ipi':
arch/riscv/kernel/sbi.c:117:12: error: 'SBI_EXT_0_1_CLEAR_IPI' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_CLEAR_IPI, 0, 0, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_send_ipi':
arch/riscv/kernel/sbi.c:128:12: error: 'SBI_EXT_0_1_SEND_IPI' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_SEND_IPI, 0, (unsigned long)hart_mask,
^~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_fence_i':
>> arch/riscv/kernel/sbi.c:141:12: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0, (unsigned long)hart_mask,
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
arch/riscv/kernel/sbi.c:159:12: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
arch/riscv/kernel/sbi.c:180:12: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
arch/riscv/kernel/sbi.c:193:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
>> arch/riscv/kernel/sbi.c:195:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~
BIT_MASK
>> arch/riscv/kernel/sbi.c:195:32: error: 'SBI_BASE_PROBE_EXT' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:193:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:206:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:208:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~
BIT_MASK
>> arch/riscv/kernel/sbi.c:208:32: error: 'SBI_BASE_GET_SPEC_VERSION' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:206:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:218:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:220:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~
BIT_MASK
>> arch/riscv/kernel/sbi.c:220:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:218:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:230:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:232:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~
BIT_MASK
>> arch/riscv/kernel/sbi.c:232:32: error: 'SBI_BASE_GET_IMP_VERSION' undeclared (first use in this function); did you mean '__GXX_ABI_VERSION'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~
__GXX_ABI_VERSION
arch/riscv/kernel/sbi.c:230:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
In file included from include/linux/kernel.h:15:0,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function 'sbi_init':
arch/riscv/kernel/sbi.c:255:3: error: implicit declaration of function 'sbi_major_version'; did you mean 'sbi_get_spec_version'? [-Werror=implicit-function-declaration]
sbi_major_version(), sbi_minor_version());
^
include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
arch/riscv/kernel/sbi.c:255:24: error: implicit declaration of function 'sbi_minor_version'; did you mean 'sbi_get_spec_version'? [-Werror=implicit-function-declaration]
sbi_major_version(), sbi_minor_version());
^
include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:254:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:254:32: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:254:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:254:36: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
>> arch/riscv/kernel/sbi.c:256:7: error: implicit declaration of function 'sbi_spec_is_0_1' [-Werror=implicit-function-declaration]
if (!sbi_spec_is_0_1())
^~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_console_getchar':
arch/riscv/kernel/sbi.c:79:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:214:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:226:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:238:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +78 arch/riscv/kernel/setup.c
77
> 78 sbi_init();
79 #ifdef CONFIG_SMP
80 setup_smp();
81 #endif
82
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months