Re: [PATCH v4 4/7] clocksource: dw_apb_timer: Set clockevent any-possible-CPU mask
by kbuild test robot
Hi Serge,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/timers/core]
[also build test WARNING on abelloni/rtc-next tip/irq/core linus/master v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Serge-Semin/clocksource-Fix-MIPS...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 4479730e9263befbb9ce9563a09563db2acb8f7c
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/apb_timer.c:147:46: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected char const *name @@ got intchar const *name @@
>> arch/x86/kernel/apb_timer.c:147:46: sparse: expected char const *name
>> arch/x86/kernel/apb_timer.c:147:46: sparse: got int [assigned] pscr_ret__
>> arch/x86/kernel/apb_timer.c:147:66: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int rating @@ got d int rating @@
>> arch/x86/kernel/apb_timer.c:147:66: sparse: expected unsigned int rating
>> arch/x86/kernel/apb_timer.c:147:66: sparse: got char *
>> arch/x86/kernel/apb_timer.c:148:71: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected void [noderef] <asn:2> *base @@ got > *base @@
>> arch/x86/kernel/apb_timer.c:148:71: sparse: expected void [noderef] <asn:2> *base
>> arch/x86/kernel/apb_timer.c:148:71: sparse: got int
>> arch/x86/kernel/apb_timer.c:150:31: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int irq @@ got void [noderef] <asn:int irq @@
>> arch/x86/kernel/apb_timer.c:150:31: sparse: expected int irq
>> arch/x86/kernel/apb_timer.c:150:31: sparse: got void [noderef] <asn:2> *
>> arch/x86/kernel/apb_timer.c:147:45: sparse: sparse: too many arguments for function dw_apb_clockevent_init
arch/x86/kernel/apb_timer.c:187:54: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected char const *name @@ got intchar const *name @@
arch/x86/kernel/apb_timer.c:187:54: sparse: expected char const *name
>> arch/x86/kernel/apb_timer.c:187:54: sparse: got int [assigned] cpu
arch/x86/kernel/apb_timer.c:187:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int rating @@ got d int rating @@
arch/x86/kernel/apb_timer.c:187:59: sparse: expected unsigned int rating
arch/x86/kernel/apb_timer.c:187:59: sparse: got char *
arch/x86/kernel/apb_timer.c:188:25: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected void [noderef] <asn:2> *base @@ got > *base @@
arch/x86/kernel/apb_timer.c:188:25: sparse: expected void [noderef] <asn:2> *base
arch/x86/kernel/apb_timer.c:188:25: sparse: got int
arch/x86/kernel/apb_timer.c:188:63: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int irq @@ got void [noderef] <asn:int irq @@
arch/x86/kernel/apb_timer.c:188:63: sparse: expected int irq
arch/x86/kernel/apb_timer.c:188:63: sparse: got void [noderef] <asn:2> *
arch/x86/kernel/apb_timer.c:187:53: sparse: sparse: too many arguments for function dw_apb_clockevent_init
>> arch/x86/kernel/apb_timer.c:147:46: sparse: sparse: non size-preserving integer to pointer cast
>> arch/x86/kernel/apb_timer.c:147:66: sparse: sparse: non size-preserving pointer to integer cast
arch/x86/kernel/apb_timer.c:187:54: sparse: sparse: non size-preserving integer to pointer cast
arch/x86/kernel/apb_timer.c:187:59: sparse: sparse: non size-preserving pointer to integer cast
vim +147 arch/x86/kernel/apb_timer.c
bb24c4716185f6 Jacob Pan 2009-09-02 133
bb24c4716185f6 Jacob Pan 2009-09-02 134 static int __init apbt_clockevent_register(void)
bb24c4716185f6 Jacob Pan 2009-09-02 135 {
bb24c4716185f6 Jacob Pan 2009-09-02 136 struct sfi_timer_table_entry *mtmr;
89cbc76768c2fa Christoph Lameter 2014-08-17 137 struct apbt_dev *adev = this_cpu_ptr(&cpu_apbt_dev);
bb24c4716185f6 Jacob Pan 2009-09-02 138
bb24c4716185f6 Jacob Pan 2009-09-02 139 mtmr = sfi_get_mtmr(APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 140 if (mtmr == NULL) {
bb24c4716185f6 Jacob Pan 2009-09-02 141 printk(KERN_ERR "Failed to get MTMR %d from SFI\n",
bb24c4716185f6 Jacob Pan 2009-09-02 142 APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 143 return -ENODEV;
bb24c4716185f6 Jacob Pan 2009-09-02 144 }
bb24c4716185f6 Jacob Pan 2009-09-02 145
3010673ef5f7be Jacob Pan 2010-03-02 146 adev->num = smp_processor_id();
06c3df49521c1b Jamie Iles 2011-06-06 @147 adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0",
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 @148 intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT ?
06c3df49521c1b Jamie Iles 2011-06-06 149 APBT_CLOCKEVENT_RATING - 100 : APBT_CLOCKEVENT_RATING,
06c3df49521c1b Jamie Iles 2011-06-06 @150 adev_virt_addr(adev), 0, apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 151 /* Firmware does EOI handling for us. */
06c3df49521c1b Jamie Iles 2011-06-06 152 adev->timer->eoi = NULL;
bb24c4716185f6 Jacob Pan 2009-09-02 153
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 154 if (intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT) {
06c3df49521c1b Jamie Iles 2011-06-06 155 global_clock_event = &adev->timer->ced;
bb24c4716185f6 Jacob Pan 2009-09-02 156 printk(KERN_DEBUG "%s clockevent registered as global\n",
bb24c4716185f6 Jacob Pan 2009-09-02 157 global_clock_event->name);
bb24c4716185f6 Jacob Pan 2009-09-02 158 }
bb24c4716185f6 Jacob Pan 2009-09-02 159
06c3df49521c1b Jamie Iles 2011-06-06 160 dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 161
bb24c4716185f6 Jacob Pan 2009-09-02 162 sfi_free_mtmr(mtmr);
bb24c4716185f6 Jacob Pan 2009-09-02 163 return 0;
bb24c4716185f6 Jacob Pan 2009-09-02 164 }
bb24c4716185f6 Jacob Pan 2009-09-02 165
bb24c4716185f6 Jacob Pan 2009-09-02 166 #ifdef CONFIG_SMP
a5ef2e70405c8a Thomas Gleixner 2010-09-28 167
a5ef2e70405c8a Thomas Gleixner 2010-09-28 168 static void apbt_setup_irq(struct apbt_dev *adev)
a5ef2e70405c8a Thomas Gleixner 2010-09-28 169 {
a5ef2e70405c8a Thomas Gleixner 2010-09-28 170 irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
e4d2ebcab11b30 Feng Tang 2010-12-03 171 irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
a5ef2e70405c8a Thomas Gleixner 2010-09-28 172 }
a5ef2e70405c8a Thomas Gleixner 2010-09-28 173
bb24c4716185f6 Jacob Pan 2009-09-02 174 /* Should be called with per cpu */
bb24c4716185f6 Jacob Pan 2009-09-02 175 void apbt_setup_secondary_clock(void)
bb24c4716185f6 Jacob Pan 2009-09-02 176 {
bb24c4716185f6 Jacob Pan 2009-09-02 177 struct apbt_dev *adev;
bb24c4716185f6 Jacob Pan 2009-09-02 178 int cpu;
bb24c4716185f6 Jacob Pan 2009-09-02 179
bb24c4716185f6 Jacob Pan 2009-09-02 180 /* Don't register boot CPU clockevent */
bb24c4716185f6 Jacob Pan 2009-09-02 181 cpu = smp_processor_id();
f6e9456c9272bb Robert Richter 2010-07-21 182 if (!cpu)
bb24c4716185f6 Jacob Pan 2009-09-02 183 return;
bb24c4716185f6 Jacob Pan 2009-09-02 184
89cbc76768c2fa Christoph Lameter 2014-08-17 185 adev = this_cpu_ptr(&cpu_apbt_dev);
06c3df49521c1b Jamie Iles 2011-06-06 186 if (!adev->timer) {
06c3df49521c1b Jamie Iles 2011-06-06 @187 adev->timer = dw_apb_clockevent_init(cpu, adev->name,
06c3df49521c1b Jamie Iles 2011-06-06 188 APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
06c3df49521c1b Jamie Iles 2011-06-06 189 adev->irq, apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 190 adev->timer->eoi = NULL;
06c3df49521c1b Jamie Iles 2011-06-06 191 } else {
06c3df49521c1b Jamie Iles 2011-06-06 192 dw_apb_clockevent_resume(adev->timer);
06c3df49521c1b Jamie Iles 2011-06-06 193 }
bb24c4716185f6 Jacob Pan 2009-09-02 194
06c3df49521c1b Jamie Iles 2011-06-06 195 printk(KERN_INFO "Registering CPU %d clockevent device %s, cpu %08x\n",
06c3df49521c1b Jamie Iles 2011-06-06 196 cpu, adev->name, adev->cpu);
bb24c4716185f6 Jacob Pan 2009-09-02 197
bb24c4716185f6 Jacob Pan 2009-09-02 198 apbt_setup_irq(adev);
06c3df49521c1b Jamie Iles 2011-06-06 199 dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 200
bb24c4716185f6 Jacob Pan 2009-09-02 201 return;
bb24c4716185f6 Jacob Pan 2009-09-02 202 }
bb24c4716185f6 Jacob Pan 2009-09-02 203
:::::: The code at line 147 was first introduced by commit
:::::: 06c3df49521c1b112b777cc4946e5de057c814ba clocksource: apb: Share APB timer code with other platforms
:::::: TO: Jamie Iles <jamie(a)jamieiles.com>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH 2/6] soc: ti: omap-prm: Add basic power domain support
by kbuild test robot
Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on omap/for-next]
[also build test WARNING on robh/for-next keystone/next v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Tony-Lindgren/Add-initial-genpd-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git for-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/soc/ti/omap_prm.c: In function 'omap_prm_domain_detach_dev':
>> drivers/soc/ti/omap_prm.c:347:26: warning: variable 'prmd' set but not used [-Wunused-but-set-variable]
347 | struct omap_prm_domain *prmd;
| ^~~~
At top level:
drivers/soc/ti/omap_prm.c:123:21: warning: 'omap_prm_onoff_noauto' defined but not used [-Wunused-const-variable=]
123 | omap_prm_domain_map omap_prm_onoff_noauto = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/soc/ti/omap_prm.c:115:21: warning: 'omap_prm_nooff' defined but not used [-Wunused-const-variable=]
115 | omap_prm_domain_map omap_prm_nooff = {
| ^~~~~~~~~~~~~~
drivers/soc/ti/omap_prm.c:107:21: warning: 'omap_prm_noinact' defined but not used [-Wunused-const-variable=]
107 | omap_prm_domain_map omap_prm_noinact = {
| ^~~~~~~~~~~~~~~~
drivers/soc/ti/omap_prm.c:99:21: warning: 'omap_prm_all' defined but not used [-Wunused-const-variable=]
99 | omap_prm_domain_map omap_prm_all = {
| ^~~~~~~~~~~~
vim +/prmd +347 drivers/soc/ti/omap_prm.c
342
343 static void omap_prm_domain_detach_dev(struct generic_pm_domain *domain,
344 struct device *dev)
345 {
346 struct generic_pm_domain_data *genpd_data;
> 347 struct omap_prm_domain *prmd;
348
349 prmd = genpd_to_prm_domain(domain);
350
351 genpd_data = dev_gpd_data(dev);
352 genpd_data->data = NULL;
353 }
354
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[djwong-xfs:repair-metadata-atomically 214/227] fs/xfs/libxfs/xfs_swapext.c:306:37: warning: suggest braces around empty body in an 'if' statement
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-metadata-atomically
head: 03560ddd3fbb967b10047a3d7a31266990f797cf
commit: a616ac921a9590b684f485c1111726d28b135bb9 [214/227] xfs: create deferred log items for extent swapping
config: mips-randconfig-r036-20200520 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout a616ac921a9590b684f485c1111726d28b135bb9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
fs/xfs/libxfs/xfs_swapext.c: In function 'xfs_swapext_finish_one':
>> fs/xfs/libxfs/xfs_swapext.c:306:37: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
306 | XFS_TRANS_DQ_BCOUNT, ip1_delta);
| ^
fs/xfs/libxfs/xfs_swapext.c:309:37: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
309 | XFS_TRANS_DQ_BCOUNT, ip2_delta);
| ^
vim +/if +306 fs/xfs/libxfs/xfs_swapext.c
208
209 /* Finish one extent swap, possibly log more. */
210 int
211 xfs_swapext_finish_one(
212 struct xfs_trans *tp,
213 struct xfs_swapext_intent *sxi)
214 {
215 struct xfs_bmbt_irec irec1, irec2;
216 int whichfork;
217 int nimaps;
218 int bmap_flags;
219 int error;
220
221 whichfork = (sxi->sxi_flags & XFS_SWAP_EXTENT_ATTR_FORK) ?
222 XFS_ATTR_FORK : XFS_DATA_FORK;
223 bmap_flags = xfs_bmapi_aflag(whichfork);
224
225 while (sxi->sxi_blockcount > 0) {
226 int64_t ip1_delta = 0, ip2_delta = 0;
227
228 /* Read extent from the first file */
229 nimaps = 1;
230 error = xfs_bmapi_read(sxi->sxi_ip1, sxi->sxi_startoff1,
231 sxi->sxi_blockcount, &irec1, &nimaps,
232 bmap_flags);
233 if (error)
234 return error;
235 if (nimaps != 1 ||
236 irec1.br_startblock == DELAYSTARTBLOCK ||
237 irec1.br_startoff != sxi->sxi_startoff1) {
238 /*
239 * We should never get no mapping or a delalloc extent
240 * or something that doesn't match what we asked for,
241 * since the caller flushed both inodes and we hold the
242 * ILOCKs for both inodes.
243 */
244 ASSERT(0);
245 return -EINVAL;
246 }
247
248 /* Read extent from the second file */
249 nimaps = 1;
250 error = xfs_bmapi_read(sxi->sxi_ip2, sxi->sxi_startoff2,
251 irec1.br_blockcount, &irec2, &nimaps,
252 bmap_flags);
253 if (error)
254 return error;
255 if (nimaps != 1 ||
256 irec2.br_startblock == DELAYSTARTBLOCK ||
257 irec2.br_startoff != sxi->sxi_startoff2) {
258 /*
259 * We should never get no mapping or a delalloc extent
260 * or something that doesn't match what we asked for,
261 * since the caller flushed both inodes and we hold the
262 * ILOCKs for both inodes.
263 */
264 ASSERT(0);
265 return -EINVAL;
266 }
267
268 /*
269 * We can only swap as many blocks as the smaller of the two
270 * extent maps.
271 */
272 irec1.br_blockcount = min(irec1.br_blockcount,
273 irec2.br_blockcount);
274
275 trace_xfs_swapext_extent1(sxi->sxi_ip1, &irec1);
276 trace_xfs_swapext_extent2(sxi->sxi_ip2, &irec2);
277
278 /*
279 * Two extents mapped to the same physical block must not have
280 * different states; that's filesystem corruption. Move on to
281 * the next extent if they're both holes or both the same
282 * physical extent.
283 */
284 if (irec1.br_startblock == irec2.br_startblock) {
285 if (irec1.br_state != irec2.br_state)
286 return -EFSCORRUPTED;
287
288 sxi->sxi_startoff1 += irec1.br_blockcount;
289 sxi->sxi_startoff2 += irec1.br_blockcount;
290 sxi->sxi_blockcount -= irec1.br_blockcount;
291 continue;
292 }
293
294 /* Update quota accounting. */
295 if (xfs_bmap_is_mapped_extent(&irec1)) {
296 ip1_delta -= irec1.br_blockcount;
297 ip2_delta += irec1.br_blockcount;
298 }
299 if (xfs_bmap_is_mapped_extent(&irec2)) {
300 ip1_delta += irec2.br_blockcount;
301 ip2_delta -= irec2.br_blockcount;
302 }
303
304 if (ip1_delta)
305 xfs_trans_mod_dquot_byino(tp, sxi->sxi_ip1,
> 306 XFS_TRANS_DQ_BCOUNT, ip1_delta);
307 if (ip2_delta)
308 xfs_trans_mod_dquot_byino(tp, sxi->sxi_ip2,
309 XFS_TRANS_DQ_BCOUNT, ip2_delta);
310
311 /* Remove both mappings. */
312 xfs_bmap_unmap_extent(tp, sxi->sxi_ip1, whichfork, &irec1);
313 xfs_bmap_unmap_extent(tp, sxi->sxi_ip2, whichfork, &irec2);
314
315 /*
316 * Re-add both mappings. We swap the file offsets between the
317 * two maps and add the opposite map, which has the effect of
318 * filling the logical offsets we just unmapped, but with with
319 * the physical mapping information swapped.
320 */
321 swap(irec1.br_startoff, irec2.br_startoff);
322 xfs_bmap_map_extent(tp, sxi->sxi_ip1, whichfork, &irec2);
323 xfs_bmap_map_extent(tp, sxi->sxi_ip2, whichfork, &irec1);
324
325 /* Make sure we're not mapping extents past EOF. */
326 if (whichfork == XFS_DATA_FORK) {
327 xfs_swapext_update_size(tp, sxi->sxi_ip1, &irec2,
328 sxi->sxi_isize1);
329 xfs_swapext_update_size(tp, sxi->sxi_ip2, &irec1,
330 sxi->sxi_isize2);
331 }
332
333 /*
334 * Advance our cursor and exit. The caller (either defer ops
335 * or log recovery) will log the SXD item, and if *blockcount
336 * is nonzero, it will log a new SXI item for the remainder
337 * and call us back.
338 */
339 sxi->sxi_startoff1 += irec1.br_blockcount;
340 sxi->sxi_startoff2 += irec1.br_blockcount;
341 sxi->sxi_blockcount -= irec1.br_blockcount;
342 break;
343 }
344
345 /*
346 * If we've reached the end of the remap operation and the caller
347 * wanted us to exchange the sizes, do that now.
348 */
349 if (sxi->sxi_blockcount == 0 &&
350 (sxi->sxi_flags & XFS_SWAP_EXTENT_SET_SIZES)) {
351 sxi->sxi_ip1->i_d.di_size = sxi->sxi_isize1;
352 sxi->sxi_ip2->i_d.di_size = sxi->sxi_isize2;
353 xfs_trans_log_inode(tp, sxi->sxi_ip1, XFS_ILOG_CORE);
354 xfs_trans_log_inode(tp, sxi->sxi_ip2, XFS_ILOG_CORE);
355 }
356
357 if (xfs_swapext_has_more_work(sxi))
358 trace_xfs_swapext_defer(tp->t_mountp, sxi);
359 return 0;
360 }
361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[balbi-usb:next 69/89] drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
head: a65a1ec70639afa5ff7990cf33213dd41f3c7176
commit: edecc785996030331a83dddaeee960ab9302c608 [69/89] usb: dwc3: Add support for DWC_usb32 IP
config: i386-randconfig-a002-20200520 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
git checkout edecc785996030331a83dddaeee960ab9302c608
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/err.h:5:0,
from include/linux/clk.h:12,
from drivers/usb/dwc3/core.c:11:
drivers/usb/dwc3/core.c: In function 'dwc3_core_soft_reset':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c: In function 'dwc3_phy_setup':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c: In function 'dwc3_core_init':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:962:2: note: in expansion of macro 'if'
if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD &&
^~
drivers/usb/dwc3/core.c:963:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) {
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
--
In file included from include/linux/ioport.h:13:0,
from include/linux/acpi.h:12,
from drivers/usb/dwc3/host.c:10:
drivers/usb/dwc3/host.c: In function 'dwc3_host_init':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from && ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ? ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~
vim +/if +292 drivers/usb/dwc3/core.c
226
227 /**
228 * dwc3_core_soft_reset - Issues core soft reset and PHY reset
229 * @dwc: pointer to our context structure
230 */
231 static int dwc3_core_soft_reset(struct dwc3 *dwc)
232 {
233 u32 reg;
234 int retries = 1000;
235 int ret;
236
237 usb_phy_init(dwc->usb2_phy);
238 usb_phy_init(dwc->usb3_phy);
239 ret = phy_init(dwc->usb2_generic_phy);
240 if (ret < 0)
241 return ret;
242
243 ret = phy_init(dwc->usb3_generic_phy);
244 if (ret < 0) {
245 phy_exit(dwc->usb2_generic_phy);
246 return ret;
247 }
248
249 /*
250 * We're resetting only the device side because, if we're in host mode,
251 * XHCI driver will reset the host block. If dwc3 was configured for
252 * host-only mode, then we can return early.
253 */
254 if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
255 return 0;
256
257 reg = dwc3_readl(dwc->regs, DWC3_DCTL);
258 reg |= DWC3_DCTL_CSFTRST;
259 dwc3_writel(dwc->regs, DWC3_DCTL, reg);
260
261 /*
262 * For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
263 * is cleared only after all the clocks are synchronized. This can
264 * take a little more than 50ms. Set the polling rate at 20ms
265 * for 10 times instead.
266 */
267 if (DWC3_VER_IS_WITHIN(DWC31, 190A, ANY) || DWC3_IP_IS(DWC32))
268 retries = 10;
269
270 do {
271 reg = dwc3_readl(dwc->regs, DWC3_DCTL);
272 if (!(reg & DWC3_DCTL_CSFTRST))
273 goto done;
274
275 if (DWC3_VER_IS_WITHIN(DWC31, 190A, ANY) || DWC3_IP_IS(DWC32))
276 msleep(20);
277 else
278 udelay(1);
279 } while (--retries);
280
281 phy_exit(dwc->usb3_generic_phy);
282 phy_exit(dwc->usb2_generic_phy);
283
284 return -ETIMEDOUT;
285
286 done:
287 /*
288 * For DWC_usb31 controller 1.80a and prior, once DCTL.CSFRST bit
289 * is cleared, we must wait at least 50ms before accessing the PHY
290 * domain (synchronization delay).
291 */
> 292 if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
293 msleep(50);
294
295 return 0;
296 }
297
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH v4 4/7] clocksource: dw_apb_timer: Set clockevent any-possible-CPU mask
by kbuild test robot
Hi Serge,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/timers/core]
[also build test ERROR on abelloni/rtc-next tip/irq/core linus/master v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Serge-Semin/clocksource-Fix-MIPS...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 4479730e9263befbb9ce9563a09563db2acb8f7c
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:556,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/clocksource.h:13,
from include/linux/clockchips.h:14,
from include/linux/dw_apb_timer.h:13,
from arch/x86/kernel/apb_timer.c:27:
arch/x86/kernel/apb_timer.c: In function 'apbt_clockevent_register':
>> include/linux/percpu-defs.h:444:1: warning: passing argument 1 of 'dw_apb_clockevent_init' makes pointer from integer without a cast [-Wint-conversion]
({ ^
>> arch/x86/include/asm/smp.h:168:30: note: in expansion of macro '__this_cpu_read'
#define __smp_processor_id() __this_cpu_read(cpu_number)
^~~~~~~~~~~~~~~
>> include/linux/smp.h:218:29: note: in expansion of macro '__smp_processor_id'
# define smp_processor_id() __smp_processor_id()
^~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/apb_timer.c:147:39: note: in expansion of macro 'smp_processor_id'
adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0",
^~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'const char *' but argument is of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/apb_timer.c:147:59: warning: passing argument 2 of 'dw_apb_clockevent_init' makes integer from pointer without a cast [-Wint-conversion]
adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0",
^~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'unsigned int' but argument is of type 'char *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/apb_timer.c:148:3: warning: passing argument 3 of 'dw_apb_clockevent_init' makes pointer from integer without a cast [-Wint-conversion]
intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT ?
^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'void *' but argument is of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:150:3: warning: passing argument 4 of 'dw_apb_clockevent_init' makes integer from pointer without a cast [-Wint-conversion]
adev_virt_addr(adev), 0, apbt_freq);
^~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'int' but argument is of type 'void *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/apb_timer.c:147:16: error: too many arguments to function 'dw_apb_clockevent_init'
adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0",
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: declared here
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c: In function 'apbt_setup_secondary_clock':
arch/x86/kernel/apb_timer.c:187:40: warning: passing argument 1 of 'dw_apb_clockevent_init' makes pointer from integer without a cast [-Wint-conversion]
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'const char *' but argument is of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:187:45: warning: passing argument 2 of 'dw_apb_clockevent_init' makes integer from pointer without a cast [-Wint-conversion]
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'unsigned int' but argument is of type 'char *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:42:33: warning: passing argument 3 of 'dw_apb_clockevent_init' makes pointer from integer without a cast [-Wint-conversion]
#define APBT_CLOCKEVENT_RATING 110
^
>> arch/x86/kernel/apb_timer.c:188:4: note: in expansion of macro 'APBT_CLOCKEVENT_RATING'
APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'void *' but argument is of type 'int'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:188:28: warning: passing argument 4 of 'dw_apb_clockevent_init' makes integer from pointer without a cast [-Wint-conversion]
APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
^~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: expected 'int' but argument is of type 'void *'
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/apb_timer.c:187:17: error: too many arguments to function 'dw_apb_clockevent_init'
adev->timer = dw_apb_clockevent_init(cpu, adev->name,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/apb_timer.c:27:0:
include/linux/dw_apb_timer.h:42:1: note: declared here
dw_apb_clockevent_init(const char *name, unsigned int rating,
^~~~~~~~~~~~~~~~~~~~~~
vim +/dw_apb_clockevent_init +147 arch/x86/kernel/apb_timer.c
bb24c4716185f6 Jacob Pan 2009-09-02 133
bb24c4716185f6 Jacob Pan 2009-09-02 134 static int __init apbt_clockevent_register(void)
bb24c4716185f6 Jacob Pan 2009-09-02 135 {
bb24c4716185f6 Jacob Pan 2009-09-02 136 struct sfi_timer_table_entry *mtmr;
89cbc76768c2fa Christoph Lameter 2014-08-17 137 struct apbt_dev *adev = this_cpu_ptr(&cpu_apbt_dev);
bb24c4716185f6 Jacob Pan 2009-09-02 138
bb24c4716185f6 Jacob Pan 2009-09-02 139 mtmr = sfi_get_mtmr(APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 140 if (mtmr == NULL) {
bb24c4716185f6 Jacob Pan 2009-09-02 141 printk(KERN_ERR "Failed to get MTMR %d from SFI\n",
bb24c4716185f6 Jacob Pan 2009-09-02 142 APBT_CLOCKEVENT0_NUM);
bb24c4716185f6 Jacob Pan 2009-09-02 143 return -ENODEV;
bb24c4716185f6 Jacob Pan 2009-09-02 144 }
bb24c4716185f6 Jacob Pan 2009-09-02 145
3010673ef5f7be Jacob Pan 2010-03-02 146 adev->num = smp_processor_id();
06c3df49521c1b Jamie Iles 2011-06-06 @147 adev->timer = dw_apb_clockevent_init(smp_processor_id(), "apbt0",
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 @148 intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT ?
06c3df49521c1b Jamie Iles 2011-06-06 149 APBT_CLOCKEVENT_RATING - 100 : APBT_CLOCKEVENT_RATING,
06c3df49521c1b Jamie Iles 2011-06-06 150 adev_virt_addr(adev), 0, apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 151 /* Firmware does EOI handling for us. */
06c3df49521c1b Jamie Iles 2011-06-06 152 adev->timer->eoi = NULL;
bb24c4716185f6 Jacob Pan 2009-09-02 153
712b6aa8731a7e Kuppuswamy Sathyanarayanan 2013-10-17 154 if (intel_mid_timer_options == INTEL_MID_TIMER_LAPIC_APBT) {
06c3df49521c1b Jamie Iles 2011-06-06 155 global_clock_event = &adev->timer->ced;
bb24c4716185f6 Jacob Pan 2009-09-02 156 printk(KERN_DEBUG "%s clockevent registered as global\n",
bb24c4716185f6 Jacob Pan 2009-09-02 157 global_clock_event->name);
bb24c4716185f6 Jacob Pan 2009-09-02 158 }
bb24c4716185f6 Jacob Pan 2009-09-02 159
06c3df49521c1b Jamie Iles 2011-06-06 160 dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 161
bb24c4716185f6 Jacob Pan 2009-09-02 162 sfi_free_mtmr(mtmr);
bb24c4716185f6 Jacob Pan 2009-09-02 163 return 0;
bb24c4716185f6 Jacob Pan 2009-09-02 164 }
bb24c4716185f6 Jacob Pan 2009-09-02 165
bb24c4716185f6 Jacob Pan 2009-09-02 166 #ifdef CONFIG_SMP
a5ef2e70405c8a Thomas Gleixner 2010-09-28 167
a5ef2e70405c8a Thomas Gleixner 2010-09-28 168 static void apbt_setup_irq(struct apbt_dev *adev)
a5ef2e70405c8a Thomas Gleixner 2010-09-28 169 {
a5ef2e70405c8a Thomas Gleixner 2010-09-28 170 irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
e4d2ebcab11b30 Feng Tang 2010-12-03 171 irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
a5ef2e70405c8a Thomas Gleixner 2010-09-28 172 }
a5ef2e70405c8a Thomas Gleixner 2010-09-28 173
bb24c4716185f6 Jacob Pan 2009-09-02 174 /* Should be called with per cpu */
bb24c4716185f6 Jacob Pan 2009-09-02 175 void apbt_setup_secondary_clock(void)
bb24c4716185f6 Jacob Pan 2009-09-02 176 {
bb24c4716185f6 Jacob Pan 2009-09-02 177 struct apbt_dev *adev;
bb24c4716185f6 Jacob Pan 2009-09-02 178 int cpu;
bb24c4716185f6 Jacob Pan 2009-09-02 179
bb24c4716185f6 Jacob Pan 2009-09-02 180 /* Don't register boot CPU clockevent */
bb24c4716185f6 Jacob Pan 2009-09-02 181 cpu = smp_processor_id();
f6e9456c9272bb Robert Richter 2010-07-21 182 if (!cpu)
bb24c4716185f6 Jacob Pan 2009-09-02 183 return;
bb24c4716185f6 Jacob Pan 2009-09-02 184
89cbc76768c2fa Christoph Lameter 2014-08-17 185 adev = this_cpu_ptr(&cpu_apbt_dev);
06c3df49521c1b Jamie Iles 2011-06-06 186 if (!adev->timer) {
06c3df49521c1b Jamie Iles 2011-06-06 187 adev->timer = dw_apb_clockevent_init(cpu, adev->name,
06c3df49521c1b Jamie Iles 2011-06-06 @188 APBT_CLOCKEVENT_RATING, adev_virt_addr(adev),
06c3df49521c1b Jamie Iles 2011-06-06 189 adev->irq, apbt_freq);
06c3df49521c1b Jamie Iles 2011-06-06 190 adev->timer->eoi = NULL;
06c3df49521c1b Jamie Iles 2011-06-06 191 } else {
06c3df49521c1b Jamie Iles 2011-06-06 192 dw_apb_clockevent_resume(adev->timer);
06c3df49521c1b Jamie Iles 2011-06-06 193 }
bb24c4716185f6 Jacob Pan 2009-09-02 194
06c3df49521c1b Jamie Iles 2011-06-06 195 printk(KERN_INFO "Registering CPU %d clockevent device %s, cpu %08x\n",
06c3df49521c1b Jamie Iles 2011-06-06 196 cpu, adev->name, adev->cpu);
bb24c4716185f6 Jacob Pan 2009-09-02 197
bb24c4716185f6 Jacob Pan 2009-09-02 198 apbt_setup_irq(adev);
06c3df49521c1b Jamie Iles 2011-06-06 199 dw_apb_clockevent_register(adev->timer);
bb24c4716185f6 Jacob Pan 2009-09-02 200
bb24c4716185f6 Jacob Pan 2009-09-02 201 return;
bb24c4716185f6 Jacob Pan 2009-09-02 202 }
bb24c4716185f6 Jacob Pan 2009-09-02 203
:::::: The code at line 147 was first introduced by commit
:::::: 06c3df49521c1b112b777cc4946e5de057c814ba clocksource: apb: Share APB timer code with other platforms
:::::: TO: Jamie Iles <jamie(a)jamieiles.com>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[RFC PATCH] net: atlantic: ptp_ring_idx() can be static
by kbuild test robot
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
aq_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
index 9aee49c50f1f8..599ced261b2a4 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
@@ -948,7 +948,7 @@ void aq_ptp_ring_deinit(struct aq_nic_s *aq_nic)
/* Index must be 8 (8 TCs) or 16 (4 TCs).
* It depends on Traffic Class mode.
*/
-unsigned int ptp_ring_idx(const enum aq_tc_mode tc_mode)
+static unsigned int ptp_ring_idx(const enum aq_tc_mode tc_mode)
{
if (tc_mode == AQ_TC_MODE_8TCS)
return PTP_8TC_RING_IDX;
2 years, 4 months
Re: [Intel-gfx] [PATCH 23/23] drm/i915: Ensure we hold the pin mutex
by kbuild test robot
Hi Maarten,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Maarten-Lankhorst/Revert-drm-i91...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/gpu/drm/i915/gt/intel_mocs.c:23:
In file included from drivers/gpu/drm/i915/i915_drv.h:82:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:16:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17:
>> drivers/gpu/drm/i915/i915_vma.h:245:28: error: implicit declaration of function 'lockdep_is_held' [-Werror,-Wimplicit-function-declaration]
WARN_ON_ONCE(vma->resv && dma_resv_held(vma->resv));
^
include/linux/dma-resv.h:80:28: note: expanded from macro 'dma_resv_held'
#define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
^
1 error generated.
--
In file included from drivers/gpu/drm/i915/i915_vma.c:32:
In file included from drivers/gpu/drm/i915/gt/intel_gt.h:10:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:16:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17:
>> drivers/gpu/drm/i915/i915_vma.h:245:28: error: implicit declaration of function 'lockdep_is_held' [-Werror,-Wimplicit-function-declaration]
WARN_ON_ONCE(vma->resv && dma_resv_held(vma->resv));
^
include/linux/dma-resv.h:80:28: note: expanded from macro 'dma_resv_held'
#define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
^
>> drivers/gpu/drm/i915/i915_vma.c:1014:30: error: implicit declaration of function 'lockdep_is_held' [-Werror,-Wimplicit-function-declaration]
WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
^
include/linux/dma-resv.h:80:28: note: expanded from macro 'dma_resv_held'
#define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
^
2 errors generated.
vim +/lockdep_is_held +245 drivers/gpu/drm/i915/i915_vma.h
237
238 int __must_check
239 i915_vma_pin_ww(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
240 u64 size, u64 alignment, u64 flags);
241
242 static inline int __must_check
243 i915_vma_pin(struct i915_vma *vma, u64 size, u64 alignment, u64 flags)
244 {
> 245 WARN_ON_ONCE(vma->resv && dma_resv_held(vma->resv));
246 return i915_vma_pin_ww(vma, NULL, size, alignment, flags);
247 }
248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[djwong-xfs:repair-metadata-atomically 206/227] fs/xfs/xfs_bmap_util.c:1493:12: warning: variable 'temp_blks' set but not used
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-metadata-atomically
head: 03560ddd3fbb967b10047a3d7a31266990f797cf
commit: 81599d970c97632eaef01cc6f164edac4b649d4a [206/227] xfs: actually account for quota changes in xfs_swap_extents
config: mips-randconfig-r036-20200520 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 81599d970c97632eaef01cc6f164edac4b649d4a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
fs/xfs/xfs_bmap_util.c: In function 'xfs_swap_extent_rmap':
fs/xfs/xfs_bmap_util.c:1439:38: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
1439 | XFS_TRANS_DQ_BCOUNT, tip_delta);
| ^
fs/xfs/xfs_bmap_util.c:1442:37: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
1442 | XFS_TRANS_DQ_BCOUNT, ip_delta);
| ^
fs/xfs/xfs_bmap_util.c: In function 'xfs_swap_extent_forks':
>> fs/xfs/xfs_bmap_util.c:1493:12: warning: variable 'temp_blks' set but not used [-Wunused-but-set-variable]
1493 | int64_t temp_blks;
| ^~~~~~~~~
vim +/temp_blks +1493 fs/xfs/xfs_bmap_util.c
1352
1353 /*
1354 * Move extents from one file to another, when rmap is enabled.
1355 */
1356 STATIC int
1357 xfs_swap_extent_rmap(
1358 struct xfs_trans **tpp,
1359 struct xfs_inode *ip,
1360 struct xfs_inode *tip)
1361 {
1362 struct xfs_trans *tp = *tpp;
1363 struct xfs_bmbt_irec irec;
1364 struct xfs_bmbt_irec uirec;
1365 struct xfs_bmbt_irec tirec;
1366 xfs_fileoff_t offset_fsb;
1367 xfs_fileoff_t end_fsb;
1368 xfs_filblks_t count_fsb;
1369 int error;
1370 xfs_filblks_t ilen;
1371 xfs_filblks_t rlen;
1372 int nimaps;
1373 uint64_t tip_flags2;
1374
1375 /*
1376 * If the source file has shared blocks, we must flag the donor
1377 * file as having shared blocks so that we get the shared-block
1378 * rmap functions when we go to fix up the rmaps. The flags
1379 * will be switch for reals later.
1380 */
1381 tip_flags2 = tip->i_d.di_flags2;
1382 if (ip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK)
1383 tip->i_d.di_flags2 |= XFS_DIFLAG2_REFLINK;
1384
1385 offset_fsb = 0;
1386 end_fsb = XFS_B_TO_FSB(ip->i_mount, i_size_read(VFS_I(ip)));
1387 count_fsb = (xfs_filblks_t)(end_fsb - offset_fsb);
1388
1389 while (count_fsb) {
1390 /* Read extent from the donor file */
1391 nimaps = 1;
1392 error = xfs_bmapi_read(tip, offset_fsb, count_fsb, &tirec,
1393 &nimaps, 0);
1394 if (error)
1395 goto out;
1396 ASSERT(nimaps == 1);
1397 ASSERT(tirec.br_startblock != DELAYSTARTBLOCK);
1398
1399 trace_xfs_swap_extent_rmap_remap(tip, &tirec);
1400 ilen = tirec.br_blockcount;
1401
1402 /* Unmap the old blocks in the source file. */
1403 while (tirec.br_blockcount) {
1404 int64_t ip_delta = 0, tip_delta = 0;
1405
1406 ASSERT(tp->t_firstblock == NULLFSBLOCK);
1407 trace_xfs_swap_extent_rmap_remap_piece(tip, &tirec);
1408
1409 /* Read extent from the source file */
1410 nimaps = 1;
1411 error = xfs_bmapi_read(ip, tirec.br_startoff,
1412 tirec.br_blockcount, &irec,
1413 &nimaps, 0);
1414 if (error)
1415 goto out;
1416 ASSERT(nimaps == 1);
1417 ASSERT(tirec.br_startoff == irec.br_startoff);
1418 trace_xfs_swap_extent_rmap_remap_piece(ip, &irec);
1419
1420 /* Trim the extent. */
1421 uirec = tirec;
1422 uirec.br_blockcount = rlen = min_t(xfs_filblks_t,
1423 tirec.br_blockcount,
1424 irec.br_blockcount);
1425 trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec);
1426
1427 /* Update quota accounting. */
1428 if (xfs_bmap_is_mapped_extent(&irec)) {
1429 tip_delta += irec.br_blockcount;
1430 ip_delta -= irec.br_blockcount;
1431 }
1432 if (xfs_bmap_is_mapped_extent(&uirec)) {
1433 tip_delta -= uirec.br_blockcount;
1434 ip_delta += uirec.br_blockcount;
1435 }
1436
1437 if (tip_delta)
1438 xfs_trans_mod_dquot_byino(tp, tip,
> 1439 XFS_TRANS_DQ_BCOUNT, tip_delta);
1440 if (ip_delta)
1441 xfs_trans_mod_dquot_byino(tp, ip,
1442 XFS_TRANS_DQ_BCOUNT, ip_delta);
1443
1444 /* Remove the mapping from the donor file. */
1445 xfs_bmap_unmap_extent(tp, tip, &uirec);
1446
1447 /* Remove the mapping from the source file. */
1448 xfs_bmap_unmap_extent(tp, ip, &irec);
1449
1450 /* Map the donor file's blocks into the source file. */
1451 xfs_bmap_map_extent(tp, ip, &uirec);
1452
1453 /* Map the source file's blocks into the donor file. */
1454 xfs_bmap_map_extent(tp, tip, &irec);
1455
1456 error = xfs_defer_finish(tpp);
1457 tp = *tpp;
1458 if (error)
1459 goto out;
1460
1461 tirec.br_startoff += rlen;
1462 if (tirec.br_startblock != HOLESTARTBLOCK &&
1463 tirec.br_startblock != DELAYSTARTBLOCK)
1464 tirec.br_startblock += rlen;
1465 tirec.br_blockcount -= rlen;
1466 }
1467
1468 /* Roll on... */
1469 count_fsb -= ilen;
1470 offset_fsb += ilen;
1471 }
1472
1473 tip->i_d.di_flags2 = tip_flags2;
1474 return 0;
1475
1476 out:
1477 trace_xfs_swap_extent_rmap_error(ip, error, _RET_IP_);
1478 tip->i_d.di_flags2 = tip_flags2;
1479 return error;
1480 }
1481
1482 /* Swap the extents of two files by swapping data forks. */
1483 STATIC int
1484 xfs_swap_extent_forks(
1485 struct xfs_trans *tp,
1486 struct xfs_inode *ip,
1487 struct xfs_inode *tip,
1488 int *src_log_flags,
1489 int *target_log_flags)
1490 {
1491 xfs_filblks_t aforkblks = 0;
1492 xfs_filblks_t taforkblks = 0;
> 1493 int64_t temp_blks;
1494 xfs_extnum_t junk;
1495 uint64_t tmp;
1496 int error;
1497
1498 /*
1499 * Count the number of extended attribute blocks
1500 */
1501 if ( ((XFS_IFORK_Q(ip) != 0) && (ip->i_d.di_anextents > 0)) &&
1502 (ip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL)) {
1503 error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &junk,
1504 &aforkblks);
1505 if (error)
1506 return error;
1507 }
1508 if ( ((XFS_IFORK_Q(tip) != 0) && (tip->i_d.di_anextents > 0)) &&
1509 (tip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL)) {
1510 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk,
1511 &taforkblks);
1512 if (error)
1513 return error;
1514 }
1515
1516 /*
1517 * Btree format (v3) inodes have the inode number stamped in the bmbt
1518 * block headers. We can't start changing the bmbt blocks until the
1519 * inode owner change is logged so recovery does the right thing in the
1520 * event of a crash. Set the owner change log flags now and leave the
1521 * bmbt scan as the last step.
1522 */
1523 if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) {
1524 if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE)
1525 (*target_log_flags) |= XFS_ILOG_DOWNER;
1526 if (tip->i_d.di_format == XFS_DINODE_FMT_BTREE)
1527 (*src_log_flags) |= XFS_ILOG_DOWNER;
1528 }
1529
1530 /*
1531 * Swap the data forks of the inodes
1532 */
1533 swap(ip->i_df, tip->i_df);
1534
1535 /* Update quota accounting. */
1536 temp_blks = tip->i_d.di_nblocks - taforkblks + aforkblks;
1537 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT,
1538 temp_blks - ip->i_d.di_nblocks);
1539
1540 temp_blks = ip->i_d.di_nblocks + taforkblks - aforkblks;
1541 xfs_trans_mod_dquot_byino(tp, tip, XFS_TRANS_DQ_BCOUNT,
1542 temp_blks - tip->i_d.di_nblocks);
1543
1544 /*
1545 * Fix the on-disk inode values
1546 */
1547 tmp = (uint64_t)ip->i_d.di_nblocks;
1548 ip->i_d.di_nblocks = tip->i_d.di_nblocks - taforkblks + aforkblks;
1549 tip->i_d.di_nblocks = tmp + taforkblks - aforkblks;
1550
1551 swap(ip->i_d.di_nextents, tip->i_d.di_nextents);
1552 swap(ip->i_d.di_format, tip->i_d.di_format);
1553
1554 /*
1555 * The extents in the source inode could still contain speculative
1556 * preallocation beyond EOF (e.g. the file is open but not modified
1557 * while defrag is in progress). In that case, we need to copy over the
1558 * number of delalloc blocks the data fork in the source inode is
1559 * tracking beyond EOF so that when the fork is truncated away when the
1560 * temporary inode is unlinked we don't underrun the i_delayed_blks
1561 * counter on that inode.
1562 */
1563 ASSERT(tip->i_delayed_blks == 0);
1564 tip->i_delayed_blks = ip->i_delayed_blks;
1565 ip->i_delayed_blks = 0;
1566
1567 switch (ip->i_d.di_format) {
1568 case XFS_DINODE_FMT_EXTENTS:
1569 (*src_log_flags) |= XFS_ILOG_DEXT;
1570 break;
1571 case XFS_DINODE_FMT_BTREE:
1572 ASSERT(!xfs_sb_version_has_v3inode(&ip->i_mount->m_sb) ||
1573 (*src_log_flags & XFS_ILOG_DOWNER));
1574 (*src_log_flags) |= XFS_ILOG_DBROOT;
1575 break;
1576 }
1577
1578 switch (tip->i_d.di_format) {
1579 case XFS_DINODE_FMT_EXTENTS:
1580 (*target_log_flags) |= XFS_ILOG_DEXT;
1581 break;
1582 case XFS_DINODE_FMT_BTREE:
1583 (*target_log_flags) |= XFS_ILOG_DBROOT;
1584 ASSERT(!xfs_sb_version_has_v3inode(&ip->i_mount->m_sb) ||
1585 (*target_log_flags & XFS_ILOG_DOWNER));
1586 break;
1587 }
1588
1589 return 0;
1590 }
1591
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months