Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218721
b: refs/heads/master
c: 8f19e3d
h: refs/heads/master
i:
  218719: 34226c9
v: v3
  • Loading branch information
Akira Takeuchi authored and David Howells committed Oct 27, 2010
1 parent f5523bc commit 6d55dcd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 633171861a3120af011bb1ee8dd40069951dfeac
refs/heads/master: 8f19e3daf3fffee9e18a8812067a6a4b538ae6c8
3 changes: 3 additions & 0 deletions trunk/arch/mn10300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ config AM34_2
select MN10300_HAS_ATOMIC_OPS_UNIT
select MN10300_HAS_CACHE_SNOOP

config ERRATUM_NEED_TO_RELOAD_MMUCTR
def_bool y if AM33_3 || AM34_2

config MMU
def_bool y

Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/mn10300/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ double_fault_loop:
ENTRY(raw_bus_error)
add -4,sp
mov d0,(sp)
#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d0
mov d0,(MMUCTR)
#endif
mov (BCBERR),d0 # what
btst BCBERR_BEMR_DMA,d0 # see if it was an external bus error
beq __common_exception_aux # it wasn't
Expand Down Expand Up @@ -282,6 +286,10 @@ ENTRY(nmi_handler)
ENTRY(__common_exception)
add -4,sp
mov d0,(sp)
#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d0
mov d0,(MMUCTR)
#endif

__common_exception_aux:
mov (TBR),d0
Expand Down
32 changes: 26 additions & 6 deletions trunk/arch/mn10300/mm/tlb-mn10300.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
###############################################################################
.type itlb_miss,@function
ENTRY(itlb_miss)
and ~EPSW_NMID,epsw
#ifdef CONFIG_GDBSTUB
movm [d2,d3,a2],(sp)
#else
Expand All @@ -38,6 +37,12 @@ ENTRY(itlb_miss)
nop
#endif

#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d2
mov d2,(MMUCTR)
#endif

and ~EPSW_NMID,epsw
mov (IPTEU),d3
mov (PTBR),a2
mov d3,d2
Expand Down Expand Up @@ -79,7 +84,6 @@ itlb_miss_fault:
###############################################################################
.type dtlb_miss,@function
ENTRY(dtlb_miss)
and ~EPSW_NMID,epsw
#ifdef CONFIG_GDBSTUB
movm [d2,d3,a2],(sp)
#else
Expand All @@ -90,6 +94,12 @@ ENTRY(dtlb_miss)
nop
#endif

#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d2
mov d2,(MMUCTR)
#endif

and ~EPSW_NMID,epsw
mov (DPTEU),d3
mov (PTBR),a2
mov d3,d2
Expand Down Expand Up @@ -130,9 +140,15 @@ dtlb_miss_fault:
###############################################################################
.type itlb_aerror,@function
ENTRY(itlb_aerror)
and ~EPSW_NMID,epsw
add -4,sp
SAVE_ALL

#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d1
mov d1,(MMUCTR)
#endif

and ~EPSW_NMID,epsw
add -4,sp # need to pass three params

# calculate the fault code
Expand All @@ -148,7 +164,6 @@ ENTRY(itlb_aerror)
clr d0
mov d0,(IPTEL)

and ~EPSW_NMID,epsw
or EPSW_IE,epsw
mov fp,d0
call do_page_fault[],0 # do_page_fault(regs,code,addr
Expand All @@ -163,10 +178,16 @@ ENTRY(itlb_aerror)
###############################################################################
.type dtlb_aerror,@function
ENTRY(dtlb_aerror)
and ~EPSW_NMID,epsw
add -4,sp
SAVE_ALL

#if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
mov (MMUCTR),d1
mov d1,(MMUCTR)
#endif

add -4,sp # need to pass three params
and ~EPSW_NMID,epsw

# calculate the fault code
movhu (MMUFCR_DFC),d1
Expand All @@ -180,7 +201,6 @@ ENTRY(dtlb_aerror)
clr d0
mov d0,(DPTEL)

and ~EPSW_NMID,epsw
or EPSW_IE,epsw
mov fp,d0
call do_page_fault[],0 # do_page_fault(regs,code,addr
Expand Down

0 comments on commit 6d55dcd

Please sign in to comment.