From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C628CC5321E for ; Mon, 26 Aug 2024 15:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gWXthuGvkR3AM6S1wN1EXWcW88Yee9uMg6MwZcIi8DE=; b=Y7Vs8oCV+EeWCIsKw0faNxFrmM 9r0wu2/ji0rktfeUwqJkiXy30UX+cygSnP7d/7RE7P1lVwca/+g3gciwaMvyUYNI5DwdUXLd+cgDF 5VQ152OENCGNCM4pczMRMopwGVgdJJJQVpr7+kAfdnS3CaWgLEtWOi7PIB11Vg21QPmPwEJsJ+nXj B5WppDwU2RKmyFV4/dLPYjKyL7tOL85FfnNHi9sA8HUZWRM0nVQ5BL5st2kbHF+eHmRLffFw3Yp4C IsmgdFBbZ60EJEbIZ952j2gty5Y/obs/rFdkMRY6a9Ps7ZNaL5zn6Modc3ucOW1eXohz2fIRYmbs7 Q2PPRHhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sic5K-00000007uD0-035b; Mon, 26 Aug 2024 15:56:50 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sic4V-00000007u63-2TVa for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 15:56:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7793ADA7; Mon, 26 Aug 2024 08:56:22 -0700 (PDT) Received: from [10.57.71.136] (unknown [10.57.71.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 694E23F762; Mon, 26 Aug 2024 08:55:52 -0700 (PDT) Message-ID: <025cfbf4-d5cd-4b06-b86c-8d70f19205df@arm.com> Date: Mon, 26 Aug 2024 17:55:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/3] entry: Add some arch funcs to support arm64 to use generic entry To: Jinjie Ruan Cc: catalin.marinas@arm.com, will@kernel.org, oleg@redhat.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, kees@kernel.org, wad@chromium.org, rostedt@goodmis.org, arnd@arndb.de, ardb@kernel.org, broonie@kernel.org, mark.rutland@arm.com, rick.p.edgecombe@intel.com, leobras@redhat.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240629085601.470241-1-ruanjinjie@huawei.com> <20240629085601.470241-2-ruanjinjie@huawei.com> <1ce09739-14a4-42a2-b5c9-66fdc72ae999@arm.com> <39117062-fa67-2154-3f3f-55c7a1a6a265@huawei.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <39117062-fa67-2154-3f3f-55c7a1a6a265@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_085559_700796_F8EBA18F X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/08/2024 14:36, Jinjie Ruan wrote: >>> +/** >>> + * arch_exit_to_kernel_mode_prepare - Architecture specific final work before >>> + * exit to kernel mode. >>> + */ >>> +static inline void arch_exit_to_kernel_mode_prepare(struct pt_regs *regs); >> Any reason to suffix this function with "prepare"? Just >> arch_exit_to_kernel_mode() seems appropriate (symmetric with >> arch_enter_from_kernel_mode()). > prepare means it is the first function before all other exit_to_kernel > operation in irqentry_exit(), but as the order problem, it can be > adjusted to the last to aligh with the older arm64 version. I understand the rationale, but I don't think this aligns very well with the other hooks - they are generally called after the functions they are called from, without suggesting where they are called (beginning/end of the function). In particular we already have arch_exit_to_user_mode_prepare(), which is named so because it is called from exit_to_user_mode_prepare(). If we use "prepare" as a suffix here, I'm concerned we're confusing rather than clarifying things. Kevin