linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] x86: Cleanup and simplify cpu-specific data
@ 2012-02-23 23:57 Kevin Winchester
  2012-02-23 23:57 ` [PATCH v4 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
                   ` (6 more replies)
  0 siblings, 7 replies; 37+ messages in thread
From: Kevin Winchester @ 2012-02-23 23:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Kevin Winchester, H. Peter Anvin, Thomas Gleixner,
	Borislav Petkov, Randy Dunlap, Nick Bowler, linux-kernel

Various per-cpu fields are define in arch/x86/kernel/smpboot.c that are
basically equivalent to the cpu-specific data in struct cpuinfo_x86.
By moving these fields into the structure, a number of codepaths can be
simplified since they no longer need to care about those fields not
existing on !SMP builds.

The size effects on allno (UP) and allyes (MAX_SMP) kernels are as
follows:

   text	   	data	    	bss	    	dec	    	hex	filename
1586721	 	304864	 	506208		2397793	 	249661	vmlinux.allno
1588517	 	304928	 	505920		2399365	 	249c85	vmlinux.allno.after
84706053	13212311	42434560	140352924	85d9d9c	vmlinux.allyes
84705333	13213799	42434560	140353692	85da09c	vmlinux.allyes.afte

As can be seen, the kernels get slighly larger, but the code reduction/
simplification should be enough to compensate for it.

Kevin Winchester (5):
  x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_llc_id to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_sibling_map to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_core_map to a field in struct cpuinfo_x86
  x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings
    into common.c

 arch/x86/include/asm/perf_event_p4.h  |   14 +----
 arch/x86/include/asm/processor.h      |   10 ++++
 arch/x86/include/asm/smp.h            |   26 +---------
 arch/x86/include/asm/topology.h       |   10 ++--
 arch/x86/kernel/apic/apic_numachip.c  |    2 +-
 arch/x86/kernel/cpu/amd.c             |   18 ++-----
 arch/x86/kernel/cpu/common.c          |    7 ++-
 arch/x86/kernel/cpu/intel_cacheinfo.c |   19 ++-----
 arch/x86/kernel/cpu/mcheck/mce_amd.c  |    9 ++--
 arch/x86/kernel/cpu/perf_event_p4.c   |    4 +-
 arch/x86/kernel/cpu/proc.c            |    8 +--
 arch/x86/kernel/cpu/topology.c        |    2 -
 arch/x86/kernel/process.c             |    3 +-
 arch/x86/kernel/smpboot.c             |   95 +++++++++++++--------------------
 arch/x86/kernel/tsc_sync.c            |    2 +-
 arch/x86/oprofile/nmi_int.c           |    6 --
 arch/x86/oprofile/op_model_p4.c       |   11 +----
 arch/x86/xen/smp.c                    |    6 --
 drivers/cpufreq/acpi-cpufreq.c        |    2 +-
 drivers/cpufreq/p4-clockmod.c         |    4 +-
 drivers/cpufreq/powernow-k8.c         |   13 +----
 drivers/cpufreq/speedstep-ich.c       |    6 +-
 drivers/hwmon/coretemp.c              |    6 +--
 23 files changed, 92 insertions(+), 191 deletions(-)

-- 
1.7.9.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2012-05-07  8:32 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 23:57 [PATCH v4 0/5] x86: Cleanup and simplify cpu-specific data Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester
2012-02-24 11:47 ` [PATCH v4 0/5] x86: Cleanup and simplify cpu-specific data Borislav Petkov
2012-02-24 12:22   ` Kevin Winchester
2012-02-24 12:30     ` Borislav Petkov
2012-02-27 11:59 ` Ingo Molnar
2012-02-28  0:52   ` Kevin Winchester
2012-02-28  3:43     ` H. Peter Anvin
2012-02-28  8:24       ` Ingo Molnar
2012-02-28  8:31         ` H. Peter Anvin
2012-03-01 13:06           ` Kevin Winchester
2012-03-01 13:45             ` Ingo Molnar
2012-03-28 22:43   ` [PATCH v5 " Kevin Winchester
2012-03-28 22:43     ` [PATCH v5 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-03-28 22:43     ` [PATCH v5 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-03-28 22:43     ` [PATCH v5 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-03-28 22:43     ` [PATCH v5 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-03-28 22:43     ` [PATCH v5 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester
2012-04-26 18:09     ` [PATCH v5 0/5] x86: Cleanup and simplify cpu-specific data Kevin Winchester
2012-04-26 19:48     ` H. Peter Anvin
     [not found]       ` <CAELBVzAi_yndZbDc0TkXhbqzn2wULpnsFMA_dop=Uvaii8tkqg@mail.gmail.com>
2012-04-26 21:21         ` H. Peter Anvin
2012-04-27 23:37           ` Kevin Winchester
2012-04-29 12:47             ` Borislav Petkov
2012-04-29 22:55               ` Kevin Winchester
2012-04-29 23:33           ` [PATCH v6 " Kevin Winchester
2012-04-29 23:33             ` [PATCH v6 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-04-29 23:37               ` H. Peter Anvin
2012-04-30 15:05                 ` Kevin Winchester
2012-05-07  8:32                   ` Ingo Molnar
2012-04-29 23:33             ` [PATCH v6 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-04-29 23:33             ` [PATCH v6 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-04-29 23:33             ` [PATCH v6 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-04-29 23:33             ` [PATCH v6 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).