Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include Expose correct cpu_number(), CPU_IS_PRI...



details:   https://anonhg.NetBSD.org/src/rev/9a64b965e094
branches:  trunk
changeset: 822597:9a64b965e094
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Mar 27 14:26:20 2017 +0000

description:
Expose correct cpu_number(), CPU_IS_PRIMARY() and CPU_INFO_FOREACH() for
modules so that the dtrace module works on an MP system.

diffstat:

 sys/arch/arm/include/cpu.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 2d48b6fdd37e -r 9a64b965e094 sys/arch/arm/include/cpu.h
--- a/sys/arch/arm/include/cpu.h        Mon Mar 27 07:45:37 2017 +0000
+++ b/sys/arch/arm/include/cpu.h        Mon Mar 27 14:26:20 2017 +0000
@@ -230,10 +230,9 @@
 #endif
 
 #define CPU_INFO_ITERATOR      int
-#if defined(MULTIPROCESSOR)
+#if defined(_MODULE) || defined(MULTIPROCESSOR)
 extern struct cpu_info *cpu_info[];
 #define cpu_number()           (curcpu()->ci_index)
-void cpu_boot_secondary_processors(void);
 #define CPU_IS_PRIMARY(ci)     ((ci)->ci_index == 0)
 #define CPU_INFO_FOREACH(cii, ci)                      \
        cii = 0, ci = cpu_info[0]; cii < ncpu && (ci = cpu_info[cii]) != NULL; cii++
@@ -245,6 +244,10 @@
        cii = 0, __USE(cii), ci = curcpu(); ci != NULL; ci = NULL
 #endif
 
+#if defined(MULTIPROCESSOR)
+void cpu_boot_secondary_processors(void);
+#endif
+
 #define        LWP0_CPU_INFO   (&cpu_info_store)
 
 static inline int



Home | Main Index | Thread Index | Old Index