linux/arch
Chris Metcalf 35f059761c tilegx: change how we find the kernel stack
Previously, we used a special-purpose register (SPR_SYSTEM_SAVE_K_0)
to hold the CPU number and the top of the current kernel stack
by using the low bits to hold the CPU number, and using the high
bits to hold the address of the page just above where we'd want
the kernel stack to be.  That way we could initialize a new SP
when first entering the kernel by just masking the SPR value and
subtracting a couple of words.

However, it's actually more useful to be able to place an arbitrary
kernel-top value in the SPR.  This allows us to create a new stack
context (e.g. for virtualization) with an arbitrary top-of-stack VA.
To make this work, we now store the CPU number in the high bits,
above the highest legal VA bit (42 bits in the current tilegx
microarchitecture).  The full 42 bits are thus available to store the
top of stack value.  Getting the current cpu (a relatively common
operation) is still fast; it's now a shift rather than a mask.

We make this change only for tilegx, since tilepro has too few SPR
bits to do this, and we don't need this support on tilepro anyway.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-08-30 11:56:58 -04:00
..
alpha Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
arc Couple of Platform updates (Device Tree files primarily) given that the 2013-07-10 10:11:26 -07:00
arm ARM: SoC fixes for 3.11-rc 2013-07-13 15:00:26 -07:00
arm64 Merge tag 'kvm-3.11-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-07-10 18:17:41 -07:00
avr32 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
blackfin blackfin updates for Linux 3.11 2013-07-10 10:12:58 -07:00
c6x Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
cris net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
frv net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
h8300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
hexagon mm/hexagon: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:36 -07:00
ia64 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
m32r net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
m68k Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
metag arch/metag fixes for v3.11 2013-07-10 10:14:35 -07:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-07-10 10:16:07 -07:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
mn10300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
openrisc mm: invoke oom-killer from remaining unconverted page fault handlers 2013-07-09 10:33:20 -07:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
score mm: invoke oom-killer from remaining unconverted page fault handlers 2013-07-09 10:33:20 -07:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
sparc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
tile tilegx: change how we find the kernel stack 2013-08-30 11:56:58 -04:00
um mm/um: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:37 -07:00
unicore32 reboot: move arch/x86 reboot= handling to generic kernel 2013-07-09 10:33:29 -07:00
x86 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-13 15:35:47 -07:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
.gitignore
Kconfig mm: soft-dirty bits for user memory changes tracking 2013-07-03 16:07:26 -07:00