linux/drivers
Leo Yan 2227b7c746 coresight: add support for CPU debug module
Coresight includes debug module and usually the module connects with CPU
debug logic. ARMv8 architecture reference manual (ARM DDI 0487A.k) has
description for related info in "Part H: External Debug".

Chapter H7 "The Sample-based Profiling Extension" introduces several
sampling registers, e.g. we can check program counter value with
combined CPU exception level, secure state, etc. So this is helpful for
analysis CPU lockup scenarios, e.g. if one CPU has run into infinite
loop with IRQ disabled. In this case the CPU cannot switch context and
handle any interrupt (including IPIs), as the result it cannot handle
SMP call for stack dump.

This patch is to enable coresight debug module, so firstly this driver
is to bind apb clock for debug module and this is to ensure the debug
module can be accessed from program or external debugger. And the driver
uses sample-based registers for debug purpose, e.g. when system triggers
panic, the driver will dump program counter and combined context
registers (EDCIDSR, EDVIDSR); by parsing context registers so can
quickly get to know CPU secure state, exception level, etc.

Some of the debug module registers are located in CPU power domain, so
this requires the CPU power domain stays on when access related debug
registers, but the power management for CPU power domain is quite
dependent on SoC integration for power management. For the platforms
which with sane power controller implementations, this driver follows
the method to set EDPRCR to try to pull the CPU out of low power state
and then set 'no power down request' bit so the CPU has no chance to
lose power.

If the SoC has not followed up this design well for power management
controller, the user should use the command line parameter or sysfs
to constrain all or partial idle states to ensure the CPU power
domain is enabled and access coresight CPU debug component safely.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-09 11:45:25 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay auxdisplay: Convert list_for_each to entry variant 2017-05-25 18:24:03 +02:00
base
bcma
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-05-20 16:12:30 -07:00
bluetooth
bus
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware Revert "firmware: vpd: remove platform driver" 2017-05-27 11:46:26 +02:00
fmc
fpga
fsi
gpio
gpu
hid
hsi
hv Drivers: hv: vmbus: Close timing hole that can corrupt per-cpu page 2017-05-25 15:42:42 +02:00
hwmon
hwspinlock
hwtracing coresight: add support for CPU debug module 2017-06-09 11:45:25 +02:00
i2c i2c: i2c-mux-gpmux: new driver 2017-06-03 19:29:26 +09:00
ide
idle
iio iio: multiplexer: new iio category and iio-mux driver 2017-06-03 19:29:26 +09:00
infiniband
input
iommu
ipack
irqchip Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-21 11:45:26 -07:00
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media
memory memory: ti-aemif: Handle return value of clk_prepare_enable 2017-06-03 19:08:14 +09:00
memstick
message
mfd
misc drivers/misc: add Aspeed LPC snoop driver 2017-06-03 19:15:18 +09:00
mmc
mtd
mux mux: mmio-based syscon mux controller 2017-06-03 19:29:26 +09:00
net
nfc
ntb
nubus
nvdimm
nvme Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-05-20 16:12:30 -07:00
nvmem
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform goldfish_pipe: make pipe_dev static 2017-05-25 18:24:03 +02:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-05-20 16:12:30 -07:00
sfi
sh
sn
soc
spi
spmi spmi: spmi-pmic-arb: enable the SPMI interrupt as a wakeup source 2017-06-03 19:05:47 +09:00
ssb
staging
target
tc
tee
thermal
thunderbolt thunderbolt: fix spelling mistake: "missmatch" -> "mismatch" 2017-06-09 11:44:17 +02:00
tty
uio Merge 4.12-rc2 into char-misc-next 2017-05-22 08:56:55 +02:00
usb
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1 w1: Organize driver source to natural/common order 2017-05-25 18:23:03 +02:00
watchdog
xen
zorro
Kconfig mux: minimal mux subsystem 2017-06-03 19:29:26 +09:00
Makefile mux: minimal mux subsystem 2017-06-03 19:29:26 +09:00