All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [tip:locking/debug 1/76] include/linux/atomic/atomic-instrumented.h:1881:43: error: invalid type argument of unary '*' (have 'int')
Date: Wed, 25 Aug 2021 05:49:39 +0800	[thread overview]
Message-ID: <202108250529.hs1304PO-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 14940 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/debug
head:   4812c9111220b0af00f7a436cc02ffaed289962c
commit: c87866ede44ad7da6b296d732221dc34ce1b154d [1/76] Merge tag 'v5.14-rc6' into locking/core, to pick up fixes
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=c87866ede44ad7da6b296d732221dc34ce1b154d
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip locking/debug
        git checkout c87866ede44ad7da6b296d732221dc34ce1b154d
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/dma/idxd/perfmon.c:131:5: error: 'struct hw_perf_event' has no member named 'event_base'
     131 |  hwc->event_base = ioread64(CNTRCFG_REG(idxd, idx));
         |     ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_validate_group':
   drivers/dma/idxd/perfmon.c:157:35: error: 'struct perf_event' has no member named 'group_leader'
     157 |  struct perf_event *leader = event->group_leader;
         |                                   ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_event_init':
   drivers/dma/idxd/perfmon.c:204:7: error: 'struct perf_event' has no member named 'hw'
     204 |  event->hw.idx = -1;
         |       ^~
   drivers/dma/idxd/perfmon.c:206:11: error: 'struct perf_event' has no member named 'attr'
     206 |  if (event->attr.type != event->pmu->type)
         |           ^~
   drivers/dma/idxd/perfmon.c:206:31: error: 'struct perf_event' has no member named 'pmu'
     206 |  if (event->attr.type != event->pmu->type)
         |                               ^~
   drivers/dma/idxd/perfmon.c:210:11: error: 'struct perf_event' has no member named 'attr'
     210 |  if (event->attr.sample_period)
         |           ^~
   drivers/dma/idxd/perfmon.c:213:11: error: 'struct perf_event' has no member named 'cpu'
     213 |  if (event->cpu < 0)
         |           ^~
   drivers/dma/idxd/perfmon.c:216:11: error: 'struct perf_event' has no member named 'pmu'
     216 |  if (event->pmu != &idxd->idxd_pmu->pmu)
         |           ^~
   drivers/dma/idxd/perfmon.c:219:7: error: 'struct perf_event' has no member named 'hw'
     219 |  event->hw.event_base = ioread64(PERFMON_TABLE_OFFSET(idxd));
         |       ^~
   drivers/dma/idxd/perfmon.c:220:7: error: 'struct perf_event' has no member named 'cpu'
     220 |  event->cpu = idxd->idxd_pmu->cpu;
         |       ^~
   drivers/dma/idxd/perfmon.c:221:7: error: 'struct perf_event' has no member named 'hw'
     221 |  event->hw.config = event->attr.config;
         |       ^~
   drivers/dma/idxd/perfmon.c:221:26: error: 'struct perf_event' has no member named 'attr'
     221 |  event->hw.config = event->attr.config;
         |                          ^~
   drivers/dma/idxd/perfmon.c:223:11: error: 'struct perf_event' has no member named 'group_leader'
     223 |  if (event->group_leader != event)
         |           ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_read_counter':
   drivers/dma/idxd/perfmon.c:232:36: error: 'struct perf_event' has no member named 'hw'
     232 |  struct hw_perf_event *hwc = &event->hw;
         |                                    ^~
   drivers/dma/idxd/perfmon.c:234:16: error: 'struct hw_perf_event' has no member named 'idx'
     234 |  int cntr = hwc->idx;
         |                ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_event_update':
   drivers/dma/idxd/perfmon.c:246:36: error: 'struct perf_event' has no member named 'hw'
     246 |  struct hw_perf_event *hwc = &event->hw;
         |                                    ^~
   In file included from include/asm-generic/local64.h:22,
                    from ./arch/x86/include/generated/asm/local64.h:1,
                    from include/linux/u64_stats_sync.h:75,
                    from include/linux/cgroup-defs.h:20,
                    from include/linux/cgroup.h:28,
                    from include/linux/perf_event.h:57,
                    from drivers/dma/idxd/idxd.h:13,
                    from drivers/dma/idxd/perfmon.c:6:
   drivers/dma/idxd/perfmon.c:249:37: error: 'struct hw_perf_event' has no member named 'prev_count'
     249 |   prev_raw_count = local64_read(&hwc->prev_count);
         |                                     ^~
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
      16 | #define local_read(l) atomic_long_read(&(l)->a)
         |                                          ^
   drivers/dma/idxd/perfmon.c:249:20: note: in expansion of macro 'local64_read'
     249 |   prev_raw_count = local64_read(&hwc->prev_count);
         |                    ^~~~~~~~~~~~
   In file included from include/linux/atomic.h:82,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   drivers/dma/idxd/perfmon.c:251:31: error: 'struct hw_perf_event' has no member named 'prev_count'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |                               ^~
   include/linux/atomic/atomic-instrumented.h:1880:9: note: in definition of macro 'cmpxchg_local'
    1880 |  typeof(ptr) __ai_ptr = (ptr); \
         |         ^~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:31: error: 'struct hw_perf_event' has no member named 'prev_count'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |                               ^~
   include/linux/atomic/atomic-instrumented.h:1880:26: note: in definition of macro 'cmpxchg_local'
    1880 |  typeof(ptr) __ai_ptr = (ptr); \
         |                          ^~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
