Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1246131pxb; Thu, 21 Oct 2021 19:22:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3sYUrV7cNg00+IqF9X/di585NnhjrNggWiuud64rBn3tRfA6mrk0LkziaziKHzLMUNc1D X-Received: by 2002:a05:6402:50cd:: with SMTP id h13mr13359635edb.245.1634869325074; Thu, 21 Oct 2021 19:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634869325; cv=none; d=google.com; s=arc-20160816; b=ZfG11pUn2qjDChz0YyPjqXCHjQhZR/7Z8G8UmqpNSBesYO4xHy1iE+QUw4DIjxNheI VeKcwF4dsFQEtwYdd2zhc/6twi2WSN04hAqBqZUAbErQRkkbBtvMSW1gYWUcvmyGCvTq 8dI6A4x/COuqHgNxdb38olO6bQ+K1msqc8EoXS3bJdz4UFFtlc9xc9QSPwl9T0BBcWs/ nkf83bol5gPLYQ0eYo6OvSsszeNSXx03YHUY2obdsfMYD3iidEDwXc1lv/j0asHZcDrO /DNvxtvidXkqhTpzRfP+x3+TZHzm1wGSNV70qTjjLT+dQZOkkYpQvSt+c3+ITHCSNwvA 94+g== 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=Wzhgo18UzsoZfEMQ5/GDZ59g9doRknguFryl5LWRgF0=; b=d1G7rEf6i44E/p8R2GTvXF/PqMJiclnX7OeKiBJvRNnM7+WIA2npj7FpyvnC3l1qGw lWHSAXbbEfmv+8Hx6O1nwQdQK4AGhuW5BCrvMmCniRnEIDvVP0Ny16TeSfEhjX6vGKaD WmBogjJVCivAfcsfqnH/N+GeI45gNgD3n1prsZzzzxqm63OMyZuwBxKOTqrA4vyHJC9A pyScCZgLTlf9kczCzc/zguaBgR5dPdzsqy5++ZfEfsHMo33+GpWV1PbuyXAe3M4qzoPi zX8VHG+ErWtRgv2keZ7WSvTwKNuaQRqN75wPeuCaMqG6F+rcQrBr126KrP4AavyZ7Tp2 w/oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jgmrFL4L; 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 w13si11348456ede.169.2021.10.21.19.21.41; Thu, 21 Oct 2021 19:22:05 -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=jgmrFL4L; 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 S231737AbhJVCWW (ORCPT + 99 others); Thu, 21 Oct 2021 22:22:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:55854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbhJVCWV (ORCPT ); Thu, 21 Oct 2021 22:22:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8F03613D0 for ; Fri, 22 Oct 2021 02:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634869205; bh=g+Bp25s5AcdR1UXY9t89d+/23B27zYRSUyZtCOv20dw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jgmrFL4LKxeBb18HQ/ov6iE5ZwFf9x0rMtFjegfWV3Cqqp7OWqDwqeWOmCo9iGUa1 q8XWGX7ET2/yexImpg4VFwblv1xHQrI6J9ZJ1EkWqTAzgNy0eYEJDhf1K0nVfxpniO /w0dDlpG/MhCm1c4dgeay5IHw4e/p9W71Kxg56DjrP4b2znquUjFtHbujwO3822Z0T 1c6ABRrHwjWNonp7+ya/w9uUUUv0SH0raMWrAQySLN+pF76xL9bpFfahABiLA9rLzQ C30ilfvvmKqJOXas+x1WXYDcD3eu6S4wqjZhM37q/qsdGOK5si0nA/0d/8HXHTJIVJ JSEP+w9pX/urw== Received: by mail-ua1-f52.google.com with SMTP id h19so4947504uax.5 for ; Thu, 21 Oct 2021 19:20:04 -0700 (PDT) X-Gm-Message-State: AOAM531rXWCNkQz4NOlyreSE0u1nsn2VHzB699bfXVx+WWRvUa94Uykv 0aZG2PUYWu1x0c8oi3clW2/Oqc9QyajJQntWVoU= X-Received: by 2002:ab0:3c4d:: with SMTP id u13mr11899281uaw.66.1634869203855; Thu, 21 Oct 2021 19:20:03 -0700 (PDT) MIME-Version: 1.0 References: <20211021180236.37428-1-mark.rutland@arm.com> <20211021180236.37428-12-mark.rutland@arm.com> In-Reply-To: <20211021180236.37428-12-mark.rutland@arm.com> From: Guo Ren Date: Fri, 22 Oct 2021 10:19:53 +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 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(); > -- > 2.11.0 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/