diff options
author | Mikulas Patocka <[email protected]> | 2017-07-04 19:04:23 -0400 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-07-05 09:01:24 +0200 |
commit | 99c13b8c8896d7bcb92753bf0c63a8de4326e78d (patch) | |
tree | b8f8cf4f4fba6e34ba7d090dbdb852b9588d0e5d /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 5122daa017578ebc4818de8fb3c9d0e131f8b335 (diff) |
x86/mm/pat: Don't report PAT on CPUs that don't support it
The pat_enabled() logic is broken on CPUs which do not support PAT and
where the initialization code fails to call pat_init(). Due to that the
enabled flag stays true and pat_enabled() returns true wrongfully.
As a consequence the mappings, e.g. for Xorg, are set up with the wrong
caching mode and the required MTRR setups are omitted.
To cure this the following changes are required:
1) Make pat_enabled() return true only if PAT initialization was
invoked and successful.
2) Invoke init_cache_modes() unconditionally in setup_arch() and
remove the extra callsites in pat_disable() and the pat disabled
code path in pat_init().
Also rename __pat_enabled to pat_disabled to reflect the real purpose of
this variable.
Fixes: 9cd25aac1f44 ("x86/mm/pat: Emulate PAT when it is disabled")
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Bernhard Held <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: "Luis R. Rodriguez" <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1707041749300.3456@file01.intranet.prod.int.rdu2.redhat.com
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions