Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/pci * sprintf -> snprintf
details: https://anonhg.NetBSD.org/src/rev/ccb33fd5d082
branches: trunk
changeset: 474146:ccb33fd5d082
user: ross <ross%NetBSD.org@localhost>
date: Tue Jun 29 17:10:57 1999 +0000
description:
* sprintf -> snprintf
* add a few alpha_mb() ops as called for by folklore and rumour
diffstat:
sys/arch/alpha/pci/apecs_pci.c | 8 ++++++--
sys/arch/alpha/pci/cia_pci.c | 10 ++++++++--
sys/arch/alpha/pci/pci_1000.c | 6 +++---
sys/arch/alpha/pci/pci_1000a.c | 6 +++---
4 files changed, 20 insertions(+), 10 deletions(-)
diffs (125 lines):
diff -r e11bd938b650 -r ccb33fd5d082 sys/arch/alpha/pci/apecs_pci.c
--- a/sys/arch/alpha/pci/apecs_pci.c Tue Jun 29 16:45:14 1999 +0000
+++ b/sys/arch/alpha/pci/apecs_pci.c Tue Jun 29 17:10:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apecs_pci.c,v 1.16 1997/09/02 13:19:15 thorpej Exp $ */
+/* $NetBSD: apecs_pci.c,v 1.17 1999/06/29 17:10:57 ross Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.16 1997/09/02 13:19:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.17 1999/06/29 17:10:57 ross Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -184,7 +184,11 @@
(offset & ~0x03) << 5 | /* XXX */
0 << 5 | /* XXX */
0x3 << 3); /* XXX */
+
+ alpha_mb();
*datap = data;
+ alpha_mb();
+ alpha_mb();
if (secondary) {
alpha_mb();
diff -r e11bd938b650 -r ccb33fd5d082 sys/arch/alpha/pci/cia_pci.c
--- a/sys/arch/alpha/pci/cia_pci.c Tue Jun 29 16:45:14 1999 +0000
+++ b/sys/arch/alpha/pci/cia_pci.c Tue Jun 29 17:10:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cia_pci.c,v 1.23 1998/07/29 01:28:44 thorpej Exp $ */
+/* $NetBSD: cia_pci.c,v 1.24 1999/06/29 17:10:57 ross Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: cia_pci.c,v 1.23 1998/07/29 01:28:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cia_pci.c,v 1.24 1999/06/29 17:10:57 ross Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -169,8 +169,11 @@
0x3 << 3); /* XXX */
}
data = (pcireg_t)-1;
+ alpha_mb();
if (!(ba = badaddr(datap, sizeof *datap)))
data = *datap;
+ alpha_mb();
+ alpha_mb();
if (secondary) {
alpha_mb();
@@ -249,7 +252,10 @@
0 << 5 | /* XXX */
0x3 << 3); /* XXX */
}
+ alpha_mb();
*datap = data;
+ alpha_mb();
+ alpha_mb();
if (secondary) {
alpha_mb();
diff -r e11bd938b650 -r ccb33fd5d082 sys/arch/alpha/pci/pci_1000.c
--- a/sys/arch/alpha/pci/pci_1000.c Tue Jun 29 16:45:14 1999 +0000
+++ b/sys/arch/alpha/pci/pci_1000.c Tue Jun 29 17:10:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000.c,v 1.5 1999/02/12 06:25:13 thorpej Exp $ */
+/* $NetBSD: pci_1000.c,v 1.6 1999/06/29 17:10:57 ross Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.5 1999/02/12 06:25:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.6 1999/06/29 17:10:57 ross Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -190,7 +190,7 @@
if (ih >= INTRCNT_DEC_1000_IRQ_LEN)
panic("dec_1000_intr_string: bogus dec_1000 IRQ 0x%lx\n", ih);
- sprintf(irqstr, irqmsg_fmt, ih);
+ snprintf(irqstr, sizeof irqstr, irqmsg_fmt, ih);
return (irqstr);
}
diff -r e11bd938b650 -r ccb33fd5d082 sys/arch/alpha/pci/pci_1000a.c
--- a/sys/arch/alpha/pci/pci_1000a.c Tue Jun 29 16:45:14 1999 +0000
+++ b/sys/arch/alpha/pci/pci_1000a.c Tue Jun 29 17:10:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000a.c,v 1.7 1999/02/12 06:25:13 thorpej Exp $ */
+/* $NetBSD: pci_1000a.c,v 1.8 1999/06/29 17:10:57 ross Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.7 1999/02/12 06:25:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.8 1999/06/29 17:10:57 ross Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -212,7 +212,7 @@
if (ih >= INTRCNT_DEC_1000A_IRQ_LEN)
panic("dec_1000a_intr_string: bogus dec_1000a IRQ 0x%lx\n", ih);
- sprintf(irqstr, irqmsg_fmt, ih);
+ snprintf(irqstr, sizeof irqstr, irqmsg_fmt, ih);
return (irqstr);
}
Home |
Main Index |
Thread Index |
Old Index