aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel@numascale.com>2014-11-04 03:29:43 -0500
committerThomas Gleixner <tglx@linutronix.de>2014-11-04 12:17:27 -0500
commitb980dcf25d0ee1f0f8c7b6afc0e715a2f5da5ec4 (patch)
treef58ab7230efae35fadbf962abf8319c35ed2a024
parent25e5a76bae106e1673887db09e22b19cb1a86c45 (diff)
x86: numachip: APIC driver cleanups
Drop printing that serves no purpose, as it's printing fixed or known values, and mark constant structure appropriately. Signed-off-by: Daniel J Blueman <daniel@numascale.com> Cc: Steffen Persvold <sp@numascale.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Link: http://lkml.kernel.org/r/1415089784-28779-3-git-send-email-daniel@numascale.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/apic/apic_numachip.c22
-rw-r--r--arch/x86/pci/numachip.c2
2 files changed, 4 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c
index 7a3191232630..c2fd21fed002 100644
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -153,20 +153,8 @@ static int __init numachip_probe(void)
153 return apic == &apic_numachip; 153 return apic == &apic_numachip;
154} 154}
155 155
156static void __init map_csrs(void)
157{
158 printk(KERN_INFO "NumaChip: Mapping local CSR space (%016llx - %016llx)\n",
159 NUMACHIP_LCSR_BASE, NUMACHIP_LCSR_BASE + NUMACHIP_LCSR_SIZE - 1);
160 init_extra_mapping_uc(NUMACHIP_LCSR_BASE, NUMACHIP_LCSR_SIZE);
161
162 printk(KERN_INFO "NumaChip: Mapping global CSR space (%016llx - %016llx)\n",
163 NUMACHIP_GCSR_BASE, NUMACHIP_GCSR_BASE + NUMACHIP_GCSR_SIZE - 1);
164 init_extra_mapping_uc(NUMACHIP_GCSR_BASE, NUMACHIP_GCSR_SIZE);
165}
166
167static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) 156static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
168{ 157{
169
170 if (c->phys_proc_id != node) { 158 if (c->phys_proc_id != node) {
171 c->phys_proc_id = node; 159 c->phys_proc_id = node;
172 per_cpu(cpu_llc_id, smp_processor_id()) = node; 160 per_cpu(cpu_llc_id, smp_processor_id()) = node;
@@ -175,19 +163,15 @@ static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
175 163
176static int __init numachip_system_init(void) 164static int __init numachip_system_init(void)
177{ 165{
178 unsigned int val;
179
180 if (!numachip_system) 166 if (!numachip_system)
181 return 0; 167 return 0;
182 168
169 init_extra_mapping_uc(NUMACHIP_LCSR_BASE, NUMACHIP_LCSR_SIZE);
170 init_extra_mapping_uc(NUMACHIP_GCSR_BASE, NUMACHIP_GCSR_SIZE);
171
183 x86_cpuinit.fixup_cpu_id = fixup_cpu_id; 172 x86_cpuinit.fixup_cpu_id = fixup_cpu_id;
184 x86_init.pci.arch_init = pci_numachip_init; 173 x86_init.pci.arch_init = pci_numachip_init;
185 174
186 map_csrs();
187
188 val = read_lcsr(CSR_G0_NODE_IDS);
189 printk(KERN_INFO "NumaChip: Local NodeID = %08x\n", val);
190
191 return 0; 175 return 0;
192} 176}
193early_initcall(numachip_system_init); 177early_initcall(numachip_system_init);
diff --git a/arch/x86/pci/numachip.c b/arch/x86/pci/numachip.c
index 7307d9d12d15..2e565e65c893 100644
--- a/arch/x86/pci/numachip.c
+++ b/arch/x86/pci/numachip.c
@@ -103,7 +103,7 @@ static int pci_mmcfg_write_numachip(unsigned int seg, unsigned int bus,
103 return 0; 103 return 0;
104} 104}
105 105
106const struct pci_raw_ops pci_mmcfg_numachip = { 106static const struct pci_raw_ops pci_mmcfg_numachip = {
107 .read = pci_mmcfg_read_numachip, 107 .read = pci_mmcfg_read_numachip,
108 .write = pci_mmcfg_write_numachip, 108 .write = pci_mmcfg_write_numachip,
109}; 109};