>> include/linux/atomic/atomic-instrumented.h:1881:43: error: invalid type argument of unary '*' (have 'int')
    1881 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                                           ^~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1881:26: warning: passing argument 1 of 'instrument_atomic_write' makes pointer from integer without a cast [-Wint-conversion]
    1881 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                          ^~~~~~~~
         |                          |
         |                          int
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   In file included from include/asm-generic/bitops/instrumented-atomic.h:14,
                    from arch/x86/include/asm/bitops.h:391,
                    from include/linux/bitops.h:32,
                    from include/linux/thread_info.h:27,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   include/linux/instrumented.h:84:74: note: expected 'const volatile void *' but argument is of type 'int'
      84 | static __always_inline void instrument_atomic_write(const volatile void *v, size_t size)
         |                                                     ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/x86/include/asm/atomic.h:8,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   arch/x86/include/asm/cmpxchg.h:87:13: error: invalid type argument of unary '*' (have 'int')
      87 |  __typeof__(*(ptr)) __ret;     \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:88:13: error: invalid type argument of unary '*' (have 'int')
      88 |  __typeof__(*(ptr)) __old = (old);    \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:89:13: error: invalid type argument of unary '*' (have 'int')
      89 |  __typeof__(*(ptr)) __new = (new);    \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'


vim +1881 include/linux/atomic/atomic-instrumented.h

29f006fdefe6f8 include/asm-generic/atomic-instrumented.h Peter Zijlstra 2020-08-29  1877  
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-09-04  1878  #define cmpxchg_local(ptr, ...) \
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1879  ({ \
df79ed2c064363 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-07-16  1880  	typeof(ptr) __ai_ptr = (ptr); \
ed8af2e4d2a71b include/asm-generic/atomic-instrumented.h Marco Elver    2020-01-21 @1881  	instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-09-04  1882  	arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1883  })
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1884  

:::::: The code at line 1881 was first introduced by commit
:::::: ed8af2e4d2a71bd58f5776b7e5a477d136e32be4 asm-generic, atomic-instrumented: Use generic instrumented.h

