Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4172604imw; Thu, 7 Jul 2022 14:04:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sb9bKWnFowJG2SWLwjXtHbIGOsLWLwhhaCP8air4doXP/DuOxqqgeO/WyJduc40SOLCi7A X-Received: by 2002:a63:86c8:0:b0:415:366c:f287 with SMTP id x191-20020a6386c8000000b00415366cf287mr5974pgd.309.1657227886038; Thu, 07 Jul 2022 14:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657227886; cv=none; d=google.com; s=arc-20160816; b=DJhd6ru0B84uf2BdSiMV2u0IpGGIRAPZKMwj/zBdanaBNBioDdL7DZm39SC+6IaPUL djQPrS0rQ+41GQmQPVpO5iAewZLamESeoAmcPgRJmVpsr/MxIVnzGIf1BZlDNpA6QuY/ 7kXUKAFVx7YJLcFG2C+mwSPMCwdeHN6LAPdrZ3tIWjZl96n3z5w2dJo3AulVpGRyEnP0 Wlkmbd3nkfgHfnSD4tH0/TCXYx642MNgjatv+0qiStxqe/E2d52udUL3F91pclSFeywQ hx+5dBBLEfUsU6S13SuvyZ4ZpezocjLsh8xnYz8VSzlO1XzL7fLB0cb1Q05XQnNW7Lxg f+2g== 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; bh=vwZ9qUF7lQw3VGewOxc0ruHflyGqv3glhg9iHEvR9FY=; b=mzAxDaTBRYyms7vOieQ7mqPcf+VqiX75I6RUl/IMNMWscFVywfgBIFLKkJCMt97pyT 9VHCXCIf5P0H4YJlzFvXKuKgN31auKEJiNXWwMqSbbC8HRBeCKgOt4wPtaMLJ2RLyH/O 5nQ76EmSzokZLUdJYmK2hje0TlBi27v4vAqHNC0vKQ3XOOTHNvqFfVxcsz3R3P9aeu6q 3Vvk8Y5EE7N8ryHO3imfQv0k+r+/WHz7rOoJHqNUjYVi0EAFxSH5GCUp51+TJsVLEbAZ EkRt1iItzLDYbWRMqE7A9YEjLW7AN2F+JsBP93e63tE0gqLqBJHXNoRz+sWJ42RH49jA 7CBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a17090a2fc800b001efc2d68f86si36589pjm.61.2022.07.07.14.04.33; Thu, 07 Jul 2022 14:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236393AbiGGU4J (ORCPT + 99 others); Thu, 7 Jul 2022 16:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231383AbiGGU4I (ORCPT ); Thu, 7 Jul 2022 16:56:08 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0D572F014 for ; Thu, 7 Jul 2022 13:56:06 -0700 (PDT) Received: from mail-yb1-f178.google.com ([209.85.219.178]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1M5wgF-1oFLJ93R3D-007Qzt for ; Thu, 07 Jul 2022 22:56:05 +0200 Received: by mail-yb1-f178.google.com with SMTP id l11so34572916ybu.13 for ; Thu, 07 Jul 2022 13:56:04 -0700 (PDT) X-Gm-Message-State: AJIora8vunidYv4AKkGEmIgUnkgIWNmrHB/6GIybff1F87bje7zo2OEC XWDAONvrSh5PV8/v/Fa6THljheyioqfngV/zpUg= X-Received: by 2002:a25:3b05:0:b0:66e:c216:4da3 with SMTP id i5-20020a253b05000000b0066ec2164da3mr4678373yba.550.1657227363678; Thu, 07 Jul 2022 13:56:03 -0700 (PDT) MIME-Version: 1.0 References: <20220707110511.52129-1-zhengqi.arch@bytedance.com> <20220707110511.52129-3-zhengqi.arch@bytedance.com> <42bfd82c-b3fb-c942-d6f2-ae5adec90a26@bytedance.com> <33a63e76-fb71-2b9e-3b3c-cc6f7a675cf3@bytedance.com> In-Reply-To: <33a63e76-fb71-2b9e-3b3c-cc6f7a675cf3@bytedance.com> From: Arnd Bergmann Date: Thu, 7 Jul 2022 22:55:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 2/2] arm64: support HAVE_IRQ_EXIT_ON_IRQ_STACK To: Qi Zheng Cc: Arnd Bergmann , Catalin Marinas , Will Deacon , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:YT4YEwI7lADvmugq6duDAJMzi4GD6tZfzCaJpVk+DvagrjhcLIa CExsmuqKBjVTNYHO0k3dJpzL9TzasYY3p5BlbWRAys1rjDuPanRTbeVuXHowbO+ALsauNVY MJ1/ng/SP/MO10jChtJqE3t/ZulwjPnmVtfi4oRiU7xC0EUWkor5hIn8m7gtWSCIZk0SaOP QNsz6+I/018gzL0AXIYQw== X-UI-Out-Filterresults: notjunk:1;V03:K0:cdUKPDJOOEI=:q+4GRTCG8w3G0OOFmk6v+T hIGGTDobIGX0agvQTLKJnhU46PPodnPm76ya6TPCJdwsh13P5cOZ87MBGJLvLR0hYzHFZSyYb DKPVKl78c809hdX/epnULSHiCpuiq7xoMuI9WKnZgeHIg5J6R78uza9ls9cdnooNaMCX3Lyh+ JlEeSv0k1NaAdvUjuOkH0j/Sejsjt7vUwhYlH9RE2x1RxtV4fSWwGb2UBiwXNQJ0t1wLlMRin QcLs+Iacptu5nyQ+Tjzb0MqVH3y4e2N0PPBCoPyq59lohi7dkoJHo3P1KRb/SW0C3mdM/42Kb yw0uAIuUuXoiI7yoUgTVkzUWqwvd5n6a2kL6hl036CIL63h8GoZ/ZVjf2dEyVhyphK+Gr8Lf8 x5uGWNQaLuiWiw85k4zDKKHd2bSp/f4hbaNL4FJI2fV2XsOG94BRTtj5IM2ub7igDlz8KPK/L JpV5lUq0VnU9PMw7qRz98TbQo7xDEabrXY5unKsCRZ151hdAf/FRXjvFaYaszVoTDRhUassab cbPdlKwCT8dpv5uIT7jZcFYo7md4mDSXQ83RroMtZglERKTvfNJWYGoFQf1wEbxB8NASbiOft Sroibk0Vl0njWE3CQcYttg1A+3WyEuroo+el3EBwR3THI8JTmwHom2u5xGUpoGywCvmtiUI04 vqr68kZj4I9Vxt0ZH7i9xcRNc/P45CKYkZE0olBTRUPph65dekEKCkr3iPmCqQbxaUSJWd1t9 QrAniEUbBzeTl25e3BxeJFUwN9zNZJ5x3iV7cQ== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 7, 2022 at 5:00 PM Qi Zheng wrote: > On 2022/7/7 22:41, Arnd Bergmann wrote: > > On Thu, Jul 7, 2022 at 3:38 PM Qi Zheng wrote: > >> On 2022/7/7 20:49, Arnd Bergmann wrote: > > > > -asmlinkage void noinstr el1h_64_fiq_handler(struct pt_regs *regs) > > +asmlinkage void noinstr el1h_64_irq_handler(struct pt_regs *regs) > > +{ > > + if (on_thread_stack()) > > + call_on_irq_stack(regs, el1_irq); > > IMO, this can't work. Because el1_interrupt() will invoke > arm64_preempt_schedule_irq(), which will cause scheduling on the > IRQ stack. Ah, too bad. I spent some more time looking for a simpler approach, but couldn't find one I'm happy with. One idea might be to have callback functions for each combinations of irq/fiq with irq/pnmi to avoid the nested callback pointers. Not sure if that helps. Arnd