Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3194904b authored by David Keitel's avatar David Keitel Committed by Matt Wagantall
Browse files

sysctl: add cold_boot sysctl entry



Add a cold_boot parameter which supplements the
boot_reason sysctl entry with information about
whether the system was booted from cold or warm state.

/proc/sys/kernel/cold_boot entry is updated with 1 or 0 when
system was booted from cold or warm boot state respecitively.

CRs-Fixed: 461256
Change-Id: I2bc5d80c8f26eb9e9dbb4b34960d991a51a224e4
Signed-off-by: default avatarDavid Keitel <dkeitel@codeaurora.org>
[abhimany: fixup minor merge conflict and drop changes to
kernel/sysctl.c and Documentation since it was brought in via
snapshot commit]
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent 372d39f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#endif

extern unsigned int boot_reason;
extern unsigned int cold_boot;

struct debug_info {
#ifdef CONFIG_HAVE_HW_BREAKPOINT
+3 −0
Original line number Diff line number Diff line
@@ -111,6 +111,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
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ enum
	KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */
	KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
	KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
	KERN_COLD_BOOT = 78, /* int: identify if system cold booted */
};


+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ static const struct bin_table bin_kern_table[] = {
	{ CTL_INT,	KERN_MAX_LOCK_DEPTH,		"max_lock_depth" },
	{ CTL_INT,	KERN_PANIC_ON_NMI,		"panic_on_unrecovered_nmi" },
	{ CTL_INT,	KERN_BOOT_REASON,		"boot_reason" },
	{ CTL_INT,	KERN_COLD_BOOT,			"cold_boot" },
	{}
};