Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1690391imm; Tue, 2 Oct 2018 12:17:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60sJVpaO/P0AbBWk4R6+0DrL65hb8MJ8uGUZIM7NMrS+bZYjKaEra55LsdDtd2EVd5ZGhYz X-Received: by 2002:a17:902:968d:: with SMTP id n13-v6mr18142704plp.33.1538507819981; Tue, 02 Oct 2018 12:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538507819; cv=none; d=google.com; s=arc-20160816; b=I0u7jL2GBB9BdI1Y7Q0JwvNHFracS3+HcT4XbYxo9cP4QzMTQf3YEViwEoBfbUMNbC yHReKOZsm0fOypyKmtV7O526qGe399ZiFdpJfThl+n1y+2XXio/+3Vwu7Zok/qoFx3YJ 4sUP6s3ZlYC43O8XsYwdSh9RAWLEErZGs2Pzg7ZyqZIYO2zDFq3pHVzU7XyZt64kwAet g2WS/h9mUR0y9IBmoqfUrE/xRYm0mzXNvoXpgGTitGoKrAOichOGH5WD7kTE8xpMN8q+ jIqYA/URjCEGCzGGJjGemAbtzR8/qEoQEpSWybzAABJY+jouTzeNO1lm3TBIB6U9ByJ0 /ZJw== 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=o1Aegute/Rhh2SuNPLPaBE7xaE0jkYdx3RA1YULwoZ4m1z14Menk6k1tTjoxLss79M /nx73xCSx5V7ldgFkVraCawfmeKcfa2KVuh9a6LLROT2oDbDcH6NoBDXcj0eI4laugbZ 47lDa1Y+wjPSYN+ISMw4ib3gNMRklolDF2KsCf6tlzhkOKN0xAP/Ajw7bvPe5qCBUjmv aCnm/cW9+bcVvgEiSbiBVjJhuPmxEV3g9SO3tJYTGYe2LRMB1HN1B16qZrDu6Oi3Xks/ Fu93eZ1IYvbgwfd4AD5hvdTwd2iR+ln9rdSMd6/mpnoVWgcC6UtXWqzjlvVBemn2m/lJ 2qIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=cvGc0GMK; 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 m15-v6si16071472pga.114.2018.10.02.12.16.44; Tue, 02 Oct 2018 12:16:59 -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=cvGc0GMK; 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 S1727862AbeJCCAC (ORCPT + 99 others); Tue, 2 Oct 2018 22:00:02 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:61573 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727585AbeJCCAA (ORCPT ); Tue, 2 Oct 2018 22:00:00 -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=1538507709; x=1570043709; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=gjnlUPagI1vf6/WNqKxc8KY88DkfwDRZzZi6iXSpG08=; b=cvGc0GMKazi2KX2SPgWDLetUImyCtMPYNRP3MRMPJ28b/Zk2m5v47IiS P7YIynGEi6sAcw2KwsKXmH8k7AfQWSdNlqgdKNaEZQdvCAYdwYb4OPtXt Ic+0ASOXVrDIcj52mT5drjYPcxolBwhSt7PrqHidREp4Bvgn4qTLKAiAn M2scZhmQjiSkPJc4QltKXi6jQ3YSeqckx7DdUjkqlWyWjMcczibT66Rmt vPpAAY5WVh3Tt19MqvgL6IXHQGeY6IJ6SujS5Qbqajr/9MNR1KKybJazn taz7tSZORN1MJCKiuE0lUKhREF/8RBKfQ5N6e11jo5RHFbH5s5OLz0QvD A==; X-IronPort-AV: E=Sophos;i="5.54,332,1534780800"; d="scan'208";a="91076736" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 03 Oct 2018 03:15:08 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 02 Oct 2018 12:00:49 -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; 02 Oct 2018 12:15:09 -0700 From: Atish Patra To: linux-riscv@lists.infradead.org, palmer@sifive.com Cc: anup@brainfault.org, hch@infradead.org, linux-kernel@vger.kernel.org, atish.patra@wdc.com Subject: [PATCH v6 01/14] RISC-V: No need to pass scause as arg to do_IRQ() Date: Tue, 2 Oct 2018 12:14:54 -0700 Message-Id: <1538507707-22299-2-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538507707-22299-1-git-send-email-atish.patra@wdc.com> References: <1538507707-22299-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