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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C38CF58F5 for ; Fri, 20 Sep 2024 09:27:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2BEC46B0082; Fri, 20 Sep 2024 05:27:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26DE26B0083; Fri, 20 Sep 2024 05:27:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15DAC6B0085; Fri, 20 Sep 2024 05:27:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EBFB36B0082 for ; Fri, 20 Sep 2024 05:27:36 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 944E1C018B for ; Fri, 20 Sep 2024 09:27:36 +0000 (UTC) X-FDA: 82584588912.05.3EDB3EA Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf20.hostedemail.com (Postfix) with ESMTP id A69851C0008 for ; Fri, 20 Sep 2024 09:27:34 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726824396; a=rsa-sha256; cv=none; b=E6ayYc7F5rJoXfyQsbTvMRkOW9HFzKhjr7aP8NgxnslT7Qd/9v9xFS1g10y+8mtkd7+ygC 9R/TUJrzdzy1ref3jyPh0EQGG8ph3esx4a5vBzdhZc22apzhdfBXsMGGbnKu3HVqWHjls1 1U5cZbUz/PsNq1NejfnErm8/uxngI94= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726824396; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=est1y7Occ9ZKiNdVS83pw2PlPfjLmbTPZr0TMD/o1qA=; b=mtUFHmvvBbOoSiWy5qsAzdS+8lYwRW4vCY69p93rV77B7tTAxtSVCRplZGlKTAzEWV49do YWM2F8Q8rMYOBYVtkzh4z6z5RW620qCpQNNKmE8u38qzPCJssQq64vDDni7ypDnV/wQWw+ pYvrYHoprZlnZlaFQPflwrUfqdfo6+o= 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 24B7E1007; Fri, 20 Sep 2024 02:28:03 -0700 (PDT) Received: from [10.163.35.184] (unknown [10.163.35.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C21993F66E; Fri, 20 Sep 2024 02:27:27 -0700 (PDT) Message-ID: <89806be0-c95d-4a85-a8da-a253aea68093@arm.com> Date: Fri, 20 Sep 2024 14:57:25 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: Move set_pxd_safe() helpers from generic to platform To: Dave Hansen , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Paul Walmsley , Palmer Dabbelt , Thomas Gleixner , Dave Hansen , David Hildenbrand , Ryan Roberts , x86@kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240920053017.2514920-1-anshuman.khandual@arm.com> <3309e9ca-458b-4b10-8409-9fe315b60ae2@intel.com> <925a26e2-bd53-4bf4-b22d-7a0e11581376@arm.com> <2924c274-2b01-4b33-87e7-5b66aceba3b0@intel.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <2924c274-2b01-4b33-87e7-5b66aceba3b0@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: 1ecgpzjqacfrc7iwon8jkza7gc4knw6o X-Rspamd-Queue-Id: A69851C0008 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1726824454-391775 X-HE-Meta: U2FsdGVkX1+ZAE8UlUBwzHI87s/j4iMu4PBVdvRexFenCWrCAMcS6gGQ/C5pPFmnBAIApp5160tjB7pMO6ZAdH1dJsbpOEf1bBNKQDeZjfuMC1hPzqOhzwVXi7VxOAKV+emD+9+33pazl0a/g4AmIVa9Fh02qT7sSy/okA3FfSUmL/OU3UrLXQSfKaPbsxK02KuzYkzEKxAyj90PMUuFjMnEh5+TQzNIXeZj3QcEg+CtJLStofznVk+eNkYHRfHk1BC7lT1pxyfiLyroEwRxnk4pef4dDvPUJNX52n4ymPWi/YpJSq66J90HuRqASdLEUUP2GgxOTH7hqDoy7AzvAJKMRF0Ia1RIA8Xn/5exMjwtx1pc71O3BBt0zsh0uL5AzCxC/y6uFPhFgrCtZVFXX1YDZh0JADnYrgynSc8SsN4JPRinb9EX8toBWMYn8/imPRCs45Up9WtryCF4PwXgTO8ik9C4cEyal5AOlWctYB9nED8nQNRfcVRg5Xb4EUgIFgjlMBVOVvlLYYkv1K0PkHcXT9HhYnUmCsUJL79t7CUfOX9YJL/Lo3FnqD/x38fZZFGzRkFPtgBEgqYHoR360ILItw8JFel4GjLdJT/4SKp+x62s6OfNIiTCVyIiXgNZ5XyCkSc17MyD0IaGb5lYPW2vZs3BjtWiOu7YsBrj8yPvwhES1sAht6HfNMacAPUQYnUt/zrvFDFVFR+06MalmjtYDeo8rB8sLMC37GtG7veAL/TF+nSm1dKaUhiXqErWGnwTCAtNBsgyXWQyTZ4rITd6qAe5jOn1Vsvq4HQSfcqrJJigdbtgsDezbiiPjPohUwlOH+eMBk/Ng0wa3v+ZpXSo+y+nR8LOoG+BcDtLmJ2A8TcFh9NEcujpryhE0yy0Vp0WrVasKOU175arpxvAW9yAZdvYN9m5PsvB4yu1oFdr/svRt3z2iLhDV+Muwoz/cS89d1vqqtARWRHZvlX 0KYoJU23 sExV+rU6Qu7GLVGrOW4URNRFluWrD+adJFRxRBkfCX74sYVQ0Upt0cVT0IIGvzNUk+HBNdEoYXLeDKKaTj6Po3JLyJRCVwsdgTwGqsICANfNyUR2pChA1bWAWFHzxXjJW6Pp0c9ti1qQp9cHwwO40Qd8OsWX6tvri76R5ItcKP5XgmusQH+0javU+M7DIDck27mT3 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 9/20/24 14:22, Dave Hansen wrote: > On 9/19/24 23:42, Anshuman Khandual wrote: >>> I just did a quick grep and don't see any difference between the _safe >>> and normal variants. A quick grep didn't turn up any actual users. >>> >>> Did anyone actually double check that these are still needed on x86 in >>> the first place? >> arch/x86/mm/init_64.c > > Ahh, the #defines make them immune to grep. :) > > Long-term, we should make sure these are still necessary. Short term Agreed, David H has also mentioned about that. > (in this patch), please just put the #defines in init_64.c if it is the > only site that needs them. That is not the only site where they get used. set_pmd/pud/p4d/pgd_safe() are also called from respective pmd/pud/p4d/pgd_populate_safe() helpers in the header arch/x86/include/asm/pgalloc.h. Besides also hit a road block in converting these macros as static inline functions as suggested by David H earlier, because pmd/pud/p4d/pgd_same() macros are defined in include/linux/pgtable.h, way after gets included. I guess we will have just leave these macros is in arch/x86/include/asm/pgtable.h