Source-Changes-HG archive

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

[src/trunk]: src/sys remove last isolated islands using BUS_SPACE_BARRIER_SYN...



details:   https://anonhg.NetBSD.org/src/rev/be3be3bbd89d
branches:  trunk
changeset: 347765:be3be3bbd89d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Sep 15 21:45:37 2016 +0000

description:
remove last isolated islands using BUS_SPACE_BARRIER_SYNC and
BUS_SPACE_BARRIER_X_BEFORE_X - these were only ever defined for mips and ia64,
and never actually implemented even there

diffstat:

 sys/arch/ia64/include/bus.h            |  10 +---------
 sys/arch/mips/atheros/dev/argpio.c     |   6 +++---
 sys/arch/mips/include/bus_space_defs.h |  11 +----------
 sys/dev/ic/atppcreg.h                  |  20 +-------------------
 sys/dev/ic/rtw.c                       |   6 +++---
 sys/dev/ic/rtwreg.h                    |  23 +----------------------
 sys/dev/ic/rtwvar.h                    |  15 +++++++--------
 sys/dev/ic/sl811hs.c                   |   6 +++---
 8 files changed, 20 insertions(+), 77 deletions(-)

diffs (248 lines):

diff -r c562ab35de70 -r be3be3bbd89d sys/arch/ia64/include/bus.h
--- a/sys/arch/ia64/include/bus.h       Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/arch/ia64/include/bus.h       Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.1 2009/07/20 04:41:37 kiyohara Exp $ */
+/*     $NetBSD: bus.h,v 1.2 2016/09/15 21:45:37 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -957,17 +957,9 @@
 #define        bus_space_barrier(t, h, o, l, f)        \
        ia64_bus_space_barrier((t), (h), (o), (l), (f))
 
-
 #define        BUS_SPACE_BARRIER_READ  0x01
 #define        BUS_SPACE_BARRIER_WRITE 0x02
 
-/* XXX to be investigated: are these used? */
-#define        BUS_SPACE_BARRIER_READ_BEFORE_READ      0x04
-#define        BUS_SPACE_BARRIER_READ_BEFORE_WRITE     0x08
-#define        BUS_SPACE_BARRIER_WRITE_BEFORE_READ     0x10
-#define        BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE    0x20
-#define        BUS_SPACE_BARRIER_SYNC                  0x40
-
 static __inline void
 ia64_bus_space_barrier(bus_space_tag_t t, bus_space_handle_t handle,
     bus_size_t offset, bus_size_t length, int flags)
diff -r c562ab35de70 -r be3be3bbd89d sys/arch/mips/atheros/dev/argpio.c
--- a/sys/arch/mips/atheros/dev/argpio.c        Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/arch/mips/atheros/dev/argpio.c        Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: argpio.c,v 1.6 2011/07/17 01:29:25 dyoung Exp $ */
+/* $NetBSD: argpio.c,v 1.7 2016/09/15 21:45:37 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2006 Garrett D'Amore
@@ -32,7 +32,7 @@
  */ 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.6 2011/07/17 01:29:25 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.7 2016/09/15 21:45:37 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -91,7 +91,7 @@
 #define        GETREG(sc, o)           bus_space_read_4(sc->sc_st, sc->sc_sh, o)
 #define        PUTREG(sc, o, v)        bus_space_write_4(sc->sc_st, sc->sc_sh, o, v)
 #define        FLUSH(sc)               bus_space_barrier(sc->sc_st, sc->sc_sh, \
-                               0, 12, BUS_SPACE_BARRIER_SYNC)
+                               0, 12, BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
 
 int
 argpio_match(device_t parent, cfdata_t match, void *aux)
