Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1039142imm; Thu, 13 Sep 2018 11:39:16 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb514VrtfZ+15LRRYCVrzEk7KU+z47ht0caDjjs0kFFc5Q2WqDIOkTp2tAub7dgk6qqPehi X-Received: by 2002:a17:902:6b44:: with SMTP id g4-v6mr8557270plt.50.1536863956010; Thu, 13 Sep 2018 11:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536863955; cv=none; d=google.com; s=arc-20160816; b=nWp9UXW2nTYdzn3wOWaonqsmebxvjI1KXqQdxWTP2rt9riPODO2vJZx1ztHZb6tAdD gnJkiiTt9RkAsni1j0AWI/WQ3Qt1MvZ+sp1z8TAdh2uLZ9RkVJE2UJFkX3EDpap9R+x+ USkrqSfJGzTY6J8CuxmhtwQVT7QERSM34/2Pdj6Hk7Oh4iPjJn7vxx7h/WYvr/fc7pmX VjxI0ifWfMxvd7VMrY1H3uLXLfUNK2aEYaqFtefCpIZt6TqLTdvF5JwnyhjHCvAgZtr6 d7aM4LmDXp3aUIclnrAC/l1XYFvpX3lRreape+x3NOU2uXPC189pzj5O7uET7ajNJQb7 xwyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=JhC3sK0x2ZZ05buQ3pXEm5pndZdxTuKMioy2aDdlJuA=; b=wyMaw1FY3g15RxW8ak1HzP9qIs3HynTNpfFolTUzv1w837YbiWlMpt5zQxOmPjtjdW RCAxUkC1a+LygDMyRZ1X705qpijrZH1jyN/WYujKhnYYUry17vVu1CZ6TZv37g+fdrAM 98dtX6DB1Zom/U5JsOnUPBRXMbdTJjJD/PIib9V/QGNZr07DvLl6ZP0wPCV7FFiJqQHl G0Fq0hC+PtrKPTV/NmJkpyzT4Kpn/bUsbFZLqFM7D97gnllcrC0bJ84ltIh3pBq34DV9 FTRMGOceeMN99CmRXwzTgl9u21fR+jNY03X7GuRWXy/7gAvJpE3TPhxRl7QJNzd7D55k XzsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=jKIV9AYr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si4590478ple.241.2018.09.13.11.39.00; Thu, 13 Sep 2018 11:39:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=jKIV9AYr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbeIMXrs (ORCPT + 99 others); Thu, 13 Sep 2018 19:47:48 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:26981 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727992AbeIMXrs (ORCPT ); Thu, 13 Sep 2018 19:47:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1536863827; x=1568399827; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=gjnlUPagI1vf6/WNqKxc8KY88DkfwDRZzZi6iXSpG08=; b=jKIV9AYrrMwltgj04CwUEHQEcTXuDs+jXONmXZI1ERePmd7FX87WQft3 Ufw61deTJBnx5zwk4alHmtccfSbRZvrGGrLX771qqpYqDZS55g7bYYw50 IgTP9il6OEwnqusgY1aQoj5U/Nz+DlDN7TQN24/8dz00hnMi1gsrqqRy+ hpW27eMlL2jS0us72NlrK7QQWVnJIP1NhqatnX56J86loc6nZs7FuU4iw nuB8Ams86Z4gasNNQfmeUNfnsJYroKzhg67DjFix+RvQ+mZlShE2Yn8xD /9OnX4RMoF+4sgN5Qcv3cyCc0avuI/lbRkAm/MPX5FK59IruOAbdxKOK1 A==; X-IronPort-AV: E=Sophos;i="5.53,370,1531756800"; d="scan'208";a="89712007" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 14 Sep 2018 02:37:07 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 13 Sep 2018 11:23:37 -0700 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 13 Sep 2018 11:37:06 -0700 From: Atish Patra To: palmer@sifive.com, linux-riscv@lists.infradead.org, hch@infradead.org, anup@brainfault.org Cc: mark.rutland@arm.com, atish.patra@wdc.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, Damien.LeMoal@wdc.com, marc.zyngier@arm.com, jeremy.linton@arm.com, gregkh@linuxfoundation.org, jason@lakedaemon.net, catalin.marinas@arm.com, dmitriy@oss-tech.org, ard.biesheuvel@linaro.org, schwab@linux-m68k.org Subject: [PATCH v5 01/12] RISC-V: No need to pass scause as arg to do_IRQ() Date: Thu, 13 Sep 2018 11:36:54 -0700 Message-Id: <1536863825-66808-2-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536863825-66808-1-git-send-email-atish.patra@wdc.com> References: <1536863825-66808-1-git-send-email-atish.patra@wdc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anup Patel The scause is already part of pt_regs so no need to pass scause as separate arg to do_IRQ(). Reviewed-by: Christoph Hellwig Signed-off-by: Anup Patel --- arch/riscv/kernel/entry.S | 1 - arch/riscv/kernel/irq.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S index fa2c08e3..6eaacfa5 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -168,7 +168,6 @@ ENTRY(handle_exception) /* Handle interrupts */ move a0, sp /* pt_regs */ - move a1, s4 /* scause */ tail do_IRQ 1: /* Exceptions run with interrupts enabled */ diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index 0cfac48a..ca459331 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -24,12 +24,12 @@ */ #define INTERRUPT_CAUSE_FLAG (1UL << (__riscv_xlen - 1)) -asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs, unsigned long cause) +asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); irq_enter(); - switch (cause & ~INTERRUPT_CAUSE_FLAG) { + switch (regs->scause & ~INTERRUPT_CAUSE_FLAG) { case INTERRUPT_CAUSE_TIMER: riscv_timer_interrupt(); break; -- 2.7.4