From 0b108018b37fac17b6c2056efdb44be3380b2daa Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Fri, 15 Jan 2010 14:21:37 +0900 Subject: [PATCH] --- yaml --- r: 181089 b: refs/heads/master c: a6198a238baceae9d4e0ce3915f6d239c89b5c08 h: refs/heads/master i: 181087: ccde26564abc4c905f1ceeebe8a250245ae2956a v: v3 --- [refs] | 2 +- trunk/arch/sh/mm/cache.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4fa4e6ca3366..d1d4d6b094ad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a09d2831b3457a92a58d67bddfed370516acfe28 +refs/heads/master: a6198a238baceae9d4e0ce3915f6d239c89b5c08 diff --git a/trunk/arch/sh/mm/cache.c b/trunk/arch/sh/mm/cache.c index b8607fa7ae12..0f4095d7ac8b 100644 --- a/trunk/arch/sh/mm/cache.c +++ b/trunk/arch/sh/mm/cache.c @@ -2,7 +2,7 @@ * arch/sh/mm/cache.c * * Copyright (C) 1999, 2000, 2002 Niibe Yutaka - * Copyright (C) 2002 - 2009 Paul Mundt + * Copyright (C) 2002 - 2010 Paul Mundt * * Released under the terms of the GNU GPL v2.0. */ @@ -41,8 +41,17 @@ static inline void cacheop_on_each_cpu(void (*func) (void *info), void *info, int wait) { preempt_disable(); - smp_call_function(func, info, wait); + + /* + * It's possible that this gets called early on when IRQs are + * still disabled due to ioremapping by the boot CPU, so don't + * even attempt IPIs unless there are other CPUs online. + */ + if (num_online_cpus() > 1) + smp_call_function(func, info, wait); + func(info); + preempt_enable(); }