From 4245e59d1239a5270670807b114856365a863df8 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Sun, 12 Oct 2008 20:52:26 -0700 Subject: sparc32: fix build errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’: arch/sparc/kernel/sun4d_smp.c:101: error: implicit declaration of function ‘notify_cpu_starting’ arch/sparc/kernel/sun4m_smp.c: In function ‘smp4m_callin’: arch/sparc/kernel/sun4m_smp.c:74: error: implicit declaration of function ‘notify_cpu_starting’ Signed-off-by: Robert Reif Signed-off-by: David S. Miller --- arch/sparc/kernel/sun4d_smp.c | 1 + arch/sparc/kernel/sun4m_smp.c | 1 + 2 files changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index ce3d45db94e9..7a6a5e795928 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 0c564ba9e709..5fc386d08c47 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 82960b8543cca5797a5e2841a9c43b8c5c669e65 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 12 Oct 2008 20:55:24 -0700 Subject: sparc64: Add missing notify_cpu_starting() call. Commit e545a6140b698b2494daf0b32107bdcc5e901390 ("kernel/cpu.c: create a CPU_STARTING cpu_chain notifier") added a notify_cpu_starting() notifier event, and hit every arch except sparc64. Fix that missed case. Signed-off-by: David S. Miller --- arch/sparc64/kernel/smp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch') diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 2be166c544ca..e5627118e613 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -115,6 +116,9 @@ void __cpuinit smp_callin(void) atomic_inc(&init_mm.mm_count); current->active_mm = &init_mm; + /* inform the notifiers about the new cpu */ + notify_cpu_starting(cpuid); + while (!cpu_isset(cpuid, smp_commenced_mask)) rmb(); -- cgit v1.2.3 From 615c9136b385d5225d3ece20aa30b28a90c438d6 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 12 Oct 2008 23:56:12 -0700 Subject: chmc: Mark %ver register inline asm with __volatile__ Otherwise GCC can try to do the register read before the guarding test on us3mc_platform() being true. If that happens we can take an exception, because %ver register reads are not allowed in privileged more on hypervisor platforms. Signed-off-by: David S. Miller --- arch/sparc64/kernel/chmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 967b04886822..3b9f4d6e14a9 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c @@ -831,7 +831,7 @@ static int __init us3mc_init(void) if (!us3mc_platform()) return -ENODEV; - __asm__ ("rdpr %%ver, %0" : "=r" (ver)); + __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver)); if ((ver >> 32UL) == __JALAPENO_ID || (ver >> 32UL) == __SERRANO_ID) { mc_type = MC_TYPE_JBUS; -- cgit v1.2.3