:::::: TO: Marco Elver <elver@google.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 62519 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: unlisted-recipients:; (no To-header on input)
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, Ingo Molnar <mingo@kernel.org>
Subject: [tip:locking/debug 1/76] include/linux/atomic/atomic-instrumented.h:1881:43: error: invalid type argument of unary '*' (have 'int')
Date: Wed, 25 Aug 2021 05:49:39 +0800	[thread overview]
Message-ID: <202108250529.hs1304PO-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 14697 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/debug
head:   4812c9111220b0af00f7a436cc02ffaed289962c
commit: c87866ede44ad7da6b296d732221dc34ce1b154d [1/76] Merge tag 'v5.14-rc6' into locking/core, to pick up fixes
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=c87866ede44ad7da6b296d732221dc34ce1b154d
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip locking/debug
        git checkout c87866ede44ad7da6b296d732221dc34ce1b154d
        # save the attached .config to linux build tree
        make W=1 ARCH=um 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/dma/idxd/perfmon.c:131:5: error: 'struct hw_perf_event' has no member named 'event_base'
     131 |  hwc->event_base = ioread64(CNTRCFG_REG(idxd, idx));
         |     ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_validate_group':
   drivers/dma/idxd/perfmon.c:157:35: error: 'struct perf_event' has no member named 'group_leader'
     157 |  struct perf_event *leader = event->group_leader;
         |                                   ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_event_init':
   drivers/dma/idxd/perfmon.c:204:7: error: 'struct perf_event' has no member named 'hw'
     204 |  event->hw.idx = -1;
         |       ^~
   drivers/dma/idxd/perfmon.c:206:11: error: 'struct perf_event' has no member named 'attr'
     206 |  if (event->attr.type != event->pmu->type)
         |           ^~
   drivers/dma/idxd/perfmon.c:206:31: error: 'struct perf_event' has no member named 'pmu'
     206 |  if (event->attr.type != event->pmu->type)
         |                               ^~
   drivers/dma/idxd/perfmon.c:210:11: error: 'struct perf_event' has no member named 'attr'
     210 |  if (event->attr.sample_period)
         |           ^~
   drivers/dma/idxd/perfmon.c:213:11: error: 'struct perf_event' has no member named 'cpu'
     213 |  if (event->cpu < 0)
         |           ^~
   drivers/dma/idxd/perfmon.c:216:11: error: 'struct perf_event' has no member named 'pmu'
     216 |  if (event->pmu != &idxd->idxd_pmu->pmu)
         |           ^~
   drivers/dma/idxd/perfmon.c:219:7: error: 'struct perf_event' has no member named 'hw'
     219 |  event->hw.event_base = ioread64(PERFMON_TABLE_OFFSET(idxd));
         |       ^~
   drivers/dma/idxd/perfmon.c:220:7: error: 'struct perf_event' has no member named 'cpu'
     220 |  event->cpu = idxd->idxd_pmu->cpu;
         |       ^~
   drivers/dma/idxd/perfmon.c:221:7: error: 'struct perf_event' has no member named 'hw'
     221 |  event->hw.config = event->attr.config;
         |       ^~
   drivers/dma/idxd/perfmon.c:221:26: error: 'struct perf_event' has no member named 'attr'
     221 |  event->hw.config = event->attr.config;
         |                          ^~
   drivers/dma/idxd/perfmon.c:223:11: error: 'struct perf_event' has no member named 'group_leader'
     223 |  if (event->group_leader != event)
         |           ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_read_counter':
   drivers/dma/idxd/perfmon.c:232:36: error: 'struct perf_event' has no member named 'hw'
     232 |  struct hw_perf_event *hwc = &event->hw;
         |                                    ^~
   drivers/dma/idxd/perfmon.c:234:16: error: 'struct hw_perf_event' has no member named 'idx'
     234 |  int cntr = hwc->idx;
         |                ^~
   drivers/dma/idxd/perfmon.c: In function 'perfmon_pmu_event_update':
   drivers/dma/idxd/perfmon.c:246:36: error: 'struct perf_event' has no member named 'hw'
     246 |  struct hw_perf_event *hwc = &event->hw;
         |                                    ^~
   In file included from include/asm-generic/local64.h:22,
                    from ./arch/x86/include/generated/asm/local64.h:1,
                    from include/linux/u64_stats_sync.h:75,
                    from include/linux/cgroup-defs.h:20,
                    from include/linux/cgroup.h:28,
                    from include/linux/perf_event.h:57,
                    from drivers/dma/idxd/idxd.h:13,
                    from drivers/dma/idxd/perfmon.c:6:
   drivers/dma/idxd/perfmon.c:249:37: error: 'struct hw_perf_event' has no member named 'prev_count'
     249 |   prev_raw_count = local64_read(&hwc->prev_count);
         |                                     ^~
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
      16 | #define local_read(l) atomic_long_read(&(l)->a)
         |                                          ^
   drivers/dma/idxd/perfmon.c:249:20: note: in expansion of macro 'local64_read'
     249 |   prev_raw_count = local64_read(&hwc->prev_count);
         |                    ^~~~~~~~~~~~
   In file included from include/linux/atomic.h:82,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   drivers/dma/idxd/perfmon.c:251:31: error: 'struct hw_perf_event' has no member named 'prev_count'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |                               ^~
   include/linux/atomic/atomic-instrumented.h:1880:9: note: in definition of macro 'cmpxchg_local'
    1880 |  typeof(ptr) __ai_ptr = (ptr); \
         |         ^~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:31: error: 'struct hw_perf_event' has no member named 'prev_count'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |                               ^~
   include/linux/atomic/atomic-instrumented.h:1880:26: note: in definition of macro 'cmpxchg_local'
    1880 |  typeof(ptr) __ai_ptr = (ptr); \
         |                          ^~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
