android_kernel_xiaomi_sm8350/include/asm-sparc64
David S. Miller 72aff53f1f [SPARC64]: Get SUN4V SMP working.
The sibling cpu bringup is extremely fragile.  We can only
perform the most basic calls until we take over the trap
table from the firmware/hypervisor on the new cpu.

This means no accesses to %g4, %g5, %g6 since those can't be
TLB translated without our trap handlers.

In order to achieve this:

1) Change sun4v_init_mondo_queues() so that it can operate in
   several modes.

   It can allocate the queues, or install them in the current
   processor, or both.

   The boot cpu does both in it's call early on.

   Later, the boot cpu allocates the sibling cpu queue, starts
   the sibling cpu, then the sibling cpu loads them in.

2) init_cur_cpu_trap() is changed to take the current_thread_info()
   as an argument instead of reading %g6 directly on the current
   cpu.

3) Create a trampoline stack for the sibling cpus.  We do our basic
   kernel calls using this stack, which is locked into the kernel
   image, then go to our proper thread stack after taking over the
   trap table.

4) While we are in this delicate startup state, we put 0xdeadbeef
   into %g4/%g5/%g6 in order to catch accidental accesses.

5) On the final prom_set_trap_table*() call, we put &init_thread_union
   into %g6.  This is a hack to make prom_world(0) work.  All that
   wants to do is restore the %asi register using
   get_thread_current_ds().

