Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp112291ybm; Thu, 28 May 2020 17:35:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzroz3NHL9uTj2SH5m4OdZVZGL8ojG+pe5QKoOeThtckajvV5izeEqU/YhQfl48yax0xo+4 X-Received: by 2002:a17:906:f44:: with SMTP id h4mr5468175ejj.38.1590712519130; Thu, 28 May 2020 17:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590712519; cv=none; d=google.com; s=arc-20160816; b=O2FXnQeISxjIkM30FWP9UNDiYYk/lua9I/8cpqwybA34XhMjR20fTiBUpYma838Hbk I1jdMSHjijJPihqeCHXSJpOQelTWnl4sSLxNVIUFWo64Mqnn9J/nPCYsI2fBinyV2EDO dv3a+1tys15dBaTRRgOhG2wMzPPdmIr5ubLXxu3ShVl9kZuFiR2htBcqDBxvYDbjZR5S ZJrT7N3J3bQ/rJ2QFfD4t8fEshmuS9CM+l/A/Vx9LMJWy3uFmfJSfJIHro58myUMsO5C do085eSkKTL3zhHOVx3Edfft5lAwG9Dvm0Oxkty/7QwMTG2noBHn+8fkPitw+eV3vguc 9laQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QI7CDCUbd5OO59gGqxpOHmDYgW2MbSqQ4kURqtenhT8=; b=FBSJK8l95bfTnlL836C0GM6v7oF0a2gaUjX9oev9pMX6G85EKsBo1fnsfTgNKRpBQ7 LXInBrWtaHCFd6R96d8SbMCCmbBeZ1I9d4d+fLDYZF6a7dQf5u4hq8QaMYfOyrr64oV4 fY6LWWpL8bW1R+VoV+oj3XJ7oX0VTXDW6D8TIBXhyYI6A+KWbyUrSsIN6B03RVZhYl5x WO4UvWbCcWbuCgtYgc7nfn6F78mZy+urUjsiqScCWfWgRyZcq+3HLqBIiSuOTABQV1Nr zItro3+yKSwNCw3XLyUgVkgzAFj5qEemEHx8MOfB3w9cmxYdN5YxIv0Dl5NB6ePGUrnj kV2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=KY7QUkxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dx17si4590115ejb.467.2020.05.28.17.34.55; Thu, 28 May 2020 17:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=KY7QUkxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbgE2AdG (ORCPT + 99 others); Thu, 28 May 2020 20:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728679AbgE2AdE (ORCPT ); Thu, 28 May 2020 20:33:04 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7037DC08C5C6 for ; Thu, 28 May 2020 17:33:04 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id r15so1218370wmh.5 for ; Thu, 28 May 2020 17:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QI7CDCUbd5OO59gGqxpOHmDYgW2MbSqQ4kURqtenhT8=; b=KY7QUkxxkJAy9/MypVQr0cPw3LLVXtfvPShrn5e8LD5SgrqM0+9duZr3Ugyg6LVkxx intd2hXFaoa4Z6NWzfCZ6VeyBThOvUOQJIvOTazwlWc969YwG6phJuD4Dx/Ryu4muaYs lOYS5mUAuiTX4iIdKa1i63TZnmiW2wm/NTZB8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QI7CDCUbd5OO59gGqxpOHmDYgW2MbSqQ4kURqtenhT8=; b=QafOxHFbqWMk9ItvaiZJVUIB9+y9qQ3WyihMFrvFRAsNyyx724dLeXwFvqY8WObBk5 al2jrD6299BfmqUDgaqAyCJnkEz6QaWJotVO8C30pJXj+Kx5U0ylVTzGpgmj7ePO9msB 6fC4UqAM4W3yY/DKRPVjxeGmwm7zMFD82g85sh5NE8REaXvH1E2Pb/p5NBcCo7NlHCNU 5BA7jak48YEI6aNevfOlBOm5DpY5KyH3vdrZjOLVPBhDtN/Wg7xn2cEORMjXTbEb7wuE 0oSg9bs5SoFE3JkY8Efda+g7K7RgkkW0F2aznvR1rjVk1iAVWreSsmFs3+DfUdWixpSY cnpg== X-Gm-Message-State: AOAM532afx9jBShphP9p6pf2oHaeHux+sE80Lh3xKCI/6AuSddMAsVQr fYo8JsTq3FMa3D24khSx97325wXsQQPEwSJDkxnpyPo= X-Received: by 2002:a1c:9d09:: with SMTP id g9mr5646353wme.31.1590712383067; Thu, 28 May 2020 17:33:03 -0700 (PDT) MIME-Version: 1.0 References: <20200521133301.816665-1-anup.patel@wdc.com> <20200521133301.816665-6-anup.patel@wdc.com> In-Reply-To: <20200521133301.816665-6-anup.patel@wdc.com> From: Atish Patra Date: Thu, 28 May 2020 17:32:52 -0700 Message-ID: Subject: Re: [PATCH v5 5/6] RISC-V: Remove do_IRQ() function To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier , Anup Patel , "linux-kernel@vger.kernel.org List" , Atish Patra , Alistair Francis , linux-riscv Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 6:34 AM Anup Patel wrote: > > The only thing do_IRQ() does is call handle_arch_irq function > pointer. We can very well call handle_arch_irq function pointer > directly from assembly and remove do_IRQ() function hence this > patch. > > Signed-off-by: Anup Patel > --- > arch/riscv/kernel/entry.S | 4 +++- > arch/riscv/kernel/irq.c | 6 ------ > 2 files changed, 3 insertions(+), 7 deletions(-) > > diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S > index 56d071b2c0a1..cae7e6d4c7ef 100644 > --- a/arch/riscv/kernel/entry.S > +++ b/arch/riscv/kernel/entry.S > @@ -106,7 +106,9 @@ _save_context: > > /* Handle interrupts */ > move a0, sp /* pt_regs */ > - tail do_IRQ > + la a1, handle_arch_irq > + REG_L a1, (a1) > + jr a1 > 1: > /* > * Exceptions run with interrupts enabled or disabled depending on the > diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c > index eb8777642ce6..7207fa08d78f 100644 > --- a/arch/riscv/kernel/irq.c > +++ b/arch/riscv/kernel/irq.c > @@ -16,12 +16,6 @@ int arch_show_interrupts(struct seq_file *p, int prec) > return 0; > } > > -asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs) > -{ > - if (handle_arch_irq) > - handle_arch_irq(regs); > -} > - > void __init init_IRQ(void) > { > irqchip_init(); > -- > 2.25.1 > > Reviewed-by: Atish Patra -- Regards, Atish