[ti:ti-rt-linux-5.10.y 3646/3742] drivers/pci/controller/dwc/pci-keystone.c:299:6: warning: no previous prototype for function 'ks_pcie_irq_eoi'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: d6dc4ff7c531b737f03b059b073da22cf61bd5d1
commit: f765f578153d8bfc7a035b1fce2c09d2c41bd980 [3646/3742] PCI: keystone: Convert to using hierarchy domain for legacy interrupts
config: arm64-randconfig-r006-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout f765f578153d8bfc7a035b1fce2c09d2c41bd980
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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 >>):
>> drivers/pci/controller/dwc/pci-keystone.c:299:6: warning: no previous prototype for function 'ks_pcie_irq_eoi' [-Wmissing-prototypes]
void ks_pcie_irq_eoi(struct irq_data *data)
^
drivers/pci/controller/dwc/pci-keystone.c:299:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ks_pcie_irq_eoi(struct irq_data *data)
^
static
>> drivers/pci/controller/dwc/pci-keystone.c:308:6: warning: no previous prototype for function 'ks_pcie_irq_enable' [-Wmissing-prototypes]
void ks_pcie_irq_enable(struct irq_data *data)
^
drivers/pci/controller/dwc/pci-keystone.c:308:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ks_pcie_irq_enable(struct irq_data *data)
^
static
>> drivers/pci/controller/dwc/pci-keystone.c:317:6: warning: no previous prototype for function 'ks_pcie_irq_disable' [-Wmissing-prototypes]
void ks_pcie_irq_disable(struct irq_data *data)
^
drivers/pci/controller/dwc/pci-keystone.c:317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ks_pcie_irq_disable(struct irq_data *data)
^
static
3 warnings generated.
vim +/ks_pcie_irq_eoi +299 drivers/pci/controller/dwc/pci-keystone.c
298
> 299 void ks_pcie_irq_eoi(struct irq_data *data)
300 {
301 struct keystone_pcie *ks_pcie = irq_data_get_irq_chip_data(data);
302 irq_hw_number_t hwirq = data->hwirq;
303
304 ks_pcie_app_writel(ks_pcie, IRQ_EOI, hwirq);
305 irq_chip_eoi_parent(data);
306 }
307
> 308 void ks_pcie_irq_enable(struct irq_data *data)
309 {
310 struct keystone_pcie *ks_pcie = irq_data_get_irq_chip_data(data);
311 irq_hw_number_t hwirq = data->hwirq;
312
313 ks_pcie_app_writel(ks_pcie, IRQ_ENABLE_SET(hwirq), INTx_EN);
314 irq_chip_enable_parent(data);
315 }
316
> 317 void ks_pcie_irq_disable(struct irq_data *data)
318 {
319 struct keystone_pcie *ks_pcie = irq_data_get_irq_chip_data(data);
320 irq_hw_number_t hwirq = data->hwirq;
321
322 ks_pcie_app_writel(ks_pcie, IRQ_ENABLE_CLR(hwirq), INTx_EN);
323 irq_chip_disable_parent(data);
324 }
325
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[jolsa-perf:bpf/ftrace 3/7] kernel/bpf/syscall.c:2937:3: error: implicit declaration of function 'bpf_trace_run2'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/ftrace
head: 5906e0659463d7c0fbe13a7e097e26f448f54527
commit: d9e5279c64019b04e05525faa74f5407b9f0b943 [3/7] bpf: Add support to attach program to ftrace probe
config: nds32-randconfig-r005-20210414 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/ftrace
git checkout d9e5279c64019b04e05525faa74f5407b9f0b943
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nds32
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 >>):
kernel/bpf/syscall.c: In function 'bpf_ftrace_function_call':
>> kernel/bpf/syscall.c:2937:3: error: implicit declaration of function 'bpf_trace_run2' [-Werror=implicit-function-declaration]
2937 | bpf_trace_run2(tr_link->link.prog, ip, parent_ip);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bpf_trace_run2 +2937 kernel/bpf/syscall.c
2919
2920 static void
2921 bpf_ftrace_function_call(unsigned long ip, unsigned long parent_ip,
2922 struct ftrace_ops *ops, struct ftrace_regs *fregs)
2923 {
2924 struct bpf_tracing_ftrace_link *tr_link;
2925 struct bpf_prog *prog;
2926 u64 start;
2927
2928 tr_link = container_of(ops, struct bpf_tracing_ftrace_link, ops);
2929 prog = tr_link->link.prog;
2930
2931 if (prog->aux->sleepable)
2932 start = __bpf_prog_enter_sleepable(prog);
2933 else
2934 start = __bpf_prog_enter(prog);
2935
2936 if (start)
> 2937 bpf_trace_run2(tr_link->link.prog, ip, parent_ip);
2938
2939 if (prog->aux->sleepable)
2940 __bpf_prog_exit_sleepable(prog, start);
2941 else
2942 __bpf_prog_exit(prog, start);
2943 }
2944
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 37/37] drivers/gpu/arm/valhall/mali_kbase_fence.c:78:1: warning: no previous prototype for 'kbase_fence_wait_workaround'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: f293567065ecf09292c991d18f8fb2c884a16180
commit: f293567065ecf09292c991d18f8fb2c884a16180 [37/37] CHROMIUM: MALI: Set short timeout for kbase DMA fence
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout f293567065ecf09292c991d18f8fb2c884a16180
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm64
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 >>):
>> drivers/gpu/arm/valhall/mali_kbase_fence.c:78:1: warning: no previous prototype for 'kbase_fence_wait_workaround' [-Wmissing-prototypes]
78 | kbase_fence_wait_workaround(struct dma_fence *fence,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/arm/valhall/mali_kbase_defs.h:37,
from drivers/gpu/arm/valhall/mali_kbase.h:57,
from drivers/gpu/arm/valhall/mali_kbase_fence.h:36,
from drivers/gpu/arm/valhall/mali_kbase_fence.c:27:
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:625:33: warning: 'base_hw_issues_model_tE2x' defined but not used [-Wunused-const-variable=]
625 | static const enum base_hw_issue base_hw_issues_model_tE2x[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:615:33: warning: 'base_hw_issues_tE2x_r0p0' defined but not used [-Wunused-const-variable=]
615 | static const enum base_hw_issue base_hw_issues_tE2x_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:607:33: warning: 'base_hw_issues_model_tTUx' defined but not used [-Wunused-const-variable=]
607 | static const enum base_hw_issue base_hw_issues_model_tTUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:600:33: warning: 'base_hw_issues_tTUx_r0p0' defined but not used [-Wunused-const-variable=]
600 | static const enum base_hw_issue base_hw_issues_tTUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:592:33: warning: 'base_hw_issues_model_tVAx' defined but not used [-Wunused-const-variable=]
592 | static const enum base_hw_issue base_hw_issues_model_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:585:33: warning: 'base_hw_issues_tVAx_r0p0' defined but not used [-Wunused-const-variable=]
585 | static const enum base_hw_issue base_hw_issues_tVAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:577:33: warning: 'base_hw_issues_model_tGRx' defined but not used [-Wunused-const-variable=]
577 | static const enum base_hw_issue base_hw_issues_model_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:570:33: warning: 'base_hw_issues_tGRx_r0p0' defined but not used [-Wunused-const-variable=]
570 | static const enum base_hw_issue base_hw_issues_tGRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:562:33: warning: 'base_hw_issues_model_tODx' defined but not used [-Wunused-const-variable=]
562 | static const enum base_hw_issue base_hw_issues_model_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:555:33: warning: 'base_hw_issues_tODx_r0p0' defined but not used [-Wunused-const-variable=]
555 | static const enum base_hw_issue base_hw_issues_tODx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:545:33: warning: 'base_hw_issues_model_tDUx' defined but not used [-Wunused-const-variable=]
545 | static const enum base_hw_issue base_hw_issues_model_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:535:33: warning: 'base_hw_issues_tDUx_r0p0' defined but not used [-Wunused-const-variable=]
535 | static const enum base_hw_issue base_hw_issues_tDUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:522:33: warning: 'base_hw_issues_lBEx_r1p1' defined but not used [-Wunused-const-variable=]
522 | static const enum base_hw_issue base_hw_issues_lBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:508:33: warning: 'base_hw_issues_lBEx_r1p0' defined but not used [-Wunused-const-variable=]
508 | static const enum base_hw_issue base_hw_issues_lBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:496:33: warning: 'base_hw_issues_model_tBEx' defined but not used [-Wunused-const-variable=]
496 | static const enum base_hw_issue base_hw_issues_model_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:483:33: warning: 'base_hw_issues_tBEx_r1p1' defined but not used [-Wunused-const-variable=]
483 | static const enum base_hw_issue base_hw_issues_tBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:470:33: warning: 'base_hw_issues_tBEx_r1p0' defined but not used [-Wunused-const-variable=]
470 | static const enum base_hw_issue base_hw_issues_tBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:457:33: warning: 'base_hw_issues_tBEx_r0p1' defined but not used [-Wunused-const-variable=]
457 | static const enum base_hw_issue base_hw_issues_tBEx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:443:33: warning: 'base_hw_issues_tBEx_r0p0' defined but not used [-Wunused-const-variable=]
443 | static const enum base_hw_issue base_hw_issues_tBEx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:431:33: warning: 'base_hw_issues_model_tNAx' defined but not used [-Wunused-const-variable=]
431 | static const enum base_hw_issue base_hw_issues_model_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:416:33: warning: 'base_hw_issues_tNAx_r0p1' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_issue base_hw_issues_tNAx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:400:33: warning: 'base_hw_issues_tNAx_r0p0' defined but not used [-Wunused-const-variable=]
400 | static const enum base_hw_issue base_hw_issues_tNAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:388:33: warning: 'base_hw_issues_model_tTRx' defined but not used [-Wunused-const-variable=]
388 | static const enum base_hw_issue base_hw_issues_model_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:373:33: warning: 'base_hw_issues_tTRx_r0p2' defined but not used [-Wunused-const-variable=]
373 | static const enum base_hw_issue base_hw_issues_tTRx_r0p2[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:357:33: warning: 'base_hw_issues_tTRx_r0p1' defined but not used [-Wunused-const-variable=]
357 | static const enum base_hw_issue base_hw_issues_tTRx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:341:33: warning: 'base_hw_issues_tTRx_r0p0' defined but not used [-Wunused-const-variable=]
341 | static const enum base_hw_issue base_hw_issues_tTRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:331:33: warning: 'base_hw_issues_model_tGOx' defined but not used [-Wunused-const-variable=]
331 | static const enum base_hw_issue base_hw_issues_model_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:319:33: warning: 'base_hw_issues_tGOx_r1p0' defined but not used [-Wunused-const-variable=]
319 | static const enum base_hw_issue base_hw_issues_tGOx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:307:33: warning: 'base_hw_issues_tGOx_r0p0' defined but not used [-Wunused-const-variable=]
307 | static const enum base_hw_issue base_hw_issues_tGOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:297:33: warning: 'base_hw_issues_model_tNOx' defined but not used [-Wunused-const-variable=]
297 | static const enum base_hw_issue base_hw_issues_model_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:285:33: warning: 'base_hw_issues_tNOx_r0p0' defined but not used [-Wunused-const-variable=]
285 | static const enum base_hw_issue base_hw_issues_tNOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:275:33: warning: 'base_hw_issues_model_tDVx' defined but not used [-Wunused-const-variable=]
vim +/kbase_fence_wait_workaround +78 drivers/gpu/arm/valhall/mali_kbase_fence.c
76
77 signed long
> 78 kbase_fence_wait_workaround(struct dma_fence *fence,
79 bool intr,
80 signed long timeout)
81 {
82 /* TODO(fshao): b:175656896: sometimes the screen hangs because the DMA
83 * fences don't get signaled, which triggers system reboot in the end.
84 *
85 * This is a workaround to shorten the wait time of the fence, so the
86 * screen can recover from hanging when the issue happens.
87 *
88 * To properly address this issue we need to first find out which
89 * component is responsible for signaling the Mali DMA fences, but
90 * unfortunately there's no easy way to do that AFAIK.
91 */
92 signed long ret;
93
94 ret = dma_fence_default_wait(fence, intr, msecs_to_jiffies(100));
95 if (ret == 0)
96 pr_err("%s: dma fence wait timed out.", __func__);
97 return ret;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
kernel/sched/core.c:2709:20: warning: unused function 'rq_has_pinned_tasks'
by kernel test robot
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7f75285ca572eaabc028cf78c6ab5473d0d160be
commit: 3015ef4b98f53fe7eba4f5f82f562c0e074d213c sched/core: Make migrate disable and CPU hotplug cooperative
date: 5 months ago
config: mips-randconfig-r023-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# 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 3015ef4b98f53fe7eba4f5f82f562c0e074d213c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
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 >>):
kernel/sched/core.c:4984:35: warning: no previous prototype for function 'schedule_user'
asmlinkage __visible void __sched schedule_user(void)
^
kernel/sched/core.c:4984:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage __visible void __sched schedule_user(void)
^
static
kernel/sched/core.c:324:1: warning: unused function 'rq_csd_init'
rq_csd_init(struct rq call_single_data_t smp_call_func_t func)
^
kernel/sched/core.c:2704:20: warning: unused function 'is_migration_disabled'
static inline bool is_migration_disabled(struct task_struct
^
>> kernel/sched/core.c:2709:20: warning: unused function 'rq_has_pinned_tasks'
static inline bool rq_has_pinned_tasks(struct rq
^
kernel/sched/core.c:4496:20: warning: unused function 'sched_tick_start'
static inline void sched_tick_start(int cpu) { }
^
kernel/sched/core.c:4497:20: warning: unused function 'sched_tick_stop'
static inline void sched_tick_stop(int cpu) { }
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __cmpxchg_asm
bne $0, ${3:z}, 2f
.set pop
move $$1, ${4:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
2: .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-6a18cc23ef/bin
clang-13: note: diagnostic msg:
Makefile arch include kernel scripts source usr
vim +/rq_has_pinned_tasks +2709 kernel/sched/core.c
2708
> 2709 static inline bool rq_has_pinned_tasks(struct rq *rq)
2710 {
2711 return false;
2712 }
2713
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[peterz-queue:perf/hybrid 17/26] arch/x86/events/core.c:2121:17: error: implicit declaration of function 'get_this_hybrid_cpu_type'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/hybrid
head: d8d36d49b08781039deaf70e63f661cf55d28d2a
commit: a90ca7c4fc7dbada15912371642b1bb9e24b2b25 [17/26] perf/x86: Register hybrid PMUs
config: i386-randconfig-s001-20210414 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/hybrid
git checkout a90ca7c4fc7dbada15912371642b1bb9e24b2b25
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
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 >>):
arch/x86/events/core.c: In function 'init_hw_perf_events':
>> arch/x86/events/core.c:2121:17: error: implicit declaration of function 'get_this_hybrid_cpu_type' [-Werror=implicit-function-declaration]
2121 | u8 cpu_type = get_this_hybrid_cpu_type();
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/get_this_hybrid_cpu_type +2121 arch/x86/events/core.c
2021
2022 static int __init init_hw_perf_events(void)
2023 {
2024 struct x86_pmu_quirk *quirk;
2025 int err;
2026
2027 pr_info("Performance Events: ");
2028
2029 switch (boot_cpu_data.x86_vendor) {
2030 case X86_VENDOR_INTEL:
2031 err = intel_pmu_init();
2032 break;
2033 case X86_VENDOR_AMD:
2034 err = amd_pmu_init();
2035 break;
2036 case X86_VENDOR_HYGON:
2037 err = amd_pmu_init();
2038 x86_pmu.name = "HYGON";
2039 break;
2040 case X86_VENDOR_ZHAOXIN:
2041 case X86_VENDOR_CENTAUR:
2042 err = zhaoxin_pmu_init();
2043 break;
2044 default:
2045 err = -ENOTSUPP;
2046 }
2047 if (err != 0) {
2048 pr_cont("no PMU driver, software events only.\n");
2049 return 0;
2050 }
2051
2052 pmu_check_apic();
2053
2054 /* sanity check that the hardware exists or is emulated */
2055 if (!check_hw_exists(&pmu, x86_pmu.num_counters, x86_pmu.num_counters_fixed))
2056 return 0;
2057
2058 pr_cont("%s PMU driver.\n", x86_pmu.name);
2059
2060 x86_pmu.attr_rdpmc = 1; /* enable userspace RDPMC usage by default */
2061
2062 for (quirk = x86_pmu.quirks; quirk; quirk = quirk->next)
2063 quirk->func();
2064
2065 if (!x86_pmu.intel_ctrl)
2066 x86_pmu.intel_ctrl = (1 << x86_pmu.num_counters) - 1;
2067
2068 perf_events_lapic_init();
2069 register_nmi_handler(NMI_LOCAL, perf_event_nmi_handler, 0, "PMI");
2070
2071 unconstrained = (struct event_constraint)
2072 __EVENT_CONSTRAINT(0, (1ULL << x86_pmu.num_counters) - 1,
2073 0, x86_pmu.num_counters, 0, 0);
2074
2075 x86_pmu_format_group.attrs = x86_pmu.format_attrs;
2076
2077 if (!x86_pmu.events_sysfs_show)
2078 x86_pmu_events_group.attrs = &empty_attrs;
2079
2080 pmu.attr_update = x86_pmu.attr_update;
2081
2082 if (!is_hybrid()) {
2083 x86_pmu_show_pmu_cap(x86_pmu.num_counters,
2084 x86_pmu.num_counters_fixed,
2085 x86_pmu.intel_ctrl);
2086 }
2087
2088 if (!x86_pmu.read)
2089 x86_pmu.read = _x86_pmu_read;
2090
2091 if (!x86_pmu.guest_get_msrs)
2092 x86_pmu.guest_get_msrs = (void *)&__static_call_return0;
2093
2094 x86_pmu_static_call_update();
2095
2096 /*
2097 * Install callbacks. Core will call them for each online
2098 * cpu.
2099 */
2100 err = cpuhp_setup_state(CPUHP_PERF_X86_PREPARE, "perf/x86:prepare",
2101 x86_pmu_prepare_cpu, x86_pmu_dead_cpu);
2102 if (err)
2103 return err;
2104
2105 err = cpuhp_setup_state(CPUHP_AP_PERF_X86_STARTING,
2106 "perf/x86:starting", x86_pmu_starting_cpu,
2107 x86_pmu_dying_cpu);
2108 if (err)
2109 goto out;
2110
2111 err = cpuhp_setup_state(CPUHP_AP_PERF_X86_ONLINE, "perf/x86:online",
2112 x86_pmu_online_cpu, NULL);
2113 if (err)
2114 goto out1;
2115
2116 if (!is_hybrid()) {
2117 err = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);
2118 if (err)
2119 goto out2;
2120 } else {
> 2121 u8 cpu_type = get_this_hybrid_cpu_type();
2122 struct x86_hybrid_pmu *hybrid_pmu;
2123 int i, j;
2124
2125 if (!cpu_type && x86_pmu.get_hybrid_cpu_type)
2126 cpu_type = x86_pmu.get_hybrid_cpu_type();
2127
2128 for (i = 0; i < x86_pmu.num_hybrid_pmus; i++) {
2129 hybrid_pmu = &x86_pmu.hybrid_pmu[i];
2130
2131 hybrid_pmu->pmu = pmu;
2132 hybrid_pmu->pmu.type = -1;
2133 hybrid_pmu->pmu.attr_update = x86_pmu.attr_update;
2134 hybrid_pmu->pmu.capabilities |= PERF_PMU_CAP_HETEROGENEOUS_CPUS;
2135
2136 err = perf_pmu_register(&hybrid_pmu->pmu, hybrid_pmu->name,
2137 (hybrid_pmu->cpu_type == hybrid_big) ? PERF_TYPE_RAW : -1);
2138 if (err)
2139 break;
2140
2141 if (cpu_type == hybrid_pmu->cpu_type)
2142 x86_pmu_update_cpu_context(&hybrid_pmu->pmu, raw_smp_processor_id());
2143 }
2144
2145 if (i < x86_pmu.num_hybrid_pmus) {
2146 for (j = 0; j < i; j++)
2147 perf_pmu_unregister(&x86_pmu.hybrid_pmu[j].pmu);
2148 pr_warn("Failed to register hybrid PMUs\n");
2149 kfree(x86_pmu.hybrid_pmu);
2150 x86_pmu.hybrid_pmu = NULL;
2151 x86_pmu.num_hybrid_pmus = 0;
2152 goto out2;
2153 }
2154 }
2155
2156 return 0;
2157
2158 out2:
2159 cpuhp_remove_state(CPUHP_AP_PERF_X86_ONLINE);
2160 out1:
2161 cpuhp_remove_state(CPUHP_AP_PERF_X86_STARTING);
2162 out:
2163 cpuhp_remove_state(CPUHP_PERF_X86_PREPARE);
2164 return err;
2165 }
2166 early_initcall(init_hw_perf_events);
2167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
mm/vmalloc.c:472:1: warning: unused function 'compute_subtree_max_size'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7f75285ca572eaabc028cf78c6ab5473d0d160be
commit: 15ae144f77027db35fad168f24a1b9469dcf70a7 mm/vmalloc: switch to "propagate()" callback
date: 8 months ago
config: mips-randconfig-r023-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# 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 15ae144f77027db35fad168f24a1b9469dcf70a7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
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 >>):
mm/vmalloc.c:1300:6: warning: no previous prototype for function 'set_iounmap_nonlazy'
void set_iounmap_nonlazy(void)
^
mm/vmalloc.c:1300:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void set_iounmap_nonlazy(void)
^
static
>> mm/vmalloc.c:472:1: warning: unused function 'compute_subtree_max_size'
compute_subtree_max_size(struct vmap_area
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 80, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __xchg_asm
.set pop
move $$1, ${3:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-9829f5e6b1/bin
clang-13: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound source usr virt
vim +/compute_subtree_max_size +472 mm/vmalloc.c
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 467)
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 468) /*
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 469) * Gets called when remove the node and rotate.
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 470) */
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 471) static __always_inline unsigned long
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 @472) compute_subtree_max_size(struct vmap_area *va)
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 473) {
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 474) return max3(va_size(va),
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 475) get_subtree_max_size(va->rb_node.rb_left),
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 476) get_subtree_max_size(va->rb_node.rb_right));
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 477) }
68ad4a33043353 Uladzislau Rezki (Sony 2019-05-17 478)
:::::: The code at line 472 was first introduced by commit
:::::: 68ad4a3304335358f95a417f2a2b0c909e5119c4 mm/vmalloc.c: keep track of free blocks for vmap allocation
:::::: TO: Uladzislau Rezki (Sony) <urezki(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 652/12695] kernel/bpf/verifier.c:11541:12: warning: stack frame size of 2160 bytes in function 'do_misc_fixups'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 1c8ce959b41a18b9657eaafd7a1215a8da67d3ab
commit: e6ac593372aadacc14e02b198e4a1acfef1db595 [652/12695] bpf: Rename fixup_bpf_calls and add some comments
config: powerpc64-randconfig-r034-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout e6ac593372aadacc14e02b198e4a1acfef1db595
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
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 >>):
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:9:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:206:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:9:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:208:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:9:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:210:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:9:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:212:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/bpf/verifier.c:12:
In file included from include/linux/bpf_verifier.h:9:
In file included from include/linux/filter.h:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:214:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> kernel/bpf/verifier.c:11541:12: warning: stack frame size of 2160 bytes in function 'do_misc_fixups' [-Wframe-larger-than=]
static int do_misc_fixups(struct bpf_verifier_env *env)
^
kernel/bpf/verifier.c:9848:12: warning: stack frame size of 5328 bytes in function 'do_check' [-Wframe-larger-than=]
static int do_check(struct bpf_verifier_env *env)
^
14 warnings generated.
vim +/do_misc_fixups +11541 kernel/bpf/verifier.c
11537
11538 /* Do various post-verification rewrites in a single program pass.
11539 * These rewrites simplify JIT and interpreter implementations.
11540 */
11541 static int do_misc_fixups(struct bpf_verifier_env *env)
11542 {
11543 struct bpf_prog *prog = env->prog;
11544 bool expect_blinding = bpf_jit_blinding_enabled(prog);
11545 struct bpf_insn *insn = prog->insnsi;
11546 const struct bpf_func_proto *fn;
11547 const int insn_cnt = prog->len;
11548 const struct bpf_map_ops *ops;
11549 struct bpf_insn_aux_data *aux;
11550 struct bpf_insn insn_buf[16];
11551 struct bpf_prog *new_prog;
11552 struct bpf_map *map_ptr;
11553 int i, ret, cnt, delta = 0;
11554
11555 for (i = 0; i < insn_cnt; i++, insn++) {
11556 /* Make divide-by-zero exceptions impossible. */
11557 if (insn->code == (BPF_ALU64 | BPF_MOD | BPF_X) ||
11558 insn->code == (BPF_ALU64 | BPF_DIV | BPF_X) ||
11559 insn->code == (BPF_ALU | BPF_MOD | BPF_X) ||
11560 insn->code == (BPF_ALU | BPF_DIV | BPF_X)) {
11561 bool is64 = BPF_CLASS(insn->code) == BPF_ALU64;
11562 bool isdiv = BPF_OP(insn->code) == BPF_DIV;
11563 struct bpf_insn *patchlet;
11564 struct bpf_insn chk_and_div[] = {
11565 /* [R,W]x div 0 -> 0 */
11566 BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
11567 BPF_JNE | BPF_K, insn->src_reg,
11568 0, 2, 0),
11569 BPF_ALU32_REG(BPF_XOR, insn->dst_reg, insn->dst_reg),
11570 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
11571 *insn,
11572 };
11573 struct bpf_insn chk_and_mod[] = {
11574 /* [R,W]x mod 0 -> [R,W]x */
11575 BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
11576 BPF_JEQ | BPF_K, insn->src_reg,
11577 0, 1 + (is64 ? 0 : 1), 0),
11578 *insn,
11579 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
11580 BPF_MOV32_REG(insn->dst_reg, insn->dst_reg),
11581 };
11582
11583 patchlet = isdiv ? chk_and_div : chk_and_mod;
11584 cnt = isdiv ? ARRAY_SIZE(chk_and_div) :
11585 ARRAY_SIZE(chk_and_mod) - (is64 ? 2 : 0);
11586
11587 new_prog = bpf_patch_insn_data(env, i + delta, patchlet, cnt);
11588 if (!new_prog)
11589 return -ENOMEM;
11590
11591 delta += cnt - 1;
11592 env->prog = prog = new_prog;
11593 insn = new_prog->insnsi + i + delta;
11594 continue;
11595 }
11596
11597 /* Implement LD_ABS and LD_IND with a rewrite, if supported by the program type. */
11598 if (BPF_CLASS(insn->code) == BPF_LD &&
11599 (BPF_MODE(insn->code) == BPF_ABS ||
11600 BPF_MODE(insn->code) == BPF_IND)) {
11601 cnt = env->ops->gen_ld_abs(insn, insn_buf);
11602 if (cnt == 0 || cnt >= ARRAY_SIZE(insn_buf)) {
11603 verbose(env, "bpf verifier is misconfigured\n");
11604 return -EINVAL;
11605 }
11606
11607 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
11608 if (!new_prog)
11609 return -ENOMEM;
11610
11611 delta += cnt - 1;
11612 env->prog = prog = new_prog;
11613 insn = new_prog->insnsi + i + delta;
11614 continue;
11615 }
11616
11617 /* Rewrite pointer arithmetic to mitigate speculation attacks. */
11618 if (insn->code == (BPF_ALU64 | BPF_ADD | BPF_X) ||
11619 insn->code == (BPF_ALU64 | BPF_SUB | BPF_X)) {
11620 const u8 code_add = BPF_ALU64 | BPF_ADD | BPF_X;
11621 const u8 code_sub = BPF_ALU64 | BPF_SUB | BPF_X;
11622 struct bpf_insn insn_buf[16];
11623 struct bpf_insn *patch = &insn_buf[0];
11624 bool issrc, isneg;
11625 u32 off_reg;
11626
11627 aux = &env->insn_aux_data[i + delta];
11628 if (!aux->alu_state ||
11629 aux->alu_state == BPF_ALU_NON_POINTER)
11630 continue;
11631
11632 isneg = aux->alu_state & BPF_ALU_NEG_VALUE;
11633 issrc = (aux->alu_state & BPF_ALU_SANITIZE) ==
11634 BPF_ALU_SANITIZE_SRC;
11635
11636 off_reg = issrc ? insn->src_reg : insn->dst_reg;
11637 if (isneg)
11638 *patch++ = BPF_ALU64_IMM(BPF_MUL, off_reg, -1);
11639 *patch++ = BPF_MOV32_IMM(BPF_REG_AX, aux->alu_limit - 1);
11640 *patch++ = BPF_ALU64_REG(BPF_SUB, BPF_REG_AX, off_reg);
11641 *patch++ = BPF_ALU64_REG(BPF_OR, BPF_REG_AX, off_reg);
11642 *patch++ = BPF_ALU64_IMM(BPF_NEG, BPF_REG_AX, 0);
11643 *patch++ = BPF_ALU64_IMM(BPF_ARSH, BPF_REG_AX, 63);
11644 if (issrc) {
11645 *patch++ = BPF_ALU64_REG(BPF_AND, BPF_REG_AX,
11646 off_reg);
11647 insn->src_reg = BPF_REG_AX;
11648 } else {
11649 *patch++ = BPF_ALU64_REG(BPF_AND, off_reg,
11650 BPF_REG_AX);
11651 }
11652 if (isneg)
11653 insn->code = insn->code == code_add ?
11654 code_sub : code_add;
11655 *patch++ = *insn;
11656 if (issrc && isneg)
11657 *patch++ = BPF_ALU64_IMM(BPF_MUL, off_reg, -1);
11658 cnt = patch - insn_buf;
11659
11660 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
11661 if (!new_prog)
11662 return -ENOMEM;
11663
11664 delta += cnt - 1;
11665 env->prog = prog = new_prog;
11666 insn = new_prog->insnsi + i + delta;
11667 continue;
11668 }
11669
11670 if (insn->code != (BPF_JMP | BPF_CALL))
11671 continue;
11672 if (insn->src_reg == BPF_PSEUDO_CALL)
11673 continue;
11674
11675 if (insn->imm == BPF_FUNC_get_route_realm)
11676 prog->dst_needed = 1;
11677 if (insn->imm == BPF_FUNC_get_prandom_u32)
11678 bpf_user_rnd_init_once();
11679 if (insn->imm == BPF_FUNC_override_return)
11680 prog->kprobe_override = 1;
11681 if (insn->imm == BPF_FUNC_tail_call) {
11682 /* If we tail call into other programs, we
11683 * cannot make any assumptions since they can
11684 * be replaced dynamically during runtime in
11685 * the program array.
11686 */
11687 prog->cb_access = 1;
11688 if (!allow_tail_call_in_subprogs(env))
11689 prog->aux->stack_depth = MAX_BPF_STACK;
11690 prog->aux->max_pkt_offset = MAX_PACKET_OFF;
11691
11692 /* mark bpf_tail_call as different opcode to avoid
11693 * conditional branch in the interpeter for every normal
11694 * call and to prevent accidental JITing by JIT compiler
11695 * that doesn't support bpf_tail_call yet
11696 */
11697 insn->imm = 0;
11698 insn->code = BPF_JMP | BPF_TAIL_CALL;
11699
11700 aux = &env->insn_aux_data[i + delta];
11701 if (env->bpf_capable && !expect_blinding &&
11702 prog->jit_requested &&
11703 !bpf_map_key_poisoned(aux) &&
11704 !bpf_map_ptr_poisoned(aux) &&
11705 !bpf_map_ptr_unpriv(aux)) {
11706 struct bpf_jit_poke_descriptor desc = {
11707 .reason = BPF_POKE_REASON_TAIL_CALL,
11708 .tail_call.map = BPF_MAP_PTR(aux->map_ptr_state),
11709 .tail_call.key = bpf_map_key_immediate(aux),
11710 .insn_idx = i + delta,
11711 };
11712
11713 ret = bpf_jit_add_poke_descriptor(prog, &desc);
11714 if (ret < 0) {
11715 verbose(env, "adding tail call poke descriptor failed\n");
11716 return ret;
11717 }
11718
11719 insn->imm = ret + 1;
11720 continue;
11721 }
11722
11723 if (!bpf_map_ptr_unpriv(aux))
11724 continue;
11725
11726 /* instead of changing every JIT dealing with tail_call
11727 * emit two extra insns:
11728 * if (index >= max_entries) goto out;
11729 * index &= array->index_mask;
11730 * to avoid out-of-bounds cpu speculation
11731 */
11732 if (bpf_map_ptr_poisoned(aux)) {
11733 verbose(env, "tail_call abusing map_ptr\n");
11734 return -EINVAL;
11735 }
11736
11737 map_ptr = BPF_MAP_PTR(aux->map_ptr_state);
11738 insn_buf[0] = BPF_JMP_IMM(BPF_JGE, BPF_REG_3,
11739 map_ptr->max_entries, 2);
11740 insn_buf[1] = BPF_ALU32_IMM(BPF_AND, BPF_REG_3,
11741 container_of(map_ptr,
11742 struct bpf_array,
11743 map)->index_mask);
11744 insn_buf[2] = *insn;
11745 cnt = 3;
11746 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
11747 if (!new_prog)
11748 return -ENOMEM;
11749
11750 delta += cnt - 1;
11751 env->prog = prog = new_prog;
11752 insn = new_prog->insnsi + i + delta;
11753 continue;
11754 }
11755
11756 /* BPF_EMIT_CALL() assumptions in some of the map_gen_lookup
11757 * and other inlining handlers are currently limited to 64 bit
11758 * only.
11759 */
11760 if (prog->jit_requested && BITS_PER_LONG == 64 &&
11761 (insn->imm == BPF_FUNC_map_lookup_elem ||
11762 insn->imm == BPF_FUNC_map_update_elem ||
11763 insn->imm == BPF_FUNC_map_delete_elem ||
11764 insn->imm == BPF_FUNC_map_push_elem ||
11765 insn->imm == BPF_FUNC_map_pop_elem ||
11766 insn->imm == BPF_FUNC_map_peek_elem)) {
11767 aux = &env->insn_aux_data[i + delta];
11768 if (bpf_map_ptr_poisoned(aux))
11769 goto patch_call_imm;
11770
11771 map_ptr = BPF_MAP_PTR(aux->map_ptr_state);
11772 ops = map_ptr->ops;
11773 if (insn->imm == BPF_FUNC_map_lookup_elem &&
11774 ops->map_gen_lookup) {
11775 cnt = ops->map_gen_lookup(map_ptr, insn_buf);
11776 if (cnt == -EOPNOTSUPP)
11777 goto patch_map_ops_generic;
11778 if (cnt <= 0 || cnt >= ARRAY_SIZE(insn_buf)) {
11779 verbose(env, "bpf verifier is misconfigured\n");
11780 return -EINVAL;
11781 }
11782
11783 new_prog = bpf_patch_insn_data(env, i + delta,
11784 insn_buf, cnt);
11785 if (!new_prog)
11786 return -ENOMEM;
11787
11788 delta += cnt - 1;
11789 env->prog = prog = new_prog;
11790 insn = new_prog->insnsi + i + delta;
11791 continue;
11792 }
11793
11794 BUILD_BUG_ON(!__same_type(ops->map_lookup_elem,
11795 (void *(*)(struct bpf_map *map, void *key))NULL));
11796 BUILD_BUG_ON(!__same_type(ops->map_delete_elem,
11797 (int (*)(struct bpf_map *map, void *key))NULL));
11798 BUILD_BUG_ON(!__same_type(ops->map_update_elem,
11799 (int (*)(struct bpf_map *map, void *key, void *value,
11800 u64 flags))NULL));
11801 BUILD_BUG_ON(!__same_type(ops->map_push_elem,
11802 (int (*)(struct bpf_map *map, void *value,
11803 u64 flags))NULL));
11804 BUILD_BUG_ON(!__same_type(ops->map_pop_elem,
11805 (int (*)(struct bpf_map *map, void *value))NULL));
11806 BUILD_BUG_ON(!__same_type(ops->map_peek_elem,
11807 (int (*)(struct bpf_map *map, void *value))NULL));
11808 patch_map_ops_generic:
11809 switch (insn->imm) {
11810 case BPF_FUNC_map_lookup_elem:
11811 insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
11812 __bpf_call_base;
11813 continue;
11814 case BPF_FUNC_map_update_elem:
11815 insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
11816 __bpf_call_base;
11817 continue;
11818 case BPF_FUNC_map_delete_elem:
11819 insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
11820 __bpf_call_base;
11821 continue;
11822 case BPF_FUNC_map_push_elem:
11823 insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
11824 __bpf_call_base;
11825 continue;
11826 case BPF_FUNC_map_pop_elem:
11827 insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
11828 __bpf_call_base;
11829 continue;
11830 case BPF_FUNC_map_peek_elem:
11831 insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
11832 __bpf_call_base;
11833 continue;
11834 }
11835
11836 goto patch_call_imm;
11837 }
11838
11839 /* Implement bpf_jiffies64 inline. */
11840 if (prog->jit_requested && BITS_PER_LONG == 64 &&
11841 insn->imm == BPF_FUNC_jiffies64) {
11842 struct bpf_insn ld_jiffies_addr[2] = {
11843 BPF_LD_IMM64(BPF_REG_0,
11844 (unsigned long)&jiffies),
11845 };
11846
11847 insn_buf[0] = ld_jiffies_addr[0];
11848 insn_buf[1] = ld_jiffies_addr[1];
11849 insn_buf[2] = BPF_LDX_MEM(BPF_DW, BPF_REG_0,
11850 BPF_REG_0, 0);
11851 cnt = 3;
11852
11853 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf,
11854 cnt);
11855 if (!new_prog)
11856 return -ENOMEM;
11857
11858 delta += cnt - 1;
11859 env->prog = prog = new_prog;
11860 insn = new_prog->insnsi + i + delta;
11861 continue;
11862 }
11863
11864 patch_call_imm:
11865 fn = env->ops->get_func_proto(insn->imm, env->prog);
11866 /* all functions that have prototype and verifier allowed
11867 * programs to call them, must be real in-kernel functions
11868 */
11869 if (!fn->func) {
11870 verbose(env,
11871 "kernel subsystem misconfigured func %s#%d\n",
11872 func_id_name(insn->imm), insn->imm);
11873 return -EFAULT;
11874 }
11875 insn->imm = fn->func - __bpf_call_base;
11876 }
11877
11878 /* Since poke tab is now finalized, publish aux to tracker. */
11879 for (i = 0; i < prog->aux->size_poke_tab; i++) {
11880 map_ptr = prog->aux->poke_tab[i].tail_call.map;
11881 if (!map_ptr->ops->map_poke_track ||
11882 !map_ptr->ops->map_poke_untrack ||
11883 !map_ptr->ops->map_poke_run) {
11884 verbose(env, "bpf verifier is misconfigured\n");
11885 return -EINVAL;
11886 }
11887
11888 ret = map_ptr->ops->map_poke_track(map_ptr, prog->aux);
11889 if (ret < 0) {
11890 verbose(env, "tracking tail call prog failed\n");
11891 return ret;
11892 }
11893 }
11894
11895 return 0;
11896 }
11897
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v18 1/2] scsi: ufs: Enable power management for wlun
by kernel test robot
Hi Asutosh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next next-20210414]
[cannot apply to tip/perf/core v5.12-rc7]
[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/Asutosh-Das/Enable-power-managem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-a002-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/9bad6c1c707d2a9974aa90e3399e510ec...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Asutosh-Das/Enable-power-management-for-ufs-wlun/20210415-030146
git checkout 9bad6c1c707d2a9974aa90e3399e510ec06c77f2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
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 >>):
>> drivers/scsi/ufs/ufshcd.c:9136:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (pm_runtime_suspended(hba->dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9141:50: note: uninitialized use occurs here
trace_ufshcd_system_suspend(dev_name(hba->dev), ret,
^~~
drivers/scsi/ufs/ufshcd.c:9136:2: note: remove the 'if' if its condition is always false
if (pm_runtime_suspended(hba->dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9133:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
drivers/scsi/ufs/ufshcd.c:9160:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (pm_runtime_suspended(hba->dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9166:49: note: uninitialized use occurs here
trace_ufshcd_system_resume(dev_name(hba->dev), ret,
^~~
drivers/scsi/ufs/ufshcd.c:9160:2: note: remove the 'if' if its condition is always false
if (pm_runtime_suspended(hba->dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:9157:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
drivers/scsi/ufs/ufshcd.c:9679:12: warning: unused function 'ufshcd_rpmb_resume' [-Wunused-function]
static int ufshcd_rpmb_resume(struct device *dev)
^
3 warnings generated.
vim +9136 drivers/scsi/ufs/ufshcd.c
9121
9122 /**
9123 * ufshcd_system_suspend - system suspend routine
9124 * @hba: per adapter instance
9125 *
9126 * Check the description of ufshcd_suspend() function for more details.
9127 * Also check the description of __ufshcd_wl_suspend().
9128 *
9129 * Returns 0 for success and non-zero for failure
9130 */
9131 int ufshcd_system_suspend(struct ufs_hba *hba)
9132 {
9133 int ret;
9134 ktime_t start = ktime_get();
9135
> 9136 if (pm_runtime_suspended(hba->dev))
9137 goto out;
9138
9139 ret = ufshcd_suspend(hba);
9140 out:
9141 trace_ufshcd_system_suspend(dev_name(hba->dev), ret,
9142 ktime_to_us(ktime_sub(ktime_get(), start)),
9143 hba->curr_dev_pwr_mode, hba->uic_link_state);
9144 return ret;
9145 }
9146 EXPORT_SYMBOL(ufshcd_system_suspend);
9147
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[lee-mfd:ib-mfd-clk-gpio-regulator-rtc-5.13 13/16] drivers/regulator/bd71815-regulator.c:404:20: error: 'regulator_set_ramp_delay_regmap' undeclared here (not in a function); did you mean 'regulator_set_pull_down_regmap'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-clk-gpio-regulator-rtc-5.13
head: 5a8a64d9a38b9d3794f9f5e153fc0358b858cc24
commit: 1aad39001e851cd7ee2d811eb5fd4b044979d9d5 [13/16] regulator: Support ROHM BD71815 regulators
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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/lee/mfd.git/commit/?id=1a...
git remote add lee-mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
git fetch --no-tags lee-mfd ib-mfd-clk-gpio-regulator-rtc-5.13
git checkout 1aad39001e851cd7ee2d811eb5fd4b044979d9d5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
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 >>):
>> drivers/regulator/bd71815-regulator.c:404:20: error: 'regulator_set_ramp_delay_regmap' undeclared here (not in a function); did you mean 'regulator_set_pull_down_regmap'?
404 | .set_ramp_delay = regulator_set_ramp_delay_regmap,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| regulator_set_pull_down_regmap
>> drivers/regulator/bd71815-regulator.c:474:5: error: 'struct regulator_desc' has no member named 'ramp_reg'; did you mean 'ramp_delay'?
474 | .ramp_reg = (ereg), \
| ^~~~~~~~
drivers/regulator/bd71815-regulator.c:526:2: note: in expansion of macro 'BD71815_BUCK12_REG'
526 | BD71815_BUCK12_REG(buck1, BD71815_BUCK1, BD71815_REG_BUCK1_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:475:5: error: 'struct regulator_desc' has no member named 'ramp_mask'
475 | .ramp_mask = BD71815_BUCK_RAMPRATE_MASK, \
| ^~~~~~~~~
drivers/regulator/bd71815-regulator.c:526:2: note: in expansion of macro 'BD71815_BUCK12_REG'
526 | BD71815_BUCK12_REG(buck1, BD71815_BUCK1, BD71815_REG_BUCK1_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:476:5: error: 'struct regulator_desc' has no member named 'ramp_delay_table'; did you mean 'ramp_delay'?
476 | .ramp_delay_table = bd7181x_ramp_table, \
| ^~~~~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:526:2: note: in expansion of macro 'BD71815_BUCK12_REG'
526 | BD71815_BUCK12_REG(buck1, BD71815_BUCK1, BD71815_REG_BUCK1_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from drivers/regulator/bd71815-regulator.c:11:
include/linux/export.h:19:30: warning: the address of 'bd7181x_ramp_table' will always evaluate as 'true' [-Waddress]
19 | #define THIS_MODULE ((struct module *)0)
| ^~~~~~
drivers/regulator/bd71815-regulator.c:467:13: note: in expansion of macro 'THIS_MODULE'
467 | .owner = THIS_MODULE, \
| ^~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:526:2: note: in expansion of macro 'BD71815_BUCK12_REG'
526 | BD71815_BUCK12_REG(buck1, BD71815_BUCK1, BD71815_REG_BUCK1_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:477:5: error: 'struct regulator_desc' has no member named 'n_ramp_values'
477 | .n_ramp_values = ARRAY_SIZE(bd7181x_ramp_table),\
| ^~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:526:2: note: in expansion of macro 'BD71815_BUCK12_REG'
526 | BD71815_BUCK12_REG(buck1, BD71815_BUCK1, BD71815_REG_BUCK1_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:474:5: error: 'struct regulator_desc' has no member named 'ramp_reg'; did you mean 'ramp_delay'?
474 | .ramp_reg = (ereg), \
| ^~~~~~~~
drivers/regulator/bd71815-regulator.c:529:2: note: in expansion of macro 'BD71815_BUCK12_REG'
529 | BD71815_BUCK12_REG(buck2, BD71815_BUCK2, BD71815_REG_BUCK2_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:475:5: error: 'struct regulator_desc' has no member named 'ramp_mask'
475 | .ramp_mask = BD71815_BUCK_RAMPRATE_MASK, \
| ^~~~~~~~~
drivers/regulator/bd71815-regulator.c:529:2: note: in expansion of macro 'BD71815_BUCK12_REG'
529 | BD71815_BUCK12_REG(buck2, BD71815_BUCK2, BD71815_REG_BUCK2_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:476:5: error: 'struct regulator_desc' has no member named 'ramp_delay_table'; did you mean 'ramp_delay'?
476 | .ramp_delay_table = bd7181x_ramp_table, \
| ^~~~~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:529:2: note: in expansion of macro 'BD71815_BUCK12_REG'
529 | BD71815_BUCK12_REG(buck2, BD71815_BUCK2, BD71815_REG_BUCK2_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from drivers/regulator/bd71815-regulator.c:11:
include/linux/export.h:19:30: warning: the address of 'bd7181x_ramp_table' will always evaluate as 'true' [-Waddress]
19 | #define THIS_MODULE ((struct module *)0)
| ^~~~~~
drivers/regulator/bd71815-regulator.c:467:13: note: in expansion of macro 'THIS_MODULE'
467 | .owner = THIS_MODULE, \
| ^~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:529:2: note: in expansion of macro 'BD71815_BUCK12_REG'
529 | BD71815_BUCK12_REG(buck2, BD71815_BUCK2, BD71815_REG_BUCK2_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
>> drivers/regulator/bd71815-regulator.c:477:5: error: 'struct regulator_desc' has no member named 'n_ramp_values'
477 | .n_ramp_values = ARRAY_SIZE(bd7181x_ramp_table),\
| ^~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:529:2: note: in expansion of macro 'BD71815_BUCK12_REG'
529 | BD71815_BUCK12_REG(buck2, BD71815_BUCK2, BD71815_REG_BUCK2_VOLT_H,
| ^~~~~~~~~~~~~~~~~~
vim +404 drivers/regulator/bd71815-regulator.c
395
396 static const struct regulator_ops bd7181x_buck12_regulator_ops = {
397 .enable = regulator_enable_regmap,
398 .disable = regulator_disable_regmap,
399 .is_enabled = regulator_is_enabled_regmap,
400 .list_voltage = regulator_list_voltage_linear,
401 .set_voltage_sel = bd7181x_buck12_set_voltage_sel,
402 .get_voltage_sel = bd7181x_buck12_get_voltage_sel,
403 .set_voltage_time_sel = regulator_set_voltage_time_sel,
> 404 .set_ramp_delay = regulator_set_ramp_delay_regmap,
405 };
406
407 static const struct regulator_ops bd7181x_led_regulator_ops = {
408 .enable = regulator_enable_regmap,
409 .disable = regulator_disable_regmap,
410 .is_enabled = regulator_is_enabled_regmap,
411 .set_current_limit = bd7181x_led_set_current_limit,
412 .get_current_limit = regulator_get_current_limit_regmap,
413 };
414
415 #define BD71815_FIXED_REG(_name, _id, ereg, emsk, voltage, _dvs) \
416 [(_id)] = { \
417 .desc = { \
418 .name = #_name, \
419 .of_match = of_match_ptr(#_name), \
420 .regulators_node = of_match_ptr("regulators"), \
421 .n_voltages = 1, \
422 .ops = &bd7181x_fixed_regulator_ops, \
423 .type = REGULATOR_VOLTAGE, \
424 .id = (_id), \
425 .owner = THIS_MODULE, \
426 .min_uV = (voltage), \
427 .enable_reg = (ereg), \
428 .enable_mask = (emsk), \
429 .of_parse_cb = set_hw_dvs_levels, \
430 }, \
431 .dvs = (_dvs), \
432 }
433
434 #define BD71815_BUCK_REG(_name, _id, vsel, ereg, min, max, step, _dvs) \
435 [(_id)] = { \
436 .desc = { \
437 .name = #_name, \
438 .of_match = of_match_ptr(#_name), \
439 .regulators_node = of_match_ptr("regulators"), \
440 .n_voltages = ((max) - (min)) / (step) + 1, \
441 .ops = &bd7181x_buck_regulator_ops, \
442 .type = REGULATOR_VOLTAGE, \
443 .id = (_id), \
444 .owner = THIS_MODULE, \
445 .min_uV = (min), \
446 .uV_step = (step), \
447 .vsel_reg = (vsel), \
448 .vsel_mask = BD71815_VOLT_MASK, \
449 .enable_reg = (ereg), \
450 .enable_mask = BD71815_BUCK_RUN_ON, \
451 .of_parse_cb = set_hw_dvs_levels, \
452 }, \
453 .dvs = (_dvs), \
454 }
455
456 #define BD71815_BUCK12_REG(_name, _id, vsel, ereg, min, max, step, \
457 _dvs) \
458 [(_id)] = { \
459 .desc = { \
460 .name = #_name, \
461 .of_match = of_match_ptr(#_name), \
462 .regulators_node = of_match_ptr("regulators"), \
463 .n_voltages = ((max) - (min)) / (step) + 1, \
464 .ops = &bd7181x_buck12_regulator_ops, \
465 .type = REGULATOR_VOLTAGE, \
466 .id = (_id), \
467 .owner = THIS_MODULE, \
468 .min_uV = (min), \
469 .uV_step = (step), \
470 .vsel_reg = (vsel), \
471 .vsel_mask = 0x3f, \
472 .enable_reg = (ereg), \
473 .enable_mask = 0x04, \
> 474 .ramp_reg = (ereg), \
> 475 .ramp_mask = BD71815_BUCK_RAMPRATE_MASK, \
> 476 .ramp_delay_table = bd7181x_ramp_table, \
> 477 .n_ramp_values = ARRAY_SIZE(bd7181x_ramp_table),\
478 .of_parse_cb = buck12_set_hw_dvs_levels, \
479 }, \
480 .dvs = (_dvs), \
481 }
482
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months