summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include/cmmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/m88k/include/cmmu.h')
-rw-r--r--sys/arch/m88k/include/cmmu.h70
1 files changed, 32 insertions, 38 deletions
diff --git a/sys/arch/m88k/include/cmmu.h b/sys/arch/m88k/include/cmmu.h
index beb398c3f38..ae58c666b0b 100644
--- a/sys/arch/m88k/include/cmmu.h
+++ b/sys/arch/m88k/include/cmmu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmmu.h,v 1.13 2005/12/03 19:06:08 miod Exp $ */
+/* $OpenBSD: cmmu.h,v 1.14 2005/12/04 12:20:19 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
@@ -54,51 +54,45 @@ extern __cpu_simple_lock_t cmmu_cpu_lock;
/* machine dependent cmmu function pointer structure */
struct cmmu_p {
- void (*cmmu_init_func)(void);
- void (*setup_board_config_func)(void);
- void (*cpu_configuration_print_func)(int);
- void (*cmmu_shutdown_now_func)(void);
- void (*cmmu_parity_enable_func)(void);
- 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)(apr_t);
+ void (*init)(void);
+ void (*setup_board_config)(void);
+ void (*cpu_configuration_print)(int);
+ void (*shutdown_now)(void);
+ cpuid_t (*cpu_number)(void);
+ void (*set_sapr)(cpuid_t, apr_t);
+ void (*set_uapr)(apr_t);
+ void (*flush_tlb)(cpuid_t, u_int, vaddr_t, u_int);
+ void (*flush_cache)(cpuid_t, paddr_t, psize_t);
+ void (*flush_inst_cache)(cpuid_t, paddr_t, psize_t);
+ void (*flush_data_cache)(cpuid_t, paddr_t, psize_t);
+ int (*dma_cachectl)(pmap_t, vaddr_t, vsize_t, int);
+ int (*dma_cachectl_pa)(paddr_t, psize_t, int);
};
/* THE pointer! */
extern struct cmmu_p *cmmu;
/* The macros... */
-#define cmmu_init (cmmu->cmmu_init_func)
-#define setup_board_config (cmmu->setup_board_config_func)
-#define cpu_configuration_print(a) (cmmu->cpu_configuration_print_func)(a)
-#define cmmu_shutdown_now (cmmu->cmmu_shutdown_now_func)
-#define cmmu_parity_enable (cmmu->cmmu_parity_enable_func)
-#define cmmu_cpu_number (cmmu->cmmu_cpu_number_func)
-#define cmmu_set_sapr(a, b) (cmmu->cmmu_set_sapr_func)(a, b)
-#define cmmu_set_uapr(a) (cmmu->cmmu_set_uapr_func)(a)
-#define cmmu_flush_tlb(a, b, c, d) (cmmu->cmmu_flush_tlb_func)(a, b, c, d)
-#define cmmu_flush_cache(a, b, c) (cmmu->cmmu_flush_cache_func)(a, b, c)
-#define cmmu_flush_inst_cache(a, b, c) (cmmu->cmmu_flush_inst_cache_func)(a, b, c)
-#define cmmu_flush_data_cache(a, b, c) (cmmu->cmmu_flush_data_cache_func)(a, b, c)
-#define dma_cachectl(a, b, c, d) (cmmu->dma_cachectl_func)(a, b, c, d)
-#define dma_cachectl_pa(a, b, c) (cmmu->dma_cachectl_pa_func)(a, b, c)
-#define cmmu_dump_config (cmmu->cmmu_dump_config_func)
-#define cmmu_show_translation(a, b, c, d) (cmmu->cmmu_show_translation_func)(a, b, c, d)
-#define show_apr(ap) (cmmu->show_apr_func)(ap)
+#define cmmu_init (cmmu->init)
+#define setup_board_config (cmmu->setup_board_config)
+#define cpu_configuration_print(a) (cmmu->cpu_configuration_print)(a)
+#define cmmu_shutdown_now (cmmu->shutdown_now)
+#define cmmu_cpu_number (cmmu->cpu_number)
+#define cmmu_set_sapr(a, b) (cmmu->set_sapr)(a, b)
+#define cmmu_set_uapr(a) (cmmu->set_uapr)(a)
+#define cmmu_flush_tlb(a, b, c, d) (cmmu->flush_tlb)(a, b, c, d)
+#define cmmu_flush_cache(a, b, c) (cmmu->flush_cache)(a, b, c)
+#define cmmu_flush_inst_cache(a, b, c) (cmmu->flush_inst_cache)(a, b, c)
+#define cmmu_flush_data_cache(a, b, c) (cmmu->flush_data_cache)(a, b, c)
+#define dma_cachectl(a, b, c, d) (cmmu->dma_cachectl)(a, b, c, d)
+#define dma_cachectl_pa(a, b, c) (cmmu->dma_cachectl_pa)(a, b, c)
+#define cmmu_dump_config (cmmu->dump_config)
+#define cmmu_show_translation(a, b, c, d) \
+ (cmmu->show_translation)(a, b, c, d)
+#define show_apr(ap) (cmmu->show_apr)(ap)
/*
- * dma_cachectl modes
+ * dma_cachectl() modes
*/
#define DMA_CACHE_SYNC 0
#define DMA_CACHE_SYNC_INVAL 1