[GIT PULL] UPDATED - x86 and EFI fixes for v3.13-rc3
Hi Linus, The following changes since commit 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae: Linux 3.13-rc1 (2013-11-22 11:30:55 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent for you to fetch changes up to 2885432aaf15c1b7e65c787bfe7c5fec428296f0: x86/apic, doc: Justification for disabling IO APIC before Local APIC (2013-12-04 19:33:21 -0800) The update is that I added a patch which contains only a comment and no code changes (see below). Half of these are EFI-related: The by far biggest change is the change to hold off the deletion of a sysfs entry while a backend scan is in progress. This is to avoid calling kmemdup() while under a spinlock. The other major change is for each entry in the EFI pstore backend to get a unique identifier, as required by the pstore filesystem proper. The other changes are: A fix to the recent consolidation and optimization of using "asm goto" with read-modify-write operation, which broke the bitops; specifically in such a way that we could end up generating invalid code. A build hack to make sure we compile with -mno-sse. icc, and most likely future versions of gcc, can generate SSE instructions unless we tell it not to. A comment-only patch to a change the was due in part to an unpublished erratum; now when the erratum is published we want to add a comment explaining why. H. Peter Anvin (2): x86-64, build: Always pass in -mno-sse x86, bitops: Correct the assembly constraints to testing bitops Madper Xie (1): efi-pstore: Make efi-pstore return a unique id Matt Fleming (1): x86/efi: Fix earlyprintk off-by-one bug Seiji Aguchi (1): efivars, efi-pstore: Hold off deletion of sysfs entry until the scan is completed arch/x86/Makefile| 8 +- arch/x86/include/asm/atomic.h| 4 +- arch/x86/include/asm/atomic64_64.h | 4 +- arch/x86/include/asm/bitops.h| 6 +- arch/x86/include/asm/local.h | 4 +- arch/x86/include/asm/rmwcc.h | 8 +- arch/x86/platform/efi/early_printk.c | 2 +- drivers/firmware/efi/efi-pstore.c| 163 +++ drivers/firmware/efi/efivars.c | 12 ++- drivers/firmware/efi/vars.c | 12 ++- include/linux/efi.h | 4 + 11 files changed, 190 insertions(+), 37 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 41250fb..eda00f9 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return +# Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic @@ -57,8 +60,11 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 +# Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Use -mpreferred-stack-boundary=3 if supported. - KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3) + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index da31c8b..b17f4f4 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h @@ -77,7 +77,7 @@ static inline void atomic_sub(int i, atomic_t *v) */ static inline int atomic_sub_and_test(int i, atomic_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, i, "%0", "e"); + GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, "er", i, "%0", "e"); } /** @@ -141,7 +141,7 @@ static inline int atomic_inc_and_test(atomic_t *v) */ static inline int atomic_add_negative(int i, atomic_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, i, "%0", "s"); + GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, "er", i, "%0", "s"); } /** diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h index 3f065c9..46e9052 100644 --- a/arch/x86/include/asm/atomic64_64.h +++ b/arch/x86/include/asm/atomic64_64.h @@ -72,7 +72,7 @@ static inline void atomic64_sub(long i, atomic64_t *v) */ static inline int atomic64_sub_and_test(long i, atomic64_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, i, "%0", "e"); + GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, "er", i, "%0", "e"); } /** @@ -138,7 +138,7 @@ static inline int atomic64_inc_and_test(atomic64_t *v) */ static inline int atomic64_add_negative(long i, atomic64_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, i, "%0", "s"); + GEN_BINARY_RMWcc(LOCK_PREFIX "addq",
[GIT PULL] UPDATED - x86 and EFI fixes for v3.13-rc3
Hi Linus, The following changes since commit 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae: Linux 3.13-rc1 (2013-11-22 11:30:55 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent for you to fetch changes up to 2885432aaf15c1b7e65c787bfe7c5fec428296f0: x86/apic, doc: Justification for disabling IO APIC before Local APIC (2013-12-04 19:33:21 -0800) The update is that I added a patch which contains only a comment and no code changes (see below). Half of these are EFI-related: The by far biggest change is the change to hold off the deletion of a sysfs entry while a backend scan is in progress. This is to avoid calling kmemdup() while under a spinlock. The other major change is for each entry in the EFI pstore backend to get a unique identifier, as required by the pstore filesystem proper. The other changes are: A fix to the recent consolidation and optimization of using asm goto with read-modify-write operation, which broke the bitops; specifically in such a way that we could end up generating invalid code. A build hack to make sure we compile with -mno-sse. icc, and most likely future versions of gcc, can generate SSE instructions unless we tell it not to. A comment-only patch to a change the was due in part to an unpublished erratum; now when the erratum is published we want to add a comment explaining why. H. Peter Anvin (2): x86-64, build: Always pass in -mno-sse x86, bitops: Correct the assembly constraints to testing bitops Madper Xie (1): efi-pstore: Make efi-pstore return a unique id Matt Fleming (1): x86/efi: Fix earlyprintk off-by-one bug Seiji Aguchi (1): efivars, efi-pstore: Hold off deletion of sysfs entry until the scan is completed arch/x86/Makefile| 8 +- arch/x86/include/asm/atomic.h| 4 +- arch/x86/include/asm/atomic64_64.h | 4 +- arch/x86/include/asm/bitops.h| 6 +- arch/x86/include/asm/local.h | 4 +- arch/x86/include/asm/rmwcc.h | 8 +- arch/x86/platform/efi/early_printk.c | 2 +- drivers/firmware/efi/efi-pstore.c| 163 +++ drivers/firmware/efi/efivars.c | 12 ++- drivers/firmware/efi/vars.c | 12 ++- include/linux/efi.h | 4 + 11 files changed, 190 insertions(+), 37 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 41250fb..eda00f9 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return +# Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic @@ -57,8 +60,11 @@ else KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 +# Don't autogenerate SSE instructions + KBUILD_CFLAGS += -mno-sse + # Use -mpreferred-stack-boundary=3 if supported. - KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3) + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index da31c8b..b17f4f4 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h @@ -77,7 +77,7 @@ static inline void atomic_sub(int i, atomic_t *v) */ static inline int atomic_sub_and_test(int i, atomic_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX subl, v-counter, i, %0, e); + GEN_BINARY_RMWcc(LOCK_PREFIX subl, v-counter, er, i, %0, e); } /** @@ -141,7 +141,7 @@ static inline int atomic_inc_and_test(atomic_t *v) */ static inline int atomic_add_negative(int i, atomic_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX addl, v-counter, i, %0, s); + GEN_BINARY_RMWcc(LOCK_PREFIX addl, v-counter, er, i, %0, s); } /** diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h index 3f065c9..46e9052 100644 --- a/arch/x86/include/asm/atomic64_64.h +++ b/arch/x86/include/asm/atomic64_64.h @@ -72,7 +72,7 @@ static inline void atomic64_sub(long i, atomic64_t *v) */ static inline int atomic64_sub_and_test(long i, atomic64_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX subq, v-counter, i, %0, e); + GEN_BINARY_RMWcc(LOCK_PREFIX subq, v-counter, er, i, %0, e); } /** @@ -138,7 +138,7 @@ static inline int atomic64_inc_and_test(atomic64_t *v) */ static inline int atomic64_add_negative(long i, atomic64_t *v) { - GEN_BINARY_RMWcc(LOCK_PREFIX addq, v-counter, i, %0, s); + GEN_BINARY_RMWcc(LOCK_PREFIX addq, v-counter, er, i, %0, s); } /** diff --git