diff --git a/.gitignore b/.gitignore index 93aa862ec..12d63e1fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,2 @@ -clog *.xz *.bz2 -*.rpm -*.orig -*.sign -kernel-[234].*/ -perf-man-*.tar.gz diff --git a/0001-Make-get_cert_list-not-complain-about-cert-lists-tha.patch b/0001-Make-get_cert_list-not-complain-about-cert-lists-tha.patch deleted file mode 100644 index 6e8a2e039..000000000 --- a/0001-Make-get_cert_list-not-complain-about-cert-lists-tha.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 3ce5852ec6add45a28fe1706e9163351940e905c Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 2 Oct 2017 18:25:29 -0400 -Subject: [PATCH 1/3] Make get_cert_list() not complain about cert lists that - aren't present. - -Signed-off-by: Peter Jones ---- - certs/load_uefi.c | 37 ++++++++++++++++++++++--------------- - 1 file changed, 22 insertions(+), 15 deletions(-) - -diff --git a/certs/load_uefi.c b/certs/load_uefi.c -index 3d884598601..9ef34c44fd1 100644 ---- a/certs/load_uefi.c -+++ b/certs/load_uefi.c -@@ -35,8 +35,8 @@ static __init bool uefi_check_ignore_db(void) - /* - * Get a certificate list blob from the named EFI variable. - */ --static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, -- unsigned long *size) -+static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid, -+ unsigned long *size, void **cert_list) - { - efi_status_t status; - unsigned long lsize = 4; -@@ -44,26 +44,33 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, - void *db; - - status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb); -+ if (status == EFI_NOT_FOUND) { -+ *size = 0; -+ *cert_list = NULL; -+ return 0; -+ } -+ - if (status != EFI_BUFFER_TOO_SMALL) { - pr_err("Couldn't get size: 0x%lx\n", status); -- return NULL; -+ return efi_status_to_err(status); - } - - db = kmalloc(lsize, GFP_KERNEL); - if (!db) { - pr_err("Couldn't allocate memory for uefi cert list\n"); -- return NULL; -+ return -ENOMEM; - } - - status = efi.get_variable(name, guid, NULL, &lsize, db); - if (status != EFI_SUCCESS) { - kfree(db); - pr_err("Error reading db var: 0x%lx\n", status); -- return NULL; -+ return efi_status_to_err(status); - } - - *size = lsize; -- return db; -+ *cert_list = db; -+ return 0; - } - - /* -@@ -152,10 +159,10 @@ static int __init load_uefi_certs(void) - * an error if we can't get them. - */ - if (!uefi_check_ignore_db()) { -- db = get_cert_list(L"db", &secure_var, &dbsize); -- if (!db) { -+ rc = get_cert_list(L"db", &secure_var, &dbsize, &db); -+ if (rc < 0) { - pr_err("MODSIGN: Couldn't get UEFI db list\n"); -- } else { -+ } else if (dbsize != 0) { - rc = parse_efi_signature_list("UEFI:db", - db, dbsize, get_handler_for_db); - if (rc) -@@ -164,10 +171,10 @@ static int __init load_uefi_certs(void) - } - } - -- mok = get_cert_list(L"MokListRT", &mok_var, &moksize); -- if (!mok) { -+ rc = get_cert_list(L"MokListRT", &mok_var, &moksize, &mok); -+ if (rc < 0) { - pr_info("MODSIGN: Couldn't get UEFI MokListRT\n"); -- } else { -+ } else if (moksize != 0) { - rc = parse_efi_signature_list("UEFI:MokListRT", - mok, moksize, get_handler_for_db); - if (rc) -@@ -175,10 +182,10 @@ static int __init load_uefi_certs(void) - kfree(mok); - } - -- dbx = get_cert_list(L"dbx", &secure_var, &dbxsize); -- if (!dbx) { -+ rc = get_cert_list(L"dbx", &secure_var, &dbxsize, &dbx); -+ if (rc < 0) { - pr_info("MODSIGN: Couldn't get UEFI dbx list\n"); -- } else { -+ } else if (dbxsize != 0) { - rc = parse_efi_signature_list("UEFI:dbx", - dbx, dbxsize, - get_handler_for_dbx); --- -2.15.0 - diff --git a/0001-iio-Use-event-header-from-kernel-tree.patch b/0001-iio-Use-event-header-from-kernel-tree.patch deleted file mode 100644 index 1724db3fd..000000000 --- a/0001-iio-Use-event-header-from-kernel-tree.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Fri, 9 Sep 2016 08:19:17 -0700 -Subject: [PATCH] iio: Use type header from kernel tree -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -To: Jonathan Cameron -To: Hartmut Knaack -To: Lars-Peter Clausen -To: Peter Meerwald-Stadler -Cc: linux-iio@vger.kernel.org -Cc: linux-kernel@vger.kernel.org - - -The iio tools have been updated as new event types have been added to -the kernel. The tools currently use the standard system headers which -means that the system may not have the newest defintitions. This leads -to build failures when building newer tools on older hosts: - -gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o -iio_event_monitor.c -iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a -function) - [IIO_UVINDEX] = "uvindex", - ^~~~~~~~~~~ -iio_event_monitor.c:59:3: error: array index in initializer not of -integer type -iio_event_monitor.c:59:3: note: (near initialization for -‘iio_chan_type_name_spec’) -iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not -in a function) - [IIO_MOD_LIGHT_UV] = "uv", - ^~~~~~~~~~~~~~~~ -iio_event_monitor.c:97:3: error: array index in initializer not of -integer type -iio_event_monitor.c:97:3: note: (near initialization for -‘iio_modifier_names’) -: recipe for target 'iio_event_monitor.o' failed - -Switch to using the header from the kernel tree to ensure the newest -defintions are always picked up. - -Signed-off-by: Laura Abbott ---- - tools/iio/iio_event_monitor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c -index d9b7e0f..f02523d 100644 ---- a/tools/iio/iio_event_monitor.c -+++ b/tools/iio/iio_event_monitor.c -@@ -26,7 +26,7 @@ - #include - #include "iio_utils.h" - #include --#include -+#include "../../include/uapi/linux/iio/types.h" - - static const char * const iio_chan_type_name_spec[] = { - [IIO_VOLTAGE] = "voltage", --- -2.7.4 - diff --git a/0001-kbuild-Add-build-salt-to-the-kernel-and-modules.patch b/0001-kbuild-Add-build-salt-to-the-kernel-and-modules.patch deleted file mode 100644 index 1c0b1ab2e..000000000 --- a/0001-kbuild-Add-build-salt-to-the-kernel-and-modules.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 25d3cf21987c752240df03c050593621ed2bd3a3 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -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 -To: mjw@fedoraproject.org -Cc: Linus Torvalds -To: H. J. Lu -Cc: X86 ML -Cc: linux-kernel@vger.kernel.org -To: Masahiro Yamada -Cc: Nick Clifton -Cc: Cary Coutant -Cc: linux-kbuild@vger.kernel.org -Cc: linuxppc-dev@lists.ozlabs.org -To: Michael Ellerman -To: Catalin Marinas -To: Will Deacon -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 -Signed-off-by: Laura Abbott ---- -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 -+ -+#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 -+#include - #include - #include - #include -@@ -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 \n"); - buf_printf(b, "#include \n"); - buf_printf(b, "#include \n"); - buf_printf(b, "#include \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 - diff --git a/0001-platform-x86-dell-laptop-Filter-out-spurious-keyboar.patch b/0001-platform-x86-dell-laptop-Filter-out-spurious-keyboar.patch deleted file mode 100644 index 926487b3d..000000000 --- a/0001-platform-x86-dell-laptop-Filter-out-spurious-keyboar.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 714fe15daa07e7691c9731c88de71aa57f84b6c2 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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 ---- - 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 - diff --git a/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch b/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch deleted file mode 100644 index 548bd4bbb..000000000 --- a/0001-printk-Make-CONSOLE_LOGLEVEL_QUIET-configurable.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 79bfd044ed82290603093be1a3759672176f3e6f Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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) -Signed-off-by: Hans de Goede ---- - 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=" -+ - config MESSAGE_LOGLEVEL_DEFAULT - int "Default message log level (1-7)" - range 1 7 --- -2.18.0 - diff --git a/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch b/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch deleted file mode 100644 index 37c0f041e..000000000 --- a/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 85721e6bfc5da3c8f7971c4acb1a0ad16fb2c16a Mon Sep 17 00:00:00 2001 -From: Sergey Senozhatsky -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 -Cc: Arnaldo Carvalho de Melo -Signed-off-by: Andrew Morton -Signed-off-by: Stephen Rothwell ---- - 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 - diff --git a/0002-Add-efi_status_to_str-and-rework-efi_status_to_err.patch b/0002-Add-efi_status_to_str-and-rework-efi_status_to_err.patch deleted file mode 100644 index 0844550b6..000000000 --- a/0002-Add-efi_status_to_str-and-rework-efi_status_to_err.patch +++ /dev/null @@ -1,183 +0,0 @@ -From c8218e9b3c38fcd36a2d06eec09952a0c6cee9e0 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 2 Oct 2017 18:22:13 -0400 -Subject: [PATCH 2/3] Add efi_status_to_str() and rework efi_status_to_err(). - -This adds efi_status_to_str() for use when printing efi_status_t -messages, and reworks efi_status_to_err() so that the two use a common -list of errors. - -Signed-off-by: Peter Jones ---- - include/linux/efi.h | 3 ++ - drivers/firmware/efi/efi.c | 122 ++++++++++++++++++++++++++++++++++----------- - 2 files changed, 95 insertions(+), 30 deletions(-) - -diff --git a/include/linux/efi.h b/include/linux/efi.h -index 18b16bf5ce1..436b3c93c3d 100644 ---- a/include/linux/efi.h -+++ b/include/linux/efi.h -@@ -42,6 +42,8 @@ - #define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1))) - #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1))) - -+#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1))) -+ - typedef unsigned long efi_status_t; - typedef u8 efi_bool_t; - typedef u16 efi_char16_t; /* UNICODE character */ -@@ -1183,6 +1185,7 @@ static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {} - #endif - - extern int efi_status_to_err(efi_status_t status); -+extern const char *efi_status_to_str(efi_status_t status); - - /* - * Variable Attributes -diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index 557a47829d0..e8f9c7d84e9 100644 ---- a/drivers/firmware/efi/efi.c -+++ b/drivers/firmware/efi/efi.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - - #include - -@@ -865,40 +866,101 @@ int efi_mem_type(unsigned long phys_addr) - } - #endif - -+struct efi_error_code { -+ efi_status_t status; -+ int errno; -+ const char *description; -+}; -+ -+static const struct efi_error_code efi_error_codes[] = { -+ { EFI_SUCCESS, 0, "Success"}, -+#if 0 -+ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"}, -+#endif -+ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"}, -+ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"}, -+ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"}, -+ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"}, -+ { EFI_NOT_READY, -EAGAIN, "Not Ready"}, -+ { EFI_DEVICE_ERROR, -EIO, "Device Error"}, -+ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"}, -+ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"}, -+#if 0 -+ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"}, -+ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"}, -+ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"}, -+ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"}, -+#endif -+ { EFI_NOT_FOUND, -ENOENT, "Not Found"}, -+#if 0 -+ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"}, -+ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"}, -+ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"}, -+ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"}, -+ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"}, -+ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"}, -+#endif -+ { EFI_ABORTED, -EINTR, "Aborted"}, -+#if 0 -+ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"}, -+ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"}, -+ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"}, -+ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"}, -+#endif -+ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"}, -+#if 0 -+ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"}, -+ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"}, -+ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"}, -+ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"}, -+ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"}, -+ -+ // warnings -+ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"}, -+ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"}, -+ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"}, -+ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"}, -+#endif -+}; -+ -+static int -+efi_status_cmp_bsearch(const void *key, const void *item) -+{ -+ u64 status = (u64)(uintptr_t)key; -+ struct efi_error_code *code = (struct efi_error_code *)item; -+ -+ if (status < code->status) -+ return -1; -+ if (status > code->status) -+ return 1; -+ return 0; -+} -+ - int efi_status_to_err(efi_status_t status) - { -- int err; -+ struct efi_error_code *found; -+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); - -- switch (status) { -- case EFI_SUCCESS: -- err = 0; -- break; -- case EFI_INVALID_PARAMETER: -- err = -EINVAL; -- break; -- case EFI_OUT_OF_RESOURCES: -- err = -ENOSPC; -- break; -- case EFI_DEVICE_ERROR: -- err = -EIO; -- break; -- case EFI_WRITE_PROTECTED: -- err = -EROFS; -- break; -- case EFI_SECURITY_VIOLATION: -- err = -EACCES; -- break; -- case EFI_NOT_FOUND: -- err = -ENOENT; -- break; -- case EFI_ABORTED: -- err = -EINTR; -- break; -- default: -- err = -EINVAL; -- } -+ found = bsearch((void *)(uintptr_t)status, efi_error_codes, -+ sizeof(struct efi_error_code), num, -+ efi_status_cmp_bsearch); -+ if (!found) -+ return -EINVAL; -+ return found->errno; -+} - -- return err; -+const char * -+efi_status_to_str(efi_status_t status) -+{ -+ struct efi_error_code *found; -+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); -+ -+ found = bsearch((void *)(uintptr_t)status, efi_error_codes, -+ sizeof(struct efi_error_code), num, -+ efi_status_cmp_bsearch); -+ if (!found) -+ return "Unknown error code"; -+ return found->description; - } - - bool efi_is_table_address(unsigned long phys_addr) --- -2.15.0 - diff --git a/0002-printk-Export-is_console_locked.patch b/0002-printk-Export-is_console_locked.patch deleted file mode 100644 index aad37308d..000000000 --- a/0002-printk-Export-is_console_locked.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d48de54a9dab5370edd2e991f78cc7996cf5483e Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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) -Acked-by: Sergey Senozhatsky -Acked-by: Petr Mladek -Reviewed-by: Daniel Vetter -Signed-off-by: Hans de Goede -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - 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 - diff --git a/0002-x86-Add-build-salt-to-the-vDSO.patch b/0002-x86-Add-build-salt-to-the-vDSO.patch deleted file mode 100644 index 2b8a8f2a0..000000000 --- a/0002-x86-Add-build-salt-to-the-vDSO.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 2199e4e9f81bd90ba82fcb8641a1a5911ac9c96b Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Tue, 3 Jul 2018 15:56:14 -0700 -Subject: [PATCHv6 2/4] x86: Add build salt to the vDSO -To: Andy Lutomirski -To: mjw@fedoraproject.org -Cc: Linus Torvalds -To: H. J. Lu -Cc: X86 ML -Cc: linux-kernel@vger.kernel.org -To: Masahiro Yamada -Cc: Nick Clifton -Cc: Cary Coutant -Cc: linux-kbuild@vger.kernel.org -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Michael Ellerman -Cc: Catalin Marinas -Cc: Will Deacon -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 -Signed-off-by: Laura Abbott ---- -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 - #include - #include - #include -@@ -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 - #include - #include - -@@ -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 - diff --git a/0003-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch b/0003-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch deleted file mode 100644 index abb313a29..000000000 --- a/0003-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 520e902d864930e2d4f329983d9ae9781a24231f Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 2 Oct 2017 18:18:30 -0400 -Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print - error messages. - -Signed-off-by: Peter Jones ---- - certs/load_uefi.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/certs/load_uefi.c b/certs/load_uefi.c -index 9ef34c44fd1..13a2826715d 100644 ---- a/certs/load_uefi.c -+++ b/certs/load_uefi.c -@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid, - } - - if (status != EFI_BUFFER_TOO_SMALL) { -- pr_err("Couldn't get size: 0x%lx\n", status); -+ pr_err("Couldn't get size: %s (0x%lx)\n", -+ efi_status_to_str(status), status); - return efi_status_to_err(status); - } - -@@ -64,7 +65,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid, - status = efi.get_variable(name, guid, NULL, &lsize, db); - if (status != EFI_SUCCESS) { - kfree(db); -- pr_err("Error reading db var: 0x%lx\n", status); -+ pr_err("Error reading db var: %s (0x%lx)\n", -+ efi_status_to_str(status), status); - return efi_status_to_err(status); - } - --- -2.15.0 - diff --git a/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch b/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch deleted file mode 100644 index fef33c118..000000000 --- a/0003-fbcon-Call-WARN_CONSOLE_UNLOCKED-where-applicable.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 3bd3a0e330aae4fffa8028aba2407ef615ab040b Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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) -Reviewed-by: Daniel Vetter -Reviewed-by: Sergey Senozhatsky -Signed-off-by: Hans de Goede -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - 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 - diff --git a/0003-powerpc-Add-build-salt-to-the-vDSO.patch b/0003-powerpc-Add-build-salt-to-the-vDSO.patch deleted file mode 100644 index c31176854..000000000 --- a/0003-powerpc-Add-build-salt-to-the-vDSO.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e9bb20873f9dff73fc6f381e32b43f198974ed71 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Tue, 3 Jul 2018 15:59:53 -0700 -Subject: [PATCHv6 3/4] powerpc: Add build salt to the vDSO -Cc: Andy Lutomirski -To: mjw@fedoraproject.org -Cc: Linus Torvalds -To: H. J. Lu -Cc: X86 ML -Cc: linux-kernel@vger.kernel.org -To: Masahiro Yamada -Cc: Nick Clifton -Cc: Cary Coutant -Cc: linux-kbuild@vger.kernel.org -Cc: linuxppc-dev@lists.ozlabs.org -To: Michael Ellerman -Cc: Catalin Marinas -Cc: Will Deacon -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 ---- -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 - #include -+#include - - #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 - diff --git a/0003-treewide-Rename-HOSTCFLAGS-KBUILD_HOSTCFLAGS.patch b/0003-treewide-Rename-HOSTCFLAGS-KBUILD_HOSTCFLAGS.patch deleted file mode 100644 index 504be373d..000000000 --- a/0003-treewide-Rename-HOSTCFLAGS-KBUILD_HOSTCFLAGS.patch +++ /dev/null @@ -1,150 +0,0 @@ -From af0b06e726242516da9df5071e4e058f949f2240 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Thu, 5 Jul 2018 14:39:20 -0700 -Subject: [PATCHv2] treewide: Rename HOSTCFLAGS -> KBUILD_HOSTCFLAGS -To: Masahiro Yamada -To: Josh Poimboeuf -To: Jiri Olsa -Cc: linux-kbuild@vger.kernel.org -Cc: linux-kernel@vger.kernel.org -Cc: Robin Jarry - -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 ---- -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 - diff --git a/0004-arm64-Add-build-salt-to-the-vDSO.patch b/0004-arm64-Add-build-salt-to-the-vDSO.patch deleted file mode 100644 index 48367e79b..000000000 --- a/0004-arm64-Add-build-salt-to-the-vDSO.patch +++ /dev/null @@ -1,49 +0,0 @@ -From de9537aca25d53d9b44e7ec9a9952ebd77d69cd1 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Tue, 3 Jul 2018 16:01:24 -0700 -Subject: [PATCHv6 4/4] arm64: Add build salt to the vDSO -Cc: Andy Lutomirski -To: mjw@fedoraproject.org -Cc: Linus Torvalds -To: H. J. Lu -Cc: X86 ML -Cc: linux-kernel@vger.kernel.org -To: Masahiro Yamada -Cc: Nick Clifton -Cc: Cary Coutant -Cc: linux-kbuild@vger.kernel.org -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Michael Ellerman -To: Catalin Marinas -To: Will Deacon -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 -Signed-off-by: Laura Abbott ---- -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 - #include - #include -+#include - - ELFNOTE_START(Linux, 0, "a") - .long LINUX_VERSION_CODE - ELFNOTE_END -+ -+BUILD_SALT --- -2.17.1 - diff --git a/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch b/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch deleted file mode 100644 index 36d625ef3..000000000 --- a/0004-console-fbcon-Add-support-for-deferred-console-takeo.patch +++ /dev/null @@ -1,322 +0,0 @@ -From 83d83bebf40132e2d55ec58af666713cc76f9764 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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 -Signed-off-by: Hans de Goede -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - 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 - diff --git a/0004-treewide-Rename-HOSTCXXFLAGS-to-KBUILD_HOSTCXXFLAGS.patch b/0004-treewide-Rename-HOSTCXXFLAGS-to-KBUILD_HOSTCXXFLAGS.patch deleted file mode 100644 index f9d5febd7..000000000 --- a/0004-treewide-Rename-HOSTCXXFLAGS-to-KBUILD_HOSTCXXFLAGS.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a6faf06c7da9ea06ca23c3a50215860f5d83b3bd Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Thu, 5 Jul 2018 14:43:37 -0700 -Subject: [PATCHv2 4/7] treewide: Rename HOSTCXXFLAGS to KBUILD_HOSTCXXFLAGS -To: Masahiro Yamada -To: Josh Poimboeuf -To: Jiri Olsa -Cc: linux-kbuild@vger.kernel.org -Cc: linux-kernel@vger.kernel.org -Cc: Robin Jarry - -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 ---- -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 - diff --git a/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch b/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch deleted file mode 100644 index ec1ff7fbc..000000000 --- a/0005-efi-bgrt-Drop-__initdata-from-bgrt_image_size.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 421b8aef3902426c4c3ebd23218c0ad282786e1d Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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 -Signed-off-by: Hans de Goede -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - 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 - - 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 - diff --git a/0005-treewide-Rename-HOSTLDFLAGS-to-KBUILD_HOSTLDFLAGS.patch b/0005-treewide-Rename-HOSTLDFLAGS-to-KBUILD_HOSTLDFLAGS.patch deleted file mode 100644 index e40695033..000000000 --- a/0005-treewide-Rename-HOSTLDFLAGS-to-KBUILD_HOSTLDFLAGS.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 017d1ce33501da9e3e438066d853a874df64f1a5 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Thu, 5 Jul 2018 14:45:52 -0700 -Subject: [PATCHv2 5/7] treewide: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS -To: Masahiro Yamada -To: Josh Poimboeuf -To: Jiri Olsa -Cc: linux-kbuild@vger.kernel.org -Cc: linux-kernel@vger.kernel.org -Cc: Robin Jarry - -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 ---- -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 ' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) --- -2.17.1 - diff --git a/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch b/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch deleted file mode 100644 index 248b34335..000000000 --- a/0006-efifb-Copy-the-ACPI-BGRT-boot-graphics-to-the-frameb.patch +++ /dev/null @@ -1,201 +0,0 @@ -From a5f742d7ba70c702bcf67dd1fd8d5dde3f5042fc Mon Sep 17 00:00:00 2001 -From: Hans de Goede -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 -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - 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 c6f78d27947b..67684412ba8a 100644 ---- a/drivers/video/fbdev/efifb.c -+++ b/drivers/video/fbdev/efifb.c -@@ -9,16 +9,39 @@ - - #include - #include -+#include - #include - #include - #include - #include -+#include - #include - #include