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

Commit 4a815baa authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sysctl: add cold_boot sysctl entry" into msm-4.8

parents b82010d3 381adf36
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ show up in /proc/sys/kernel:
- boot_reason		     [ ARM only ]
- callhome		     [ S390 only ]
- cap_last_cap
- cold_boot		     [ ARM only ]
- core_pattern
- core_pipe_limit
- core_uses_pid
@@ -198,6 +199,16 @@ cap_last_cap
Highest valid capability of the running kernel.  Exports
CAP_LAST_CAP from the kernel.

===============================================================

cold_boot

ARM -- indicator for system cold boot

A single bit will be set in the unsigned integer value to identify
whether the device was booted from a cold or warm state. Zero
indicating a warm boot and one indicating a cold boot.

==============================================================

core_pattern:
+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
@@ -119,6 +119,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 __ro_after_init;
#endif
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ enum
	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_BOOT_REASON=78, /* int: identify reason system was booted */
	KERN_COLD_BOOT=79, /* int: identify if system cold booted */
};


+9 −1
Original line number Diff line number Diff line
@@ -1406,6 +1406,14 @@ static struct ctl_table kern_table[] = {
		.mode		= 0444,
		.proc_handler	= proc_dointvec,
	},

	{
		.procname	= "cold_boot",
		.data		= &cold_boot,
		.maxlen		= sizeof(int),
		.mode		= 0444,
		.proc_handler	= proc_dointvec,
	},
#endif
	{ }
};
Loading