Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/include Don't #include <machine/bus_defs.h> f...
details: https://anonhg.NetBSD.org/src/rev/b073e4bbea37
branches: trunk
changeset: 767360:b073e4bbea37
user: dyoung <dyoung%NetBSD.org@localhost>
date: Sun Jul 17 01:08:12 2011 +0000
description:
Don't #include <machine/bus_defs.h> from this header unless _KERNEL
is #defined. While this header is installed in the alpha userland,
however, <machine/bus_defs.h> is not.
Don't declare any of the alpha_bus_ or alpha_pci_ symbols unless _KERNEL
is #defined. I cannot find anything but libarch in the base system
that uses the symbols. Anything using alpha_pci_ symbols ought to use
pci(3), instead. Up next: don't use those symbols in libarch.
diffstat:
sys/arch/alpha/include/sysarch.h | 43 +++++++++------------------------------
1 files changed, 10 insertions(+), 33 deletions(-)
diffs (86 lines):
diff -r fc8eb5984167 -r b073e4bbea37 sys/arch/alpha/include/sysarch.h
--- a/sys/arch/alpha/include/sysarch.h Sun Jul 17 00:52:42 2011 +0000
+++ b/sys/arch/alpha/include/sysarch.h Sun Jul 17 01:08:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysarch.h,v 1.14 2011/07/13 04:47:16 dyoung Exp $ */
+/* $NetBSD: sysarch.h,v 1.15 2011/07/17 01:08:12 dyoung Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -32,7 +32,9 @@
#ifndef _ALPHA_SYSARCH_H_
#define _ALPHA_SYSARCH_H_
-#include <machine/bus_defs.h>
+#include <sys/types.h>
+#include <sys/stdint.h>
+
#include <machine/ieeefp.h>
/*
@@ -42,9 +44,6 @@
#define ALPHA_FPGETMASK 0
#define ALPHA_FPSETMASK 1
#define ALPHA_FPSETSTICKY 2
-#define ALPHA_BUS_GET_WINDOW_COUNT 3
-#define ALPHA_BUS_GET_WINDOW 4
-#define ALPHA_PCI_CONF_READWRITE 5
#define ALPHA_FPGETSTICKY 6
#define ALPHA_GET_FP_C 7
#define ALPHA_SET_FP_C 8
@@ -57,6 +56,12 @@
uint64_t fp_c;
};
+#ifdef _KERNEL
+#include <machine/bus_defs.h>
+
+#define ALPHA_BUS_GET_WINDOW_COUNT 3
+#define ALPHA_BUS_GET_WINDOW 4
+#define ALPHA_PCI_CONF_READWRITE 5
struct alpha_bus_get_window_count_args {
u_int type;
u_int count; /* output */
@@ -72,16 +77,6 @@
#define ALPHA_BUS_TYPE_PCI_MEM 1
#define ALPHA_BUS_TYPE_MAX 1
-struct alpha_pci_conf_readwrite_args {
- int write;
- u_int bus;
- u_int device;
- u_int function;
- u_int reg;
- u_int32_t val;
-};
-
-#ifdef _KERNEL
extern u_int alpha_bus_window_count[];
extern int (*alpha_bus_get_window)(int, int,
struct alpha_bus_space_translation *);
@@ -89,25 +84,7 @@
#else
#include <sys/cdefs.h>
-struct alpha_bus_window {
- void * abw_addr;
- size_t abw_size;
- struct alpha_bus_space_translation abw_abst;
-};
-
__BEGIN_DECLS
-int alpha_bus_getwindows(int, struct alpha_bus_window **);
-int alpha_bus_mapwindow(struct alpha_bus_window *);
-void alpha_bus_unmapwindow(struct alpha_bus_window *);
-
-void *alpha_pci_mem_map(bus_addr_t, bus_size_t, int,
- struct alpha_bus_space_translation *);
-void alpha_pci_mem_unmap(struct alpha_bus_space_translation *,
- void *addr, bus_size_t);
-
-u_int32_t alpha_pci_conf_read(u_int, u_int, u_int, u_int);
-void alpha_pci_conf_write(u_int, u_int, u_int, u_int, u_int32_t);
-
int sysarch(int, void *);
__END_DECLS
#endif /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index