diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2009-11-03 09:29:26 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2009-12-07 13:14:27 -0500 |
commit | f6d6ae965760906d79ab29bc38507608c5971549 (patch) | |
tree | 47424f660be015e280760139465be06c0ff47027 /drivers/edac/amd64_edac.h | |
parent | ba578cb34a71fb08fff14ac0796b934a8c9991e1 (diff) |
amd64_edac: unify MCGCTL ECC switching
Unify almost identical code into one function and remove NUMA-specific
usage (specifically cpumask_of_node()) in favor of generic topology
methods.
Remove unused defines, while at it.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r-- | drivers/edac/amd64_edac.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index c6f359a85207..bba6c944ff13 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h | |||
@@ -147,6 +147,8 @@ | |||
147 | #define MAX_CS_COUNT 8 | 147 | #define MAX_CS_COUNT 8 |
148 | #define DRAM_REG_COUNT 8 | 148 | #define DRAM_REG_COUNT 8 |
149 | 149 | ||
150 | #define ON true | ||
151 | #define OFF false | ||
150 | 152 | ||
151 | /* | 153 | /* |
152 | * PCI-defined configuration space registers | 154 | * PCI-defined configuration space registers |
@@ -386,10 +388,7 @@ enum { | |||
386 | #define K8_NBCAP_DUAL_NODE BIT(1) | 388 | #define K8_NBCAP_DUAL_NODE BIT(1) |
387 | #define K8_NBCAP_DCT_DUAL BIT(0) | 389 | #define K8_NBCAP_DCT_DUAL BIT(0) |
388 | 390 | ||
389 | /* | 391 | /* MSRs */ |
390 | * MSR Regs | ||
391 | */ | ||
392 | #define K8_MSR_MCGCTL 0x017b | ||
393 | #define K8_MSR_MCGCTL_NBE BIT(4) | 392 | #define K8_MSR_MCGCTL_NBE BIT(4) |
394 | 393 | ||
395 | #define K8_MSR_MC4CTL 0x0410 | 394 | #define K8_MSR_MC4CTL 0x0410 |
@@ -487,7 +486,6 @@ struct amd64_pvt { | |||
487 | /* Save old hw registers' values before we modified them */ | 486 | /* Save old hw registers' values before we modified them */ |
488 | u32 nbctl_mcgctl_saved; /* When true, following 2 are valid */ | 487 | u32 nbctl_mcgctl_saved; /* When true, following 2 are valid */ |
489 | u32 old_nbctl; | 488 | u32 old_nbctl; |
490 | unsigned long old_mcgctl; /* per core on this node */ | ||
491 | 489 | ||
492 | /* MC Type Index value: socket F vs Family 10h */ | 490 | /* MC Type Index value: socket F vs Family 10h */ |
493 | u32 mc_type_index; | 491 | u32 mc_type_index; |
@@ -495,6 +493,7 @@ struct amd64_pvt { | |||
495 | /* misc settings */ | 493 | /* misc settings */ |
496 | struct flags { | 494 | struct flags { |
497 | unsigned long cf8_extcfg:1; | 495 | unsigned long cf8_extcfg:1; |
496 | unsigned long ecc_report:1; | ||
498 | } flags; | 497 | } flags; |
499 | }; | 498 | }; |
500 | 499 | ||