Subject: Re: Kernel copyin/out optimizations for ARM...
To: David Laight <>
From: Reinoud Zandijk <>
List: port-arm
Date: 03/16/2002 00:11:19
On Fri, Mar 15, 2002 at 04:07:25PM +0000, David Laight wrote:
> On Fri, Mar 15, 2002 at 10:03:17AM +0000, Richard Earnshaw wrote:
> > > Looks pretty good, though I haven't tried it.

Me neither :-/

> I've done some local optimisations:
> - Removed the swp
> - filled many of the delay slots
> - removed the 16byte align code from kcopy
> All 3 routines seem to work as copy routines, but my ARM system
> doesn't run netBSD so I can't test the fault handling.
> I have a slight doubt over the copyout code:
> 	ldmia   r0!, {r4, r5, r6, r14}
> 	strt    r4, [r1], #4                    /* need user perms here... */
> 	stmia   r1!, {r5, r6, r14}              /* ... kernel ones ok here */
> Now r1 is 16 byte aligned so that the strt and stmia are
> guaranteed to be in the same page - so it is basiclaay sound.

One idea though .... shouldn't we use `strt' _ONCE_ every page? i.e. either 
the whole page is OK or the whole page is not .... doing it multiple times 
is a bit silly....

> Anyway new file on then netbsd/bcopyinout.S

Dunno if i try them soon :) but i've just fixed a nasty ARM 6/7 specific
problem ... an instruction that couldn't be fixed up in f.e. the late abort 
handler would _allways_ panic the kernel ... even when the instruction was 
in userland :( ... appears to have been the case since 1994 when Mark 
Brinicombe started on it ...