summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sun4v_ivec.S
diff options
context:
space:
mode:
authorDavid S. Miller2006-02-11 00:39:51 +0100
committerDavid S. Miller2006-03-20 10:12:15 +0100
commit12eaa328f9fb2d3fcb5afb682c762690d05a3cd8 (patch)
treecce4e68b971757010a3e0bbf035fc65a381a3cd4 /arch/sparc64/kernel/sun4v_ivec.S
parent[SPARC64]: First cut at SUN4V PCI IOMMU handling. (diff)
downloadkernel-qcow2-linux-12eaa328f9fb2d3fcb5afb682c762690d05a3cd8.tar.gz
kernel-qcow2-linux-12eaa328f9fb2d3fcb5afb682c762690d05a3cd8.tar.xz
kernel-qcow2-linux-12eaa328f9fb2d3fcb5afb682c762690d05a3cd8.zip
[SPARC64]: Use ASI_SCRATCHPAD address 0x0 properly.
This is where the virtual address of the fault status area belongs. To set it up we don't make a hypervisor call, instead we call OBP's SUNW,set-trap-table with the real address of the fault status area as the second argument. And right before that call we write the virtual address into ASI_SCRATCHPAD vaddr 0x0. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/sun4v_ivec.S')
-rw-r--r--arch/sparc64/kernel/sun4v_ivec.S28
1 files changed, 8 insertions, 20 deletions
diff --git a/arch/sparc64/kernel/sun4v_ivec.S b/arch/sparc64/kernel/sun4v_ivec.S
index d9d442017d3d..c0367ef7e098 100644
--- a/arch/sparc64/kernel/sun4v_ivec.S
+++ b/arch/sparc64/kernel/sun4v_ivec.S
@@ -22,11 +22,8 @@ sun4v_cpu_mondo:
nop
/* Get &trap_block[smp_processor_id()] into %g3. */
- __GET_CPUID(%g1)
- sethi %hi(trap_block), %g3
- sllx %g1, TRAP_BLOCK_SZ_SHIFT, %g7
- or %g3, %lo(trap_block), %g3
- add %g3, %g7, %g3
+ ldxa [%g0] ASI_SCRATCHPAD, %g3
+ sub %g3, TRAP_PER_CPU_FAULT_INFO, %g3
/* Get CPU mondo queue base phys address into %g7. */
ldx [%g3 + TRAP_PER_CPU_CPU_MONDO_PA], %g7
@@ -74,11 +71,8 @@ sun4v_dev_mondo:
nop
/* Get &trap_block[smp_processor_id()] into %g3. */
- __GET_CPUID(%g1)
- sethi %hi(trap_block), %g3
- sllx %g1, TRAP_BLOCK_SZ_SHIFT, %g7
- or %g3, %lo(trap_block), %g3
- add %g3, %g7, %g3
+ ldxa [%g0] ASI_SCRATCHPAD, %g3
+ sub %g3, TRAP_PER_CPU_FAULT_INFO, %g3
/* Get DEV mondo queue base phys address into %g5. */
ldx [%g3 + TRAP_PER_CPU_DEV_MONDO_PA], %g5
@@ -143,11 +137,8 @@ sun4v_res_mondo:
nop
/* Get &trap_block[smp_processor_id()] into %g3. */
- __GET_CPUID(%g1)
- sethi %hi(trap_block), %g3
- sllx %g1, TRAP_BLOCK_SZ_SHIFT, %g7
- or %g3, %lo(trap_block), %g3
- add %g3, %g7, %g3
+ ldxa [%g0] ASI_SCRATCHPAD, %g3
+ sub %g3, TRAP_PER_CPU_FAULT_INFO, %g3
/* Get RES mondo queue base phys address into %g5. */
ldx [%g3 + TRAP_PER_CPU_RESUM_MONDO_PA], %g5
@@ -251,11 +242,8 @@ sun4v_nonres_mondo:
nop
/* Get &trap_block[smp_processor_id()] into %g3. */
- __GET_CPUID(%g1)
- sethi %hi(trap_block), %g3
- sllx %g1, TRAP_BLOCK_SZ_SHIFT, %g7
- or %g3, %lo(trap_block), %g3
- add %g3, %g7, %g3
+ ldxa [%g0] ASI_SCRATCHPAD, %g3
+ sub %g3, TRAP_PER_CPU_FAULT_INFO, %g3
/* Get RES mondo queue base phys address into %g5. */
ldx [%g3 + TRAP_PER_CPU_NONRESUM_MONDO_PA], %g5