Re: [RFC PATCH 2/2] cifs: Implement cache I/O by accessing the cache directly
by kernel test robot
Hi David,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on cifs/for-next]
[also build test WARNING on linus/master v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/David-Howells/cifs-Transition-fr...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: x86_64-randconfig-s022-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250805.MGfPuo1x-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/ad0df70284e96423c577eb30a366eb814...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Howells/cifs-Transition-from-readpages-to-readahead/20220125-010247
git checkout ad0df70284e96423c577eb30a366eb814888379b
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/vfio/pci/ fs/cifs/ mm/kasan/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
fs/cifs/file.c: note: in included file:
>> fs/cifs/fscache.h:143:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long *_data_first @@ got unsigned long @@
fs/cifs/fscache.h:143:21: sparse: expected unsigned long *_data_first
fs/cifs/fscache.h:143:21: sparse: got unsigned long
>> fs/cifs/fscache.h:144:26: sparse: sparse: Using plain integer as NULL pointer
vim +143 fs/cifs/fscache.h
137
138 static inline int cifs_fscache_query_occupancy(struct inode *inode,
139 pgoff_t first, unsigned nr_pages,
140 pgoff_t *_data_first,
141 unsigned int *_data_nr_pages)
142 {
> 143 _data_first = ULONG_MAX;
> 144 _data_nr_pages = 0;
145 return -ENOBUFS;
146 }
147
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[ammarfaizi2-block:google/android/kernel/common/android13-5.15 2898/2936] kernel/sched/sched.h:1553:15: error: must use 'struct' tag to refer to type 'rq'
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android13-5.15
head: b7e4947b29bb8d0351c581d9365780d9b6f4d702
commit: 50f5345c8756129044a3246800f51f04ae2f55b0 [2898/2936] ANDROID: __migrate_task header
config: arm-randconfig-r003-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250831.PBiV30bo-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2e58a18910867ba6795066e044293e6daf89edf5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/ammarfaizi2/linux-block/commit/50f5345c8756129044a3246...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android13-5.15
git checkout 50f5345c8756129044a3246800f51f04ae2f55b0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/sched/core.c:13:
>> kernel/sched/sched.h:1553:15: error: must use 'struct' tag to refer to type 'rq'
static inline rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
^
struct
1 error generated.
--
In file included from kernel/sched/fair.c:23:
>> kernel/sched/sched.h:1553:15: error: must use 'struct' tag to refer to type 'rq'
static inline rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
^
struct
kernel/sched/fair.c:628:5: warning: no previous prototype for function 'sched_update_scaling' [-Wmissing-prototypes]
int sched_update_scaling(void)
^
kernel/sched/fair.c:628:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sched_update_scaling(void)
^
static
kernel/sched/fair.c:4494:6: warning: no previous prototype for function 'set_next_entity' [-Wmissing-prototypes]
void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
^
kernel/sched/fair.c:4494:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
^
static
2 warnings and 1 error generated.
--
In file included from kernel/sched/rt.c:6:
>> kernel/sched/sched.h:1553:15: error: must use 'struct' tag to refer to type 'rq'
static inline rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
^
struct
kernel/sched/rt.c:677:6: warning: no previous prototype for function 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
^
kernel/sched/rt.c:677:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
^
static
1 warning and 1 error generated.
vim +1553 kernel/sched/sched.h
1548
1549 #ifdef CONFIG_SMP
1550 extern struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
1551 struct task_struct *p, int dest_cpu);
1552 #else /* !CONFIG_SMP */
> 1553 static inline rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
1554 struct task_struct *p, int dest_cpu) { return rq; }
1555 #endif
1556
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[mingo-tip:sched/headers 2259/2384] arch/mips/include/asm/sgi/heart.h:321:25: error: implicit declaration of function '____raw_writeq'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: a589a381615b4e9581c08e10c86d4fc56bd817ea [2259/2384] headers/deps: irq: Optimize <linux/interrupt.h> dependencies
config: mips-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250737.EsYDONpH-lk...)
compiler: mips64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout a589a381615b4e9581c08e10c86d4fc56bd817ea
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sgi-ip30/ drivers/media/test-drivers/vidtv/ drivers/usb/chipidea/ drivers/usb/usbip/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/mips/sgi-ip30/ip30-power.c:21:
arch/mips/sgi-ip30/ip30-power.c: In function 'ip30_machine_restart':
>> arch/mips/include/asm/sgi/heart.h:321:25: error: implicit declaration of function '____raw_writeq' [-Werror=implicit-function-declaration]
321 | #define heart_write ____raw_writeq
| ^~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-power.c:29:9: note: in expansion of macro 'heart_write'
29 | heart_write((heart_read(&heart_regs->mode) | HM_COLD_RST),
| ^~~~~~~~~~~
>> arch/mips/include/asm/sgi/heart.h:320:25: error: implicit declaration of function '____raw_readq' [-Werror=implicit-function-declaration]
320 | #define heart_read ____raw_readq
| ^~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-power.c:29:22: note: in expansion of macro 'heart_read'
29 | heart_write((heart_read(&heart_regs->mode) | HM_COLD_RST),
| ^~~~~~~~~~
cc1: some warnings being treated as errors
--
>> drivers/usb/usbip/vhci_hcd.c:287:43: error: implicit declaration of function 'ilog2' [-Werror=implicit-function-declaration]
287 | .bFunctionalitySupport = ilog2(USB_5GBPS_OPERATION),
| ^~~~~
>> drivers/usb/usbip/vhci_hcd.c:287:43: error: initializer element is not constant
drivers/usb/usbip/vhci_hcd.c:287:43: note: (near initialization for 'usb3_bos_desc.ss_cap.bFunctionalitySupport')
cc1: some warnings being treated as errors
vim +/____raw_writeq +321 arch/mips/include/asm/sgi/heart.h
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 319
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @320 #define heart_read ____raw_readq
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @321 #define heart_write ____raw_writeq
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 322
:::::: The code at line 321 was first introduced by commit
:::::: 7505576d1c1ac0cfe85fdf90999433dd8b673012 MIPS: add support for SGI Octane (IP30)
:::::: TO: Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
:::::: CC: Paul Burton <paulburton(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[chrome-os:chromeos-5.10 9860/9999] sound/soc/sof/mediatek/mt8195/mt8195.c:546:22: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long')
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 26a3cf7b7d542f4ff85e2855ab69140bff097a50
commit: ac3fa3878aca1e098e64cf9b41ee01a4b8365d01 [9860/9999] CHROMIUM: ASoC: SOF: mediatek: Add mt8195 dsp pcm stream callback
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220125/202201250647.a7ELQZe3-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout ac3fa3878aca1e098e64cf9b41ee01a4b8365d01
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash sound/soc/sof/mediatek/mt8195/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/sof/mediatek/mt8195/mt8195.c:546:22: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
substream->stream, mstream->stream.posn_offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:39: note: expanded from macro 'dev_dbg'
dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:162:19: note: expanded from macro 'dynamic_dev_dbg'
dev, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:147:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:129:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
1 warning generated.
vim +546 sound/soc/sof/mediatek/mt8195/mt8195.c
530
531 static int mt8195_ipc_pcm_params(struct snd_sof_dev *sdev,
532 struct snd_pcm_substream *substream,
533 const struct sof_ipc_pcm_params_reply *reply)
534 {
535 struct sof_mtk_adsp_stream *mstream = substream->runtime->private_data;
536 size_t posn_offset = reply->posn_offset;
537
538 /* check for unaligned offset or overflow */
539 if (posn_offset > sdev->stream_box.size ||
540 posn_offset % sizeof(struct sof_ipc_stream_posn) != 0)
541 return -EINVAL;
542
543 mstream->stream.posn_offset = sdev->stream_box.offset + posn_offset;
544
545 dev_dbg(sdev->dev, "pcm: stream dir %d, posn mailbox offset is 0x%x",
> 546 substream->stream, mstream->stream.posn_offset);
547
548 return 0;
549 }
550
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
fs/dlm/midcomms.c:913:22: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 658bd576f95ed597e519cdadf1c86ac87c17aea5 fs: dlm: move version conversion to compile time
date: 3 months ago
config: csky-randconfig-s032-20220120 (https://download.01.org/0day-ci/archive/20220125/202201250653.Cd12vqu0-lk...)
compiler: csky-linux-gcc (GCC) 11.2.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.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 658bd576f95ed597e519cdadf1c86ac87c17aea5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
fs/dlm/midcomms.c:570:25: sparse: sparse: cast to restricted __le32
fs/dlm/midcomms.c:678:19: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:680:16: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:718:27: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:737:25: sparse: sparse: cast to restricted __le32
fs/dlm/midcomms.c:747:25: sparse: sparse: cast to restricted __le32
fs/dlm/midcomms.c:756:23: sparse: sparse: cast to restricted __le32
fs/dlm/midcomms.c:766:42: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:769:26: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:804:23: sparse: sparse: cast to restricted __le32
fs/dlm/midcomms.c:838:27: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:898:26: sparse: sparse: cast to restricted __le16
fs/dlm/midcomms.c:920:25: sparse: sparse: cast to restricted __le32
>> fs/dlm/midcomms.c:913:22: sparse: sparse: restricted __le32 degrades to integer
fs/dlm/midcomms.c:916:22: sparse: sparse: restricted __le32 degrades to integer
fs/dlm/midcomms.c:1056:20: sparse: sparse: context imbalance in 'dlm_midcomms_get_mhandle' - wrong count at exit
fs/dlm/midcomms.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, ...):
include/linux/srcu.h:188:9: sparse: sparse: context imbalance in 'dlm_midcomms_commit_mhandle' - unexpected unlock
vim +913 fs/dlm/midcomms.c
871
872 /*
873 * Called from the low-level comms layer to process a buffer of
874 * commands.
875 */
876
877 int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len)
878 {
879 const unsigned char *ptr = buf;
880 const struct dlm_header *hd;
881 uint16_t msglen;
882 int ret = 0;
883
884 while (len >= sizeof(struct dlm_header)) {
885 hd = (struct dlm_header *)ptr;
886
887 /* no message should be more than DLM_MAX_SOCKET_BUFSIZE or
888 * less than dlm_header size.
889 *
890 * Some messages does not have a 8 byte length boundary yet
891 * which can occur in a unaligned memory access of some dlm
892 * messages. However this problem need to be fixed at the
893 * sending side, for now it seems nobody run into architecture
894 * related issues yet but it slows down some processing.
895 * Fixing this issue should be scheduled in future by doing
896 * the next major version bump.
897 */
898 msglen = le16_to_cpu(hd->h_length);
899 if (msglen > DLM_MAX_SOCKET_BUFSIZE ||
900 msglen < sizeof(struct dlm_header)) {
901 log_print("received invalid length header: %u from node %d, will abort message parsing",
902 msglen, nodeid);
903 return -EBADMSG;
904 }
905
906 /* caller will take care that leftover
907 * will be parsed next call with more data
908 */
909 if (msglen > len)
910 break;
911
912 switch (hd->h_version) {
> 913 case cpu_to_le32(DLM_VERSION_3_1):
914 dlm_midcomms_receive_buffer_3_1((union dlm_packet *)ptr, nodeid);
915 break;
916 case cpu_to_le32(DLM_VERSION_3_2):
917 dlm_midcomms_receive_buffer_3_2((union dlm_packet *)ptr, nodeid);
918 break;
919 default:
920 log_print("received invalid version header: %u from node %d, will skip this message",
921 le32_to_cpu(hd->h_version), nodeid);
922 break;
923 }
924
925 ret += msglen;
926 len -= msglen;
927 ptr += msglen;
928 }
929
930 return ret;
931 }
932
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[ammarfaizi2-block:google/android/kernel/common/android11-kiwi-5.4 2314/9999] mm/page_alloc.c:2741:29: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android11-kiwi-5.4
head: 7d1d5848183bd1d9086d0572f9af431d3ded407f
commit: b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac [2314/9999] ANDROID: GKI: cma: redirect page allocation to CMA
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20220125/202201250617.FDCLmCS1-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/ammarfaizi2/linux-block/commit/b9d3d8f1e991052edb89b05...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android11-kiwi-5.4
git checkout b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
mm/page_alloc.c:106:1: sparse: sparse: symbol 'pcpu_drain_mutex' was not declared. Should it be static?
>> mm/page_alloc.c:2741:29: sparse: sparse: Using plain integer as NULL pointer
mm/page_alloc.c:3252:51: sparse: sparse: incorrect type in argument 7 (different base types) @@ expected int cma @@ got restricted gfp_t @@
mm/page_alloc.c:3252:51: sparse: expected int cma
mm/page_alloc.c:3252:51: sparse: got restricted gfp_t
mm/page_alloc.c: note: in included file (through include/linux/mm.h):
include/linux/gfp.h:325:27: sparse: sparse: restricted gfp_t degrades to integer
include/linux/gfp.h:325:27: sparse: sparse: restricted gfp_t degrades to integer
vim +2741 mm/page_alloc.c
2736
2737 static struct page *__rmqueue_cma(struct zone *zone, unsigned int order,
2738 int migratetype,
2739 unsigned int alloc_flags)
2740 {
> 2741 struct page *page = 0;
2742
2743 retry:
2744 #ifdef CONFIG_CMA
2745 if (migratetype == MIGRATE_MOVABLE && !zone->cma_alloc)
2746 page = __rmqueue_cma_fallback(zone, order);
2747 else
2748 #endif
2749 page = __rmqueue_smallest(zone, order, migratetype);
2750
2751 if (unlikely(!page) && __rmqueue_fallback(zone, order, migratetype,
2752 alloc_flags))
2753 goto retry;
2754
2755 trace_mm_page_alloc_zone_locked(page, order, migratetype);
2756 return page;
2757 }
2758
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[ammarfaizi2-block:google/android/kernel/common/android-4.19-stable 160/9999] drivers/usb/host/xhci-mem.c:1880:56: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.19-stable
head: 90a691fca4c2525068d9908ac203e9f09e4e33c0
commit: 5dfdaa15caebc782d1c90ff6513d4cc9f6ac3663 [160/9999] ANDROID: GKI: usb: xhci: Add support for secondary interrupters
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220125/202201250600.k9Yd3XQD-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/ammarfaizi2/linux-block/commit/5dfdaa15caebc782d1c90ff...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.19-stable
git checkout 5dfdaa15caebc782d1c90ff6513d4cc9f6ac3663
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/ drivers/usb/host/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/usb/host/xhci-mem.c:936:6: sparse: sparse: symbol 'xhci_free_virt_devices_depth_first' was not declared. Should it be static?
>> drivers/usb/host/xhci-mem.c:1880:56: sparse: sparse: restricted __le32 degrades to integer
>> drivers/usb/host/xhci-mem.c:1840:6: sparse: sparse: symbol 'xhci_handle_sec_intr_events' was not declared. Should it be static?
>> drivers/usb/host/xhci-mem.c:1947:6: sparse: sparse: symbol 'xhci_event_ring_cleanup' was not declared. Should it be static?
>> drivers/usb/host/xhci-mem.c:2486:5: sparse: sparse: symbol 'xhci_event_ring_setup' was not declared. Should it be static?
>> drivers/usb/host/xhci-mem.c:2590:5: sparse: sparse: symbol 'xhci_event_ring_init' was not declared. Should it be static?
drivers/usb/host/xhci-mem.c:936:6: warning: no previous prototype for 'xhci_free_virt_devices_depth_first' [-Wmissing-prototypes]
936 | void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-mem.c:1840:6: warning: no previous prototype for 'xhci_handle_sec_intr_events' [-Wmissing-prototypes]
1840 | void xhci_handle_sec_intr_events(struct xhci_hcd *xhci, int intr_num)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-mem.c:1947:6: warning: no previous prototype for 'xhci_event_ring_cleanup' [-Wmissing-prototypes]
1947 | void xhci_event_ring_cleanup(struct xhci_hcd *xhci)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-mem.c:2486:5: warning: no previous prototype for 'xhci_event_ring_setup' [-Wmissing-prototypes]
2486 | int xhci_event_ring_setup(struct xhci_hcd *xhci, struct xhci_ring **er,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-mem.c:2590:5: warning: no previous prototype for 'xhci_event_ring_init' [-Wmissing-prototypes]
2590 | int xhci_event_ring_init(struct xhci_hcd *xhci, gfp_t flags)
| ^~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'xhci' not described in 'xhci_ring_alloc'
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'num_segs' not described in 'xhci_ring_alloc'
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'cycle_state' not described in 'xhci_ring_alloc'
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'type' not described in 'xhci_ring_alloc'
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'max_packet' not described in 'xhci_ring_alloc'
drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'flags' not described in 'xhci_ring_alloc'
vim +1880 drivers/usb/host/xhci-mem.c
1839
> 1840 void xhci_handle_sec_intr_events(struct xhci_hcd *xhci, int intr_num)
1841 {
1842 union xhci_trb *erdp_trb, *current_trb;
1843 struct xhci_segment *seg;
1844 u64 erdp_reg;
1845 u32 iman_reg;
1846 dma_addr_t deq;
1847 unsigned long segment_offset;
1848
1849 /* disable irq, ack pending interrupt and ack all pending events */
1850
1851 iman_reg =
1852 readl_relaxed(&xhci->sec_ir_set[intr_num]->irq_pending);
1853 iman_reg &= ~IMAN_IE;
1854 writel_relaxed(iman_reg,
1855 &xhci->sec_ir_set[intr_num]->irq_pending);
1856 iman_reg =
1857 readl_relaxed(&xhci->sec_ir_set[intr_num]->irq_pending);
1858 if (iman_reg & IMAN_IP)
1859 writel_relaxed(iman_reg,
1860 &xhci->sec_ir_set[intr_num]->irq_pending);
1861
1862 /* last acked event trb is in erdp reg */
1863 erdp_reg =
1864 xhci_read_64(xhci, &xhci->sec_ir_set[intr_num]->erst_dequeue);
1865 deq = (dma_addr_t)(erdp_reg & ~ERST_PTR_MASK);
1866 if (!deq) {
1867 pr_debug("%s: event ring handling not required\n", __func__);
1868 return;
1869 }
1870
1871 seg = xhci->sec_event_ring[intr_num]->first_seg;
1872 segment_offset = deq - seg->dma;
1873
1874 /* find out virtual address of the last acked event trb */
1875 erdp_trb = current_trb = &seg->trbs[0] +
1876 (segment_offset/sizeof(*current_trb));
1877
1878 /* read cycle state of the last acked trb to find out CCS */
1879 xhci->sec_event_ring[intr_num]->cycle_state =
> 1880 (current_trb->event_cmd.flags & TRB_CYCLE);
1881
1882 while (1) {
1883 /* last trb of the event ring: toggle cycle state */
1884 if (current_trb == &seg->trbs[TRBS_PER_SEGMENT - 1]) {
1885 xhci->sec_event_ring[intr_num]->cycle_state ^= 1;
1886 current_trb = &seg->trbs[0];
1887 } else {
1888 current_trb++;
1889 }
1890
1891 /* cycle state transition */
1892 if ((le32_to_cpu(current_trb->event_cmd.flags) & TRB_CYCLE) !=
1893 xhci->sec_event_ring[intr_num]->cycle_state)
1894 break;
1895 }
1896
1897 if (erdp_trb != current_trb) {
1898 deq =
1899 xhci_trb_virt_to_dma(xhci->sec_event_ring[intr_num]->deq_seg,
1900 current_trb);
1901 if (deq == 0)
1902 xhci_warn(xhci,
1903 "WARN invalid SW event ring dequeue ptr.\n");
1904 /* Update HC event ring dequeue pointer */
1905 erdp_reg &= ERST_PTR_MASK;
1906 erdp_reg |= ((u64) deq & (u64) ~ERST_PTR_MASK);
1907 }
1908
1909 /* Clear the event handler busy flag (RW1C); event ring is empty. */
1910 erdp_reg |= ERST_EHB;
1911 xhci_write_64(xhci, erdp_reg,
1912 &xhci->sec_ir_set[intr_num]->erst_dequeue);
1913 }
1914
1915 int xhci_sec_event_ring_cleanup(struct usb_hcd *hcd, unsigned int intr_num)
1916 {
1917 int size;
1918 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1919 struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
1920
1921 if (intr_num >= xhci->max_interrupters) {
1922 xhci_err(xhci, "invalid secondary interrupter num %d\n",
1923 intr_num);
1924 return -EINVAL;
1925 }
1926
1927 size =
1928 sizeof(struct xhci_erst_entry)*(xhci->sec_erst[intr_num].num_entries);
1929 if (xhci->sec_erst[intr_num].entries) {
1930 xhci_handle_sec_intr_events(xhci, intr_num);
1931 dma_free_coherent(dev, size, xhci->sec_erst[intr_num].entries,
1932 xhci->sec_erst[intr_num].erst_dma_addr);
1933 xhci->sec_erst[intr_num].entries = NULL;
1934 }
1935 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed SEC ERST#%d",
1936 intr_num);
1937 if (xhci->sec_event_ring[intr_num])
1938 xhci_ring_free(xhci, xhci->sec_event_ring[intr_num]);
1939
1940 xhci->sec_event_ring[intr_num] = NULL;
1941 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
1942 "Freed sec event ring");
1943
1944 return 0;
1945 }
1946
> 1947 void xhci_event_ring_cleanup(struct xhci_hcd *xhci)
1948 {
1949 unsigned int i;
1950
1951 /* sec event ring clean up */
1952 for (i = 1; i < xhci->max_interrupters; i++)
1953 xhci_sec_event_ring_cleanup(xhci_to_hcd(xhci), i);
1954
1955 kfree(xhci->sec_ir_set);
1956 xhci->sec_ir_set = NULL;
1957 kfree(xhci->sec_erst);
1958 xhci->sec_erst = NULL;
1959 kfree(xhci->sec_event_ring);
1960 xhci->sec_event_ring = NULL;
1961
1962 /* primary event ring clean up */
1963 xhci_free_erst(xhci, &xhci->erst);
1964 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed primary ERST");
1965 if (xhci->event_ring)
1966 xhci_ring_free(xhci, xhci->event_ring);
1967 xhci->event_ring = NULL;
1968 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed priamry event ring");
1969 }
1970
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[mingo-tip:sched/headers 1471/2384] include/linux/rcupdate.h:380:9: error: dereferencing pointer to incomplete type 'struct task_struct'
by kernel test robot
Hi Ingo,
FYI, the error/warning still remains.
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 2343c4a8035421263b16ea777e945cc1b0cbd22f [1471/2384] headers/deps: rcu/wait: Remove <linux/sched/task_flags.h> from <linux/rcuwait.h>
config: i386-randconfig-a002-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250610.CvFrmXWz-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 2343c4a8035421263b16ea777e945cc1b0cbd22f
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/mm_types.h:16,
from include/asm-generic/fixmap.h:19,
from arch/x86/include/asm/fixmap.h:192,
from arch/x86/include/asm/apic.h:13,
from arch/x86/kernel/apic/hw_nmi.c:15:
include/linux/rcuwait.h: In function 'rcuwait_active':
>> include/linux/rcupdate.h:380:9: error: dereferencing pointer to incomplete type 'struct task_struct'
380 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:490:31: note: in expansion of macro '__rcu_access_pointer'
490 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/workqueue.h:16,
from include/linux/workqueue_api.h:2,
from arch/x86/kvm/lapic.c:19:
include/linux/rcuwait.h: In function 'rcuwait_active':
>> include/linux/rcupdate.h:380:9: error: dereferencing pointer to incomplete type 'struct task_struct'
380 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:490:31: note: in expansion of macro '__rcu_access_pointer'
490 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/rcuwait_api.h:1,
from arch/x86/kvm/lapic.c:20:
include/linux/rcuwait.h:34:1: error: control reaches end of non-void function [-Werror=return-type]
34 | }
| ^
cc1: some warnings being treated as errors
vim +380 include/linux/rcupdate.h
76c8eaafe4f061 Paul E. McKenney 2021-04-21 377
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 378 #define __rcu_access_pointer(p, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 379 ({ \
7d0ae8086b8283 Paul E. McKenney 2015-03-03 @380 typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 381) rcu_check_sparse(p, space); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 382 ((typeof(*p) __force __kernel *)(_________p1)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 383 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 384 #define __rcu_dereference_check(p, c, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 385 ({ \
ac59853c06993a Pranith Kumar 2014-11-13 386 /* Dependency order vs. p above. */ \
506458efaf153c Will Deacon 2017-10-24 387 typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 388 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 389) rcu_check_sparse(p, space); \
ac59853c06993a Pranith Kumar 2014-11-13 390 ((typeof(*p) __force __kernel *)(________p1)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 391 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 392 #define __rcu_dereference_protected(p, c, space) \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 393 ({ \
f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 394 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
423a86a610cad1 Joel Fernandes (Google 2018-12-12 395) rcu_check_sparse(p, space); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 396 ((typeof(*p) __force __kernel *)(p)); \
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 397 })
995f1405610bd8 Paul E. McKenney 2016-07-01 398 #define rcu_dereference_raw(p) \
995f1405610bd8 Paul E. McKenney 2016-07-01 399 ({ \
995f1405610bd8 Paul E. McKenney 2016-07-01 400 /* Dependency order vs. p above. */ \
506458efaf153c Will Deacon 2017-10-24 401 typeof(p) ________p1 = READ_ONCE(p); \
995f1405610bd8 Paul E. McKenney 2016-07-01 402 ((typeof(*p) __force __kernel *)(________p1)); \
995f1405610bd8 Paul E. McKenney 2016-07-01 403 })
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 404
:::::: The code at line 380 was first introduced by commit
:::::: 7d0ae8086b828311250c6afdf800b568ac9bd693 rcu: Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [RFC PATCH 2/2] cifs: Implement cache I/O by accessing the cache directly
by kernel test robot
Hi David,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on cifs/for-next]
[also build test WARNING on linus/master v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/David-Howells/cifs-Transition-fr...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: mips-maltasmvp_eva_defconfig (https://download.01.org/0day-ci/archive/20220125/202201250615.0L5TzebQ-lk...)
compiler: mipsel-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ad0df70284e96423c577eb30a366eb814...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Howells/cifs-Transition-from-readpages-to-readahead/20220125-010247
git checkout ad0df70284e96423c577eb30a366eb814888379b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/cifs/cifsfs.c:41:
fs/cifs/fscache.h: In function 'cifs_fscache_query_occupancy':
>> fs/cifs/fscache.h:143:21: warning: assignment to 'long unsigned int *' from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion]
143 | _data_first = ULONG_MAX;
| ^
fs/cifs/fscache.h:140:57: warning: parameter '_data_first' set but not used [-Wunused-but-set-parameter]
140 | pgoff_t *_data_first,
fs/cifs/fscache.h:141:62: warning: parameter '_data_nr_pages' set but not used [-Wunused-but-set-parameter]
141 | unsigned int *_data_nr_pages)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
vim +143 fs/cifs/fscache.h
137
138 static inline int cifs_fscache_query_occupancy(struct inode *inode,
139 pgoff_t first, unsigned nr_pages,
140 pgoff_t *_data_first,
141 unsigned int *_data_nr_pages)
142 {
> 143 _data_first = ULONG_MAX;
144 _data_nr_pages = 0;
145 return -ENOBUFS;
146 }
147
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks