Re: [PATCH] raid1: ensure bio doesn't have more than BIO_MAX_VECS sectors
by kernel test robot
Hi Guoqing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on song-md/md-next]
[also build test ERROR on v5.14-rc5 next-20210812]
[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/Guoqing-Jiang/raid1-ensure-bio-d...
base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: hexagon-randconfig-r001-20210813 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/29b7720a83de1deea0d8ecfafe0db4614...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guoqing-Jiang/raid1-ensure-bio-doesn-t-have-more-than-BIO_MAX_VECS-sectors/20210813-140810
git checkout 29b7720a83de1deea0d8ecfafe0db46146636b15
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/md/
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/md/raid1.c:1459:55: error: use of undeclared identifier 'PAGE_SECTORS'
max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
^
>> drivers/md/raid1.c:1459:55: error: use of undeclared identifier 'PAGE_SECTORS'
2 errors generated.
vim +/PAGE_SECTORS +1459 drivers/md/raid1.c
1320
1321 static void raid1_write_request(struct mddev *mddev, struct bio *bio,
1322 int max_write_sectors)
1323 {
1324 struct r1conf *conf = mddev->private;
1325 struct r1bio *r1_bio;
1326 int i, disks;
1327 struct bitmap *bitmap = mddev->bitmap;
1328 unsigned long flags;
1329 struct md_rdev *blocked_rdev;
1330 struct blk_plug_cb *cb;
1331 struct raid1_plug_cb *plug = NULL;
1332 int first_clone;
1333 int max_sectors;
1334
1335 if (mddev_is_clustered(mddev) &&
1336 md_cluster_ops->area_resyncing(mddev, WRITE,
1337 bio->bi_iter.bi_sector, bio_end_sector(bio))) {
1338
1339 DEFINE_WAIT(w);
1340 for (;;) {
1341 prepare_to_wait(&conf->wait_barrier,
1342 &w, TASK_IDLE);
1343 if (!md_cluster_ops->area_resyncing(mddev, WRITE,
1344 bio->bi_iter.bi_sector,
1345 bio_end_sector(bio)))
1346 break;
1347 schedule();
1348 }
1349 finish_wait(&conf->wait_barrier, &w);
1350 }
1351
1352 /*
1353 * Register the new request and wait if the reconstruction
1354 * thread has put up a bar for new requests.
1355 * Continue immediately if no resync is active currently.
1356 */
1357 wait_barrier(conf, bio->bi_iter.bi_sector);
1358
1359 r1_bio = alloc_r1bio(mddev, bio);
1360 r1_bio->sectors = max_write_sectors;
1361
1362 if (conf->pending_count >= max_queued_requests) {
1363 md_wakeup_thread(mddev->thread);
1364 raid1_log(mddev, "wait queued");
1365 wait_event(conf->wait_barrier,
1366 conf->pending_count < max_queued_requests);
1367 }
1368 /* first select target devices under rcu_lock and
1369 * inc refcount on their rdev. Record them by setting
1370 * bios[x] to bio
1371 * If there are known/acknowledged bad blocks on any device on
1372 * which we have seen a write error, we want to avoid writing those
1373 * blocks.
1374 * This potentially requires several writes to write around
1375 * the bad blocks. Each set of writes gets it's own r1bio
1376 * with a set of bios attached.
1377 */
1378
1379 disks = conf->raid_disks * 2;
1380 retry_write:
1381 blocked_rdev = NULL;
1382 rcu_read_lock();
1383 max_sectors = r1_bio->sectors;
1384 for (i = 0; i < disks; i++) {
1385 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
1386 if (rdev && unlikely(test_bit(Blocked, &rdev->flags))) {
1387 atomic_inc(&rdev->nr_pending);
1388 blocked_rdev = rdev;
1389 break;
1390 }
1391 r1_bio->bios[i] = NULL;
1392 if (!rdev || test_bit(Faulty, &rdev->flags)) {
1393 if (i < conf->raid_disks)
1394 set_bit(R1BIO_Degraded, &r1_bio->state);
1395 continue;
1396 }
1397
1398 atomic_inc(&rdev->nr_pending);
1399 if (test_bit(WriteErrorSeen, &rdev->flags)) {
1400 sector_t first_bad;
1401 int bad_sectors;
1402 int is_bad;
1403
1404 is_bad = is_badblock(rdev, r1_bio->sector, max_sectors,
1405 &first_bad, &bad_sectors);
1406 if (is_bad < 0) {
1407 /* mustn't write here until the bad block is
1408 * acknowledged*/
1409 set_bit(BlockedBadBlocks, &rdev->flags);
1410 blocked_rdev = rdev;
1411 break;
1412 }
1413 if (is_bad && first_bad <= r1_bio->sector) {
1414 /* Cannot write here at all */
1415 bad_sectors -= (r1_bio->sector - first_bad);
1416 if (bad_sectors < max_sectors)
1417 /* mustn't write more than bad_sectors
1418 * to other devices yet
1419 */
1420 max_sectors = bad_sectors;
1421 rdev_dec_pending(rdev, mddev);
1422 /* We don't set R1BIO_Degraded as that
1423 * only applies if the disk is
1424 * missing, so it might be re-added,
1425 * and we want to know to recover this
1426 * chunk.
1427 * In this case the device is here,
1428 * and the fact that this chunk is not
1429 * in-sync is recorded in the bad
1430 * block log
1431 */
1432 continue;
1433 }
1434 if (is_bad) {
1435 int good_sectors = first_bad - r1_bio->sector;
1436 if (good_sectors < max_sectors)
1437 max_sectors = good_sectors;
1438 }
1439 }
1440 r1_bio->bios[i] = bio;
1441 }
1442 rcu_read_unlock();
1443
1444 if (unlikely(blocked_rdev)) {
1445 /* Wait for this device to become unblocked */
1446 int j;
1447
1448 for (j = 0; j < i; j++)
1449 if (r1_bio->bios[j])
1450 rdev_dec_pending(conf->mirrors[j].rdev, mddev);
1451 r1_bio->state = 0;
1452 allow_barrier(conf, bio->bi_iter.bi_sector);
1453 raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
1454 md_wait_for_blocked_rdev(blocked_rdev, mddev);
1455 wait_barrier(conf, bio->bi_iter.bi_sector);
1456 goto retry_write;
1457 }
1458
> 1459 max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
1460 if (max_sectors < bio_sectors(bio)) {
1461 struct bio *split = bio_split(bio, max_sectors,
1462 GFP_NOIO, &conf->bio_split);
1463 bio_chain(split, bio);
1464 submit_bio_noacct(bio);
1465 bio = split;
1466 r1_bio->master_bio = bio;
1467 r1_bio->sectors = max_sectors;
1468 }
1469
1470 if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
1471 r1_bio->start_time = bio_start_io_acct(bio);
1472 atomic_set(&r1_bio->remaining, 1);
1473 atomic_set(&r1_bio->behind_remaining, 0);
1474
1475 first_clone = 1;
1476
1477 for (i = 0; i < disks; i++) {
1478 struct bio *mbio = NULL;
1479 struct md_rdev *rdev = conf->mirrors[i].rdev;
1480 if (!r1_bio->bios[i])
1481 continue;
1482
1483 if (first_clone) {
1484 /* do behind I/O ?
1485 * Not if there are too many, or cannot
1486 * allocate memory, or a reader on WriteMostly
1487 * is waiting for behind writes to flush */
1488 if (bitmap &&
1489 (atomic_read(&bitmap->behind_writes)
1490 < mddev->bitmap_info.max_write_behind) &&
1491 !waitqueue_active(&bitmap->behind_wait)) {
1492 alloc_behind_master_bio(r1_bio, bio);
1493 }
1494
1495 md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
1496 test_bit(R1BIO_BehindIO, &r1_bio->state));
1497 first_clone = 0;
1498 }
1499
1500 if (r1_bio->behind_master_bio)
1501 mbio = bio_clone_fast(r1_bio->behind_master_bio,
1502 GFP_NOIO, &mddev->bio_set);
1503 else
1504 mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
1505
1506 if (r1_bio->behind_master_bio) {
1507 if (test_bit(CollisionCheck, &rdev->flags))
1508 wait_for_serialization(rdev, r1_bio);
1509 if (test_bit(WriteMostly, &rdev->flags))
1510 atomic_inc(&r1_bio->behind_remaining);
1511 } else if (mddev->serialize_policy)
1512 wait_for_serialization(rdev, r1_bio);
1513
1514 r1_bio->bios[i] = mbio;
1515
1516 mbio->bi_iter.bi_sector = (r1_bio->sector +
1517 conf->mirrors[i].rdev->data_offset);
1518 bio_set_dev(mbio, conf->mirrors[i].rdev->bdev);
1519 mbio->bi_end_io = raid1_end_write_request;
1520 mbio->bi_opf = bio_op(bio) | (bio->bi_opf & (REQ_SYNC | REQ_FUA));
1521 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags) &&
1522 !test_bit(WriteMostly, &conf->mirrors[i].rdev->flags) &&
1523 conf->raid_disks - mddev->degraded > 1)
1524 mbio->bi_opf |= MD_FAILFAST;
1525 mbio->bi_private = r1_bio;
1526
1527 atomic_inc(&r1_bio->remaining);
1528
1529 if (mddev->gendisk)
1530 trace_block_bio_remap(mbio, disk_devt(mddev->gendisk),
1531 r1_bio->sector);
1532 /* flush_pending_writes() needs access to the rdev so...*/
1533 mbio->bi_bdev = (void *)conf->mirrors[i].rdev;
1534
1535 cb = blk_check_plugged(raid1_unplug, mddev, sizeof(*plug));
1536 if (cb)
1537 plug = container_of(cb, struct raid1_plug_cb, cb);
1538 else
1539 plug = NULL;
1540 if (plug) {
1541 bio_list_add(&plug->pending, mbio);
1542 plug->pending_cnt++;
1543 } else {
1544 spin_lock_irqsave(&conf->device_lock, flags);
1545 bio_list_add(&conf->pending_bio_list, mbio);
1546 conf->pending_count++;
1547 spin_unlock_irqrestore(&conf->device_lock, flags);
1548 md_wakeup_thread(mddev->thread);
1549 }
1550 }
1551
1552 r1_bio_write_done(r1_bio);
1553
1554 /* In case raid1d snuck in to freeze_array */
1555 wake_up(&conf->wait_barrier);
1556 }
1557
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[chrome-os:chromeos-5.4 34/40] arch/x86/include/asm/kvm_host.h:474:29: error: 'INTEL_PMC_MAX_GENERIC' undeclared here (not in a function)
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 93e3864c8d0c394f924882214846e755b95a8e83
commit: a39af6150bf16871cff0479ede93e809f4aa21a4 [34/40] BACKPORT: FROMLIST: x86/kvm: Add definitions for virtual suspend time injection
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout a39af6150bf16871cff0479ede93e809f4aa21a4
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash kernel/time/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:397:9: note: in definition of macro '__compiletime_assert'
397 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:417:2: note: in expansion of macro '_compiletime_assert'
417 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from include/linux/audit.h:13,
from kernel/time/timekeeping.c:24:
arch/um/include/asm/uaccess.h: In function '__access_ok':
arch/um/include/asm/uaccess.h:17:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
17 | (((unsigned long) (addr) >= FIXADDR_USER_START) && \
| ^~
arch/um/include/asm/uaccess.h:45:3: note: in expansion of macro '__access_ok_vsyscall'
45 | __access_ok_vsyscall(addr, size) ||
| ^~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/kvm_host.h:30,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/um/asm/desc.h: At top level:
>> arch/x86/um/asm/desc.h:7: warning: "LDT_empty" redefined
7 | #define LDT_empty(info) (\
|
In file included from arch/um/include/asm/mmu.h:10,
from include/linux/mm_types.h:20,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/clocksource.h:19,
from include/linux/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/x86/um/asm/mm_context.h:63: note: this is the location of the previous definition
63 | #define LDT_empty(info) (_LDT_empty(info) && ((info)->lm == 0))
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:11: warning: "PAGE_SIZE" redefined
11 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:14: note: this is the location of the previous definition
14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:36: warning: "PAGE_OFFSET" redefined
36 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
|
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:93: note: this is the location of the previous definition
93 | #define PAGE_OFFSET (uml_physmem)
|
In file included from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/page_types.h:38: warning: "VM_DATA_DEFAULT_FLAGS" redefined
38 | #define VM_DATA_DEFAULT_FLAGS \
|
In file included from arch/um/include/asm/page.h:23,
from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/x86/um/asm/vm-flags.h:19: note: this is the location of the previous definition
19 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
In file included from arch/x86/include/asm/page_types.h:48,
from arch/x86/include/asm/pgtable_types.h:8,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
--
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:48: note: this is the location of the previous definition
48 | #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
|
In file included from arch/x86/include/asm/pgtable_types.h:250,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_64_types.h:144: warning: "MODULES_VADDR" redefined
144 | #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:49: note: this is the location of the previous definition
49 | #define MODULES_VADDR VMALLOC_START
|
In file included from arch/x86/include/asm/pgtable_types.h:250,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_64_types.h:146: warning: "MODULES_END" redefined
146 | #define MODULES_END _AC(0xffffffffff000000, UL)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:50: note: this is the location of the previous definition
50 | #define MODULES_END VMALLOC_END
|
In file included from arch/x86/include/asm/pgtable_types.h:250,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_64_types.h:147: warning: "MODULES_LEN" redefined
147 | #define MODULES_LEN (MODULES_END - MODULES_VADDR)
|
In file included from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
arch/um/include/asm/pgtable.h:51: note: this is the location of the previous definition
51 | #define MODULES_LEN (MODULES_VADDR - MODULES_END)
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:266:47: error: conflicting types for 'pgprot_t'
266 | typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
| ^~~~~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:80:42: note: previous declaration of 'pgprot_t' was here
80 | typedef struct { unsigned long pgprot; } pgprot_t;
| ^~~~~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:268:34: error: conflicting types for 'pgd_t'
268 | typedef struct { pgdval_t pgd; } pgd_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:58:39: note: previous declaration of 'pgd_t' was here
58 | typedef struct { unsigned long pgd; } pgd_t;
| ^~~~~
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
>> include/asm-generic/5level-fixup.h:14:18: error: conflicting types for 'pgd_t'
14 | #define p4d_t pgd_t
| ^~~~~
include/asm-generic/pgtable-nop4d.h:9:31: note: in expansion of macro 'p4d_t'
9 | typedef struct { pgd_t pgd; } p4d_t;
| ^~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:268:34: note: previous declaration of 'pgd_t' was here
268 | typedef struct { pgdval_t pgd; } pgd_t;
| ^~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:14: warning: "P4D_SIZE" redefined
14 | #define P4D_SIZE (1UL << P4D_SHIFT)
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:9: note: this is the location of the previous definition
9 | #define P4D_SIZE PGDIR_SIZE
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:15: warning: "P4D_MASK" redefined
15 | #define P4D_MASK (~(P4D_SIZE-1))
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:10: note: this is the location of the previous definition
10 | #define P4D_MASK PGDIR_MASK
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:22:19: error: conflicting types for 'pgd_none'
22 | static inline int pgd_none(pgd_t pgd) { return 0; }
| ^~~~~~~~
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:27:19: note: previous definition of 'pgd_none' was here
27 | static inline int pgd_none(pgd_t pgd) { return 0; }
| ^~~~~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:23:19: error: conflicting types for 'pgd_bad'
23 | static inline int pgd_bad(pgd_t pgd) { return 0; }
| ^~~~~~~
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:28:19: note: previous definition of 'pgd_bad' was here
28 | static inline int pgd_bad(pgd_t pgd) { return 0; }
| ^~~~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:24:19: error: conflicting types for 'pgd_present'
24 | static inline int pgd_present(pgd_t pgd) { return 1; }
| ^~~~~~~~~~~
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:29:19: note: previous definition of 'pgd_present' was here
29 | static inline int pgd_present(pgd_t pgd) { return 1; }
| ^~~~~~~~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:25:20: error: conflicting types for 'pgd_clear'
25 | static inline void pgd_clear(pgd_t *pgd) { }
| ^~~~~~~~~
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:30:20: note: previous definition of 'pgd_clear' was here
30 | static inline void pgd_clear(pgd_t *pgd) { }
| ^~~~~~~~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:26: warning: "p4d_ERROR" redefined
26 | #define p4d_ERROR(p4d) (pgd_ERROR((p4d).pgd))
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:40: note: this is the location of the previous definition
40 | #define p4d_ERROR(p4d) do { } while (0)
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:28: warning: "pgd_populate" redefined
28 | #define pgd_populate(mm, pgd, p4d) do { } while (0)
|
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:33: note: this is the location of the previous definition
33 | #define pgd_populate(mm, pgd, pud) do { } while (0)
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:29: warning: "pgd_populate_safe" redefined
29 | #define pgd_populate_safe(mm, pgd, p4d) do { } while (0)
|
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:34: note: this is the location of the previous definition
34 | #define pgd_populate_safe(mm, pgd, pud) do { } while (0)
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:34: warning: "set_pgd" redefined
34 | #define set_pgd(pgdptr, pgdval) set_p4d((p4d_t *)(pgdptr), (p4d_t) { pgdval })
|
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:39: note: this is the location of the previous definition
39 | #define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
>> include/asm-generic/pgtable-nop4d.h:36:39: error: expected ')' before '*' token
36 | static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
| ^
include/asm-generic/5level-fixup.h:21:34: note: in definition of macro 'p4d_offset'
21 | #define p4d_offset(pgd, start) (pgd)
| ^~~
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:41: warning: "p4d_val" redefined
41 | #define p4d_val(x) (pgd_val((x).pgd))
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:42: note: this is the location of the previous definition
42 | #define p4d_val(p4d) pgd_val(p4d)
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:42: warning: "__p4d" redefined
42 | #define __p4d(x) ((p4d_t) { __pgd(x) })
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:48: note: this is the location of the previous definition
48 | #define __p4d(x) __pgd(x)
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:44: warning: "pgd_page" redefined
44 | #define pgd_page(pgd) (p4d_page((p4d_t){ pgd }))
|
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:49: note: this is the location of the previous definition
49 | #define pgd_page(pgd) (pud_page((pud_t){ pgd }))
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:45: warning: "pgd_page_vaddr" redefined
45 | #define pgd_page_vaddr(pgd) (p4d_page_vaddr((p4d_t){ pgd }))
|
In file included from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable-nop4d-hack.h:50: note: this is the location of the previous definition
50 | #define pgd_page_vaddr(pgd) (pud_page_vaddr((pud_t){ pgd }))
|
In file included from arch/x86/include/asm/pgtable_types.h:321,
from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
>> include/asm-generic/pgtable-nop4d.h:53: warning: "__p4d_free_tlb" redefined
53 | #define __p4d_free_tlb(tlb, x, a) do { } while (0)
|
In file included from include/asm-generic/pgtable-nop4d-hack.h:6,
from include/asm-generic/pgtable-nopud.h:8,
from arch/um/include/asm/pgtable-3level.h:11,
from arch/um/include/asm/pgtable.h:25,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/5level-fixup.h:54: note: this is the location of the previous definition
54 | #define __p4d_free_tlb(tlb, x, addr) do { } while (0)
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h: In function 'native_make_pud':
>> arch/x86/include/asm/pgtable_types.h:351:20: error: 'pud_t' {aka 'struct <anonymous>'} has no member named 'p4d'; did you mean 'pgd'?
351 | return (pud_t) { .p4d.pgd = native_make_pgd(val) };
| ^~~
| pgd
arch/x86/include/asm/pgtable_types.h:351:30: error: incompatible types when initializing type 'long unsigned int' using type 'pgd_t' {aka 'struct <anonymous>'}
351 | return (pud_t) { .p4d.pgd = native_make_pgd(val) };
| ^~~~~~~~~~~~~~~
arch/x86/include/asm/pgtable_types.h: In function 'native_pud_val':
arch/x86/include/asm/pgtable_types.h:356:28: error: 'pud_t' {aka 'struct <anonymous>'} has no member named 'p4d'; did you mean 'pgd'?
356 | return native_pgd_val(pud.p4d.pgd);
| ^~~
| pgd
>> arch/x86/include/asm/pgtable_types.h:354:45: warning: parameter 'pud' set but not used [-Wunused-but-set-parameter]
354 | static inline pudval_t native_pud_val(pud_t pud)
| ~~~~~~^~~
arch/x86/include/asm/pgtable_types.h: At top level:
arch/x86/include/asm/pgtable_types.h:361:34: error: conflicting types for 'pmd_t'
361 | typedef struct { pmdval_t pmd; } pmd_t;
| ^~~~~
In file included from arch/um/include/asm/thread_info.h:15,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/um/include/generated/asm/preempt.h:1,
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/timekeeper_internal.h:10,
from kernel/time/timekeeping.c:6:
arch/um/include/asm/page.h:61:39: note: previous declaration of 'pmd_t' was here
61 | typedef struct { unsigned long pmd; } pmd_t;
| ^~~~~
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:515: warning: "pgprot_writecombine" redefined
515 | #define pgprot_writecombine pgprot_writecombine
|
In file included from arch/um/include/asm/pgtable.h:363,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable.h:505: note: this is the location of the previous definition
505 | #define pgprot_writecombine pgprot_noncached
|
In file included from arch/x86/include/asm/pat.h:6,
from arch/x86/include/asm/mtrr.h:27,
from arch/x86/include/asm/kvm_host.h:31,
from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/pgtable_types.h:518: warning: "pgprot_writethrough" redefined
518 | #define pgprot_writethrough pgprot_writethrough
|
In file included from arch/um/include/asm/pgtable.h:363,
from include/linux/mm.h:99,
from kernel/time/timekeeping.c:11:
include/asm-generic/pgtable.h:509: note: this is the location of the previous definition
509 | #define pgprot_writethrough pgprot_noncached
|
In file included from include/linux/kvm_host.h:37,
from kernel/time/timekeeping.c:25:
arch/x86/include/asm/kvm_host.h:474:29: error: 'INTEL_PMC_MAX_GENERIC' undeclared here (not in a function)
474 | struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC];
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/kvm_host.h:475:32: error: 'INTEL_PMC_MAX_FIXED' undeclared here (not in a function)
475 | struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/kvm_host.h: In function 'read_msr':
arch/x86/include/asm/kvm_host.h:1508:2: error: implicit declaration of function 'rdmsrl' [-Werror=implicit-function-declaration]
1508 | rdmsrl(msr, value);
| ^~~~~~
arch/x86/include/asm/kvm_host.h: In function 'kvm_irq_is_postable':
arch/x86/include/asm/kvm_host.h:1628:32: error: 'APIC_DM_FIXED' undeclared (first use in this function)
1628 | return (irq->delivery_mode == APIC_DM_FIXED ||
| ^~~~~~~~~~~~~
arch/x86/include/asm/kvm_host.h:1628:32: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/include/asm/kvm_host.h:1629:25: error: 'APIC_DM_LOWEST' undeclared (first use in this function)
1629 | irq->delivery_mode == APIC_DM_LOWEST);
| ^~~~~~~~~~~~~~
arch/x86/include/asm/kvm_host.h: In function 'kvm_cpu_get_apicid':
arch/x86/include/asm/kvm_host.h:1652:9: error: 'BAD_APICID' undeclared (first use in this function)
1652 | return BAD_APICID;
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/INTEL_PMC_MAX_GENERIC +474 arch/x86/include/asm/kvm_host.h
f5132b01386b5a6 Gleb Natapov 2011-11-10 460
f5132b01386b5a6 Gleb Natapov 2011-11-10 461 struct kvm_pmu {
f5132b01386b5a6 Gleb Natapov 2011-11-10 462 unsigned nr_arch_gp_counters;
f5132b01386b5a6 Gleb Natapov 2011-11-10 463 unsigned nr_arch_fixed_counters;
f5132b01386b5a6 Gleb Natapov 2011-11-10 464 unsigned available_event_types;
f5132b01386b5a6 Gleb Natapov 2011-11-10 465 u64 fixed_ctr_ctrl;
f5132b01386b5a6 Gleb Natapov 2011-11-10 466 u64 global_ctrl;
f5132b01386b5a6 Gleb Natapov 2011-11-10 467 u64 global_status;
f5132b01386b5a6 Gleb Natapov 2011-11-10 468 u64 global_ovf_ctrl;
f5132b01386b5a6 Gleb Natapov 2011-11-10 469 u64 counter_bitmask[2];
f5132b01386b5a6 Gleb Natapov 2011-11-10 470 u64 global_ctrl_mask;
c715eb9fe9027ed Luwei Kang 2019-02-18 471 u64 global_ovf_ctrl_mask;
103af0a98788592 Andi Kleen 2013-07-18 472 u64 reserved_bits;
f5132b01386b5a6 Gleb Natapov 2011-11-10 473 u8 version;
15c7ad51ad58cbd Robert Richter 2012-06-20 @474 struct kvm_pmc gp_counters[INTEL_PMC_MAX_GENERIC];
15c7ad51ad58cbd Robert Richter 2012-06-20 @475 struct kvm_pmc fixed_counters[INTEL_PMC_MAX_FIXED];
f5132b01386b5a6 Gleb Natapov 2011-11-10 476 struct irq_work irq_work;
f5132b01386b5a6 Gleb Natapov 2011-11-10 477 u64 reprogram_pmi;
f5132b01386b5a6 Gleb Natapov 2011-11-10 478 };
f5132b01386b5a6 Gleb Natapov 2011-11-10 479
:::::: The code at line 474 was first introduced by commit
:::::: 15c7ad51ad58cbd3b46112c1840bc7228bd354bf perf/x86: Rename Intel specific macros
:::::: TO: Robert Richter <robert.richter(a)amd.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 05/16] lpfc: Add EDC ELS support
by kernel test robot
Hi James,
I love your patch! Perhaps something to improve:
[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v5.14-rc5 next-20210812]
[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/James-Smart/lpfc-Update-lpfc-to-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 10.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://github.com/0day-ci/linux/commit/500c94414bdcb236c244cbbde92198527...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review James-Smart/lpfc-Update-lpfc-to-revision-14-0-0-1/20210813-101108
git checkout 500c94414bdcb236c244cbbde9219852777a38bf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross 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 >>):
In file included from drivers/scsi/lpfc/lpfc_els.c:45:
drivers/scsi/lpfc/lpfc_els.c: In function 'lpfc_cmpl_els_edc':
>> drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:3947:5: note: in expansion of macro 'lpfc_printf_log'
3947 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:3947:5: note: in expansion of macro 'lpfc_printf_log'
3947 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
>> drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:3973:5: note: in expansion of macro 'lpfc_printf_log'
3973 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:3973:5: note: in expansion of macro 'lpfc_printf_log'
3973 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_els.c: In function 'lpfc_els_rcv_edc':
>> drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:8806:5: note: in expansion of macro 'lpfc_printf_log'
8806 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:8806:5: note: in expansion of macro 'lpfc_printf_log'
8806 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
>> drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:8821:5: note: in expansion of macro 'lpfc_printf_log'
8821 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_logmsg.h:94:45: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'unsigned int' [-Wformat=]
94 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
| ^~~~~
drivers/scsi/lpfc/lpfc_els.c:8821:5: note: in expansion of macro 'lpfc_printf_log'
8821 | lpfc_printf_log(
| ^~~~~~~~~~~~~~~
vim +94 drivers/scsi/lpfc/lpfc_logmsg.h
e8b62011d88d6f James Smart 2007-08-02 85
dea3101e0a5c89 James Bottomley 2005-04-17 86 #define lpfc_printf_log(phba, level, mask, fmt, arg...) \
7f5f3d0d02aa2f James Smart 2008-02-08 87 do { \
f4b4c68f74dcd5 James Smart 2009-05-22 88 { uint32_t log_verbose = (phba)->pport ? \
f4b4c68f74dcd5 James Smart 2009-05-22 89 (phba)->pport->cfg_log_verbose : \
f4b4c68f74dcd5 James Smart 2009-05-22 90 (phba)->cfg_log_verbose; \
372c187b8a705c Dick Kennedy 2020-06-30 91 if (((mask) & log_verbose) || (level[1] <= '3')) { \
372c187b8a705c Dick Kennedy 2020-06-30 92 if ((mask) & LOG_TRACE_EVENT) \
372c187b8a705c Dick Kennedy 2020-06-30 93 lpfc_dmp_dbg(phba); \
e8b62011d88d6f James Smart 2007-08-02 @94 dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[chrome-os:chromeos-5.10 11/21] drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1240:12: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: fd02c3763b163e3228c744f68af7acada84b164a
commit: c09db8d0cdc8a6b23b5243f23d879b1f602ec371 [11/21] FROMLIST: media: platform: mtk-mdp3: Add Mediatek MDP3 driver
config: powerpc64-randconfig-r001-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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-powerpc-linux-gnu
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout c09db8d0cdc8a6b23b5243f23d879b1f602ec371
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
^
arch/powerpc/include/asm/io.h:522:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:133:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541: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 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
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:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:135:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542: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 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
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:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:137:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543: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 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
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:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:139:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544: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 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
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:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:141:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545: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 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
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:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:143:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1240:12: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
type = (enum mdp_comp_type)matches->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1282:6: warning: unused variable 'ret' [-Wunused-variable]
int ret;
^
drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1368:10: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
type = (enum mdp_comp_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MTK_SCP
Depends on REMOTEPROC && (ARCH_MEDIATEK || COMPILE_TEST
Selected by
- VIDEO_MEDIATEK_MDP3 && MEDIA_SUPPORT && MEDIA_PLATFORM_SUPPORT && V4L_MEM2MEM_DRIVERS && MTK_IOMMU && VIDEO_DEV && VIDEO_V4L2 && (ARCH_MEDIATEK || COMPILE_TEST && HAS_DMA
vim +1240 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c
1222
1223 static int mdp_sub_comps_create(struct mdp_dev *mdp, struct device_node *node)
1224 {
1225 struct device *dev = &mdp->pdev->dev;
1226 struct property *prop;
1227 const char *name;
1228 int index = 0;
1229
1230 of_property_for_each_string(node, "mdp3-comps", prop, name) {
1231 const struct of_device_id *matches = mdp_sub_comp_dt_ids;
1232 enum mdp_comp_type type = MDP_COMP_NONE;
1233 u32 alias_id;
1234 int id, ret;
1235 struct mdp_comp *comp;
1236
1237 for (; matches->compatible[0]; matches++) {
1238 if (of_compat_cmp(name, matches->compatible,
1239 strlen(matches->compatible)) == 0) {
> 1240 type = (enum mdp_comp_type)matches->data;
1241 break;
1242 }
1243 }
1244
1245 ret = of_property_read_u32_index(node, "mdp3-comp-ids",
1246 index, &alias_id);
1247 if (ret) {
1248 dev_warn(dev, "Skipping unknown component %s\n", name);
1249 return ret;
1250 }
1251
1252 id = mdp_comp_get_id(type, alias_id);
1253 if (id < 0) {
1254 dev_err(dev, "Failed to get component id: "
1255 "%s type %d, alias %d\n", name, type, alias_id);
1256 return -ENODEV;
1257 }
1258
1259 comp = mdp_comp_create(mdp, node, id);
1260 if (IS_ERR(comp))
1261 return PTR_ERR(comp);
1262
1263 index++;
1264 }
1265 return 0;
1266 }
1267
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
arch/arm/mm/alignment.c:775:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 12 months ago
config: arm-randconfig-s032-20210813 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm/mm/alignment.c:775:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int [usertype] *ip @@
arch/arm/mm/alignment.c:775:25: sparse: expected void const volatile [noderef] __user *ptr
arch/arm/mm/alignment.c:775:25: sparse: got unsigned int [usertype] *ip
>> arch/arm/mm/alignment.c:790:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] *ip @@
arch/arm/mm/alignment.c:790:25: sparse: expected void const volatile [noderef] __user *ptr
arch/arm/mm/alignment.c:790:25: sparse: got unsigned short [usertype] *ip
vim +775 arch/arm/mm/alignment.c
c2860d43f5dfab George G. Davis 2009-06-04 768
1bb9fb0a147f9d Russell King 2019-09-06 769 static int alignment_get_arm(struct pt_regs *regs, u32 *ip, u32 *inst)
67e15fa5b487ad Russell King 2019-08-31 770 {
67e15fa5b487ad Russell King 2019-08-31 771 u32 instr = 0;
67e15fa5b487ad Russell King 2019-08-31 772 int fault;
67e15fa5b487ad Russell King 2019-08-31 773
67e15fa5b487ad Russell King 2019-08-31 774 if (user_mode(regs))
67e15fa5b487ad Russell King 2019-08-31 @775 fault = get_user(instr, ip);
67e15fa5b487ad Russell King 2019-08-31 776 else
25f12ae45fc193 Christoph Hellwig 2020-06-17 777 fault = get_kernel_nofault(instr, ip);
67e15fa5b487ad Russell King 2019-08-31 778
67e15fa5b487ad Russell King 2019-08-31 779 *inst = __mem_to_opcode_arm(instr);
67e15fa5b487ad Russell King 2019-08-31 780
67e15fa5b487ad Russell King 2019-08-31 781 return fault;
67e15fa5b487ad Russell King 2019-08-31 782 }
67e15fa5b487ad Russell King 2019-08-31 783
67e15fa5b487ad Russell King 2019-08-31 784 static int alignment_get_thumb(struct pt_regs *regs, u16 *ip, u16 *inst)
67e15fa5b487ad Russell King 2019-08-31 785 {
67e15fa5b487ad Russell King 2019-08-31 786 u16 instr = 0;
67e15fa5b487ad Russell King 2019-08-31 787 int fault;
67e15fa5b487ad Russell King 2019-08-31 788
67e15fa5b487ad Russell King 2019-08-31 789 if (user_mode(regs))
67e15fa5b487ad Russell King 2019-08-31 @790 fault = get_user(instr, ip);
67e15fa5b487ad Russell King 2019-08-31 791 else
25f12ae45fc193 Christoph Hellwig 2020-06-17 792 fault = get_kernel_nofault(instr, ip);
67e15fa5b487ad Russell King 2019-08-31 793
67e15fa5b487ad Russell King 2019-08-31 794 *inst = __mem_to_opcode_thumb16(instr);
67e15fa5b487ad Russell King 2019-08-31 795
67e15fa5b487ad Russell King 2019-08-31 796 return fault;
67e15fa5b487ad Russell King 2019-08-31 797 }
67e15fa5b487ad Russell King 2019-08-31 798
:::::: The code at line 775 was first introduced by commit
:::::: 67e15fa5b487adb9b78a92789eeff2d6ec8f5cee ARM: mm: fix alignment handler faults under memory pressure
:::::: TO: Russell King <rmk+kernel(a)armlinux.org.uk>
:::::: CC: Russell King <rmk+kernel(a)armlinux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.4 5/9] drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: e3919bfeb0066ab9b5f9765e5610b95672990e64 [5/9] ANDROID: dma-buf: system_heap: Add deferred freeing to the system heap
config: i386-randconfig-s001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout e3919bfeb0066ab9b5f9765e5610b95672990e64
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/dma-buf/heaps/ kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/deferred-free-helper.c:23:19: sparse: sparse: symbol 'freelist_waitqueue' was not declared. Should it be static?
>> drivers/dma-buf/heaps/deferred-free-helper.c:24:20: sparse: sparse: symbol 'freelist_task' was not declared. Should it be static?
vim +/freelist_waitqueue +23 drivers/dma-buf/heaps/deferred-free-helper.c
bd1639945c3029 John Stultz 2020-12-09 20
bd1639945c3029 John Stultz 2020-12-09 21 static LIST_HEAD(free_list);
bd1639945c3029 John Stultz 2020-12-09 22 static size_t list_nr_pages;
bd1639945c3029 John Stultz 2020-12-09 @23 wait_queue_head_t freelist_waitqueue;
bd1639945c3029 John Stultz 2020-12-09 @24 struct task_struct *freelist_task;
bd1639945c3029 John Stultz 2020-12-09 25 static DEFINE_SPINLOCK(free_list_lock);
bd1639945c3029 John Stultz 2020-12-09 26
:::::: The code at line 23 was first introduced by commit
:::::: bd1639945c30298e4bea2b611d6b0cd08d3cdd98 ANDROID: dma-buf: heaps: Add deferred-free-helper library code
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: 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
1 year, 1 month
[linux-next:master 5363/7554] kernel/sys.c:1896:17: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9b992972fb9c2a1bc3fb25bab70da8a4385e3abe
commit: 9cf1d7d830f4a586dfa4ddcaf9eae3959e0708ef [5363/7554] ARC: cmpxchg/xchg: rewrite as macros to make type safe
config: arc-randconfig-s032-20210812 (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# 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 9cf1d7d830f4a586dfa4ddcaf9eae3959e0708ef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/sys.c:1896:19: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct file [noderef] __rcu *_val_ @@ got struct file *[assigned] file @@
kernel/sys.c:1896:19: sparse: expected struct file [noderef] __rcu *_val_
kernel/sys.c:1896:19: sparse: got struct file *[assigned] file
>> kernel/sys.c:1896:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *old_exe @@ got struct file [noderef] __rcu *[assigned] _val_ @@
kernel/sys.c:1896:17: sparse: expected struct file *old_exe
kernel/sys.c:1896:17: sparse: got struct file [noderef] __rcu *[assigned] _val_
kernel/sys.c:1067:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/sys.c:1067:32: sparse: expected struct task_struct *p1
kernel/sys.c:1067:32: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/sys.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:714:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:714:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:714:37: sparse: got struct spinlock [noderef] __rcu *
--
net/ipv4/tcp_cong.c:238:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct tcp_congestion_ops const [noderef] __rcu *_val_ @@ got struct tcp_congestion_ops *[assigned] ca @@
net/ipv4/tcp_cong.c:238:24: sparse: expected struct tcp_congestion_ops const [noderef] __rcu *_val_
net/ipv4/tcp_cong.c:238:24: sparse: got struct tcp_congestion_ops *[assigned] ca
>> net/ipv4/tcp_cong.c:238:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tcp_congestion_ops const *prev @@ got struct tcp_congestion_ops const [noderef] __rcu *[assigned] _val_ @@
net/ipv4/tcp_cong.c:238:22: sparse: expected struct tcp_congestion_ops const *prev
net/ipv4/tcp_cong.c:238:22: sparse: got struct tcp_congestion_ops const [noderef] __rcu *[assigned] _val_
vim +1896 kernel/sys.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1845
6e399cd144d850 Davidlohr Bueso 2015-04-16 1846 static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1847 {
2903ff019b346a Al Viro 2012-08-28 1848 struct fd exe;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1849 struct file *old_exe, *exe_file;
496ad9aa8ef448 Al Viro 2013-01-23 1850 struct inode *inode;
2903ff019b346a Al Viro 2012-08-28 1851 int err;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1852
2903ff019b346a Al Viro 2012-08-28 1853 exe = fdget(fd);
2903ff019b346a Al Viro 2012-08-28 1854 if (!exe.file)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1855 return -EBADF;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1856
496ad9aa8ef448 Al Viro 2013-01-23 1857 inode = file_inode(exe.file);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1858
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1859 /*
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1860 * Because the original mm->exe_file points to executable file, make
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1861 * sure that this one is executable as well, to avoid breaking an
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1862 * overall picture.
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1863 */
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1864 err = -EACCES;
90f8572b0f021f Eric W. Biederman 2015-06-29 1865 if (!S_ISREG(inode->i_mode) || path_noexec(&exe.file->f_path))
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1866 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1867
02f92b3868a1b3 Christian Brauner 2021-01-21 1868 err = file_permission(exe.file, MAY_EXEC);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1869 if (err)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1870 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1871
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1872 /*
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1873 * Forbid mm->exe_file change if old file still mapped.
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1874 */
6e399cd144d850 Davidlohr Bueso 2015-04-16 1875 exe_file = get_mm_exe_file(mm);
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1876 err = -EBUSY;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1877 if (exe_file) {
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1878 struct vm_area_struct *vma;
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1879
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1880 mmap_read_lock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1881 for (vma = mm->mmap; vma; vma = vma->vm_next) {
6e399cd144d850 Davidlohr Bueso 2015-04-16 1882 if (!vma->vm_file)
6e399cd144d850 Davidlohr Bueso 2015-04-16 1883 continue;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1884 if (path_equal(&vma->vm_file->f_path,
6e399cd144d850 Davidlohr Bueso 2015-04-16 1885 &exe_file->f_path))
6e399cd144d850 Davidlohr Bueso 2015-04-16 1886 goto exit_err;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1887 }
6e399cd144d850 Davidlohr Bueso 2015-04-16 1888
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1889 mmap_read_unlock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1890 fput(exe_file);
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1891 }
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1892
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1893 err = 0;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1894 /* set the new file, lockless */
6e399cd144d850 Davidlohr Bueso 2015-04-16 1895 get_file(exe.file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 @1896 old_exe = xchg(&mm->exe_file, exe.file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1897 if (old_exe)
6e399cd144d850 Davidlohr Bueso 2015-04-16 1898 fput(old_exe);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1899 exit:
2903ff019b346a Al Viro 2012-08-28 1900 fdput(exe);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1901 return err;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1902 exit_err:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1903 mmap_read_unlock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1904 fput(exe_file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1905 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1906 }
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1907
:::::: The code at line 1896 was first introduced by commit
:::::: 6e399cd144d8500ffb5d40fa6848890e2580a80a prctl: avoid using mmap_sem for exe_file serialization
:::::: TO: Davidlohr Bueso <dave(a)stgolabs.net>
:::::: 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, 1 month
[android-goldfish:android-3.18 442/460] drivers/mmc/host/sdhci-of-esdhc.c:361:11: error: invalid use of undefined type 'struct sdhci_esdhc'
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 03c65f790cc49ff38432f8c39f3cd1320fcb1f2a
commit: dc29f368658a96818bc9c602b0f160e603a0d4a6 [442/460] mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version
config: powerpc-buildonly-randconfig-r005-20210812 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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 android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout dc29f368658a96818bc9c602b0f160e603a0d4a6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash M=drivers/mmc/host
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/elf.h:12,
from include/linux/elf.h:4,
from include/linux/module.h:14,
from drivers/mmc/host/sdhci-of-esdhc.c:20:
include/linux/sched.h:1067:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
1067 | const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
| ^~~~~
drivers/mmc/host/sdhci-of-esdhc.c: In function 'sdhci_esdhc_probe':
>> drivers/mmc/host/sdhci-of-esdhc.c:361:11: error: invalid use of undefined type 'struct sdhci_esdhc'
361 | if (esdhc->vendor_ver == VENDOR_V_22)
| ^~
drivers/mmc/host/sdhci-of-esdhc.c:364:11: error: invalid use of undefined type 'struct sdhci_esdhc'
364 | if (esdhc->vendor_ver > VENDOR_V_22)
| ^~
vim +361 drivers/mmc/host/sdhci-of-esdhc.c
342
343 static int sdhci_esdhc_probe(struct platform_device *pdev)
344 {
345 struct sdhci_host *host;
346 struct device_node *np;
347 struct sdhci_pltfm_host *pltfm_host;
348 struct sdhci_esdhc *esdhc;
349 int ret;
350
351 host = sdhci_pltfm_init(pdev, &sdhci_esdhc_pdata, 0);
352 if (IS_ERR(host))
353 return PTR_ERR(host);
354
355 sdhci_get_of_property(pdev);
356
357 np = pdev->dev.of_node;
358
359 pltfm_host = sdhci_priv(host);
360 esdhc = pltfm_host->priv;
> 361 if (esdhc->vendor_ver == VENDOR_V_22)
362 host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
363
364 if (esdhc->vendor_ver > VENDOR_V_22)
365 host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ;
366
367 if (of_device_is_compatible(np, "fsl,p2020-esdhc")) {
368 /*
369 * Freescale messed up with P2020 as it has a non-standard
370 * host control register
371 */
372 host->quirks2 |= SDHCI_QUIRK2_BROKEN_HOST_CONTROL;
373 }
374
375 /* call to generic mmc_of_parse to support additional capabilities */
376 mmc_of_parse(host->mmc);
377 mmc_of_parse_voltage(np, &host->ocr_mask);
378
379 ret = sdhci_add_host(host);
380 if (ret)
381 sdhci_pltfm_free(pdev);
382
383 return ret;
384 }
385
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v3 2/2] crypto: hisilicon/sec - modify the hardware endian configuration
by kernel test robot
Hi Kai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master linux/master linus/master v5.14-rc5 next-20210812]
[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/Kai-Ye/crypto-hisilicon-some-mis...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.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://github.com/0day-ci/linux/commit/3a700b467c3a65e18d9a7a2b7939c6b2f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Ye/crypto-hisilicon-some-misc-bugfix-for-SEC-engine/20210813-102441
git checkout 3a700b467c3a65e18d9a7a2b7939c6b2fc369da7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=ia64
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/crypto/hisilicon/sec2/sec_main.c: In function 'sec_engine_init':
>> drivers/crypto/hisilicon/sec2/sec_main.c:455:2: error: implicit declaration of function 'sec_get_endian'; did you mean 'sec_set_endian'? [-Werror=implicit-function-declaration]
455 | sec_get_endian(qm);
| ^~~~~~~~~~~~~~
| sec_set_endian
At top level:
drivers/crypto/hisilicon/sec2/sec_main.c:321:13: warning: 'sec_set_endian' defined but not used [-Wunused-function]
321 | static void sec_set_endian(struct hisi_qm *qm)
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +455 drivers/crypto/hisilicon/sec2/sec_main.c
405
406 static int sec_engine_init(struct hisi_qm *qm)
407 {
408 int ret;
409 u32 reg;
410
411 /* disable clock gate control before mem init */
412 sec_disable_clock_gate(qm);
413
414 writel_relaxed(0x1, qm->io_base + SEC_MEM_START_INIT_REG);
415
416 ret = readl_relaxed_poll_timeout(qm->io_base + SEC_MEM_INIT_DONE_REG,
417 reg, reg & 0x1, SEC_DELAY_10_US,
418 SEC_POLL_TIMEOUT_US);
419 if (ret) {
420 pci_err(qm->pdev, "fail to init sec mem\n");
421 return ret;
422 }
423
424 reg = readl_relaxed(qm->io_base + SEC_CONTROL_REG);
425 reg |= (0x1 << SEC_TRNG_EN_SHIFT);
426 writel_relaxed(reg, qm->io_base + SEC_CONTROL_REG);
427
428 reg = readl_relaxed(qm->io_base + SEC_INTERFACE_USER_CTRL0_REG);
429 reg |= SEC_USER0_SMMU_NORMAL;
430 writel_relaxed(reg, qm->io_base + SEC_INTERFACE_USER_CTRL0_REG);
431
432 reg = readl_relaxed(qm->io_base + SEC_INTERFACE_USER_CTRL1_REG);
433 reg &= SEC_USER1_SMMU_MASK;
434 if (qm->use_sva && qm->ver == QM_HW_V2)
435 reg |= SEC_USER1_SMMU_SVA;
436 else
437 reg |= SEC_USER1_SMMU_NORMAL;
438 writel_relaxed(reg, qm->io_base + SEC_INTERFACE_USER_CTRL1_REG);
439
440 writel(SEC_SINGLE_PORT_MAX_TRANS,
441 qm->io_base + AM_CFG_SINGLE_PORT_MAX_TRANS);
442
443 writel(SEC_SAA_ENABLE, qm->io_base + SEC_SAA_EN_REG);
444
445 /* Enable sm4 extra mode, as ctr/ecb */
446 writel_relaxed(SEC_BD_ERR_CHK_EN0,
447 qm->io_base + SEC_BD_ERR_CHK_EN_REG0);
448 /* Enable sm4 xts mode multiple iv */
449 writel_relaxed(SEC_BD_ERR_CHK_EN1,
450 qm->io_base + SEC_BD_ERR_CHK_EN_REG1);
451 writel_relaxed(SEC_BD_ERR_CHK_EN3,
452 qm->io_base + SEC_BD_ERR_CHK_EN_REG3);
453
454 /* config endian */
> 455 sec_get_endian(qm);
456
457 sec_enable_clock_gate(qm);
458
459 return 0;
460 }
461
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month