Subject: uvm.page_idle_zero access on bool changes (Re: CVS commit: src/sys)
To: None <thorpej@NetBSD.org>
From: Izumi Tsutsui <email@example.com>
Date: 02/24/2007 19:33:37
firstname.lastname@example.org wrote on source-changes:
> > On Wed, Feb 21, 2007 at 11:00:15PM +0000, Jason R Thorpe wrote:
> >> uvm_swap.h uvm_vnode.c
> >> Replace the Mach-derived boolean_t type with the C99 bool type. A
> >> future commit will replace use of TRUE and FALSE with true and false.
> > This changes alignment of, for example, uvm.page_idle_zero and thereby
> > breaks sparc64. Should alignment (and size) be restored for those, or
> > the access fixed?
> the access should be fixed.
Alpha seems to require the similar fix.
Is the attached diff okay?
(just taken from gcc -S output since I don't know alpha asm at all)
RCS file: /cvsroot/src/sys/arch/alpha/alpha/locore.s,v
retrieving revision 1.109
diff -u -r1.109 locore.s
--- alpha/locore.s 9 Feb 2007 21:55:01 -0000 1.109
+++ alpha/locore.s 24 Feb 2007 10:28:16 -0000
@@ -696,7 +696,10 @@
ldl t0, sched_whichqs /* look for non-empty queue */
bne t0, 4f
2: lda t0, uvm
- ldl t0, UVM_PAGE_IDLE_ZERO(t0) /* should we zero some pages? */
+ ldq_u t1, UVM_PAGE_IDLE_ZERO(t0)
+ lda t0, UVM_PAGE_IDLE_ZERO(t0) /* should we zero some pages? */
+ extbl t1, t0, t0
+ and t0, 0xff, t0
beq t0, 3f /* nope. */
3: ldl t0, sched_whichqs /* look for non-empty queue */