mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
UPSTREAM: coresight: cpu-debug: Control default behavior via Kconfig
Debugfs is nice and so are module parameters, but
* debugfs doesn't take effect early (e.g., if drivers are locking up
before user space gets anywhere)
* module parameters either add a lot to the kernel command line, or
else take effect late as well (if you build =m and configure in
/etc/modprobe.d/)
So in the same spirit as these
CONFIG_PANIC_ON_OOPS (also available via cmdline or modparam)
CONFIG_INTEL_IOMMU_DEFAULT_ON (also available via cmdline)
add a new Kconfig option.
Module parameters and debugfs can still override.
Bug: 213931796
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
[Fixed missing double quote in Kconfig title]
Link: https://lore.kernel.org/r/20210903182839.1.I20856983f2841b78936134dcf9cdf6ecafe632b9@changeid
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
(cherry picked from commit 204879e699)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I135172e06c96701d7ed0d928d92974fd85039243
This commit is contained in:
@@ -150,6 +150,19 @@ config CORESIGHT_CPU_DEBUG
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called coresight-cpu-debug.
|
||||
|
||||
config CORESIGHT_CPU_DEBUG_DEFAULT_ON
|
||||
bool "Enable CoreSight CPU Debug by default"
|
||||
depends on CORESIGHT_CPU_DEBUG
|
||||
help
|
||||
Say Y here to enable the CoreSight Debug panic-debug by default. This
|
||||
can also be enabled via debugfs, but this ensures the debug feature
|
||||
is enabled as early as possible.
|
||||
|
||||
Has the same effect as setting coresight_cpu_debug.enable=1 on the
|
||||
kernel command line.
|
||||
|
||||
Say N if unsure.
|
||||
|
||||
config CORESIGHT_CTI
|
||||
tristate "CoreSight Cross Trigger Interface (CTI) driver"
|
||||
depends on ARM || ARM64
|
||||
|
||||
@@ -105,7 +105,7 @@ static DEFINE_PER_CPU(struct debug_drvdata *, debug_drvdata);
|
||||
static int debug_count;
|
||||
static struct dentry *debug_debugfs_dir;
|
||||
|
||||
static bool debug_enable;
|
||||
static bool debug_enable = IS_ENABLED(CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON);
|
||||
module_param_named(enable, debug_enable, bool, 0600);
|
||||
MODULE_PARM_DESC(enable, "Control to enable coresight CPU debug functionality");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user