>> include/linux/atomic/atomic-instrumented.h:1881:43: error: invalid type argument of unary '*' (have 'int')
    1881 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                                           ^~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1881:26: warning: passing argument 1 of 'instrument_atomic_write' makes pointer from integer without a cast [-Wint-conversion]
    1881 |  instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
         |                          ^~~~~~~~
         |                          |
         |                          int
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   In file included from include/asm-generic/bitops/instrumented-atomic.h:14,
                    from arch/x86/include/asm/bitops.h:391,
                    from include/linux/bitops.h:32,
                    from include/linux/thread_info.h:27,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   include/linux/instrumented.h:84:74: note: expected 'const volatile void *' but argument is of type 'int'
      84 | static __always_inline void instrument_atomic_write(const volatile void *v, size_t size)
         |                                                     ~~~~~~~~~~~~~~~~~~~~~^
   In file included from arch/x86/include/asm/atomic.h:8,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/sched/task.h:10,
                    from drivers/dma/idxd/perfmon.c:4:
   arch/x86/include/asm/cmpxchg.h:87:13: error: invalid type argument of unary '*' (have 'int')
      87 |  __typeof__(*(ptr)) __ret;     \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:88:13: error: invalid type argument of unary '*' (have 'int')
      88 |  __typeof__(*(ptr)) __old = (old);    \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'
     124 |  (cmpxchg_local(&((l)->a.counter), (o), (n)))
         |   ^~~~~~~~~~~~~
   include/asm-generic/local64.h:45:34: note: in expansion of macro 'local_cmpxchg'
      45 | #define local64_cmpxchg(l, o, n) local_cmpxchg((&(l)->a), (o), (n))
         |                                  ^~~~~~~~~~~~~
   drivers/dma/idxd/perfmon.c:251:11: note: in expansion of macro 'local64_cmpxchg'
     251 |  } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
         |           ^~~~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:89:13: error: invalid type argument of unary '*' (have 'int')
      89 |  __typeof__(*(ptr)) __new = (new);    \
         |             ^~~~~~
   arch/x86/include/asm/cmpxchg.h:140:2: note: in expansion of macro '__raw_cmpxchg'
     140 |  __raw_cmpxchg((ptr), (old), (new), (size), "")
         |  ^~~~~~~~~~~~~
   arch/x86/include/asm/cmpxchg.h:155:2: note: in expansion of macro '__cmpxchg_local'
     155 |  __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
         |  ^~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1882:2: note: in expansion of macro 'arch_cmpxchg_local'
    1882 |  arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
         |  ^~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/local.h:124:3: note: in expansion of macro 'cmpxchg_local'


vim +1881 include/linux/atomic/atomic-instrumented.h

29f006fdefe6f8 include/asm-generic/atomic-instrumented.h Peter Zijlstra 2020-08-29  1877  
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-09-04  1878  #define cmpxchg_local(ptr, ...) \
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1879  ({ \
df79ed2c064363 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-07-16  1880  	typeof(ptr) __ai_ptr = (ptr); \
ed8af2e4d2a71b include/asm-generic/atomic-instrumented.h Marco Elver    2020-01-21 @1881  	instrument_atomic_write(__ai_ptr, sizeof(*__ai_ptr)); \
aa525d063851a9 include/asm-generic/atomic-instrumented.h Mark Rutland   2018-09-04  1882  	arch_cmpxchg_local(__ai_ptr, __VA_ARGS__); \
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1883  })
b06ed71a624ba0 include/asm-generic/atomic-instrumented.h Dmitry Vyukov  2018-01-29  1884  

:::::: The code at line 1881 was first introduced by commit
:::::: ed8af2e4d2a71bd58f5776b7e5a477d136e32be4 asm-generic, atomic-instrumented: Use generic instrumented.h

:::::: TO: Marco Elver <elver@google.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62519 bytes --]

             reply	other threads:[~2021-08-24 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 21:49 kernel test robot [this message]
2021-08-24 21:49 ` [tip:locking/debug 1/76] include/linux/atomic/atomic-instrumented.h:1881:43: error: invalid type argument of unary '*' (have 'int') kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108250529.hs1304PO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.