Subject: Re: CVS commit: syssrc/sys/arch/arm32/arm32
To: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
From: Chris Gilbert <chris@paradox.demon.co.uk>
List: source-changes
Date: 06/27/2001 08:29:48
On Wednesday 27 June 2001  7:58 am, IWAMOTO Toshihiro wrote:
> At Wed, 27 Jun 2001 01:09:22 +0300 (EEST),
>
> Chris Gilbert wrote:
> > Modified Files:
> > 	syssrc/sys/arch/arm32/arm32: fault.c
> >
> > Log Message:
> > Add checks (make non DIAGNOSTIC) to make sure that we never call
> > uvm_fault from an interrupt.
> >
> >
> > To generate a diff of this commit:
> > cvs rdiff -r1.55 -r1.56 syssrc/sys/arch/arm32/arm32/fault.c
>
> KASSERT expands to void when DIAGNOSTIC isn't defined.  So I think the
> check in data_abort_handler is better to be kept inside DIAGNOSITC
> ifdef for consistency.
> It might be even better to use KASSERT for the both of checks.

We've some extra ddb goo in the data_abort_handler case, the KASSERT in 
cowfault was added more out of a we should be checking, but I've no idea if 
it might happen, I didn't have time last night to analyse how we get to 
cowfault, although it mostly looks to be called from doing syscalls.

> BTW, can we move it to arm/arm32/fault.c (and abandon hpcarm version)
> to reduce maintainance load?

Yes, I noticed there's still a few files left in arm32 that should be moved, 
potentially all of this lot (taken from file.cats):
file    arch/arm32/arm32/bus_dma.c
file    arch/arm32/arm32/cpuswitch.S
file    arch/arm32/arm32/exception.S
file    arch/arm32/arm32/fault.c
file    arch/arm32/arm32/fusu.S
file    arch/arm32/arm32/intr.c
file    arch/arm32/arm32/machdep.c
file    arch/arm32/arm32/mem.c
file    arch/arm32/arm32/procfs_machdep.c       procfs
file    arch/arm32/arm32/setcpsr.S
file    arch/arm32/arm32/setstack.S
file    arch/arm32/arm32/spl.S
file    arch/arm32/arm32/stubs.c
file    arch/arm32/arm32/vm_machdep.c

I'll look into doing that this evening for those that use arm32, I'll not do 
hpcarm as I know that some of your copies have been changed for soft 
interrupts (which perhaps we should port into the generic arm32 code)

Cheers,
Chris