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
This commit is contained in:
jdolecek 2016-09-15 21:45:37 +00:00
parent 82fbc8048a
commit f52dcd49ca
8 changed files with 20 additions and 77 deletions

View File

@ -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 @@ ia64_bus_space_copy_region_8(bus_space_tag_t t,
#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)

View File

@ -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 @@ CFATTACH_DECL_NEW(argpio, sizeof (struct argpio_softc), argpio_match,
#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)

View File

@ -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 @@ struct mips_bus_space_translation {
#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_ */

View File

@ -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
*/

View File

@ -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 @@ out:
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,

View File

@ -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 @@ struct rtw_rxdesc {
#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.
*/

View File

@ -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 @@ rtw_barrier(const struct rtw_regs *r, int reg0, int reg1, int flags)
*/
/* 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)

View File

@ -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 @@ waitcheck:
/* 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)