diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
| commit | bb799d3b980eb803ca2da4a4eefbd9308f8d988a (patch) | |
| tree | 69fbe0cd6d47b23a50f5e1d87bf7489532fae149 /arch/x86 | |
| parent | 919fc6e34831d1c2b58bfb5ae261dc3facc9b269 (diff) | |
| parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
Merge tag 'v3.13-rc4' into core/locking
Merge Linux 3.13-rc4, to refresh this rather old tree with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
37 files changed, 112 insertions, 283 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 41250fb33985..57d021507120 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) | |||
| 31 | 31 | ||
| 32 | KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return | 32 | KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return |
| 33 | 33 | ||
| 34 | # Don't autogenerate MMX or SSE instructions | ||
| 35 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 36 | |||
| 34 | # Never want PIC in a 32-bit kernel, prevent breakage with GCC built | 37 | # Never want PIC in a 32-bit kernel, prevent breakage with GCC built |
| 35 | # with nonstandard options | 38 | # with nonstandard options |
| 36 | KBUILD_CFLAGS += -fno-pic | 39 | KBUILD_CFLAGS += -fno-pic |
| @@ -57,8 +60,11 @@ else | |||
| 57 | KBUILD_AFLAGS += -m64 | 60 | KBUILD_AFLAGS += -m64 |
| 58 | KBUILD_CFLAGS += -m64 | 61 | KBUILD_CFLAGS += -m64 |
| 59 | 62 | ||
| 63 | # Don't autogenerate MMX or SSE instructions | ||
| 64 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 65 | |||
| 60 | # Use -mpreferred-stack-boundary=3 if supported. | 66 | # Use -mpreferred-stack-boundary=3 if supported. |
| 61 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3) | 67 | KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) |
| 62 | 68 | ||
| 63 | # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) | 69 | # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) |
| 64 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 70 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index dce69a256896..d9c11956fce0 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
| @@ -53,18 +53,18 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE | |||
| 53 | 53 | ||
| 54 | # How to compile the 16-bit code. Note we always compile for -march=i386, | 54 | # How to compile the 16-bit code. Note we always compile for -march=i386, |
| 55 | # that way we can complain to the user if the CPU is insufficient. | 55 | # that way we can complain to the user if the CPU is insufficient. |
| 56 | KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ | 56 | KBUILD_CFLAGS := $(USERINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \ |
| 57 | -DDISABLE_BRANCH_PROFILING \ | 57 | -DDISABLE_BRANCH_PROFILING \ |
| 58 | -Wall -Wstrict-prototypes \ | 58 | -Wall -Wstrict-prototypes \ |
| 59 | -march=i386 -mregparm=3 \ | 59 | -march=i386 -mregparm=3 \ |
| 60 | -include $(srctree)/$(src)/code16gcc.h \ | 60 | -include $(srctree)/$(src)/code16gcc.h \ |
| 61 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ | 61 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ |
| 62 | -mno-mmx -mno-sse \ | ||
| 62 | $(call cc-option, -ffreestanding) \ | 63 | $(call cc-option, -ffreestanding) \ |
| 63 | $(call cc-option, -fno-toplevel-reorder,\ | 64 | $(call cc-option, -fno-toplevel-reorder,\ |
| 64 | $(call cc-option, -fno-unit-at-a-time)) \ | 65 | $(call cc-option, -fno-unit-at-a-time)) \ |
| 65 | $(call cc-option, -fno-stack-protector) \ | 66 | $(call cc-option, -fno-stack-protector) \ |
| 66 | $(call cc-option, -mpreferred-stack-boundary=2) | 67 | $(call cc-option, -mpreferred-stack-boundary=2) |
| 67 | KBUILD_CFLAGS += $(call cc-option, -m32) | ||
| 68 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 68 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
| 69 | GCOV_PROFILE := n | 69 | GCOV_PROFILE := n |
| 70 | 70 | ||
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index dcd90df10ab4..c8a6792e7842 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
| @@ -13,6 +13,7 @@ KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING | |||
| 13 | cflags-$(CONFIG_X86_32) := -march=i386 | 13 | cflags-$(CONFIG_X86_32) := -march=i386 |
| 14 | cflags-$(CONFIG_X86_64) := -mcmodel=small | 14 | cflags-$(CONFIG_X86_64) := -mcmodel=small |
| 15 | KBUILD_CFLAGS += $(cflags-y) | 15 | KBUILD_CFLAGS += $(cflags-y) |
| 16 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 16 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) | 17 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) |
| 17 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) | 18 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
| 18 | 19 | ||
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 7d6ba9db1be9..e0fc24db234a 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile | |||
| @@ -3,8 +3,9 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | avx_supported := $(call as-instr,vpxor %xmm0$(comma)%xmm0$(comma)%xmm0,yes,no) | 5 | avx_supported := $(call as-instr,vpxor %xmm0$(comma)%xmm0$(comma)%xmm0,yes,no) |
| 6 | avx2_supported := $(call as-instr,vpgatherdd %ymm0$(comma)(%eax$(comma)%ymm1\ | ||
| 7 | $(comma)4)$(comma)%ymm2,yes,no) | ||
| 6 | 8 | ||
| 7 | obj-$(CONFIG_CRYPTO_ABLK_HELPER_X86) += ablk_helper.o | ||
| 8 | obj-$(CONFIG_CRYPTO_GLUE_HELPER_X86) += glue_helper.o | 9 | obj-$(CONFIG_CRYPTO_GLUE_HELPER_X86) += glue_helper.o |
| 9 | 10 | ||
| 10 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o | 11 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o |
diff --git a/arch/x86/crypto/ablk_helper.c b/arch/x86/crypto/ablk_helper.c deleted file mode 100644 index 43282fe04a8b..000000000000 --- a/arch/x86/crypto/ablk_helper.c +++ /dev/null | |||
| @@ -1,149 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Shared async block cipher helpers | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
| 5 | * | ||
| 6 | * Based on aesni-intel_glue.c by: | ||
| 7 | * Copyright (C) 2008, Intel Corp. | ||
| 8 | * Author: Huang Ying <ying.huang@intel.com> | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 23 | * USA | ||
| 24 | * | ||
| 25 | */ | ||
| 26 | |||
| 27 | #include <linux/kernel.h> | ||
| 28 | #include <linux/crypto.h> | ||
| 29 | #include <linux/init.h> | ||
| 30 | #include <linux/module.h> | ||
| 31 | #include <crypto/algapi.h> | ||
| 32 | #include <crypto/cryptd.h> | ||
| 33 | #include <asm/i387.h> | ||
| 34 | #include <asm/crypto/ablk_helper.h> | ||
| 35 | |||
| 36 | int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, | ||
| 37 | unsigned int key_len) | ||
| 38 | { | ||
| 39 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 40 | struct crypto_ablkcipher *child = &ctx->cryptd_tfm->base; | ||
| 41 | int err; | ||
| 42 | |||
| 43 | crypto_ablkcipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); | ||
| 44 | crypto_ablkcipher_set_flags(child, crypto_ablkcipher_get_flags(tfm) | ||
| 45 | & CRYPTO_TFM_REQ_MASK); | ||
| 46 | err = crypto_ablkcipher_setkey(child, key, key_len); | ||
| 47 | crypto_ablkcipher_set_flags(tfm, crypto_ablkcipher_get_flags(child) | ||
| 48 | & CRYPTO_TFM_RES_MASK); | ||
| 49 | return err; | ||
| 50 | } | ||
| 51 | EXPORT_SYMBOL_GPL(ablk_set_key); | ||
| 52 | |||
| 53 | int __ablk_encrypt(struct ablkcipher_request *req) | ||
| 54 | { | ||
| 55 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 56 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 57 | struct blkcipher_desc desc; | ||
| 58 | |||
| 59 | desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); | ||
| 60 | desc.info = req->info; | ||
| 61 | desc.flags = 0; | ||
| 62 | |||
| 63 | return crypto_blkcipher_crt(desc.tfm)->encrypt( | ||
| 64 | &desc, req->dst, req->src, req->nbytes); | ||
| 65 | } | ||
| 66 | EXPORT_SYMBOL_GPL(__ablk_encrypt); | ||
| 67 | |||
| 68 | int ablk_encrypt(struct ablkcipher_request *req) | ||
| 69 | { | ||
| 70 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 71 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 72 | |||
| 73 | if (!irq_fpu_usable()) { | ||
| 74 | struct ablkcipher_request *cryptd_req = | ||
| 75 | ablkcipher_request_ctx(req); | ||
| 76 | |||
| 77 | memcpy(cryptd_req, req, sizeof(*req)); | ||
| 78 | ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); | ||
| 79 | |||
| 80 | return crypto_ablkcipher_encrypt(cryptd_req); | ||
| 81 | } else { | ||
| 82 | return __ablk_encrypt(req); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | EXPORT_SYMBOL_GPL(ablk_encrypt); | ||
| 86 | |||
| 87 | int ablk_decrypt(struct ablkcipher_request *req) | ||
| 88 | { | ||
| 89 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 90 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 91 | |||
| 92 | if (!irq_fpu_usable()) { | ||
| 93 | struct ablkcipher_request *cryptd_req = | ||
| 94 | ablkcipher_request_ctx(req); | ||
| 95 | |||
| 96 | memcpy(cryptd_req, req, sizeof(*req)); | ||
| 97 | ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); | ||
| 98 | |||
| 99 | return crypto_ablkcipher_decrypt(cryptd_req); | ||
| 100 | } else { | ||
| 101 | struct blkcipher_desc desc; | ||
| 102 | |||
| 103 | desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); | ||
| 104 | desc.info = req->info; | ||
| 105 | desc.flags = 0; | ||
| 106 | |||
| 107 | return crypto_blkcipher_crt(desc.tfm)->decrypt( | ||
| 108 | &desc, req->dst, req->src, req->nbytes); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | EXPORT_SYMBOL_GPL(ablk_decrypt); | ||
| 112 | |||
| 113 | void ablk_exit(struct crypto_tfm *tfm) | ||
| 114 | { | ||
| 115 | struct async_helper_ctx *ctx = crypto_tfm_ctx(tfm); | ||
| 116 | |||
| 117 | cryptd_free_ablkcipher(ctx->cryptd_tfm); | ||
| 118 | } | ||
| 119 | EXPORT_SYMBOL_GPL(ablk_exit); | ||
| 120 | |||
| 121 | int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name) | ||
| 122 | { | ||
| 123 | struct async_helper_ctx *ctx = crypto_tfm_ctx(tfm); | ||
| 124 | struct cryptd_ablkcipher *cryptd_tfm; | ||
| 125 | |||
| 126 | cryptd_tfm = cryptd_alloc_ablkcipher(drv_name, 0, 0); | ||
| 127 | if (IS_ERR(cryptd_tfm)) | ||
| 128 | return PTR_ERR(cryptd_tfm); | ||
| 129 | |||
| 130 | ctx->cryptd_tfm = cryptd_tfm; | ||
| 131 | tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request) + | ||
| 132 | crypto_ablkcipher_reqsize(&cryptd_tfm->base); | ||
| 133 | |||
| 134 | return 0; | ||
| 135 | } | ||
| 136 | EXPORT_SYMBOL_GPL(ablk_init_common); | ||
| 137 | |||
| 138 | int ablk_init(struct crypto_tfm *tfm) | ||
| 139 | { | ||
| 140 | char drv_name[CRYPTO_MAX_ALG_NAME]; | ||
| 141 | |||
| 142 | snprintf(drv_name, sizeof(drv_name), "__driver-%s", | ||
| 143 | crypto_tfm_alg_driver_name(tfm)); | ||
| 144 | |||
| 145 | return ablk_init_common(tfm, drv_name); | ||
| 146 | } | ||
| 147 | EXPORT_SYMBOL_GPL(ablk_init); | ||
| 148 | |||
| 149 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index f80e668785c0..835488b745ee 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <asm/cpu_device_id.h> | 34 | #include <asm/cpu_device_id.h> |
| 35 | #include <asm/i387.h> | 35 | #include <asm/i387.h> |
| 36 | #include <asm/crypto/aes.h> | 36 | #include <asm/crypto/aes.h> |
| 37 | #include <asm/crypto/ablk_helper.h> | 37 | #include <crypto/ablk_helper.h> |
| 38 | #include <crypto/scatterwalk.h> | 38 | #include <crypto/scatterwalk.h> |
| 39 | #include <crypto/internal/aead.h> | 39 | #include <crypto/internal/aead.h> |
| 40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
diff --git a/arch/x86/crypto/camellia_aesni_avx2_glue.c b/arch/x86/crypto/camellia_aesni_avx2_glue.c index 414fe5d7946b..4209a76fcdaa 100644 --- a/arch/x86/crypto/camellia_aesni_avx2_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx2_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -21,7 +22,6 @@ | |||
| 21 | #include <asm/xcr.h> | 22 | #include <asm/xcr.h> |
| 22 | #include <asm/xsave.h> | 23 | #include <asm/xsave.h> |
| 23 | #include <asm/crypto/camellia.h> | 24 | #include <asm/crypto/camellia.h> |
| 24 | #include <asm/crypto/ablk_helper.h> | ||
| 25 | #include <asm/crypto/glue_helper.h> | 25 | #include <asm/crypto/glue_helper.h> |
| 26 | 26 | ||
| 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 | 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c index 37fd0c0a81ea..87a041a10f4a 100644 --- a/arch/x86/crypto/camellia_aesni_avx_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -21,7 +22,6 @@ | |||
| 21 | #include <asm/xcr.h> | 22 | #include <asm/xcr.h> |
| 22 | #include <asm/xsave.h> | 23 | #include <asm/xsave.h> |
| 23 | #include <asm/crypto/camellia.h> | 24 | #include <asm/crypto/camellia.h> |
| 24 | #include <asm/crypto/ablk_helper.h> | ||
| 25 | #include <asm/crypto/glue_helper.h> | 25 | #include <asm/crypto/glue_helper.h> |
| 26 | 26 | ||
| 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 | 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c index c6631813dc11..e6a3700489b9 100644 --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c | |||
| @@ -26,13 +26,13 @@ | |||
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | #include <linux/crypto.h> | 27 | #include <linux/crypto.h> |
| 28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
| 29 | #include <crypto/ablk_helper.h> | ||
| 29 | #include <crypto/algapi.h> | 30 | #include <crypto/algapi.h> |
| 30 | #include <crypto/cast5.h> | 31 | #include <crypto/cast5.h> |
| 31 | #include <crypto/cryptd.h> | 32 | #include <crypto/cryptd.h> |
| 32 | #include <crypto/ctr.h> | 33 | #include <crypto/ctr.h> |
| 33 | #include <asm/xcr.h> | 34 | #include <asm/xcr.h> |
| 34 | #include <asm/xsave.h> | 35 | #include <asm/xsave.h> |
| 35 | #include <asm/crypto/ablk_helper.h> | ||
| 36 | #include <asm/crypto/glue_helper.h> | 36 | #include <asm/crypto/glue_helper.h> |
| 37 | 37 | ||
| 38 | #define CAST5_PARALLEL_BLOCKS 16 | 38 | #define CAST5_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x86/crypto/cast6_avx_glue.c index 8d0dfb86a559..09f3677393e4 100644 --- a/arch/x86/crypto/cast6_avx_glue.c +++ b/arch/x86/crypto/cast6_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/cast6.h> | 33 | #include <crypto/cast6.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -37,7 +38,6 @@ | |||
| 37 | #include <crypto/xts.h> | 38 | #include <crypto/xts.h> |
| 38 | #include <asm/xcr.h> | 39 | #include <asm/xcr.h> |
| 39 | #include <asm/xsave.h> | 40 | #include <asm/xsave.h> |
| 40 | #include <asm/crypto/ablk_helper.h> | ||
| 41 | #include <asm/crypto/glue_helper.h> | 41 | #include <asm/crypto/glue_helper.h> |
| 42 | 42 | ||
| 43 | #define CAST6_PARALLEL_BLOCKS 8 | 43 | #define CAST6_PARALLEL_BLOCKS 8 |
diff --git a/arch/x86/crypto/serpent_avx2_glue.c b/arch/x86/crypto/serpent_avx2_glue.c index 23aabc6c20a5..2fae489b1524 100644 --- a/arch/x86/crypto/serpent_avx2_glue.c +++ b/arch/x86/crypto/serpent_avx2_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -22,7 +23,6 @@ | |||
| 22 | #include <asm/xcr.h> | 23 | #include <asm/xcr.h> |
| 23 | #include <asm/xsave.h> | 24 | #include <asm/xsave.h> |
| 24 | #include <asm/crypto/serpent-avx.h> | 25 | #include <asm/crypto/serpent-avx.h> |
| 25 | #include <asm/crypto/ablk_helper.h> | ||
| 26 | #include <asm/crypto/glue_helper.h> | 26 | #include <asm/crypto/glue_helper.h> |
| 27 | 27 | ||
| 28 | #define SERPENT_AVX2_PARALLEL_BLOCKS 16 | 28 | #define SERPENT_AVX2_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/serpent_avx_glue.c b/arch/x86/crypto/serpent_avx_glue.c index 9ae83cf8d21e..ff4870870972 100644 --- a/arch/x86/crypto/serpent_avx_glue.c +++ b/arch/x86/crypto/serpent_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/serpent.h> | 33 | #include <crypto/serpent.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -38,7 +39,6 @@ | |||
| 38 | #include <asm/xcr.h> | 39 | #include <asm/xcr.h> |
| 39 | #include <asm/xsave.h> | 40 | #include <asm/xsave.h> |
| 40 | #include <asm/crypto/serpent-avx.h> | 41 | #include <asm/crypto/serpent-avx.h> |
| 41 | #include <asm/crypto/ablk_helper.h> | ||
| 42 | #include <asm/crypto/glue_helper.h> | 42 | #include <asm/crypto/glue_helper.h> |
| 43 | 43 | ||
| 44 | /* 8-way parallel cipher functions */ | 44 | /* 8-way parallel cipher functions */ |
diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c index 97a356ece24d..8c95f8637306 100644 --- a/arch/x86/crypto/serpent_sse2_glue.c +++ b/arch/x86/crypto/serpent_sse2_glue.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/crypto.h> | 35 | #include <linux/crypto.h> |
| 36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
| 37 | #include <crypto/ablk_helper.h> | ||
| 37 | #include <crypto/algapi.h> | 38 | #include <crypto/algapi.h> |
| 38 | #include <crypto/serpent.h> | 39 | #include <crypto/serpent.h> |
| 39 | #include <crypto/cryptd.h> | 40 | #include <crypto/cryptd.h> |
| @@ -42,7 +43,6 @@ | |||
| 42 | #include <crypto/lrw.h> | 43 | #include <crypto/lrw.h> |
| 43 | #include <crypto/xts.h> | 44 | #include <crypto/xts.h> |
| 44 | #include <asm/crypto/serpent-sse2.h> | 45 | #include <asm/crypto/serpent-sse2.h> |
| 45 | #include <asm/crypto/ablk_helper.h> | ||
| 46 | #include <asm/crypto/glue_helper.h> | 46 | #include <asm/crypto/glue_helper.h> |
| 47 | 47 | ||
| 48 | static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src) | 48 | static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src) |
diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c index 50226c4b86ed..f248546da1ca 100644 --- a/arch/x86/crypto/sha256_ssse3_glue.c +++ b/arch/x86/crypto/sha256_ssse3_glue.c | |||
| @@ -281,7 +281,7 @@ static int __init sha256_ssse3_mod_init(void) | |||
| 281 | /* allow AVX to override SSSE3, it's a little faster */ | 281 | /* allow AVX to override SSSE3, it's a little faster */ |
| 282 | if (avx_usable()) { | 282 | if (avx_usable()) { |
| 283 | #ifdef CONFIG_AS_AVX2 | 283 | #ifdef CONFIG_AS_AVX2 |
| 284 | if (boot_cpu_has(X86_FEATURE_AVX2)) | 284 | if (boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_BMI2)) |
| 285 | sha256_transform_asm = sha256_transform_rorx; | 285 | sha256_transform_asm = sha256_transform_rorx; |
| 286 | else | 286 | else |
| 287 | #endif | 287 | #endif |
| @@ -319,4 +319,4 @@ MODULE_LICENSE("GPL"); | |||
| 319 | MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm, Supplemental SSE3 accelerated"); | 319 | MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm, Supplemental SSE3 accelerated"); |
| 320 | 320 | ||
| 321 | MODULE_ALIAS("sha256"); | 321 | MODULE_ALIAS("sha256"); |
| 322 | MODULE_ALIAS("sha384"); | 322 | MODULE_ALIAS("sha224"); |
diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c index a62ba541884e..4e3c665be129 100644 --- a/arch/x86/crypto/twofish_avx_glue.c +++ b/arch/x86/crypto/twofish_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/twofish.h> | 33 | #include <crypto/twofish.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -39,7 +40,6 @@ | |||
| 39 | #include <asm/xcr.h> | 40 | #include <asm/xcr.h> |
| 40 | #include <asm/xsave.h> | 41 | #include <asm/xsave.h> |
| 41 | #include <asm/crypto/twofish.h> | 42 | #include <asm/crypto/twofish.h> |
| 42 | #include <asm/crypto/ablk_helper.h> | ||
| 43 | #include <asm/crypto/glue_helper.h> | 43 | #include <asm/crypto/glue_helper.h> |
| 44 | #include <crypto/scatterwalk.h> | 44 | #include <crypto/scatterwalk.h> |
| 45 | #include <linux/workqueue.h> | 45 | #include <linux/workqueue.h> |
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index da31c8b8a92d..b17f4f48ecd7 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) | |||
| 77 | */ | 77 | */ |
| 78 | static inline int atomic_sub_and_test(int i, atomic_t *v) | 78 | static inline int atomic_sub_and_test(int i, atomic_t *v) |
| 79 | { | 79 | { |
| 80 | GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, i, "%0", "e"); | 80 | GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, "er", i, "%0", "e"); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | /** | 83 | /** |
| @@ -141,7 +141,7 @@ static inline int atomic_inc_and_test(atomic_t *v) | |||
| 141 | */ | 141 | */ |
| 142 | static inline int atomic_add_negative(int i, atomic_t *v) | 142 | static inline int atomic_add_negative(int i, atomic_t *v) |
| 143 | { | 143 | { |
| 144 | GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, i, "%0", "s"); | 144 | GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, "er", i, "%0", "s"); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | /** | 147 | /** |
diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h index 3f065c985aee..46e9052bbd28 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) | |||
| 72 | */ | 72 | */ |
| 73 | static inline int atomic64_sub_and_test(long i, atomic64_t *v) | 73 | static inline int atomic64_sub_and_test(long i, atomic64_t *v) |
| 74 | { | 74 | { |
| 75 | GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, i, "%0", "e"); | 75 | GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, "er", i, "%0", "e"); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| @@ -138,7 +138,7 @@ static inline int atomic64_inc_and_test(atomic64_t *v) | |||
| 138 | */ | 138 | */ |
| 139 | static inline int atomic64_add_negative(long i, atomic64_t *v) | 139 | static inline int atomic64_add_negative(long i, atomic64_t *v) |
| 140 | { | 140 | { |
| 141 | GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, i, "%0", "s"); | 141 | GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, "er", i, "%0", "s"); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | /** | 144 | /** |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 6d76d0935989..9fc1af74dc83 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
| @@ -205,7 +205,7 @@ static inline void change_bit(long nr, volatile unsigned long *addr) | |||
| 205 | */ | 205 | */ |
| 206 | static inline int test_and_set_bit(long nr, volatile unsigned long *addr) | 206 | static inline int test_and_set_bit(long nr, volatile unsigned long *addr) |
| 207 | { | 207 | { |
| 208 | GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, nr, "%0", "c"); | 208 | GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, "Ir", nr, "%0", "c"); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | /** | 211 | /** |
| @@ -251,7 +251,7 @@ static inline int __test_and_set_bit(long nr, volatile unsigned long *addr) | |||
| 251 | */ | 251 | */ |
| 252 | static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) | 252 | static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) |
| 253 | { | 253 | { |
| 254 | GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, nr, "%0", "c"); | 254 | GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, "Ir", nr, "%0", "c"); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | /** | 257 | /** |
| @@ -304,7 +304,7 @@ static inline int __test_and_change_bit(long nr, volatile unsigned long *addr) | |||
| 304 | */ | 304 | */ |
| 305 | static inline int test_and_change_bit(long nr, volatile unsigned long *addr) | 305 | static inline int test_and_change_bit(long nr, volatile unsigned long *addr) |
| 306 | { | 306 | { |
| 307 | GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, nr, "%0", "c"); | 307 | GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, "Ir", nr, "%0", "c"); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) | 310 | static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) |
diff --git a/arch/x86/include/asm/crypto/ablk_helper.h b/arch/x86/include/asm/crypto/ablk_helper.h deleted file mode 100644 index 4f93df50c23e..000000000000 --- a/arch/x86/include/asm/crypto/ablk_helper.h +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Shared async block cipher helpers | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _CRYPTO_ABLK_HELPER_H | ||
| 6 | #define _CRYPTO_ABLK_HELPER_H | ||
| 7 | |||
| 8 | #include <linux/crypto.h> | ||
| 9 | #include <linux/kernel.h> | ||
| 10 | #include <crypto/cryptd.h> | ||
| 11 | |||
| 12 | struct async_helper_ctx { | ||
| 13 | struct cryptd_ablkcipher *cryptd_tfm; | ||
| 14 | }; | ||
| 15 | |||
| 16 | extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, | ||
| 17 | unsigned int key_len); | ||
| 18 | |||
| 19 | extern int __ablk_encrypt(struct ablkcipher_request *req); | ||
| 20 | |||
| 21 | extern int ablk_encrypt(struct ablkcipher_request *req); | ||
| 22 | |||
| 23 | extern int ablk_decrypt(struct ablkcipher_request *req); | ||
| 24 | |||
| 25 | extern void ablk_exit(struct crypto_tfm *tfm); | ||
| 26 | |||
| 27 | extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name); | ||
| 28 | |||
| 29 | extern int ablk_init(struct crypto_tfm *tfm); | ||
| 30 | |||
| 31 | #endif /* _CRYPTO_ABLK_HELPER_H */ | ||
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h index 5b23e605e707..4ad6560847b1 100644 --- a/arch/x86/include/asm/local.h +++ b/arch/x86/include/asm/local.h | |||
| @@ -52,7 +52,7 @@ static inline void local_sub(long i, local_t *l) | |||
| 52 | */ | 52 | */ |
| 53 | static inline int local_sub_and_test(long i, local_t *l) | 53 | static inline int local_sub_and_test(long i, local_t *l) |
| 54 | { | 54 | { |
| 55 | GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, i, "%0", "e"); | 55 | GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, "er", i, "%0", "e"); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | /** | 58 | /** |
| @@ -92,7 +92,7 @@ static inline int local_inc_and_test(local_t *l) | |||
| 92 | */ | 92 | */ |
| 93 | static inline int local_add_negative(long i, local_t *l) | 93 | static inline int local_add_negative(long i, local_t *l) |
| 94 | { | 94 | { |
| 95 | GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, i, "%0", "s"); | 95 | GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, "er", i, "%0", "s"); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | /** | 98 | /** |
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 7d7443283a9d..947b5c417e83 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
| @@ -15,7 +15,7 @@ struct pci_sysdata { | |||
| 15 | int domain; /* PCI domain */ | 15 | int domain; /* PCI domain */ |
| 16 | int node; /* NUMA node */ | 16 | int node; /* NUMA node */ |
| 17 | #ifdef CONFIG_ACPI | 17 | #ifdef CONFIG_ACPI |
| 18 | void *acpi; /* ACPI-specific data */ | 18 | struct acpi_device *companion; /* ACPI companion device */ |
| 19 | #endif | 19 | #endif |
| 20 | #ifdef CONFIG_X86_64 | 20 | #ifdef CONFIG_X86_64 |
| 21 | void *iommu; /* IOMMU private data */ | 21 | void *iommu; /* IOMMU private data */ |
diff --git a/arch/x86/include/asm/rmwcc.h b/arch/x86/include/asm/rmwcc.h index 1ff990f1de8e..8f7866a5b9a4 100644 --- a/arch/x86/include/asm/rmwcc.h +++ b/arch/x86/include/asm/rmwcc.h | |||
| @@ -16,8 +16,8 @@ cc_label: \ | |||
| 16 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ | 16 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ |
| 17 | __GEN_RMWcc(op " " arg0, var, cc) | 17 | __GEN_RMWcc(op " " arg0, var, cc) |
| 18 | 18 | ||
| 19 | #define GEN_BINARY_RMWcc(op, var, val, arg0, cc) \ | 19 | #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
| 20 | __GEN_RMWcc(op " %1, " arg0, var, cc, "er" (val)) | 20 | __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val)) |
| 21 | 21 | ||
| 22 | #else /* !CC_HAVE_ASM_GOTO */ | 22 | #else /* !CC_HAVE_ASM_GOTO */ |
| 23 | 23 | ||
| @@ -33,8 +33,8 @@ do { \ | |||
| 33 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ | 33 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ |
| 34 | __GEN_RMWcc(op " " arg0, var, cc) | 34 | __GEN_RMWcc(op " " arg0, var, cc) |
| 35 | 35 | ||
| 36 | #define GEN_BINARY_RMWcc(op, var, val, arg0, cc) \ | 36 | #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
| 37 | __GEN_RMWcc(op " %2, " arg0, var, cc, "er" (val)) | 37 | __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val)) |
| 38 | 38 | ||
| 39 | #endif /* CC_HAVE_ASM_GOTO */ | 39 | #endif /* CC_HAVE_ASM_GOTO */ |
| 40 | 40 | ||
diff --git a/arch/x86/include/asm/simd.h b/arch/x86/include/asm/simd.h new file mode 100644 index 000000000000..ee80b92f0096 --- /dev/null +++ b/arch/x86/include/asm/simd.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | |||
| 2 | #include <asm/i387.h> | ||
| 3 | |||
| 4 | /* | ||
| 5 | * may_use_simd - whether it is allowable at this time to issue SIMD | ||
| 6 | * instructions or access the SIMD register file | ||
| 7 | */ | ||
| 8 | static __must_check inline bool may_use_simd(void) | ||
| 9 | { | ||
| 10 | return irq_fpu_usable(); | ||
| 11 | } | ||
diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/arch/x86/include/asm/trace/irq_vectors.h index 2874df24e7a4..4cab890007a7 100644 --- a/arch/x86/include/asm/trace/irq_vectors.h +++ b/arch/x86/include/asm/trace/irq_vectors.h | |||
| @@ -72,6 +72,17 @@ DEFINE_IRQ_VECTOR_EVENT(x86_platform_ipi); | |||
| 72 | DEFINE_IRQ_VECTOR_EVENT(irq_work); | 72 | DEFINE_IRQ_VECTOR_EVENT(irq_work); |
| 73 | 73 | ||
| 74 | /* | 74 | /* |
| 75 | * We must dis-allow sampling irq_work_exit() because perf event sampling | ||
| 76 | * itself can cause irq_work, which would lead to an infinite loop; | ||
| 77 | * | ||
| 78 | * 1) irq_work_exit happens | ||
| 79 | * 2) generates perf sample | ||
| 80 | * 3) generates irq_work | ||
| 81 | * 4) goto 1 | ||
| 82 | */ | ||
| 83 | TRACE_EVENT_PERF_PERM(irq_work_exit, is_sampling_event(p_event) ? -EPERM : 0); | ||
| 84 | |||
| 85 | /* | ||
| 75 | * call_function - called when entering/exiting a call function interrupt | 86 | * call_function - called when entering/exiting a call function interrupt |
| 76 | * vector handler | 87 | * vector handler |
| 77 | */ | 88 | */ |
diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h index b93e09a0fa21..37813b5ddc37 100644 --- a/arch/x86/include/uapi/asm/msr-index.h +++ b/arch/x86/include/uapi/asm/msr-index.h | |||
| @@ -147,6 +147,8 @@ | |||
| 147 | #define MSR_PP1_ENERGY_STATUS 0x00000641 | 147 | #define MSR_PP1_ENERGY_STATUS 0x00000641 |
| 148 | #define MSR_PP1_POLICY 0x00000642 | 148 | #define MSR_PP1_POLICY 0x00000642 |
| 149 | 149 | ||
| 150 | #define MSR_CORE_C1_RES 0x00000660 | ||
| 151 | |||
| 150 | #define MSR_AMD64_MC0_MASK 0xc0010044 | 152 | #define MSR_AMD64_MC0_MASK 0xc0010044 |
| 151 | 153 | ||
| 152 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) | 154 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 96f958d8cd45..bc4a088f9023 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
| @@ -330,8 +330,8 @@ static struct pci_device_id intel_stolen_ids[] __initdata = { | |||
| 330 | INTEL_I915GM_IDS(gen3_stolen_size), | 330 | INTEL_I915GM_IDS(gen3_stolen_size), |
| 331 | INTEL_I945G_IDS(gen3_stolen_size), | 331 | INTEL_I945G_IDS(gen3_stolen_size), |
| 332 | INTEL_I945GM_IDS(gen3_stolen_size), | 332 | INTEL_I945GM_IDS(gen3_stolen_size), |
| 333 | INTEL_VLV_M_IDS(gen3_stolen_size), | 333 | INTEL_VLV_M_IDS(gen6_stolen_size), |
| 334 | INTEL_VLV_D_IDS(gen3_stolen_size), | 334 | INTEL_VLV_D_IDS(gen6_stolen_size), |
| 335 | INTEL_PINEVIEW_IDS(gen3_stolen_size), | 335 | INTEL_PINEVIEW_IDS(gen3_stolen_size), |
| 336 | INTEL_I965G_IDS(gen3_stolen_size), | 336 | INTEL_I965G_IDS(gen3_stolen_size), |
| 337 | INTEL_G33_IDS(gen3_stolen_size), | 337 | INTEL_G33_IDS(gen3_stolen_size), |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index da3c599584a3..c752cb43e52f 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -558,6 +558,17 @@ void native_machine_shutdown(void) | |||
| 558 | { | 558 | { |
| 559 | /* Stop the cpus and apics */ | 559 | /* Stop the cpus and apics */ |
| 560 | #ifdef CONFIG_X86_IO_APIC | 560 | #ifdef CONFIG_X86_IO_APIC |
| 561 | /* | ||
| 562 | * Disabling IO APIC before local APIC is a workaround for | ||
| 563 | * erratum AVR31 in "Intel Atom Processor C2000 Product Family | ||
| 564 | * Specification Update". In this situation, interrupts that target | ||
| 565 | * a Logical Processor whose Local APIC is either in the process of | ||
| 566 | * being hardware disabled or software disabled are neither delivered | ||
| 567 | * nor discarded. When this erratum occurs, the processor may hang. | ||
| 568 | * | ||
| 569 | * Even without the erratum, it still makes sense to quiet IO APIC | ||
| 570 | * before disabling Local APIC. | ||
| 571 | */ | ||
| 561 | disable_IO_APIC(); | 572 | disable_IO_APIC(); |
| 562 | #endif | 573 | #endif |
| 563 | 574 | ||
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 5439117d5c4c..dec48bfaddb8 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -143,6 +143,8 @@ static inline int kvm_apic_id(struct kvm_lapic *apic) | |||
| 143 | return (kvm_apic_get_reg(apic, APIC_ID) >> 24) & 0xff; | 143 | return (kvm_apic_get_reg(apic, APIC_ID) >> 24) & 0xff; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | #define KVM_X2APIC_CID_BITS 0 | ||
| 147 | |||
| 146 | static void recalculate_apic_map(struct kvm *kvm) | 148 | static void recalculate_apic_map(struct kvm *kvm) |
| 147 | { | 149 | { |
| 148 | struct kvm_apic_map *new, *old = NULL; | 150 | struct kvm_apic_map *new, *old = NULL; |
| @@ -180,7 +182,8 @@ static void recalculate_apic_map(struct kvm *kvm) | |||
| 180 | if (apic_x2apic_mode(apic)) { | 182 | if (apic_x2apic_mode(apic)) { |
| 181 | new->ldr_bits = 32; | 183 | new->ldr_bits = 32; |
| 182 | new->cid_shift = 16; | 184 | new->cid_shift = 16; |
| 183 | new->cid_mask = new->lid_mask = 0xffff; | 185 | new->cid_mask = (1 << KVM_X2APIC_CID_BITS) - 1; |
| 186 | new->lid_mask = 0xffff; | ||
| 184 | } else if (kvm_apic_sw_enabled(apic) && | 187 | } else if (kvm_apic_sw_enabled(apic) && |
| 185 | !new->cid_mask /* flat mode */ && | 188 | !new->cid_mask /* flat mode */ && |
| 186 | kvm_apic_get_reg(apic, APIC_DFR) == APIC_DFR_CLUSTER) { | 189 | kvm_apic_get_reg(apic, APIC_DFR) == APIC_DFR_CLUSTER) { |
| @@ -841,7 +844,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic) | |||
| 841 | ASSERT(apic != NULL); | 844 | ASSERT(apic != NULL); |
| 842 | 845 | ||
| 843 | /* if initial count is 0, current count should also be 0 */ | 846 | /* if initial count is 0, current count should also be 0 */ |
| 844 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0) | 847 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0 || |
| 848 | apic->lapic_timer.period == 0) | ||
| 845 | return 0; | 849 | return 0; |
| 846 | 850 | ||
| 847 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); | 851 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); |
| @@ -1691,7 +1695,6 @@ static void apic_sync_pv_eoi_from_guest(struct kvm_vcpu *vcpu, | |||
| 1691 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) | 1695 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) |
| 1692 | { | 1696 | { |
| 1693 | u32 data; | 1697 | u32 data; |
| 1694 | void *vapic; | ||
| 1695 | 1698 | ||
| 1696 | if (test_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention)) | 1699 | if (test_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention)) |
| 1697 | apic_sync_pv_eoi_from_guest(vcpu, vcpu->arch.apic); | 1700 | apic_sync_pv_eoi_from_guest(vcpu, vcpu->arch.apic); |
| @@ -1699,9 +1702,8 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) | |||
| 1699 | if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) | 1702 | if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) |
| 1700 | return; | 1703 | return; |
| 1701 | 1704 | ||
| 1702 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); | 1705 | kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, |
| 1703 | data = *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)); | 1706 | sizeof(u32)); |
| 1704 | kunmap_atomic(vapic); | ||
| 1705 | 1707 | ||
| 1706 | apic_set_tpr(vcpu->arch.apic, data & 0xff); | 1708 | apic_set_tpr(vcpu->arch.apic, data & 0xff); |
| 1707 | } | 1709 | } |
| @@ -1737,7 +1739,6 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) | |||
| 1737 | u32 data, tpr; | 1739 | u32 data, tpr; |
| 1738 | int max_irr, max_isr; | 1740 | int max_irr, max_isr; |
| 1739 | struct kvm_lapic *apic = vcpu->arch.apic; | 1741 | struct kvm_lapic *apic = vcpu->arch.apic; |
| 1740 | void *vapic; | ||
| 1741 | 1742 | ||
| 1742 | apic_sync_pv_eoi_to_guest(vcpu, apic); | 1743 | apic_sync_pv_eoi_to_guest(vcpu, apic); |
| 1743 | 1744 | ||
| @@ -1753,18 +1754,24 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) | |||
| 1753 | max_isr = 0; | 1754 | max_isr = 0; |
| 1754 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); | 1755 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); |
| 1755 | 1756 | ||
| 1756 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); | 1757 | kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, |
| 1757 | *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)) = data; | 1758 | sizeof(u32)); |
| 1758 | kunmap_atomic(vapic); | ||
| 1759 | } | 1759 | } |
| 1760 | 1760 | ||
| 1761 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) | 1761 | int kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) |
| 1762 | { | 1762 | { |
| 1763 | vcpu->arch.apic->vapic_addr = vapic_addr; | 1763 | if (vapic_addr) { |
| 1764 | if (vapic_addr) | 1764 | if (kvm_gfn_to_hva_cache_init(vcpu->kvm, |
| 1765 | &vcpu->arch.apic->vapic_cache, | ||
| 1766 | vapic_addr, sizeof(u32))) | ||
| 1767 | return -EINVAL; | ||
| 1765 | __set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); | 1768 | __set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); |
| 1766 | else | 1769 | } else { |
| 1767 | __clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); | 1770 | __clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); |
| 1771 | } | ||
| 1772 | |||
| 1773 | vcpu->arch.apic->vapic_addr = vapic_addr; | ||
| 1774 | return 0; | ||
| 1768 | } | 1775 | } |
| 1769 | 1776 | ||
| 1770 | int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) | 1777 | int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) |
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index c730ac9fe801..c8b0d0d2da5c 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h | |||
| @@ -34,7 +34,7 @@ struct kvm_lapic { | |||
| 34 | */ | 34 | */ |
| 35 | void *regs; | 35 | void *regs; |
| 36 | gpa_t vapic_addr; | 36 | gpa_t vapic_addr; |
| 37 | struct page *vapic_page; | 37 | struct gfn_to_hva_cache vapic_cache; |
| 38 | unsigned long pending_events; | 38 | unsigned long pending_events; |
| 39 | unsigned int sipi_vector; | 39 | unsigned int sipi_vector; |
| 40 | }; | 40 | }; |
| @@ -76,7 +76,7 @@ void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data); | |||
| 76 | void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset); | 76 | void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset); |
| 77 | void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector); | 77 | void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector); |
| 78 | 78 | ||
| 79 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); | 79 | int kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); |
| 80 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); | 80 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); |
| 81 | void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu); | 81 | void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu); |
| 82 | 82 | ||
diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c index daff69e21150..1185fe7a7f47 100644 --- a/arch/x86/kvm/mmu_audit.c +++ b/arch/x86/kvm/mmu_audit.c | |||
| @@ -296,4 +296,4 @@ static struct kernel_param_ops audit_param_ops = { | |||
| 296 | .get = param_get_bool, | 296 | .get = param_get_bool, |
| 297 | }; | 297 | }; |
| 298 | 298 | ||
| 299 | module_param_cb(mmu_audit, &audit_param_ops, &mmu_audit, 0644); | 299 | arch_param_cb(mmu_audit, &audit_param_ops, &mmu_audit, 0644); |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 21ef1ba184ae..5d004da1e35d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -3214,8 +3214,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, | |||
| 3214 | r = -EFAULT; | 3214 | r = -EFAULT; |
| 3215 | if (copy_from_user(&va, argp, sizeof va)) | 3215 | if (copy_from_user(&va, argp, sizeof va)) |
| 3216 | goto out; | 3216 | goto out; |
| 3217 | r = 0; | 3217 | r = kvm_lapic_set_vapic_addr(vcpu, va.vapic_addr); |
| 3218 | kvm_lapic_set_vapic_addr(vcpu, va.vapic_addr); | ||
| 3219 | break; | 3218 | break; |
| 3220 | } | 3219 | } |
| 3221 | case KVM_X86_SETUP_MCE: { | 3220 | case KVM_X86_SETUP_MCE: { |
| @@ -5739,36 +5738,6 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu) | |||
| 5739 | !kvm_event_needs_reinjection(vcpu); | 5738 | !kvm_event_needs_reinjection(vcpu); |
| 5740 | } | 5739 | } |
| 5741 | 5740 | ||
| 5742 | static int vapic_enter(struct kvm_vcpu *vcpu) | ||
| 5743 | { | ||
| 5744 | struct kvm_lapic *apic = vcpu->arch.apic; | ||
| 5745 | struct page *page; | ||
| 5746 | |||
| 5747 | if (!apic || !apic->vapic_addr) | ||
| 5748 | return 0; | ||
| 5749 | |||
| 5750 | page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); | ||
| 5751 | if (is_error_page(page)) | ||
| 5752 | return -EFAULT; | ||
| 5753 | |||
| 5754 | vcpu->arch.apic->vapic_page = page; | ||
| 5755 | return 0; | ||
| 5756 | } | ||
| 5757 | |||
| 5758 | static void vapic_exit(struct kvm_vcpu *vcpu) | ||
| 5759 | { | ||
| 5760 | struct kvm_lapic *apic = vcpu->arch.apic; | ||
| 5761 | int idx; | ||
| 5762 | |||
| 5763 | if (!apic || !apic->vapic_addr) | ||
| 5764 | return; | ||
| 5765 | |||
| 5766 | idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
| 5767 | kvm_release_page_dirty(apic->vapic_page); | ||
| 5768 | mark_page_dirty(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); | ||
| 5769 | srcu_read_unlock(&vcpu->kvm->srcu, idx); | ||
| 5770 | } | ||
| 5771 | |||
| 5772 | static void update_cr8_intercept(struct kvm_vcpu *vcpu) | 5741 | static void update_cr8_intercept(struct kvm_vcpu *vcpu) |
| 5773 | { | 5742 | { |
| 5774 | int max_irr, tpr; | 5743 | int max_irr, tpr; |
| @@ -6069,11 +6038,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 6069 | struct kvm *kvm = vcpu->kvm; | 6038 | struct kvm *kvm = vcpu->kvm; |
| 6070 | 6039 | ||
| 6071 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); | 6040 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); |
| 6072 | r = vapic_enter(vcpu); | ||
| 6073 | if (r) { | ||
| 6074 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); | ||
| 6075 | return r; | ||
| 6076 | } | ||
| 6077 | 6041 | ||
| 6078 | r = 1; | 6042 | r = 1; |
| 6079 | while (r > 0) { | 6043 | while (r > 0) { |
| @@ -6132,8 +6096,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 6132 | 6096 | ||
| 6133 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); | 6097 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); |
| 6134 | 6098 | ||
| 6135 | vapic_exit(vcpu); | ||
| 6136 | |||
| 6137 | return r; | 6099 | return r; |
| 6138 | } | 6100 | } |
| 6139 | 6101 | ||
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index a7cccb6d7fec..c96314abd144 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
| @@ -61,6 +61,7 @@ void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | |||
| 61 | #if PAGETABLE_LEVELS > 2 | 61 | #if PAGETABLE_LEVELS > 2 |
| 62 | void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | 62 | void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) |
| 63 | { | 63 | { |
| 64 | struct page *page = virt_to_page(pmd); | ||
| 64 | paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); | 65 | paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); |
| 65 | /* | 66 | /* |
| 66 | * NOTE! For PAE, any changes to the top page-directory-pointer-table | 67 | * NOTE! For PAE, any changes to the top page-directory-pointer-table |
| @@ -69,7 +70,8 @@ void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | |||
| 69 | #ifdef CONFIG_X86_PAE | 70 | #ifdef CONFIG_X86_PAE |
| 70 | tlb->need_flush_all = 1; | 71 | tlb->need_flush_all = 1; |
| 71 | #endif | 72 | #endif |
| 72 | tlb_remove_page(tlb, virt_to_page(pmd)); | 73 | pgtable_pmd_page_dtor(page); |
| 74 | tlb_remove_page(tlb, page); | ||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | #if PAGETABLE_LEVELS > 3 | 77 | #if PAGETABLE_LEVELS > 3 |
| @@ -209,7 +211,7 @@ static int preallocate_pmds(pmd_t *pmds[]) | |||
| 209 | if (!pmd) | 211 | if (!pmd) |
| 210 | failed = true; | 212 | failed = true; |
| 211 | if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { | 213 | if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { |
| 212 | free_page((unsigned long)pmds[i]); | 214 | free_page((unsigned long)pmd); |
| 213 | pmd = NULL; | 215 | pmd = NULL; |
| 214 | failed = true; | 216 | failed = true; |
| 215 | } | 217 | } |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 7fb24e53d4c8..4f25ec077552 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -518,7 +518,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | |||
| 518 | sd = &info->sd; | 518 | sd = &info->sd; |
| 519 | sd->domain = domain; | 519 | sd->domain = domain; |
| 520 | sd->node = node; | 520 | sd->node = node; |
| 521 | sd->acpi = device->handle; | 521 | sd->companion = device; |
| 522 | /* | 522 | /* |
| 523 | * Maybe the desired pci bus has been already scanned. In such case | 523 | * Maybe the desired pci bus has been already scanned. In such case |
| 524 | * it is unnecessary to scan the pci bus with the given domain,busnum. | 524 | * it is unnecessary to scan the pci bus with the given domain,busnum. |
| @@ -589,7 +589,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | |||
| 589 | { | 589 | { |
| 590 | struct pci_sysdata *sd = bridge->bus->sysdata; | 590 | struct pci_sysdata *sd = bridge->bus->sysdata; |
| 591 | 591 | ||
| 592 | ACPI_HANDLE_SET(&bridge->dev, sd->acpi); | 592 | ACPI_COMPANION_SET(&bridge->dev, sd->companion); |
| 593 | return 0; | 593 | return 0; |
| 594 | } | 594 | } |
| 595 | 595 | ||
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c index 6599a0027b76..81b506d5befd 100644 --- a/arch/x86/platform/efi/early_printk.c +++ b/arch/x86/platform/efi/early_printk.c | |||
| @@ -142,7 +142,7 @@ early_efi_write(struct console *con, const char *str, unsigned int num) | |||
| 142 | efi_y += font->height; | 142 | efi_y += font->height; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | if (efi_y + font->height >= si->lfb_height) { | 145 | if (efi_y + font->height > si->lfb_height) { |
| 146 | u32 i; | 146 | u32 i; |
| 147 | 147 | ||
| 148 | efi_y -= font->height; | 148 | efi_y -= font->height; |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 92c02344a060..cceb813044ef 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
| @@ -690,13 +690,6 @@ void __init efi_init(void) | |||
| 690 | 690 | ||
| 691 | set_bit(EFI_MEMMAP, &x86_efi_facility); | 691 | set_bit(EFI_MEMMAP, &x86_efi_facility); |
| 692 | 692 | ||
| 693 | #ifdef CONFIG_X86_32 | ||
| 694 | if (efi_is_native()) { | ||
| 695 | x86_platform.get_wallclock = efi_get_time; | ||
| 696 | x86_platform.set_wallclock = efi_set_rtc_mmss; | ||
| 697 | } | ||
| 698 | #endif | ||
| 699 | |||
| 700 | #if EFI_DEBUG | 693 | #if EFI_DEBUG |
| 701 | print_efi_memmap(); | 694 | print_efi_memmap(); |
| 702 | #endif | 695 | #endif |
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index 0f92173a12b6..efe4d7220397 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
| @@ -1070,12 +1070,13 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | |||
| 1070 | unsigned long status; | 1070 | unsigned long status; |
| 1071 | 1071 | ||
| 1072 | bcp = &per_cpu(bau_control, cpu); | 1072 | bcp = &per_cpu(bau_control, cpu); |
| 1073 | stat = bcp->statp; | ||
| 1074 | stat->s_enters++; | ||
| 1075 | 1073 | ||
| 1076 | if (bcp->nobau) | 1074 | if (bcp->nobau) |
| 1077 | return cpumask; | 1075 | return cpumask; |
| 1078 | 1076 | ||
| 1077 | stat = bcp->statp; | ||
| 1078 | stat->s_enters++; | ||
| 1079 | |||
| 1079 | if (bcp->busy) { | 1080 | if (bcp->busy) { |
| 1080 | descriptor_status = | 1081 | descriptor_status = |
| 1081 | read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0); | 1082 | read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0); |
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index 88692871823f..9cac82588cbc 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile | |||
| @@ -73,9 +73,10 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \ | |||
| 73 | -march=i386 -mregparm=3 \ | 73 | -march=i386 -mregparm=3 \ |
| 74 | -include $(srctree)/$(src)/../../boot/code16gcc.h \ | 74 | -include $(srctree)/$(src)/../../boot/code16gcc.h \ |
| 75 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ | 75 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ |
| 76 | -mno-mmx -mno-sse \ | ||
| 76 | $(call cc-option, -ffreestanding) \ | 77 | $(call cc-option, -ffreestanding) \ |
| 77 | $(call cc-option, -fno-toplevel-reorder,\ | 78 | $(call cc-option, -fno-toplevel-reorder,\ |
| 78 | $(call cc-option, -fno-unit-at-a-time)) \ | 79 | $(call cc-option, -fno-unit-at-a-time)) \ |
| 79 | $(call cc-option, -fno-stack-protector) \ | 80 | $(call cc-option, -fno-stack-protector) \ |
| 80 | $(call cc-option, -mpreferred-stack-boundary=2) | 81 | $(call cc-option, -mpreferred-stack-boundary=2) |
| 81 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 82 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
