net/bridge/br_private.h:901 br_multicast_rport_from_node_skb() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f4bc5bbb5fef3cf421ba3485d6d383c27ec473ed
commit: 9632233e7de8da43711bb7cd3e054af32fedcc38 net: bridge: multicast: factor out port multicast context
date: 7 months ago
config: openrisc-randconfig-m031-20220210 (https://download.01.org/0day-ci/archive/20220210/202202101038.9QptdYTn-lk...)
compiler: or1k-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
net/bridge/br_private.h:901 br_multicast_rport_from_node_skb() warn: inconsistent indenting
Old smatch warnings:
net/bridge/br_forward.c:317 br_multicast_flood() error: we previously assumed 'p' could be null (see line 293)
vim +901 net/bridge/br_private.h
890
891 static inline struct net_bridge_port *
892 br_multicast_rport_from_node_skb(struct hlist_node *rp, struct sk_buff *skb) {
893 struct net_bridge_mcast_port *mctx;
894
895 #if IS_ENABLED(CONFIG_IPV6)
896 if (skb->protocol == htons(ETH_P_IPV6))
897 mctx = hlist_entry_safe(rp, struct net_bridge_mcast_port,
898 ip6_rlist);
899 else
900 #endif
> 901 mctx = hlist_entry_safe(rp, struct net_bridge_mcast_port,
902 ip4_rlist);
903
904 if (mctx)
905 return mctx->port;
906 else
907 return NULL;
908 }
909
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[peterz-queue:perf/core 16/17] drivers/acpi/acpi_pad.c:168:4: error: implicit declaration of function 'perf_lopwr_cb'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: c23483152838201e7eb9d179d121e0ed0189269e
commit: e879a335a574ca071f76684b8160a56d9147db27 [16/17] ACPI: add perf low power callback
config: x86_64-randconfig-a012 (https://download.01.org/0day-ci/archive/20220210/202202100823.E5rjIvVT-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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/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/core
git checkout e879a335a574ca071f76684b8160a56d9147db27
# 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=x86_64 SHELL=/bin/bash drivers/
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/acpi/acpi_pad.c:168:4: error: implicit declaration of function 'perf_lopwr_cb' [-Werror,-Wimplicit-function-declaration]
perf_lopwr_cb(true);
^
1 error generated.
vim +/perf_lopwr_cb +168 drivers/acpi/acpi_pad.c
135
136 static unsigned int idle_pct = 5; /* percentage */
137 static unsigned int round_robin_time = 1; /* second */
138 static int power_saving_thread(void *data)
139 {
140 int do_sleep;
141 unsigned int tsk_index = (unsigned long)data;
142 u64 last_jiffies = 0;
143
144 sched_set_fifo_low(current);
145
146 while (!kthread_should_stop()) {
147 unsigned long expire_time;
148
149 /* round robin to cpus */
150 expire_time = last_jiffies + round_robin_time * HZ;
151 if (time_before(expire_time, jiffies)) {
152 last_jiffies = jiffies;
153 round_robin_cpu(tsk_index);
154 }
155
156 do_sleep = 0;
157
158 expire_time = jiffies + HZ * (100 - idle_pct) / 100;
159
160 while (!need_resched()) {
161 if (tsc_detected_unstable && !tsc_marked_unstable) {
162 /* TSC could halt in idle, so notify users */
163 mark_tsc_unstable("TSC halts in idle");
164 tsc_marked_unstable = 1;
165 }
166 local_irq_disable();
167
> 168 perf_lopwr_cb(true);
169
170 tick_broadcast_enable();
171 tick_broadcast_enter();
172 stop_critical_timings();
173
174 mwait_idle_with_hints(power_saving_mwait_eax, 1);
175
176 start_critical_timings();
177 tick_broadcast_exit();
178
179 perf_lopwr_cb(false);
180
181 local_irq_enable();
182
183 if (time_before(expire_time, jiffies)) {
184 do_sleep = 1;
185 break;
186 }
187 }
188
189 /*
190 * current sched_rt has threshold for rt task running time.
191 * When a rt task uses 95% CPU time, the rt thread will be
192 * scheduled out for 5% CPU time to not starve other tasks. But
193 * the mechanism only works when all CPUs have RT task running,
194 * as if one CPU hasn't RT task, RT task from other CPUs will
195 * borrow CPU time from this CPU and cause RT task use > 95%
196 * CPU time. To make 'avoid starvation' work, takes a nap here.
197 */
198 if (unlikely(do_sleep))
199 schedule_timeout_killable(HZ * idle_pct / 100);
200
201 /* If an external event has set the need_resched flag, then
202 * we need to deal with it, or this loop will continue to
203 * spin without calling __mwait().
204 */
205 if (unlikely(need_resched()))
206 schedule();
207 }
208
209 exit_round_robin(tsk_index);
210 return 0;
211 }
212
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[drm-misc:drm-misc-next 11/11] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5056:56: error: too few arguments to function call, expected 2, have 1
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: 3675c2f26f33ab4928859fb8950a4697a16be5c9
commit: 3675c2f26f33ab4928859fb8950a4697a16be5c9 [11/11] drm/amdgpu: Revert 'drm/amdgpu: annotate a false positive recursive locking'
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220210/202202100829.6oxshKjq-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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 drm-misc git://anongit.freedesktop.org/drm/drm-misc
git fetch --no-tags drm-misc drm-misc-next
git checkout 3675c2f26f33ab4928859fb8950a4697a16be5c9
# 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=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 >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1210:18: warning: result of comparison of constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
res->start > 0x100000000ull)
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5056:56: error: too few arguments to function call, expected 2, have 1
amdgpu_device_lock_reset_domain(tmp_adev->reset_domain);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_reset.h:121:6: note: 'amdgpu_device_lock_reset_domain' declared here
void amdgpu_device_lock_reset_domain(struct amdgpu_reset_domain *reset_domain,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5480:53: error: too few arguments to function call, expected 2, have 1
amdgpu_device_lock_reset_domain(adev->reset_domain);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_reset.h:121:6: note: 'amdgpu_device_lock_reset_domain' declared here
void amdgpu_device_lock_reset_domain(struct amdgpu_reset_domain *reset_domain,
^
1 warning and 2 errors generated.
vim +5056 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
4979
4980 /**
4981 * amdgpu_device_gpu_recover - reset the asic and recover scheduler
4982 *
4983 * @adev: amdgpu_device pointer
4984 * @job: which job trigger hang
4985 *
4986 * Attempt to reset the GPU if it has hung (all asics).
4987 * Attempt to do soft-reset or full-reset and reinitialize Asic
4988 * Returns 0 for success or an error on failure.
4989 */
4990
4991 int amdgpu_device_gpu_recover_imp(struct amdgpu_device *adev,
4992 struct amdgpu_job *job)
4993 {
4994 struct list_head device_list, *device_list_handle = NULL;
4995 bool job_signaled = false;
4996 struct amdgpu_hive_info *hive = NULL;
4997 struct amdgpu_device *tmp_adev = NULL;
4998 int i, r = 0;
4999 bool need_emergency_restart = false;
5000 bool audio_suspended = false;
5001 int tmp_vram_lost_counter;
5002 struct amdgpu_reset_context reset_context;
5003
5004 memset(&reset_context, 0, sizeof(reset_context));
5005
5006 /*
5007 * Special case: RAS triggered and full reset isn't supported
5008 */
5009 need_emergency_restart = amdgpu_ras_need_emergency_restart(adev);
5010
5011 /*
5012 * Flush RAM to disk so that after reboot
5013 * the user can read log and see why the system rebooted.
5014 */
5015 if (need_emergency_restart && amdgpu_ras_get_context(adev)->reboot) {
5016 DRM_WARN("Emergency reboot.");
5017
5018 ksys_sync_helper();
5019 emergency_restart();
5020 }
5021
5022 dev_info(adev->dev, "GPU %s begin!\n",
5023 need_emergency_restart ? "jobs stop":"reset");
5024
5025 if (!amdgpu_sriov_vf(adev))
5026 hive = amdgpu_get_xgmi_hive(adev);
5027 if (hive)
5028 mutex_lock(&hive->hive_lock);
5029
5030 reset_context.method = AMD_RESET_METHOD_NONE;
5031 reset_context.reset_req_dev = adev;
5032 reset_context.job = job;
5033 reset_context.hive = hive;
5034 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
5035
5036 /*
5037 * Build list of devices to reset.
5038 * In case we are in XGMI hive mode, resort the device list
5039 * to put adev in the 1st position.
5040 */
5041 INIT_LIST_HEAD(&device_list);
5042 if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1)) {
5043 list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head)
5044 list_add_tail(&tmp_adev->reset_list, &device_list);
5045 if (!list_is_first(&adev->reset_list, &device_list))
5046 list_rotate_to_front(&adev->reset_list, &device_list);
5047 device_list_handle = &device_list;
5048 } else {
5049 list_add_tail(&adev->reset_list, &device_list);
5050 device_list_handle = &device_list;
5051 }
5052
5053 /* We need to lock reset domain only once both for XGMI and single device */
5054 tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
5055 reset_list);
> 5056 amdgpu_device_lock_reset_domain(tmp_adev->reset_domain);
5057
5058 /* block all schedulers and reset given job's ring */
5059 list_for_each_entry(tmp_adev, device_list_handle, reset_list) {
5060
5061 amdgpu_device_set_mp1_state(tmp_adev);
5062
5063 /*
5064 * Try to put the audio codec into suspend state
5065 * before gpu reset started.
5066 *
5067 * Due to the power domain of the graphics device
5068 * is shared with AZ power domain. Without this,
5069 * we may change the audio hardware from behind
5070 * the audio driver's back. That will trigger
5071 * some audio codec errors.
5072 */
5073 if (!amdgpu_device_suspend_display_audio(tmp_adev))
5074 audio_suspended = true;
5075
5076 amdgpu_ras_set_error_query_ready(tmp_adev, false);
5077
5078 cancel_delayed_work_sync(&tmp_adev->delayed_init_work);
5079
5080 if (!amdgpu_sriov_vf(tmp_adev))
5081 amdgpu_amdkfd_pre_reset(tmp_adev);
5082
5083 /*
5084 * Mark these ASICs to be reseted as untracked first
5085 * And add them back after reset completed
5086 */
5087 amdgpu_unregister_gpu_instance(tmp_adev);
5088
5089 drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true);
5090
5091 /* disable ras on ALL IPs */
5092 if (!need_emergency_restart &&
5093 amdgpu_device_ip_need_full_reset(tmp_adev))
5094 amdgpu_ras_suspend(tmp_adev);
5095
5096 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
5097 struct amdgpu_ring *ring = tmp_adev->rings[i];
5098
5099 if (!ring || !ring->sched.thread)
5100 continue;
5101
5102 drm_sched_stop(&ring->sched, job ? &job->base : NULL);
5103
5104 if (need_emergency_restart)
5105 amdgpu_job_stop_all_jobs_on_sched(&ring->sched);
5106 }
5107 atomic_inc(&tmp_adev->gpu_reset_counter);
5108 }
5109
5110 if (need_emergency_restart)
5111 goto skip_sched_resume;
5112
5113 /*
5114 * Must check guilty signal here since after this point all old
5115 * HW fences are force signaled.
5116 *
5117 * job->base holds a reference to parent fence
5118 */
5119 if (job && job->base.s_fence->parent &&
5120 dma_fence_is_signaled(job->base.s_fence->parent)) {
5121 job_signaled = true;
5122 dev_info(adev->dev, "Guilty job already signaled, skipping HW reset");
5123 goto skip_hw_reset;
5124 }
5125
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week