linux_dsm_epyc7002/arch/xtensa/include/asm
Max Filippov c91e02bd97 xtensa: support hardware breakpoints/watchpoints
Use perf framework to manage hardware instruction and data breakpoints.
Add two new ptrace calls: PTRACE_GETHBPREGS and PTRACE_SETHBPREGS to
query and set instruction and data breakpoints.
Address bit 0 choose instruction (0) or data (1) break register, bits
31..1 are the register number.
Both calls transfer two 32-bit words: address (0) and control (1).
Instruction breakpoint contorl word is 0 to clear breakpoint, 1 to set.
Data breakpoint control word bit 31 is 'trigger on store', bit 30 is
'trigger on load, bits 29..0 are length. Length 0 is used to clear a
breakpoint. To set a breakpoint length must be a power of 2 in the range
1..64 and the address must be length-aligned.

Introduce new thread_info flag: TIF_DB_DISABLED. Set it if debug
exception is raised by the kernel code accessing watched userspace
address and disable corresponding data breakpoint. On exit to userspace
check that flag and, if set, restore all data breakpoints.

Handle debug exceptions raised with PS.EXCM set. This may happen when
window overflow/underflow handler or fast exception handler hits data
breakpoint, in which case save and disable all data breakpoints,
single-step faulting instruction and restore data breakpoints.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11 08:53:32 +00:00
..
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asmmacro.h xtensa: fixes for configs without loop option 2015-11-02 18:02:47 +03:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h arch,xtensa: Convert smp_mb__*() 2014-04-18 14:20:47 +02:00
bitops.h arch,xtensa: Convert smp_mb__*() 2014-04-18 14:20:47 +02:00
bootparam.h xtensa: split bootparam and kernel meminfo 2014-04-02 01:35:51 +04:00
bugs.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
cache.h dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
cacheasm.h xtensa: fix build for configs without cache options 2015-11-02 18:02:51 +03:00
cacheflush.h xtensa: support DMA to high memory 2015-11-09 01:25:37 +03:00
checksum.h xtensa: add missing include asm/uaccess.h to checksum.h 2013-02-23 19:23:13 -08:00
cmpxchg.h xtensa: implement fake NMI 2015-08-17 07:33:39 +03:00
coprocessor.h xtensa: reorganize SR referencing 2012-10-15 21:48:08 -07:00
current.h xtensa: clean up files to make them code-style compliant 2012-12-18 21:10:25 -08:00
delay.h xtensa: implement ndelay 2014-01-15 00:28:11 +04:00
device.h xtensa: reimplement DMA API using common helpers 2015-08-17 07:31:00 +03:00
dma-mapping.h xtensa: implement dma_to_phys and phys_to_dma 2015-11-09 01:25:38 +03:00
dma.h Fix common misspellings 2011-03-31 11:26:23 -03:00
elf.h xtensa: add support for TLS 2013-02-23 19:35:57 -08:00
fb.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
fixmap.h xtensa: support aliasing cache in k[un]map_atomic 2014-08-14 11:59:21 +04:00
flat.h xtensa: add flat support 2009-04-02 23:41:29 -07:00
ftrace.h ftrace: Make CALLER_ADDRx macros more generic 2014-05-21 03:10:32 -04:00
futex.h xtensa: implement robust futex atomic uaccess ops 2014-01-14 10:19:51 -08:00
gpio.h gpiolib/arches: Centralise bolierplate asm/gpio.h 2012-05-11 18:00:14 -06:00
highmem.h xtensa: fix kmap_prot definition 2014-12-09 03:22:57 +03:00
hw_breakpoint.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
hw_irq.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
initialize_mmu.h xtensa: fix build for configs without cache options 2015-11-02 18:02:51 +03:00
io.h xtensa: support ioremap for memory outside KIO region 2016-01-11 17:37:36 +03:00
irq.h xtensa: implement CPU hotplug 2014-01-14 10:19:59 -08:00
irqflags.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
mmu_context.h xtensa: nommu: move init_mmu stub to nommu_context.h 2014-10-21 13:28:44 +04:00
mmu.h xtensa: add SMP support 2014-01-14 10:19:58 -08:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
mxregs.h xtensa: add MX irqchip 2014-01-14 10:19:58 -08:00
nommu_context.h xtensa: nommu: move init_mmu stub to nommu_context.h 2014-10-21 13:28:44 +04:00
page.h xtensa: nommu: clean up memory map dump 2014-10-21 13:28:58 +04:00
param.h UAPI: (Scripted) Disintegrate arch/xtensa/include/asm 2012-10-15 21:48:53 -07:00
pci-bridge.h xtensa: clean up files to make them code-style compliant 2012-12-18 21:10:25 -08:00
pci.h remove <asm/scatterlist.h> 2015-05-05 13:35:39 -06:00
perf_event.h xtensa: enable HAVE_PERF_EVENTS 2014-01-15 00:27:03 +04:00
pgalloc.h xtensa: use buddy allocator for PTE table 2013-11-15 09:32:19 +09:00
pgtable.h xtensa: nommu: fix USER_RING definition 2015-11-02 18:02:58 +03:00
platform.h xtensa: remove unused platform_init_irq() 2013-06-05 10:14:20 -07:00
processor.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
ptrace.h xtensa: add SMP support 2014-01-14 10:19:58 -08:00
regs.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
segment.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
serial.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
shmparam.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h xtensa: implement CPU hotplug 2014-01-14 10:19:59 -08:00
spinlock_types.h xtensa: fix arch spinlock function names 2014-01-14 10:19:53 -08:00
spinlock.h xtensa: fix arch spinlock function names 2014-01-14 10:19:53 -08:00
stacktrace.h xtensa: move oprofile stack tracing to stacktrace.c 2015-08-17 07:32:49 +03:00
string.h xtensa: fix str[n]cmp return value 2013-02-23 19:22:31 -08:00
switch_to.h Disintegrate asm/system.h for Xtensa 2012-03-28 18:30:03 +01:00
syscall.h xtensa: switch to generic sigaltstack 2013-02-03 18:16:27 -05:00
sysmem.h xtensa: keep sysmem banks ordered in add_sysmem_bank 2014-04-02 01:35:52 +04:00
thread_info.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
timex.h xtensa: use XTENSA_INT_LEVEL macro in asm/timex.h 2016-01-11 17:32:40 +03:00
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h xtensa: optimize local_flush_tlb_kernel_range 2014-04-06 21:29:17 +04:00
traps.h xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
types.h UAPI: (Scripted) Disintegrate arch/xtensa/include/asm 2012-10-15 21:48:53 -07:00
uaccess.h xtensa: macro whitespace fixes 2015-01-13 15:24:10 +02:00
ucontext.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
unaligned.h xtensa: switch to packed struct unaligned access implementation 2008-11-11 06:14:10 -08:00
unistd.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
user.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
vectors.h xtensa: drop unused sections and remapped reset handlers 2015-11-03 17:19:39 +03:00
vga.h xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00