diff -r c562ab35de70 -r be3be3bbd89d sys/arch/mips/include/bus_space_defs.h
--- a/sys/arch/mips/include/bus_space_defs.h    Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/arch/mips/include/bus_space_defs.h    Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space_defs.h,v 1.2 2016/07/11 16:15:35 matt Exp $  */
+/*     $NetBSD: bus_space_defs.h,v 1.3 2016/09/15 21:45:37 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -333,15 +333,6 @@
 #define        BUS_SPACE_BARRIER_READ  0x01
 #define        BUS_SPACE_BARRIER_WRITE 0x02
 
-/*
- * New style.
- */
-#define        BUS_SPACE_BARRIER_SYNC          0x03
-#define        BUS_SPACE_BARRIER_READ_BEFORE_READ      BUS_SPACE_BARRIER_READ
-#define        BUS_SPACE_BARRIER_READ_BEFORE_WRITE     BUS_SPACE_BARRIER_READ
-#define        BUS_SPACE_BARRIER_WRITE_BEFORE_READ     BUS_SPACE_BARRIER_WRITE
-#define        BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE    BUS_SPACE_BARRIER_WRITE
-
 #endif /* _KERNEL */
 
 #endif /* _MIPS_BUS_SPACE_DEFS_H_ */
diff -r c562ab35de70 -r be3be3bbd89d sys/dev/ic/atppcreg.h
--- a/sys/dev/ic/atppcreg.h     Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/dev/ic/atppcreg.h     Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppcreg.h,v 1.5 2005/12/11 12:21:25 christos Exp $ */
+/* $NetBSD: atppcreg.h,v 1.6 2016/09/15 21:45:37 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2001 Alcove - Nicolas Souchu
@@ -187,24 +187,6 @@
        (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_WRITE | \
        BUS_SPACE_BARRIER_READ)
 
-/* These are defined in man pages but don't actually exist for all acrhs */
-#define atppc_barrier_rr(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_READ_BEFORE_READ)
-#define atppc_barrier_rw(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_READ_BEFORE_WRITE)
-#define atppc_barrier_rb(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_READ_BEFORE_READ | \
-       BUS_SPACE_BARRIER_READ_BEFORE_WRITE)
-#define atppc_barrier_wr(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_WRITE_BEFORE_READ)
-#define atppc_barrier_ww(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE)
-#define atppc_barrier_wb(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_WRITE_BEFORE_READ | \
-       BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE)
-#define atppc_barrier_sync(atppc) bus_space_barrier((atppc)->sc_iot, \
-       (atppc)->sc_ioh, 0, IO_LPTSIZE, BUS_SPACE_BARRIER_SYNC)
-
 /*
  * Register defines for the PC873xx parts
  */
diff -r c562ab35de70 -r be3be3bbd89d sys/dev/ic/rtw.c
--- a/sys/dev/ic/rtw.c  Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/dev/ic/rtw.c  Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtw.c,v 1.123 2016/06/10 13:27:13 ozaki-r Exp $ */
+/* $NetBSD: rtw.c,v 1.124 2016/09/15 21:45:37 jdolecek Exp $ */
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 David Young.  All rights
  * reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.123 2016/06/10 13:27:13 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.124 2016/09/15 21:45:37 jdolecek Exp $");
 
 
 #include <sys/param.h>
@@ -683,7 +683,7 @@
            RTW_DK0, rk->rk_words, __arraycount(rk->rk_words));
 
        bus_space_barrier(regs->r_bt, regs->r_bh, RTW_DK0, sizeof(rk->rk_words),
-           BUS_SPACE_BARRIER_SYNC);
+           BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE);
 
        RTW_DPRINTF(RTW_DEBUG_KEY,
            ("%s.%d: scr %02" PRIx8 ", keylen %d\n", __func__, __LINE__, scr,
diff -r c562ab35de70 -r be3be3bbd89d sys/dev/ic/rtwreg.h
--- a/sys/dev/ic/rtwreg.h       Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/dev/ic/rtwreg.h       Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtwreg.h,v 1.28 2010/03/15 23:21:08 dyoung Exp $       */
+/*     $NetBSD: rtwreg.h,v 1.29 2016/09/15 21:45:37 jdolecek Exp $     */
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.
  *
@@ -991,27 +991,6 @@
 #define        RTW_CLR(regs, reg, mask)                                        \
        RTW_WRITE((regs), (reg), RTW_READ((regs), (reg)) & ~(mask))
 
-/* bus_space(9) lied? */
-#ifndef BUS_SPACE_BARRIER_SYNC
-#define BUS_SPACE_BARRIER_SYNC (BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
-#endif
-
-#ifndef BUS_SPACE_BARRIER_READ_BEFORE_READ
-#define BUS_SPACE_BARRIER_READ_BEFORE_READ BUS_SPACE_BARRIER_READ
-#endif
-
-#ifndef BUS_SPACE_BARRIER_READ_BEFORE_WRITE
-#define BUS_SPACE_BARRIER_READ_BEFORE_WRITE BUS_SPACE_BARRIER_READ
-#endif
-
-#ifndef BUS_SPACE_BARRIER_WRITE_BEFORE_READ
-#define BUS_SPACE_BARRIER_WRITE_BEFORE_READ BUS_SPACE_BARRIER_WRITE
-#endif
-
-#ifndef BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE
-#define BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE BUS_SPACE_BARRIER_WRITE
-#endif
-
 /*
  * Registers for RTL8180L's built-in baseband modem.
  */
diff -r c562ab35de70 -r be3be3bbd89d sys/dev/ic/rtwvar.h
--- a/sys/dev/ic/rtwvar.h       Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/dev/ic/rtwvar.h       Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtwvar.h,v 1.43 2010/03/15 23:21:08 dyoung Exp $ */
+/* $NetBSD: rtwvar.h,v 1.44 2016/09/15 21:45:37 jdolecek Exp $ */
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.
  *
@@ -131,28 +131,27 @@
  */
 /* sync */
 #define RTW_SYNC(regs, reg0, reg1)                             \
-       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_SYNC)
+       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
 
 /* write-before-write */
 #define RTW_WBW(regs, reg0, reg1)                              \
-       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE)
+       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_WRITE)
 
 /* write-before-read */
 #define RTW_WBR(regs, reg0, reg1)                              \
-       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_WRITE_BEFORE_READ)
+       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_WRITE)
 
 /* read-before-read */
 #define RTW_RBR(regs, reg0, reg1)                              \
-       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_READ_BEFORE_READ)
+       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_READ)
 
 /* read-before-write */
 #define RTW_RBW(regs, reg0, reg1)                              \
-       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_READ_BEFORE_WRITE)
+       rtw_barrier(regs, reg0, reg1, BUS_SPACE_BARRIER_READ)
 
 #define RTW_WBRW(regs, reg0, reg1)                             \
                rtw_barrier(regs, reg0, reg1,                   \
-                   BUS_SPACE_BARRIER_WRITE_BEFORE_READ |       \
-                   BUS_SPACE_BARRIER_WRITE_BEFORE_WRITE)
+                   BUS_SPACE_BARRIER_WRITE)
 
 #define RTW_SR_GET(sr, ofs) \
     (((sr)->sr_content[(ofs)/2] >> (((ofs) % 2 == 0) ? 0 : 8)) & 0xff)
diff -r c562ab35de70 -r be3be3bbd89d sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c      Thu Sep 15 20:03:36 2016 +0000
+++ b/sys/dev/ic/sl811hs.c      Thu Sep 15 21:45:37 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sl811hs.c,v 1.94 2016/08/25 20:14:02 skrll Exp $       */
+/*     $NetBSD: sl811hs.c,v 1.95 2016/09/15 21:45:37 jdolecek Exp $    */
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.94 2016/08/25 20:14:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.95 2016/09/15 21:45:37 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_slhci.h"
@@ -1599,7 +1599,7 @@
 /* Register read/write routines and barriers. */
 #ifdef SLHCI_BUS_SPACE_BARRIERS
 #define BSB(a, b, c, d, e) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_ # e)
-#define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_SYNC)
+#define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
 #else /* now !SLHCI_BUS_SPACE_BARRIERS */
 #define BSB(a, b, c, d, e) __USE(d)
 #define BSB_SYNC(a, b, c, d)



Home | Main Index | Thread Index | Old Index