Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2388602ybh; Mon, 9 Mar 2020 05:01:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/Xv8US9jn44MGTjRy29LaI6FDL0ae4lA7bSLHIjCKOrrixk0l3tOeJ0ORVZKpWiLsjaOb X-Received: by 2002:aca:7517:: with SMTP id q23mr4395835oic.23.1583755314337; Mon, 09 Mar 2020 05:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583755314; cv=none; d=google.com; s=arc-20160816; b=DC5VToKuCsUuWDWKfPXiK6i0hNTm6RI3c2C/yNOouiT4Fb/EFQU7BPkzSSzt0+SEMd pfQiEcWsqLOP1HVIaU94/4y5qFgJoEtXl9w/eEic+J+ngi66pViGvwr13ThrfrZWGYKQ Og8Mul4V1Fw/d39uzZeD0YvGL9H9k+1H56etW8c4C+5L8X1i+IttT2cDTzQSV0XSyOaR Iid/DkW4i2YNaJ/X4jl4Yv4ZHk042aPsWKIAyLEHHmC/ZHaDybKrEWNiQ/hJmhN/WhCh 55Dwr5yej/tNIN57VSw+jV1BQq2Nbq0DCiH0p7/Rb1tt/2r445UO5yMrzDPmebKWP8ew vRAg== 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=XB8GNe6/v7EQn1hDBocDW32S0oBZB3GFkZAZ+BQoKuQ=; b=kgT7P6xSV5g1NBNfXoWZupZllXbNrjajYad+nu8MWj7DNingGkNbKiGATlj/A/IePF m+S0d4unxHeqQvOdjBdUFOz8PxQiMWiZJmz833p/68xEOYj+1eJA4Q7UWye2b60CyXir Qz1XE7J0ETwurqkrxrLHWnDDh7WiMO+gnRoUdTp81edBvYxIq2D5iLg84neeo9Gj5Zcl xfgsx6zcHHfjzG/dAqESyks9TPnwWg3/0cchKr6ZpbNraJGmXWW8iw/28CQOJSJWZbkM OEfuNOPLgLQQJq3xGZvN6dEmxssA3n1S8eYH5Ud+W11lzoQSipk890tSU4BACZPpcEGF DsmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=GIFufCwR; 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 e25si3946352oii.201.2020.03.09.05.01.41; Mon, 09 Mar 2020 05:01:54 -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=GIFufCwR; 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 S1726528AbgCIMAz (ORCPT + 99 others); Mon, 9 Mar 2020 08:00:55 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34486 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbgCIMAy (ORCPT ); Mon, 9 Mar 2020 08:00:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id z15so10751513wrl.1 for ; Mon, 09 Mar 2020 05:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XB8GNe6/v7EQn1hDBocDW32S0oBZB3GFkZAZ+BQoKuQ=; b=GIFufCwRBHYqYm6ZosJpdHi0QYnmtcPhKd/fkJOwlVTOKyQfn2epXhcKTh2cH0DzSK DoVEbszPfmXyrx+zeQnsKgNh/KxLeWw9ur8GxOsDye9MtH4bLfcQoTlyS7kAVmnNBxHy TbWlwgEddpv+jDE5dHca8Ymbpgxs9E1fy53Pb1T/kaMJKcAvZZ6ngvtfNnq7+i64BYhg dqqCNoQ6w12FNF/d+IceyM74kVMyGJ0FVCuWkn42Rn8OnJqKVS8LECJSv6lutdgWUh6S ghFxENqIL5/tjNMLC4rtY1/ZNwAg4dmNrQEhckPujGBgRN1YVth+HrqtcxcpjzXu7KG4 d1MQ== 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=XB8GNe6/v7EQn1hDBocDW32S0oBZB3GFkZAZ+BQoKuQ=; b=k2Hg/2GbvyycHMkaS3x5JmM4EM2coqX63yNm2oKe7PMnN46ODDiYtfdvoLxj+l7nUM jh69UGUoCgdZnOsIi10cwjzfh1PCWTiPrqBaYrS2HzGgOg8g+NBTGfXS3tuCcsZ1zJOQ ynlwKl/w88Eq602fxFUM3LTtq77liKynXUGiwQ4l6kj8IRDhKwcTh6hndMDkV2exiYwh cdOIJrM2aO0Vce7MFYEElM6reLjPUAiFFVujzTpr+mCsfLC0iSso/zU7NDXt4VqxJkAV risp2QftPd++4jBW2ScJwDHWkOSpDS6R9Uy1lF+QJekYPn5hiMacxxV7xl4IhsAxJvi7 GaOQ== X-Gm-Message-State: ANhLgQ2Ty0C8mKxsMkfl6wIkutfiNfPiKNVBXN0TTyTqyghsc5jVvgM9 eeJuYtMxqi8dqf8ckl0rEkicwhHioe5b0V0f2lo5LQ== X-Received: by 2002:adf:ec45:: with SMTP id w5mr20454127wrn.230.1583755250950; Mon, 09 Mar 2020 05:00:50 -0700 (PDT) MIME-Version: 1.0 References: <20200309110211.91130-1-anup.patel@wdc.com> <20200309110211.91130-6-anup.patel@wdc.com> In-Reply-To: <20200309110211.91130-6-anup.patel@wdc.com> From: Anup Patel Date: Mon, 9 Mar 2020 17:30:39 +0530 Message-ID: Subject: Re: [PATCH v4 5/5] RISC-V: Remove do_IRQ() function To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" 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 Fixed Marc's email address. On Mon, Mar 9, 2020 at 4:33 PM 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 208702d8c18e..238f0ca070db 100644 > --- a/arch/riscv/kernel/entry.S > +++ b/arch/riscv/kernel/entry.S > @@ -183,7 +183,9 @@ ENTRY(handle_exception) > > /* 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.17.1 >