diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-08-02 18:55:55 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-08-02 18:55:55 +0200 |
commit | 00813d4dd976cc823fa089840ff2f4a10dd6cd0c (patch) | |
tree | 8f2c74a928c9ea0eceb64809d9039db824ae6663 /target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch | |
parent | 19226502bf6393706defe7f049c587b32c9b4f33 (diff) | |
download | upstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.tar.gz upstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.tar.bz2 upstream-00813d4dd976cc823fa089840ff2f4a10dd6cd0c.zip |
brcm2708: remove linux 4.14 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch b/target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch deleted file mode 100644 index f83d6704d1..0000000000 --- a/target/linux/brcm2708/patches-4.14/950-0278-Prevent-voltage-low-warnings-from-filling-log.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cecce8a9e798fbe8571381b6f9f69fd7a0defa37 Mon Sep 17 00:00:00 2001 -From: James Hughes <james.hughes@raspberrypi.org> -Date: Wed, 18 Apr 2018 13:02:57 +0100 -Subject: [PATCH 278/454] Prevent voltage low warnings from filling log - -Although the correct fix for low voltage warnings is to -improve the power supply, the current implementation -of the detection can fill the log if the warning -happens freqently. This replaces the logging with -slightly custom ratelimited logging. - -Signed-off-by: James Hughes <james.hughes@raspberrypi.org> ---- - drivers/firmware/raspberrypi.c | 40 ++++++++++++++++++++++++++++++++-- - 1 file changed, 38 insertions(+), 2 deletions(-) - ---- a/drivers/firmware/raspberrypi.c -+++ b/drivers/firmware/raspberrypi.c -@@ -24,6 +24,38 @@ - - #define UNDERVOLTAGE_BIT BIT(0) - -+ -+/* -+ * This section defines some rate limited logging that prevent -+ * repeated messages at much lower Hz than the default kernel settings. -+ * It's usually 5s, this is 5 minutes. -+ * Burst 3 means you may get three messages 'quickly', before -+ * the ratelimiting kicks in. -+ */ -+#define LOCAL_RATELIMIT_INTERVAL (5 * 60 * HZ) -+#define LOCAL_RATELIMIT_BURST 3 -+ -+#ifdef CONFIG_PRINTK -+#define printk_ratelimited_local(fmt, ...) \ -+({ \ -+ static DEFINE_RATELIMIT_STATE(_rs, \ -+ LOCAL_RATELIMIT_INTERVAL, \ -+ LOCAL_RATELIMIT_BURST); \ -+ \ -+ if (__ratelimit(&_rs)) \ -+ printk(fmt, ##__VA_ARGS__); \ -+}) -+#else -+#define printk_ratelimited_local(fmt, ...) \ -+ no_printk(fmt, ##__VA_ARGS__) -+#endif -+ -+#define pr_crit_ratelimited_local(fmt, ...) \ -+ printk_ratelimited_local(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) -+#define pr_info_ratelimited_local(fmt, ...) \ -+ printk_ratelimited_local(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) -+ -+ - struct rpi_firmware { - struct mbox_client cl; - struct mbox_chan *chan; /* The property channel. */ -@@ -216,9 +248,13 @@ static int rpi_firmware_get_throttled(st - - if (new_uv != old_uv) { - if (new_uv) -- pr_crit("Under-voltage detected! (0x%08x)\n", *value); -+ pr_crit_ratelimited_local( -+ "Under-voltage detected! (0x%08x)\n", -+ *value); - else -- pr_info("Voltage normalised (0x%08x)\n", *value); -+ pr_info_ratelimited_local( -+ "Voltage normalised (0x%08x)\n", -+ *value); - } - - sysfs_notify(&fw->cl.dev->kobj, NULL, "get_throttled"); |