From patchwork Sat May 18 22:21:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2589321 X-Patchwork-Delegate: deller@gmx.de Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0236A3FD85 for ; Sat, 18 May 2013 22:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753307Ab3ERWVR (ORCPT ); Sat, 18 May 2013 18:21:17 -0400 Received: from mout.gmx.net ([212.227.15.15]:64301 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753260Ab3ERWVR (ORCPT ); Sat, 18 May 2013 18:21:17 -0400 Received: from mailout-de.gmx.net ([10.1.76.32]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MLlXB-1Ud0Ho4707-000uWd for ; Sun, 19 May 2013 00:21:15 +0200 Received: (qmail invoked by alias); 18 May 2013 22:21:15 -0000 Received: from p54AD10AA.dip0.t-ipconnect.de (EHLO p100.box) [84.173.16.170] by mail.gmx.net (mp032) with SMTP; 19 May 2013 00:21:15 +0200 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX1+TZwxctiyT5zX84haZg4o/FZ7u2ZNfwtkFb4vS8H 92jHY9kNJPFScj Date: Sun, 19 May 2013 00:21:13 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Subject: [PATCH] parisc: use arch_spinlock_t instead of raw_spinlock_t in irqstacks Message-ID: <20130518222113.GA4317@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org We need to use arch_spinlock_t spinlocks instead of raw_spinlock_t spinlocks for irqstack protection else we will hit the "trylock failure on UP" error message with CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y. Since we can be called recursive here even on UP (we are in the irq handler which handles even irq bh) this spinlock error message is just wrong. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index cfbc439..b2dca96 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h @@ -69,7 +69,7 @@ union irq_stack_union { unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)]; - raw_spinlock_t lock; + arch_spinlock_t lock; }; DECLARE_PER_CPU(union irq_stack_union, irq_stack_union); diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 55237a7..9ba8e5a 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -443,14 +451,14 @@ panic_check: #ifdef CONFIG_IRQSTACKS DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = { - .lock = __RAW_SPIN_LOCK_UNLOCKED((irq_stack_union).lock) + .lock = __ARCH_SPIN_LOCK_UNLOCKED, }; static void execute_on_irq_stack(void *func, unsigned long param1) { union irq_stack_union *union_ptr; unsigned long irq_stack; - raw_spinlock_t *irq_stack_in_use; + arch_spinlock_t *irq_stack_in_use; union_ptr = &per_cpu(irq_stack_union, smp_processor_id()); irq_stack = (unsigned long) &union_ptr->stack; @@ -462,7 +470,7 @@ static void execute_on_irq_stack(void *func, unsigned long param1) * the irq stack usage. */ irq_stack_in_use = &union_ptr->lock; - if (!raw_spin_trylock(irq_stack_in_use)) { + if (!arch_spin_trylock(irq_stack_in_use)) { void (*direct_call)(unsigned long p1) = func; /* We are using the IRQ stack already. @@ -477,7 +485,7 @@ static void execute_on_irq_stack(void *func, unsigned long param1) __inc_irq_stat(irq_stack_counter); /* free up irq stack usage. */ - do_raw_spin_unlock(irq_stack_in_use); + arch_spin_unlock(irq_stack_in_use); } asmlinkage void do_softirq(void)