diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-24 05:46:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-12 13:28:37 -0400 |
commit | d2946041ff3cbeb0e59db601044025093579bc23 (patch) | |
tree | 1e74c0e2ba61db89097788f69c30214f499d0725 /arch/x86/include | |
parent | b7d11a768b061c307aaaa6242f83da2d2388c756 (diff) |
x86: cache_info: Kill the atomic allocation in amd_init_l3_cache()
It's not a good reason to allocate memory in the smp function call
just because someone thought it's the most conveniant place.
The AMD L3 data is coupled to the northbridge info by a pointer to the
corresponding north bridge data. So allocating it with the northbridge
data and referencing the northbridge in the cache_info code instead
uses less memory and gets rid of that atomic allocation hack in the
smp function call.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Mike Travis <travis@sgi.com>
Link: http://lkml.kernel.org/r/20110723212626.688229918@linutronix.de
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/amd_nb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h index 67f87f257611..8e41071704a5 100644 --- a/arch/x86/include/asm/amd_nb.h +++ b/arch/x86/include/asm/amd_nb.h | |||
@@ -19,9 +19,15 @@ extern int amd_numa_init(void); | |||
19 | extern int amd_get_subcaches(int); | 19 | extern int amd_get_subcaches(int); |
20 | extern int amd_set_subcaches(int, int); | 20 | extern int amd_set_subcaches(int, int); |
21 | 21 | ||
22 | struct amd_l3_cache { | ||
23 | unsigned indices; | ||
24 | u8 subcaches[4]; | ||
25 | }; | ||
26 | |||
22 | struct amd_northbridge { | 27 | struct amd_northbridge { |
23 | struct pci_dev *misc; | 28 | struct pci_dev *misc; |
24 | struct pci_dev *link; | 29 | struct pci_dev *link; |
30 | struct amd_l3_cache l3_cache; | ||
25 | }; | 31 | }; |
26 | 32 | ||
27 | struct amd_northbridge_info { | 33 | struct amd_northbridge_info { |