summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/smp.h
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2008-09-18 13:56:30 +0000
committermarius <marius@FreeBSD.org>2008-09-18 13:56:30 +0000
commit3664739c74340557b0b0f470ca06896083d9de60 (patch)
treebf81e0d0cdf036a80ca87cacadb7a2c2a5a7d205 /sys/sparc64/include/smp.h
parentb079adda815ce491cbc13e55aa2d96b398437beb (diff)
downloadFreeBSD-src-3664739c74340557b0b0f470ca06896083d9de60.zip
FreeBSD-src-3664739c74340557b0b0f470ca06896083d9de60.tar.gz
- Newer firmware versions no longer provide SUNW,stop-self so just
disable interrupts and loop forever with these. - Hide all MP-related bits in <machine/smp.h> 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.
Diffstat (limited to 'sys/sparc64/include/smp.h')
-rw-r--r--sys/sparc64/include/smp.h44
1 files changed, 38 insertions, 6 deletions
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_ */
OpenPOWER on IntegriCloud