mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-16 14:27:48 +00:00
2177f80076
Duplicate patches between PSP and 3.2.17 have been dropped from the 3.2.17 series Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
72 lines
2.8 KiB
Diff
72 lines
2.8 KiB
Diff
From e7e6ba91db68ef0028d61a2bf8b9f3965595b944 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Herrmann <andreas.herrmann3@amd.com>
|
|
Date: Thu, 12 Apr 2012 16:48:01 +0200
|
|
Subject: [PATCH 090/165] x86, microcode: Fix sysfs warning during module
|
|
unload on unsupported CPUs
|
|
|
|
commit a956bd6f8583326b18348ab1452b4686778f785d upstream.
|
|
|
|
Loading the microcode driver on an unsupported CPU and subsequently
|
|
unloading the driver causes
|
|
|
|
WARNING: at fs/sysfs/group.c:138 mc_device_remove+0x5f/0x70 [microcode]()
|
|
Hardware name: 01972NG
|
|
sysfs group ffffffffa00013d0 not found for kobject 'cpu0'
|
|
Modules linked in: snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel btusb snd_hda_codec bluetooth thinkpad_acpi rfkill microcode(-) [last unloaded: cfg80211]
|
|
Pid: 4560, comm: modprobe Not tainted 3.4.0-rc2-00002-g258f742 #5
|
|
Call Trace:
|
|
[<ffffffff8103113b>] ? warn_slowpath_common+0x7b/0xc0
|
|
[<ffffffff81031235>] ? warn_slowpath_fmt+0x45/0x50
|
|
[<ffffffff81120e74>] ? sysfs_remove_group+0x34/0x120
|
|
[<ffffffffa00000ef>] ? mc_device_remove+0x5f/0x70 [microcode]
|
|
[<ffffffff81331eb9>] ? subsys_interface_unregister+0x69/0xa0
|
|
[<ffffffff81563526>] ? mutex_lock+0x16/0x40
|
|
[<ffffffffa0000c3e>] ? microcode_exit+0x50/0x92 [microcode]
|
|
[<ffffffff8107051d>] ? sys_delete_module+0x16d/0x260
|
|
[<ffffffff810a0065>] ? wait_iff_congested+0x45/0x110
|
|
[<ffffffff815656af>] ? page_fault+0x1f/0x30
|
|
[<ffffffff81565ba2>] ? system_call_fastpath+0x16/0x1b
|
|
|
|
on recent kernels.
|
|
|
|
This is due to commit 8a25a2fd126c ("cpu: convert 'cpu' and
|
|
'machinecheck' sysdev_class to a regular subsystem") which renders
|
|
commit 6c53cbfced04 ("x86, microcode: Correct sysdev_add error path")
|
|
useless.
|
|
|
|
See http://marc.info/?l=linux-kernel&m=133416246406478
|
|
|
|
Avoid above warning by restoring the old driver behaviour before
|
|
6c53cbfced04 ("x86, microcode: Correct sysdev_add error path").
|
|
|
|
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
|
|
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
|
|
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Link: http://lkml.kernel.org/r/20120411163849.GE4794@alberich.amd.com
|
|
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
|
|
[bwh: Backported to 3.2: deleted line uses sys_dev, not dev]
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
arch/x86/kernel/microcode_core.c | 4 +---
|
|
1 files changed, 1 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
|
|
index 9d46f5e..563a09d 100644
|
|
--- a/arch/x86/kernel/microcode_core.c
|
|
+++ b/arch/x86/kernel/microcode_core.c
|
|
@@ -418,10 +418,8 @@ static int mc_sysdev_add(struct sys_device *sys_dev)
|
|
if (err)
|
|
return err;
|
|
|
|
- if (microcode_init_cpu(cpu) == UCODE_ERROR) {
|
|
- sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
|
|
+ if (microcode_init_cpu(cpu) == UCODE_ERROR)
|
|
return -EINVAL;
|
|
- }
|
|
|
|
return err;
|
|
}
|
|
--
|
|
1.7.7.6
|
|
|