summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/mcheck
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 14:15:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 14:15:16 -0700
commit3b641bf453497d76ea28c5fc1c666f424ead6dcf (patch)
tree84dcc02681b3327afcec98481819935606ec5da3 /arch/x86/kernel/cpu/mcheck
parent4a1f2b0fba89cdb3b2b1be99a7411bfd24d61be5 (diff)
parent4533d86270d7986e00594495dde9a109d6be27ae (diff)
downloadlinux-3.10-3b641bf453497d76ea28c5fc1c666f424ead6dcf.tar.gz
linux-3.10-3b641bf453497d76ea28c5fc1c666f424ead6dcf.tar.bz2
linux-3.10-3b641bf453497d76ea28c5fc1c666f424ead6dcf.zip
Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull miscellaneous x86 fixes from Peter Anvin: "The biggest ones are fixing suspend/resume breakage on 32 bits, and an interrim fix for mapping over holes that allows AMD kit with more than 1 TB. A final solution for the latter is in the works, but involves some fairly invasive changes that will probably mean it will only be appropriate for 3.8." * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, MCE: Remove bios_cmci_threshold sysfs attribute x86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping. x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs() x86/reboot: Remove quirk entry for SBC FITPC x86, suspend: Correct the restore of CR4, EFER; skip computing EFLAGS.ID
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c6
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd.c10
2 files changed, 5 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 29e87d3b284..46cbf868969 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2209,11 +2209,6 @@ static struct dev_ext_attribute dev_attr_cmci_disabled = {
&mce_cmci_disabled
};
-static struct dev_ext_attribute dev_attr_bios_cmci_threshold = {
- __ATTR(bios_cmci_threshold, 0444, device_show_int, NULL),
- &mce_bios_cmci_threshold
-};
-
static struct device_attribute *mce_device_attrs[] = {
&dev_attr_tolerant.attr,
&dev_attr_check_interval.attr,
@@ -2222,7 +2217,6 @@ static struct device_attribute *mce_device_attrs[] = {
&dev_attr_dont_log_ce.attr,
&dev_attr_ignore_ce.attr,
&dev_attr_cmci_disabled.attr,
- &dev_attr_bios_cmci_threshold.attr,
NULL
};
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index c4e916d7737..698b6ec12e0 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -576,12 +576,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
int err = 0;
if (shared_bank[bank]) {
-
nb = node_to_amd_nb(amd_get_nb_id(cpu));
- WARN_ON(!nb);
/* threshold descriptor already initialized on this node? */
- if (nb->bank4) {
+ if (nb && nb->bank4) {
/* yes, use it */
b = nb->bank4;
err = kobject_add(b->kobj, &dev->kobj, name);
@@ -615,8 +613,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
atomic_set(&b->cpus, 1);
/* nb is already initialized, see above */
- WARN_ON(nb->bank4);
- nb->bank4 = b;
+ if (nb) {
+ WARN_ON(nb->bank4);
+ nb->bank4 = b;
+ }
}
err = allocate_threshold_blocks(cpu, bank, 0,