diff options
| author | Paul Cercueil <[email protected]> | 2020-09-06 21:29:24 +0200 |
|---|---|---|
| committer | Thomas Bogendoerfer <[email protected]> | 2020-09-18 16:27:32 +0200 |
| commit | 5f5ed0ebcf84c7479c93a28c5c0e1b0b6926883b (patch) | |
| tree | 879402e638c52de12adb0fb2a18b3b63ba5df04b /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 5ef415107dfd42a334d62a9b7be9754817df92ed (diff) | |
MIPS: cpu-probe: ingenic: Fix broken BUG_ON
The previous code was doing:
BUG_ON(!__builtin_constant_p(cpu_has_counter) || cpu_has_counter);
This only worked as the "cpu_has_counter" macro was overridden in
<cpu-feature-overrides.h>. The default "cpu_has_counter" macro is
non-constant, which triggered the BUG_ON() independently of the value
returned by the macro.
What we want to check here, is that *if* the macro was overridden to a
compile-time constant, then must be defined to zero, otherwise it's a
bug.
So the correct check is:
BUG_ON(__builtin_constant_p(cpu_has_counter) && cpu_has_counter);
Signed-off-by: Paul Cercueil <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions