diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-06-01 22:20:36 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-06-01 22:20:36 +0000 |
commit | a638f352652004c9408641d59ffbcaa72ab89a67 (patch) | |
tree | 60e433cf40be834d7000730980b55eb3c69dcda1 /sys | |
parent | 250221dd97559fbf291b7776a28484b2639eba08 (diff) |
as discussed with uebayasi@ we should only use the "sync" instruction on octeon,
instead of syncs/syncw etc.
so remove the OCTEON_SYNC* macros and use mips_sync() directly.
ok uebayasi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/octeon/dev/cn30xxfauvar.h | 4 | ||||
-rw-r--r-- | sys/arch/octeon/dev/cn30xxpko.c | 6 | ||||
-rw-r--r-- | sys/arch/octeon/dev/cn30xxpow.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/octeon/dev/cn30xxfauvar.h b/sys/arch/octeon/dev/cn30xxfauvar.h index 568477f29c4..b53c7b40647 100644 --- a/sys/arch/octeon/dev/cn30xxfauvar.h +++ b/sys/arch/octeon/dev/cn30xxfauvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxfauvar.h,v 1.1 2011/06/16 11:22:30 syuu Exp $ */ +/* $OpenBSD: cn30xxfauvar.h,v 1.2 2013/06/01 22:20:35 jasper Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -125,7 +125,7 @@ cn30xxfau_op_inc_fetch_8(struct cn30xxfau_desc *fd, int64_t v) static inline int64_t cn30xxfau_op_inc_read_8(struct cn30xxfau_desc *fd) { - OCTEON_SYNCIOBDMA; + mips_sync(); return octeon_cvmseg_read_8(fd->fd_scroff); } diff --git a/sys/arch/octeon/dev/cn30xxpko.c b/sys/arch/octeon/dev/cn30xxpko.c index 509ffa79abf..c35c6d95f41 100644 --- a/sys/arch/octeon/dev/cn30xxpko.c +++ b/sys/arch/octeon/dev/cn30xxpko.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxpko.c,v 1.2 2012/12/05 23:20:14 deraadt Exp $ */ +/* $OpenBSD: cn30xxpko.c,v 1.3 2013/06/01 22:20:35 jasper Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -97,7 +97,7 @@ cn30xxpko_enable(struct cn30xxpko_softc *sc) SET(reg_flags, PKO_REG_FLAGS_ENA_DWB); SET(reg_flags, PKO_REG_FLAGS_ENA_PKO); /* XXX */ - OCTEON_SYNCW; + mips_sync(); _PKO_WR8(sc, PKO_REG_FLAGS_OFFSET, reg_flags); return 0; @@ -176,7 +176,7 @@ cn30xxpko_port_config(struct cn30xxpko_softc *sc) SET(mem_queue_ptrs, sc->sc_port & PKO_MEM_QUEUE_PTRS_QID); SET(mem_queue_ptrs, ((uint64_t)0xff << 53) & PKO_MEM_QUEUE_PTRS_QOS_MASK); SET(mem_queue_ptrs, ((uint64_t)buf_ptr << 17) & PKO_MEM_QUEUE_PTRS_BUF_PTR); - OCTEON_SYNCW; + mips_sync(); _PKO_WR8(sc, PKO_MEM_QUEUE_PTRS_OFFSET, mem_queue_ptrs); /* diff --git a/sys/arch/octeon/dev/cn30xxpow.c b/sys/arch/octeon/dev/cn30xxpow.c index 35577ed11fa..f49803e7ca5 100644 --- a/sys/arch/octeon/dev/cn30xxpow.c +++ b/sys/arch/octeon/dev/cn30xxpow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxpow.c,v 1.2 2012/12/05 23:20:14 deraadt Exp $ */ +/* $OpenBSD: cn30xxpow.c,v 1.3 2013/06/01 22:20:35 jasper Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -151,7 +151,7 @@ cn30xxpow_work_response_async(uint64_t scraddr) { uint64_t result; - OCTEON_SYNCIOBDMA; + mips_sync(); result = octeon_cvmseg_read_8(scraddr); return (result & POW_IOBDMA_GET_WORK_RESULT_NO_WORK) ? |