From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35CBC1F17E8; Mon, 16 Feb 2026 19:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771269331; cv=none; b=IBGUgAjVaQukCShjtAtikcVmA5RBD/Hsnje30IEWTsJPoF8tKpHBmsWGdVSsfw4if3LqH5pJJwkZ8nUktvhMJDK4N762abPetgnhpRAU6SRmXdFO3BLBcwRFzxqWRFKJpgIfsPDgDdUWvEZFw6ezBsEd0CfNMp8fTUfas/ssdkk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771269331; c=relaxed/simple; bh=qRO8YRPiaNHXsglzbjCPq7/+9Q71Yh7RdKbk9Qr+bDo=; h=Date:From:To:Cc:Subject:Message-ID; b=nihtqCXOsHC6P/bZDHcGVEyqHEdn6KIKZ5rRifdAxj1l+eJD/p8v3ZRug3hXk3SxpEr5WakDAWPE3Qth8SannRI0d1vDwjHX658YSnTpi2b6uG0/4PGBTYSv+hemebYiBAmaaJzCmi1/GejqbYTqWWTIudiBf9e3wxCm6RSGgpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KgX1YjLo; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KgX1YjLo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771269329; x=1802805329; h=date:from:to:cc:subject:message-id; bh=qRO8YRPiaNHXsglzbjCPq7/+9Q71Yh7RdKbk9Qr+bDo=; b=KgX1YjLoZuZGHZa81b5qs2zClxuzxReHXhPRgREVdMw6jz6xD8b8ygKV bForzYsDHCR0hzCRUV7zYOFSc/5oFfIkwFSwjTYQS7Ll4T8Bz8gnkZyOa xDPmdGUP5fGQK+s8kp2l2iA6/ExzEK0cJvHy1y777j/1+lNvAboAH78HB PVnwub5gBu5Md7evO6GdIFtpO5elxpcARReGaTjWYVL2OmMSnjVXXZQj5 Hos+sG5o5h+nulgP4jlVRd5BpyfWO9+OEEslBQIAQv17JaSQISEF/yfyf N7qmuRvWf/jEbQTSq6RmrGShPQyEwqVZMOTgfn6T3E0k4kaaSgJRXV8B8 Q==; X-CSE-ConnectionGUID: B/kcCSHgTFOtOZHqWW0jwg== X-CSE-MsgGUID: 1AIJYrP6To+J78Bw1DIqPA== X-IronPort-AV: E=McAfee;i="6800,10657,11703"; a="71548174" X-IronPort-AV: E=Sophos;i="6.21,294,1763452800"; d="scan'208";a="71548174" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2026 11:15:28 -0800 X-CSE-ConnectionGUID: /Dg5nN0ZQdimrSzYDXD5XA== X-CSE-MsgGUID: yGjxdvUXRLakegrX9JHkEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,294,1763452800"; d="scan'208";a="212779683" Received: from lkp-server01.sh.intel.com (HELO 765f4a05e27f) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 16 Feb 2026 11:15:26 -0800 Received: from kbuild by 765f4a05e27f with local (Exim 4.98.2) (envelope-from ) id 1vs444-000000010Ck-0F31; Mon, 16 Feb 2026 19:15:24 +0000 Date: Tue, 17 Feb 2026 03:14:33 +0800 From: kernel test robot To: Himanshu Chauhan Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Anup Patel Subject: [avpatel:riscv_sbi_dbtr_v2 61/62] arch/riscv/kernel/hw_breakpoint.c:44:16: error: variable has incomplete type 'struct sbiret' Message-ID: <202602170318.7w2o0rVB-lkp@intel.com> User-Agent: s-nail v14.9.25 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: tree: https://github.com/avpatel/linux.git riscv_sbi_dbtr_v2 head: 66b69ab7fb5601c86982a276040e718ba54a8569 commit: dcbfaa5a331231162ca9597079b7bc15bd1307fd [61/62] riscv: Introduce support for hardware break/watchpoints config: riscv-nommu_k210_defconfig (https://download.01.org/0day-ci/archive/20260217/202602170318.7w2o0rVB-lkp@intel.com/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e86750b29fa0ff207cd43213d66dabe565417638) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260217/202602170318.7w2o0rVB-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202602170318.7w2o0rVB-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:846:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 846 | insw(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:109:53: note: expanded from macro 'insw' 109 | #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/hw_breakpoint.c:6: In file included from include/linux/hw_breakpoint.h:5: In file included from include/linux/perf_event.h:43: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:854:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 854 | insl(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:110:53: note: expanded from macro 'insl' 110 | #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/hw_breakpoint.c:6: In file included from include/linux/hw_breakpoint.h:5: In file included from include/linux/perf_event.h:43: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:863:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 863 | outsb(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:122:55: note: expanded from macro 'outsb' 122 | #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/hw_breakpoint.c:6: In file included from include/linux/hw_breakpoint.h:5: In file included from include/linux/perf_event.h:43: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:872:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 872 | outsw(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:123:55: note: expanded from macro 'outsw' 123 | #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/hw_breakpoint.c:6: In file included from include/linux/hw_breakpoint.h:5: In file included from include/linux/perf_event.h:43: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:881:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 881 | outsl(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:124:55: note: expanded from macro 'outsl' 124 | #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/hw_breakpoint.c:6: In file included from include/linux/hw_breakpoint.h:5: In file included from include/linux/perf_event.h:43: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:12: In file included from arch/riscv/include/asm/io.h:140: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; | ~~~~~~~~~~ ^ >> arch/riscv/kernel/hw_breakpoint.c:44:16: error: variable has incomplete type 'struct sbiret' 44 | struct sbiret ret; | ^ arch/riscv/kernel/hw_breakpoint.c:44:9: note: forward declaration of 'struct sbiret' 44 | struct sbiret ret; | ^ >> arch/riscv/kernel/hw_breakpoint.c:47:15: error: arithmetic on a pointer to an incomplete type 'union sbi_dbtr_shmem_entry' 47 | dbtr_shmem = per_cpu_ptr(sbi_dbtr_shmem, cpu); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:239:2: note: expanded from macro 'per_cpu_ptr' 239 | __verify_pcpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:221:52: note: expanded from macro '__verify_pcpu_ptr' 221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ | ~~~~~ ^ arch/riscv/kernel/hw_breakpoint.c:23:14: note: forward declaration of 'union sbi_dbtr_shmem_entry' 23 | static union sbi_dbtr_shmem_entry __percpu *sbi_dbtr_shmem; | ^ >> arch/riscv/kernel/hw_breakpoint.c:55:8: error: call to undeclared function 'sbi_ecall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 55 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^ >> arch/riscv/kernel/hw_breakpoint.c:55:18: error: use of undeclared identifier 'SBI_EXT_DBTR' 55 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:55:32: error: use of undeclared identifier 'SBI_EXT_DBTR_SETUP_SHMEM' 55 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^~~~~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:60:8: error: use of undeclared identifier 'SBI_ERR_DENIED' 60 | case SBI_ERR_DENIED: | ^~~~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:66:8: error: use of undeclared identifier 'SBI_ERR_INVALID_PARAM' 66 | case SBI_ERR_INVALID_PARAM: | ^~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:67:8: error: use of undeclared identifier 'SBI_ERR_INVALID_ADDRESS' 67 | case SBI_ERR_INVALID_ADDRESS: | ^~~~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:73:8: error: use of undeclared identifier 'SBI_ERR_ALREADY_AVAILABLE' 73 | case SBI_ERR_ALREADY_AVAILABLE: | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/kernel/hw_breakpoint.c:79:8: error: use of undeclared identifier 'SBI_ERR_FAILURE' 79 | case SBI_ERR_FAILURE: | ^~~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:99:16: error: variable has incomplete type 'struct sbiret' 99 | struct sbiret ret; | ^ arch/riscv/kernel/hw_breakpoint.c:99:9: note: forward declaration of 'struct sbiret' 99 | struct sbiret ret; | ^ arch/riscv/kernel/hw_breakpoint.c:102:8: error: call to undeclared function 'sbi_ecall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 102 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^ arch/riscv/kernel/hw_breakpoint.c:102:18: error: use of undeclared identifier 'SBI_EXT_DBTR' 102 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:102:32: error: use of undeclared identifier 'SBI_EXT_DBTR_SETUP_SHMEM' 102 | ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:107:8: error: use of undeclared identifier 'SBI_ERR_DENIED' 107 | case SBI_ERR_DENIED: | ^~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:112:8: error: use of undeclared identifier 'SBI_ERR_INVALID_PARAM' 112 | case SBI_ERR_INVALID_PARAM: | ^~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:113:8: error: use of undeclared identifier 'SBI_ERR_INVALID_ADDRESS' 113 | case SBI_ERR_INVALID_ADDRESS: | ^~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:118:8: error: use of undeclared identifier 'SBI_ERR_ALREADY_AVAILABLE' 118 | case SBI_ERR_ALREADY_AVAILABLE: | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/hw_breakpoint.c:122:8: error: use of undeclared identifier 'SBI_ERR_FAILURE' 122 | case SBI_ERR_FAILURE: | ^~~~~~~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 7 warnings and 20 errors generated. vim +44 arch/riscv/kernel/hw_breakpoint.c 39 40 static int arch_smp_setup_sbi_shmem(unsigned int cpu) 41 { 42 union sbi_dbtr_shmem_entry *dbtr_shmem; 43 unsigned long shmem_pa; > 44 struct sbiret ret; 45 int rc = 0; 46 > 47 dbtr_shmem = per_cpu_ptr(sbi_dbtr_shmem, cpu); 48 if (!dbtr_shmem) { 49 pr_err("Invalid per-cpu shared memory for debug triggers\n"); 50 return -ENODEV; 51 } 52 53 shmem_pa = __pa(dbtr_shmem); 54 > 55 ret = sbi_ecall(SBI_EXT_DBTR, SBI_EXT_DBTR_SETUP_SHMEM, 56 MEM_LO(shmem_pa), MEM_HI(shmem_pa), 0, 0, 0, 0); 57 58 if (ret.error) { 59 switch (ret.error) { > 60 case SBI_ERR_DENIED: 61 pr_warn("%s: Access denied for shared memory at %lx\n", 62 __func__, shmem_pa); 63 rc = -EPERM; 64 break; 65 > 66 case SBI_ERR_INVALID_PARAM: > 67 case SBI_ERR_INVALID_ADDRESS: 68 pr_warn("%s: Invalid address parameter (%lu)\n", 69 __func__, ret.error); 70 rc = -EINVAL; 71 break; 72 > 73 case SBI_ERR_ALREADY_AVAILABLE: 74 pr_warn("%s: Shared memory is already set\n", 75 __func__); 76 rc = -EADDRINUSE; 77 break; 78 > 79 case SBI_ERR_FAILURE: 80 pr_err("%s: Internal sdtrig state error\n", 81 __func__); 82 rc = -ENXIO; 83 break; 84 85 default: 86 pr_warn("%s: Unknown error %lu\n", __func__, ret.error); 87 rc = -ENXIO; 88 break; 89 } 90 } 91 92 pr_info("CPU %d: HW Breakpoint shared memory registered.\n", cpu); 93 94 return rc; 95 } 96 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki