Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp475733imm; Thu, 6 Sep 2018 05:39:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYZghKLa/Y9rZjg8IS8P5vlNpVWZE2aofMBlT4CERrEnwHdMbYxi7gDHqCb9UGe568mWfL5 X-Received: by 2002:a62:4fd9:: with SMTP id f86-v6mr2624227pfj.110.1536237553293; Thu, 06 Sep 2018 05:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536237553; cv=none; d=google.com; s=arc-20160816; b=UR9ArtTDHjsHCdpfiCCIU+kIYJRCJeUfcAux2rkMYoRNShQ1WmcTIUAktFmIU78oxB ybmDjfDZvVeb3Xii3bpqyRAb1IEqV1TpBjeFusCXcMOaFjxsR7RKMa8TJYAOuL1ZEMvz vcTyjIO4OaASP2082Flx1GXVhV6bSugNSlT8rfx+1IguJOVDck6AAhyYvr5ey/IZEcYQ cw37TC3jMWNYrwCEhiL50pvbhGzXPB0fr3IOf2IqAkO8voKtn6tZfF+ZnTy0SQZWOUqB EqTHwJp9H4YEG0O5Qc3bFpI46HiAB0iu1qV4uZ+Dh5jZ/ujVa9YSdlXBCL0kjjCVdr+a 6Yzw== 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=i5CW7ot0bZc1KWxMcuk+xrMpDjm9at5IVA+yuFgxfU4=; b=fjxd+CPrD2Y64A7Qu2JdaxApiz8dCixqBDqGKigKM0+aY9gcSxO+MrJFPmv1bdEXdX ASqnkjFmMf3mWYMEYSSsQdjzEKbfIdT1hcZHI0tTci206NoqRkEV8RSCHWQQARfBYTb8 4F9kEs7kCvuHSSOH80FJ+5vLApDzAE/P8wRENe6KhPYda4AD2njX0PX6ZWLvb2DVjEpv KTqX2LpqMov2qHCQ9VHN/Zzcgnp+vJ7GKUMsaQ17DZCSsPc2dT5ji5fy02VtHe18rp8B 4ShQ7/v+FBzGKemMDxam0lbKq4G6eKdbvn1GvbpXjupOB2AR7e4uRi8++R2MFSLxJX1K 31hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=sLIw0MnE; 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 q34-v6si4867291pgb.78.2018.09.06.05.38.56; Thu, 06 Sep 2018 05:39:13 -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=sLIw0MnE; 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 S1728655AbeIFRMl (ORCPT + 99 others); Thu, 6 Sep 2018 13:12:41 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44121 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728174AbeIFRMl (ORCPT ); Thu, 6 Sep 2018 13:12:41 -0400 Received: by mail-pf1-f193.google.com with SMTP id k21-v6so5209506pff.11 for ; Thu, 06 Sep 2018 05:37:23 -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=i5CW7ot0bZc1KWxMcuk+xrMpDjm9at5IVA+yuFgxfU4=; b=sLIw0MnEAAPi/T3loITh7TJh7ojLv8M+8bvzI9JDvMM2H3WbeN/QpPBYG7Yx6T1rwD EOVONeVcmd80Q4rve2P9zNlfTer3+uiCXx2NBnT4WGoYvAr5pBBAFbmPlFHoz3toIO1n 7TjNS3kJUyOoi9luD6MtRJpXwu4tiqNL2B3CLIV4hX/lyWyV+rE690LTdAsRkRuQswxQ ffoc109KKrRwgxVIBYtiVVXCANiX15aBpZ+GyLdrsaQbrtFH34Yu6Oh8GFxXFxZBU0i4 Os9uc7cM4lpK9pAaF4WjF65MyUxoqngc2/Fv0wPhbnNGPlCXUWfNJiLWv53lYUI+bXyP 4p7g== 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=i5CW7ot0bZc1KWxMcuk+xrMpDjm9at5IVA+yuFgxfU4=; b=C9wYMsw3AMpNIfzs56miM803wVBw8BqNKfGFmcoaU/GkN14OhP8GYKjqSq1K/aprdL Lamj9XV6IdSL+VqTGlVHEL7NBwMNO9V0NVZV6F2GbR5I8qhbpXgamFO3CWSp/DkuXDYF qqPT1NmQ2xVwdPhhfyRhaId23NJDrq1OLOvKtfCPwPBbqCZUFTORAk0joHPCn1u+jPBD ubFNZ7X5eGYcWWYjR6MzGUWnWCtOg0HGctgGJyQHlQJDdtdRcxkCV6hLJYBWfn3aXYlh RLN7tGe32pHymqRuYY6bjvU6+XjU7cMMTJRJAymPRyb3sjcbCdr+6n27ROJ8s/1jW20J 6QYw== X-Gm-Message-State: APzg51DNTLpIS61qFDn6BivvAJ4hnokHcigSIJZnfR1+yb6nh7zZ0D6M YaWLnfv9oUvndNNVcqUWUVWXew== X-Received: by 2002:a63:7353:: with SMTP id d19-v6mr2454357pgn.281.1536237442792; Thu, 06 Sep 2018 05:37:22 -0700 (PDT) Received: from anup-ubuntu64.wlan.qualcomm.com ([106.51.30.16]) by smtp.googlemail.com with ESMTPSA id 193-v6sm11446165pgh.47.2018.09.06.05.37.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 05:37:21 -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: [PATCH v2 2/5] RISC-V: No need to pass scause as arg to do_IRQ() Date: Thu, 6 Sep 2018 18:06:48 +0530 Message-Id: <20180906123651.28500-3-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180906123651.28500-1-anup@brainfault.org> References: <20180906123651.28500-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(). 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 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 f5073dcbc560..d0de40e1e7f3 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -24,11 +24,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