aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/traps.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-17 17:58:02 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:32 -0500
commit6c8927c9634e8a1bc95d5291c55205707f9fa40a (patch)
treee59db7dca9ab26808703ee3c20ad59c3425024fa /arch/sparc64/kernel/traps.c
parent12e126ad229abc718d05600027fcd5794c1e31e5 (diff)
[SPARC64]: Fix some SUN4V TLB handling bugs.
1) Add error return checking for TLB load hypervisor calls. 2) Don't fallthru to dtlb tsb miss handler from itlb tsb miss handler, oops. 3) On window fixups, propagate fault information to fixup handler correctly. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
-rw-r--r--arch/sparc64/kernel/traps.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index c9484ae5bb8f..5a157e92bfc7 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1928,6 +1928,40 @@ void sun4v_nonresum_overflow(struct pt_regs *regs)
1928 atomic_inc(&sun4v_nonresum_oflow_cnt); 1928 atomic_inc(&sun4v_nonresum_oflow_cnt);
1929} 1929}
1930 1930
1931unsigned long sun4v_err_itlb_vaddr;
1932unsigned long sun4v_err_itlb_ctx;
1933unsigned long sun4v_err_itlb_pte;
1934unsigned long sun4v_err_itlb_error;
1935
1936void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
1937{
1938 if (tl > 1)
1939 dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
1940
1941 printk("SUN4V-ITLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl);
1942 printk("SUN4V-ITLB: vaddr[%lx] ctx[%lx] pte[%lx] error[%lx]\n",
1943 sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx,
1944 sun4v_err_itlb_pte, sun4v_err_itlb_error);
1945 prom_halt();
1946}
1947
1948unsigned long sun4v_err_dtlb_vaddr;
1949unsigned long sun4v_err_dtlb_ctx;
1950unsigned long sun4v_err_dtlb_pte;
1951unsigned long sun4v_err_dtlb_error;
1952
1953void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
1954{
1955 if (tl > 1)
1956 dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
1957
1958 printk("SUN4V-DTLB: Error at TPC[%lx], tl %d\n", regs->tpc, tl);
1959 printk("SUN4V-DTLB: vaddr[%lx] ctx[%lx] pte[%lx] error[%lx]\n",
1960 sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx,
1961 sun4v_err_dtlb_pte, sun4v_err_dtlb_error);
1962 prom_halt();
1963}
1964
1931void do_fpe_common(struct pt_regs *regs) 1965void do_fpe_common(struct pt_regs *regs)
1932{ 1966{
1933 if (regs->tstate & TSTATE_PRIV) { 1967 if (regs->tstate & TSTATE_PRIV) {