diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-18 05:32:40 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-18 05:32:40 +0000 |
commit | b35de996e97878b59d04658758823f3c4327a104 (patch) | |
tree | 69bb2781b419d00ab117ed2ab56b4342808b7ea7 | |
parent | 4845196ee4213b93076985cf8b281c63830f6a79 (diff) |
move bus space extern to bus.h; ok mpi@
-rw-r--r-- | sys/arch/arm64/arm64/arm64var.h | 25 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/machdep.c | 3 | ||||
-rw-r--r-- | sys/arch/arm64/dev/mainbus.c | 4 | ||||
-rw-r--r-- | sys/arch/arm64/include/bus.h | 4 | ||||
-rw-r--r-- | sys/arch/riscv64/dev/mainbus.c | 4 | ||||
-rw-r--r-- | sys/arch/riscv64/include/bus.h | 4 | ||||
-rw-r--r-- | sys/arch/riscv64/include/riscv64var.h | 26 | ||||
-rw-r--r-- | sys/arch/riscv64/riscv64/machdep.c | 3 |
8 files changed, 10 insertions, 63 deletions
diff --git a/sys/arch/arm64/arm64/arm64var.h b/sys/arch/arm64/arm64/arm64var.h deleted file mode 100644 index 21b82422b11..00000000000 --- a/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 <drahn@openbsd.org> - * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> - * - * 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 a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c index 1567670d790..dc4dda12ac3 100644 --- a/sys/arch/arm64/arm64/machdep.c +++ b/sys/arch/arm64/arm64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.94 2024/11/10 06:51:59 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.95 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2014 Patrick Wildt <patrick@blueri.se> * Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org> @@ -44,7 +44,6 @@ #include <machine/bootconfig.h> #include <machine/bus.h> #include <machine/fpu.h> -#include <arm64/arm64/arm64var.h> #include <machine/db_machdep.h> #include <ddb/db_extern.h> diff --git a/sys/arch/arm64/dev/mainbus.c b/sys/arch/arm64/dev/mainbus.c index b22b521bd51..01a6e13d750 100644 --- a/sys/arch/arm64/dev/mainbus.c +++ b/sys/arch/arm64/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.31 2024/11/11 22:43:07 jsg Exp $ */ +/* $OpenBSD: mainbus.c,v 1.32 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> * Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org> @@ -28,8 +28,6 @@ #include <dev/ofw/ofw_misc.h> #include <dev/ofw/ofw_thermal.h> -#include <arm64/arm64/arm64var.h> - int mainbus_match(struct device *, void *, void *); void mainbus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/arm64/include/bus.h b/sys/arch/arm64/include/bus.h index 84464eb45aa..8ebec8e9033 100644 --- a/sys/arch/arm64/include/bus.h +++ b/sys/arch/arm64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.10 2024/01/20 11:22:46 kettenis Exp $ */ +/* $OpenBSD: bus.h,v 1.11 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved. * @@ -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 a/sys/arch/riscv64/dev/mainbus.c b/sys/arch/riscv64/dev/mainbus.c index 205860493ce..8a6819fbcb9 100644 --- a/sys/arch/riscv64/dev/mainbus.c +++ b/sys/arch/riscv64/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.12 2024/11/11 22:43:07 jsg Exp $ */ +/* $OpenBSD: mainbus.c,v 1.13 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> @@ -26,8 +26,6 @@ #include <dev/ofw/openfirm.h> #include <dev/ofw/fdt.h> -#include <machine/riscv64var.h> - int mainbus_match(struct device *, void *, void *); void mainbus_attach(struct device *, struct device *, void *); diff --git a/sys/arch/riscv64/include/bus.h b/sys/arch/riscv64/include/bus.h index 9e6449976ab..285b201cc62 100644 --- a/sys/arch/riscv64/include/bus.h +++ b/sys/arch/riscv64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.6 2024/03/27 23:10:18 kettenis Exp $ */ +/* $OpenBSD: bus.h,v 1.7 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved. @@ -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 a/sys/arch/riscv64/include/riscv64var.h b/sys/arch/riscv64/include/riscv64var.h deleted file mode 100644 index d8b9cb92d16..00000000000 --- a/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 <mengshi.li.mars@gmail.com> - * Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com> - * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> - * - * 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 a/sys/arch/riscv64/riscv64/machdep.c b/sys/arch/riscv64/riscv64/machdep.c index addea693298..c2ba1f48ad3 100644 --- a/sys/arch/riscv64/riscv64/machdep.c +++ b/sys/arch/riscv64/riscv64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.39 2024/11/10 06:51:59 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.40 2024/11/18 05:32:39 jsg Exp $ */ /* * Copyright (c) 2014 Patrick Wildt <patrick@blueri.se> @@ -42,7 +42,6 @@ #include <machine/param.h> #include <machine/bootconfig.h> #include <machine/bus.h> -#include <machine/riscv64var.h> #include <machine/sbi.h> #include <machine/sysarch.h> |