Skip to contentSkip to conversation

x86, apic: move APIC drivers to arch/x86/kernel/apic/*

tip:perfcounters/core Yinghai Lu 2 participants 5 messages Feb 17, 2009 1 message not in the archive x86

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Yinghai Lu

author
#1 lore raw

could move probe_32.c es7000_32.c numaq_32.c summit_32.c to apic/ too

YH

Quoted 141 lines · Ingo Molnar
Author:     Ingo Molnar <[email protected]>
AuthorDate: Tue, 17 Feb 2009 18:09:24 +0100
Commit:     Ingo Molnar <[email protected]>
CommitDate: Tue, 17 Feb 2009 18:17:36 +0100

x86, apic: move APIC drivers to arch/x86/kernel/apic/*

arch/x86/kernel/ is getting a bit crowded, and the APIC drivers are scattered into various different files.

Move them to arch/x86/kernel/apic/*, and also remove the 'gen' prefix from those which had it.

Also move APIC related functionality: the IO-APIC driver, the NMI and the IPI code.

---
 arch/x86/kernel/Makefile                           |   27 ++++++++-----------
 arch/x86/kernel/apic/Makefile                      |   15 +++++++++++
 arch/x86/kernel/{ => apic}/apic.c                  |    0
 arch/x86/kernel/{genapic_64.c => apic/apic_64.c}   |    0
 .../{genapic_flat_64.c => apic/apic_flat_64.c}     |    0
 arch/x86/kernel/{ => apic}/io_apic.c               |    0
 arch/x86/kernel/{ => apic}/ipi.c                   |    0
 arch/x86/kernel/{ => apic}/nmi.c                   |    0
 .../{genx2apic_cluster.c => apic/x2apic_cluster.c} |    0
 .../{genx2apic_phys.c => apic/x2apic_phys.c}       |    0
 .../{genx2apic_uv_x.c => apic/x2apic_uv_x.c}       |    0
 11 files changed, 26 insertions(+), 16 deletions(-)
arch/x86/kernel/Makefile +11 -16
index 1cefd21..9139ff6 100644
@@ -58,13 +58,12 @@ obj-$(CONFIG_PCI)		+= early-quirks.o
 apm-y				:= apm_32.o
 obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_SMP)		+= smp.o
-obj-$(CONFIG_SMP)		+= smpboot.o tsc_sync.o ipi.o
+obj-$(CONFIG_SMP)		+= smpboot.o tsc_sync.o
 obj-$(CONFIG_SMP)		+= setup_percpu.o
 obj-$(CONFIG_X86_64_SMP)	+= tsc_sync.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline_$(BITS).o
 obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
-obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o ipi.o
-obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
+obj-$(CONFIG_X86_LOCAL_APIC)	+= apic/
 obj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
 obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
 obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
@@ -116,17 +115,13 @@ obj-$(CONFIG_SWIOTLB)			+= pci-swiotlb_64.o # NB rename without _64
 ###
 # 64 bit specific files
 ifeq ($(CONFIG_X86_64),y)
-        obj-y				+= genapic_64.o genapic_flat_64.o
-        obj-$(CONFIG_X86_X2APIC)	+= genx2apic_cluster.o
-        obj-$(CONFIG_X86_X2APIC)	+= genx2apic_phys.o
-	obj-$(CONFIG_X86_UV)		+= genx2apic_uv_x.o tlb_uv.o
-	obj-$(CONFIG_X86_UV)		+= bios_uv.o uv_irq.o uv_sysfs.o
-        obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer_64.o
-        obj-$(CONFIG_AUDIT)		+= audit_64.o
-
-        obj-$(CONFIG_GART_IOMMU)	+= pci-gart_64.o aperture_64.o
-        obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
-        obj-$(CONFIG_AMD_IOMMU)		+= amd_iommu_init.o amd_iommu.o
-
-        obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
+	obj-$(CONFIG_X86_UV)		+= tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o
+	obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer_64.o
+	obj-$(CONFIG_AUDIT)		+= audit_64.o
+
+	obj-$(CONFIG_GART_IOMMU)	+= pci-gart_64.o aperture_64.o
+	obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
+	obj-$(CONFIG_AMD_IOMMU)		+= amd_iommu_init.o amd_iommu.o
+
+	obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
 endif
arch/x86/kernel/apic/Makefile new file +15 -0
new file mode 100644
index 0000000..da20b70
@@ -0,0 +1,15 @@
+#
+# Makefile for local APIC drivers and for the IO-APIC code
+#
+
+obj-y				:= apic.o ipi.o nmi.o
+obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
+obj-$(CONFIG_SMP)		+= ipi.o
+
+ifeq ($(CONFIG_X86_64),y)
+obj-y				+= apic_64.o apic_flat_64.o
+obj-$(CONFIG_X86_X2APIC)	+= x2apic_cluster.o
+obj-$(CONFIG_X86_X2APIC)	+= x2apic_phys.o
+obj-$(CONFIG_X86_UV)		+= x2apic_uv_x.o
+endif
+
arch/x86/kernel/apic/apic.c renamed from arch/x86/kernel/apic.c +0 -0
similarity index 100%
rename from arch/x86/kernel/apic.c
rename to arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/apic_64.c renamed from arch/x86/kernel/genapic_64.c +0 -0
similarity index 100%
rename from arch/x86/kernel/genapic_64.c
rename to arch/x86/kernel/apic/apic_64.c
arch/x86/kernel/apic/apic_flat_64.c renamed from arch/x86/kernel/genapic_flat_64.c +0 -0
similarity index 100%
rename from arch/x86/kernel/genapic_flat_64.c
rename to arch/x86/kernel/apic/apic_flat_64.c
arch/x86/kernel/apic/io_apic.c renamed from arch/x86/kernel/io_apic.c +0 -0
similarity index 100%
rename from arch/x86/kernel/io_apic.c
rename to arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/ipi.c renamed from arch/x86/kernel/ipi.c +0 -0
similarity index 100%
rename from arch/x86/kernel/ipi.c
rename to arch/x86/kernel/apic/ipi.c
arch/x86/kernel/apic/nmi.c renamed from arch/x86/kernel/nmi.c +0 -0
similarity index 100%
rename from arch/x86/kernel/nmi.c
rename to arch/x86/kernel/apic/nmi.c
arch/x86/kernel/apic/x2apic_cluster.c renamed from arch/x86/kernel/genx2apic_cluster.c +0 -0
similarity index 100%
rename from arch/x86/kernel/genx2apic_cluster.c
rename to arch/x86/kernel/apic/x2apic_cluster.c
arch/x86/kernel/apic/x2apic_phys.c renamed from arch/x86/kernel/genx2apic_phys.c +0 -0
similarity index 100%
rename from arch/x86/kernel/genx2apic_phys.c
rename to arch/x86/kernel/apic/x2apic_phys.c
arch/x86/kernel/apic/x2apic_uv_x.c renamed from arch/x86/kernel/genx2apic_uv_x.c +0 -1
similarity index 100%
rename from arch/x86/kernel/genx2apic_uv_x.c
rename to arch/x86/kernel/apic/x2apic_uv_x.c
--

To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 2 lines · Yinghai Lu

could move probe_32.c es7000_32.c numaq_32.c summit_32.c to apic/ too

yeah, that's indeed the plan, just didnt get around testing that yet.

Ingo

#3 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 2 lines · Yinghai Lu

could move probe_32.c es7000_32.c numaq_32.c summit_32.c to apic/ too

yeah, that's indeed the plan, just didnt get around testing that yet.

Below is the commit. Beyond what you listed, i moved bigsmp_32.c too. By renaming apic_64.c to probe_64.c we get the probing code mostly consolidated as well.

Ingo

---------------->

Quoted 1 line

From 2a05180fe2e5b414f0cb2ccfc80e6c90563e3c67 Mon Sep 17 00:00:00 2001

From: Ingo Molnar <[email protected]>
Date: Tue, 17 Feb 2009 20:35:16 +0100
Subject: [PATCH] x86, apic: move remaining APIC drivers to arch/x86/kernel/apic/*

Move the 32-bit extended-arch APIC drivers to arch/x86/kernel/apic/ too, and rename apic_64.c to probe_64.c.

---
 arch/x86/kernel/Makefile                       |    6 +-----
 arch/x86/kernel/apic/Makefile                  |    9 +++++++--
 arch/x86/kernel/{ => apic}/bigsmp_32.c         |    0
 arch/x86/kernel/{ => apic}/es7000_32.c         |    0
 arch/x86/kernel/{ => apic}/numaq_32.c          |    0
 arch/x86/kernel/{ => apic}/probe_32.c          |    0
 arch/x86/kernel/apic/{apic_64.c => probe_64.c} |    0
 arch/x86/kernel/{ => apic}/summit_32.c         |    0
 8 files changed, 8 insertions(+), 7 deletions(-)
arch/x86/kernel/Makefile +1 -5
index 9139ff6..c70537d 100644
@@ -30,7 +30,7 @@ obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
 obj-y			+= time_$(BITS).o ioport.o ldt.o dumpstack.o
 obj-y			+= setup.o i8259.o irqinit_$(BITS).o
 obj-$(CONFIG_X86_VISWS)	+= visws_quirks.o
-obj-$(CONFIG_X86_32)	+= probe_32.o probe_roms_32.o
+obj-$(CONFIG_X86_32)	+= probe_roms_32.o
 obj-$(CONFIG_X86_32)	+= sys_i386_32.o i386_ksyms_32.o
 obj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
 obj-$(CONFIG_X86_64)	+= syscall_64.o vsyscall_64.o
@@ -70,10 +70,6 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
 obj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
 obj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
-obj-$(CONFIG_X86_BIGSMP)	+= bigsmp_32.o
-obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
-obj-$(CONFIG_X86_ES7000)	+= es7000_32.o
-obj-$(CONFIG_X86_SUMMIT)	+= summit_32.o
 obj-y				+= vsmp_64.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_MODULES)		+= module_$(BITS).o
arch/x86/kernel/apic/Makefile +7 -2
index da20b70..97f558d 100644
@@ -2,14 +2,19 @@
 # Makefile for local APIC drivers and for the IO-APIC code
 #
 
-obj-y				:= apic.o ipi.o nmi.o
+obj-y				:= apic.o probe_$(BITS).o ipi.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
+obj-$
 
 ifeq ($(CONFIG_X86_64),y)
-obj-y				+= apic_64.o apic_flat_64.o
+obj-y				+= apic_flat_64.o
 obj-$(CONFIG_X86_X2APIC)	+= x2apic_cluster.o
 obj-$(CONFIG_X86_X2APIC)	+= x2apic_phys.o
 obj-$(CONFIG_X86_UV)		+= x2apic_uv_x.o
 endif
 
+obj-$(CONFIG_X86_BIGSMP)	+= bigsmp_32.o
+obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
+obj-$(CONFIG_X86_ES7000)	+= es7000_32.o
+obj-$(CONFIG_X86_SUMMIT)	+= summit_32.o
arch/x86/kernel/apic/bigsmp_32.c renamed from arch/x86/kernel/bigsmp_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/bigsmp_32.c
rename to arch/x86/kernel/apic/bigsmp_32.c
arch/x86/kernel/apic/es7000_32.c renamed from arch/x86/kernel/es7000_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/es7000_32.c
rename to arch/x86/kernel/apic/es7000_32.c
arch/x86/kernel/apic/numaq_32.c renamed from arch/x86/kernel/numaq_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/numaq_32.c
rename to arch/x86/kernel/apic/numaq_32.c
arch/x86/kernel/apic/probe_32.c renamed from arch/x86/kernel/probe_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/probe_32.c
rename to arch/x86/kernel/apic/probe_32.c
arch/x86/kernel/apic/probe_64.c renamed from arch/x86/kernel/apic/apic_64.c +0 -0
similarity index 100%
rename from arch/x86/kernel/apic/apic_64.c
rename to arch/x86/kernel/apic/probe_64.c
arch/x86/kernel/apic/summit_32.c renamed from arch/x86/kernel/summit_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/summit_32.c
rename to arch/x86/kernel/apic/summit_32.c
author
#4 lore raw

it seems you forgot to push it out.

YH

Quoted 114 lines · Ingo Molnar
Quoted 6 lines · Ingo Molnar
Quoted 2 lines · Yinghai Lu

could move probe_32.c es7000_32.c numaq_32.c summit_32.c to apic/ too

yeah, that's indeed the plan, just didnt get around testing that yet.

Below is the commit. Beyond what you listed, i moved bigsmp_32.c too. By renaming apic_64.c to probe_64.c we get the probing code mostly consolidated as well.

Ingo

---------------->

Quoted 1 line

From 2a05180fe2e5b414f0cb2ccfc80e6c90563e3c67 Mon Sep 17 00:00:00 2001

From: Ingo Molnar <[email protected]>
Date: Tue, 17 Feb 2009 20:35:16 +0100
Subject: [PATCH] x86, apic: move remaining APIC drivers to arch/x86/kernel/apic/*

Move the 32-bit extended-arch APIC drivers to arch/x86/kernel/apic/ too, and rename apic_64.c to probe_64.c.

---
 arch/x86/kernel/Makefile                       |    6 +-----
 arch/x86/kernel/apic/Makefile                  |    9 +++++++--
 arch/x86/kernel/{ => apic}/bigsmp_32.c         |    0
 arch/x86/kernel/{ => apic}/es7000_32.c         |    0
 arch/x86/kernel/{ => apic}/numaq_32.c          |    0
 arch/x86/kernel/{ => apic}/probe_32.c          |    0
 arch/x86/kernel/apic/{apic_64.c => probe_64.c} |    0
 arch/x86/kernel/{ => apic}/summit_32.c         |    0
 8 files changed, 8 insertions(+), 7 deletions(-)
arch/x86/kernel/Makefile +1 -5
index 9139ff6..c70537d 100644
@@ -30,7 +30,7 @@ obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
 obj-y			+= time_$(BITS).o ioport.o ldt.o dumpstack.o
 obj-y			+= setup.o i8259.o irqinit_$(BITS).o
 obj-$(CONFIG_X86_VISWS)	+= visws_quirks.o
-obj-$(CONFIG_X86_32)	+= probe_32.o probe_roms_32.o
+obj-$(CONFIG_X86_32)	+= probe_roms_32.o
 obj-$(CONFIG_X86_32)	+= sys_i386_32.o i386_ksyms_32.o
 obj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
 obj-$(CONFIG_X86_64)	+= syscall_64.o vsyscall_64.o
@@ -70,10 +70,6 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
 obj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
 obj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
-obj-$(CONFIG_X86_BIGSMP)	+= bigsmp_32.o
-obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
-obj-$(CONFIG_X86_ES7000)	+= es7000_32.o
-obj-$(CONFIG_X86_SUMMIT)	+= summit_32.o
 obj-y				+= vsmp_64.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_MODULES)		+= module_$(BITS).o
arch/x86/kernel/apic/Makefile +7 -2
index da20b70..97f558d 100644
@@ -2,14 +2,19 @@
 # Makefile for local APIC drivers and for the IO-APIC code
 #
 
-obj-y				:= apic.o ipi.o nmi.o
+obj-y				:= apic.o probe_$(BITS).o ipi.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
+obj-$
 
 ifeq ($(CONFIG_X86_64),y)
-obj-y				+= apic_64.o apic_flat_64.o
+obj-y				+= apic_flat_64.o
 obj-$(CONFIG_X86_X2APIC)	+= x2apic_cluster.o
 obj-$(CONFIG_X86_X2APIC)	+= x2apic_phys.o
 obj-$(CONFIG_X86_UV)		+= x2apic_uv_x.o
 endif
 
+obj-$(CONFIG_X86_BIGSMP)	+= bigsmp_32.o
+obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
+obj-$(CONFIG_X86_ES7000)	+= es7000_32.o
+obj-$(CONFIG_X86_SUMMIT)	+= summit_32.o
arch/x86/kernel/apic/bigsmp_32.c renamed from arch/x86/kernel/bigsmp_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/bigsmp_32.c
rename to arch/x86/kernel/apic/bigsmp_32.c
arch/x86/kernel/apic/es7000_32.c renamed from arch/x86/kernel/es7000_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/es7000_32.c
rename to arch/x86/kernel/apic/es7000_32.c
arch/x86/kernel/apic/numaq_32.c renamed from arch/x86/kernel/numaq_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/numaq_32.c
rename to arch/x86/kernel/apic/numaq_32.c
arch/x86/kernel/apic/probe_32.c renamed from arch/x86/kernel/probe_32.c +0 -0
similarity index 100%
rename from arch/x86/kernel/probe_32.c
rename to arch/x86/kernel/apic/probe_32.c
arch/x86/kernel/apic/probe_64.c renamed from arch/x86/kernel/apic/apic_64.c +0 -0
similarity index 100%
rename from arch/x86/kernel/apic/apic_64.c
rename to arch/x86/kernel/apic/probe_64.c
arch/x86/kernel/apic/summit_32.c renamed from arch/x86/kernel/summit_32.c +0 -1
similarity index 100%
rename from arch/x86/kernel/summit_32.c
rename to arch/x86/kernel/apic/summit_32.c
--

To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 1 line · Yinghai Lu

it seems you forgot to push it out.

no, i was still testing it. I've pushed it out now.

Ingo