From: Greg Kroah-Hartman Date: Sun, 8 Feb 2015 02:35:14 +0000 (+0800) Subject: 3.18-stable patches X-Git-Tag: v3.10.69~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7266ac59ac51d135f55660a16e43885cc29c05b3;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: alsa-ak411x-fix-stall-in-work-callback.patch arm-dts-fix-i2s1-i2s2-compatible-for-exynos4-socs.patch asoc-atmel_ssc_dai-fix-start-event-for-i2s-mode.patch asoc-sgtl5000-add-delay-before-first-i2c-access.patch asoc-wm8731-init-mutex-in-i2c-init-path.patch hrtimer-fix-incorrect-tai-offset-calculation-for-non-high-res-timer-systems.patch smpboot-add-missing-get_online_cpus-in-smpboot_register_percpu_thread.patch x86-microcode-return-error-from-driver-init-code-when-loader-is-disabled.patch --- diff --git a/queue-3.18/alsa-ak411x-fix-stall-in-work-callback.patch b/queue-3.18/alsa-ak411x-fix-stall-in-work-callback.patch new file mode 100644 index 00000000000..33cf20565ee --- /dev/null +++ b/queue-3.18/alsa-ak411x-fix-stall-in-work-callback.patch @@ -0,0 +1,151 @@ +From 4161b4505f1690358ac0a9ee59845a7887336b21 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 13 Jan 2015 10:53:20 +0100 +Subject: ALSA: ak411x: Fix stall in work callback + +From: Takashi Iwai + +commit 4161b4505f1690358ac0a9ee59845a7887336b21 upstream. + +When ak4114 work calls its callback and the callback invokes +ak4114_reinit(), it stalls due to flush_delayed_work(). For avoiding +this, control the reentrance by introducing a refcount. Also +flush_delayed_work() is replaced with cancel_delayed_work_sync(). + +The exactly same bug is present in ak4113.c and fixed as well. + +Reported-by: Pavel Hofman +Acked-by: Jaroslav Kysela +Tested-by: Pavel Hofman +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + include/sound/ak4113.h | 2 +- + include/sound/ak4114.h | 2 +- + sound/i2c/other/ak4113.c | 17 ++++++++--------- + sound/i2c/other/ak4114.c | 18 ++++++++---------- + 4 files changed, 18 insertions(+), 21 deletions(-) + +--- a/include/sound/ak4113.h ++++ b/include/sound/ak4113.h +@@ -286,7 +286,7 @@ struct ak4113 { + ak4113_write_t *write; + ak4113_read_t *read; + void *private_data; +- unsigned int init:1; ++ atomic_t wq_processing; + spinlock_t lock; + unsigned char regmap[AK4113_WRITABLE_REGS]; + struct snd_kcontrol *kctls[AK4113_CONTROLS]; +--- a/include/sound/ak4114.h ++++ b/include/sound/ak4114.h +@@ -168,7 +168,7 @@ struct ak4114 { + ak4114_write_t * write; + ak4114_read_t * read; + void * private_data; +- unsigned int init: 1; ++ atomic_t wq_processing; + spinlock_t lock; + unsigned char regmap[6]; + unsigned char txcsb[5]; +--- a/sound/i2c/other/ak4113.c ++++ b/sound/i2c/other/ak4113.c +@@ -56,8 +56,7 @@ static inline unsigned char reg_read(str + + static void snd_ak4113_free(struct ak4113 *chip) + { +- chip->init = 1; /* don't schedule new work */ +- mb(); ++ atomic_inc(&chip->wq_processing); /* don't schedule new work */ + cancel_delayed_work_sync(&chip->work); + kfree(chip); + } +@@ -89,6 +88,7 @@ int snd_ak4113_create(struct snd_card *c + chip->write = write; + chip->private_data = private_data; + INIT_DELAYED_WORK(&chip->work, ak4113_stats); ++ atomic_set(&chip->wq_processing, 0); + + for (reg = 0; reg < AK4113_WRITABLE_REGS ; reg++) + chip->regmap[reg] = pgm[reg]; +@@ -139,13 +139,11 @@ static void ak4113_init_regs(struct ak41 + + void snd_ak4113_reinit(struct ak4113 *chip) + { +- chip->init = 1; +- mb(); +- flush_delayed_work(&chip->work); ++ if (atomic_inc_return(&chip->wq_processing) == 1) ++ cancel_delayed_work_sync(&chip->work); + ak4113_init_regs(chip); + /* bring up statistics / event queing */ +- chip->init = 0; +- if (chip->kctls[0]) ++ if (atomic_dec_and_test(&chip->wq_processing)) + schedule_delayed_work(&chip->work, HZ / 10); + } + EXPORT_SYMBOL_GPL(snd_ak4113_reinit); +@@ -632,8 +630,9 @@ static void ak4113_stats(struct work_str + { + struct ak4113 *chip = container_of(work, struct ak4113, work.work); + +- if (!chip->init) ++ if (atomic_inc_return(&chip->wq_processing) == 1) + snd_ak4113_check_rate_and_errors(chip, chip->check_flags); + +- schedule_delayed_work(&chip->work, HZ / 10); ++ if (atomic_dec_and_test(&chip->wq_processing)) ++ schedule_delayed_work(&chip->work, HZ / 10); + } +--- a/sound/i2c/other/ak4114.c ++++ b/sound/i2c/other/ak4114.c +@@ -66,8 +66,7 @@ static void reg_dump(struct ak4114 *ak41 + + static void snd_ak4114_free(struct ak4114 *chip) + { +- chip->init = 1; /* don't schedule new work */ +- mb(); ++ atomic_inc(&chip->wq_processing); /* don't schedule new work */ + cancel_delayed_work_sync(&chip->work); + kfree(chip); + } +@@ -100,6 +99,7 @@ int snd_ak4114_create(struct snd_card *c + chip->write = write; + chip->private_data = private_data; + INIT_DELAYED_WORK(&chip->work, ak4114_stats); ++ atomic_set(&chip->wq_processing, 0); + + for (reg = 0; reg < 6; reg++) + chip->regmap[reg] = pgm[reg]; +@@ -152,13 +152,11 @@ static void ak4114_init_regs(struct ak41 + + void snd_ak4114_reinit(struct ak4114 *chip) + { +- chip->init = 1; +- mb(); +- flush_delayed_work(&chip->work); ++ if (atomic_inc_return(&chip->wq_processing) == 1) ++ cancel_delayed_work_sync(&chip->work); + ak4114_init_regs(chip); + /* bring up statistics / event queing */ +- chip->init = 0; +- if (chip->kctls[0]) ++ if (atomic_dec_and_test(&chip->wq_processing)) + schedule_delayed_work(&chip->work, HZ / 10); + } + +@@ -612,10 +610,10 @@ static void ak4114_stats(struct work_str + { + struct ak4114 *chip = container_of(work, struct ak4114, work.work); + +- if (!chip->init) ++ if (atomic_inc_return(&chip->wq_processing) == 1) + snd_ak4114_check_rate_and_errors(chip, chip->check_flags); +- +- schedule_delayed_work(&chip->work, HZ / 10); ++ if (atomic_dec_and_test(&chip->wq_processing)) ++ schedule_delayed_work(&chip->work, HZ / 10); + } + + EXPORT_SYMBOL(snd_ak4114_create); diff --git a/queue-3.18/arm-dts-fix-i2s1-i2s2-compatible-for-exynos4-socs.patch b/queue-3.18/arm-dts-fix-i2s1-i2s2-compatible-for-exynos4-socs.patch new file mode 100644 index 00000000000..56168f73623 --- /dev/null +++ b/queue-3.18/arm-dts-fix-i2s1-i2s2-compatible-for-exynos4-socs.patch @@ -0,0 +1,40 @@ +From fddcd300732dad5b822d27de7aa78998dca43162 Mon Sep 17 00:00:00 2001 +From: Sylwester Nawrocki +Date: Tue, 3 Feb 2015 15:06:22 +0100 +Subject: ARM: dts: Fix I2S1, I2S2 compatible for exynos4 SoCs + +From: Sylwester Nawrocki + +commit fddcd300732dad5b822d27de7aa78998dca43162 upstream. + +I2S1, I2S2 on Exynos4 SoC series have limited functionality compared +to I2S0, "samsung,s3c6410-i2s" compatible should be used for them. + +Signed-off-by: Sylwester Nawrocki +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/exynos4.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/exynos4.dtsi ++++ b/arch/arm/boot/dts/exynos4.dtsi +@@ -368,7 +368,7 @@ + }; + + i2s1: i2s@13960000 { +- compatible = "samsung,s5pv210-i2s"; ++ compatible = "samsung,s3c6410-i2s"; + reg = <0x13960000 0x100>; + clocks = <&clock CLK_I2S1>; + clock-names = "iis"; +@@ -378,7 +378,7 @@ + }; + + i2s2: i2s@13970000 { +- compatible = "samsung,s5pv210-i2s"; ++ compatible = "samsung,s3c6410-i2s"; + reg = <0x13970000 0x100>; + clocks = <&clock CLK_I2S2>; + clock-names = "iis"; diff --git a/queue-3.18/asoc-atmel_ssc_dai-fix-start-event-for-i2s-mode.patch b/queue-3.18/asoc-atmel_ssc_dai-fix-start-event-for-i2s-mode.patch new file mode 100644 index 00000000000..3884adacc3e --- /dev/null +++ b/queue-3.18/asoc-atmel_ssc_dai-fix-start-event-for-i2s-mode.patch @@ -0,0 +1,80 @@ +From a43bd7e125143b875caae6d4f9938855b440faaf Mon Sep 17 00:00:00 2001 +From: Bo Shen +Date: Tue, 20 Jan 2015 15:43:16 +0800 +Subject: ASoC: atmel_ssc_dai: fix start event for I2S mode + +From: Bo Shen + +commit a43bd7e125143b875caae6d4f9938855b440faaf upstream. + +According to the I2S specification information as following: + - WS = 0, channel 1 (left) + - WS = 1, channel 2 (right) +So, the start event should be TF/RF falling edge. + +Reported-by: Songjun Wu +Signed-off-by: Bo Shen +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/atmel/atmel_ssc_dai.c | 18 ++++-------------- + 1 file changed, 4 insertions(+), 14 deletions(-) + +--- a/sound/soc/atmel/atmel_ssc_dai.c ++++ b/sound/soc/atmel/atmel_ssc_dai.c +@@ -345,7 +345,6 @@ static int atmel_ssc_hw_params(struct sn + struct atmel_pcm_dma_params *dma_params; + int dir, channels, bits; + u32 tfmr, rfmr, tcmr, rcmr; +- int start_event; + int ret; + int fslen, fslen_ext; + +@@ -454,19 +453,10 @@ static int atmel_ssc_hw_params(struct sn + * The SSC transmit clock is obtained from the BCLK signal on + * on the TK line, and the SSC receive clock is + * generated from the transmit clock. +- * +- * For single channel data, one sample is transferred +- * on the falling edge of the LRC clock. +- * For two channel data, one sample is +- * transferred on both edges of the LRC clock. + */ +- start_event = ((channels == 1) +- ? SSC_START_FALLING_RF +- : SSC_START_EDGE_RF); +- + rcmr = SSC_BF(RCMR_PERIOD, 0) + | SSC_BF(RCMR_STTDLY, START_DELAY) +- | SSC_BF(RCMR_START, start_event) ++ | SSC_BF(RCMR_START, SSC_START_FALLING_RF) + | SSC_BF(RCMR_CKI, SSC_CKI_RISING) + | SSC_BF(RCMR_CKO, SSC_CKO_NONE) + | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? +@@ -475,14 +465,14 @@ static int atmel_ssc_hw_params(struct sn + rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) + | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) + | SSC_BF(RFMR_FSLEN, 0) +- | SSC_BF(RFMR_DATNB, 0) ++ | SSC_BF(RFMR_DATNB, (channels - 1)) + | SSC_BIT(RFMR_MSBF) + | SSC_BF(RFMR_LOOP, 0) + | SSC_BF(RFMR_DATLEN, (bits - 1)); + + tcmr = SSC_BF(TCMR_PERIOD, 0) + | SSC_BF(TCMR_STTDLY, START_DELAY) +- | SSC_BF(TCMR_START, start_event) ++ | SSC_BF(TCMR_START, SSC_START_FALLING_RF) + | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) + | SSC_BF(TCMR_CKO, SSC_CKO_NONE) + | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? +@@ -492,7 +482,7 @@ static int atmel_ssc_hw_params(struct sn + | SSC_BF(TFMR_FSDEN, 0) + | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) + | SSC_BF(TFMR_FSLEN, 0) +- | SSC_BF(TFMR_DATNB, 0) ++ | SSC_BF(TFMR_DATNB, (channels - 1)) + | SSC_BIT(TFMR_MSBF) + | SSC_BF(TFMR_DATDEF, 0) + | SSC_BF(TFMR_DATLEN, (bits - 1)); diff --git a/queue-3.18/asoc-sgtl5000-add-delay-before-first-i2c-access.patch b/queue-3.18/asoc-sgtl5000-add-delay-before-first-i2c-access.patch new file mode 100644 index 00000000000..a329a718b5c --- /dev/null +++ b/queue-3.18/asoc-sgtl5000-add-delay-before-first-i2c-access.patch @@ -0,0 +1,38 @@ +From 58cc9c9a175885bbf6bae3acf18233d0a8229a84 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Fri, 30 Jan 2015 14:07:55 -0700 +Subject: ASoC: sgtl5000: add delay before first I2C access + +From: Eric Nelson + +commit 58cc9c9a175885bbf6bae3acf18233d0a8229a84 upstream. + +To quote from section 1.3.1 of the data sheet: + The SGTL5000 has an internal reset that is deasserted + 8 SYS_MCLK cycles after all power rails have been brought + up. After this time, communication can start + + ... + 1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK. + +Signed-off-by: Eric Nelson +Reviewed-by: Fabio Estevam +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/sgtl5000.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/soc/codecs/sgtl5000.c ++++ b/sound/soc/codecs/sgtl5000.c +@@ -1452,6 +1452,9 @@ static int sgtl5000_i2c_probe(struct i2c + if (ret) + return ret; + ++ /* Need 8 clocks before I2C accesses */ ++ udelay(1); ++ + /* read chip information */ + ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); + if (ret) diff --git a/queue-3.18/asoc-wm8731-init-mutex-in-i2c-init-path.patch b/queue-3.18/asoc-wm8731-init-mutex-in-i2c-init-path.patch new file mode 100644 index 00000000000..b9ea2ee1d56 --- /dev/null +++ b/queue-3.18/asoc-wm8731-init-mutex-in-i2c-init-path.patch @@ -0,0 +1,31 @@ +From 8a6cf30bf93df2c0f2637156e4a5070594bddebf Mon Sep 17 00:00:00 2001 +From: Manuel Lauss +Date: Mon, 19 Jan 2015 08:23:43 +0100 +Subject: ASoC: wm8731: init mutex in i2c init path + +From: Manuel Lauss + +commit 8a6cf30bf93df2c0f2637156e4a5070594bddebf upstream. + +The I2C init path forgot to init the mutex, leading to an oops when +controls are accessed. + +Signed-off-by: Manuel Lauss +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8731.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/soc/codecs/wm8731.c ++++ b/sound/soc/codecs/wm8731.c +@@ -734,6 +734,8 @@ static int wm8731_i2c_probe(struct i2c_c + if (wm8731 == NULL) + return -ENOMEM; + ++ mutex_init(&wm8731->lock); ++ + wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); + if (IS_ERR(wm8731->regmap)) { + ret = PTR_ERR(wm8731->regmap); diff --git a/queue-3.18/hrtimer-fix-incorrect-tai-offset-calculation-for-non-high-res-timer-systems.patch b/queue-3.18/hrtimer-fix-incorrect-tai-offset-calculation-for-non-high-res-timer-systems.patch new file mode 100644 index 00000000000..1809f4dc532 --- /dev/null +++ b/queue-3.18/hrtimer-fix-incorrect-tai-offset-calculation-for-non-high-res-timer-systems.patch @@ -0,0 +1,43 @@ +From 2d926c15d629a13914ce3e5f26354f6a0ac99e70 Mon Sep 17 00:00:00 2001 +From: John Stultz +Date: Wed, 4 Feb 2015 16:45:26 -0800 +Subject: hrtimer: Fix incorrect tai offset calculation for non high-res timer systems + +From: John Stultz + +commit 2d926c15d629a13914ce3e5f26354f6a0ac99e70 upstream. + +I noticed some CLOCK_TAI timer test failures on one of my +less-frequently used configurations. And after digging in I +found in 76f4108892d9 (Cleanup hrtimer accessors to the +timekepeing state), the hrtimer_get_softirq_time tai offset +calucation was incorrectly rewritten, as the tai offset we +return shold be from CLOCK_MONOTONIC, and not CLOCK_REALTIME. + +This results in CLOCK_TAI timers expiring early on non-highres +capable machines. + +This patch fixes the issue, calculating the tai time properly +from the monotonic base. + +Signed-off-by: John Stultz +Cc: Thomas Gleixner +Link: http://lkml.kernel.org/r/1423097126-10236-1-git-send-email-john.stultz@linaro.org +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/hrtimer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/time/hrtimer.c ++++ b/kernel/time/hrtimer.c +@@ -122,7 +122,7 @@ static void hrtimer_get_softirq_time(str + mono = ktime_get_update_offsets_tick(&off_real, &off_boot, &off_tai); + boot = ktime_add(mono, off_boot); + xtim = ktime_add(mono, off_real); +- tai = ktime_add(xtim, off_tai); ++ tai = ktime_add(mono, off_tai); + + base->clock_base[HRTIMER_BASE_REALTIME].softirq_time = xtim; + base->clock_base[HRTIMER_BASE_MONOTONIC].softirq_time = mono; diff --git a/queue-3.18/series b/queue-3.18/series index 4991b023725..788d926dd2c 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -27,3 +27,11 @@ drm-radeon-properly-set-vm-fragment-size-for-tn-rl.patch kconfig-fix-warning-jump-may-be-used-uninitialized.patch arm64-fix-up-proc-cpuinfo.patch lib-checksum.c-fix-build-for-generic-csum_tcpudp_nofold.patch +asoc-wm8731-init-mutex-in-i2c-init-path.patch +asoc-atmel_ssc_dai-fix-start-event-for-i2s-mode.patch +asoc-sgtl5000-add-delay-before-first-i2c-access.patch +alsa-ak411x-fix-stall-in-work-callback.patch +arm-dts-fix-i2s1-i2s2-compatible-for-exynos4-socs.patch +x86-microcode-return-error-from-driver-init-code-when-loader-is-disabled.patch +smpboot-add-missing-get_online_cpus-in-smpboot_register_percpu_thread.patch +hrtimer-fix-incorrect-tai-offset-calculation-for-non-high-res-timer-systems.patch diff --git a/queue-3.18/smpboot-add-missing-get_online_cpus-in-smpboot_register_percpu_thread.patch b/queue-3.18/smpboot-add-missing-get_online_cpus-in-smpboot_register_percpu_thread.patch new file mode 100644 index 00000000000..0d37a38ff49 --- /dev/null +++ b/queue-3.18/smpboot-add-missing-get_online_cpus-in-smpboot_register_percpu_thread.patch @@ -0,0 +1,62 @@ +From 4bee96860a65c3a62d332edac331b3cf936ba3ad Mon Sep 17 00:00:00 2001 +From: Lai Jiangshan +Date: Thu, 31 Jul 2014 11:30:17 +0800 +Subject: smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread() + +From: Lai Jiangshan + +commit 4bee96860a65c3a62d332edac331b3cf936ba3ad upstream. + +The following race exists in the smpboot percpu threads management: + +CPU0 CPU1 +cpu_up(2) + get_online_cpus(); + smpboot_create_threads(2); + smpboot_register_percpu_thread(); + for_each_online_cpu(); + __smpboot_create_thread(); + __cpu_up(2); + +This results in a missing per cpu thread for the newly onlined cpu2 and +in a NULL pointer dereference on a consecutive offline of that cpu. + +Proctect smpboot_register_percpu_thread() with get_online_cpus() to +prevent that. + +[ tglx: Massaged changelog and removed the change in + smpboot_unregister_percpu_thread() because that's an + optimization and therefor not stable material. ] + +Signed-off-by: Lai Jiangshan +Cc: Thomas Gleixner +Cc: Rusty Russell +Cc: Peter Zijlstra +Cc: Srivatsa S. Bhat +Cc: David Rientjes +Link: http://lkml.kernel.org/r/1406777421-12830-1-git-send-email-laijs@cn.fujitsu.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/smpboot.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/kernel/smpboot.c ++++ b/kernel/smpboot.c +@@ -279,6 +279,7 @@ int smpboot_register_percpu_thread(struc + unsigned int cpu; + int ret = 0; + ++ get_online_cpus(); + mutex_lock(&smpboot_threads_lock); + for_each_online_cpu(cpu) { + ret = __smpboot_create_thread(plug_thread, cpu); +@@ -291,6 +292,7 @@ int smpboot_register_percpu_thread(struc + list_add(&plug_thread->list, &hotplug_threads); + out: + mutex_unlock(&smpboot_threads_lock); ++ put_online_cpus(); + return ret; + } + EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread); diff --git a/queue-3.18/x86-microcode-return-error-from-driver-init-code-when-loader-is-disabled.patch b/queue-3.18/x86-microcode-return-error-from-driver-init-code-when-loader-is-disabled.patch new file mode 100644 index 00000000000..a782f0a446f --- /dev/null +++ b/queue-3.18/x86-microcode-return-error-from-driver-init-code-when-loader-is-disabled.patch @@ -0,0 +1,43 @@ +From da63865a01c6384d459464e5165d95d4f04878d8 Mon Sep 17 00:00:00 2001 +From: Boris Ostrovsky +Date: Tue, 27 Jan 2015 21:21:09 -0500 +Subject: x86, microcode: Return error from driver init code when loader is disabled + +From: Boris Ostrovsky + +commit da63865a01c6384d459464e5165d95d4f04878d8 upstream. + +Commits 65cef1311d5d ("x86, microcode: Add a disable chicken bit") and +a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on +paravirt") allow microcode driver skip initialization when microcode +loading is not permitted. + +However, they don't prevent the driver from being loaded since the +init code returns 0. If at some point later the driver gets unloaded +this will result in an oops while trying to deregister the (never +registered) device. + +To avoid this, make init code return an error on paravirt or when +microcode loading is disabled. The driver will then never be loaded. + +Signed-off-by: Boris Ostrovsky +Link: http://lkml.kernel.org/r/1422411669-25147-1-git-send-email-boris.ostrovsky@oracle.com +Reported-by: James Digwall +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/microcode/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/cpu/microcode/core.c ++++ b/arch/x86/kernel/cpu/microcode/core.c +@@ -552,7 +552,7 @@ static int __init microcode_init(void) + int error; + + if (paravirt_enabled() || dis_ucode_ldr) +- return 0; ++ return -EINVAL; + + if (c->x86_vendor == X86_VENDOR_INTEL) + microcode_ops = init_intel_microcode();