android_kernel_samsung_msm8976/arch
Chen, Kenneth W a0776ec8e9 [IA64] remove per-cpu ia64_phys_stacked_size_p8
It's not efficient to use a per-cpu variable just to store
how many physical stack register a cpu has.  Ever since the
incarnation of ia64 up till upcoming Montecito processor, that
variable has "glued" to 96. Having a variable in memory means
that the kernel is burning an extra cacheline access on every
syscall and kernel exit path.  Such "static" value is better
served with the instruction patching utility exists today.
Convert ia64_phys_stacked_size_p8 into dynamic insn patching.

This also has a pleasant side effect of eliminating access to
per-cpu area while psr.ic=0 in the kernel exit path. (fixable
for per-cpu DTC work, but why bother?)

There are some concerns with the default value that the instruc-
tion encoded in the kernel image.  It shouldn't be concerned.
The reasons are:

(1) cpu_init() is called at CPU initialization.  In there, we
    find out physical stack register size from PAL and patch
    two instructions in kernel exit code.  The code in question
    can not be executed before the patching is done.

(2) current implementation stores zero in ia64_phys_stacked_size_p8,
    and that's what the current kernel exit path loads the value with.
    With the new code, it is equivalent that we store reg size 96
    in ia64_phys_stacked_size_p8, thus creating a better safety net.
    Given (1) above can never fail, having (2) is just a bonus.

All in all, this patch allow one less memory reference in the kernel
exit path, thus reducing syscall and interrupt return latency; and
avoid polluting potential useful data in the CPU cache.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-02-06 15:04:18 -08:00
..
alpha [PATCH] missing exports of pm_power_off() on alpha and sparc32 2007-01-30 08:39:20 -08:00
arm [ARM] 4117/1: S3C2412: Fix writel() usage in selection code 2007-01-29 10:09:17 +00:00
arm26 [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
avr32 [AVR32] Update ATSTK1000 defconfig: Enable macb by default 2007-01-26 13:19:48 +01:00
cris [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
frv [PATCH] sysctl: remove unused "context" param 2006-12-10 09:55:41 -08:00
h8300 [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
i386 [PATCH] EFI x86: pass firmware call parameters on the stack 2007-02-04 10:27:10 -08:00
ia64 [IA64] remove per-cpu ia64_phys_stacked_size_p8 2007-02-06 15:04:18 -08:00
m32r [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
m68k [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
m68knommu [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
mips [MIPS] Fix typo of "CONFIG_MT_SMP". 2007-01-30 12:10:48 +00:00
parisc [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-01-28 12:45:22 -08:00
ppc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-01-18 10:34:51 +11:00
s390 [PATCH] Fix sparsemem on Cell 2007-01-11 18:18:20 -08:00
sh sh: Fixup SH-2 BUG() trap handling. 2006-12-12 09:11:45 +09:00
sh64 [PATCH] Generic ioremap_page_range: sh64 conversion 2006-12-08 08:28:52 -08:00
sparc [PATCH] sanitize sections for sparc32 smp 2007-02-01 16:17:06 -08:00
sparc64 [SPARC64]: Set g4/g5 properly in sun4v dtlb-prot handling. 2007-01-26 18:56:01 -08:00
um [PATCH] uml: fix signal frame alignment 2007-01-30 16:01:35 -08:00
v850 kconfig: Standardize "depends" -> "depends on" in Kconfig files 2006-12-12 20:04:19 +01:00
x86_64 [PATCH] x86_64 ia32 vDSO: define arch_vma_name 2007-01-26 13:50:58 -08:00
xtensa [PATCH] Xtensa: Add ktermios and minor filename fix 2006-12-13 09:05:50 -08:00