diff options
-rw-r--r-- | arch/arm/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 3 | ||||
-rw-r--r-- | include/uapi/linux/sysctl.h | 1 | ||||
-rw-r--r-- | kernel/sysctl_binary.c | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 04621d1a8848..b2c5d790840a 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h @@ -31,6 +31,7 @@ #endif extern unsigned int boot_reason; +extern unsigned int cold_boot; struct debug_info { #ifdef CONFIG_HAVE_HW_BREAKPOINT diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index a35c62bf9b37..ebdde5b9744c 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -117,6 +117,9 @@ EXPORT_SYMBOL(arch_read_hardware_id); unsigned int boot_reason; EXPORT_SYMBOL(boot_reason); +unsigned int cold_boot; +EXPORT_SYMBOL(cold_boot); + #ifdef MULTI_CPU struct processor processor __read_mostly; #endif diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h index 0956373b56db..33c6cde783ce 100644 --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h @@ -154,6 +154,7 @@ enum KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ KERN_PANIC_ON_WARN=77, /* int: call panic() in WARN() functions */ + KERN_COLD_BOOT = 78, /* int: identify if system cold booted */ }; diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c index 5ec5bbc09d39..b65c78c15ab3 100644 --- a/kernel/sysctl_binary.c +++ b/kernel/sysctl_binary.c @@ -139,6 +139,7 @@ static const struct bin_table bin_kern_table[] = { { CTL_INT, KERN_PANIC_ON_NMI, "panic_on_unrecovered_nmi" }, { CTL_INT, KERN_PANIC_ON_WARN, "panic_on_warn" }, { CTL_INT, KERN_BOOT_REASON, "boot_reason" }, + { CTL_INT, KERN_COLD_BOOT, "cold_boot" }, {} }; |