Download raw body.
remove arm bus_space_notimpl.S
drop some members of bus_space struct and pointless wrappers around
panic() in bus_space_notimpl.S
diff --git sys/arch/arm/arm/bus_space_notimpl.S sys/arch/arm/arm/bus_space_notimpl.S
deleted file mode 100644
index 88c03a2d967..00000000000
--- sys/arch/arm/arm/bus_space_notimpl.S
+++ /dev/null
@@ -1,170 +0,0 @@
-/* $OpenBSD: bus_space_notimpl.S,v 1.5 2026/05/20 07:49:55 jsg Exp $ */
-/* $NetBSD: bus_space_notimpl.S,v 1.2 2001/09/10 02:20:19 reinoud Exp $ */
-
-/*
- * Copyright (c) 1997 Mark Brinicombe.
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Mark Brinicombe.
- * 4. The name of the company nor the name of the author may 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 OR CONTRIBUTORS 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.
- */
-
-#include <machine/asm.h>
-
-/*
- * BUS_SPACE - name of this bus space
- */
-
-#define BUS_SPACE bs_notimpl
-
-#define __C(x,y) __CONCAT(x,y)
-#define __S(s) __STRING(s)
-#define NAME(func) __C(BUS_SPACE,__C(_bs_,func))
-#define LNAME(func) __C(L,NAME(func))
-
-#define __L(x) x
-#define GLOBAL(func) .global __L(NAME(func))
-#define LABEL(func) __L(NAME(func)):
-#define LLABEL(func) LNAME(func):
-
-#define FTEXT(func,text) __S(__C(NAME(func),text))
-
-
-#define NOT_IMPL(func) \
- GLOBAL(func) ; \
-LABEL(func) ; \
- adr r4, LNAME(__C(func,_text)) ; \
- b bs_notimpl_panic ; \
- ; \
-LLABEL(__C(func,_text)) ; \
- .asciz __S(func) ; \
- .align 2 ;
-
-bs_notimpl_message:
- .asciz __S(BUS_SPACE), "_%s: args at %p"
-
- .align 2
-bs_notimpl_panic:
- stmfd sp!, {r0-r3}
- adr r0, bs_notimpl_message
- mov r1, r4
- mov r2, sp
- b panic
-
-
-
-/*
- * misc functions
- */
-
-NOT_IMPL(mmap)
-
-
-/*
- * Generic bus_space I/O functions
- */
-
-/*
- * read single
- */
-
-NOT_IMPL(r_1)
-NOT_IMPL(r_2)
-NOT_IMPL(r_4)
-NOT_IMPL(r_8)
-
-/*
- * write single
- */
-
-NOT_IMPL(w_1)
-NOT_IMPL(w_2)
-NOT_IMPL(w_4)
-NOT_IMPL(w_8)
-
-/*
- * read multiple
- */
-
-NOT_IMPL(rm_1)
-NOT_IMPL(rm_2)
-NOT_IMPL(rm_4)
-NOT_IMPL(rm_8)
-
-/*
- * write multiple
- */
-
-NOT_IMPL(wm_1)
-NOT_IMPL(wm_2)
-NOT_IMPL(wm_4)
-NOT_IMPL(wm_8)
-
-/*
- * read region
- */
-
-NOT_IMPL(rr_1)
-NOT_IMPL(rr_2)
-NOT_IMPL(rr_4)
-NOT_IMPL(rr_8)
-
-/*
- * write region
- */
-
-NOT_IMPL(wr_1)
-NOT_IMPL(wr_2)
-NOT_IMPL(wr_4)
-NOT_IMPL(wr_8)
-
-/*
- * set multiple
- */
-
-NOT_IMPL(sm_1)
-NOT_IMPL(sm_2)
-NOT_IMPL(sm_4)
-NOT_IMPL(sm_8)
-
-/*
- * set region
- */
-
-NOT_IMPL(sr_1)
-NOT_IMPL(sr_2)
-NOT_IMPL(sr_4)
-NOT_IMPL(sr_8)
-
-/*
- * copy
- */
-
-NOT_IMPL(c_1)
-NOT_IMPL(c_2)
-NOT_IMPL(c_4)
-NOT_IMPL(c_8)
diff --git sys/arch/arm/armv7/armv7_space.c sys/arch/arm/armv7/armv7_space.c
index 99fe1d36e31..3a8ad21640f 100644
--- sys/arch/arm/armv7/armv7_space.c
+++ sys/arch/arm/armv7/armv7_space.c
@@ -84,7 +84,6 @@
/* Prototypes for all the bus_space structure functions */
bs_protos(armv7);
-bs_protos(bs_notimpl);
struct bus_space armv7_bs_tag = {
/* cookie */
@@ -102,9 +101,6 @@ struct bus_space armv7_bs_tag = {
/* get kernel virtual address */
armv7_bs_vaddr,
- /* mmap */
- bs_notimpl_bs_mmap,
-
/* barrier */
armv7_bs_barrier,
@@ -112,55 +108,39 @@ struct bus_space armv7_bs_tag = {
armv7_bs_r_1,
armv7_bs_r_2,
armv7_bs_r_4,
- bs_notimpl_bs_r_8,
/* read multiple */
armv7_bs_rm_1,
armv7_bs_rm_2,
armv7_bs_rm_4,
- bs_notimpl_bs_rm_8,
/* read region */
armv7_bs_rr_1,
armv7_bs_rr_2,
armv7_bs_rr_4,
- bs_notimpl_bs_rr_8,
/* write (single) */
armv7_bs_w_1,
armv7_bs_w_2,
armv7_bs_w_4,
- bs_notimpl_bs_w_8,
/* write multiple */
armv7_bs_wm_1,
armv7_bs_wm_2,
armv7_bs_wm_4,
- bs_notimpl_bs_wm_8,
/* write region */
armv7_bs_wr_1,
armv7_bs_wr_2,
armv7_bs_wr_4,
- bs_notimpl_bs_wr_8,
-
- /* set multiple */
- bs_notimpl_bs_sm_1,
- bs_notimpl_bs_sm_2,
- bs_notimpl_bs_sm_4,
- bs_notimpl_bs_sm_8,
/* set region */
armv7_bs_sr_1,
armv7_bs_sr_2,
armv7_bs_sr_4,
- bs_notimpl_bs_sr_8,
/* copy */
- bs_notimpl_bs_c_1,
armv7_bs_c_2,
- bs_notimpl_bs_c_4,
- bs_notimpl_bs_c_8,
};
struct bus_space *fdt_cons_bs_tag = &armv7_bs_tag;
diff --git sys/arch/arm/conf/files.arm sys/arch/arm/conf/files.arm
index f254fd498d8..46368f5144f 100644
--- sys/arch/arm/conf/files.arm
+++ sys/arch/arm/conf/files.arm
@@ -29,9 +29,6 @@ include "arch/arm/cortex/files.cortex"
device cpu {}
attach cpu at mainbus
-# bus_space(9)
-file arch/arm/arm/bus_space_notimpl.S
-
file arch/arm/arm/arm_machdep.c
file arch/arm/arm/ast.c
file arch/arm/arm/bcopyinout.S
diff --git sys/arch/arm/include/bus.h sys/arch/arm/include/bus.h
index 45cd5b79d83..4c65463c400 100644
--- sys/arch/arm/include/bus.h
+++ sys/arch/arm/include/bus.h
@@ -110,9 +110,6 @@ struct bus_space {
/* get kernel virtual address */
void * (*bs_vaddr) (void *, bus_space_handle_t);
- /* mmap bus space for user */
- paddr_t (*bs_mmap) (void *, bus_addr_t, off_t, int, int);
-
/* barrier */
void (*bs_barrier) (void *, bus_space_handle_t,
bus_size_t, bus_size_t, int);
@@ -124,8 +121,6 @@ struct bus_space {
bus_size_t);
u_int32_t (*bs_r_4) (void *, bus_space_handle_t,
bus_size_t);
- u_int64_t (*bs_r_8) (void *, bus_space_handle_t,
- bus_size_t);
/* read multiple */
void (*bs_rm_1) (void *, bus_space_handle_t,
@@ -134,8 +129,6 @@ struct bus_space {
bus_size_t, u_int16_t *, bus_size_t);
void (*bs_rm_4) (void *, bus_space_handle_t,
bus_size_t, u_int32_t *, bus_size_t);
- void (*bs_rm_8) (void *, bus_space_handle_t,
- bus_size_t, u_int64_t *, bus_size_t);
/* read region */
void (*bs_rr_1) (void *, bus_space_handle_t,
@@ -144,9 +137,7 @@ struct bus_space {
bus_size_t, u_int16_t *, bus_size_t);
void (*bs_rr_4) (void *, bus_space_handle_t,
bus_size_t, u_int32_t *, bus_size_t);
- void (*bs_rr_8) (void *, bus_space_handle_t,
- bus_size_t, u_int64_t *, bus_size_t);
-
+
/* write (single) */
void (*bs_w_1) (void *, bus_space_handle_t,
bus_size_t, u_int8_t);
@@ -154,8 +145,6 @@ struct bus_space {
bus_size_t, u_int16_t);
void (*bs_w_4) (void *, bus_space_handle_t,
bus_size_t, u_int32_t);
- void (*bs_w_8) (void *, bus_space_handle_t,
- bus_size_t, u_int64_t);
/* write multiple */
void (*bs_wm_1) (void *, bus_space_handle_t,
@@ -164,9 +153,7 @@ struct bus_space {
bus_size_t, const u_int16_t *, bus_size_t);
void (*bs_wm_4) (void *, bus_space_handle_t,
bus_size_t, const u_int32_t *, bus_size_t);
- void (*bs_wm_8) (void *, bus_space_handle_t,
- bus_size_t, const u_int64_t *, bus_size_t);
-
+
/* write region */
void (*bs_wr_1) (void *, bus_space_handle_t,
bus_size_t, const u_int8_t *, bus_size_t);
@@ -174,18 +161,6 @@ struct bus_space {
bus_size_t, const u_int16_t *, bus_size_t);
void (*bs_wr_4) (void *, bus_space_handle_t,
bus_size_t, const u_int32_t *, bus_size_t);
- void (*bs_wr_8) (void *, bus_space_handle_t,
- bus_size_t, const u_int64_t *, bus_size_t);
-
- /* set multiple */
- void (*bs_sm_1) (void *, bus_space_handle_t,
- bus_size_t, u_int8_t, bus_size_t);
- void (*bs_sm_2) (void *, bus_space_handle_t,
- bus_size_t, u_int16_t, bus_size_t);
- void (*bs_sm_4) (void *, bus_space_handle_t,
- bus_size_t, u_int32_t, bus_size_t);
- void (*bs_sm_8) (void *, bus_space_handle_t,
- bus_size_t, u_int64_t, bus_size_t);
/* set region */
void (*bs_sr_1) (void *, bus_space_handle_t,
@@ -194,18 +169,10 @@ struct bus_space {
bus_size_t, u_int16_t, bus_size_t);
void (*bs_sr_4) (void *, bus_space_handle_t,
bus_size_t, u_int32_t, bus_size_t);
- void (*bs_sr_8) (void *, bus_space_handle_t,
- bus_size_t, u_int64_t, bus_size_t);
/* copy */
- void (*bs_c_1) (void *, bus_space_handle_t, bus_size_t,
- bus_space_handle_t, bus_size_t, bus_size_t);
void (*bs_c_2) (void *, bus_space_handle_t, bus_size_t,
bus_space_handle_t, bus_size_t, bus_size_t);
- void (*bs_c_4) (void *, bus_space_handle_t, bus_size_t,
- bus_space_handle_t, bus_size_t, bus_size_t);
- void (*bs_c_8) (void *, bus_space_handle_t, bus_size_t,
- bus_space_handle_t, bus_size_t, bus_size_t);
};
@@ -252,12 +219,6 @@ struct bus_space {
#define bus_space_vaddr(t, h) \
(*(t)->bs_vaddr)((t)->bs_cookie, (h))
-/*
- * MMap bus space for a user application.
- */
-#define bus_space_mmap(t, a, o, p, f) \
- (*(t)->bs_mmap)((t)->bs_cookie, (a), (o), (p), (f))
-
/*
* Bus barrier operations.
*/
@@ -398,9 +359,6 @@ void __bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh, \
#define bs_vaddr_proto(f) \
void * __bs_c(f,_bs_vaddr) (void *t, bus_space_handle_t bsh);
-#define bs_mmap_proto(f) \
-paddr_t __bs_c(f,_bs_mmap) (void *, bus_addr_t, off_t, int, int);
-
#define bs_barrier_proto(f) \
void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, bus_size_t len, int flags);
@@ -417,10 +375,6 @@ u_int16_t __bs_c(f,_bs_r_2) (void *t, bus_space_handle_t bsh, \
u_int32_t __bs_c(f,_bs_r_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset);
-#define bs_r_8_proto(f) \
-u_int64_t __bs_c(f,_bs_r_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset);
-
#define bs_w_1_proto(f) \
void __bs_c(f,_bs_w_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int8_t value);
@@ -433,10 +387,6 @@ void __bs_c(f,_bs_w_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f,_bs_w_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int32_t value);
-#define bs_w_8_proto(f) \
-void __bs_c(f,_bs_w_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int64_t value);
-
#define bs_rm_1_proto(f) \
void __bs_c(f,_bs_rm_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int8_t *addr, bus_size_t count);
@@ -449,10 +399,6 @@ void __bs_c(f,_bs_rm_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f,_bs_rm_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int32_t *addr, bus_size_t count);
-#define bs_rm_8_proto(f) \
-void __bs_c(f,_bs_rm_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int64_t *addr, bus_size_t count);
-
#define bs_wm_1_proto(f) \
void __bs_c(f,_bs_wm_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, const u_int8_t *addr, bus_size_t count);
@@ -465,10 +411,6 @@ void __bs_c(f,_bs_wm_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f,_bs_wm_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, const u_int32_t *addr, bus_size_t count);
-#define bs_wm_8_proto(f) \
-void __bs_c(f,_bs_wm_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, const u_int64_t *addr, bus_size_t count);
-
#define bs_rr_1_proto(f) \
void __bs_c(f, _bs_rr_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int8_t *addr, bus_size_t count);
@@ -481,10 +423,6 @@ void __bs_c(f, _bs_rr_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f, _bs_rr_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int32_t *addr, bus_size_t count);
-#define bs_rr_8_proto(f) \
-void __bs_c(f, _bs_rr_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int64_t *addr, bus_size_t count);
-
#define bs_wr_1_proto(f) \
void __bs_c(f, _bs_wr_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, const u_int8_t *addr, bus_size_t count);
@@ -497,26 +435,6 @@ void __bs_c(f, _bs_wr_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f, _bs_wr_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, const u_int32_t *addr, bus_size_t count);
-#define bs_wr_8_proto(f) \
-void __bs_c(f, _bs_wr_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, const u_int64_t *addr, bus_size_t count);
-
-#define bs_sm_1_proto(f) \
-void __bs_c(f,_bs_sm_1) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int8_t value, bus_size_t count);
-
-#define bs_sm_2_proto(f) \
-void __bs_c(f,_bs_sm_2) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int16_t value, bus_size_t count);
-
-#define bs_sm_4_proto(f) \
-void __bs_c(f,_bs_sm_4) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int32_t value, bus_size_t count);
-
-#define bs_sm_8_proto(f) \
-void __bs_c(f,_bs_sm_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int64_t value, bus_size_t count);
-
#define bs_sr_1_proto(f) \
void __bs_c(f,_bs_sr_1) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int8_t value, bus_size_t count);
@@ -529,30 +447,11 @@ void __bs_c(f,_bs_sr_2) (void *t, bus_space_handle_t bsh, \
void __bs_c(f,_bs_sr_4) (void *t, bus_space_handle_t bsh, \
bus_size_t offset, u_int32_t value, bus_size_t count);
-#define bs_sr_8_proto(f) \
-void __bs_c(f,_bs_sr_8) (void *t, bus_space_handle_t bsh, \
- bus_size_t offset, u_int64_t value, bus_size_t count);
-
-#define bs_c_1_proto(f) \
-void __bs_c(f,_bs_c_1) (void *t, bus_space_handle_t bsh1, \
- bus_size_t offset1, bus_space_handle_t bsh2, \
- bus_size_t offset2, bus_size_t count);
-
#define bs_c_2_proto(f) \
void __bs_c(f,_bs_c_2) (void *t, bus_space_handle_t bsh1, \
bus_size_t offset1, bus_space_handle_t bsh2, \
bus_size_t offset2, bus_size_t count);
-#define bs_c_4_proto(f) \
-void __bs_c(f,_bs_c_4) (void *t, bus_space_handle_t bsh1, \
- bus_size_t offset1, bus_space_handle_t bsh2, \
- bus_size_t offset2, bus_size_t count);
-
-#define bs_c_8_proto(f) \
-void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bsh1, \
- bus_size_t offset1, bus_space_handle_t bsh2, \
- bus_size_t offset2, bus_size_t count);
-
#define bs_protos(f) \
bs_map_proto(f); \
bs_unmap_proto(f); \
@@ -560,44 +459,29 @@ bs_subregion_proto(f); \
bs_alloc_proto(f); \
bs_free_proto(f); \
bs_vaddr_proto(f); \
-bs_mmap_proto(f); \
bs_barrier_proto(f); \
bs_r_1_proto(f); \
bs_r_2_proto(f); \
bs_r_4_proto(f); \
-bs_r_8_proto(f); \
bs_w_1_proto(f); \
bs_w_2_proto(f); \
bs_w_4_proto(f); \
-bs_w_8_proto(f); \
bs_rm_1_proto(f); \
bs_rm_2_proto(f); \
bs_rm_4_proto(f); \
-bs_rm_8_proto(f); \
bs_wm_1_proto(f); \
bs_wm_2_proto(f); \
bs_wm_4_proto(f); \
-bs_wm_8_proto(f); \
bs_rr_1_proto(f); \
bs_rr_2_proto(f); \
bs_rr_4_proto(f); \
-bs_rr_8_proto(f); \
bs_wr_1_proto(f); \
bs_wr_2_proto(f); \
bs_wr_4_proto(f); \
-bs_wr_8_proto(f); \
-bs_sm_1_proto(f); \
-bs_sm_2_proto(f); \
-bs_sm_4_proto(f); \
-bs_sm_8_proto(f); \
bs_sr_1_proto(f); \
bs_sr_2_proto(f); \
bs_sr_4_proto(f); \
-bs_sr_8_proto(f); \
-bs_c_1_proto(f); \
-bs_c_2_proto(f); \
-bs_c_4_proto(f); \
-bs_c_8_proto(f);
+bs_c_2_proto(f);
/* Bus Space DMA macros */
remove arm bus_space_notimpl.S