android_kernel_samsung_msm8976/arch
David S. Miller c9c1083074 [SPARC64]: Fix boot failures on SunBlade-150
The sequence to move over to the Linux trap tables from
the firmware ones needs to be more air tight.  It turns
out that to be %100 safe we do need to be able to translate
OBP mappings in our TLB miss handlers early.

In order not to eat up a lot of kernel image memory with
static page tables, just use the translations array in
the OBP TLB miss handlers.  That solves the bulk of the
problem.

Furthermore, to make sure the OBP TLB miss path will work
even before the fixed MMU globals are loaded, explicitly
load %g1 to TLB_SFSR at the beginning of the i-TLB and
d-TLB miss handlers.

To ease the OBP TLB miss walking of the prom_trans[] array,
we sort it then delete all of the non-OBP entries in there
(for example, there are entries for the kernel image itself
which we're not interested in at all).

We also save about 32K of kernel image size with this change.
Not a bad side effect :-)

There are still some reasons why trampoline.S can't use the
setup_trap_table() yet.  The most noteworthy are:

1) OBP boots secondary processors with non-bias'd stack for
   some reason.  This is easily fixed by using a small bootup
   stack in the kernel image explicitly for this purpose.

2) Doing a firmware call via the normal C call prom_set_trap_table()
   goes through the whole OBP enter/exit sequence that saves and
   restores OBP and Linux kernel state in the MMUs.  This path
   unfortunately does a "flush %g6" while loading up the OBP locked
   TLB entries for the firmware call.

   If we setup the %g6 in the trampoline.S code properly, that
   is in the PAGE_OFFSET linear mapping, but we're not on the
   kernel trap table yet so those addresses won't translate properly.

   One idea is to do a by-hand firmware call like we do in the
   early bootup code and elsewhere here in trampoline.S  But this
   fails as well, as aparently the secondary processors are not
   booted with OBP's special locked TLB entries loaded.  These
   are necessary for the firwmare to processes TLB misses correctly
   up until the point where we take over the trap table.

This does need to be resolved at some point.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-12 12:22:46 -07:00
..
alpha [PATCH] alpha: fix kernel alignment traps 2005-10-02 14:32:49 -07:00
arm [ARM] 2968/1: defconfig for the ARM Collie platform 2005-10-10 18:24:09 +01:00
arm26 [PATCH] Remove arch/arm26/boot/compressed/hw-bse.c 2005-09-17 11:49:59 -07:00
cris [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
frv kbuild: frv,m32r,sparc64 introduce fake asm-offsets.h file 2005-09-09 22:47:53 +02:00
h8300 kbuild: h8300,m68knommu,sh,sh64 use generic asm-offsets.h support 2005-09-09 20:28:49 +02:00
i386 [PATCH] i386: Don't discard upper 32bits of HWCR on K8 2005-10-10 16:34:09 -07:00
ia64 [IA64] Avoid kernel hang during CMC interrupt storm 2005-10-06 15:04:11 -07:00
m32r [PATCH] m32r: trap handler code for illegal traps 2005-10-11 09:46:54 -07:00
m68k Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-09 15:46:49 -07:00
m68knommu [PATCH] m68knommu: startup code for the Drangen Engine 68328 based board 2005-09-12 20:04:15 -07:00
mips [LIB]: Consolidate _atomic_dec_and_lock() 2005-09-14 21:47:01 -07:00
parisc [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
ppc [PATCH] ppc32: Tell userland about lack of standard TB 2005-10-12 08:24:47 -07:00
ppc64 [PATCH] ppc64: Add R_PPC64_TOC16 module reloc 2005-10-11 09:46:54 -07:00
s390 [PATCH] s390 signal annotations 2005-09-29 08:46:27 -07:00
sh kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
sh64 kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
sparc [SPARC32]: Revert IOMAP change eb98129eec 2005-10-10 21:02:26 -07:00
sparc64 [SPARC64]: Fix boot failures on SunBlade-150 2005-10-12 12:22:46 -07:00
um [PATCH] uml: compile-time fix recent patch 2005-10-12 08:22:26 -07:00
v850 [PATCH] V850: C99 initializers for hw_interrupt_type structures 2005-09-10 10:06:27 -07:00
x86_64 [PATCH] x86_64: Allocate cpu local data for all possible CPUs 2005-10-10 16:33:25 -07:00
xtensa [PATCH] xtensa: remove io_remap_page_range and minor clean-ups 2005-09-22 22:17:37 -07:00