Re: CVS commit: src/lib/libc_fp

2016-07-15 Thread Matt Thomas

> On Jul 14, 2016, at 11:39 PM, David Holland 
>  wrote:
> 
> Can you call this MTC1_HAZARD like the MFC0_HAZARD that got added
> recently elsewhere? It's a pipeline hazard and not a synchronization
> (which to me at least indicates some form of handshake) and it's also
> specific to mtc1/dmtc1.

That's reasonable.

> (also while this code appears to currently be 64-bit only, in the long
> run the condition is wrong...)

Well, O32 handles FP emulation.

So this is really for N32/N64 since they default to softfloat.  They use
64-bit registers so I don't see the point.

Re: CVS commit: src/sys/arch/arm/arm32

2016-07-15 Thread coypu
On Fri, Jul 15, 2016 at 05:59:46AM +, Nick Hudson wrote:
> +
> +bool
> +mm_md_page_color(paddr_t pa, int *colorp)
> +{
> + *colorp = atop(pa & arm_cache_prefer_mask);
> +
> + return arm_cache_prefer_mask ? false : true;
> +}
> 

arm_cache_prefer_mask only exists for armv6/armv7 now


Re: CVS commit: src/sys/arch/arm/arm32

2016-07-15 Thread coypu
On Fri, Jul 15, 2016 at 05:59:46AM +, Nick Hudson wrote:
> Module Name:  src
> Committed By: skrll
> Date: Fri Jul 15 05:59:46 UTC 2016
> 
> Modified Files:
>   src/sys/arch/arm/arm32: arm32_machdep.c
> 
> Log Message:
> Provide a mm_md_page_color and fix some kernel builds
> 
> 

Seems it broke the rest of them.
I can build with this diff, but I don't know if it is correct.
Index: arm32_machdep.c
===
RCS file: /cvsroot/src/sys/arch/arm/arm32/arm32_machdep.c,v
retrieving revision 1.111
diff -u -r1.111 arm32_machdep.c
--- arm32_machdep.c 15 Jul 2016 05:59:46 -  1.111
+++ arm32_machdep.c 15 Jul 2016 19:31:34 -
@@ -746,11 +746,3 @@
return rv;
 }
 #endif
-
-bool
-mm_md_page_color(paddr_t pa, int *colorp)
-{
-   *colorp = atop(pa & arm_cache_prefer_mask);
-
-   return arm_cache_prefer_mask ? false : true;
-}
Index: pmap.c
===
RCS file: /cvsroot/src/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.335
diff -u -r1.335 pmap.c
--- pmap.c  14 Jul 2016 15:51:41 -  1.335
+++ pmap.c  15 Jul 2016 19:31:37 -
@@ -519,6 +519,13 @@
 vaddr_t pmap_directlimit;
 #endif
 
+static inline bool
+mm_md_page_color(paddr_t pa, int *colorp)
+{
+   *colorp = atop(pa & arm_cache_prefer_mask);
+
+   return arm_cache_prefer_mask ? false : true;
+}
 /*
  * Misc. locking data structures
  */
@@ -7945,3 +7952,4 @@
 #endif
 }
 #endif /* __HAVE_MM_MD_DIRECT_MAPPED_PHYS */
+


Re: CVS commit: src/lib/libc_fp

2016-07-15 Thread David Holland
On Thu, Jul 14, 2016 at 01:59:19AM +, Matt Thomas wrote:
 > Added Files:
 >  src/lib/libc_fp: Makefile gcc-softfloat.c
 >  src/lib/libc_fp/arch/mips: Makefile.inc fpdf.S fpsf.S shlib_version
 > 
 > Log Message:
 > Library which implements the softfloat primitives using FP instructions
 > Currently contains only untested MIPS routines.
 > XXX move arm libc_vfp to here.
 > 
 > [...]
 > #ifdef MIPS3
 > #defineCOP1_SYNC   nop
 > #else
 > #defineCOP1_SYNC
 > #endif

Can you call this MTC1_HAZARD like the MFC0_HAZARD that got added
recently elsewhere? It's a pipeline hazard and not a synchronization
(which to me at least indicates some form of handshake) and it's also
specific to mtc1/dmtc1.

(also while this code appears to currently be 64-bit only, in the long
run the condition is wrong...)

-- 
David A. Holland
dholl...@netbsd.org