Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1250574pxb; Thu, 21 Oct 2021 19:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygnqwPeFzJZmRDTuSN7+uoutlyykHfIcID02v2yrvjEbSt/BJRZHB0tWVY55as/46I+smS X-Received: by 2002:a05:6402:5c2:: with SMTP id n2mr12903815edx.239.1634869757293; Thu, 21 Oct 2021 19:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634869757; cv=none; d=google.com; s=arc-20160816; b=Viblpxi/RdblS6OU5AwuhmAR9EqEXKjNh1tMWJ5T0sVxZxKX7LCqG9t9naUaEoqoY9 cUzpBWJDUAgcGquZdDH7E2013Ol8ttaoznuvWddyEopZuTvgxtp5icjRw4B7jd07TGgD tSFDyqEid5BE//5qtcuvZosTMscQ5yVe4xiLiHsqGxcNBOUCM/YUB7rwMPfk6k1WuhUz mknACFGJgTrha6EtS25iOiXYtc0/oGzmZXpTy8O1E4R07pRvOep8lUjUvG9ovyKH2cNx 3mXfF/7VjqG6uPoaYQpQRjCDDoKS0Fc8cZC4OE4X8FwoPtfxeM5mvkahKpANjIayd3sE Dp3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=V28arfvlfF670O2GH2ze6v258C/GK5RHdflWU0bGVls=; b=E6Kf6X1ZJB4qA1WYfKoPmeb///iPdY+SfVUo/8Cb1vIV9haq/1fGFtWY54IeFjNamW oqkheDpUnLjUHArGUdVTQsC279I2Tbgokul/ULAxSCDFmtxRz4+PUj2wGggXOFDdoe92 q2U2Xik5zZrmPm4YtjxhOM641zEyCBETYO300lR1d36pEhX0jhc2SaMrLPU74MN+sUNv l6fml7+K0FXFwEk82z+Ol5LZBFdBRbaOVA6BQ/Fg78xPccu5I4a/2VmRD8I3i7pcbhBw 35NqCsdipVlRDbLJfnzqZSC4+QsM2unSniaCwFLK7xWluLQ7LTxJR0xdIGHTM5+VLesZ 5QmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cGZHGCg0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si10023797ejm.506.2021.10.21.19.28.52; Thu, 21 Oct 2021 19:29:17 -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=@kernel.org header.s=k20201202 header.b=cGZHGCg0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231944AbhJVC3R (ORCPT + 99 others); Thu, 21 Oct 2021 22:29:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:56974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbhJVC3Q (ORCPT ); Thu, 21 Oct 2021 22:29:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 257FB613DA for ; Fri, 22 Oct 2021 02:27:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634869620; bh=E5i+silWbs1r5UQTsWFM1WSBLmfoDJzLk7uPklQY11k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cGZHGCg0VzcsSBFYJ9HVs/7mxNa756cRLZFqMSxeoy0/gGxyyZBOwOhhALu8fvnEc +dhXCOhTShS6mye1gWvJPiE/aq2QJGI1c36pQ1UEsaIWzxBmy5FPV4VXZJrUsE/PlY McQE4Qy9XX3w7H0wkdwsir8vEjBnyiGPgoJRFfEwEVnczVl170iX7MfyaMm4m0kHmj Wj+VFucxoObc7inEYzzSkSevvEf9zsVu1n0FpAp7dWMz+L5SC3ip2XP16IjXB2NGLT kFzhi5J552Jlk+TEacYquT0elJPx7qyV+kAcvAsDcAAKwIGYD2Tc5FDn5Xk6S689AA HqZxFUFk5T9qg== Received: by mail-ua1-f52.google.com with SMTP id k28so687601uaa.10 for ; Thu, 21 Oct 2021 19:27:00 -0700 (PDT) X-Gm-Message-State: AOAM531aSoUKOahR620veBkaucJiZlfSti4kWnKpg9Gk+A2rgeYCDOtK abXo4G6ydUXhOLcYXp60amRerjBpKQGIht0JQJk= X-Received: by 2002:a05:6102:c4d:: with SMTP id y13mr11538365vss.33.1634869619073; Thu, 21 Oct 2021 19:26:59 -0700 (PDT) MIME-Version: 1.0 References: <20211021180236.37428-1-mark.rutland@arm.com> <20211021180236.37428-12-mark.rutland@arm.com> In-Reply-To: From: Guo Ren Date: Fri, 22 Oct 2021 10:26:48 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 11/15] irq: csky: perform irqentry in entry code To: Mark Rutland Cc: Linux Kernel Mailing List , Albert Ou , Catalin Marinas , Vincent Chen , Greentime Hu , Jonas Bonn , kernelfans@gmail.com, Linux ARM , Russell King , Marc Zyngier , Nick Hu , Palmer Dabbelt , Paul McKenney , Paul Walmsley , Peter Zijlstra , Stafford Horne , Stefan Kristiansson , Thomas Gleixner , Linus Torvalds , Thomas Bogendoerfer , vgupta@kernel.org, Will Deacon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 10:19 AM Guo Ren wrote: > > On Fri, Oct 22, 2021 at 2:03 AM Mark Rutland wrote: > > > > In preparation for removing HANDLE_DOMAIN_IRQ_IRQENTRY, have arch/csky > > perform all the irqentry accounting in its entry code. As arch/csky uses > > GENERIC_IRQ_MULTI_HANDLER, we can use generic_handle_arch_irq() to do > > so. > > > > There should be no functional change as a result of this patch. > > > > Signed-off-by: Mark Rutland > > Cc: Guo Ren > > Cc: Marc Zyngier > > Cc: Thomas Gleixner > > --- > > arch/csky/Kconfig | 1 - > > arch/csky/kernel/entry.S | 2 +- > > arch/csky/kernel/irq.c | 5 ----- > > 3 files changed, 1 insertion(+), 7 deletions(-) > > > > diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig > > index 45f03f674a61..9d4d898df76b 100644 > > --- a/arch/csky/Kconfig > > +++ b/arch/csky/Kconfig > > @@ -18,7 +18,6 @@ config CSKY > > select DMA_DIRECT_REMAP > > select IRQ_DOMAIN > > select HANDLE_DOMAIN_IRQ > > - select HANDLE_DOMAIN_IRQ_IRQENTRY > > select DW_APB_TIMER_OF > > select GENERIC_IOREMAP > > select GENERIC_LIB_ASHLDI3 > > diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S > > index 00e3c8ebf9b8..a4ababf25e24 100644 > > --- a/arch/csky/kernel/entry.S > > +++ b/arch/csky/kernel/entry.S > > @@ -249,7 +249,7 @@ ENTRY(csky_irq) > > > > > > mov a0, sp > > - jbsr csky_do_IRQ > > + jbsr generic_handle_arch_irq > > > > jmpi ret_from_exception > > > > diff --git a/arch/csky/kernel/irq.c b/arch/csky/kernel/irq.c > > index 03a1930f1cbb..fcdaf3156286 100644 > > --- a/arch/csky/kernel/irq.c > > +++ b/arch/csky/kernel/irq.c > > @@ -15,8 +15,3 @@ void __init init_IRQ(void) > > setup_smp_ipi(); > > #endif > > } > > - > > -asmlinkage void __irq_entry csky_do_IRQ(struct pt_regs *regs) > > -{ > > - handle_arch_irq(regs); > > -} > > Seems the previous code has lost old_regs save/restore? > > + struct pt_regs *old_regs; > + > + irq_enter(); > + old_regs = set_irq_regs(regs); > + handle_arch_irq(regs); > + set_irq_regs(old_regs); > + irq_exit(); Sorry, handle_domain_irq has done it, and C-SKY's IPI is in the handle_domain_irq. Reviewed-by: Guo Ren > > > -- > > 2.11.0 > > > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/ -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/