summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-06-01 22:20:36 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2013-06-01 22:20:36 +0000
commit59e37e11197b0f3b7044ff5b75f4da666c47de0c (patch)
tree7050a3baa97f737838494eb75ef5f6ba52f8ba95 /sys
parent1685361627f3f27ab6bbd97d011e324826561be6 (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/cn30xxfau.c8
-rw-r--r--sys/arch/octeon/dev/cn30xxfpavar.h4
-rw-r--r--sys/arch/octeon/dev/cn30xxpkovar.h4
-rw-r--r--sys/arch/octeon/include/octeonvar.h14
4 files changed, 8 insertions, 22 deletions
diff --git a/sys/arch/octeon/dev/cn30xxfau.c b/sys/arch/octeon/dev/cn30xxfau.c
index 4950bbc4484..56320d6fc9d 100644
--- a/sys/arch/octeon/dev/cn30xxfau.c
+++ b/sys/arch/octeon/dev/cn30xxfau.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cn30xxfau.c,v 1.3 2013/06/01 21:25:26 jasper Exp $ */
+/* $OpenBSD: cn30xxfau.c,v 1.4 2013/06/01 22:20:35 jasper Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -119,7 +119,7 @@ cn30xxfau_op_init(struct cn30xxfau_desc *fd, size_t scroff, size_t regno)
uint64_t
cn30xxfau_op_save(struct cn30xxfau_desc *fd)
{
- OCTEON_SYNCIOBDMA/* XXX */;
+ mips_sync();
return octeon_cvmseg_read_8(fd->fd_scroff);
}
@@ -134,7 +134,7 @@ cn30xxfau_op_inc_8(struct cn30xxfau_desc *fd, int64_t v)
{
cn30xxfau_op_iobdma_store_data(fd->fd_scroff, v, 0, OCT_FAU_OP_SIZE_64/* XXX */,
fd->fd_regno);
- OCTEON_SYNCIOBDMA/* XXX */;
+ mips_sync();
return octeon_cvmseg_read_8(fd->fd_scroff)/* XXX */;
}
@@ -144,7 +144,7 @@ cn30xxfau_op_incwait_8(struct cn30xxfau_desc *fd, int v)
cn30xxfau_op_iobdma_store_data(fd->fd_scroff, v, 1, OCT_FAU_OP_SIZE_64/* XXX */,
fd->fd_regno);
/* XXX */
- OCTEON_SYNCIOBDMA/* XXX */;
+ mips_sync();
/* XXX */
return octeon_cvmseg_read_8(fd->fd_scroff)/* XXX */;
}
diff --git a/sys/arch/octeon/dev/cn30xxfpavar.h b/sys/arch/octeon/dev/cn30xxfpavar.h
index 8743d057391..4e5c57b1802 100644
--- a/sys/arch/octeon/dev/cn30xxfpavar.h
+++ b/sys/arch/octeon/dev/cn30xxfpavar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cn30xxfpavar.h,v 1.2 2013/06/01 21:25:26 jasper Exp $ */
+/* $OpenBSD: cn30xxfpavar.h,v 1.3 2013/06/01 22:20:35 jasper Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
* All rights reserved.
@@ -123,7 +123,7 @@ cn30xxfpa_store(uint64_t addr, uint64_t fpapool, uint64_t dwbcount)
(fpapool & 0x07ULL) << 40 |
(addr & 0xffffffffffULL);
- OCTEON_SYNCWS;
+ mips_sync();
octeon_xkphys_write_8(ptr, (dwbcount & 0x0ffULL));
}
diff --git a/sys/arch/octeon/dev/cn30xxpkovar.h b/sys/arch/octeon/dev/cn30xxpkovar.h
index 4c24f517ac9..7da45b20389 100644
--- a/sys/arch/octeon/dev/cn30xxpkovar.h
+++ b/sys/arch/octeon/dev/cn30xxpkovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cn30xxpkovar.h,v 1.3 2013/06/01 21:25:26 jasper Exp $ */
+/* $OpenBSD: cn30xxpkovar.h,v 1.4 2013/06/01 22:20:35 jasper Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -148,7 +148,7 @@ cn30xxpko_op_store(uint64_t args, uint64_t value)
((uint64_t)(CN30XXPKO_SUBDID & 0x7) << 40) |
((uint64_t)args);
/* XXX */
- OCTEON_SYNCW;
+ mips_sync();
octeon_xkphys_write_8(addr, value);
}
diff --git a/sys/arch/octeon/include/octeonvar.h b/sys/arch/octeon/include/octeonvar.h
index 9c6d7fbcbce..035d578a20a 100644
--- a/sys/arch/octeon/include/octeonvar.h
+++ b/sys/arch/octeon/include/octeonvar.h
@@ -332,20 +332,6 @@ ffs64(uint64_t val)
#define OCTEON_PREF_DWB(base, offset) __OCTEON_PREF_29(base, offset)
#define OCTEON_PREF_PFS(base, offset) __OCTEON_PREF_30(base, offset)
-/*
- * Sync
- */
-#define OCTEON_SYNCCOMMON(name) \
- __asm __volatile ( \
- _ASM_PROLOGUE_OCTEON \
- " "#name" \n" \
- _ASM_EPILOGUE \
- ::: "memory")
-#define OCTEON_SYNCIOBDMA __asm __volatile (".word 0x8f" : : :"memory")
-#define OCTEON_SYNCW __asm __volatile (".word 0x10f" : : )
-#define OCTEON_SYNC OCTEON_SYNCCOMMON(sync)
-#define OCTEON_SYNCWS __asm __volatile (".word 0x14f" : : )
-
static inline uint64_t
octeon_xkphys_read_8(paddr_t address)
{