From patchwork Mon Apr 18 21:25:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 91868 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A7C4EB6FE1 for ; Tue, 19 Apr 2011 07:26:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752496Ab1DRV0P (ORCPT ); Mon, 18 Apr 2011 17:26:15 -0400 Received: from pqueuea.post.tele.dk ([193.162.153.9]:51388 "EHLO pqueuea.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203Ab1DRV0M (ORCPT ); Mon, 18 Apr 2011 17:26:12 -0400 Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [195.41.46.236]) by pqueuea.post.tele.dk (Postfix) with ESMTP id 026A3DB9BC for ; Mon, 18 Apr 2011 23:26:11 +0200 (CEST) Received: from localhost.localdomain (x1-6-c4-3d-c7-28-70-1a.k498.webspeed.dk [83.89.83.41]) by pfepb.post.tele.dk (Postfix) with ESMTP id BC538F8401C; Mon, 18 Apr 2011 23:25:44 +0200 (CEST) From: Sam Ravnborg To: "David S. Miller" Cc: sparclinux , Daniel Hellstrom , Sam Ravnborg Subject: [PATCH 1/3] sparc32, sun4d: rename sbus_tid to board_to_cpu in irq support Date: Mon, 18 Apr 2011 23:25:42 +0200 Message-Id: <1303161944-13611-1-git-send-email-sam@ravnborg.org> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <20110418212248.GA13576@merkur.ravnborg.org> References: <20110418212248.GA13576@merkur.ravnborg.org> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org The new name reflects the actual usage much better. Signed-off-by: Sam Ravnborg --- arch/sparc/kernel/sun4d_irq.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 77b4a89..ee35c45 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c @@ -51,7 +51,11 @@ static struct sun4d_timer_regs __iomem *sun4d_timers; #define TIMER_IRQ 10 #define MAX_STATIC_ALLOC 4 -static unsigned char sbus_tid[32]; + +/* Specify which cpu handle interrupts from which board. + * Index is board - value is cpu. + */ +static unsigned char board_to_cpu[32]; static struct irqaction *irq_action[NR_IRQS]; @@ -363,7 +367,7 @@ out: static void sun4d_disable_irq(unsigned int irq) { - int tid = sbus_tid[(irq >> 5) - 1]; + int tid = board_to_cpu[(irq >> 5) - 1]; unsigned long flags; if (irq < NR_IRQS) @@ -376,7 +380,7 @@ static void sun4d_disable_irq(unsigned int irq) static void sun4d_enable_irq(unsigned int irq) { - int tid = sbus_tid[(irq >> 5) - 1]; + int tid = board_to_cpu[(irq >> 5) - 1]; unsigned long flags; if (irq < NR_IRQS) @@ -413,7 +417,7 @@ void __init sun4d_distribute_irqs(void) for_each_node_by_name(dp, "sbi") { int devid = of_getintprop_default(dp, "device-id", 0); int board = of_getintprop_default(dp, "board#", 0); - sbus_tid[board] = cpuid; + board_to_cpu[board] = cpuid; set_sbi_tid(devid, cpuid << 3); } printk(KERN_ERR "All sbus IRQs directed to CPU%d\n", cpuid); @@ -587,7 +591,7 @@ void __init sun4d_init_sbi_irq(void) unsigned int mask; set_sbi_tid(devid, target_cpu << 3); - sbus_tid[board] = target_cpu; + board_to_cpu[board] = target_cpu; /* Get rid of pending irqs from PROM */ mask = acquire_sbi(devid, 0xffffffff);