tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/static_call
head: 814cfbceba54e980b1f949a13d04b1909bbe80da
commit: 814cfbceba54e980b1f949a13d04b1909bbe80da [34/34] x86/perf, static_call: Optimize
x86_pmu methods
config: x86_64-randconfig-a004-201941 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
git checkout 814cfbceba54e980b1f949a13d04b1909bbe80da
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/events/core.c: In function '_x86_pmu_get_event_constraints':
arch/x86/events/core.c:58:108: warning: no return statement in function returning
non-void [-Wreturn-type]
static struct event_constraint *_x86_pmu_get_event_constraints(struct cpu_hw_events
*cpuc, int idx, struct perf_event *event) { }
^
In file included from arch/x86/events/core.c:31:0:
arch/x86/events/core.c: In function 'x86_pmu_static_call_update':
> include/linux/static_call.h:82:9: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR' [-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1803:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_handle_irq, x86_pmu.handle_irq);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1803:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_handle_irq, x86_pmu.handle_irq);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1804:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_disable_all, x86_pmu.disable_all);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1805:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_enable_all, x86_pmu.enable_all);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1806:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_enable, x86_pmu.enable);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1807:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_disable, x86_pmu.disable);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1809:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_add, x86_pmu.add);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1810:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_del, x86_pmu.del);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
> arch/x86/events/core.c:1811:21: error: 'x86_pmu_read'
undeclared (first use in this function)
static_call_update(x86_pmu_read,
x86_pmu.read);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86/events/core.c:1811:21: note: each undeclared identifier is reported only once
for each function it appears in
static_call_update(x86_pmu_read, x86_pmu.read);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1813:21: error:
'x86_pmu_schedule_events' undeclared (first use in this function)
static_call_update(x86_pmu_schedule_events, x86_pmu.schedule_events);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1814:21: error:
'x86_pmu_get_event_constraints' undeclared (first use in this function)
static_call_update(x86_pmu_get_event_constraints, x86_pmu.get_event_constraints);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1815:21: error:
'x86_pmu_put_event_constraints' undeclared (first use in this function)
static_call_update(x86_pmu_put_event_constraints, x86_pmu.put_event_constraints);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1817:21: error:
'x86_pmu_drain_pebs' undeclared (first use in this function)
static_call_update(x86_pmu_drain_pebs, x86_pmu.drain_pebs);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1818:21: error:
'x86_pmu_pebs_aliases' undeclared (first use in this function)
static_call_update(x86_pmu_pebs_aliases, x86_pmu.pebs_aliases);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1820:21: error:
'x86_pmu_start_scheduling' undeclared (first use in this function)
static_call_update(x86_pmu_start_scheduling, x86_pmu.start_scheduling);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1821:21: error:
'x86_pmu_commit_scheduling' undeclared (first use in this function)
static_call_update(x86_pmu_commit_scheduling, x86_pmu.commit_scheduling);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1822:21: error:
'x86_pmu_stop_scheduling' undeclared (first use in this function)
static_call_update(x86_pmu_stop_scheduling, x86_pmu.stop_scheduling);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
> arch/x86/events/core.c:1824:21: error:
'x86_pmu_sched_task' undeclared (first use in this function)
static_call_update(x86_pmu_sched_task, x86_pmu.sched_task);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
cc1: some warnings being treated as errors
--
arch/x86//events/core.c: In function '_x86_pmu_get_event_constraints':
arch/x86//events/core.c:58:108: warning: no return statement in function returning
non-void [-Wreturn-type]
static struct event_constraint *_x86_pmu_get_event_constraints(struct cpu_hw_events
*cpuc, int idx, struct perf_event *event) { }
^
In file included from arch/x86//events/core.c:31:0:
arch/x86//events/core.c: In function 'x86_pmu_static_call_update':
> include/linux/static_call.h:82:9: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR' [-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1803:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_handle_irq, x86_pmu.handle_irq);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1803:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_handle_irq, x86_pmu.handle_irq);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1804:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_disable_all, x86_pmu.disable_all);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1805:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_enable_all, x86_pmu.enable_all);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1806:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_enable, x86_pmu.enable);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1807:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_disable, x86_pmu.disable);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1809:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_add, x86_pmu.add);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
include/linux/static_call.h:82:9: warning: passing argument 2 of
'__static_call_update' makes pointer from integer without a cast
[-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1810:2: note: in expansion of macro
'static_call_update'
static_call_update(x86_pmu_del, x86_pmu.del);
^
include/linux/static_call.h:105:13: note: expected 'void *' but argument is of
type 'int'
extern void __static_call_update(struct static_call_key *key, void *tramp, void
*func);
^
arch/x86//events/core.c:1811:21: error: 'x86_pmu_read' undeclared (first use in
this function)
static_call_update(x86_pmu_read, x86_pmu.read);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1811:21: note: each undeclared identifier is reported only once
for each function it appears in
static_call_update(x86_pmu_read, x86_pmu.read);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1813:21: error: 'x86_pmu_schedule_events' undeclared
(first use in this function)
static_call_update(x86_pmu_schedule_events, x86_pmu.schedule_events);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1814:21: error: 'x86_pmu_get_event_constraints'
undeclared (first use in this function)
static_call_update(x86_pmu_get_event_constraints, x86_pmu.get_event_constraints);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1815:21: error: 'x86_pmu_put_event_constraints'
undeclared (first use in this function)
static_call_update(x86_pmu_put_event_constraints, x86_pmu.put_event_constraints);
^
include/linux/static_call.h:82:32: note: in definition of macro
'static_call_update'
STATIC_CALL_TRAMP_ADDR(name), func); \
^
arch/x86//events/core.c:1817:21: error: 'x86_pmu_drain_pebs' undeclared (first
use in this function)
static_call_update(x86_pmu_drain_pebs, x86_pmu.drain_pebs);
vim +/STATIC_CALL_TRAMP_ADDR +82 include/linux/static_call.h
4e9482797b920a Josh Poimboeuf 2019-01-09 72
4e9482797b920a Josh Poimboeuf 2019-01-09 73
4e9482797b920a Josh Poimboeuf 2019-01-09 74 #define DECLARE_STATIC_CALL(name,
func) \
4e9482797b920a Josh Poimboeuf 2019-01-09 75 extern struct static_call_key
STATIC_CALL_NAME(name); \
4e9482797b920a Josh Poimboeuf 2019-01-09 76 extern typeof(func)
STATIC_CALL_TRAMP(name)
4e9482797b920a Josh Poimboeuf 2019-01-09 77
4e9482797b920a Josh Poimboeuf 2019-01-09 78 #define static_call_update(name,
func) \
4e9482797b920a Josh Poimboeuf 2019-01-09 79 ({ \
4e9482797b920a Josh Poimboeuf 2019-01-09 80 BUILD_BUG_ON(!__same_type(*(func),
STATIC_CALL_TRAMP(name))); \
4e9482797b920a Josh Poimboeuf 2019-01-09 81
__static_call_update(&STATIC_CALL_NAME(name), \
4e9482797b920a Josh Poimboeuf 2019-01-09 @82 STATIC_CALL_TRAMP_ADDR(name),
func); \
4e9482797b920a Josh Poimboeuf 2019-01-09 83 })
4e9482797b920a Josh Poimboeuf 2019-01-09 84
:::::: The code at line 82 was first introduced by commit
:::::: 4e9482797b920a4dc43d31f25f38e9fa37970e85 static_call: Add basic static call
infrastructure
:::::: TO: Josh Poimboeuf <jpoimboe(a)redhat.com>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation