From: Jonathan Gray Subject: move arm64/riscv64 bs_tag extern to bus.h To: tech@openbsd.org Date: Tue, 12 Nov 2024 16:41:10 +1100 move bus_space externs to bus.h remove: sys/arch/arm64/arm64/arm64var.h sys/arch/riscv64/include/riscv64var.h diff --git sys/arch/arm64/arm64/arm64var.h sys/arch/arm64/arm64/arm64var.h deleted file mode 100644 index 21b82422b11..00000000000 --- sys/arch/arm64/arm64/arm64var.h +++ /dev/null @@ -1,25 +0,0 @@ -/* $OpenBSD: arm64var.h,v 1.3 2021/04/02 03:02:45 tb Exp $ */ -/* - * Copyright (c) 2005,2008 Dale Rahn - * Copyright (c) 2012-2013 Patrick Wildt - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef __ARM64VAR_H__ -#define __ARM64VAR_H__ - -extern bus_space_t arm64_bs_tag; - -#endif /* __ARM64VAR_H__ */ - diff --git sys/arch/arm64/arm64/machdep.c sys/arch/arm64/arm64/machdep.c index 1567670d790..622f5351915 100644 --- sys/arch/arm64/arm64/machdep.c +++ sys/arch/arm64/arm64/machdep.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git sys/arch/arm64/dev/mainbus.c sys/arch/arm64/dev/mainbus.c index b22b521bd51..3ce4d3af1fb 100644 --- sys/arch/arm64/dev/mainbus.c +++ sys/arch/arm64/dev/mainbus.c @@ -28,8 +28,6 @@ #include #include -#include - int mainbus_match(struct device *, void *, void *); void mainbus_attach(struct device *, struct device *, void *); diff --git sys/arch/arm64/include/bus.h sys/arch/arm64/include/bus.h index 84464eb45aa..f1349215e04 100644 --- sys/arch/arm64/include/bus.h +++ sys/arch/arm64/include/bus.h @@ -134,6 +134,8 @@ struct bus_space { #define BUS_SPACE_MAP_LINEAR 0x04 #define BUS_SPACE_MAP_PREFETCHABLE 0x08 +extern bus_space_t arm64_bs_tag; + #define bus_space_vaddr(t, h) (*(t)->_space_vaddr)((t), (h)) #define bus_space_mmap(t, a, o, p, f) \ (*(t)->_space_mmap)((t), (a), (o), (p), (f)) diff --git sys/arch/riscv64/dev/mainbus.c sys/arch/riscv64/dev/mainbus.c index 205860493ce..814d30d7d68 100644 --- sys/arch/riscv64/dev/mainbus.c +++ sys/arch/riscv64/dev/mainbus.c @@ -26,8 +26,6 @@ #include #include -#include - int mainbus_match(struct device *, void *, void *); void mainbus_attach(struct device *, struct device *, void *); diff --git sys/arch/riscv64/include/bus.h sys/arch/riscv64/include/bus.h index 9e6449976ab..b93833cb484 100644 --- sys/arch/riscv64/include/bus.h +++ sys/arch/riscv64/include/bus.h @@ -134,6 +134,8 @@ struct bus_space { #define BUS_SPACE_MAP_LINEAR 0x02 #define BUS_SPACE_MAP_PREFETCHABLE 0x04 +extern bus_space_t riscv64_bs_tag; + #define bus_space_vaddr(t, h) (*(t)->_space_vaddr)((t), (h)) #define bus_space_mmap(t, a, o, p, f) \ (*(t)->_space_mmap)((t), (a), (o), (p), (f)) diff --git sys/arch/riscv64/include/riscv64var.h sys/arch/riscv64/include/riscv64var.h deleted file mode 100644 index d8b9cb92d16..00000000000 --- sys/arch/riscv64/include/riscv64var.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $OpenBSD: riscv64var.h,v 1.2 2021/05/12 01:20:52 jsg Exp $ */ - -/* - * Copyright (c) 2020 Mengshi Li - * Copyright (c) 2005,2008 Dale Rahn - * Copyright (c) 2012-2013 Patrick Wildt - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef __RISCV64VAR_H__ -#define __RISCV64VAR_H__ - -extern bus_space_t riscv64_bs_tag; - -#endif /* __RISCV64VAR_H__ */ diff --git sys/arch/riscv64/riscv64/machdep.c sys/arch/riscv64/riscv64/machdep.c index addea693298..69075e4aa0f 100644 --- sys/arch/riscv64/riscv64/machdep.c +++ sys/arch/riscv64/riscv64/machdep.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include