Module Name: src
Committed By: dyoung
Date: Sun Jul 17 01:08:12 UTC 2011
Modified Files:
src/sys/arch/alpha/include: sysarch.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/include/sysarch.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/include/sysarch.h
diff -u src/sys/arch/alpha/include/sysarch.h:1.14 src/sys/arch/alpha/include/sysarch.h:1.15
--- src/sys/arch/alpha/include/sysarch.h:1.14 Wed Jul 13 04:47:16 2011
+++ src/sys/arch/alpha/include/sysarch.h Sun Jul 17 01:08:12 2011
@@ -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 */