From 3664739c74340557b0b0f470ca06896083d9de60 Mon Sep 17 00:00:00 2001 From: marius Date: Thu, 18 Sep 2008 13:56:30 +0000 Subject: - Newer firmware versions no longer provide SUNW,stop-self so just disable interrupts and loop forever with these. - Hide all MP-related bits in underneath #ifdef SMP. - Inline ipi_all_but_self(9) and ipi_selected(9). We don't expose any additional bits but save a few cycles by doing so. - Remove ipi_all(9), which actually only called panic(9). It can't be implemented natively anyway and having it removed at least causes MI users to fail already fail when linking. --- sys/sparc64/include/smp.h | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'sys/sparc64/include/smp.h') diff --git a/sys/sparc64/include/smp.h b/sys/sparc64/include/smp.h index 23076ef..8eb5636 100644 --- a/sys/sparc64/include/smp.h +++ b/sys/sparc64/include/smp.h @@ -29,6 +29,8 @@ #ifndef _MACHINE_SMP_H_ #define _MACHINE_SMP_H_ +#ifdef SMP + #define CPU_TICKSYNC 1 #define CPU_STICKSYNC 2 #define CPU_INIT 3 @@ -91,10 +93,6 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; -void ipi_selected(u_int cpus, u_int ipi); -void ipi_all(u_int ipi); -void ipi_all_but_self(u_int ipi); - void mp_init(void); extern struct mtx ipi_mtx; @@ -117,7 +115,19 @@ extern char tl_ipi_tlb_context_demap[]; extern char tl_ipi_tlb_page_demap[]; extern char tl_ipi_tlb_range_demap[]; -#ifdef SMP +static __inline void +ipi_all_but_self(u_int ipi) +{ + + cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)tl_ipi_level, ipi); +} + +static __inline void +ipi_selected(u_int cpus, u_int ipi) +{ + + cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi); +} #if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) @@ -224,8 +234,12 @@ ipi_wait(void *cookie) #endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */ +#endif /* !LOCORE */ + #else +#ifndef LOCORE + static __inline void * ipi_dcache_page_inval(void *func, vm_paddr_t pa) { @@ -267,8 +281,26 @@ ipi_wait(void *cookie) } -#endif /* SMP */ +static __inline void +tl_ipi_cheetah_dcache_page_inval(void) +{ + +} + +static __inline void +tl_ipi_spitfire_dcache_page_inval(void) +{ + +} + +static __inline void +tl_ipi_spitfire_icache_page_inval(void) +{ + +} #endif /* !LOCORE */ +#endif /* SMP */ + #endif /* !_MACHINE_SMP_H_ */ -- cgit v1.1