Skip to content

Commit

Permalink
marlin: add property to enable/disable crash on RCU stalls
Browse files Browse the repository at this point in the history
Bug: 34991231
Test: setprop on marlin
Change-Id: Ice4766cd30d8741613fa55718b1d5bfc73026d09
  • Loading branch information
weivincewang committed Mar 8, 2017
1 parent 5460ba7 commit 5659f0b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion device-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ PRODUCT_COPY_FILES += \

# Subsystem ramdump
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.ssr.enable_ramdumps=1
persist.sys.ssr.enable_ramdumps=1 \
persist.sys.crash_rcu=true
else
PRODUCT_COPY_FILES += \
device/google/marlin/init.common.diag.rc.user:$(INIT_COMMON_DIAG_RC)
Expand Down
5 changes: 5 additions & 0 deletions init.common.diag.rc.userdebug
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,8 @@ service cnss_diag_txt /system/bin/cnss_diag -s -f -m /data/cnss_diag/cnss_diag.c
disabled
oneshot

on property:persist.sys.crash_rcu=true
write /proc/sys/kernel/panic_on_rcu_stall 1

on property:persist.sys.crash_rcu=false
write /proc/sys/kernel/panic_on_rcu_stall 0
1 change: 1 addition & 0 deletions sepolicy/platform_app.te
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ userdebug_or_eng(`
dontaudit platform_app proc_sysrq:file getattr;
dontaudit platform_app proc_iomem:file getattr;
set_prop(platform_app, cnss_diag_prop);
set_prop(platform_app, ramdump_prop);
')
1 change: 1 addition & 0 deletions sepolicy/property.te
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ type mid_prop, property_type;
type ssr_prop, property_type;
type cnss_diag_prop, property_type;
type thermal_prop, property_type;
type ramdump_prop, property_type;
1 change: 1 addition & 0 deletions sepolicy/property_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ ro.boot.hardware.sku u:object_r:hw_sku_prop:s0
ro.boot.mid u:object_r:mid_prop:s0
debug.ssrdump u:object_r:ssr_prop:s0
persist.sys.cnss. u:object_r:cnss_diag_prop:s0
persist.sys.crash_rcu u:object_r:ramdump_prop:s0
sys.qcom.thermalcfg u:object_r:thermal_prop:s0
ctl.thermal-engine u:object_r:thermal_prop:s0

0 comments on commit 5659f0b

Please sign in to comment.