Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/netboot Fixed ALLOC() macro to allo...
details: https://anonhg.NetBSD.org/src/rev/4677f5a7c01f
branches: trunk
changeset: 754506:4677f5a7c01f
user: phx <phx%NetBSD.org@localhost>
date: Sun May 02 13:36:30 2010 +0000
description:
Fixed ALLOC() macro to allocate properly aligned memory.
diffstat:
sys/arch/sandpoint/stand/netboot/fxp.c | 4 ++--
sys/arch/sandpoint/stand/netboot/kse.c | 4 ++--
sys/arch/sandpoint/stand/netboot/nvt.c | 4 ++--
sys/arch/sandpoint/stand/netboot/pcn.c | 4 ++--
sys/arch/sandpoint/stand/netboot/rge.c | 4 ++--
sys/arch/sandpoint/stand/netboot/sip.c | 4 ++--
sys/arch/sandpoint/stand/netboot/sme.c | 4 ++--
sys/arch/sandpoint/stand/netboot/tlp.c | 4 ++--
sys/arch/sandpoint/stand/netboot/vge.c | 4 ++--
sys/arch/sandpoint/stand/netboot/wm.c | 4 ++--
10 files changed, 20 insertions(+), 20 deletions(-)
diffs (180 lines):
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/fxp.c
--- a/sys/arch/sandpoint/stand/netboot/fxp.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/fxp.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fxp.c,v 1.10 2009/01/12 09:41:59 tsutsui Exp $ */
+/* $NetBSD: fxp.c,v 1.11 2010/05/02 13:36:30 phx Exp $ */
/*
* most of the following code was imported from dev/ic/i82557.c; the
@@ -97,7 +97,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct txdesc {
volatile uint16_t cb_status;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/kse.c
--- a/sys/arch/sandpoint/stand/netboot/kse.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/kse.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kse.c,v 1.3 2009/01/25 03:39:28 nisimura Exp $ */
+/* $NetBSD: kse.c,v 1.4 2010/05/02 13:36:30 phx Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2, xd3;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/nvt.c
--- a/sys/arch/sandpoint/stand/netboot/nvt.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/nvt.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvt.c,v 1.17 2009/01/25 03:39:28 nisimura Exp $ */
+/* $NetBSD: nvt.c,v 1.18 2010/05/02 13:36:30 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2, xd3;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/pcn.c
--- a/sys/arch/sandpoint/stand/netboot/pcn.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/pcn.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcn.c,v 1.16 2009/01/25 03:39:28 nisimura Exp $ */
+/* $NetBSD: pcn.c,v 1.17 2010/05/02 13:36:30 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/rge.c
--- a/sys/arch/sandpoint/stand/netboot/rge.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/rge.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rge.c,v 1.16 2009/07/20 11:43:09 nisimura Exp $ */
+/* $NetBSD: rge.c,v 1.17 2010/05/02 13:36:30 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2, xd3;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/sip.c
--- a/sys/arch/sandpoint/stand/netboot/sip.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/sip.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sip.c,v 1.16 2009/01/12 09:41:59 tsutsui Exp $ */
+/* $NetBSD: sip.c,v 1.17 2010/05/02 13:36:31 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/sme.c
--- a/sys/arch/sandpoint/stand/netboot/sme.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/sme.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sme.c,v 1.2 2009/01/12 09:41:59 tsutsui Exp $ */
+/* $NetBSD: sme.c,v 1.3 2010/05/02 13:36:31 phx Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2, xd3;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/tlp.c
--- a/sys/arch/sandpoint/stand/netboot/tlp.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/tlp.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlp.c,v 1.24 2009/07/09 15:39:28 nisimura Exp $ */
+/* $NetBSD: tlp.c,v 1.25 2010/05/02 13:36:31 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct desc {
uint32_t xd0, xd1, xd2, xd3;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/vge.c
--- a/sys/arch/sandpoint/stand/netboot/vge.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/vge.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vge.c,v 1.17 2009/01/12 09:41:59 tsutsui Exp $ */
+/* $NetBSD: vge.c,v 1.18 2010/05/02 13:36:31 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct tdesc {
uint32_t t0, t1;
diff -r 91c904d9a01e -r 4677f5a7c01f sys/arch/sandpoint/stand/netboot/wm.c
--- a/sys/arch/sandpoint/stand/netboot/wm.c Sun May 02 13:31:14 2010 +0000
+++ b/sys/arch/sandpoint/stand/netboot/wm.c Sun May 02 13:36:30 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wm.c,v 1.10 2009/01/25 03:39:28 nisimura Exp $ */
+/* $NetBSD: wm.c,v 1.11 2010/05/02 13:36:31 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
#define wbinv(adr, siz) _wbinv(VTOPHYS(adr), (uint32_t)(siz))
#define inv(adr, siz) _inv(VTOPHYS(adr), (uint32_t)(siz))
#define DELAY(n) delay(n)
-#define ALLOC(T,A) (T *)((unsigned)alloc(sizeof(T) + (A)) &~ ((A) - 1))
+#define ALLOC(T,A) (T *)allocaligned(sizeof(T),(A))
struct tdesc {
uint32_t lo; /* 31:0 */
Home |
Main Index |
Thread Index |
Old Index