Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm Add secondary cache range ops



details:   https://anonhg.NetBSD.org/src/rev/38d068c8416c
branches:  trunk
changeset: 781506:38d068c8416c
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Sep 11 17:51:38 2012 +0000

description:
Add secondary cache range ops

diffstat:

 sys/arch/arm/arm/cpufunc.c     |  88 +++++++++++++++++++++++++++++++++++++++++-
 sys/arch/arm/include/cpufunc.h |   8 +++
 2 files changed, 94 insertions(+), 2 deletions(-)

diffs (274 lines):

diff -r cb8f670b8e8a -r 38d068c8416c sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c        Tue Sep 11 15:59:19 2012 +0000
+++ b/sys/arch/arm/arm/cpufunc.c        Tue Sep 11 17:51:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.c,v 1.115 2012/09/07 11:48:59 matt Exp $       */
+/*     $NetBSD: cpufunc.c,v 1.116 2012/09/11 17:51:38 matt Exp $       */
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.115 2012/09/07 11:48:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.116 2012/09/11 17:51:38 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -134,6 +134,10 @@
        .cf_dcache_inv_range    = (void *)cpufunc_nullop,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = cpufunc_nullop,
        .cf_idcache_wbinv_range = (void *)cpufunc_nullop,
 
@@ -186,6 +190,10 @@
        .cf_dcache_inv_range    = (void *)cpufunc_nullop,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = cpufunc_nullop,
        .cf_idcache_wbinv_range = (void *)cpufunc_nullop,
 
@@ -238,6 +246,10 @@
        .cf_dcache_inv_range    = (void *)arm3_cache_flush,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm3_cache_flush,
        .cf_idcache_wbinv_range = (void *)arm3_cache_flush,
 
@@ -294,6 +306,10 @@
        .cf_dcache_inv_range    = (void *)arm67_cache_flush,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm67_cache_flush,
        .cf_idcache_wbinv_range = (void *)arm67_cache_flush,
 
@@ -356,6 +372,10 @@
        .cf_dcache_inv_range    = (void *)arm67_cache_flush,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm67_cache_flush,
        .cf_idcache_wbinv_range = (void *)arm67_cache_flush,
 
@@ -414,6 +434,10 @@
        .cf_dcache_inv_range    = (void *)arm7tdmi_cache_flushID,
        .cf_dcache_wb_range     = (void *)cpufunc_nullop,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm7tdmi_cache_flushID,
        .cf_idcache_wbinv_range = (void *)arm7tdmi_cache_flushID,
 
@@ -472,6 +496,10 @@
 /*XXX*/        .cf_dcache_inv_range    = (void *)arm8_cache_purgeID,
        .cf_dcache_wb_range     = (void *)arm8_cache_cleanID,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm8_cache_purgeID,
        .cf_idcache_wbinv_range = (void *)arm8_cache_purgeID,
 
@@ -529,6 +557,10 @@
 /*XXX*/        .cf_dcache_inv_range    = arm9_dcache_wbinv_range,
        .cf_dcache_wb_range     = arm9_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm9_idcache_wbinv_all,
        .cf_idcache_wbinv_range = arm9_idcache_wbinv_range,
 
@@ -587,6 +619,10 @@
 /*XXX*/        .cf_dcache_inv_range    = armv5_ec_dcache_wbinv_range,
        .cf_dcache_wb_range     = armv5_ec_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = armv5_ec_idcache_wbinv_all,
        .cf_idcache_wbinv_range = armv5_ec_idcache_wbinv_range,
 
@@ -645,6 +681,10 @@
 /*XXX*/        .cf_dcache_inv_range    = armv5_dcache_wbinv_range,
        .cf_dcache_wb_range     = armv5_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = armv5_idcache_wbinv_all,
        .cf_idcache_wbinv_range = armv5_idcache_wbinv_range,
 
@@ -703,6 +743,10 @@
        .cf_dcache_inv_range    = armv6_dcache_inv_range,
        .cf_dcache_wb_range     = armv6_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = armv6_idcache_wbinv_all,
        .cf_idcache_wbinv_range = armv6_idcache_wbinv_range,
 
@@ -761,6 +805,10 @@
        .cf_dcache_inv_range    = armv6_dcache_inv_range,
        .cf_dcache_wb_range     = armv6_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm11x6_idcache_wbinv_all,    /* 411920 */
        .cf_idcache_wbinv_range = arm11x6_idcache_wbinv_range,  /* 371025 */
 
@@ -819,6 +867,10 @@
        .cf_dcache_inv_range    = armv6_dcache_inv_range,
        .cf_dcache_wb_range     = armv6_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = arm11x6_idcache_wbinv_all,    /* 415045 */
        .cf_idcache_wbinv_range = arm11x6_idcache_wbinv_range,  /* 371367 */
 
@@ -878,6 +930,10 @@
        .cf_dcache_inv_range    = armv5_dcache_inv_range,
        .cf_dcache_wb_range     = armv5_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = armv6_idcache_wbinv_all,
        .cf_idcache_wbinv_range = armv5_idcache_wbinv_range,
 
@@ -936,6 +992,10 @@
 /*XXX*/        .cf_dcache_inv_range    = sa1_cache_purgeD_rng,
        .cf_dcache_wb_range     = sa1_cache_cleanD_rng,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = sa1_cache_purgeID,
        .cf_idcache_wbinv_range = sa1_cache_purgeID_rng,
 
@@ -993,6 +1053,10 @@
 /*XXX*/        .cf_dcache_inv_range    = sa1_cache_purgeD_rng,
        .cf_dcache_wb_range     = sa1_cache_cleanD_rng,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = sa1_cache_purgeID,
        .cf_idcache_wbinv_range = sa1_cache_purgeID_rng,
 
@@ -1050,6 +1114,10 @@
        .cf_dcache_inv_range    = fa526_dcache_inv_range,
        .cf_dcache_wb_range     = fa526_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = fa526_idcache_wbinv_all,
        .cf_idcache_wbinv_range = fa526_idcache_wbinv_range,
 
@@ -1107,6 +1175,10 @@
 /*XXX*/        .cf_dcache_inv_range    = sa1_cache_purgeD_rng,
        .cf_dcache_wb_range     = sa1_cache_cleanD_rng,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = sa1_cache_purgeID,
        .cf_idcache_wbinv_range = sa1_cache_purgeID_rng,
 
@@ -1165,6 +1237,10 @@
        .cf_dcache_inv_range    = xscale_cache_flushD_rng,
        .cf_dcache_wb_range     = xscale_cache_cleanD_rng,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = xscale_cache_purgeID,
        .cf_idcache_wbinv_range = xscale_cache_purgeID_rng,
 
@@ -1222,6 +1298,10 @@
        .cf_dcache_wb_range     = armv7_dcache_wb_range,
        .cf_dcache_wbinv_range  = armv7_dcache_wbinv_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_icache_sync_range   = armv7_icache_sync_range,
        .cf_idcache_wbinv_range = armv7_idcache_wbinv_range,
 
@@ -1283,6 +1363,10 @@
        .cf_dcache_inv_range    = sheeva_dcache_inv_range,
        .cf_dcache_wb_range     = sheeva_dcache_wb_range,
 
+       .cf_sdcache_wbinv_range = (void *)cpufunc_nullop,
+       .cf_sdcache_inv_range   = (void *)cpufunc_nullop,
+       .cf_sdcache_wb_range    = (void *)cpufunc_nullop,
+
        .cf_idcache_wbinv_all   = armv5_ec_idcache_wbinv_all,
        .cf_idcache_wbinv_range = sheeva_idcache_wbinv_range,
 
diff -r cb8f670b8e8a -r 38d068c8416c sys/arch/arm/include/cpufunc.h
--- a/sys/arch/arm/include/cpufunc.h    Tue Sep 11 15:59:19 2012 +0000
+++ b/sys/arch/arm/include/cpufunc.h    Tue Sep 11 17:51:38 2012 +0000
@@ -131,6 +131,10 @@
        void    (*cf_dcache_inv_range)  (vaddr_t, vsize_t);
        void    (*cf_dcache_wb_range)   (vaddr_t, vsize_t);
 
+       void    (*cf_sdcache_wbinv_range)(vaddr_t, paddr_t, psize_t);
+       void    (*cf_sdcache_inv_range) (vaddr_t, paddr_t, psize_t);
+       void    (*cf_sdcache_wb_range)  (vaddr_t, paddr_t, psize_t);
+
        void    (*cf_idcache_wbinv_all) (void);
        void    (*cf_idcache_wbinv_range)(vaddr_t, vsize_t);
 
@@ -179,6 +183,10 @@
 #define        cpu_dcache_inv_range(a, s) cpufuncs.cf_dcache_inv_range((a), (s))
 #define        cpu_dcache_wb_range(a, s) cpufuncs.cf_dcache_wb_range((a), (s))
 
+#define        cpu_sdcache_wbinv_range(a, b, s) cpufuncs.cf_sdcache_wbinv_range((a), (b), (s))
+#define        cpu_sdcache_inv_range(a, b, s) cpufuncs.cf_sdcache_inv_range((a), (b), (s))
+#define        cpu_sdcache_wb_range(a, b, s) cpufuncs.cf_sdcache_wb_range((a), (b), (s))
+
 #define        cpu_idcache_wbinv_all() cpufuncs.cf_idcache_wbinv_all()
 #define        cpu_idcache_wbinv_range(a, s) cpufuncs.cf_idcache_wbinv_range((a), (s))
 



Home | Main Index | Thread Index | Old Index