Longer term we should just do the OBP calls to set the trap table by
hand just like we do for everything else.  This would avoid that silly
prom_world(0) issue, then we can remove the init_thread_union hack.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:22 -08:00
..
a.out.h
agp.h
apb.h
asi.h [SPARC64]: Sun4v specific ASI defines. 2006-03-20 01:11:43 -08:00
atomic.h [PATCH] mutex subsystem, add atomic_xchg() to all arches 2006-01-09 15:59:17 -08:00
auxio.h
auxvec.h [PATCH] auxiliary vector cleanups 2005-09-07 16:57:21 -07:00
bbc.h
bitops.h [FLS64]: generic version 2006-01-03 13:11:06 -08:00
bpp.h
bsderrno.h
bug.h
bugs.h
byteorder.h
cache.h [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
cacheflush.h [SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support. 2005-09-25 16:46:57 -07:00
chafsr.h
checksum.h
chmctrl.h
cmt.h
compat.h [PATCH] compat: be more consistent about [ug]id_t 2005-09-07 16:57:19 -07:00
const.h
cpudata.h [SPARC64]: Get SUN4V SMP working. 2006-03-20 01:13:22 -08:00
cputime.h
current.h
dcr.h
dcu.h
delay.h
display7seg.h
div64.h
dma-mapping.h [PATCH] gfp_t: dma-mapping (simple cases) 2005-10-28 08:16:49 -07:00
dma.h
ebus.h [SPARC]: More abstractions and cleanups of dma handling in cs4231. 2005-11-07 14:09:19 -08:00
elf.h [PATCH] sparc64: task_pt_regs() 2006-01-12 09:08:52 -08:00
emergency-restart.h [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
envctrl.h
errno.h
estate.h
fbio.h
fcntl.h [PATCH] Clean up struct flock definitions 2005-09-07 16:57:38 -07:00
fhc.h
floppy.h
fpumacro.h
futex.h [SPARC64]: Mark __ex_table section correctly. 2006-03-04 23:23:56 -08:00
hardirq.h [SPARC64]: Eliminate irq_cpustat_t. 2005-08-29 22:46:43 -07:00
head.h [SPARC64]: Add GET_GL_GLOBAL() macro for SUN4V. 2006-03-20 01:13:18 -08:00
hw_irq.h
hypervisor.h [SPARC64]: Add sun4v_cpu_qconf() hypervisor call. 2006-03-20 01:13:16 -08:00
ide.h [SPARC64]: Move DCACHE_ALIASING_POSSIBLE define to asm/page.h 2005-09-19 20:11:57 -07:00
idprom.h [SPARC]: Clean up idprom header files. 2006-03-20 01:12:08 -08:00
intr_queue.h [SPARC64]: Sun4v interrupt queue register definitions. 2006-03-20 01:11:44 -08:00
io.h [SPARC64]: Use 'unsigned long' for port argument to I/O string ops. 2005-08-31 15:01:33 -07:00
ioctl.h
ioctls.h
iommu.h
ipc.h
ipcbuf.h
irq.h [SPARC64]: Generic sun4v_build_irq(). 2006-03-20 01:12:40 -08:00
isa.h
kdebug.h
kmap_types.h
kprobes.h [PATCH] kprobes: fix build breakage 2006-01-10 08:01:40 -08:00
linkage.h
local.h
lsu.h
mc146818rtc.h
mman.h [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
mmu_context.h [SPARC64]: Hypervisor TSB context switching. 2006-03-20 01:12:06 -08:00
mmu.h [SPARC64]: Hypervisor TSB context switching. 2006-03-20 01:12:06 -08:00
module.h
mostek.h
msgbuf.h
mutex.h [PATCH] mutex subsystem, add default include/asm-*/mutex.h files 2006-01-09 15:59:19 -08:00
namei.h
ns87303.h
openprom.h [SPARC64]: Rewrite convoluted physical memory probing. 2005-09-29 17:58:26 -07:00
openpromio.h
oplib.h [SPARC64]: Add prom_{start,stop}cpu_cpuid(). 2006-03-20 01:13:04 -08:00
page.h [SPARC64]: Kill all external references to sp_banks[] 2005-09-28 21:46:43 -07:00
param.h
parport.h
pbm.h [SPARC64]: More SUN4V PCI controller work. 2006-03-20 01:12:11 -08:00
pci.h [SPARC64]: Beginnings of SUN4V PCI controller support. 2006-03-20 01:12:10 -08:00
pconf.h
percpu.h
perfctr.h
pgalloc.h [SPARC64]: Kill pgtable quicklists and use SLAB. 2006-03-20 01:11:14 -08:00
pgtable.h [SPARC64]: Fix gcc-3.3.x warnings. 2006-03-20 01:12:53 -08:00
pil.h
poll.h
posix_types.h
processor.h [SPARC64]: Move away from virtual page tables, part 1. 2006-03-20 01:11:13 -08:00
psrcompat.h
pstate.h [SPARC64]: Fixup TSTATE layout diagram in asm/pstate.h 2006-03-20 01:13:02 -08:00
ptrace.h [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
reg.h
resource.h
rtc.h
rwsem-const.h
rwsem.h [PATCH] add sem_is_read/write_locked() 2005-10-29 21:40:35 -07:00
sbus.h
scatterlist.h
scratchpad.h [SPARC64]: Sun4v scratchpad register layout. 2006-03-20 01:11:44 -08:00
seccomp.h
sections.h
semaphore.h [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
sembuf.h
setup.h
sfafsr.h [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00
sfp-machine.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h [SPARC64]: Refine code sequences to get the cpu id. 2006-03-20 01:11:35 -08:00
socket.h [NET]: Introduce SO_{SND,RCV}BUFFORCE socket options 2005-08-29 15:31:35 -07:00
sockios.h
solerrno.h
spinlock_types.h [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
spinlock.h [SPARC64]: Implement __raw_read_trylock() 2006-01-23 21:03:56 -08:00
spitfire.h [SPARC64]: Add 'hypervisor' to ultra_tlb_type enumeration. 2006-03-20 01:11:39 -08:00
starfire.h
stat.h
statfs.h
string.h
sunbpp.h
svr4.h
system.h [SPARC64]: Kill all %pstate changes in context switch code. 2006-03-20 01:11:49 -08:00
termbits.h
termios.h [SPARC]: remove duplicate TIOCPKT_ definitions 2005-11-07 14:10:42 -08:00
thread_info.h [SPARC64]: Correctable ECC errors cannot occur at trap level > 0. 2006-03-20 01:11:33 -08:00
timer.h [SPARC64]: Privatize sun5_timer. 2005-07-24 19:36:13 -07:00
timex.h
tlb.h [SPARC64] mm: simpler tlb_flush_mmu 2005-11-07 14:12:08 -08:00
tlbflush.h [SPARC64]: Move away from virtual page tables, part 1. 2006-03-20 01:11:13 -08:00
topology.h
tsb.h [SPARC64]: Initial sun4v TLB miss handling infrastructure. 2006-03-20 01:11:52 -08:00
ttable.h [SPARC64]: Fix some SUN4V TLB miss bugs. 2006-03-20 01:12:23 -08:00
types.h [PATCH] sab: consolidate kmem_bufctl_t 2005-09-05 00:05:48 -07:00
uaccess.h [SPARC]: Kill off these __put_user_ret things. 2006-03-20 01:13:15 -08:00
uctx.h
unaligned.h
unistd.h [SPARC]: sys_newfstatat --> sys_fstatat64 2006-02-12 23:30:11 -08:00
upa.h
user.h
utrap.h
vdev.h [SPARC64]: Decode virtual-devices interrupts correctly. 2006-03-20 01:13:05 -08:00
vga.h
visasm.h
watchdog.h
xor.h