Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/arch/powerpc/powerpc Fix the LINTSTUB entries- the ...



details:   https://anonhg.NetBSD.org/src/rev/db10d0106e36
branches:  netbsd-2-0
changeset: 560123:db10d0106e36
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Mar 29 01:15:15 2004 +0000

description:
Fix the LINTSTUB entries- the second arg to these functions is a
bus_space_handle_t, not a bus_addr_t.

diffstat:

 sys/arch/powerpc/powerpc/pio_subr.S |  1164 +++++++++++++++++++++++++++++++++++
 1 files changed, 1164 insertions(+), 0 deletions(-)

diffs (truncated from 1168 to 300 lines):

diff -r c0e50e9eff08 -r db10d0106e36 sys/arch/powerpc/powerpc/pio_subr.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/powerpc/powerpc/pio_subr.S       Mon Mar 29 01:15:15 2004 +0000
@@ -0,0 +1,1164 @@
+/*     $NetBSD: pio_subr.S,v 1.8.2.2 2004/03/29 01:15:15 simonb Exp $  */
+
+/*
+ * Copyright (c) 2003 Matt Thomas
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+/*
+ * Assembly note:
+ *     We use rotlw instead of slw because rotlw ignores bit 26 and slw
+ *     doesn't.  However, this may make the high bits of the offset rotate
+ *     in the low bits but if that happens then the offset was too large
+ *     to being with.
+ */
+#ifdef DEBUG
+#define        DBGSYNC sync
+#else
+#define        DBGSYNC /* nothing */
+#endif
+/* LINTSTUB: include <sys/param.h> */
+/* LINTSTUB: include <sys/types.h> */
+/* LINTSTUB: include <machine/bus.h> */
+
+/* LINTSTUB: Func: void out8(volatile u_int8_t *a, u_int8_t v) */
+
+ENTRY_NOPROFILE(out8)
+       stbx    4,0,3
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw1_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v) */
+/* LINTSTUB: Func: void bsw1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int8_t v) */
+
+ENTRY_NOPROFILE(bsw1_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw1)
+       stbx    6,4,5           /* store value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void out16(volatile u_int16_t *a, u_int16_t v) */
+
+ENTRY_NOPROFILE(out16)
+       sth     4,0(3)
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw2_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v) */
+/* LINTSTUB: Func: void bsw2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v) */
+
+ENTRY_NOPROFILE(bsw2_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw2)
+       sthx    6,4,5           /* store value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void out32(volatile u_int32_t *a, u_int32_t v) */
+
+ENTRY_NOPROFILE(out32)
+       stw     4,0(3)
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw4_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v) */
+/* LINTSTUB: Func: void bsw4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v) */
+
+ENTRY_NOPROFILE(bsw4_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw4)
+       stwx    6,4,5           /* store value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw8_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v) */
+/* LINTSTUB: Func: void bsw8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v) */
+ENTRY_NOPROFILE(bsw8_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw8)
+#ifdef __ARCH64__
+       stdx    6,4,5           /* store value */
+#else
+       trap                    /* die */
+#endif
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void out16rb(volatile u_int16_t *a, u_int16_t v) */
+
+ENTRY_NOPROFILE(out16rb)
+       sthbrx  4,0,3
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw2rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v) */
+/* LINTSTUB: Func: void bsw2rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int16_t v) */
+
+
+ENTRY_NOPROFILE(bsw2rb_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw2rb)
+       sthbrx  6,4,5           /* store value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void out32rb(volatile u_int32_t *a, u_int32_t v) */
+
+ENTRY_NOPROFILE(out32rb)
+       stwbrx  4,0,3
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw4rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v) */
+/* LINTSTUB: Func: void bsw4rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int32_t v) */
+
+ENTRY_NOPROFILE(bsw4rb_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw4rb)
+       stwbrx  6,4,5           /* store value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: void bsw8rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v) */
+/* LINTSTUB: Func: void bsw8rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v) */
+
+ENTRY_NOPROFILE(bsw8rb_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsw8rb)
+#ifdef __ARCH64__
+       stdbrx  6,4,5           /* store value */
+#else
+       trap                    /* die */
+#endif
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int in8(const volatile u_int8_t *a) */
+
+ENTRY_NOPROFILE(in8)
+       lbz     3,0(3)
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int bsr1_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: int bsr1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr1_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr1)
+       lbzx    3,4,5           /* load value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int in16(const volatile u_int16_t *a) */
+
+ENTRY_NOPROFILE(in16)
+       lhz     3,0(3)
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int bsr2_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: int bsr2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr2_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr2)
+       lhzx    3,4,5           /* load value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int in32(const volatile u_int32_t *a) */
+
+ENTRY_NOPROFILE(in32)
+       lwz     3,0(3)
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int bsr4_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: int bsr4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr4_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr4)
+       lwzx    3,4,5           /* load value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: u_int64_t bsr8_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: u_int64_t bsr8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr8_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr8)
+#ifdef __ARCH64__
+       lwdx    3,4,5           /* load value */
+#else
+       trap
+#endif
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int in16rb(const volatile u_int16_t *a) */
+
+ENTRY_NOPROFILE(in16rb)
+       lhbrx   3,0,3
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int bsr2rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: int bsr2rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr2rb_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr2rb)
+       lhbrx   3,4,5           /* load value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int in32rb(const volatile u_int32_t *a) */
+
+ENTRY_NOPROFILE(in32rb)
+       lwbrx   3,0,3
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: int bsr4rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: int bsr4rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+
+ENTRY_NOPROFILE(bsr4rb_s)
+       lwz     0,0(3)          /* get log2(stride) */
+       rotlw   5,5,0           /* shift offset */
+ENTRY_NOPROFILE(bsr4rb)
+       lwbrx   3,4,5           /* load value */
+       eieio                   /* memory barrier (reorder protection) */
+       DBGSYNC                 /* force exceptions */
+       blr                     /* return */
+
+/* LINTSTUB: Func: u_int64_t bsr8rb_s(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+/* LINTSTUB: Func: u_int64_t bsr8rb(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) */
+



Home | Main Index | Thread Index | Old Index