diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-08-16 16:57:57 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-08-16 16:57:57 +0000 |
commit | 26502503e57448b879c9293f18ad778c2f7e5f78 (patch) | |
tree | d0ded423708b55f6864084633815a6dea9bdd44a /sys/ia64 | |
parent | 4e7370ed1f9b2e6226f4aaad15d80663f0849380 (diff) | |
download | src-26502503e57448b879c9293f18ad778c2f7e5f78.tar.gz src-26502503e57448b879c9293f18ad778c2f7e5f78.zip |
Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MI
prototypes of cpu_halt(), cpu_reset() and swi_vm() from md_var.h to
cpu.h. This affects db_command.c and kern_shutdown.c.
ia64: move all MD prototypes from cpu.h to md_var.h. This affects
madt.c, interrupt.c and mp_machdep.c. Remove is_physical_memory().
It's not used (vm_machdep.c).
alpha: the MD prototypes have been left in cpu.h with a comment
that they should be there. Moving them is left for later. It was
expected that the impact would be significant enough to be done in
a seperate commit.
powerpc: MD prototypes left in cpu.h. Comment added.
Suggested by: bde
Tested with: make universe (pc98 incomplete)
Notes
Notes:
svn path=/head/; revision=118990
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/acpica/madt.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/interrupt.c | 4 | ||||
-rw-r--r-- | sys/ia64/ia64/mp_machdep.c | 8 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 20 | ||||
-rw-r--r-- | sys/ia64/include/cpu.h | 30 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 22 |
6 files changed, 30 insertions, 56 deletions
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c index b2106338ccf8..ac281d3a0147 100644 --- a/sys/ia64/acpica/madt.c +++ b/sys/ia64/acpica/madt.c @@ -28,7 +28,7 @@ #include "acpi.h" -#include <machine/cpu.h> +#include <machine/md_var.h> extern u_int64_t ia64_lapic_address; diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index 6ee3070ddbab..e7b5367ab7b4 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -51,11 +51,11 @@ #include <sys/sysctl.h> #include <machine/clock.h> -#include <machine/cpu.h> -#include <machine/reg.h> #include <machine/frame.h> #include <machine/intr.h> +#include <machine/md_var.h> #include <machine/pcb.h> +#include <machine/reg.h> #include <machine/sapicvar.h> #include <machine/smp.h> diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index 5de8c249cef6..69bead1ff138 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -47,15 +47,15 @@ #include <vm/vm_kern.h> #include <machine/atomic.h> -#include <machine/cpu.h> +#include <machine/clock.h> +#include <machine/fpu.h> +#include <machine/mca.h> +#include <machine/md_var.h> #include <machine/pal.h> #include <machine/pcb.h> #include <machine/pmap.h> -#include <machine/clock.h> -#include <machine/mca.h> #include <machine/sal.h> #include <machine/smp.h> -#include <machine/fpu.h> #include <i386/include/specialreg.h> MALLOC_DECLARE(M_PMAP); diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index dd9ecb314ebd..77d7c6405122 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -307,23 +307,3 @@ swi_vm(void *dummy) busdma_swi(); #endif } - -/* - * Tell whether this address is in some physical memory region. - * Currently used by the kernel coredump code in order to avoid - * dumping the ``ISA memory hole'' which could cause indefinite hangs, - * or other unpredictable behaviour. - */ - - -int -is_physical_memory(addr) - vm_offset_t addr; -{ - /* - * stuff other tests for known memory-mapped devices (PCI?) - * here - */ - - return 1; -} diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h index 502fc49b383a..7269e921fcd5 100644 --- a/sys/ia64/include/cpu.h +++ b/sys/ia64/include/cpu.h @@ -90,34 +90,16 @@ struct clockframe { #ifdef _KERNEL -struct thread; -struct trapframe; - -void cpu_mp_add(u_int, u_int, u_int); -int do_ast(struct trapframe *); -void fork_trampoline(void); /* MAGIC */ -int ia64_count_cpus(void); -int ia64_highfp_drop(struct thread *); -int ia64_highfp_load(struct thread *); -int ia64_highfp_save(struct thread *); -void ia64_init(void); -void ia64_probe_sapics(void); -void interrupt(u_int64_t, struct trapframe *); -void map_gateway_page(void); -void map_pal_code(void); -void map_port_space(void); -int syscall(struct trapframe *); -void trap(int, struct trapframe *); - /* * Return contents of in-cpu fast counter as a sort of "bogo-time" * for non-critical timing. */ -static __inline u_int64_t -get_cyclecount(void) -{ - return (ia64_get_itc()); -} +#define get_cyclecount ia64_get_itc + +void cpu_halt(void); +void cpu_reset(void); +void fork_trampoline(void); /* MAGIC */ +void swi_vm(void *); #endif /* _KERNEL */ diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 38d98de27e0b..3301f3416218 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -39,8 +39,9 @@ extern int szsigcode; extern long Maxmem; struct fpreg; -struct thread; struct reg; +struct thread; +struct trapframe; struct ia64_fdesc { u_int64_t func; @@ -51,11 +52,22 @@ struct ia64_fdesc { #define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp) void busdma_swi(void); -void cpu_halt(void); -void cpu_reset(void); -int is_physical_memory(vm_offset_t addr); +int copyout_regstack(struct thread *, uint64_t *, uint64_t *); +void cpu_mp_add(u_int, u_int, u_int); +int do_ast(struct trapframe *); +int ia64_count_cpus(void); +int ia64_highfp_drop(struct thread *); +int ia64_highfp_load(struct thread *); +int ia64_highfp_save(struct thread *); +void ia64_init(void); +void ia64_probe_sapics(void); +void interrupt(uint64_t, struct trapframe *); +void map_gateway_page(void); +void map_pal_code(void); +void map_port_space(void); void os_boot_rendez(void); void os_mca(void); -void swi_vm(void *); +int syscall(struct trapframe *); +void trap(int, struct trapframe *); #endif /* !_MACHINE_MD_VAR_H_ */ |