Skip to content

Commit f137e0b

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "A small set of x86 fixes: - prevent the kernel from using the EFI reboot method when EFI is disabled. - two patches addressing clang issues" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Disable the address-of-packed-member compiler warning x86/efi: Fix reboot_mode when EFI runtime services are disabled x86/boot: #undef memcpy() et al in string.c
2 parents e4776b8 + 20c6c18 commit f137e0b

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

arch/x86/boot/compressed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ KBUILD_CFLAGS += $(cflags-y)
3434
KBUILD_CFLAGS += -mno-mmx -mno-sse
3535
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
3636
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
37+
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
3738

3839
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
3940
GCOV_PROFILE := n

arch/x86/boot/string.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
#include "ctype.h"
1717
#include "string.h"
1818

19+
/*
20+
* Undef these macros so that the functions that we provide
21+
* here will have the correct names regardless of how string.h
22+
* may have chosen to #define them.
23+
*/
24+
#undef memcpy
25+
#undef memset
26+
#undef memcmp
27+
1928
int memcmp(const void *s1, const void *s2, size_t len)
2029
{
2130
bool diff;

arch/x86/kernel/reboot.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ static int __init reboot_init(void)
471471

472472
/*
473473
* The DMI quirks table takes precedence. If no quirks entry
474-
* matches and the ACPI Hardware Reduced bit is set, force EFI
475-
* reboot.
474+
* matches and the ACPI Hardware Reduced bit is set and EFI
475+
* runtime services are enabled, force EFI reboot.
476476
*/
477477
rv = dmi_check_system(reboot_dmi_table);
478478

479-
if (!rv && efi_reboot_required())
479+
if (!rv && efi_reboot_required() && !efi_runtime_disabled())
480480
reboot_type = BOOT_EFI;
481481

482482
return 0;

0 commit comments

Comments
 (0)