Rebase to v4.19.0
This commit is contained in:
parent
764628643c
commit
35809dfd7b
|
@ -1,134 +0,0 @@
|
|||
From 25d3cf21987c752240df03c050593621ed2bd3a3 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 15:50:14 -0700
|
||||
Subject: [PATCHv6 1/4] kbuild: Add build salt to the kernel and modules
|
||||
To: Andy Lutomirski <luto@kernel.org>
|
||||
To: mjw@fedoraproject.org
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
To: H. J. Lu <hjl.tools@gmail.com>
|
||||
Cc: X86 ML <x86@kernel.org>
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Cc: Nick Clifton <nickc@redhat.com>
|
||||
Cc: Cary Coutant <ccoutant@gmail.com>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
To: Michael Ellerman <mpe@ellerman.id.au>
|
||||
To: Catalin Marinas <catalin.marinas@arm.com>
|
||||
To: Will Deacon <will.deacon@arm.com>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
|
||||
|
||||
In Fedora, the debug information is packaged separately (foo-debuginfo) and
|
||||
can be installed separately. There's been a long standing issue where only
|
||||
one version of a debuginfo info package can be installed at a time. There's
|
||||
been an effort for Fedora for parallel debuginfo to rectify this problem.
|
||||
|
||||
Part of the requirement to allow parallel debuginfo to work is that build ids
|
||||
are unique between builds. The existing upstream rpm implementation ensures
|
||||
this by re-calculating the build-id using the version and release as a
|
||||
seed. This doesn't work 100% for the kernel because of the vDSO which is
|
||||
its own binary and doesn't get updated when embedded.
|
||||
|
||||
Fix this by adding some data in an ELF note for both the kernel and modules.
|
||||
The data is controlled via a Kconfig option so distributions can set it
|
||||
to an appropriate value to ensure uniqueness between builds.
|
||||
|
||||
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v6: Added more detail to the commit text about why exactly this feature
|
||||
is useful. Default string now ""
|
||||
---
|
||||
include/linux/build-salt.h | 20 ++++++++++++++++++++
|
||||
init/Kconfig | 9 +++++++++
|
||||
init/version.c | 3 +++
|
||||
scripts/mod/modpost.c | 3 +++
|
||||
4 files changed, 35 insertions(+)
|
||||
create mode 100644 include/linux/build-salt.h
|
||||
|
||||
diff --git a/include/linux/build-salt.h b/include/linux/build-salt.h
|
||||
new file mode 100644
|
||||
index 000000000000..bb007bd05e7a
|
||||
--- /dev/null
|
||||
+++ b/include/linux/build-salt.h
|
||||
@@ -0,0 +1,20 @@
|
||||
+#ifndef __BUILD_SALT_H
|
||||
+#define __BUILD_SALT_H
|
||||
+
|
||||
+#include <linux/elfnote.h>
|
||||
+
|
||||
+#define LINUX_ELFNOTE_BUILD_SALT 0x100
|
||||
+
|
||||
+#ifdef __ASSEMBLER__
|
||||
+
|
||||
+#define BUILD_SALT \
|
||||
+ ELFNOTE(Linux, LINUX_ELFNOTE_BUILD_SALT, .asciz CONFIG_BUILD_SALT)
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+#define BUILD_SALT \
|
||||
+ ELFNOTE32("Linux", LINUX_ELFNOTE_BUILD_SALT, CONFIG_BUILD_SALT)
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#endif /* __BUILD_SALT_H */
|
||||
diff --git a/init/Kconfig b/init/Kconfig
|
||||
index 041f3a022122..d39b31484c52 100644
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -107,6 +107,15 @@ config LOCALVERSION_AUTO
|
||||
|
||||
which is done within the script "scripts/setlocalversion".)
|
||||
|
||||
+config BUILD_SALT
|
||||
+ string "Build ID Salt"
|
||||
+ default ""
|
||||
+ help
|
||||
+ The build ID is used to link binaries and their debug info. Setting
|
||||
+ this option will use the value in the calculation of the build id.
|
||||
+ This is mostly useful for distributions which want to ensure the
|
||||
+ build is unique between builds. It's safe to leave the default.
|
||||
+
|
||||
config HAVE_KERNEL_GZIP
|
||||
bool
|
||||
|
||||
diff --git a/init/version.c b/init/version.c
|
||||
index bfb4e3f4955e..ef4012ec4375 100644
|
||||
--- a/init/version.c
|
||||
+++ b/init/version.c
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <generated/compile.h>
|
||||
+#include <linux/build-salt.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/uts.h>
|
||||
#include <linux/utsname.h>
|
||||
@@ -49,3 +50,5 @@ const char linux_proc_banner[] =
|
||||
"%s version %s"
|
||||
" (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
|
||||
" (" LINUX_COMPILER ") %s\n";
|
||||
+
|
||||
+BUILD_SALT;
|
||||
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
|
||||
index 1663fb19343a..dc6d714e4dcb 100644
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -2125,10 +2125,13 @@ static int check_modname_len(struct module *mod)
|
||||
**/
|
||||
static void add_header(struct buffer *b, struct module *mod)
|
||||
{
|
||||
+ buf_printf(b, "#include <linux/build-salt.h>\n");
|
||||
buf_printf(b, "#include <linux/module.h>\n");
|
||||
buf_printf(b, "#include <linux/vermagic.h>\n");
|
||||
buf_printf(b, "#include <linux/compiler.h>\n");
|
||||
buf_printf(b, "\n");
|
||||
+ buf_printf(b, "BUILD_SALT;\n");
|
||||
+ buf_printf(b, "\n");
|
||||
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
|
||||
buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n");
|
||||
buf_printf(b, "\n");
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
From 714fe15daa07e7691c9731c88de71aa57f84b6c2 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 3 Jan 2018 11:13:54 +0100
|
||||
Subject: [PATCH] platform/x86: dell-laptop: Filter out spurious keyboard
|
||||
backlight change events
|
||||
|
||||
On some Dell XPS models WMI events of type 0x0000 reporting a keycode of
|
||||
0xe00c get reported when the brightness of the LCD panel changes.
|
||||
|
||||
This leads to us reporting false-positive kbd_led change events to
|
||||
userspace which in turn leads to the kbd backlight OSD showing when it
|
||||
should not.
|
||||
|
||||
We already read the current keyboard backlight brightness value when
|
||||
reporting events because the led_classdev_notify_brightness_hw_changed
|
||||
API requires this. Compare this value to the last known value and filter
|
||||
out duplicate events, fixing this.
|
||||
|
||||
Note the fixed issue is esp. a problem on XPS models with an ambient light
|
||||
sensor and automatic brightness adjustments turned on, this causes the kbd
|
||||
backlight OSD to show all the time there.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514969
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/dell-laptop.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
|
||||
index cd4725e7e0b5..2ef3297a9efc 100644
|
||||
--- a/drivers/platform/x86/dell-laptop.c
|
||||
+++ b/drivers/platform/x86/dell-laptop.c
|
||||
@@ -1133,6 +1133,7 @@ static u8 kbd_previous_mode_bit;
|
||||
|
||||
static bool kbd_led_present;
|
||||
static DEFINE_MUTEX(kbd_led_mutex);
|
||||
+static enum led_brightness kbd_led_level;
|
||||
|
||||
/*
|
||||
* NOTE: there are three ways to set the keyboard backlight level.
|
||||
@@ -1947,6 +1948,7 @@ static enum led_brightness kbd_led_level_get(struct led_classdev *led_cdev)
|
||||
static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness value)
|
||||
{
|
||||
+ enum led_brightness new_value = value;
|
||||
struct kbd_state state;
|
||||
struct kbd_state new_state;
|
||||
u16 num;
|
||||
@@ -1976,6 +1978,9 @@ static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
}
|
||||
|
||||
out:
|
||||
+ if (ret == 0)
|
||||
+ kbd_led_level = new_value;
|
||||
+
|
||||
mutex_unlock(&kbd_led_mutex);
|
||||
return ret;
|
||||
}
|
||||
@@ -2003,6 +2008,9 @@ static int __init kbd_led_init(struct device *dev)
|
||||
if (kbd_led.max_brightness)
|
||||
kbd_led.max_brightness--;
|
||||
}
|
||||
+
|
||||
+ kbd_led_level = kbd_led_level_get(NULL);
|
||||
+
|
||||
ret = led_classdev_register(dev, &kbd_led);
|
||||
if (ret)
|
||||
kbd_led_present = false;
|
||||
@@ -2027,13 +2035,25 @@ static void kbd_led_exit(void)
|
||||
static int dell_laptop_notifier_call(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
+ bool changed = false;
|
||||
+ enum led_brightness new_kbd_led_level;
|
||||
+
|
||||
switch (action) {
|
||||
case DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED:
|
||||
if (!kbd_led_present)
|
||||
break;
|
||||
|
||||
- led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
- kbd_led_level_get(&kbd_led));
|
||||
+ mutex_lock(&kbd_led_mutex);
|
||||
+ new_kbd_led_level = kbd_led_level_get(&kbd_led);
|
||||
+ if (kbd_led_level != new_kbd_led_level) {
|
||||
+ kbd_led_level = new_kbd_led_level;
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ mutex_unlock(&kbd_led_mutex);
|
||||
+
|
||||
+ if (changed)
|
||||
+ led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
+ kbd_led_level);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
From 79bfd044ed82290603093be1a3759672176f3e6f Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 Jun 2018 13:30:04 +0200
|
||||
Subject: [PATCH] printk: Make CONSOLE_LOGLEVEL_QUIET configurable
|
||||
|
||||
The goal of passing the "quiet" option to the kernel is for the kernel
|
||||
to be quiet unless something really is wrong.
|
||||
|
||||
Sofar passing quiet has been (mostly) equivalent to passing
|
||||
loglevel=4 on the kernel commandline. Which means to show any messages
|
||||
with a level of KERN_ERR or higher severity on the console.
|
||||
|
||||
In practice this often does not result in a quiet boot though, since
|
||||
there are many false-positive or otherwise harmless error messages printed,
|
||||
defeating the purpose of the quiet option. Esp. the ACPICA code is really
|
||||
bad wrt this, but there are plenty of others too.
|
||||
|
||||
This commit makes CONSOLE_LOGLEVEL_QUIET configurable.
|
||||
|
||||
This for example will allow distros which want quiet to really mean quiet
|
||||
to set CONSOLE_LOGLEVEL_QUIET so that only messages with a higher severity
|
||||
then KERN_ERR (CRIT, ALERT, EMERG) get printed, avoiding an endless game
|
||||
of whack-a-mole silencing harmless error messages.
|
||||
|
||||
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
include/linux/printk.h | 6 +++---
|
||||
lib/Kconfig.debug | 11 +++++++++++
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/linux/printk.h b/include/linux/printk.h
|
||||
index 6d7e800affd8..18602bb3eca8 100644
|
||||
--- a/include/linux/printk.h
|
||||
+++ b/include/linux/printk.h
|
||||
@@ -50,15 +50,15 @@ static inline const char *printk_skip_headers(const char *buffer)
|
||||
/* We show everything that is MORE important than this.. */
|
||||
#define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */
|
||||
#define CONSOLE_LOGLEVEL_MIN 1 /* Minimum loglevel we let people use */
|
||||
-#define CONSOLE_LOGLEVEL_QUIET 4 /* Shhh ..., when booted with "quiet" */
|
||||
#define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
|
||||
#define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
|
||||
|
||||
/*
|
||||
- * Default used to be hard-coded at 7, we're now allowing it to be set from
|
||||
- * kernel config.
|
||||
+ * Default used to be hard-coded at 7, quiet used to be hardcoded at 4,
|
||||
+ * we're now allowing both to be set from kernel config.
|
||||
*/
|
||||
#define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT
|
||||
+#define CONSOLE_LOGLEVEL_QUIET CONFIG_CONSOLE_LOGLEVEL_QUIET
|
||||
|
||||
extern int console_printk[];
|
||||
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index 8838d1158d19..0d1c48dd22a9 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -30,6 +30,17 @@ config CONSOLE_LOGLEVEL_DEFAULT
|
||||
usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT
|
||||
option.
|
||||
|
||||
+config CONSOLE_LOGLEVEL_QUIET
|
||||
+ int "quiet console loglevel (1-15)"
|
||||
+ range 1 15
|
||||
+ default "4"
|
||||
+ help
|
||||
+ loglevel to use when "quiet" is passed on the kernel commandline.
|
||||
+
|
||||
+ When "quiet" is passed on the kernel commandline this loglevel
|
||||
+ will be used as the loglevel. IOW passing "quiet" will be the
|
||||
+ equivalent of passing "loglevel=<CONSOLE_LOGLEVEL_QUIET>"
|
||||
+
|
||||
config MESSAGE_LOGLEVEL_DEFAULT
|
||||
int "Default message log level (1-7)"
|
||||
range 1 7
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
From 39a8883a2b989d1d21bd8dd99f5557f0c5e89694 Mon Sep 17 00:00:00 2001
|
||||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Tue, 17 Jul 2018 18:24:27 -0400
|
||||
Subject: [PATCH] random: add a config option to trust the CPU's hwrng
|
||||
|
||||
This gives the user building their own kernel (or a Linux
|
||||
distribution) the option of deciding whether or not to trust the CPU's
|
||||
hardware random number generator (e.g., RDRAND for x86 CPU's) as being
|
||||
correctly implemented and not having a back door introduced (perhaps
|
||||
courtesy of a Nation State's law enforcement or intelligence
|
||||
agencies).
|
||||
|
||||
This will prevent getrandom(2) from blocking, if there is a
|
||||
willingness to trust the CPU manufacturer.
|
||||
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
---
|
||||
drivers/char/Kconfig | 14 ++++++++++++++
|
||||
drivers/char/random.c | 11 ++++++++++-
|
||||
2 files changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index 212f447938ae..ce277ee0a28a 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -554,3 +554,17 @@ config ADI
|
||||
|
||||
endmenu
|
||||
|
||||
+config RANDOM_TRUST_CPU
|
||||
+ bool "Trust the CPU manufacturer to initialize Linux's CRNG"
|
||||
+ depends on X86 || S390 || PPC
|
||||
+ default n
|
||||
+ help
|
||||
+ Assume that CPU manufacturer (e.g., Intel or AMD for RDSEED or
|
||||
+ RDRAND, IBM for the S390 and Power PC architectures) is trustworthy
|
||||
+ for the purposes of initializing Linux's CRNG. Since this is not
|
||||
+ something that can be independently audited, this amounts to trusting
|
||||
+ that CPU manufacturer (perhaps with the insistence or mandate
|
||||
+ of a Nation State's intelligence or law enforcement agencies)
|
||||
+ has not installed a hidden back door to compromise the CPU's
|
||||
+ random number generation facilities.
|
||||
+
|
||||
diff --git a/drivers/char/random.c b/drivers/char/random.c
|
||||
index 34ddfd57419b..f4013b8a711b 100644
|
||||
--- a/drivers/char/random.c
|
||||
+++ b/drivers/char/random.c
|
||||
@@ -782,6 +782,7 @@ static void invalidate_batched_entropy(void);
|
||||
static void crng_initialize(struct crng_state *crng)
|
||||
{
|
||||
int i;
|
||||
+ int arch_init = 1;
|
||||
unsigned long rv;
|
||||
|
||||
memcpy(&crng->state[0], "expand 32-byte k", 16);
|
||||
@@ -792,10 +793,18 @@ static void crng_initialize(struct crng_state *crng)
|
||||
_get_random_bytes(&crng->state[4], sizeof(__u32) * 12);
|
||||
for (i = 4; i < 16; i++) {
|
||||
if (!arch_get_random_seed_long(&rv) &&
|
||||
- !arch_get_random_long(&rv))
|
||||
+ !arch_get_random_long(&rv)) {
|
||||
rv = random_get_entropy();
|
||||
+ arch_init = 0;
|
||||
+ }
|
||||
crng->state[i] ^= rv;
|
||||
}
|
||||
+#ifdef CONFIG_RANDOM_TRUST_CPU
|
||||
+ if (arch_init) {
|
||||
+ crng_init = 2;
|
||||
+ pr_notice("random: crng done (trusting CPU's manufacturer)\n");
|
||||
+ }
|
||||
+#endif
|
||||
crng->init_time = jiffies - CRNG_RESEED_INTERVAL - 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
From 9b25436662d5fb4c66eb527ead53cab15f596ee0 Mon Sep 17 00:00:00 2001
|
||||
From: Kees Cook <keescook@chromium.org>
|
||||
Date: Mon, 27 Aug 2018 14:51:54 -0700
|
||||
Subject: [PATCH] random: make CPU trust a boot parameter
|
||||
|
||||
Instead of forcing a distro or other system builder to choose
|
||||
at build time whether the CPU is trusted for CRNG seeding via
|
||||
CONFIG_RANDOM_TRUST_CPU, provide a boot-time parameter for end users to
|
||||
control the choice. The CONFIG will set the default state instead.
|
||||
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
---
|
||||
Documentation/admin-guide/kernel-parameters.txt | 6 ++++++
|
||||
drivers/char/Kconfig | 4 ++--
|
||||
drivers/char/random.c | 11 ++++++++---
|
||||
3 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||
index 0c8f7889efa1..227c5c6fa4c1 100644
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -3390,6 +3390,12 @@
|
||||
ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
|
||||
See Documentation/blockdev/ramdisk.txt.
|
||||
|
||||
+ random.trust_cpu={on,off}
|
||||
+ [KNL] Enable or disable trusting the use of the
|
||||
+ CPU's random number generator (if available) to
|
||||
+ fully seed the kernel's CRNG. Default is controlled
|
||||
+ by CONFIG_RANDOM_TRUST_CPU.
|
||||
+
|
||||
ras=option[,option,...] [KNL] RAS-specific options
|
||||
|
||||
cec_disable [X86]
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index ce277ee0a28a..40728491f37b 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -566,5 +566,5 @@ config RANDOM_TRUST_CPU
|
||||
that CPU manufacturer (perhaps with the insistence or mandate
|
||||
of a Nation State's intelligence or law enforcement agencies)
|
||||
has not installed a hidden back door to compromise the CPU's
|
||||
- random number generation facilities.
|
||||
-
|
||||
+ random number generation facilities. This can also be configured
|
||||
+ at boot with "random.trust_cpu=on/off".
|
||||
diff --git a/drivers/char/random.c b/drivers/char/random.c
|
||||
index bf5f99fc36f1..c75b6cdf0053 100644
|
||||
--- a/drivers/char/random.c
|
||||
+++ b/drivers/char/random.c
|
||||
@@ -779,6 +779,13 @@ static struct crng_state **crng_node_pool __read_mostly;
|
||||
|
||||
static void invalidate_batched_entropy(void);
|
||||
|
||||
+static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
|
||||
+static int __init parse_trust_cpu(char *arg)
|
||||
+{
|
||||
+ return kstrtobool(arg, &trust_cpu);
|
||||
+}
|
||||
+early_param("random.trust_cpu", parse_trust_cpu);
|
||||
+
|
||||
static void crng_initialize(struct crng_state *crng)
|
||||
{
|
||||
int i;
|
||||
@@ -799,12 +806,10 @@ static void crng_initialize(struct crng_state *crng)
|
||||
}
|
||||
crng->state[i] ^= rv;
|
||||
}
|
||||
-#ifdef CONFIG_RANDOM_TRUST_CPU
|
||||
- if (arch_init) {
|
||||
+ if (trust_cpu && arch_init) {
|
||||
crng_init = 2;
|
||||
pr_notice("random: crng done (trusting CPU's manufacturer)\n");
|
||||
}
|
||||
-#endif
|
||||
crng->init_time = jiffies - CRNG_RESEED_INTERVAL - 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
From 85721e6bfc5da3c8f7971c4acb1a0ad16fb2c16a Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Date: Thu, 1 Feb 2018 13:29:38 +1100
|
||||
Subject: [PATCH] tools/lib/subcmd/pager.c: do not alias select() params
|
||||
|
||||
Use a separate fd set for select()-s exception fds param to fix the
|
||||
following gcc warning:
|
||||
|
||||
pager.c:36:12: error: passing argument 2 to restrict-qualified
|
||||
parameter aliases with argument 4 [-Werror=restrict]
|
||||
select(1, &in, NULL, &in, NULL);
|
||||
^~~ ~~~
|
||||
|
||||
Link: http://lkml.kernel.org/r/20180101105626.7168-1-sergey.senozhatsky@gmail.com
|
||||
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
|
||||
---
|
||||
tools/lib/subcmd/pager.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/lib/subcmd/pager.c b/tools/lib/subcmd/pager.c
|
||||
index 5ba754d17952..9997a8805a82 100644
|
||||
--- a/tools/lib/subcmd/pager.c
|
||||
+++ b/tools/lib/subcmd/pager.c
|
||||
@@ -30,10 +30,13 @@ static void pager_preexec(void)
|
||||
* have real input
|
||||
*/
|
||||
fd_set in;
|
||||
+ fd_set exception;
|
||||
|
||||
FD_ZERO(&in);
|
||||
+ FD_ZERO(&exception);
|
||||
FD_SET(0, &in);
|
||||
- select(1, &in, NULL, &in, NULL);
|
||||
+ FD_SET(0, &exception);
|
||||
+ select(1, &in, NULL, &exception, NULL);
|
||||
|
||||
setenv("LESS", "FRSX", 0);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From d48de54a9dab5370edd2e991f78cc7996cf5483e Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 28 Jun 2018 15:20:27 +0200
|
||||
Subject: [PATCH 2/7] printk: Export is_console_locked
|
||||
|
||||
This is a preparation patch for adding a number of WARN_CONSOLE_UNLOCKED()
|
||||
calls to the fbcon code, which may be built as a module (event though
|
||||
usually it is not).
|
||||
|
||||
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Acked-by: Petr Mladek <pmladek@suse.com>
|
||||
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
kernel/printk/printk.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
|
||||
index 247808333ba4..3f041e7cbfc9 100644
|
||||
--- a/kernel/printk/printk.c
|
||||
+++ b/kernel/printk/printk.c
|
||||
@@ -2243,6 +2243,7 @@ int is_console_locked(void)
|
||||
{
|
||||
return console_locked;
|
||||
}
|
||||
+EXPORT_SYMBOL(is_console_locked);
|
||||
|
||||
/*
|
||||
* Check if we have any console that is capable of printing while cpu is
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
From 2199e4e9f81bd90ba82fcb8641a1a5911ac9c96b Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 15:56:14 -0700
|
||||
Subject: [PATCHv6 2/4] x86: Add build salt to the vDSO
|
||||
To: Andy Lutomirski <luto@kernel.org>
|
||||
To: mjw@fedoraproject.org
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
To: H. J. Lu <hjl.tools@gmail.com>
|
||||
Cc: X86 ML <x86@kernel.org>
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Cc: Nick Clifton <nickc@redhat.com>
|
||||
Cc: Cary Coutant <ccoutant@gmail.com>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
||||
Cc: Catalin Marinas <catalin.marinas@arm.com>
|
||||
Cc: Will Deacon <will.deacon@arm.com>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
|
||||
|
||||
The vDSO needs to have a unique build id in a similar manner
|
||||
to the kernel and modules. Use the build salt macro.
|
||||
|
||||
Acked-by: Andy Lutomirski <luto@kernel.org>
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v6: Ack from Andy
|
||||
---
|
||||
arch/x86/entry/vdso/vdso-note.S | 3 +++
|
||||
arch/x86/entry/vdso/vdso32/note.S | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/entry/vdso/vdso-note.S b/arch/x86/entry/vdso/vdso-note.S
|
||||
index 79a071e4357e..79423170118f 100644
|
||||
--- a/arch/x86/entry/vdso/vdso-note.S
|
||||
+++ b/arch/x86/entry/vdso/vdso-note.S
|
||||
@@ -3,6 +3,7 @@
|
||||
* Here we can supply some information useful to userland.
|
||||
*/
|
||||
|
||||
+#include <linux/build-salt.h>
|
||||
#include <linux/uts.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/elfnote.h>
|
||||
@@ -10,3 +11,5 @@
|
||||
ELFNOTE_START(Linux, 0, "a")
|
||||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
+
|
||||
+BUILD_SALT
|
||||
diff --git a/arch/x86/entry/vdso/vdso32/note.S b/arch/x86/entry/vdso/vdso32/note.S
|
||||
index 9fd51f206314..e78047d119f6 100644
|
||||
--- a/arch/x86/entry/vdso/vdso32/note.S
|
||||
+++ b/arch/x86/entry/vdso/vdso32/note.S
|
||||
@@ -4,6 +4,7 @@
|
||||
* Here we can supply some information useful to userland.
|
||||
*/
|
||||
|
||||
+#include <linux/build-salt.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/elfnote.h>
|
||||
|
||||
@@ -14,6 +15,8 @@ ELFNOTE_START(Linux, 0, "a")
|
||||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
|
||||
+BUILD_SALT
|
||||
+
|
||||
#ifdef CONFIG_XEN
|
||||
/*
|
||||
* Add a special note telling glibc's dynamic linker a fake hardware
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
From 3bd3a0e330aae4fffa8028aba2407ef615ab040b Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 28 Jun 2018 15:20:28 +0200
|
||||
Subject: [PATCH 3/7] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
|
||||
|
||||
Replace comments about places where the console lock should be held with
|
||||
calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held.
|
||||
|
||||
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
drivers/video/fbdev/core/fbcon.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
|
||||
index c910e74d46ff..cd8d52a967aa 100644
|
||||
--- a/drivers/video/fbdev/core/fbcon.c
|
||||
+++ b/drivers/video/fbdev/core/fbcon.c
|
||||
@@ -828,6 +828,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
|
||||
struct fb_info *oldinfo = NULL;
|
||||
int found, err = 0;
|
||||
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
if (oldidx == newidx)
|
||||
return 0;
|
||||
|
||||
@@ -3044,6 +3046,8 @@ static int fbcon_fb_unbind(int idx)
|
||||
{
|
||||
int i, new_idx = -1, ret = 0;
|
||||
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
if (!fbcon_has_console_bind)
|
||||
return 0;
|
||||
|
||||
@@ -3094,6 +3098,8 @@ static int fbcon_fb_unregistered(struct fb_info *info)
|
||||
{
|
||||
int i, idx;
|
||||
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
idx = info->node;
|
||||
for (i = first_fb_vc; i <= last_fb_vc; i++) {
|
||||
if (con2fb_map[i] == idx)
|
||||
@@ -3131,6 +3137,9 @@ static int fbcon_fb_unregistered(struct fb_info *info)
|
||||
static void fbcon_remap_all(int idx)
|
||||
{
|
||||
int i;
|
||||
+
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
for (i = first_fb_vc; i <= last_fb_vc; i++)
|
||||
set_con2fb_map(i, idx, 0);
|
||||
|
||||
@@ -3177,6 +3186,8 @@ static int fbcon_fb_registered(struct fb_info *info)
|
||||
{
|
||||
int ret = 0, i, idx;
|
||||
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
idx = info->node;
|
||||
fbcon_select_primary(info);
|
||||
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
From e9bb20873f9dff73fc6f381e32b43f198974ed71 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 15:59:53 -0700
|
||||
Subject: [PATCHv6 3/4] powerpc: Add build salt to the vDSO
|
||||
Cc: Andy Lutomirski <luto@kernel.org>
|
||||
To: mjw@fedoraproject.org
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
To: H. J. Lu <hjl.tools@gmail.com>
|
||||
Cc: X86 ML <x86@kernel.org>
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Cc: Nick Clifton <nickc@redhat.com>
|
||||
Cc: Cary Coutant <ccoutant@gmail.com>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
To: Michael Ellerman <mpe@ellerman.id.au>
|
||||
Cc: Catalin Marinas <catalin.marinas@arm.com>
|
||||
Cc: Will Deacon <will.deacon@arm.com>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
|
||||
The vDSO needs to have a unique build id in a similar manner
|
||||
to the kernel and modules. Use the build salt macro.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v6: Remove semi-colon
|
||||
---
|
||||
arch/powerpc/kernel/vdso32/note.S | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/powerpc/kernel/vdso32/note.S b/arch/powerpc/kernel/vdso32/note.S
|
||||
index d4b5be4f3d5f..227a7327399e 100644
|
||||
--- a/arch/powerpc/kernel/vdso32/note.S
|
||||
+++ b/arch/powerpc/kernel/vdso32/note.S
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/uts.h>
|
||||
#include <linux/version.h>
|
||||
+#include <linux/build-salt.h>
|
||||
|
||||
#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \
|
||||
.section name, flags; \
|
||||
@@ -23,3 +24,5 @@
|
||||
ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
|
||||
.long LINUX_VERSION_CODE
|
||||
ASM_ELF_NOTE_END
|
||||
+
|
||||
+BUILD_SALT
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
From af0b06e726242516da9df5071e4e058f949f2240 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Thu, 5 Jul 2018 14:39:20 -0700
|
||||
Subject: [PATCHv2] treewide: Rename HOSTCFLAGS -> KBUILD_HOSTCFLAGS
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
To: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
To: Jiri Olsa <jolsa@kernel.org>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: Robin Jarry <robin.jarry@6wind.com>
|
||||
|
||||
In preparation for enabling command line CFLAGS, re-name HOSTCFLAGS to
|
||||
KBUILD_HOSTCFLAGS as the internal use only flags. This should not have any
|
||||
visible effects.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v2: Dropped name change for individual files (still CHOSTFLAGS_foo)
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
arch/alpha/boot/Makefile | 2 +-
|
||||
net/bpfilter/Makefile | 2 +-
|
||||
samples/bpf/Makefile | 10 +++++-----
|
||||
scripts/Kbuild.include | 2 +-
|
||||
scripts/Makefile.host | 2 +-
|
||||
tools/build/Build.include | 2 +-
|
||||
tools/objtool/Makefile | 2 +-
|
||||
8 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 925c55f2524f..1feec222f3c1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -359,7 +359,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
-HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
+KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||
HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
@@ -429,7 +429,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||
LDFLAGS :=
|
||||
GCC_PLUGINS_CFLAGS :=
|
||||
|
||||
-export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
+export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
diff --git a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile
|
||||
index 0cbe4c59d3ce..dfccf0195306 100644
|
||||
--- a/arch/alpha/boot/Makefile
|
||||
+++ b/arch/alpha/boot/Makefile
|
||||
@@ -14,7 +14,7 @@ targets := vmlinux.gz vmlinux \
|
||||
tools/bootpzh bootloader bootpheader bootpzheader
|
||||
OBJSTRIP := $(obj)/tools/objstrip
|
||||
|
||||
-HOSTCFLAGS := -Wall -I$(objtree)/usr/include
|
||||
+KBUILD_HOSTCFLAGS := -Wall -I$(objtree)/usr/include
|
||||
BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj)
|
||||
|
||||
# SRM bootable image. Copy to offset 512 of a partition.
|
||||
diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile
|
||||
index 39c6980b5d99..70beeb4ad806 100644
|
||||
--- a/net/bpfilter/Makefile
|
||||
+++ b/net/bpfilter/Makefile
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
hostprogs-y := bpfilter_umh
|
||||
bpfilter_umh-objs := main.o
|
||||
-HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
|
||||
+KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
|
||||
HOSTCC := $(CC)
|
||||
|
||||
ifeq ($(CONFIG_BPFILTER_UMH), y)
|
||||
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
|
||||
index 1303af10e54d..494ef04c56cc 100644
|
||||
--- a/samples/bpf/Makefile
|
||||
+++ b/samples/bpf/Makefile
|
||||
@@ -164,11 +164,11 @@ always += xdpsock_kern.o
|
||||
always += xdp_fwd_kern.o
|
||||
always += task_fd_query_kern.o
|
||||
|
||||
-HOSTCFLAGS += -I$(objtree)/usr/include
|
||||
-HOSTCFLAGS += -I$(srctree)/tools/lib/
|
||||
-HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
|
||||
-HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
|
||||
-HOSTCFLAGS += -I$(srctree)/tools/perf
|
||||
+KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
|
||||
+KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/
|
||||
+KBUILD_HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
|
||||
+KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
|
||||
+KBUILD_HOSTCFLAGS += -I$(srctree)/tools/perf
|
||||
|
||||
HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
|
||||
HOSTCFLAGS_trace_helpers.o += -I$(srctree)/tools/lib/bpf/
|
||||
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
|
||||
index c8156d61678c..827344dfb185 100644
|
||||
--- a/scripts/Kbuild.include
|
||||
+++ b/scripts/Kbuild.include
|
||||
@@ -126,7 +126,7 @@ cc-option = $(call __cc-option, $(CC),\
|
||||
# hostcc-option
|
||||
# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586)
|
||||
hostcc-option = $(call __cc-option, $(HOSTCC),\
|
||||
- $(HOSTCFLAGS) $(HOST_EXTRACFLAGS),$(1),$(2))
|
||||
+ $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS),$(1),$(2))
|
||||
|
||||
# cc-option-yn
|
||||
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
||||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
|
||||
index aa971cc3f339..09f00dae21fe 100644
|
||||
--- a/scripts/Makefile.host
|
||||
+++ b/scripts/Makefile.host
|
||||
@@ -62,7 +62,7 @@ host-cxxshobjs := $(addprefix $(obj)/,$(host-cxxshobjs))
|
||||
#####
|
||||
# Handle options to gcc. Support building with separate output directory
|
||||
|
||||
-_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
|
||||
+_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
|
||||
$(HOSTCFLAGS_$(basetarget).o)
|
||||
_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
|
||||
$(HOSTCXXFLAGS_$(basetarget).o)
|
||||
diff --git a/tools/build/Build.include b/tools/build/Build.include
|
||||
index b5c679cd441c..a75fa0b6ffc0 100644
|
||||
--- a/tools/build/Build.include
|
||||
+++ b/tools/build/Build.include
|
||||
@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXX
|
||||
###
|
||||
## HOSTCC C flags
|
||||
|
||||
-host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
|
||||
+host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(KBUILD_HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
|
||||
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
|
||||
index f76d9914686a..b5d8c2964b52 100644
|
||||
--- a/tools/objtool/Makefile
|
||||
+++ b/tools/objtool/Makefile
|
||||
@@ -31,7 +31,7 @@ INCLUDES := -I$(srctree)/tools/include \
|
||||
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
||||
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
|
||||
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
||||
-CFLAGS += -Werror $(WARNINGS) $(HOSTCFLAGS) -g $(INCLUDES)
|
||||
+CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
|
||||
LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS)
|
||||
|
||||
# Allow old libelf to be used:
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From de9537aca25d53d9b44e7ec9a9952ebd77d69cd1 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 16:01:24 -0700
|
||||
Subject: [PATCHv6 4/4] arm64: Add build salt to the vDSO
|
||||
Cc: Andy Lutomirski <luto@kernel.org>
|
||||
To: mjw@fedoraproject.org
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
To: H. J. Lu <hjl.tools@gmail.com>
|
||||
Cc: X86 ML <x86@kernel.org>
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Cc: Nick Clifton <nickc@redhat.com>
|
||||
Cc: Cary Coutant <ccoutant@gmail.com>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
||||
To: Catalin Marinas <catalin.marinas@arm.com>
|
||||
To: Will Deacon <will.deacon@arm.com>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
|
||||
The vDSO needs to have a unique build id in a similar manner
|
||||
to the kernel and modules. Use the build salt macro.
|
||||
|
||||
Acked-by: Will Deacon <will.deacon@arm.com>
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v6: Remove the semi-colon, Ack from Will
|
||||
---
|
||||
arch/arm64/kernel/vdso/note.S | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/kernel/vdso/note.S b/arch/arm64/kernel/vdso/note.S
|
||||
index b82c85e5d972..e20483b104d9 100644
|
||||
--- a/arch/arm64/kernel/vdso/note.S
|
||||
+++ b/arch/arm64/kernel/vdso/note.S
|
||||
@@ -22,7 +22,10 @@
|
||||
#include <linux/uts.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/elfnote.h>
|
||||
+#include <linux/build-salt.h>
|
||||
|
||||
ELFNOTE_START(Linux, 0, "a")
|
||||
.long LINUX_VERSION_CODE
|
||||
ELFNOTE_END
|
||||
+
|
||||
+BUILD_SALT
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,322 +0,0 @@
|
|||
From 83d83bebf40132e2d55ec58af666713cc76f9764 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 28 Jun 2018 15:20:30 +0200
|
||||
Subject: [PATCH 4/7] console/fbcon: Add support for deferred console takeover
|
||||
|
||||
Currently fbcon claims fbdevs as soon as they are registered and takes over
|
||||
the console as soon as the first fbdev gets registered.
|
||||
|
||||
This behavior is undesirable in cases where a smooth graphical bootup is
|
||||
desired, in such cases we typically want the contents of the framebuffer
|
||||
(typically a vendor logo) to stay in place as is.
|
||||
|
||||
The current solution for this problem (on embedded systems) is to not
|
||||
enable fbcon.
|
||||
|
||||
This commit adds a new FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER config option,
|
||||
which when enabled defers fbcon taking over the console from the dummy
|
||||
console until the first text is displayed on the console. Together with the
|
||||
"quiet" kernel commandline option, this allows fbcon to still be used
|
||||
together with a smooth graphical bootup, having it take over the console as
|
||||
soon as e.g. an error message is logged.
|
||||
|
||||
Note the choice to detect the first console output in the dummycon driver,
|
||||
rather then handling this entirely inside the fbcon code, was made after
|
||||
2 failed attempts to handle this entirely inside the fbcon code. The fbcon
|
||||
code is woven quite tightly into the console code, making this to only
|
||||
feasible option.
|
||||
|
||||
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
Documentation/fb/fbcon.txt | 7 ++++
|
||||
drivers/video/console/Kconfig | 11 +++++
|
||||
drivers/video/console/dummycon.c | 67 +++++++++++++++++++++++++----
|
||||
drivers/video/fbdev/core/fbcon.c | 72 ++++++++++++++++++++++++++++++++
|
||||
include/linux/console.h | 5 +++
|
||||
5 files changed, 154 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt
|
||||
index 79c22d096bbc..d4d642e1ce9c 100644
|
||||
--- a/Documentation/fb/fbcon.txt
|
||||
+++ b/Documentation/fb/fbcon.txt
|
||||
@@ -155,6 +155,13 @@ C. Boot options
|
||||
used by text. By default, this area will be black. The 'color' value
|
||||
is an integer number that depends on the framebuffer driver being used.
|
||||
|
||||
+6. fbcon=nodefer
|
||||
+
|
||||
+ If the kernel is compiled with deferred fbcon takeover support, normally
|
||||
+ the framebuffer contents, left in place by the firmware/bootloader, will
|
||||
+ be preserved until there actually is some text is output to the console.
|
||||
+ This option causes fbcon to bind immediately to the fbdev device.
|
||||
+
|
||||
C. Attaching, Detaching and Unloading
|
||||
|
||||
Before going on how to attach, detach and unload the framebuffer console, an
|
||||
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
|
||||
index 4110ba7d7ca9..e91edef98633 100644
|
||||
--- a/drivers/video/console/Kconfig
|
||||
+++ b/drivers/video/console/Kconfig
|
||||
@@ -150,6 +150,17 @@ config FRAMEBUFFER_CONSOLE_ROTATION
|
||||
such that other users of the framebuffer will remain normally
|
||||
oriented.
|
||||
|
||||
+config FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+ bool "Framebuffer Console Deferred Takeover"
|
||||
+ depends on FRAMEBUFFER_CONSOLE=y && DUMMY_CONSOLE=y
|
||||
+ help
|
||||
+ If enabled this defers the framebuffer console taking over the
|
||||
+ console from the dummy console until the first text is displayed on
|
||||
+ the console. This is useful in combination with the "quiet" kernel
|
||||
+ commandline option to keep the framebuffer contents initially put up
|
||||
+ by the firmware in place, rather then replacing the contents with a
|
||||
+ black screen as soon as fbcon loads.
|
||||
+
|
||||
config STI_CONSOLE
|
||||
bool "STI text console"
|
||||
depends on PARISC && HAS_IOMEM
|
||||
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
|
||||
index f2eafe2ed980..45ad925ad5f8 100644
|
||||
--- a/drivers/video/console/dummycon.c
|
||||
+++ b/drivers/video/console/dummycon.c
|
||||
@@ -26,6 +26,65 @@
|
||||
#define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+/* These are both protected by the console_lock */
|
||||
+static RAW_NOTIFIER_HEAD(dummycon_output_nh);
|
||||
+static bool dummycon_putc_called;
|
||||
+
|
||||
+void dummycon_register_output_notifier(struct notifier_block *nb)
|
||||
+{
|
||||
+ raw_notifier_chain_register(&dummycon_output_nh, nb);
|
||||
+
|
||||
+ if (dummycon_putc_called)
|
||||
+ nb->notifier_call(nb, 0, NULL);
|
||||
+}
|
||||
+
|
||||
+void dummycon_unregister_output_notifier(struct notifier_block *nb)
|
||||
+{
|
||||
+ raw_notifier_chain_unregister(&dummycon_output_nh, nb);
|
||||
+}
|
||||
+
|
||||
+static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos)
|
||||
+{
|
||||
+ dummycon_putc_called = true;
|
||||
+ raw_notifier_call_chain(&dummycon_output_nh, 0, NULL);
|
||||
+}
|
||||
+
|
||||
+static void dummycon_putcs(struct vc_data *vc, const unsigned short *s,
|
||||
+ int count, int ypos, int xpos)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ if (!dummycon_putc_called) {
|
||||
+ /* Ignore erases */
|
||||
+ for (i = 0 ; i < count; i++) {
|
||||
+ if (s[i] != vc->vc_video_erase_char)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i == count)
|
||||
+ return;
|
||||
+
|
||||
+ dummycon_putc_called = true;
|
||||
+ }
|
||||
+
|
||||
+ raw_notifier_call_chain(&dummycon_output_nh, 0, NULL);
|
||||
+}
|
||||
+
|
||||
+static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch)
|
||||
+{
|
||||
+ /* Redraw, so that we get putc(s) for output done while blanked */
|
||||
+ return 1;
|
||||
+}
|
||||
+#else
|
||||
+static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) { }
|
||||
+static void dummycon_putcs(struct vc_data *vc, const unsigned short *s,
|
||||
+ int count, int ypos, int xpos) { }
|
||||
+static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static const char *dummycon_startup(void)
|
||||
{
|
||||
return "dummy device";
|
||||
@@ -44,9 +103,6 @@ static void dummycon_init(struct vc_data *vc, int init)
|
||||
static void dummycon_deinit(struct vc_data *vc) { }
|
||||
static void dummycon_clear(struct vc_data *vc, int sy, int sx, int height,
|
||||
int width) { }
|
||||
-static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos) { }
|
||||
-static void dummycon_putcs(struct vc_data *vc, const unsigned short *s,
|
||||
- int count, int ypos, int xpos) { }
|
||||
static void dummycon_cursor(struct vc_data *vc, int mode) { }
|
||||
|
||||
static bool dummycon_scroll(struct vc_data *vc, unsigned int top,
|
||||
@@ -61,11 +117,6 @@ static int dummycon_switch(struct vc_data *vc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int dummycon_blank(struct vc_data *vc, int blank, int mode_switch)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int dummycon_font_set(struct vc_data *vc, struct console_font *font,
|
||||
unsigned int flags)
|
||||
{
|
||||
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
|
||||
index cd8d52a967aa..5fb156bdcf4e 100644
|
||||
--- a/drivers/video/fbdev/core/fbcon.c
|
||||
+++ b/drivers/video/fbdev/core/fbcon.c
|
||||
@@ -129,6 +129,12 @@ static inline void fbcon_map_override(void)
|
||||
}
|
||||
#endif /* CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY */
|
||||
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+static bool deferred_takeover = true;
|
||||
+#else
|
||||
+#define deferred_takeover false
|
||||
+#endif
|
||||
+
|
||||
/* font data */
|
||||
static char fontname[40];
|
||||
|
||||
@@ -499,6 +505,12 @@ static int __init fb_console_setup(char *this_opt)
|
||||
margin_color = simple_strtoul(options, &options, 0);
|
||||
continue;
|
||||
}
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+ if (!strcmp(options, "nodefer")) {
|
||||
+ deferred_takeover = false;
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -3100,6 +3112,9 @@ static int fbcon_fb_unregistered(struct fb_info *info)
|
||||
|
||||
WARN_CONSOLE_UNLOCKED();
|
||||
|
||||
+ if (deferred_takeover)
|
||||
+ return 0;
|
||||
+
|
||||
idx = info->node;
|
||||
for (i = first_fb_vc; i <= last_fb_vc; i++) {
|
||||
if (con2fb_map[i] == idx)
|
||||
@@ -3140,6 +3155,13 @@ static void fbcon_remap_all(int idx)
|
||||
|
||||
WARN_CONSOLE_UNLOCKED();
|
||||
|
||||
+ if (deferred_takeover) {
|
||||
+ for (i = first_fb_vc; i <= last_fb_vc; i++)
|
||||
+ con2fb_map_boot[i] = idx;
|
||||
+ fbcon_map_override();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
for (i = first_fb_vc; i <= last_fb_vc; i++)
|
||||
set_con2fb_map(i, idx, 0);
|
||||
|
||||
@@ -3191,6 +3213,11 @@ static int fbcon_fb_registered(struct fb_info *info)
|
||||
idx = info->node;
|
||||
fbcon_select_primary(info);
|
||||
|
||||
+ if (deferred_takeover) {
|
||||
+ pr_info("fbcon: Deferring console take-over\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (info_idx == -1) {
|
||||
for (i = first_fb_vc; i <= last_fb_vc; i++) {
|
||||
if (con2fb_map_boot[i] == idx) {
|
||||
@@ -3566,8 +3593,46 @@ static int fbcon_init_device(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+static struct notifier_block fbcon_output_nb;
|
||||
+
|
||||
+static int fbcon_output_notifier(struct notifier_block *nb,
|
||||
+ unsigned long action, void *data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
+ pr_info("fbcon: Taking over console\n");
|
||||
+
|
||||
+ dummycon_unregister_output_notifier(&fbcon_output_nb);
|
||||
+ deferred_takeover = false;
|
||||
+ logo_shown = FBCON_LOGO_DONTSHOW;
|
||||
+
|
||||
+ for (i = 0; i < FB_MAX; i++) {
|
||||
+ if (registered_fb[i])
|
||||
+ fbcon_fb_registered(registered_fb[i]);
|
||||
+ }
|
||||
+
|
||||
+ return NOTIFY_OK;
|
||||
+}
|
||||
+
|
||||
+static void fbcon_register_output_notifier(void)
|
||||
+{
|
||||
+ fbcon_output_nb.notifier_call = fbcon_output_notifier;
|
||||
+ dummycon_register_output_notifier(&fbcon_output_nb);
|
||||
+}
|
||||
+#else
|
||||
+static inline void fbcon_register_output_notifier(void) {}
|
||||
+#endif
|
||||
+
|
||||
static void fbcon_start(void)
|
||||
{
|
||||
+ if (deferred_takeover) {
|
||||
+ fbcon_register_output_notifier();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (num_registered_fb) {
|
||||
int i;
|
||||
|
||||
@@ -3594,6 +3659,13 @@ static void fbcon_exit(void)
|
||||
if (fbcon_has_exited)
|
||||
return;
|
||||
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+ if (deferred_takeover) {
|
||||
+ dummycon_unregister_output_notifier(&fbcon_output_nb);
|
||||
+ deferred_takeover = false;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
kfree((void *)softback_buf);
|
||||
softback_buf = 0UL;
|
||||
|
||||
diff --git a/include/linux/console.h b/include/linux/console.h
|
||||
index dfd6b0e97855..f59f3dbca65c 100644
|
||||
--- a/include/linux/console.h
|
||||
+++ b/include/linux/console.h
|
||||
@@ -21,6 +21,7 @@ struct console_font_op;
|
||||
struct console_font;
|
||||
struct module;
|
||||
struct tty_struct;
|
||||
+struct notifier_block;
|
||||
|
||||
/*
|
||||
* this is what the terminal answers to a ESC-Z or csi0c query.
|
||||
@@ -220,4 +221,8 @@ static inline bool vgacon_text_force(void) { return false; }
|
||||
|
||||
extern void console_init(void);
|
||||
|
||||
+/* For deferred console takeover */
|
||||
+void dummycon_register_output_notifier(struct notifier_block *nb);
|
||||
+void dummycon_unregister_output_notifier(struct notifier_block *nb);
|
||||
+
|
||||
#endif /* _LINUX_CONSOLE_H */
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
From a6faf06c7da9ea06ca23c3a50215860f5d83b3bd Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Thu, 5 Jul 2018 14:43:37 -0700
|
||||
Subject: [PATCHv2 4/7] treewide: Rename HOSTCXXFLAGS to KBUILD_HOSTCXXFLAGS
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
To: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
To: Jiri Olsa <jolsa@kernel.org>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: Robin Jarry <robin.jarry@6wind.com>
|
||||
|
||||
In preparation for enabling command line CXXFLAGS, re-name HOSTCXXFLAGS to
|
||||
KBUILD_HOSTCXXFLAGS as the internal use only flags. This should not have any
|
||||
visible effects.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v2: Dropped name change for individual files (still HOSTCXXFLAGS_foo)
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
scripts/Makefile.host | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1feec222f3c1..857ccd28dc36 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -361,7 +361,7 @@ HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||
-HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
+KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
HOST_LOADLIBES := $(HOST_LFS_LIBS)
|
||||
|
||||
@@ -432,7 +432,7 @@ GCC_PLUGINS_CFLAGS :=
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||
-export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
+export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
|
||||
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
|
||||
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
|
||||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
|
||||
index 09f00dae21fe..455d85aa1d37 100644
|
||||
--- a/scripts/Makefile.host
|
||||
+++ b/scripts/Makefile.host
|
||||
@@ -64,7 +64,7 @@ host-cxxshobjs := $(addprefix $(obj)/,$(host-cxxshobjs))
|
||||
|
||||
_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
|
||||
$(HOSTCFLAGS_$(basetarget).o)
|
||||
-_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
|
||||
+_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
|
||||
$(HOSTCXXFLAGS_$(basetarget).o)
|
||||
|
||||
ifeq ($(KBUILD_SRC),)
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 421b8aef3902426c4c3ebd23218c0ad282786e1d Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 17:43:10 +0200
|
||||
Subject: [PATCH 5/7] efi/bgrt: Drop __initdata from bgrt_image_size
|
||||
|
||||
bgrt_image_size is necessary to (optionally) show the boot graphics from
|
||||
the efifb code. The efifb driver is a platform driver, using a normal
|
||||
driver probe() driver callback. So even though it is always builtin it
|
||||
cannot reference __initdata.
|
||||
|
||||
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
drivers/firmware/efi/efi-bgrt.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/firmware/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
|
||||
index 50793fda7819..b22ccfb0c991 100644
|
||||
--- a/drivers/firmware/efi/efi-bgrt.c
|
||||
+++ b/drivers/firmware/efi/efi-bgrt.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <linux/efi-bgrt.h>
|
||||
|
||||
struct acpi_table_bgrt bgrt_tab;
|
||||
-size_t __initdata bgrt_image_size;
|
||||
+size_t bgrt_image_size;
|
||||
|
||||
struct bmp_header {
|
||||
u16 id;
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
From 017d1ce33501da9e3e438066d853a874df64f1a5 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Thu, 5 Jul 2018 14:45:52 -0700
|
||||
Subject: [PATCHv2 5/7] treewide: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
To: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
To: Jiri Olsa <jolsa@kernel.org>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: Robin Jarry <robin.jarry@6wind.com>
|
||||
|
||||
In preparation for enabling command line LDFLAGS, re-name HOSTLDFLAGS to
|
||||
KBUILD_HOSTLDFLAGS as the internal use only flags. This should not have any
|
||||
visible effects.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v2: No change
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
net/bpfilter/Makefile | 2 +-
|
||||
scripts/Makefile.host | 10 +++++-----
|
||||
tools/build/Makefile | 2 +-
|
||||
tools/objtool/Makefile | 2 +-
|
||||
5 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 857ccd28dc36..bd2d64b89463 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -362,7 +362,7 @@ HOSTCXX = g++
|
||||
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
-HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
+KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
HOST_LOADLIBES := $(HOST_LFS_LIBS)
|
||||
|
||||
# Make variables (CC, etc...)
|
||||
@@ -430,7 +430,7 @@ LDFLAGS :=
|
||||
GCC_PLUGINS_CFLAGS :=
|
||||
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
-export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
||||
+export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS HOST_LOADLIBES
|
||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||
export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
|
||||
diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile
|
||||
index 70beeb4ad806..0947ee7f70d5 100644
|
||||
--- a/net/bpfilter/Makefile
|
||||
+++ b/net/bpfilter/Makefile
|
||||
@@ -12,7 +12,7 @@ ifeq ($(CONFIG_BPFILTER_UMH), y)
|
||||
# builtin bpfilter_umh should be compiled with -static
|
||||
# since rootfs isn't mounted at the time of __init
|
||||
# function is called and do_execv won't find elf interpreter
|
||||
-HOSTLDFLAGS += -static
|
||||
+KBUILD_HOSTLDFLAGS += -static
|
||||
endif
|
||||
|
||||
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
|
||||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
|
||||
index 455d85aa1d37..c019d781b2c9 100644
|
||||
--- a/scripts/Makefile.host
|
||||
+++ b/scripts/Makefile.host
|
||||
@@ -84,7 +84,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
|
||||
# Create executable from a single .c file
|
||||
# host-csingle -> Executable
|
||||
quiet_cmd_host-csingle = HOSTCC $@
|
||||
- cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \
|
||||
+ cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \
|
||||
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
$(host-csingle): $(obj)/%: $(src)/%.c FORCE
|
||||
$(call if_changed_dep,host-csingle)
|
||||
@@ -92,7 +92,7 @@ $(host-csingle): $(obj)/%: $(src)/%.c FORCE
|
||||
# Link an executable based on list of .o files, all plain c
|
||||
# host-cmulti -> executable
|
||||
quiet_cmd_host-cmulti = HOSTLD $@
|
||||
- cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
|
||||
+ cmd_host-cmulti = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F)-objs)) \
|
||||
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
$(host-cmulti): FORCE
|
||||
@@ -109,7 +109,7 @@ $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE
|
||||
# Link an executable based on list of .o files, a mixture of .c and .cc
|
||||
# host-cxxmulti -> executable
|
||||
quiet_cmd_host-cxxmulti = HOSTLD $@
|
||||
- cmd_host-cxxmulti = $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \
|
||||
+ cmd_host-cxxmulti = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \
|
||||
$(foreach o,objs cxxobjs,\
|
||||
$(addprefix $(obj)/,$($(@F)-$(o)))) \
|
||||
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
@@ -143,7 +143,7 @@ $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE
|
||||
# Link a shared library, based on position independent .o files
|
||||
# *.o -> .so shared library (host-cshlib)
|
||||
quiet_cmd_host-cshlib = HOSTLLD -shared $@
|
||||
- cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \
|
||||
+ cmd_host-cshlib = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
|
||||
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
$(host-cshlib): FORCE
|
||||
@@ -153,7 +153,7 @@ $(call multi_depend, $(host-cshlib), .so, -objs)
|
||||
# Link a shared library, based on position independent .o files
|
||||
# *.o -> .so shared library (host-cxxshlib)
|
||||
quiet_cmd_host-cxxshlib = HOSTLLD -shared $@
|
||||
- cmd_host-cxxshlib = $(HOSTCXX) $(HOSTLDFLAGS) -shared -o $@ \
|
||||
+ cmd_host-cxxshlib = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
|
||||
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
$(host-cxxshlib): FORCE
|
||||
diff --git a/tools/build/Makefile b/tools/build/Makefile
|
||||
index 5edf65e684ab..727050c40f09 100644
|
||||
--- a/tools/build/Makefile
|
||||
+++ b/tools/build/Makefile
|
||||
@@ -43,7 +43,7 @@ $(OUTPUT)fixdep-in.o: FORCE
|
||||
$(Q)$(MAKE) $(build)=fixdep
|
||||
|
||||
$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
|
||||
- $(QUIET_LINK)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $<
|
||||
+ $(QUIET_LINK)$(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ $<
|
||||
|
||||
FORCE:
|
||||
|
||||
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
|
||||
index b5d8c2964b52..c9d038f91af6 100644
|
||||
--- a/tools/objtool/Makefile
|
||||
+++ b/tools/objtool/Makefile
|
||||
@@ -32,7 +32,7 @@ INCLUDES := -I$(srctree)/tools/include \
|
||||
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
|
||||
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
||||
CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
|
||||
-LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS)
|
||||
+LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
|
||||
|
||||
# Allow old libelf to be used:
|
||||
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
From a5f742d7ba70c702bcf67dd1fd8d5dde3f5042fc Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 17:43:10 +0200
|
||||
Subject: [PATCH 6/7] efifb: Copy the ACPI BGRT boot graphics to the
|
||||
framebuffer
|
||||
|
||||
On systems where fbcon is configured for deferred console takeover, the
|
||||
intend is for the framebuffer to show the boot graphics (e.g a vendor
|
||||
logo) until some message (e.g. an error) is printed or a graphical
|
||||
session takes over.
|
||||
|
||||
Some firmware relies on the OS to show the boot graphics.
|
||||
|
||||
This patch adds support to efifb to show the boot graphics and
|
||||
automatically enables this when fbcon is configured for deferred
|
||||
console takeover.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
drivers/video/fbdev/efifb.c | 140 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 140 insertions(+)
|
||||
|
||||
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
|
||||
index 46a4484e3da7..fa01eecc0a55 100644
|
||||
--- a/drivers/video/fbdev/efifb.c
|
||||
+++ b/drivers/video/fbdev/efifb.c
|
||||
@@ -9,16 +9,39 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/efi.h>
|
||||
+#include <linux/efi-bgrt.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/printk.h>
|
||||
#include <linux/screen_info.h>
|
||||
#include <video/vga.h>
|
||||
#include <asm/efi.h>
|
||||
#include <drm/drm_utils.h> /* For drm_get_panel_orientation_quirk */
|
||||
#include <drm/drm_connector.h> /* For DRM_MODE_PANEL_ORIENTATION_* */
|
||||
|
||||
+struct bmp_file_header {
|
||||
+ u16 id;
|
||||
+ u32 file_size;
|
||||
+ u32 reserved;
|
||||
+ u32 bitmap_offset;
|
||||
+} __packed;
|
||||
+
|
||||
+struct bmp_dib_header {
|
||||
+ u32 dib_header_size;
|
||||
+ s32 width;
|
||||
+ s32 height;
|
||||
+ u16 planes;
|
||||
+ u16 bpp;
|
||||
+ u32 compression;
|
||||
+ u32 bitmap_size;
|
||||
+ u32 horz_resolution;
|
||||
+ u32 vert_resolution;
|
||||
+ u32 colors_used;
|
||||
+ u32 colors_important;
|
||||
+} __packed;
|
||||
+
|
||||
static bool request_mem_succeeded = false;
|
||||
static bool nowc = false;
|
||||
|
||||
@@ -66,6 +89,121 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * If fbcon deffered console takeover is configured, the intent is for the
|
||||
+ * framebuffer to show the boot graphics (e.g. vendor logo) until there is some
|
||||
+ * (error) message to display. But the boot graphics may have been destroyed by
|
||||
+ * e.g. option ROM output, detect this and restore the boot graphics.
|
||||
+ */
|
||||
+#if defined CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER && \
|
||||
+ defined CONFIG_ACPI_BGRT
|
||||
+static void efifb_copy_bmp(u8 *src, u32 *dst, int width, struct screen_info *si)
|
||||
+{
|
||||
+ u8 r, g, b;
|
||||
+
|
||||
+ while (width--) {
|
||||
+ b = *src++;
|
||||
+ g = *src++;
|
||||
+ r = *src++;
|
||||
+ *dst++ = (r << si->red_pos) |
|
||||
+ (g << si->green_pos) |
|
||||
+ (b << si->blue_pos);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void efifb_show_boot_graphics(struct fb_info *info)
|
||||
+{
|
||||
+ u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y;
|
||||
+ struct screen_info *si = &screen_info;
|
||||
+ struct bmp_file_header *file_header;
|
||||
+ struct bmp_dib_header *dib_header;
|
||||
+ void *bgrt_image = NULL;
|
||||
+ u8 *dst = info->screen_base;
|
||||
+
|
||||
+ if (!bgrt_tab.image_address) {
|
||||
+ pr_info("efifb: No BGRT, not showing boot graphics\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Avoid flashing the logo if we're going to print std probe messages */
|
||||
+ if (console_loglevel > CONSOLE_LOGLEVEL_QUIET)
|
||||
+ return;
|
||||
+
|
||||
+ /* bgrt_tab.status is unreliable, so we don't check it */
|
||||
+
|
||||
+ if (si->lfb_depth != 32) {
|
||||
+ pr_info("efifb: not 32 bits, not showing boot graphics\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ bgrt_image = memremap(bgrt_tab.image_address, bgrt_image_size,
|
||||
+ MEMREMAP_WB);
|
||||
+ if (!bgrt_image) {
|
||||
+ pr_warn("efifb: Ignoring BGRT: failed to map image memory\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (bgrt_image_size < (sizeof(*file_header) + sizeof(*dib_header)))
|
||||
+ goto error;
|
||||
+
|
||||
+ file_header = bgrt_image;
|
||||
+ if (file_header->id != 0x4d42 || file_header->reserved != 0)
|
||||
+ goto error;
|
||||
+
|
||||
+ dib_header = bgrt_image + sizeof(*file_header);
|
||||
+ if (dib_header->dib_header_size != 40 || dib_header->width < 0 ||
|
||||
+ dib_header->planes != 1 || dib_header->bpp != 24 ||
|
||||
+ dib_header->compression != 0)
|
||||
+ goto error;
|
||||
+
|
||||
+ bmp_width = dib_header->width;
|
||||
+ bmp_height = abs(dib_header->height);
|
||||
+ bmp_pitch = round_up(3 * bmp_width, 4);
|
||||
+ screen_pitch = si->lfb_linelength;
|
||||
+
|
||||
+ if ((file_header->bitmap_offset + bmp_pitch * bmp_height) >
|
||||
+ bgrt_image_size)
|
||||
+ goto error;
|
||||
+
|
||||
+ if ((bgrt_tab.image_offset_x + bmp_width) > si->lfb_width ||
|
||||
+ (bgrt_tab.image_offset_y + bmp_height) > si->lfb_height)
|
||||
+ goto error;
|
||||
+
|
||||
+ pr_info("efifb: showing boot graphics\n");
|
||||
+
|
||||
+ for (y = 0; y < si->lfb_height; y++, dst += si->lfb_linelength) {
|
||||
+ /* Only background? */
|
||||
+ if (y < bgrt_tab.image_offset_y ||
|
||||
+ y >= (bgrt_tab.image_offset_y + bmp_height)) {
|
||||
+ memset(dst, 0, 4 * si->lfb_width);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ src_y = y - bgrt_tab.image_offset_y;
|
||||
+ /* Positive header height means upside down row order */
|
||||
+ if (dib_header->height > 0)
|
||||
+ src_y = (bmp_height - 1) - src_y;
|
||||
+
|
||||
+ memset(dst, 0, bgrt_tab.image_offset_x * 4);
|
||||
+ dst_x = bgrt_tab.image_offset_x;
|
||||
+ efifb_copy_bmp(bgrt_image + file_header->bitmap_offset +
|
||||
+ src_y * bmp_pitch,
|
||||
+ (u32 *)dst + dst_x, bmp_width, si);
|
||||
+ dst_x += bmp_width;
|
||||
+ memset((u32 *)dst + dst_x, 0, (si->lfb_width - dst_x) * 4);
|
||||
+ }
|
||||
+
|
||||
+ memunmap(bgrt_image);
|
||||
+ return;
|
||||
+
|
||||
+error:
|
||||
+ memunmap(bgrt_image);
|
||||
+ pr_warn("efifb: Ignoring BGRT: unexpected or invalid BMP data\n");
|
||||
+}
|
||||
+#else
|
||||
+static inline void efifb_show_boot_graphics(struct fb_info *info) {}
|
||||
+#endif
|
||||
+
|
||||
static void efifb_destroy(struct fb_info *info)
|
||||
{
|
||||
if (info->screen_base)
|
||||
@@ -283,6 +421,8 @@ static int efifb_probe(struct platform_device *dev)
|
||||
goto err_release_fb;
|
||||
}
|
||||
|
||||
+ efifb_show_boot_graphics(info);
|
||||
+
|
||||
pr_info("efifb: framebuffer at 0x%lx, using %dk, total %dk\n",
|
||||
efifb_fix.smem_start, size_remap/1024, size_total/1024);
|
||||
pr_info("efifb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,188 +0,0 @@
|
|||
From b7e46c634a6a8b5a40369b70f1f6e0bf21fd8c22 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Thu, 5 Jul 2018 15:01:07 -0700
|
||||
Subject: [PATCH] treewide: Rename HOST_LOADLIBES to KBUILD_HOSTLDLIBS
|
||||
|
||||
In preparation for enabling command line LDLIBS, re-name HOST_LOADLIBES to
|
||||
KBUILD_HOSTLDLIBS as the internal use only flags. Also rename existing usage
|
||||
to HOSTLDLIBS for consistency. This should not have any visible effects.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
samples/bpf/Makefile | 12 ++++++------
|
||||
samples/seccomp/Makefile | 6 +++---
|
||||
scripts/Makefile | 4 ++--
|
||||
scripts/Makefile.host | 10 +++++-----
|
||||
scripts/kconfig/Makefile | 8 ++++----
|
||||
6 files changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index bd2d64b89463..96e34381d9ee 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -363,7 +363,7 @@ KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
-HOST_LOADLIBES := $(HOST_LFS_LIBS)
|
||||
+KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS)
|
||||
|
||||
# Make variables (CC, etc...)
|
||||
AS = $(CROSS_COMPILE)as
|
||||
@@ -430,7 +430,7 @@ LDFLAGS :=
|
||||
GCC_PLUGINS_CFLAGS :=
|
||||
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
-export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS HOST_LOADLIBES
|
||||
+export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
|
||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||
export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||
|
||||
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
|
||||
index 494ef04c56cc..bd9f6c2a808e 100644
|
||||
--- a/samples/bpf/Makefile
|
||||
+++ b/samples/bpf/Makefile
|
||||
@@ -180,12 +180,12 @@ HOSTCFLAGS_trace_event_user.o += -I$(srctree)/tools/lib/bpf/
|
||||
HOSTCFLAGS_sampleip_user.o += -I$(srctree)/tools/lib/bpf/
|
||||
HOSTCFLAGS_task_fd_query_user.o += -I$(srctree)/tools/lib/bpf/
|
||||
|
||||
-HOST_LOADLIBES += $(LIBBPF) -lelf
|
||||
-HOSTLOADLIBES_tracex4 += -lrt
|
||||
-HOSTLOADLIBES_trace_output += -lrt
|
||||
-HOSTLOADLIBES_map_perf_test += -lrt
|
||||
-HOSTLOADLIBES_test_overhead += -lrt
|
||||
-HOSTLOADLIBES_xdpsock += -pthread
|
||||
+KBUILD_HOSTLDLIBS += $(LIBBPF) -lelf
|
||||
+HOSTLDLIBS_tracex4 += -lrt
|
||||
+HOSTLDLIBS_trace_output += -lrt
|
||||
+HOSTLDLIBS_map_perf_test += -lrt
|
||||
+HOSTLDLIBS_test_overhead += -lrt
|
||||
+HOSTLDLIBS_xdpsock += -pthread
|
||||
|
||||
# Allows pointing LLC/CLANG to a LLVM backend with bpf support, redefine on cmdline:
|
||||
# make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
|
||||
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
|
||||
index ba942e3ead89..cf34ff6b4065 100644
|
||||
--- a/samples/seccomp/Makefile
|
||||
+++ b/samples/seccomp/Makefile
|
||||
@@ -30,9 +30,9 @@ HOSTCFLAGS_bpf-direct.o += $(MFLAG)
|
||||
HOSTCFLAGS_dropper.o += $(MFLAG)
|
||||
HOSTCFLAGS_bpf-helper.o += $(MFLAG)
|
||||
HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
|
||||
-HOSTLOADLIBES_bpf-direct += $(MFLAG)
|
||||
-HOSTLOADLIBES_bpf-fancy += $(MFLAG)
|
||||
-HOSTLOADLIBES_dropper += $(MFLAG)
|
||||
+HOSTLDLIBS_bpf-direct += $(MFLAG)
|
||||
+HOSTLDLIBS_bpf-fancy += $(MFLAG)
|
||||
+HOSTLDLIBS_dropper += $(MFLAG)
|
||||
endif
|
||||
always := $(hostprogs-m)
|
||||
endif
|
||||
diff --git a/scripts/Makefile b/scripts/Makefile
|
||||
index 25ab143cbe14..166b94db90e3 100644
|
||||
--- a/scripts/Makefile
|
||||
+++ b/scripts/Makefile
|
||||
@@ -22,8 +22,8 @@ hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
|
||||
|
||||
HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
|
||||
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
|
||||
-HOSTLOADLIBES_sign-file = -lcrypto
|
||||
-HOSTLOADLIBES_extract-cert = -lcrypto
|
||||
+HOSTLDLIBS_sign-file = -lcrypto
|
||||
+HOSTLDLIBS_extract-cert = -lcrypto
|
||||
|
||||
always := $(hostprogs-y) $(hostprogs-m)
|
||||
|
||||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
|
||||
index c019d781b2c9..0393f75db4d4 100644
|
||||
--- a/scripts/Makefile.host
|
||||
+++ b/scripts/Makefile.host
|
||||
@@ -85,7 +85,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
|
||||
# host-csingle -> Executable
|
||||
quiet_cmd_host-csingle = HOSTCC $@
|
||||
cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \
|
||||
- $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
+ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
|
||||
$(host-csingle): $(obj)/%: $(src)/%.c FORCE
|
||||
$(call if_changed_dep,host-csingle)
|
||||
|
||||
@@ -94,7 +94,7 @@ $(host-csingle): $(obj)/%: $(src)/%.c FORCE
|
||||
quiet_cmd_host-cmulti = HOSTLD $@
|
||||
cmd_host-cmulti = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F)-objs)) \
|
||||
- $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
+ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
|
||||
$(host-cmulti): FORCE
|
||||
$(call if_changed,host-cmulti)
|
||||
$(call multi_depend, $(host-cmulti), , -objs)
|
||||
@@ -112,7 +112,7 @@ quiet_cmd_host-cxxmulti = HOSTLD $@
|
||||
cmd_host-cxxmulti = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \
|
||||
$(foreach o,objs cxxobjs,\
|
||||
$(addprefix $(obj)/,$($(@F)-$(o)))) \
|
||||
- $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
+ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
|
||||
$(host-cxxmulti): FORCE
|
||||
$(call if_changed,host-cxxmulti)
|
||||
$(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
|
||||
@@ -145,7 +145,7 @@ $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE
|
||||
quiet_cmd_host-cshlib = HOSTLLD -shared $@
|
||||
cmd_host-cshlib = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
|
||||
- $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
+ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
|
||||
$(host-cshlib): FORCE
|
||||
$(call if_changed,host-cshlib)
|
||||
$(call multi_depend, $(host-cshlib), .so, -objs)
|
||||
@@ -155,7 +155,7 @@ $(call multi_depend, $(host-cshlib), .so, -objs)
|
||||
quiet_cmd_host-cxxshlib = HOSTLLD -shared $@
|
||||
cmd_host-cxxshlib = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
|
||||
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
|
||||
- $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
|
||||
+ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
|
||||
$(host-cxxshlib): FORCE
|
||||
$(call if_changed,host-cxxshlib)
|
||||
$(call multi_depend, $(host-cxxshlib), .so, -objs)
|
||||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
|
||||
index a3ac2c91331c..8f283acdaa4d 100644
|
||||
--- a/scripts/kconfig/Makefile
|
||||
+++ b/scripts/kconfig/Makefile
|
||||
@@ -169,7 +169,7 @@ HOSTCFLAGS_zconf.tab.o := -I$(src)
|
||||
hostprogs-y += nconf
|
||||
nconf-objs := nconf.o zconf.tab.o nconf.gui.o
|
||||
|
||||
-HOSTLOADLIBES_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs)
|
||||
+HOSTLDLIBS_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs)
|
||||
HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
|
||||
HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
|
||||
|
||||
@@ -180,7 +180,7 @@ hostprogs-y += mconf
|
||||
lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o
|
||||
mconf-objs := mconf.o zconf.tab.o $(addprefix lxdialog/, $(lxdialog))
|
||||
|
||||
-HOSTLOADLIBES_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs)
|
||||
+HOSTLDLIBS_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs)
|
||||
$(foreach f, mconf.o $(lxdialog), \
|
||||
$(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags)))
|
||||
|
||||
@@ -191,7 +191,7 @@ hostprogs-y += qconf
|
||||
qconf-cxxobjs := qconf.o
|
||||
qconf-objs := zconf.tab.o
|
||||
|
||||
-HOSTLOADLIBES_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
|
||||
+HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
|
||||
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags)
|
||||
|
||||
$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc
|
||||
@@ -206,7 +206,7 @@ $(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg
|
||||
hostprogs-y += gconf
|
||||
gconf-objs := gconf.o zconf.tab.o
|
||||
|
||||
-HOSTLOADLIBES_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
|
||||
+HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
|
||||
HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags)
|
||||
|
||||
$(obj)/gconf.o: $(obj)/.gconf-cfg
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
From 36be6e2f197b4abaf0e7c4fe2f525eb56b3f0298 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Fri, 6 Jul 2018 17:21:01 -0700
|
||||
Subject: [PATCHv2 7/7] Kbuild: Use HOST*FLAGS options from the command line
|
||||
To: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
To: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
To: Jiri Olsa <jolsa@kernel.org>
|
||||
Cc: linux-kbuild@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: Robin Jarry <robin.jarry@6wind.com>
|
||||
Cc: Jonathan Corbet <corbet@lwn.net>
|
||||
Cc: linux-doc@vger.kernel.org
|
||||
|
||||
|
||||
Now that we have the rename in place, reuse the HOST*FLAGS options as
|
||||
something that can be set from the command line and included with the
|
||||
rest of the flags.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
v2: Use the correct name for HOSTLDLIBS, update documentation.
|
||||
---
|
||||
Documentation/kbuild/kbuild.txt | 16 ++++++++++++++++
|
||||
Makefile | 9 +++++----
|
||||
2 files changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
|
||||
index 6c9c69ec3986..9847a5974826 100644
|
||||
--- a/Documentation/kbuild/kbuild.txt
|
||||
+++ b/Documentation/kbuild/kbuild.txt
|
||||
@@ -238,3 +238,19 @@ KBUILD_VMLINUX_LIBS
|
||||
All .a "lib" files for vmlinux.
|
||||
KBUILD_VMLINUX_INIT, KBUILD_VMLINUX_MAIN, and KBUILD_VMLINUX_LIBS together
|
||||
specify all the object files used to link vmlinux.
|
||||
+
|
||||
+HOSTCFLAGS
|
||||
+--------------------------------------------------
|
||||
+Additional flags to be passed to $(HOSTCC) when building host programs.
|
||||
+
|
||||
+HOSTLDFLAGS
|
||||
+--------------------------------------------------
|
||||
+Additional flags to be passed to $(HOSTLD) when building host programs.
|
||||
+
|
||||
+HOSTCXXFLAGS
|
||||
+--------------------------------------------------
|
||||
+Additional flags to be passed to $(HOSTCXX) when building host programs.
|
||||
+
|
||||
+HOSTLDLIBS
|
||||
+--------------------------------------------------
|
||||
+Additional libraries to link against when building host programs.
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 96e34381d9ee..c2ee1d4c12c9 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -360,10 +360,11 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||
- -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||
-KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||
-KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||
-KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS)
|
||||
+ -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
|
||||
+ $(HOSTCFLAGS)
|
||||
+KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
|
||||
+KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
|
||||
+KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
|
||||
|
||||
# Make variables (CC, etc...)
|
||||
AS = $(CROSS_COMPILE)as
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
From c4220b3f747ae6dd28171137d85fba0eab64e36d Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 24 Jul 2018 19:11:28 +0200
|
||||
Subject: [PATCH 7/7] efifb: BGRT: Do not copy the boot graphics for non native
|
||||
resolutions
|
||||
|
||||
On x86 some firmwares use a low non native resolution for the display when
|
||||
they have shown some text messages. While keeping the bgrt filled with info
|
||||
for the native resolution. If the bgrt image intended for the native
|
||||
resolution still fits, it will be displayed very close to the right edge of
|
||||
the display looking quite bad.
|
||||
|
||||
This commits adds a (heuristics based) checks for this and makes efifb
|
||||
not show the boot graphics when this is the case.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
drivers/video/fbdev/efifb.c | 43 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
|
||||
index fa01eecc0a55..52bf39f93888 100644
|
||||
--- a/drivers/video/fbdev/efifb.c
|
||||
+++ b/drivers/video/fbdev/efifb.c
|
||||
@@ -111,6 +111,46 @@ static void efifb_copy_bmp(u8 *src, u32 *dst, int width, struct screen_info *si)
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_X86
|
||||
+/*
|
||||
+ * On x86 some firmwares use a low non native resolution for the display when
|
||||
+ * they have shown some text messages. While keeping the bgrt filled with info
|
||||
+ * for the native resolution. If the bgrt image intended for the native
|
||||
+ * resolution still fits, it will be displayed very close to the right edge of
|
||||
+ * the display looking quite bad. This function checks for this.
|
||||
+ */
|
||||
+static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width)
|
||||
+{
|
||||
+ static const int default_resolutions[][2] = {
|
||||
+ { 800, 600 },
|
||||
+ { 1024, 768 },
|
||||
+ { 1280, 1024 },
|
||||
+ };
|
||||
+ u32 i, right_margin;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(default_resolutions); i++) {
|
||||
+ if (default_resolutions[i][0] == si->lfb_width &&
|
||||
+ default_resolutions[i][1] == si->lfb_height)
|
||||
+ break;
|
||||
+ }
|
||||
+ /* If not a default resolution used for textmode, this should be fine */
|
||||
+ if (i >= ARRAY_SIZE(default_resolutions))
|
||||
+ return true;
|
||||
+
|
||||
+ /* If the right margin is 5 times smaller then the left one, reject */
|
||||
+ right_margin = si->lfb_width - (bgrt_tab.image_offset_x + bmp_width);
|
||||
+ if (right_margin < (bgrt_tab.image_offset_x / 5))
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+#else
|
||||
+static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width)
|
||||
+{
|
||||
+ return true;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static void efifb_show_boot_graphics(struct fb_info *info)
|
||||
{
|
||||
u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y;
|
||||
@@ -169,6 +209,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
|
||||
(bgrt_tab.image_offset_y + bmp_height) > si->lfb_height)
|
||||
goto error;
|
||||
|
||||
+ if (!efifb_bgrt_sanity_check(si, bmp_width))
|
||||
+ goto error;
|
||||
+
|
||||
pr_info("efifb: showing boot graphics\n");
|
||||
|
||||
for (y = 0; y < si->lfb_height; y++, dst += si->lfb_linelength) {
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From b4e821e0b782ff2e816ca342af6a9eab32116ece Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 29 Jun 2018 11:46:19 +0200
|
||||
Subject: [PATCH 8/8] console: dummycon: export
|
||||
dummycon_[un]register_output_notifier
|
||||
|
||||
Export dummycon_[un]register_output_notifier, the fbcon code needs this
|
||||
and may be build as a module.
|
||||
|
||||
Fixes: 83d83bebf401 ("console/fbcon: Add support for deferred console takeover")
|
||||
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
|
||||
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
---
|
||||
drivers/video/console/dummycon.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
|
||||
index 45ad925ad5f8..0254251fdd79 100644
|
||||
--- a/drivers/video/console/dummycon.c
|
||||
+++ b/drivers/video/console/dummycon.c
|
||||
@@ -38,11 +38,13 @@ void dummycon_register_output_notifier(struct notifier_block *nb)
|
||||
if (dummycon_putc_called)
|
||||
nb->notifier_call(nb, 0, NULL);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(dummycon_register_output_notifier);
|
||||
|
||||
void dummycon_unregister_output_notifier(struct notifier_block *nb)
|
||||
{
|
||||
raw_notifier_chain_unregister(&dummycon_output_nh, nb);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(dummycon_unregister_output_notifier);
|
||||
|
||||
static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos)
|
||||
{
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
From 317b698406457eb97277d4220126683a59c74fd8 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 1 Aug 2018 15:19:52 +0200
|
||||
Subject: [PATCH] fbcon: Only defer console takeover if the current
|
||||
console driver is the dummycon
|
||||
|
||||
We rely on dummycon's output notifier mechanism to defer the takeover.
|
||||
|
||||
If say vgacon is the current console driver then dummycon will never get
|
||||
used so its output notifier will also never get called and fbcon never
|
||||
takes over. This commit fixes this by only deferring the console takeover
|
||||
if the current console driver is the dummycon driver.
|
||||
|
||||
This commit also moves the entirety of fbcon_start under the console_lock,
|
||||
since the conswitchp which fbcon_start now checks is protected by it.
|
||||
|
||||
This commit also inlines fbcon_register_output_notifier, since we now
|
||||
need a #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER in fbcon_start
|
||||
anyways because of the write access to the deferred_takeover variable,
|
||||
this has the added advantage that it puts the
|
||||
dummycon_register_output_notifier() call directly after the "conswitchp !=
|
||||
&dummy_con" comparison making it clear why that check is there.
|
||||
|
||||
Note the arch setup code will set conswitchp to either dummy_con or
|
||||
vga_con, in the cases where it gets set to vga_con even though their is
|
||||
no vga_con present we rely on vga_con_startup() to set conswitchp to
|
||||
dummy_con. vga_con_startup() is guaranteed to happen before
|
||||
fb_console_init() as it gets called as a console_initcall where as
|
||||
fb_console_init() gets called as a subsys_initcall.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/video/fbdev/core/fbcon.c | 24 ++++++++++--------------
|
||||
1 file changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
|
||||
index e30d3a138c97..ef8b2d0b7071 100644
|
||||
--- a/drivers/video/fbdev/core/fbcon.c
|
||||
+++ b/drivers/video/fbdev/core/fbcon.c
|
||||
@@ -3612,38 +3612,34 @@ static int fbcon_output_notifier(struct notifier_block *nb,
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
-
|
||||
-static void fbcon_register_output_notifier(void)
|
||||
-{
|
||||
- fbcon_output_nb.notifier_call = fbcon_output_notifier;
|
||||
- dummycon_register_output_notifier(&fbcon_output_nb);
|
||||
-}
|
||||
-#else
|
||||
-static inline void fbcon_register_output_notifier(void) {}
|
||||
#endif
|
||||
|
||||
static void fbcon_start(void)
|
||||
{
|
||||
+ WARN_CONSOLE_UNLOCKED();
|
||||
+
|
||||
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+ if (conswitchp != &dummy_con)
|
||||
+ deferred_takeover = false;
|
||||
+
|
||||
if (deferred_takeover) {
|
||||
- fbcon_register_output_notifier();
|
||||
+ fbcon_output_nb.notifier_call = fbcon_output_notifier;
|
||||
+ dummycon_register_output_notifier(&fbcon_output_nb);
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (num_registered_fb) {
|
||||
int i;
|
||||
|
||||
- console_lock();
|
||||
-
|
||||
for (i = 0; i < FB_MAX; i++) {
|
||||
if (registered_fb[i] != NULL) {
|
||||
info_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
do_fbcon_takeover(0);
|
||||
- console_unlock();
|
||||
-
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3724,8 +3720,8 @@ void __init fb_console_init(void)
|
||||
for (i = 0; i < MAX_NR_CONSOLES; i++)
|
||||
con2fb_map[i] = -1;
|
||||
|
||||
- console_unlock();
|
||||
fbcon_start();
|
||||
+ console_unlock();
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
From 8f571bbfc621fd0826bbc7a8924c811f3a3167c9 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 16:32:27 +0200
|
||||
Subject: [PATCH] fbcon: Do not takeover the console from atomic context
|
||||
|
||||
Taking over the console involves allocating mem with GFP_KERNEL, talking
|
||||
to drm drivers, etc. So this should not be done from an atomic context.
|
||||
|
||||
But the console-output trigger deferred console takeover may happen from an
|
||||
atomic context, which leads to "BUG: sleeping function called from invalid
|
||||
context" errors.
|
||||
|
||||
This commit fixes these errors by doing the deferred takeover from a
|
||||
workqueue when the notifier runs from an atomic context.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/video/fbdev/core/fbcon.c | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
|
||||
index a3fd510..f812891 100644
|
||||
--- a/drivers/video/fbdev/core/fbcon.c
|
||||
+++ b/drivers/video/fbdev/core/fbcon.c
|
||||
@@ -3596,7 +3596,22 @@ static int fbcon_init_device(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
|
||||
+static void fbcon_register_existing_fbs(struct work_struct *work)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ console_lock();
|
||||
+
|
||||
+ for (i = 0; i < FB_MAX; i++) {
|
||||
+ if (registered_fb[i])
|
||||
+ fbcon_fb_registered(registered_fb[i]);
|
||||
+ }
|
||||
+
|
||||
+ console_unlock();
|
||||
+}
|
||||
+
|
||||
static struct notifier_block fbcon_output_nb;
|
||||
+static DECLARE_WORK(fbcon_deferred_takeover_work, fbcon_register_existing_fbs);
|
||||
|
||||
static int fbcon_output_notifier(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
@@ -3611,10 +3626,8 @@ static int fbcon_output_notifier(struct notifier_block *nb,
|
||||
deferred_takeover = false;
|
||||
logo_shown = FBCON_LOGO_DONTSHOW;
|
||||
|
||||
- for (i = 0; i < FB_MAX; i++) {
|
||||
- if (registered_fb[i])
|
||||
- fbcon_fb_registered(registered_fb[i]);
|
||||
- }
|
||||
+ /* We may get called in atomic context */
|
||||
+ schedule_work(&fbcon_deferred_takeover_work);
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -1,15 +1,7 @@
|
|||
From patchwork Fri Apr 20 03:29:47 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: ACPI / scan: Fix regression related to X-Gene UARTs
|
||||
From 1e494dc5f3140005ff1f17bc06c0c16d6d50d580 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
X-Patchwork-Id: 10351797
|
||||
Message-Id: <20180420032947.23023-1-msalter@redhat.com>
|
||||
To: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= <frederic.danis.oss@gmail.com>
|
||||
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
|
||||
Date: Thu, 19 Apr 2018 23:29:47 -0400
|
||||
Subject: [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
|
||||
devices") caused a regression with some X-Gene based platforms (Mustang
|
||||
|
@ -24,12 +16,12 @@ Signed-off-by: Mark Salter <msalter@redhat.com>
|
|||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index cc234e6a6297..1dcdd0122862 100644
|
||||
index e1b6231cfa1c..542dafac4306 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -1551,6 +1551,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||
fwnode_property_present(&device->fwnode, "baud")))
|
||||
return true;
|
||||
@@ -1567,6 +1567,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
|
||||
return false;
|
||||
|
||||
+ /*
|
||||
+ * Firmware on some arm64 X-Gene platforms will make the UART
|
||||
|
@ -42,3 +34,6 @@ index cc234e6a6297..1dcdd0122862 100644
|
|||
INIT_LIST_HEAD(&resource_list);
|
||||
acpi_dev_get_resources(device, &resource_list,
|
||||
acpi_check_serial_bus_slave,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
|
@ -1,180 +0,0 @@
|
|||
From: "J. Bruce Fields" <bfields@redhat.com>
|
||||
Date: 2017-04-14 15:04:40
|
||||
Subject: [PATCH] nfsd: check for oversized NFSv2/v3 arguments
|
||||
|
||||
A client can append random data to the end of an NFSv2 or NFSv3 RPC call
|
||||
without our complaining; we'll just stop parsing at the end of the
|
||||
expected data and ignore the rest.
|
||||
|
||||
Encoded arguments and replies are stored together in an array of pages,
|
||||
and if a call is too large it could leave inadequate space for the
|
||||
reply. This is normally OK because NFS RPC's typically have either
|
||||
short arguments and long replies (like READ) or long arguments and short
|
||||
replies (like WRITE). But a client that sends an incorrectly long reply
|
||||
can violate those assumptions. This was observed to cause crashes.
|
||||
|
||||
So, insist that the argument not be any longer than we expect.
|
||||
|
||||
Also, several operations increment rq_next_page in the decode routine
|
||||
before checking the argument size, which can leave rq_next_page pointing
|
||||
well past the end of the page array, causing trouble later in
|
||||
svc_free_pages.
|
||||
|
||||
As followup we may also want to rewrite the encoding routines to check
|
||||
more carefully that they aren't running off the end of the page array.
|
||||
|
||||
Reported-by: Tuomas Haanpää <thaan@synopsys.com>
|
||||
Reported-by: Ari Kauppi <ari@synopsys.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
||||
---
|
||||
fs/nfsd/nfs3xdr.c | 23 +++++++++++++++++------
|
||||
fs/nfsd/nfsxdr.c | 13 ++++++++++---
|
||||
include/linux/sunrpc/svc.h | 3 +--
|
||||
3 files changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
|
||||
index dba2ff8eaa68..be66bcadfaea 100644
|
||||
--- a/fs/nfsd/nfs3xdr.c
|
||||
+++ b/fs/nfsd/nfs3xdr.c
|
||||
@@ -334,8 +334,11 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
if (!p)
|
||||
return 0;
|
||||
p = xdr_decode_hyper(p, &args->offset);
|
||||
-
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min(args->count, max_blocksize);
|
||||
|
||||
/* set up the kvec */
|
||||
@@ -349,7 +352,7 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -536,9 +539,11 @@ nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -564,10 +569,14 @@ nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->verf = p; p += 2;
|
||||
args->dircount = ~0;
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -585,6 +594,9 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->dircount = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = args->count = min(args->count, max_blocksize);
|
||||
while (len > 0) {
|
||||
struct page *p = *(rqstp->rq_next_page++);
|
||||
@@ -592,8 +604,7 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->buffer = page_address(p);
|
||||
len -= PAGE_SIZE;
|
||||
}
|
||||
-
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
|
||||
index 41b468a6a90f..79268369f7b3 100644
|
||||
--- a/fs/nfsd/nfsxdr.c
|
||||
+++ b/fs/nfsd/nfsxdr.c
|
||||
@@ -257,6 +257,9 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
len = args->count = ntohl(*p++);
|
||||
p++; /* totalcount - unused */
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min_t(unsigned int, len, NFSSVC_MAXBLKSIZE_V2);
|
||||
|
||||
/* set up somewhere to store response.
|
||||
@@ -272,7 +275,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -360,9 +363,11 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -400,9 +405,11 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->cookie = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
|
||||
index e770abeed32d..6ef19cf658b4 100644
|
||||
--- a/include/linux/sunrpc/svc.h
|
||||
+++ b/include/linux/sunrpc/svc.h
|
||||
@@ -336,8 +336,7 @@ xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p)
|
||||
{
|
||||
char *cp = (char *)p;
|
||||
struct kvec *vec = &rqstp->rq_arg.head[0];
|
||||
- return cp >= (char*)vec->iov_base
|
||||
- && cp <= (char*)vec->iov_base + vec->iov_len;
|
||||
+ return cp == (char *)vec->iov_base + vec->iov_len;
|
||||
}
|
||||
|
||||
static inline int
|
||||
--
|
||||
2.9.3
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -1,110 +0,0 @@
|
|||
From 5d407b071dc369c26a38398326ee2be53651cfe4 Mon Sep 17 00:00:00 2001
|
||||
From: Taehee Yoo <ap420073@gmail.com>
|
||||
Date: Mon, 10 Sep 2018 02:47:05 +0900
|
||||
Subject: [PATCH] ip: frags: fix crash in ip_do_fragment()
|
||||
|
||||
A kernel crash occurrs when defragmented packet is fragmented
|
||||
in ip_do_fragment().
|
||||
In defragment routine, skb_orphan() is called and
|
||||
skb->ip_defrag_offset is set. but skb->sk and
|
||||
skb->ip_defrag_offset are same union member. so that
|
||||
frag->sk is not NULL.
|
||||
Hence crash occurrs in skb->sk check routine in ip_do_fragment() when
|
||||
defragmented packet is fragmented.
|
||||
|
||||
test commands:
|
||||
%iptables -t nat -I POSTROUTING -j MASQUERADE
|
||||
%hping3 192.168.4.2 -s 1000 -p 2000 -d 60000
|
||||
|
||||
splat looks like:
|
||||
[ 261.069429] kernel BUG at net/ipv4/ip_output.c:636!
|
||||
[ 261.075753] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
|
||||
[ 261.083854] CPU: 1 PID: 1349 Comm: hping3 Not tainted 4.19.0-rc2+ #3
|
||||
[ 261.100977] RIP: 0010:ip_do_fragment+0x1613/0x2600
|
||||
[ 261.106945] Code: e8 e2 38 e3 fe 4c 8b 44 24 18 48 8b 74 24 08 e9 92 f6 ff ff 80 3c 02 00 0f 85 da 07 00 00 48 8b b5 d0 00 00 00 e9 25 f6 ff ff <0f> 0b 0f 0b 44 8b 54 24 58 4c 8b 4c 24 18 4c 8b 5c 24 60 4c 8b 6c
|
||||
[ 261.127015] RSP: 0018:ffff8801031cf2c0 EFLAGS: 00010202
|
||||
[ 261.134156] RAX: 1ffff1002297537b RBX: ffffed0020639e6e RCX: 0000000000000004
|
||||
[ 261.142156] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880114ba9bd8
|
||||
[ 261.150157] RBP: ffff880114ba8a40 R08: ffffed0022975395 R09: ffffed0022975395
|
||||
[ 261.158157] R10: 0000000000000001 R11: ffffed0022975394 R12: ffff880114ba9ca4
|
||||
[ 261.166159] R13: 0000000000000010 R14: ffff880114ba9bc0 R15: dffffc0000000000
|
||||
[ 261.174169] FS: 00007fbae2199700(0000) GS:ffff88011b400000(0000) knlGS:0000000000000000
|
||||
[ 261.183012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
[ 261.189013] CR2: 00005579244fe000 CR3: 0000000119bf4000 CR4: 00000000001006e0
|
||||
[ 261.198158] Call Trace:
|
||||
[ 261.199018] ? dst_output+0x180/0x180
|
||||
[ 261.205011] ? save_trace+0x300/0x300
|
||||
[ 261.209018] ? ip_copy_metadata+0xb00/0xb00
|
||||
[ 261.213034] ? sched_clock_local+0xd4/0x140
|
||||
[ 261.218158] ? kill_l4proto+0x120/0x120 [nf_conntrack]
|
||||
[ 261.223014] ? rt_cpu_seq_stop+0x10/0x10
|
||||
[ 261.227014] ? find_held_lock+0x39/0x1c0
|
||||
[ 261.233008] ip_finish_output+0x51d/0xb50
|
||||
[ 261.237006] ? ip_fragment.constprop.56+0x220/0x220
|
||||
[ 261.243011] ? nf_ct_l4proto_register_one+0x5b0/0x5b0 [nf_conntrack]
|
||||
[ 261.250152] ? rcu_is_watching+0x77/0x120
|
||||
[ 261.255010] ? nf_nat_ipv4_out+0x1e/0x2b0 [nf_nat_ipv4]
|
||||
[ 261.261033] ? nf_hook_slow+0xb1/0x160
|
||||
[ 261.265007] ip_output+0x1c7/0x710
|
||||
[ 261.269005] ? ip_mc_output+0x13f0/0x13f0
|
||||
[ 261.273002] ? __local_bh_enable_ip+0xe9/0x1b0
|
||||
[ 261.278152] ? ip_fragment.constprop.56+0x220/0x220
|
||||
[ 261.282996] ? nf_hook_slow+0xb1/0x160
|
||||
[ 261.287007] raw_sendmsg+0x21f9/0x4420
|
||||
[ 261.291008] ? dst_output+0x180/0x180
|
||||
[ 261.297003] ? sched_clock_cpu+0x126/0x170
|
||||
[ 261.301003] ? find_held_lock+0x39/0x1c0
|
||||
[ 261.306155] ? stop_critical_timings+0x420/0x420
|
||||
[ 261.311004] ? check_flags.part.36+0x450/0x450
|
||||
[ 261.315005] ? _raw_spin_unlock_irq+0x29/0x40
|
||||
[ 261.320995] ? _raw_spin_unlock_irq+0x29/0x40
|
||||
[ 261.326142] ? cyc2ns_read_end+0x10/0x10
|
||||
[ 261.330139] ? raw_bind+0x280/0x280
|
||||
[ 261.334138] ? sched_clock_cpu+0x126/0x170
|
||||
[ 261.338995] ? check_flags.part.36+0x450/0x450
|
||||
[ 261.342991] ? __lock_acquire+0x4500/0x4500
|
||||
[ 261.348994] ? inet_sendmsg+0x11c/0x500
|
||||
[ 261.352989] ? dst_output+0x180/0x180
|
||||
[ 261.357012] inet_sendmsg+0x11c/0x500
|
||||
[ ... ]
|
||||
|
||||
v2:
|
||||
- clear skb->sk at reassembly routine.(Eric Dumarzet)
|
||||
|
||||
Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.")
|
||||
Suggested-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/ipv4/ip_fragment.c | 1 +
|
||||
net/ipv6/netfilter/nf_conntrack_reasm.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
|
||||
index 88281fbce88c..e7227128df2c 100644
|
||||
--- a/net/ipv4/ip_fragment.c
|
||||
+++ b/net/ipv4/ip_fragment.c
|
||||
@@ -599,6 +599,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,
|
||||
nextp = &fp->next;
|
||||
fp->prev = NULL;
|
||||
memset(&fp->rbnode, 0, sizeof(fp->rbnode));
|
||||
+ fp->sk = NULL;
|
||||
head->data_len += fp->len;
|
||||
head->len += fp->len;
|
||||
if (head->ip_summed != fp->ip_summed)
|
||||
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
|
||||
index 2a14d8b65924..8f68a518d9db 100644
|
||||
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
|
||||
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
|
||||
@@ -445,6 +445,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *prev, struct net_devic
|
||||
else if (head->ip_summed == CHECKSUM_COMPLETE)
|
||||
head->csum = csum_add(head->csum, fp->csum);
|
||||
head->truesize += fp->truesize;
|
||||
+ fp->sk = NULL;
|
||||
}
|
||||
sub_frag_mem_limit(fq->q.net, head->truesize);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,130 +0,0 @@
|
|||
From 7289bfaee2a42bdb56eecab0625907c045d080ba Mon Sep 17 00:00:00 2001
|
||||
From: Eric Biggers <ebiggers@google.com>
|
||||
Date: Wed, 27 Sep 2017 12:50:41 -0700
|
||||
Subject: [PATCH] KEYS: don't let add_key() update an uninstantiated key
|
||||
|
||||
Currently, add_key() will, when passed a key that already exists, call
|
||||
the key's ->update() method. But this is heavily broken in the case
|
||||
where the key is uninstantiated because it doesn't call
|
||||
__key_instantiate_and_link(). Consequently, it doesn't do most of the
|
||||
things that are supposed to happen when the key is instantiated, such as
|
||||
setting KEY_FLAG_INSTANTIATED, clearing KEY_FLAG_USER_CONSTRUCT and
|
||||
awakening tasks waiting on it, and incrementing key->user->nikeys.
|
||||
|
||||
It also never takes key_construction_mutex, which means that
|
||||
->instantiate() can run concurrently with ->update() on the same key.
|
||||
In the case of the "user" and "logon" key types this causes a memory
|
||||
leak, at best. Maybe even worse, the ->update() methods of the
|
||||
"encrypted" and "trusted" key types actually just dereference a NULL
|
||||
pointer when passed an uninstantiated key.
|
||||
|
||||
Therefore, change find_key_to_update() to return NULL if the found key
|
||||
is uninstantiated, so that add_key() replaces the key rather than
|
||||
instantiating it. This seems to be better than fixing __key_update() to
|
||||
call __key_instantiate_and_link(), since given all the bugs noted above
|
||||
as well as that the existing behavior was undocumented and
|
||||
keyctl_instantiate() is supposed to be used instead, I doubt anyone was
|
||||
relying on the existing behavior.
|
||||
|
||||
This patch only affects *uninstantiated* keys. For now we still allow a
|
||||
negatively instantiated key to be updated (thereby positively
|
||||
instantiating it), although that's broken too (the next patch fixes it)
|
||||
and I'm not sure that anyone actually uses that functionality either.
|
||||
|
||||
Here is a simple reproducer for the bug using the "encrypted" key type
|
||||
(requires CONFIG_ENCRYPTED_KEYS=y), though as noted above the bug
|
||||
pertained to more than just the "encrypted" key type:
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <keyutils.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ringid = keyctl_join_session_keyring(NULL);
|
||||
|
||||
if (fork()) {
|
||||
for (;;) {
|
||||
const char payload[] = "update user:foo 32";
|
||||
|
||||
usleep(rand() % 10000);
|
||||
add_key("encrypted", "desc", payload, sizeof(payload), ringid);
|
||||
keyctl_clear(ringid);
|
||||
}
|
||||
} else {
|
||||
for (;;)
|
||||
request_key("encrypted", "desc", "callout_info", ringid);
|
||||
}
|
||||
}
|
||||
|
||||
It causes:
|
||||
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
|
||||
IP: encrypted_update+0xb0/0x170
|
||||
PGD 7a178067 P4D 7a178067 PUD 77269067 PMD 0
|
||||
PREEMPT SMP
|
||||
CPU: 0 PID: 340 Comm: reproduce Tainted: G D 4.14.0-rc1-00025-g428490e38b2e #796
|
||||
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
|
||||
task: ffff8a467a39a340 task.stack: ffffb15c40770000
|
||||
RIP: 0010:encrypted_update+0xb0/0x170
|
||||
RSP: 0018:ffffb15c40773de8 EFLAGS: 00010246
|
||||
RAX: 0000000000000000 RBX: ffff8a467a275b00 RCX: 0000000000000000
|
||||
RDX: 0000000000000005 RSI: ffff8a467a275b14 RDI: ffffffffb742f303
|
||||
RBP: ffffb15c40773e20 R08: 0000000000000000 R09: ffff8a467a275b17
|
||||
R10: 0000000000000020 R11: 0000000000000000 R12: 0000000000000000
|
||||
R13: 0000000000000000 R14: ffff8a4677057180 R15: ffff8a467a275b0f
|
||||
FS: 00007f5d7fb08700(0000) GS:ffff8a467f200000(0000) knlGS:0000000000000000
|
||||
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
CR2: 0000000000000018 CR3: 0000000077262005 CR4: 00000000001606f0
|
||||
Call Trace:
|
||||
key_create_or_update+0x2bc/0x460
|
||||
SyS_add_key+0x10c/0x1d0
|
||||
entry_SYSCALL_64_fastpath+0x1f/0xbe
|
||||
RIP: 0033:0x7f5d7f211259
|
||||
RSP: 002b:00007ffed03904c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8
|
||||
RAX: ffffffffffffffda RBX: 000000003b2a7955 RCX: 00007f5d7f211259
|
||||
RDX: 00000000004009e4 RSI: 00000000004009ff RDI: 0000000000400a04
|
||||
RBP: 0000000068db8bad R08: 000000003b2a7955 R09: 0000000000000004
|
||||
R10: 000000000000001a R11: 0000000000000246 R12: 0000000000400868
|
||||
R13: 00007ffed03905d0 R14: 0000000000000000 R15: 0000000000000000
|
||||
Code: 77 28 e8 64 34 1f 00 45 31 c0 31 c9 48 8d 55 c8 48 89 df 48 8d 75 d0 e8 ff f9 ff ff 85 c0 41 89 c4 0f 88 84 00 00 00 4c 8b 7d c8 <49> 8b 75 18 4c 89 ff e8 24 f8 ff ff 85 c0 41 89 c4 78 6d 49 8b
|
||||
RIP: encrypted_update+0xb0/0x170 RSP: ffffb15c40773de8
|
||||
CR2: 0000000000000018
|
||||
|
||||
Cc: <stable@vger.kernel.org> [v2.6.12+]
|
||||
Signed-off-by: Eric Biggers <ebiggers@google.com>
|
||||
---
|
||||
security/keys/keyring.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
|
||||
index 4fa82a8a9c0e..129a4175760b 100644
|
||||
--- a/security/keys/keyring.c
|
||||
+++ b/security/keys/keyring.c
|
||||
@@ -1056,8 +1056,8 @@ EXPORT_SYMBOL(keyring_restrict);
|
||||
* caller must also hold a lock on the keyring semaphore.
|
||||
*
|
||||
* Returns a pointer to the found key with usage count incremented if
|
||||
- * successful and returns NULL if not found. Revoked and invalidated keys are
|
||||
- * skipped over.
|
||||
+ * successful and returns NULL if not found. Revoked, invalidated, and
|
||||
+ * uninstantiated keys are skipped over. (But negative keys are not!)
|
||||
*
|
||||
* If successful, the possession indicator is propagated from the keyring ref
|
||||
* to the returned key reference.
|
||||
@@ -1084,8 +1084,10 @@ key_ref_t find_key_to_update(key_ref_t keyring_ref,
|
||||
|
||||
found:
|
||||
key = keyring_ptr_to_key(object);
|
||||
- if (key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
||||
- (1 << KEY_FLAG_REVOKED))) {
|
||||
+ if ((key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
||||
+ (1 << KEY_FLAG_REVOKED) |
|
||||
+ (1 << KEY_FLAG_INSTANTIATED))) !=
|
||||
+ (1 << KEY_FLAG_INSTANTIATED)) {
|
||||
kleave(" = NULL [x]");
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
2.13.6
|
||||
|
|
@ -1,352 +0,0 @@
|
|||
From ced8025b569e21c31b52cc80410ed49d0bf13368 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Tue, 5 Jun 2018 17:15:45 -0500
|
||||
Subject: ARM: dts: armada388-helios4
|
||||
|
||||
The helios4 is a Armada388 based nas board designed by SolidRun and
|
||||
based on their SOM. It is sold by kobol.io the dts file came from
|
||||
https://raw.githubusercontent.com/armbian/build/master/patch/kernel/mvebu-default/95-helios4-device-tree.patch
|
||||
I added a SPDX license line to match the clearfog it says it was based
|
||||
on and a compatible line for "kobol,helios4"
|
||||
|
||||
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
|
||||
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/armada-388-helios4.dts | 313 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 314 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/armada-388-helios4.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 37a3de760d40..55133fac83ab 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -1138,6 +1138,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
|
||||
armada-388-clearfog-pro.dtb \
|
||||
armada-388-db.dtb \
|
||||
armada-388-gp.dtb \
|
||||
+ armada-388-helios4.dtb \
|
||||
armada-388-rd.dtb
|
||||
dtb-$(CONFIG_MACH_ARMADA_39X) += \
|
||||
armada-398-db.dtb
|
||||
diff --git a/arch/arm/boot/dts/armada-388-helios4.dts b/arch/arm/boot/dts/armada-388-helios4.dts
|
||||
new file mode 100644
|
||||
index 000000000000..705adfa8c680
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/armada-388-helios4.dts
|
||||
@@ -0,0 +1,313 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
+/*
|
||||
+ * Device Tree file for Helios4
|
||||
+ * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828)
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Aditya Prayoga <aditya@kobol.io>
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "armada-388.dtsi"
|
||||
+#include "armada-38x-solidrun-microsom.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Helios4";
|
||||
+ compatible = "kobol,helios4", "marvell,armada388",
|
||||
+ "marvell,armada385", "marvell,armada380";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x80000000>; /* 2 GB */
|
||||
+ };
|
||||
+
|
||||
+ aliases {
|
||||
+ /* So that mvebu u-boot can update the MAC addresses */
|
||||
+ ethernet1 = ð0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ reg_12v: regulator-12v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "power_brick_12V";
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <®_12v>;
|
||||
+ };
|
||||
+
|
||||
+ reg_5p0v_hdd: regulator-5v-hdd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "5V_HDD";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <®_12v>;
|
||||
+ };
|
||||
+
|
||||
+ reg_5p0v_usb: regulator-5v-usb {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "USB-PWR";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&expander0 6 GPIO_ACTIVE_HIGH>;
|
||||
+ vin-supply = <®_12v>;
|
||||
+ };
|
||||
+
|
||||
+ system-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ status-led {
|
||||
+ label = "helios4:green:status";
|
||||
+ gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ fault-led {
|
||||
+ label = "helios4:red:fault";
|
||||
+ gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "keep";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ io-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ sata1-led {
|
||||
+ label = "helios4:green:ata1";
|
||||
+ gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "ata1";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ sata2-led {
|
||||
+ label = "helios4:green:ata2";
|
||||
+ gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "ata2";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ sata3-led {
|
||||
+ label = "helios4:green:ata3";
|
||||
+ gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "ata3";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ sata4-led {
|
||||
+ label = "helios4:green:ata4";
|
||||
+ gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "ata4";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ usb-led {
|
||||
+ label = "helios4:green:usb";
|
||||
+ gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usb-host";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fan1: j10-pwm {
|
||||
+ compatible = "pwm-fan";
|
||||
+ pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */
|
||||
+ };
|
||||
+
|
||||
+ fan2: j17-pwm {
|
||||
+ compatible = "pwm-fan";
|
||||
+ pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */
|
||||
+ };
|
||||
+
|
||||
+ usb2_phy: usb2-phy {
|
||||
+ compatible = "usb-nop-xceiv";
|
||||
+ vbus-regulator = <®_5p0v_usb>;
|
||||
+ };
|
||||
+
|
||||
+ usb3_phy: usb3-phy {
|
||||
+ compatible = "usb-nop-xceiv";
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ internal-regs {
|
||||
+ i2c@11000 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ pinctrl-0 = <&i2c0_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /*
|
||||
+ * PCA9655 GPIO expander, up to 1MHz clock.
|
||||
+ * 0-Board Revision bit 0 #
|
||||
+ * 1-Board Revision bit 1 #
|
||||
+ * 5-USB3 overcurrent
|
||||
+ * 6-USB3 power
|
||||
+ */
|
||||
+ expander0: gpio-expander@20 {
|
||||
+ /*
|
||||
+ * This is how it should be:
|
||||
+ * compatible = "onnn,pca9655",
|
||||
+ * "nxp,pca9555";
|
||||
+ * but you can't do this because of
|
||||
+ * the way I2C works.
|
||||
+ */
|
||||
+ compatible = "nxp,pca9555";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ reg = <0x20>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pca0_pins>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+
|
||||
+ board_rev_bit_0 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <0 GPIO_ACTIVE_LOW>;
|
||||
+ input;
|
||||
+ line-name = "board-rev-0";
|
||||
+ };
|
||||
+ board_rev_bit_1 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <1 GPIO_ACTIVE_LOW>;
|
||||
+ input;
|
||||
+ line-name = "board-rev-1";
|
||||
+ };
|
||||
+ usb3_ilimit {
|
||||
+ gpio-hog;
|
||||
+ gpios = <5 GPIO_ACTIVE_HIGH>;
|
||||
+ input;
|
||||
+ line-name = "usb-overcurrent-status";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ temp_sensor: temp@4c {
|
||||
+ compatible = "ti,lm75";
|
||||
+ reg = <0x4c>;
|
||||
+ vcc-supply = <®_3p3v>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c@11100 {
|
||||
+ /*
|
||||
+ * External I2C Bus for user peripheral
|
||||
+ */
|
||||
+ clock-frequency = <400000>;
|
||||
+ pinctrl-0 = <&helios_i2c1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sata@a8000 {
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ sata0: sata-port@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ sata1: sata-port@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sata@e0000 {
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ sata2: sata-port@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ sata3: sata-port@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi@10680 {
|
||||
+ pinctrl-0 = <&spi1_pins
|
||||
+ µsom_spi1_cs_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sdhci@d8000 {
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
|
||||
+ no-1-8-v;
|
||||
+ pinctrl-0 = <&helios_sdhci_pins
|
||||
+ &helios_sdhci_cd_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+ vmmc = <®_3p3v>;
|
||||
+ wp-inverted;
|
||||
+ };
|
||||
+
|
||||
+ usb@58000 {
|
||||
+ usb-phy = <&usb2_phy>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ usb3@f0000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ usb3@f8000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ pinctrl@18000 {
|
||||
+ pca0_pins: pca0-pins {
|
||||
+ marvell,pins = "mpp23";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ microsom_phy0_int_pins: microsom-phy0-int-pins {
|
||||
+ marvell,pins = "mpp18";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ helios_i2c1_pins: i2c1-pins {
|
||||
+ marvell,pins = "mpp26", "mpp27";
|
||||
+ marvell,function = "i2c1";
|
||||
+ };
|
||||
+ helios_sdhci_cd_pins: helios-sdhci-cd-pins {
|
||||
+ marvell,pins = "mpp20";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ helios_sdhci_pins: helios-sdhci-pins {
|
||||
+ marvell,pins = "mpp21", "mpp28",
|
||||
+ "mpp37", "mpp38",
|
||||
+ "mpp39", "mpp40";
|
||||
+ marvell,function = "sd0";
|
||||
+ };
|
||||
+ helios_led_pins: helios-led-pins {
|
||||
+ marvell,pins = "mpp24", "mpp25",
|
||||
+ "mpp49", "mpp50",
|
||||
+ "mpp52", "mpp53",
|
||||
+ "mpp54";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ helios_fan_pins: helios-fan-pins {
|
||||
+ marvell,pins = "mpp41", "mpp43",
|
||||
+ "mpp48", "mpp55";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ microsom_spi1_cs_pins: spi1-cs-pins {
|
||||
+ marvell,pins = "mpp59";
|
||||
+ marvell,function = "spi1";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
|
@ -1,118 +1,3 @@
|
|||
From patchwork Thu Jun 28 07:31:36 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: mmc: sdhci-esdhc-imx: support eMMC DDR mode when running at 3.3V
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
X-Patchwork-Id: 10493185
|
||||
Message-Id: <20180628073136.21748-1-stefan@agner.ch>
|
||||
To: adrian.hunter@intel.com, ulf.hansson@linaro.org
|
||||
Cc: fabio.estevam@nxp.com, haibo.chen@nxp.com, aisheng.dong@nxp.com,
|
||||
michael@amarulasolutions.com, linux-mmc@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 28 Jun 2018 09:31:36 +0200
|
||||
|
||||
The uSDHC supports DDR modes for eMMC devices running at 3.3V. This
|
||||
allows to run eMMC with 3.3V signaling voltage at DDR52 mode:
|
||||
|
||||
# cat /sys/kernel/debug/mmc1/ios
|
||||
clock: 52000000 Hz
|
||||
vdd: 21 (3.3 ~ 3.4 V)
|
||||
bus mode: 2 (push-pull)
|
||||
chip select: 0 (don't care)
|
||||
power mode: 2 (on)
|
||||
bus width: 3 (8 bits)
|
||||
timing spec: 8 (mmc DDR52)
|
||||
signal voltage: 0 (3.30 V)
|
||||
driver type: 0 (driver type B)
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
index b716b933f00a..6f444731754d 100644
|
||||
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
@@ -1324,7 +1324,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
||||
|
||||
if (esdhc_is_usdhc(imx_data)) {
|
||||
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
|
||||
- host->mmc->caps |= MMC_CAP_1_8V_DDR;
|
||||
+ host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
|
||||
if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
|
||||
host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
|
||||
|
||||
From patchwork Thu Jun 28 08:13:29 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [1/3] mmc: sdhci-esdhc-imx: get rid of support_vsel
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
X-Patchwork-Id: 10493269
|
||||
Message-Id: <20180628081331.13051-2-stefan@agner.ch>
|
||||
To: adrian.hunter@intel.com, ulf.hansson@linaro.org
|
||||
Cc: fabio.estevam@nxp.com, haibo.chen@nxp.com, aisheng.dong@nxp.com,
|
||||
michael@amarulasolutions.com, rmk+kernel@armlinux.org.uk,
|
||||
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 28 Jun 2018 10:13:29 +0200
|
||||
|
||||
The field support_vsel is currently only used in the device tree
|
||||
case. Get rid of it. No change in behavior.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++------
|
||||
include/linux/platform_data/mmc-esdhc-imx.h | 2 --
|
||||
2 files changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
index 6f444731754d..20a420b765b3 100644
|
||||
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
@@ -1145,18 +1145,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
|
||||
&boarddata->tuning_start_tap);
|
||||
|
||||
if (of_find_property(np, "no-1-8-v", NULL))
|
||||
- boarddata->support_vsel = false;
|
||||
- else
|
||||
- boarddata->support_vsel = true;
|
||||
+ host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
|
||||
|
||||
if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
|
||||
boarddata->delay_line = 0;
|
||||
|
||||
mmc_of_parse_voltage(np, &host->ocr_mask);
|
||||
|
||||
- /* sdr50 and sdr104 need work on 1.8v signal voltage */
|
||||
- if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) &&
|
||||
- !IS_ERR(imx_data->pins_default)) {
|
||||
+ if (esdhc_is_usdhc(imx_data) && !IS_ERR(imx_data->pins_default)) {
|
||||
imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl,
|
||||
ESDHC_PINCTRL_STATE_100MHZ);
|
||||
imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl,
|
||||
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h
|
||||
index 7daa78a2f342..640dec8b5b0c 100644
|
||||
--- a/include/linux/platform_data/mmc-esdhc-imx.h
|
||||
+++ b/include/linux/platform_data/mmc-esdhc-imx.h
|
||||
@@ -34,7 +34,6 @@ enum cd_types {
|
||||
* @cd_gpio: gpio for card_detect interrupt
|
||||
* @wp_type: type of write_protect method (see wp_types enum above)
|
||||
* @cd_type: type of card_detect method (see cd_types enum above)
|
||||
- * @support_vsel: indicate it supports 1.8v switching
|
||||
*/
|
||||
|
||||
struct esdhc_platform_data {
|
||||
@@ -43,7 +42,6 @@ struct esdhc_platform_data {
|
||||
enum wp_types wp_type;
|
||||
enum cd_types cd_type;
|
||||
int max_bus_width;
|
||||
- bool support_vsel;
|
||||
unsigned int delay_line;
|
||||
unsigned int tuning_step; /* The delay cell steps in tuning procedure */
|
||||
unsigned int tuning_start_tap; /* The start delay cell point in tuning procedure */
|
||||
From patchwork Thu Jun 28 08:13:30 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
|
|
|
@ -1,947 +0,0 @@
|
|||
From b41023282d07b61a53e2c9b9508912b1e7ce7b4f Mon Sep 17 00:00:00 2001
|
||||
From: Randy Li <ayaka@soulik.info>
|
||||
Date: Thu, 21 Jun 2018 21:32:10 +0800
|
||||
Subject: arm64: dts: rockchip: add some common pin-settings to rk3399
|
||||
|
||||
Those pins would be used by many boards.
|
||||
|
||||
Signed-off-by: Randy Li <ayaka@soulik.info>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 86 ++++++++++++++++++++++++++------
|
||||
1 file changed, 72 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
index adb037cd80fe..87350c694b38 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
@@ -1923,19 +1923,49 @@
|
||||
drive-strength = <12>;
|
||||
};
|
||||
|
||||
+ pcfg_pull_none_13ma: pcfg-pull-none-13ma {
|
||||
+ bias-disable;
|
||||
+ drive-strength = <13>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_none_18ma: pcfg-pull-none-18ma {
|
||||
+ bias-disable;
|
||||
+ drive-strength = <18>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_none_20ma: pcfg-pull-none-20ma {
|
||||
+ bias-disable;
|
||||
+ drive-strength = <20>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_up_2ma: pcfg-pull-up-2ma {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <2>;
|
||||
+ };
|
||||
+
|
||||
pcfg_pull_up_8ma: pcfg-pull-up-8ma {
|
||||
bias-pull-up;
|
||||
drive-strength = <8>;
|
||||
};
|
||||
|
||||
+ pcfg_pull_up_18ma: pcfg-pull-up-18ma {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <18>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_up_20ma: pcfg-pull-up-20ma {
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <20>;
|
||||
+ };
|
||||
+
|
||||
pcfg_pull_down_4ma: pcfg-pull-down-4ma {
|
||||
bias-pull-down;
|
||||
drive-strength = <4>;
|
||||
};
|
||||
|
||||
- pcfg_pull_up_2ma: pcfg-pull-up-2ma {
|
||||
- bias-pull-up;
|
||||
- drive-strength = <2>;
|
||||
+ pcfg_pull_down_8ma: pcfg-pull-down-8ma {
|
||||
+ bias-pull-down;
|
||||
+ drive-strength = <8>;
|
||||
};
|
||||
|
||||
pcfg_pull_down_12ma: pcfg-pull-down-12ma {
|
||||
@@ -1943,9 +1973,22 @@
|
||||
drive-strength = <12>;
|
||||
};
|
||||
|
||||
- pcfg_pull_none_13ma: pcfg-pull-none-13ma {
|
||||
- bias-disable;
|
||||
- drive-strength = <13>;
|
||||
+ pcfg_pull_down_18ma: pcfg-pull-down-18ma {
|
||||
+ bias-pull-down;
|
||||
+ drive-strength = <18>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_pull_down_20ma: pcfg-pull-down-20ma {
|
||||
+ bias-pull-down;
|
||||
+ drive-strength = <20>;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_output_high: pcfg-output-high {
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ pcfg_output_low: pcfg-output-low {
|
||||
+ output-low;
|
||||
};
|
||||
|
||||
clock {
|
||||
@@ -2468,45 +2511,60 @@
|
||||
pwm0 {
|
||||
pwm0_pin: pwm0-pin {
|
||||
rockchip,pins =
|
||||
- <4 18 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ <4 RK_PC2 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ pwm0_pin_pull_down: pwm0-pin-pull-down {
|
||||
+ rockchip,pins =
|
||||
+ <4 RK_PC2 RK_FUNC_1 &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
vop0_pwm_pin: vop0-pwm-pin {
|
||||
rockchip,pins =
|
||||
- <4 18 RK_FUNC_2 &pcfg_pull_none>;
|
||||
+ <4 RK_PC2 RK_FUNC_2 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ vop1_pwm_pin: vop1-pwm-pin {
|
||||
+ rockchip,pins =
|
||||
+ <4 RK_PC2 RK_FUNC_3 &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm1 {
|
||||
pwm1_pin: pwm1-pin {
|
||||
rockchip,pins =
|
||||
- <4 22 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ <4 RK_PC6 RK_FUNC_1 &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
- vop1_pwm_pin: vop1-pwm-pin {
|
||||
+ pwm1_pin_pull_down: pwm1-pin-pull-down {
|
||||
rockchip,pins =
|
||||
- <4 18 RK_FUNC_3 &pcfg_pull_none>;
|
||||
+ <4 RK_PC6 RK_FUNC_1 &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm2 {
|
||||
pwm2_pin: pwm2-pin {
|
||||
rockchip,pins =
|
||||
- <1 19 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ <1 RK_PC3 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ pwm2_pin_pull_down: pwm2-pin-pull-down {
|
||||
+ rockchip,pins =
|
||||
+ <1 RK_PC3 RK_FUNC_1 &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm3a {
|
||||
pwm3a_pin: pwm3a-pin {
|
||||
rockchip,pins =
|
||||
- <0 6 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ <0 RK_PA6 RK_FUNC_1 &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm3b {
|
||||
pwm3b_pin: pwm3b-pin {
|
||||
rockchip,pins =
|
||||
- <1 14 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ <1 RK_PB6 RK_FUNC_1 &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
From 7c41a3f42a51d88e271c989c16be178bd6d38dfe Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Mon, 10 Sep 2018 18:17:36 +0100
|
||||
Subject: [PATCH 1/4] arm64: dts: rockchip: add 96boards RK3399 Ficus board
|
||||
|
||||
The RK3399 Ficus board is an Enterprise Edition board
|
||||
manufactured by Vamrs Ltd., based on the Rockchip RK3399 SoC.
|
||||
|
||||
The board exposes a bunch of nice peripherals, including
|
||||
SATA, HDMI, MIPI CSI, Ethernet, WiFi, and PCIe.
|
||||
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
.../devicetree/bindings/arm/rockchip.txt | 5 +
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 514 ++++++++++++++++++
|
||||
3 files changed, 520 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
index 1c1d62d03c4f..d46c5d43e27f 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
@@ -1,5 +1,10 @@
|
||||
Rockchip platforms device tree bindings
|
||||
---------------------------------------
|
||||
+
|
||||
+- 96boards RK3399 Ficus (ROCK960 Enterprise Edition)
|
||||
+ Required root node properties:
|
||||
+ - compatible = "vamrs,ficus", "rockchip,rk3399";
|
||||
+
|
||||
- Amarula Vyasa RK3288 board
|
||||
Required root node properties:
|
||||
- compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 48a83f882947..2811fb701f12 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ficus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
new file mode 100644
|
||||
index 000000000000..0d14183dd4a9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
@@ -0,0 +1,514 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Collabora Ltd.
|
||||
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
|
||||
+ *
|
||||
+ * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "96boards RK3399 Ficus";
|
||||
+ compatible = "vamrs,ficus", "rockchip,rk3399";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ clkin_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "clkin_gmac";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_s0: vcc1v8-s0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc1v8_s0";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sys: vcc-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc_sys";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_drv>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_pcie";
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_log: vdd-log {
|
||||
+ compatible = "pwm-regulator";
|
||||
+ pwms = <&pwm2 0 25000 0>;
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1400000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ /* for rockchip boot on */
|
||||
+ rockchip,pwm_id= <2>;
|
||||
+ rockchip,pwm_voltage = <900000>;
|
||||
+
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
+ assigned-clock-parents = <&clkin_gmac>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-supply = <&vcc3v3_sys>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 50000>;
|
||||
+ tx_delay = <0x28>;
|
||||
+ rx_delay = <0x11>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c3>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_cec>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-rising-time-ns = <168>;
|
||||
+ i2c-scl-falling-time-ns = <4>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu_b: regulator@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ reg = <0x40>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu_b";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: regulator@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ reg = <0x41>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk808-clkout2";
|
||||
+
|
||||
+ vcc1-supply = <&vcc_sys>;
|
||||
+ vcc2-supply = <&vcc_sys>;
|
||||
+ vcc3-supply = <&vcc_sys>;
|
||||
+ vcc4-supply = <&vcc_sys>;
|
||||
+ vcc6-supply = <&vcc_sys>;
|
||||
+ vcc7-supply = <&vcc_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc_sys>;
|
||||
+ vcc10-supply = <&vcc_sys>;
|
||||
+ vcc11-supply = <&vcc_sys>;
|
||||
+ vcc12-supply = <&vcc3v3_sys>;
|
||||
+ vddio-supply = <&vcc_1v8>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_center: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_l: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_cpu_l";
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_dvp: LDO_REG1 {
|
||||
+ regulator-name = "vcc1v8_dvp";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_hdmi: LDO_REG2 {
|
||||
+ regulator-name = "vcca1v8_hdmi";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG3 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: LDO_REG4 {
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_sd: LDO_REG5 {
|
||||
+ regulator-name = "vcc3v0_sd";
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v5: LDO_REG6 {
|
||||
+ regulator-name = "vcc_1v5";
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1500000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca0v9_hdmi: LDO_REG7 {
|
||||
+ regulator-name = "vcca0v9_hdmi";
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: LDO_REG8 {
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc3v3_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s0: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
|
||||
+ audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
|
||||
+ sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
|
||||
+ gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
+ num-lanes = <4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_clkreqn_cpm>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmu1830-supply = <&vcc_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gmac {
|
||||
+ rgmii_sleep_pins: rgmii-sleep-pins {
|
||||
+ rockchip,pins =
|
||||
+ <3 15 RK_FUNC_GPIO &pcfg_output_low>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+ sdmmc_bus1: sdmmc-bus1 {
|
||||
+ rockchip,pins =
|
||||
+ <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_bus4: sdmmc-bus4 {
|
||||
+ rockchip,pins =
|
||||
+ <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>,
|
||||
+ <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>,
|
||||
+ <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>,
|
||||
+ <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_clk: sdmmc-clk {
|
||||
+ rockchip,pins =
|
||||
+ <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc_cmd: sdmmc-cmd {
|
||||
+ rockchip,pins =
|
||||
+ <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie {
|
||||
+ pcie_drv: pcie-drv {
|
||||
+ rockchip,pins =
|
||||
+ <1 24 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins =
|
||||
+ <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ vsel1_gpio: vsel1-gpio {
|
||||
+ rockchip,pins =
|
||||
+ <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ vsel2_gpio: vsel2-gpio {
|
||||
+ rockchip,pins =
|
||||
+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ clock-frequency = <100000000>;
|
||||
+ clock-freq-min-max = <100000 100000000>;
|
||||
+ disable-wp;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vqmmc-supply = <&vcc_sd>;
|
||||
+ card-detect-delay = <800>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From 2e3f4fb6f0a94b6cf56407536414b93bd3c45471 Mon Sep 17 00:00:00 2001
|
||||
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
Date: Sat, 14 Jul 2018 14:09:22 -0300
|
||||
Subject: [PATCH 2/4] arm64: dts: rockchip: add USB 2.0 and 3.0 support on
|
||||
Ficus board
|
||||
|
||||
The board exposes two types A ports, one is USB 3.0, up to 5.0Gbps and
|
||||
another one is USB 2.0 up to 480Mbps. Enable the USB PHYs and the USB
|
||||
controllers to enable theses devices.
|
||||
|
||||
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 88 +++++++++++++++++++
|
||||
1 file changed, 88 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
index 0d14183dd4a9..890b9e13cfe8 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
@@ -61,6 +61,19 @@
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
+ vcc5v0_host: vcc5v0-host-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&host_vbus_drv>;
|
||||
+ regulator-name = "vcc5v0_host";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ vin-supply = <&vcc_sys>;
|
||||
+ };
|
||||
+
|
||||
vdd_log: vdd-log {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
@@ -454,6 +467,13 @@
|
||||
<1 14 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ usb2 {
|
||||
+ host_vbus_drv: host-vbus-drv {
|
||||
+ rockchip,pins =
|
||||
+ <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -487,6 +507,40 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tcphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_host {
|
||||
+ phy-supply = <&vcc5v0_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer &uart0_cts>;
|
||||
@@ -497,6 +551,40 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_1 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
&vopb {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From d875193399378e17911829b9df9d27fd4a1ba195 Mon Sep 17 00:00:00 2001
|
||||
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
Date: Sat, 14 Jul 2018 14:09:22 -0300
|
||||
Subject: [PATCH 3/4] arm64: dts: rockchip: add voltage properties for
|
||||
vcc3v3_pcie on rk3399 ficus
|
||||
|
||||
The vcc3v3_pcie regulator supplies 3.3V so add voltage properties
|
||||
for it.
|
||||
|
||||
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
[split off from original patch]
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
index 890b9e13cfe8..6295483b701f 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
@@ -58,6 +58,8 @@
|
||||
pinctrl-0 = <&pcie_drv>;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vcc3v3_pcie";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From 416756dbf32ff2394b320fa88c09e9461496fc4c Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko@sntech.de>
|
||||
Date: Mon, 16 Jul 2018 18:52:44 +0200
|
||||
Subject: [PATCH 4/4] arm64: dts: rockchip: drop out-of-tree properties from
|
||||
rk3399-ficus regulator
|
||||
|
||||
The pwm-regulator for vdd_log uses additional unreviewed properties in the
|
||||
vendor kernel, which slipped in with the devicetree.
|
||||
As written, they are unreviewed and unused in all mainline implementations
|
||||
so drop them again.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
index 6295483b701f..8978d924eb83 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
|
||||
@@ -84,11 +84,6 @@
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
-
|
||||
- /* for rockchip boot on */
|
||||
- rockchip,pwm_id= <2>;
|
||||
- rockchip,pwm_voltage = <900000>;
|
||||
-
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
|
@ -1,8 +1,125 @@
|
|||
From 18c1ec0b6501f2aa0aabcc8ca75824f9f49bcd91 Mon Sep 17 00:00:00 2001
|
||||
From patchwork Mon Sep 10 15:13:53 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Manivannan Sadhasivam
|
||||
<manivannan.sadhasivam@linaro.org>
|
||||
X-Patchwork-Id: 10594431
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 73CD514BD
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:15:33 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D47C28C27
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:15:33 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 5116628C53; Mon, 10 Sep 2018 15:15:33 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EDF1528C27
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:15:31 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=MsLZPB+rA3nDtNH8e90hVGAuKXNRnfg7yUTFRVYc6dI=; b=h4EvyRF3c6JHDN+V8CA1aCQ+Z1
|
||||
YJv25g2qREcfTe43jtJB8EdndYJJvCH7lwCqcySm4a7gc6OmLzMHyOkbJpY5btuCSASttz84P5UQR
|
||||
nQohc2vi6Gw0/0sRPpWedlb3lyVDOjQTqssy1EJ5AfGmF4zixU86HPfI/HSSMdvThPOtryoX5RLTb
|
||||
ibxf8tARxEuJj2etn2yjSOPGVh/cqqFoYQ8bYx79baCtrqIhbZyf0FThVXv5zFoZs8P4dkl+6bQxL
|
||||
g7qcM3JpsT5cNwPtXWHQu9wqV81v3HfC0KnEFn6LcoB3TE/ZwGpgPZjflJrCqpqAk7kWeWW+2dI4C
|
||||
FHizu/pA==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNuN-00006z-Ln; Mon, 10 Sep 2018 15:15:23 +0000
|
||||
Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNtW-0007s1-E0
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 15:14:34 +0000
|
||||
Received: by mail-pg1-x543.google.com with SMTP id 7-v6so10649320pgf.2
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 10 Sep 2018 08:14:28 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
|
||||
h=from:to:cc:subject:date:message-id:in-reply-to:references;
|
||||
bh=Eog9j9IcKFaAzJXy1OcDk20W/serCK49+v6e5E41fYs=;
|
||||
b=UumzTjrKvICkslj9/rY1Ypqo4g/VFWMM/z4LWlc0YmDX6R7J7mkz84ZdTL5XsoDcXH
|
||||
bIJYtcSPWxrKlCExdB+l76HrTiEIwBTSpa+43+zkBZmBL96zkDP+ttgtuhQHuHLySPkk
|
||||
e5/P5mAeV67NX82dCuBHtDGkNgnXHKwGYVJ4E=
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=Eog9j9IcKFaAzJXy1OcDk20W/serCK49+v6e5E41fYs=;
|
||||
b=Zs0nhcL8gTYkjWpXtvcZzWYogSg7OWkFayoR/xLbsQSFpBzZ2Bz3l3SHbpp2ik8r4q
|
||||
ttai7OC70sE0YX+07kWmUskhY6DZ9v9Y9C12Gorn7R2Vrb8d9bJ0iYC/WDBKpvqPXRJh
|
||||
qxhB8hZQSDN5n1o7575Zra770wEz+2ZpuYn0XqV0Eu1GsTHpg2DM81R/ee2QB0H+DSPc
|
||||
nzWzZ0d1nw4hFMVzaZX/NxGZG8y0n0xJ1cczcixZk0i5rA8laVOK0F6NSIM0hSlVmpbA
|
||||
w8ABebeQMFhjDJzyuhpitWNVSqXUd8lL66MmLCJN0ywvaKlkCTOA3+YzKC3i13DI5GDe
|
||||
l3Uw==
|
||||
X-Gm-Message-State: APzg51DkGQG9g2kFMP8auJcqLZzVe9v0wPZb5nX0QBtWinR+6ggMBUHP
|
||||
q7OTJ5nOg3//Y7mKlI8nThBh
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdazLqQZTiVhxGQkZGzXM/aTQSynf/Y1rCmuJyISmCcXxPMDwVVko2CYJbgXHjZ/o6nqP2KzHA==
|
||||
X-Received: by 2002:a62:63c2:: with SMTP id
|
||||
x185-v6mr24200641pfb.13.1536592467755;
|
||||
Mon, 10 Sep 2018 08:14:27 -0700 (PDT)
|
||||
Received: from localhost.localdomain
|
||||
([2405:204:728c:6bba:60a8:6c40:2817:7ee1])
|
||||
by smtp.gmail.com with ESMTPSA id e202-v6sm26703907pfh.16.2018.09.10.08.14.19
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Mon, 10 Sep 2018 08:14:27 -0700 (PDT)
|
||||
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Date: Mon, 10 Sep 2018 20:43:53 +0530
|
||||
To: heiko@sntech.de,
|
||||
robh+dt@kernel.org
|
||||
Subject: [PATCH 1/4] arm64: dts: rockchip: Split out common nodes for Rock960
|
||||
based boards
|
||||
Date: Mon, 10 Sep 2018 20:43:53 +0530
|
||||
Message-Id: <20180910151356.25946-2-manivannan.sadhasivam@linaro.org>
|
||||
X-Mailer: git-send-email 2.17.1
|
||||
In-Reply-To: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
References: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180910_081430_502727_1CA120A0
|
||||
X-CRM114-Status: GOOD ( 17.07 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
|
||||
tom@vamrs.com, amit.kucheria@linaro.org, shawn.lin@rock-chips.com,
|
||||
linux-kernel@vger.kernel.org, vicencb@gmail.com, dev@vamrs.com,
|
||||
linux-rockchip@lists.infradead.org, pbrobinson@gmail.com,
|
||||
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
|
||||
enric.balletbo@collabora.com, ezequiel@collabora.com, stephen@vamrs.com
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
Since the same family members of Rock960 boards (Rock960 and Ficus)
|
||||
share the same configuration, split out the common nodes into a common
|
||||
|
@ -961,13 +1078,128 @@ index 000000000000..5a5d8e28ef55
|
|||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From afb33f3ec13b5ca3d7f2acd0a03dd707cba90638 Mon Sep 17 00:00:00 2001
|
||||
From patchwork Mon Sep 10 15:13:54 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Manivannan Sadhasivam
|
||||
<manivannan.sadhasivam@linaro.org>
|
||||
X-Patchwork-Id: 10594435
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BF1F921
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:16:42 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18E7328C53
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:16:42 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 0BCAE28EEA; Mon, 10 Sep 2018 15:16:42 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BD0528C53
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:16:41 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=xmUkL5mhfsjBunlvmyohQp6j9uGJXfnKJf9vQglqLgg=; b=mVmqN9cD59M0SIET1b/PL7/vE9
|
||||
pvFJkHJLmhp8Nf/jBRW1g+V1d+G5W7/6V3bHNBbhYfjjOoRhXr+XDaTWhJEHlYR2hUm3TxwBv5JEz
|
||||
d1tE6BgOCfrCex3T4D+BwL9hyn1HbEnuM6Mgrx25O4Y/ggGLoZkIyYdLI12AVSd6Hk5cb5wFfS+rv
|
||||
hx+PI1hQF9brC3kTjV43q2/j+K0ZGZuLmtUQr/Hd2RKRoDfqLjy38KFVEUQfln/YS8dxQ2h9GJc7B
|
||||
36IaewzvWd8m2CicWSAhbTDb9pAK9i4bVRPwvF/JvZNPQ055lEu2vTsmVrDSbN9LyCxOwqK4x3Zc8
|
||||
ke7bGLYA==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNvS-0001Wo-Dn; Mon, 10 Sep 2018 15:16:30 +0000
|
||||
Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNtm-0007u1-LE
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 15:14:48 +0000
|
||||
Received: by mail-pf1-x442.google.com with SMTP id h69-v6so10643325pfd.4
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 10 Sep 2018 08:14:36 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
|
||||
h=from:to:cc:subject:date:message-id:in-reply-to:references;
|
||||
bh=k14lBxRZet8JTP0sZsFzzMdrUIiDAx3PCahAr8M1lTM=;
|
||||
b=DbONVz7SNceTZXBZJ8Gl0rnlFDJW0nx0gDqbWxJjPAh0FU6WbQn5fnmnQX/SPblLQM
|
||||
R5dn8fXgoyp9F+BayRLiTZj1xjjwsa9c+cNblxab/snkslnvqb4DubBY+neFF4oPV9m+
|
||||
JZTvXyEfdmfD6P5xOPV4BcrIX1U5FSXgs2mBc=
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=k14lBxRZet8JTP0sZsFzzMdrUIiDAx3PCahAr8M1lTM=;
|
||||
b=s6q6nHAuMNRkVtpoFs76F3HMPL1m5eDLsaQ9pNi0FO4EtdT7IxWEN43Q/OXD9Ec6TA
|
||||
JLM/dXlx5I8Lc39SmhZxcP0BfMxOGnYRcEtU3zVgeY4bVHZydei8Nsk+W6Kp55r8+wAS
|
||||
QrArSMKy/SOcuZKPBdK7U7hkoT/gSX3/nsXVMTzFmwhvqjrn7nBULpCOQqrHKdleFz2H
|
||||
clVhr8XxqlgaZFHos2etV/H3MDabY6IMTdwWOv4CP7N77+eJu8TPOfzbsYv/CnwC78RR
|
||||
TIKMG7nK2XR0zJtxMkANNFduuNysv376xmaBLB83tJuKDY3bLvojBX+58mM3ebT4pPyD
|
||||
7sfQ==
|
||||
X-Gm-Message-State: APzg51ANQPVOFbZPLMacirZdgZ298uzOkAJhfBNgbgq6OK+DDHULL1Uh
|
||||
8q0GLuzZeY2eYX+Xn29czper
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdY+YL+272sxvYeYxwuGJDW6P6/Y/3lJAb3pIhIsB8QKeqbJX/Nis0AJl0X6UUBDBYgnww6LFA==
|
||||
X-Received: by 2002:a65:5284:: with SMTP id
|
||||
y4-v6mr23235056pgp.283.1536592475955;
|
||||
Mon, 10 Sep 2018 08:14:35 -0700 (PDT)
|
||||
Received: from localhost.localdomain
|
||||
([2405:204:728c:6bba:60a8:6c40:2817:7ee1])
|
||||
by smtp.gmail.com with ESMTPSA id e202-v6sm26703907pfh.16.2018.09.10.08.14.28
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Mon, 10 Sep 2018 08:14:35 -0700 (PDT)
|
||||
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Date: Mon, 10 Sep 2018 20:43:54 +0530
|
||||
To: heiko@sntech.de,
|
||||
robh+dt@kernel.org
|
||||
Subject: [PATCH 2/4] dt-bindings: arm: rockchip: Add binding for Rock960 board
|
||||
Date: Mon, 10 Sep 2018 20:43:54 +0530
|
||||
Message-Id: <20180910151356.25946-3-manivannan.sadhasivam@linaro.org>
|
||||
X-Mailer: git-send-email 2.17.1
|
||||
In-Reply-To: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
References: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180910_081446_721758_4D036032
|
||||
X-CRM114-Status: GOOD ( 10.68 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
|
||||
tom@vamrs.com, amit.kucheria@linaro.org, shawn.lin@rock-chips.com,
|
||||
linux-kernel@vger.kernel.org, vicencb@gmail.com, dev@vamrs.com,
|
||||
linux-rockchip@lists.infradead.org, pbrobinson@gmail.com,
|
||||
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
|
||||
enric.balletbo@collabora.com, ezequiel@collabora.com, stephen@vamrs.com
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
Add devicetree binding for Rock960 board from Vamrs Limited.
|
||||
|
||||
|
@ -977,7 +1209,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
|||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
index d46c5d43e27f..4ed03f7e8eb2 100644
|
||||
index acfd3c773dd0..aaad9e2ff9a3 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
|
||||
@@ -5,6 +5,10 @@ Rockchip platforms device tree bindings
|
||||
|
@ -991,20 +1223,134 @@ index d46c5d43e27f..4ed03f7e8eb2 100644
|
|||
- Amarula Vyasa RK3288 board
|
||||
Required root node properties:
|
||||
- compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From d7c58c9061b4aee405e328d1c8a60850605aac94 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Mon, 10 Sep 2018 18:26:45 +0100
|
||||
From patchwork Mon Sep 10 15:13:55 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Manivannan Sadhasivam
|
||||
<manivannan.sadhasivam@linaro.org>
|
||||
X-Patchwork-Id: 10594437
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5454714BD
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:17:33 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4324E28C53
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:17:33 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 3684A28EEA; Mon, 10 Sep 2018 15:17:33 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9562128C53
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:17:32 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=BlDZBHjhu66Mc2lMpXjbsv/4KpMpcTJgc9cuw0S3bQA=; b=JDfI6kvhr48gipdHeSTE7tPcUN
|
||||
q5lSDa1z6DWLELD32uQ9dLmn8et3RT9krsAn+kJh1vBLmqlo5ciSIGC9Wl6qwNCskWn/zFietv0Bm
|
||||
S+rDQncYZNJDSrASyv6gUpgjsQJOCcthqBseEX6O0zKSreyf2RX9BppBryBPINHPL6eG55Ard4Ort
|
||||
fG6lSQajVnhRe3B/BdWo2v+j3+MAQixs8Z0udQ5rxCY7lY2jbcs2DPFxb9fkNKWCZZvPbMZ4CG1Z8
|
||||
vCppSQoomPOfjp58Dvbxyc+DkNiGm8WccccSZkU7WRut/dZ5KsaFLNzTQFmDN226xo3+/5tp8imFM
|
||||
gnrQk3Rw==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNwI-0001tm-2P; Mon, 10 Sep 2018 15:17:22 +0000
|
||||
Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNtu-0007xY-Os
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 15:14:56 +0000
|
||||
Received: by mail-pl1-x644.google.com with SMTP id g2-v6so8931123plo.2
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 10 Sep 2018 08:14:44 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
|
||||
h=from:to:cc:subject:date:message-id:in-reply-to:references;
|
||||
bh=znfZBHVDWIral+xe0reTBGcJ7dk9ivMDjn8uEGJfcT8=;
|
||||
b=Al3A4xuT8zmMMUoHO2mMDnqXf7kGCK9hCVkQJSQZFZzcSy+jmsteTH3xgr6KchUnj1
|
||||
2j1TY1/JwFbt7AnCtLEHEsqI81Ish0NmRq1zZTjIu9xkJ9SgOxdf5wBa3TGzYWZoukb+
|
||||
CKfaB4Fv5Gj/U4qLXVxDT6wTw7vhRDNz1ZsRQ=
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=znfZBHVDWIral+xe0reTBGcJ7dk9ivMDjn8uEGJfcT8=;
|
||||
b=pHwar4aOiw/cjrOxYMYxMuQ65Xs/Y2e9eqLAbhpyq3aMtSWES8sUya9sJf1/NA1FAN
|
||||
hLN94KSswIBrhHJIpTU73ntZwVPGSkj5m3kcOaL5+hqSAmG5Mze15d4Pe0mT1fUp5zSd
|
||||
tEv9erBdk11fJB7WR0TnG8JjDrFz9WitioFWAzA9qy9dtDH3w9bgoBYOXJbHQ/4LccFv
|
||||
tG5llBmw3VAaqQIj2CKTEOKUpYYhk2D+5V5tZ1/Hhx8Oeb7NBd0nAWRsUb5m1c6loXR2
|
||||
wxMPnk0flXzPiGH05Tn/PGLXOM0VY9NY5xljC0DBDmeziPPWjvlpxdJsYRTAqL8EiokC
|
||||
KXdw==
|
||||
X-Gm-Message-State: APzg51BkoY23CtrZPfldJhpIX8f8btFYkNpT825jAOFcY6CP1Pbqsx+W
|
||||
jmGEBdg90S9M/H0OWl3Lo+e0OsI2UQ==
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdZ0RhAKUx7fA0XxuM8dKFymYLSLzCbRGtKYFlZfvEfM0z2IIetkAoJZsjfgCiGmtZMwRvEVuA==
|
||||
X-Received: by 2002:a17:902:740a:: with SMTP id
|
||||
g10-v6mr22947347pll.22.1536592483495;
|
||||
Mon, 10 Sep 2018 08:14:43 -0700 (PDT)
|
||||
Received: from localhost.localdomain
|
||||
([2405:204:728c:6bba:60a8:6c40:2817:7ee1])
|
||||
by smtp.gmail.com with ESMTPSA id e202-v6sm26703907pfh.16.2018.09.10.08.14.36
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Mon, 10 Sep 2018 08:14:42 -0700 (PDT)
|
||||
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
To: heiko@sntech.de,
|
||||
robh+dt@kernel.org
|
||||
Subject: [PATCH 3/4] arm64: boot: dts: rockchip: Add support for Rock960 board
|
||||
Date: Mon, 10 Sep 2018 20:43:55 +0530
|
||||
Message-Id: <20180910151356.25946-4-manivannan.sadhasivam@linaro.org>
|
||||
X-Mailer: git-send-email 2.17.1
|
||||
In-Reply-To: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
References: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180910_081454_819186_85F98455
|
||||
X-CRM114-Status: GOOD ( 16.37 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
|
||||
tom@vamrs.com, amit.kucheria@linaro.org, shawn.lin@rock-chips.com,
|
||||
linux-kernel@vger.kernel.org, vicencb@gmail.com, dev@vamrs.com,
|
||||
linux-rockchip@lists.infradead.org, pbrobinson@gmail.com,
|
||||
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
|
||||
enric.balletbo@collabora.com, ezequiel@collabora.com, stephen@vamrs.com
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
Add devicetree support for Rock960 board, one of the Consumer Edition
|
||||
boards of the 96Boards family. This board support utilizes the common
|
||||
Rock960 family board support that includes Ficus 96Board.
|
||||
|
||||
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3399-rock960.dts | 139 ++++++++++++++++++
|
||||
|
@ -1012,11 +1358,11 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 2811fb701f12..458cce9e1a05 100644
|
||||
index b0092d95b574..57c0d76458e6 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -13,5 +13,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ficus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
|
||||
@@ -14,5 +14,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
|
||||
|
@ -1167,14 +1513,129 @@ index 000000000000..281f3d79b38e
|
|||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
--
|
||||
2.19.0.rc1
|
||||
|
||||
From defb2d89461057066a7d233a3072010da24d774c Mon Sep 17 00:00:00 2001
|
||||
From patchwork Mon Sep 10 15:13:56 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Manivannan Sadhasivam
|
||||
<manivannan.sadhasivam@linaro.org>
|
||||
X-Patchwork-Id: 10594441
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C84E921
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:18:21 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8B81290E9
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:18:16 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 9B4C2291F9; Mon, 10 Sep 2018 15:18:16 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A283290E9
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 10 Sep 2018 15:18:16 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=0ikSWm9Ew4+OM0qaBWpLR7/qrsx402HdvOTbCVK6WLs=; b=iYHrXnke7eyKVXuqegTuZU2pVy
|
||||
JOtS+JODGf3O3P3SHSVhr1nAkaq4DAOSy/kjn0O0/SY34a3Z7vQ1tLOWHKLXScDsC9ZnvlhwfBFDM
|
||||
kLOKtlYqB5lpdJtP+vk3bKEcyLIL1gJcAApgWpS4yxEDyqP73S8/2rKjPhRk7A4FtUFhoCNAo6xAv
|
||||
+A6Y5chj5PhQUddQ5FSV4h1uJWQtOICBRj/zGjm0pdHcZ8oMPhicXEfIUTsVA89tKbjr8U6J3bNE8
|
||||
vAgcAmyYOWqOLiw3lrisMlKJLBagNU3M1Q1C5VKEn5TlqnqQ5waYcPAKn8SmKZzh57LMD0yOF0Vi1
|
||||
p17NGt3Q==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNwy-0002B7-RR; Mon, 10 Sep 2018 15:18:04 +0000
|
||||
Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1fzNu3-00081w-2X
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 15:15:06 +0000
|
||||
Received: by mail-pf1-x443.google.com with SMTP id j26-v6so10630033pfi.10
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 10 Sep 2018 08:14:52 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
|
||||
h=from:to:cc:subject:date:message-id:in-reply-to:references;
|
||||
bh=DddfjiWU+nwLV/my5PU24VcyaUhmZjI44x/ThHNh0Tk=;
|
||||
b=PWevnr2Lpw/bnA0HESa9iyVkClbxsJOYPlhP7AmMwy9a6c7eqqnS4kcFuumWD8eDqu
|
||||
5TyPbARtJMbdmXcn+ZyEocjr/nOC+pLcQKBFUQPkfOwz8jVZ5fKgUmR0hiIx0crIxFFy
|
||||
0qfls7qARHP7wRbThv1DW/l1pDMx20fE2zYwQ=
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=DddfjiWU+nwLV/my5PU24VcyaUhmZjI44x/ThHNh0Tk=;
|
||||
b=cFEHSVGuJxHH7AjHGKTEZgKUfsxXK2Q2RwekMwNqTghG134tsp30N/eikGKSuVI1pQ
|
||||
e4zM5JqLDH0yBeEsAxxtiws41SL/1l+mm+9NBylbiDjJ2lU08Vz0LQxhB7E0Y8UnjbX7
|
||||
tuJNFuoFofCBux8/8/2/Bt9oAv26+yQIQnFvSzsvxduxD5ZlfUFI8K06sxlaMNlhwYIL
|
||||
rtps3m0KcFAeYIC+5CKuTMGIlH3XJ9L8xL/VWeell0rpmD1Xp1/tPtxuanBYkRVJjjIu
|
||||
5sUDjfJ+w7uGwlSHBwYz/1DejPm7t3NZCHINwqx1Olwb8gInYbU7htJdtSwkxRanStos
|
||||
JzdQ==
|
||||
X-Gm-Message-State: APzg51A9iwtgmsDyP+CN23RCS/3YrB6AHMxq22H11ncEe+Dka8pkL1ti
|
||||
zurFCUUzVWuSFn4SpTO/sZVy
|
||||
X-Google-Smtp-Source:
|
||||
ANB0Vda8CeIyNE1qDZp1KonBEUUFJCFFlGslTIiiPJ26+7Ys0yYeOHMxSM8/+E1iSjcD5FMm6WCxkw==
|
||||
X-Received: by 2002:a65:608b:: with SMTP id
|
||||
t11-v6mr23620131pgu.259.1536592491302;
|
||||
Mon, 10 Sep 2018 08:14:51 -0700 (PDT)
|
||||
Received: from localhost.localdomain
|
||||
([2405:204:728c:6bba:60a8:6c40:2817:7ee1])
|
||||
by smtp.gmail.com with ESMTPSA id e202-v6sm26703907pfh.16.2018.09.10.08.14.43
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Mon, 10 Sep 2018 08:14:50 -0700 (PDT)
|
||||
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Date: Mon, 10 Sep 2018 20:43:56 +0530
|
||||
To: heiko@sntech.de,
|
||||
robh+dt@kernel.org
|
||||
Subject: [PATCH 4/4] arm64: dts: rockchip: Enable SD card detection for
|
||||
Rock960 boards
|
||||
Date: Mon, 10 Sep 2018 20:43:56 +0530
|
||||
Message-Id: <20180910151356.25946-5-manivannan.sadhasivam@linaro.org>
|
||||
X-Mailer: git-send-email 2.17.1
|
||||
In-Reply-To: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
References: <20180910151356.25946-1-manivannan.sadhasivam@linaro.org>
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180910_081503_224251_E8EEEA66
|
||||
X-CRM114-Status: GOOD ( 12.06 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
|
||||
tom@vamrs.com, amit.kucheria@linaro.org, shawn.lin@rock-chips.com,
|
||||
linux-kernel@vger.kernel.org, vicencb@gmail.com, dev@vamrs.com,
|
||||
linux-rockchip@lists.infradead.org, pbrobinson@gmail.com,
|
||||
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
|
||||
enric.balletbo@collabora.com, ezequiel@collabora.com, stephen@vamrs.com
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
For proper working of SD cards, let's add the Card Detect GPIO property
|
||||
to the common devicetree for Rock960 family boards.
|
||||
|
@ -1196,8 +1657,6 @@ index 5a5d8e28ef55..f68254831ad9 100644
|
|||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vqmmc-supply = <&vcc_sd>;
|
||||
--
|
||||
2.19.0.rc1
|
||||
From patchwork Tue Oct 16 14:00:20 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,42 +0,0 @@
|
|||
From 6e8bed6a3e2fd6f1e82ea9b1f705bbc82060a2b7 Mon Sep 17 00:00:00 2001
|
||||
From: Rob Clark <robdclark@gmail.com>
|
||||
Date: Tue, 3 Jul 2018 08:14:32 -0400
|
||||
Subject: [PATCH] drm/msm/mdp5: fix missing CTL flush
|
||||
|
||||
f9cb8d8d836e fixed various race conditions with CTL flush, in particular
|
||||
flushing and sending the START signal before encoder state was updated.
|
||||
But it did this a little too well in some cases that don't trigger
|
||||
encoder->enable(), and CTL[n].FLUSH would never be set. When page flips
|
||||
happen it would paper over the bug, since the first plag flip would
|
||||
flush out the state to the hardware.
|
||||
|
||||
The issue could be reproduced with, for example, modetest (without the
|
||||
'-v' argument).
|
||||
|
||||
Fixes: f9cb8d8d836e drm/msm/mdp5: rework CTL START signal handling
|
||||
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
||||
Reviewed-by: Sean Paul <seanpaul@chromium.org>
|
||||
|
||||
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c
|
||||
index 9af94e35f678..fcd44d1d1068 100644
|
||||
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c
|
||||
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c
|
||||
@@ -319,7 +319,17 @@ static int mdp5_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
|
||||
mdp5_cstate->ctl = ctl;
|
||||
mdp5_cstate->pipeline.intf = intf;
|
||||
- mdp5_cstate->defer_start = true;
|
||||
+
|
||||
+ /*
|
||||
+ * This is a bit awkward, but we want to flush the CTL and hit the
|
||||
+ * START bit at most once for an atomic update. In the non-full-
|
||||
+ * modeset case, this is done from crtc->atomic_flush(), but that
|
||||
+ * is too early in the case of full modeset, in which case we
|
||||
+ * defer to encoder->enable(). But we need to *know* whether
|
||||
+ * encoder->enable() will be called to do this:
|
||||
+ */
|
||||
+ if (drm_atomic_crtc_needs_modeset(crtc_state))
|
||||
+ mdp5_cstate->defer_start = true;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
From e1912a821a992f04c258e844d717733de03daeb7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 15 Aug 2018 14:06:45 +0100
|
||||
Subject: [PATCH] arm64: dts: marvell: a3700: reserve ATF memory
|
||||
|
||||
On Marvell Armada 3700, the ARM Trusted Firmware is loaded in RAM at address
|
||||
0x04000000, and can use up to 16MiB (0x01000000).
|
||||
|
||||
As the ATF is responsible for handling PSCI calls (including, but not limited
|
||||
to, system reset management), its memory area should never be overwritten
|
||||
during runtime.
|
||||
|
||||
Declaring a range of reserved memory solves this problem.
|
||||
|
||||
Signed-off-by: Arnaud Ferraris <arnaud.ferraris.external@xxxxxxxxxx>
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
index 3353252d78a0a..2110e7dbc9818 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
@@ -34,6 +34,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ reserved-memory {
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ arm-trusted-firmware@4000000 {
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x04000000 0x0 0x01000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,403 +0,0 @@
|
|||
From be3035e3627d2570de4c2c612ecd095968986437 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Fri, 25 May 2018 21:24:34 +0200
|
||||
Subject: [PATCH 1/4] ARM: bcm2835: Add GET_THROTTLED firmware property
|
||||
|
||||
Recent Raspberry Pi firmware provides a mailbox property to detect
|
||||
under-voltage conditions. Here is the current definition.
|
||||
|
||||
The u32 value returned by the firmware is divided into 2 parts:
|
||||
- lower 16-bits are the live value
|
||||
- upper 16-bits are the history or sticky value
|
||||
|
||||
Bits:
|
||||
0: undervoltage
|
||||
1: arm frequency capped
|
||||
2: currently throttled
|
||||
16: undervoltage has occurred
|
||||
17: arm frequency capped has occurred
|
||||
18: throttling has occurred
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
index 8ee8991aa099a..c4a5c9e9fb478 100644
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -75,6 +75,7 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
|
||||
RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021,
|
||||
RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
|
||||
+ RPI_FIRMWARE_GET_THROTTLED = 0x00030046,
|
||||
RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
|
||||
RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
|
||||
RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
From 3c493c885cf8abf0986c9877875161dfd0a29273 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Fri, 25 May 2018 21:24:35 +0200
|
||||
Subject: [PATCH 2/4] hwmon: Add support for RPi voltage sensor
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently there is no easy way to detect undervoltage conditions on a
|
||||
remote Raspberry Pi. This hwmon driver retrieves the state of the
|
||||
undervoltage sensor via mailbox interface. The handling based on
|
||||
Noralf's modifications to the downstream firmware driver. In case of
|
||||
an undervoltage condition only an entry is written to the kernel log.
|
||||
|
||||
CC: "Noralf Trønnes" <noralf@tronnes.org>
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Guenter Roeck <linux@roeck-us.net>
|
||||
---
|
||||
Documentation/hwmon/raspberrypi-hwmon | 22 ++++
|
||||
drivers/hwmon/Kconfig | 10 ++
|
||||
drivers/hwmon/Makefile | 1 +
|
||||
drivers/hwmon/raspberrypi-hwmon.c | 166 ++++++++++++++++++++++++++
|
||||
4 files changed, 199 insertions(+)
|
||||
create mode 100644 Documentation/hwmon/raspberrypi-hwmon
|
||||
create mode 100644 drivers/hwmon/raspberrypi-hwmon.c
|
||||
|
||||
diff --git a/Documentation/hwmon/raspberrypi-hwmon b/Documentation/hwmon/raspberrypi-hwmon
|
||||
new file mode 100644
|
||||
index 0000000000000..3c92e2cb52d60
|
||||
--- /dev/null
|
||||
+++ b/Documentation/hwmon/raspberrypi-hwmon
|
||||
@@ -0,0 +1,22 @@
|
||||
+Kernel driver raspberrypi-hwmon
|
||||
+===============================
|
||||
+
|
||||
+Supported boards:
|
||||
+ * Raspberry Pi A+ (via GPIO on SoC)
|
||||
+ * Raspberry Pi B+ (via GPIO on SoC)
|
||||
+ * Raspberry Pi 2 B (via GPIO on SoC)
|
||||
+ * Raspberry Pi 3 B (via GPIO on port expander)
|
||||
+ * Raspberry Pi 3 B+ (via PMIC)
|
||||
+
|
||||
+Author: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+
|
||||
+Description
|
||||
+-----------
|
||||
+
|
||||
+This driver periodically polls a mailbox property of the VC4 firmware to detect
|
||||
+undervoltage conditions.
|
||||
+
|
||||
+Sysfs entries
|
||||
+-------------
|
||||
+
|
||||
+in0_lcrit_alarm Undervoltage alarm
|
||||
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
|
||||
index f10840ad465c2..fdaab8229686f 100644
|
||||
--- a/drivers/hwmon/Kconfig
|
||||
+++ b/drivers/hwmon/Kconfig
|
||||
@@ -1298,6 +1298,16 @@ config SENSORS_PWM_FAN
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called pwm-fan.
|
||||
|
||||
+config SENSORS_RASPBERRYPI_HWMON
|
||||
+ tristate "Raspberry Pi voltage monitor"
|
||||
+ depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
|
||||
+ help
|
||||
+ If you say yes here you get support for voltage sensor on the
|
||||
+ Raspberry Pi.
|
||||
+
|
||||
+ This driver can also be built as a module. If so, the module
|
||||
+ will be called raspberrypi-hwmon.
|
||||
+
|
||||
config SENSORS_SHT15
|
||||
tristate "Sensiron humidity and temperature sensors. SHT15 and compat."
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
|
||||
index e7d52a36e6c4f..a9297703fd6e4 100644
|
||||
--- a/drivers/hwmon/Makefile
|
||||
+++ b/drivers/hwmon/Makefile
|
||||
@@ -141,6 +141,7 @@ obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
|
||||
obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
|
||||
obj-$(CONFIG_SENSORS_POWR1220) += powr1220.o
|
||||
obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o
|
||||
+obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o
|
||||
obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o
|
||||
obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o
|
||||
obj-$(CONFIG_SENSORS_SCH5627) += sch5627.o
|
||||
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
|
||||
new file mode 100644
|
||||
index 0000000000000..fb4e4a6bb1f63
|
||||
--- /dev/null
|
||||
+++ b/drivers/hwmon/raspberrypi-hwmon.c
|
||||
@@ -0,0 +1,166 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Raspberry Pi voltage sensor driver
|
||||
+ *
|
||||
+ * Based on firmware/raspberrypi.c by Noralf Trønnes
|
||||
+ *
|
||||
+ * Copyright (C) 2018 Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ */
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/hwmon.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/workqueue.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
+#define UNDERVOLTAGE_STICKY_BIT BIT(16)
|
||||
+
|
||||
+struct rpi_hwmon_data {
|
||||
+ struct device *hwmon_dev;
|
||||
+ struct rpi_firmware *fw;
|
||||
+ u32 last_throttled;
|
||||
+ struct delayed_work get_values_poll_work;
|
||||
+};
|
||||
+
|
||||
+static void rpi_firmware_get_throttled(struct rpi_hwmon_data *data)
|
||||
+{
|
||||
+ u32 new_uv, old_uv, value;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Request firmware to clear sticky bits */
|
||||
+ value = 0xffff;
|
||||
+
|
||||
+ ret = rpi_firmware_property(data->fw, RPI_FIRMWARE_GET_THROTTLED,
|
||||
+ &value, sizeof(value));
|
||||
+ if (ret) {
|
||||
+ dev_err_once(data->hwmon_dev, "Failed to get throttled (%d)\n",
|
||||
+ ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ new_uv = value & UNDERVOLTAGE_STICKY_BIT;
|
||||
+ old_uv = data->last_throttled & UNDERVOLTAGE_STICKY_BIT;
|
||||
+ data->last_throttled = value;
|
||||
+
|
||||
+ if (new_uv == old_uv)
|
||||
+ return;
|
||||
+
|
||||
+ if (new_uv)
|
||||
+ dev_crit(data->hwmon_dev, "Undervoltage detected!\n");
|
||||
+ else
|
||||
+ dev_info(data->hwmon_dev, "Voltage normalised\n");
|
||||
+
|
||||
+ sysfs_notify(&data->hwmon_dev->kobj, NULL, "in0_lcrit_alarm");
|
||||
+}
|
||||
+
|
||||
+static void get_values_poll(struct work_struct *work)
|
||||
+{
|
||||
+ struct rpi_hwmon_data *data;
|
||||
+
|
||||
+ data = container_of(work, struct rpi_hwmon_data,
|
||||
+ get_values_poll_work.work);
|
||||
+
|
||||
+ rpi_firmware_get_throttled(data);
|
||||
+
|
||||
+ /*
|
||||
+ * We can't run faster than the sticky shift (100ms) since we get
|
||||
+ * flipping in the sticky bits that are cleared.
|
||||
+ */
|
||||
+ schedule_delayed_work(&data->get_values_poll_work, 2 * HZ);
|
||||
+}
|
||||
+
|
||||
+static int rpi_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
+ u32 attr, int channel, long *val)
|
||||
+{
|
||||
+ struct rpi_hwmon_data *data = dev_get_drvdata(dev);
|
||||
+
|
||||
+ *val = !!(data->last_throttled & UNDERVOLTAGE_STICKY_BIT);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type,
|
||||
+ u32 attr, int channel)
|
||||
+{
|
||||
+ return 0444;
|
||||
+}
|
||||
+
|
||||
+static const u32 rpi_in_config[] = {
|
||||
+ HWMON_I_LCRIT_ALARM,
|
||||
+ 0
|
||||
+};
|
||||
+
|
||||
+static const struct hwmon_channel_info rpi_in = {
|
||||
+ .type = hwmon_in,
|
||||
+ .config = rpi_in_config,
|
||||
+};
|
||||
+
|
||||
+static const struct hwmon_channel_info *rpi_info[] = {
|
||||
+ &rpi_in,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+static const struct hwmon_ops rpi_hwmon_ops = {
|
||||
+ .is_visible = rpi_is_visible,
|
||||
+ .read = rpi_read,
|
||||
+};
|
||||
+
|
||||
+static const struct hwmon_chip_info rpi_chip_info = {
|
||||
+ .ops = &rpi_hwmon_ops,
|
||||
+ .info = rpi_info,
|
||||
+};
|
||||
+
|
||||
+static int rpi_hwmon_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct rpi_hwmon_data *data;
|
||||
+ int ret;
|
||||
+
|
||||
+ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
|
||||
+ if (!data)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ /* Parent driver assure that firmware is correct */
|
||||
+ data->fw = dev_get_drvdata(dev->parent);
|
||||
+
|
||||
+ /* Init throttled */
|
||||
+ ret = rpi_firmware_property(data->fw, RPI_FIRMWARE_GET_THROTTLED,
|
||||
+ &data->last_throttled,
|
||||
+ sizeof(data->last_throttled));
|
||||
+
|
||||
+ data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "rpi_volt",
|
||||
+ data,
|
||||
+ &rpi_chip_info,
|
||||
+ NULL);
|
||||
+
|
||||
+ INIT_DELAYED_WORK(&data->get_values_poll_work, get_values_poll);
|
||||
+ platform_set_drvdata(pdev, data);
|
||||
+
|
||||
+ if (!PTR_ERR_OR_ZERO(data->hwmon_dev))
|
||||
+ schedule_delayed_work(&data->get_values_poll_work, 2 * HZ);
|
||||
+
|
||||
+ return PTR_ERR_OR_ZERO(data->hwmon_dev);
|
||||
+}
|
||||
+
|
||||
+static int rpi_hwmon_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct rpi_hwmon_data *data = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ cancel_delayed_work_sync(&data->get_values_poll_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver rpi_hwmon_driver = {
|
||||
+ .probe = rpi_hwmon_probe,
|
||||
+ .remove = rpi_hwmon_remove,
|
||||
+ .driver = {
|
||||
+ .name = "raspberrypi-hwmon",
|
||||
+ },
|
||||
+};
|
||||
+module_platform_driver(rpi_hwmon_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
|
||||
+MODULE_DESCRIPTION("Raspberry Pi voltage sensor driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.17.1
|
||||
|
||||
From 4ebe8673279b7afbbcbcf92094c9012a3c91f240 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Fri, 25 May 2018 21:24:36 +0200
|
||||
Subject: [PATCH 3/4] firmware: raspberrypi: Register hwmon driver
|
||||
|
||||
Since the raspberrypi-hwmon driver is tied to the VC4 firmware instead of
|
||||
particular hardware its registration should be in the firmware driver.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/firmware/raspberrypi.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
|
||||
index 6692888f04cfb..0602626bf72d0 100644
|
||||
--- a/drivers/firmware/raspberrypi.c
|
||||
+++ b/drivers/firmware/raspberrypi.c
|
||||
@@ -21,6 +21,8 @@
|
||||
#define MBOX_DATA28(msg) ((msg) & ~0xf)
|
||||
#define MBOX_CHAN_PROPERTY 8
|
||||
|
||||
+static struct platform_device *rpi_hwmon;
|
||||
+
|
||||
struct rpi_firmware {
|
||||
struct mbox_client cl;
|
||||
struct mbox_chan *chan; /* The property channel. */
|
||||
@@ -183,6 +185,20 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+rpi_register_hwmon_driver(struct device *dev, struct rpi_firmware *fw)
|
||||
+{
|
||||
+ u32 packet;
|
||||
+ int ret = rpi_firmware_property(fw, RPI_FIRMWARE_GET_THROTTLED,
|
||||
+ &packet, sizeof(packet));
|
||||
+
|
||||
+ if (ret)
|
||||
+ return;
|
||||
+
|
||||
+ rpi_hwmon = platform_device_register_data(dev, "raspberrypi-hwmon",
|
||||
+ -1, NULL, 0);
|
||||
+}
|
||||
+
|
||||
static int rpi_firmware_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -209,6 +225,7 @@ static int rpi_firmware_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, fw);
|
||||
|
||||
rpi_firmware_print_firmware_revision(fw);
|
||||
+ rpi_register_hwmon_driver(dev, fw);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -217,6 +234,8 @@ static int rpi_firmware_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rpi_firmware *fw = platform_get_drvdata(pdev);
|
||||
|
||||
+ platform_device_unregister(rpi_hwmon);
|
||||
+ rpi_hwmon = NULL;
|
||||
mbox_free_channel(fw->chan);
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
From a0cf7704b6bc145a9f198a9b2bcf92ccc5d6b6be Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Fri, 20 Jul 2018 12:58:37 +0100
|
||||
Subject: [PATCH] hwmon: rpi: add module alias to raspberrypi-hwmon
|
||||
|
||||
The raspberrypi-hwmon driver doesn't automatically load, although it does work
|
||||
when loaded, by adding the alias it auto loads as expected when built as a
|
||||
module. Tested on RPi2/RPi3 on 32 bit kernel and RPi3B+ on aarch64 with
|
||||
Fedora 28 and a patched 4.18 RC kernel.
|
||||
|
||||
Fixes: q3c493c885cf ("hwmon: Add support for RPi voltage sensor")
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
CC: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
CC: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/hwmon/raspberrypi-hwmon.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
|
||||
index fb4e4a6bb1f63..be5ba46908953 100644
|
||||
--- a/drivers/hwmon/raspberrypi-hwmon.c
|
||||
+++ b/drivers/hwmon/raspberrypi-hwmon.c
|
||||
@@ -164,3 +164,4 @@ module_platform_driver(rpi_hwmon_driver);
|
||||
MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
|
||||
MODULE_DESCRIPTION("Raspberry Pi voltage sensor driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
+MODULE_ALIAS("platform:raspberrypi-hwmon");
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 26611da3961755795d58595851eec350e75ae0e7 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Mon, 21 May 2018 11:39:07 -0700
|
||||
Subject: arm: bcm2835: Add the PMU to the devicetree.
|
||||
|
||||
This only probes on arm64 so far, but hopefully that driver will be
|
||||
generalized soon.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2837.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
index 7704bb0..beb6c50 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
@@ -17,6 +17,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ arm-pmu {
|
||||
+ compatible = "arm,cortex-a53-pmu";
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+
|
||||
timer {
|
||||
compatible = "arm,armv7-timer";
|
||||
interrupt-parent = <&local_intc>;
|
||||
--
|
||||
cgit v1.1
|
|
@ -15,8 +15,6 @@ x86_64-debug=generic:generic-x86:generic-x86-x86_64:debug:debug-x86:debug-x86-x8
|
|||
# i686
|
||||
i686=generic:generic-x86:generic-x86-i686
|
||||
i686-debug=generic:generic-x86:generic-x86-i686:debug:debug-x86
|
||||
i686-PAE=generic:generic-x86:generic-x86-i686PAE
|
||||
i686-PAEdebug=generic:generic-x86:generic-x86-i686PAE:debug:debug-x86
|
||||
|
||||
# ppc64le
|
||||
ppc64le=generic:generic-powerpc:generic-powerpc-powerpc64le
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
CONFIG_IOMMU_DEBUGFS=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5758 is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AFS_DEBUG=y
|
|
@ -1 +1 @@
|
|||
# CONFIG_AFS_FS is not set
|
||||
CONFIG_AFS_FS=m
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AFS_FSCACHE=y
|
|
@ -1 +1 @@
|
|||
# CONFIG_AF_RXRPC is not set
|
||||
CONFIG_AF_RXRPC=m
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AF_RXRPC_DEBUG=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AF_RXRPC_IPV6=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AMD_IOMMU_DEBUGFS is not set
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_BCM2835_VCHIQ is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BE2NET_BE2=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BE2NET_BE3=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BE2NET_LANCER=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BE2NET_SKYHAWK=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_BME680 is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BNXT_HWMON=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_BT_HCIUART_RTL is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_BT_MTKUART is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_CAN_UCAN is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_CHARGER_ADP5061 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_CHARGER_CROS_USBPD is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_CHARGER_MANAGER is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_COMMON_CLK_AXG_AUDIO is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_COMMON_CLK_MAX9485 is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_CRC64=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_CRYPTO_DEV_HISI_SEC is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_DRM_DP_CEC is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_DRM_VKMS is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_EROFS_FS is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_FPGA_DFL is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_FSI_NEW_DEV_NODE is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_FSI_SBEFIFO is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_GNSS is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_HID_COUGAR=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_I2C_FSI is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_I2C_QCOM_GENI is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_IDLE_INJECT is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_IEEE802154_HWSIM is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_INPUT_REGULATOR_HAPTIC=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_IOMMU_DEBUGFS is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ISL29501 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_KERNEL_UNCOMPRESSED is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MFD_MADERA is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MFD_ROHM_BD718XX is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_MLX5_EN_ARFS=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_MLX5_EN_RXNFC=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_MLXREG_IO=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_MT76x0U=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_MT76x2U=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MTD_NAND_TEGRA is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MTD_SPI_NAND is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_MUX_ADGS1408 is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_NETFILTER_NETLINK_OSF=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_NET_DSA_REALTEK_SMI is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_NET_DSA_VITESSE_VSC73XX is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_NET_SCH_CAKE is not set
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue