sprincle volatile attribute for struct desc on memory to ease the
target HW dependency on cache characteristic and load-store serialization, and GCC compile time optimization strength.
This commit is contained in:
parent
4f712549a9
commit
21ef04a5a6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nvt.c,v 1.12 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: nvt.c,v 1.13 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -239,7 +239,7 @@ int
|
|||
nvt_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *txd;
|
||||
volatile struct desc *txd;
|
||||
unsigned loop;
|
||||
|
||||
len = (len & T_FLMASK);
|
||||
|
@ -270,7 +270,7 @@ int
|
|||
nvt_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *rxd;
|
||||
volatile struct desc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcn.c,v 1.11 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: pcn.c,v 1.12 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -221,7 +221,7 @@ int
|
|||
pcn_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *txd;
|
||||
volatile struct desc *txd;
|
||||
unsigned loop;
|
||||
int tlen;
|
||||
|
||||
|
@ -249,7 +249,7 @@ int
|
|||
pcn_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *rxd;
|
||||
volatile struct desc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rge.c,v 1.10 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: rge.c,v 1.11 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -227,7 +227,7 @@ int
|
|||
rge_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *txd;
|
||||
volatile struct desc *txd;
|
||||
unsigned loop;
|
||||
|
||||
wbinv(buf, len);
|
||||
|
@ -254,7 +254,7 @@ int
|
|||
rge_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *rxd;
|
||||
volatile struct desc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sip.c,v 1.12 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: sip.c,v 1.13 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -223,7 +223,7 @@ int
|
|||
sip_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *txd;
|
||||
volatile struct desc *txd;
|
||||
unsigned loop;
|
||||
|
||||
wbinv(buf, len);
|
||||
|
@ -249,7 +249,7 @@ int
|
|||
sip_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *rxd;
|
||||
volatile struct desc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tlp.c,v 1.15 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: tlp.c,v 1.16 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -206,7 +206,7 @@ int
|
|||
tlp_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *txd;
|
||||
volatile struct desc *txd;
|
||||
unsigned loop;
|
||||
|
||||
wbinv(buf, len);
|
||||
|
@ -234,7 +234,7 @@ int
|
|||
tlp_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct desc *rxd;
|
||||
volatile struct desc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vge.c,v 1.13 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: vge.c,v 1.14 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -310,7 +310,7 @@ int
|
|||
vge_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct tdesc *txd;
|
||||
volatile struct tdesc *txd;
|
||||
unsigned loop;
|
||||
|
||||
len = (len & T_FLMASK);
|
||||
|
@ -341,7 +341,7 @@ int
|
|||
vge_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct rdesc *rxd;
|
||||
volatile struct rdesc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wm.c,v 1.5 2008/04/28 20:23:34 martin Exp $ */
|
||||
/* $NetBSD: wm.c,v 1.6 2008/05/12 09:58:36 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -219,7 +219,7 @@ int
|
|||
wm_send(void *dev, char *buf, unsigned len)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct tdesc *txd;
|
||||
volatile struct tdesc *txd;
|
||||
unsigned loop;
|
||||
|
||||
wbinv(buf, len);
|
||||
|
@ -246,7 +246,7 @@ int
|
|||
wm_recv(void *dev, char *buf, unsigned maxlen, unsigned timo)
|
||||
{
|
||||
struct local *l = dev;
|
||||
struct rdesc *rxd;
|
||||
volatile struct rdesc *rxd;
|
||||
unsigned bound, rxstat, len;
|
||||
uint8_t *ptr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue