Subject: Re: Existing PRs
To: None <Richard.Earnshaw@arm.com>
From: Robert Swindells <swindellsr@genrad.com>
List: port-arm32
Date: 03/29/2001 14:29:25
> >> port-arm32/12155[open change-request] Add libarch support for flushing the 
> >> read buffer
> >> Submit?
> 
> >I thought the patch was in the PR.  If not, I'm fairly sure it was posted 
> >to this list.  We need to ensure that such a call only tries to issue the 
> >CP15 instruction on processors that have that feature.
> 
> It just calls cpufunc_nullop() if it isn't supported.
> 
> The patch won't apply as is since it pre dates moving stuff to arch/arm.
> 
> I can regenerate the patch it if it helps.
> 

>I've just been looking again at this one.  Maybe I'm missing something, 
>but I can't see the kernel-side part of this patch.

There isn't a kernel-side part of the patch. The description states
that it is just the userland part.

It probably makes sense to apply this patch to arm/arm32/sys_machdep.c
as well. The rest can wait until I can get the SA-11x0 code into the
tree.

Index: sys_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm/arm32/sys_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 sys_machdep.c
--- sys_machdep.c	2001/03/04 05:08:43	1.1
+++ sys_machdep.c	2001/03/29 13:22:52
@@ -83,6 +83,20 @@
 	return(0);
 }
 
+static int
+arm32_drain_readbuf(p, args, retval)
+	struct proc *p;
+	char *args;
+	register_t *retval;
+{
+	/* No args. */
+
+	cpu_flush_prefetchbuf();
+
+	*retval = 0;
+	return(0);
+}
+
 int
 sys_sysarch(p, v, retval)
 	struct proc *p;
@@ -102,6 +116,10 @@
 
 	case ARM32_DRAIN_WRITEBUF : 
 		error = arm32_drain_writebuf(p, SCARG(uap, parms), retval);
+		break;
+
+	case ARM32_DRAIN_READBUF :
+		error = arm32_drain_readbuf(p, SCARG(uap, parms), retval);
 		break;
 
 	default: