diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-02 21:16:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-02 21:16:46 +0000 |
commit | 5e788f867774c7135a767901c7bb102f7cadfe52 (patch) | |
tree | 1515f96835097bfedfc950200b882091ecd830de /sys | |
parent | a34f0b9990838d93085d02cd87ed14024aa8ffa9 (diff) |
Better choice of types for struct pmap members and cmmu functions;
no functional change.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/luna88k/m8820x.c | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/cmmu.h | 18 | ||||
-rw-r--r-- | sys/arch/m88k/include/m8820x.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/mmu.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/include/pmap.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m8820x_machdep.c | 30 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110.c | 36 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m8820x.c | 4 |
8 files changed, 55 insertions, 53 deletions
diff --git a/sys/arch/luna88k/luna88k/m8820x.c b/sys/arch/luna88k/luna88k/m8820x.c index 9fd9c0d089e..fcaa0c8423f 100644 --- a/sys/arch/luna88k/luna88k/m8820x.c +++ b/sys/arch/luna88k/luna88k/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.7 2005/10/13 19:48:31 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.8 2005/12/02 21:16:43 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -166,10 +166,10 @@ m8820x_setup_board_config() */ #define ILLADDRESS 0x3ffffff0 /* any faulty address for luna88k2 */ -unsigned +cpuid_t m8820x_cmmu_cpu_number() { - unsigned cmmu; + u_int cmmu; u_int i; CMMU_LOCK; diff --git a/sys/arch/m88k/include/cmmu.h b/sys/arch/m88k/include/cmmu.h index 38710dea3c7..cbaeb731f1e 100644 --- a/sys/arch/m88k/include/cmmu.h +++ b/sys/arch/m88k/include/cmmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmmu.h,v 1.10 2005/11/25 22:17:14 miod Exp $ */ +/* $OpenBSD: cmmu.h,v 1.11 2005/12/02 21:16:45 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -54,20 +54,20 @@ struct cmmu_p { void (*cpu_configuration_print_func)(int); void (*cmmu_shutdown_now_func)(void); void (*cmmu_parity_enable_func)(void); - unsigned (*cmmu_cpu_number_func)(void); - void (*cmmu_set_sapr_func)(unsigned, unsigned); - void (*cmmu_set_uapr_func)(unsigned); - void (*cmmu_flush_tlb_func)(unsigned, unsigned, vaddr_t, u_int); - void (*cmmu_flush_cache_func)(int, paddr_t, psize_t); - void (*cmmu_flush_inst_cache_func)(int, paddr_t, psize_t); - void (*cmmu_flush_data_cache_func)(int, paddr_t, psize_t); + cpuid_t (*cmmu_cpu_number_func)(void); + void (*cmmu_set_sapr_func)(cpuid_t, apr_t); + void (*cmmu_set_uapr_func)(apr_t); + void (*cmmu_flush_tlb_func)(cpuid_t, unsigned, vaddr_t, u_int); + void (*cmmu_flush_cache_func)(cpuid_t, paddr_t, psize_t); + void (*cmmu_flush_inst_cache_func)(cpuid_t, paddr_t, psize_t); + void (*cmmu_flush_data_cache_func)(cpuid_t, paddr_t, psize_t); int (*dma_cachectl_func)(pmap_t, vaddr_t, vsize_t, int); int (*dma_cachectl_pa_func)(paddr_t, psize_t, int); /* DDB only */ void (*cmmu_dump_config_func)(void); void (*cmmu_show_translation_func)(unsigned, unsigned, unsigned, int); /* DEBUG only */ - void (*show_apr_func)(unsigned); + void (*show_apr_func)(apr_t); }; /* THE pointer! */ diff --git a/sys/arch/m88k/include/m8820x.h b/sys/arch/m88k/include/m8820x.h index f110e0919d3..8c0adc1e105 100644 --- a/sys/arch/m88k/include/m8820x.h +++ b/sys/arch/m88k/include/m8820x.h @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.h,v 1.4 2005/05/15 21:52:45 miod Exp $ */ +/* $OpenBSD: m8820x.h,v 1.5 2005/12/02 21:16:45 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -193,8 +193,8 @@ extern struct m8820x_cmmu m8820x_cmmu[MAX_CMMUS]; extern u_int cmmu_shift; extern u_int max_cmmus; -extern void m8820x_setup_board_config(void); -extern unsigned m8820x_cmmu_cpu_number(void); +void m8820x_setup_board_config(void); +cpuid_t m8820x_cmmu_cpu_number(void); #endif /* _LOCORE */ #endif /* __M88K_M8820X_H__ */ diff --git a/sys/arch/m88k/include/mmu.h b/sys/arch/m88k/include/mmu.h index 6984c374327..ea750372ba3 100644 --- a/sys/arch/m88k/include/mmu.h +++ b/sys/arch/m88k/include/mmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mmu.h,v 1.5 2005/12/01 22:24:49 miod Exp $ */ +/* $OpenBSD: mmu.h,v 1.6 2005/12/02 21:16:45 miod Exp $ */ /* * This file bears almost no resemblance to the original m68k file, @@ -76,6 +76,8 @@ * Area descriptors */ +typedef u_int32_t apr_t; + #define APR_V 0x00000001 /* valid bit */ /* diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h index 6c26c4095c6..72f0dca4047 100644 --- a/sys/arch/m88k/include/pmap.h +++ b/sys/arch/m88k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.6 2005/12/01 22:24:49 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.7 2005/12/02 21:16:45 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -23,7 +23,7 @@ struct pmap { sdt_entry_t *pm_stab; /* virtual pointer to sdt */ - u_int32_t pm_apr; + apr_t pm_apr; int pm_count; /* reference count */ /* cpus using of this pmap; NCPU must be <= 32 */ u_int32_t pm_cpus; diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c index 6172d5f05b8..9fb1c42b758 100644 --- a/sys/arch/m88k/m88k/m8820x_machdep.c +++ b/sys/arch/m88k/m88k/m8820x_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x_machdep.c,v 1.11 2005/11/25 22:20:45 miod Exp $ */ +/* $OpenBSD: m8820x_machdep.c,v 1.12 2005/12/02 21:16:45 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -100,17 +100,17 @@ void m8820x_cmmu_init(void); void m8820x_cpu_configuration_print(int); void m8820x_cmmu_shutdown_now(void); void m8820x_cmmu_parity_enable(void); -void m8820x_cmmu_set_sapr(unsigned, unsigned); -void m8820x_cmmu_set_uapr(unsigned); -void m8820x_cmmu_flush_tlb(unsigned, unsigned, vaddr_t, u_int); -void m8820x_cmmu_flush_cache(int, paddr_t, psize_t); -void m8820x_cmmu_flush_inst_cache(int, paddr_t, psize_t); -void m8820x_cmmu_flush_data_cache(int, paddr_t, psize_t); +void m8820x_cmmu_set_sapr(cpuid_t, apr_t); +void m8820x_cmmu_set_uapr(apr_t); +void m8820x_cmmu_flush_tlb(cpuid_t, unsigned, vaddr_t, u_int); +void m8820x_cmmu_flush_cache(cpuid_t, paddr_t, psize_t); +void m8820x_cmmu_flush_inst_cache(cpuid_t, paddr_t, psize_t); +void m8820x_cmmu_flush_data_cache(cpuid_t, paddr_t, psize_t); int m8820x_dma_cachectl(pmap_t, vaddr_t, vsize_t, int); int m8820x_dma_cachectl_pa(paddr_t, psize_t, int); void m8820x_cmmu_dump_config(void); void m8820x_cmmu_show_translation(unsigned, unsigned, unsigned, int); -void m8820x_show_apr(unsigned); +void m8820x_show_apr(apr_t); /* This is the function table for the mc8820x CMMUs */ struct cmmu_p cmmu8820x = { @@ -473,7 +473,7 @@ m8820x_cmmu_parity_enable() } void -m8820x_cmmu_set_sapr(unsigned cpu, unsigned ap) +m8820x_cmmu_set_sapr(cpuid_t cpu, apr_t ap) { CMMU_LOCK; m8820x_cmmu_set(CMMU_SAPR, ap, 0, cpu, 0, 0); @@ -481,7 +481,7 @@ m8820x_cmmu_set_sapr(unsigned cpu, unsigned ap) } void -m8820x_cmmu_set_uapr(unsigned ap) +m8820x_cmmu_set_uapr(apr_t ap) { int s = splhigh(); int cpu = cpu_number(); @@ -500,7 +500,7 @@ m8820x_cmmu_set_uapr(unsigned ap) * flush any tlb */ void -m8820x_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr, u_int count) +m8820x_cmmu_flush_tlb(cpuid_t cpu, unsigned kernel, vaddr_t vaddr, u_int count) { int s = splhigh(); @@ -564,7 +564,7 @@ m8820x_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr, u_int count) * flush both Instruction and Data caches */ void -m8820x_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size) +m8820x_cmmu_flush_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { int s = splhigh(); CMMU_LOCK; @@ -599,7 +599,7 @@ m8820x_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size) * flush Instruction caches */ void -m8820x_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size) +m8820x_cmmu_flush_inst_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { int s = splhigh(); CMMU_LOCK; @@ -631,7 +631,7 @@ m8820x_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size) } void -m8820x_cmmu_flush_data_cache(int cpu, paddr_t physaddr, psize_t size) +m8820x_cmmu_flush_data_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { int s = splhigh(); CMMU_LOCK; @@ -1138,7 +1138,7 @@ m8820x_cmmu_show_translation(unsigned address, unsigned supervisor_flag, #ifdef DEBUG void -m8820x_show_apr(unsigned value) +m8820x_show_apr(apr_t value) { printf("table @ 0x%x000", PG_PFNUM(value)); if (value & CACHE_WT) diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c index 69195b48120..884e6e97cde 100644 --- a/sys/arch/mvme88k/mvme88k/m88110.c +++ b/sys/arch/mvme88k/mvme88k/m88110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.c,v 1.27 2005/11/25 22:17:12 miod Exp $ */ +/* $OpenBSD: m88110.c,v 1.28 2005/12/02 21:16:45 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * All rights reserved. @@ -101,18 +101,18 @@ void m88110_setup_board_config(void); void m88110_cpu_configuration_print(int); void m88110_cmmu_shutdown_now(void); void m88110_cmmu_parity_enable(void); -unsigned m88110_cmmu_cpu_number(void); -void m88110_cmmu_set_sapr(unsigned, unsigned); -void m88110_cmmu_set_uapr(unsigned); -void m88110_cmmu_flush_tlb(unsigned, unsigned, vaddr_t, u_int); -void m88110_cmmu_flush_cache(int, paddr_t, psize_t); -void m88110_cmmu_flush_inst_cache(int, paddr_t, psize_t); -void m88110_cmmu_flush_data_cache(int, paddr_t, psize_t); +cpuid_t m88110_cmmu_cpu_number(void); +void m88110_cmmu_set_sapr(cpuid_t, apr_t); +void m88110_cmmu_set_uapr(apr_t); +void m88110_cmmu_flush_tlb(cpuid_t, unsigned, vaddr_t, u_int); +void m88110_cmmu_flush_cache(cpuid_t, paddr_t, psize_t); +void m88110_cmmu_flush_inst_cache(cpuid_t, paddr_t, psize_t); +void m88110_cmmu_flush_data_cache(cpuid_t, paddr_t, psize_t); int m88110_dma_cachectl(pmap_t, vaddr_t, vsize_t, int); int m88110_dma_cachectl_pa(paddr_t, psize_t, int); void m88110_cmmu_dump_config(void); void m88110_cmmu_show_translation(unsigned, unsigned, unsigned, int); -void m88110_show_apr(unsigned); +void m88110_show_apr(apr_t); /* This is the function table for the mc88110 built-in CMMUs */ struct cmmu_p cmmu88110 = { @@ -167,7 +167,7 @@ patc_clear(void) #ifdef DEBUG void -m88110_show_apr(unsigned value) +m88110_show_apr(apr_t value) { printf("table @ 0x%x000", PG_PFNUM(value)); if (value & CACHE_WT) @@ -305,14 +305,14 @@ m88110_cmmu_parity_enable(void) * disabled. */ -unsigned +cpuid_t m88110_cmmu_cpu_number(void) { - return 0; /* to make compiler happy */ + return (0); } void -m88110_cmmu_set_sapr(unsigned cpu, unsigned ap) +m88110_cmmu_set_sapr(cpuid_t cpu, apr_t ap) { unsigned ictl, dctl; @@ -346,7 +346,7 @@ m88110_cmmu_set_sapr(unsigned cpu, unsigned ap) } void -m88110_cmmu_set_uapr(unsigned ap) +m88110_cmmu_set_uapr(apr_t ap) { CMMU_LOCK; set_iuap(ap); @@ -368,7 +368,7 @@ m88110_cmmu_set_uapr(unsigned ap) * flush any tlb */ void -m88110_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr, u_int count) +m88110_cmmu_flush_tlb(cpuid_t cpu, unsigned kernel, vaddr_t vaddr, u_int count) { u_int32_t psr; @@ -417,7 +417,7 @@ m88110_cmmu_flush_tlb(unsigned cpu, unsigned kernel, vaddr_t vaddr, u_int count) * flush both Instruction and Data caches */ void -m88110_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size) +m88110_cmmu_flush_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { u_int32_t psr; @@ -434,7 +434,7 @@ m88110_cmmu_flush_cache(int cpu, paddr_t physaddr, psize_t size) * flush Instruction caches */ void -m88110_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size) +m88110_cmmu_flush_inst_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { u_int32_t psr; @@ -448,7 +448,7 @@ m88110_cmmu_flush_inst_cache(int cpu, paddr_t physaddr, psize_t size) * flush data cache */ void -m88110_cmmu_flush_data_cache(int cpu, paddr_t physaddr, psize_t size) +m88110_cmmu_flush_data_cache(cpuid_t cpu, paddr_t physaddr, psize_t size) { u_int32_t psr; diff --git a/sys/arch/mvme88k/mvme88k/m8820x.c b/sys/arch/mvme88k/mvme88k/m8820x.c index 1efba9188ca..180f743b5da 100644 --- a/sys/arch/mvme88k/mvme88k/m8820x.c +++ b/sys/arch/mvme88k/mvme88k/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.42 2005/10/13 19:48:37 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.43 2005/12/02 21:16:45 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -254,7 +254,7 @@ m8820x_setup_board_config() * its value will let us know which data CMMU has been used to perform * the read, and we can reliably compute the CPU number from it. */ -unsigned +cpuid_t m8820x_cmmu_cpu_number() { #ifdef MVME188 |