diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-27 23:55:49 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-27 23:55:49 +1100 |
commit | c0b346729b5dd3c7d0232f043f5b15947ffc7978 (patch) | |
tree | a790a37bfc5815b46c8f9a4faf9a2d38c74d2cdb /arch/powerpc/kernel/process.c | |
parent | 34a286a4ac576d3d9ea3ac2bc7bbd4216a1f7ac7 (diff) | |
parent | 9654153158d3e0684a1bdb76dbababdb7111d5a0 (diff) | |
download | linux-c0b346729b5dd3c7d0232f043f5b15947ffc7978.tar.gz |
Merge branch 'topic/ppc-kvm' into next
Merge the DAWR series, which touches arch code and KVM code and may need
to be merged into the kvm-ppc tree.
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ec4f363ebb89..24a591b4dbe9 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -827,6 +827,18 @@ void set_breakpoint(struct arch_hw_breakpoint *brk) preempt_enable(); } +/* Check if we have DAWR or DABR hardware */ +bool ppc_breakpoint_available(void) +{ + if (cpu_has_feature(CPU_FTR_DAWR)) + return true; /* POWER8 DAWR */ + if (cpu_has_feature(CPU_FTR_ARCH_207S)) + return false; /* POWER9 with DAWR disabled */ + /* DABR: Everything but POWER8 and POWER9 */ + return true; +} +EXPORT_SYMBOL_GPL(ppc_breakpoint_available); + #ifdef CONFIG_PPC64 DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); #endif |