Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2508354imm; Tue, 4 Sep 2018 05:47:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYJ/CBOlWwolXw1CWh/ZCLwU5KIfWTJcItcBXz43ZstwgAS6bUKX4bMx8zgtnCAIs/vUHQs X-Received: by 2002:a63:4d21:: with SMTP id a33-v6mr31071199pgb.408.1536065263859; Tue, 04 Sep 2018 05:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536065263; cv=none; d=google.com; s=arc-20160816; b=WTt0JTyzaH1NFh29KeJGH+2sPusmqz30cdhtnAs5xFHbG4yYXeoG22Hiy8hRlU2BF9 4Wq/jBM6Ju6xL+E/Ls8oN4Vg7RAXpKa2WTIrCFXtI463Z4Dp8EXSjYMsS7l2jsehG5mt mfaHvhjEn0KqPC/tdp8nKnUE/BW2rk7RmzEs264ZBeThPyc2RpiChD2k1cSp5whma6bx cys+9dhKij99mUazVRZOL32jfBYgCDiDfe1GgEMJ4f/ZDvHxFGRBnTLtYsT2yZS+dM0D oBDwC1pdyJ+i2Lj8TMcCNIKvAsm7EsLLHeDl8O92ql0pem79aaa4qpSgCbaf91zRjaYt WLqw== 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:arc-authentication-results; bh=t6EBfeBsA49RIXJWUgN9zEEfw2Bjd/ZXXD+zuv1ABCM=; b=00vSEIa1k/aOjGys/18nZy8he/dPrgCRV5/kfBAZxy2DRH1P+rovGgPBKKpigDWQaI /1ZZy39pNW0o1d2jsOtCP5/zpx7HAIi4m0B9dGrzqfyFBAtQO1cgh6ZxOzbtKnohOQZx uPR0gmgfVCobusYiSysk1TmbLwRWNHiSGXqC0auDAKObHjB6KaZn3+H3yQ80VLIBbzcA yQFPY9JgD6aAiGn4i4PuICzX+Qwi60HLX24WMiUxKH3qs3qilZif7qKSJBW+ODSLLlCD cLVOacX9+oAmoNkFJfJkAOk7rX1EpE3H1IqaivtJxdvUIX8TyuMJLplxKSCHbfhudQCJ X0kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=TmYlY5CV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14-v6si21011051pgj.413.2018.09.04.05.47.28; Tue, 04 Sep 2018 05:47:43 -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=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=TmYlY5CV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727449AbeIDRKy (ORCPT + 99 others); Tue, 4 Sep 2018 13:10:54 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38919 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbeIDRKy (ORCPT ); Tue, 4 Sep 2018 13:10:54 -0400 Received: by mail-pl1-f196.google.com with SMTP id w14-v6so1593975plp.6 for ; Tue, 04 Sep 2018 05:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t6EBfeBsA49RIXJWUgN9zEEfw2Bjd/ZXXD+zuv1ABCM=; b=TmYlY5CVX1BOpRClmA3iRDBCcfK1lRAV3coeNKt4HZjJnOyk3/7qphMK7tRn6C4HQd XUpSyCxGhBDUWJIr1+MFDLfGdHi/QjQUay26iXwUGGt1WV/4X8YvF+b2upSpc5uxxu26 kUXRBCXZmZ271XvhbEf1wGMsnvSoJ6mpcmSjtJCD87IHtNi88u7N50N/hhxY5bExI2+h ej9iOsMqZpeV7OqHQ/yVWrmL/AhogHw2ZxCaN72OL/6My9N11KzQ4IoAs0IU51xzs1sv ImKEBPIJA/oGY0Xkh21xSLyCjAJMWETvrZ4U/31pvWzFXBozbL5iWepl4E+8byAD3CyT klMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t6EBfeBsA49RIXJWUgN9zEEfw2Bjd/ZXXD+zuv1ABCM=; b=JQDTp/8acuFz9y2IaEaRkC4VgyAU30DE/hDlqWiZxJMwz4T2I8MGb0NLvBEhW7uKdz dBCov5HEZPyv16TcWyfNcj5nNgSaeIP02t2rNbXi/IeeewPuC0di2VrbHR1yPpvMIg2P g60v1XuHfigfcjZiVaI0kkHmKi6NyBuJphsh/LNHUQ/CG1EZeqJCXtxwPgBltiI4Yj/w x+V9aOAFqPf68f4KE8pSoTTyIDqrIcZ+x8jsnSg27YKYcELXBz0FNscP7kJtClOLZmTR UQWQ+rTl2yF4Lv6VJAVTzs9Qs/7OdZXFxKt/0G9Hm1uowjFwTOCDt9fh6deF52Q3I0tI GrSA== X-Gm-Message-State: APzg51AxvK3YAK8FmowaJLRIrEO+anUZUnJN3csEK6wawp20HQBK7TtJ aLkmJCaFq1KTjZEGgd3hZkDzhA== X-Received: by 2002:a17:902:758a:: with SMTP id j10-v6mr34132116pll.281.1536065154813; Tue, 04 Sep 2018 05:45:54 -0700 (PDT) Received: from anup-ubuntu64.wlan.qualcomm.com ([106.51.30.16]) by smtp.googlemail.com with ESMTPSA id p11-v6sm31621773pfj.72.2018.09.04.05.45.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 05:45:54 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Atish Patra , Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [RFC PATCH 2/5] RISC-V: No need to pass scause as arg to do_IRQ() Date: Tue, 4 Sep 2018 18:15:11 +0530 Message-Id: <20180904124514.6290-3-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180904124514.6290-1-anup@brainfault.org> References: <20180904124514.6290-1-anup@brainfault.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The scause is already part of pt_regs so no need to pass scause as separate arg to do_IRQ(). 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 fa2c08e3c05e..6eaacfa5b63d 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 5532e7cedaec..c51c9b402e87 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -26,11 +26,11 @@ */ #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; - switch (cause & ~INTERRUPT_CAUSE_FLAG) { + switch (regs->scause & ~INTERRUPT_CAUSE_FLAG) { case INTERRUPT_CAUSE_TIMER: old_regs = set_irq_regs(regs); irq_enter(); -- 2.17.1