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 99AF0CE8D5D for ; Thu, 19 Sep 2024 07:55:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F2B6E6B0082; Thu, 19 Sep 2024 03:55:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDBC46B0083; Thu, 19 Sep 2024 03:55:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA39B6B0085; Thu, 19 Sep 2024 03:55:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id BC7316B0082 for ; Thu, 19 Sep 2024 03:55:23 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 46729809A9 for ; Thu, 19 Sep 2024 07:55:23 +0000 (UTC) X-FDA: 82580727726.25.049BA72 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf02.hostedemail.com (Postfix) with ESMTP id 8E9258000F for ; Thu, 19 Sep 2024 07:55:20 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726732510; a=rsa-sha256; cv=none; b=Og+TW9T6qYzteSpyxJ4qohlgIK6kHV+RCKCMddiDLOY2oWgQ0xWAUrofK+uX8wPrLugsNL mknmJpGWYln28rEpl46+CjX4pRVtz4+q4tKSBow+NXAEevSX4ImDd0ZgmwhUvFvp5siXsl aeS8cM+WNyAw6bpOH+zOwwSfEyY16Wc= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726732510; 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=00GyeIpQiVrRLmk5/aXY8FNlHVW8nZ/1kuIlcJVwo48=; b=zRMK9CoVZ5as7bx1Yy67dC3hxMR8pu/rCVL5W7sYXl+opt6nlzGAqFYYhueOjtc7LeCBlf KBxsyQaS5/F0goYo2MkWAXawM+JbfL2g74E3/Vd92Of/Mo7zaIBvP4m8CXbRp38y5Ao8SM NQ87vmcvE32PJsp6PTl9YTC1i2uIy50= 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 157351007; Thu, 19 Sep 2024 00:55:49 -0700 (PDT) Received: from [10.163.34.169] (unknown [10.163.34.169]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1D82B3F71A; Thu, 19 Sep 2024 00:55:10 -0700 (PDT) Message-ID: <8f43251a-5418-4c54-a9b0-29a6e9edd879@arm.com> Date: Thu, 19 Sep 2024 13:25:08 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 7/7] mm: Use pgdp_get() for accessing PGD entries To: kernel test robot , linux-mm@kvack.org, "Russell King (Oracle)" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , David Hildenbrand , Ryan Roberts , "Mike Rapoport (IBM)" , Arnd Bergmann , x86@kernel.org, linux-m68k@lists.linux-m68k.org, linux-fsdevel@vger.kernel.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Dimitri Sivanich , Alexander Viro , Muchun Song , Andrey Ryabinin , Miaohe Lin , Dennis Zhou , Tejun Heo , Christoph Lameter , Uladzislau Rezki , Christoph Hellwig References: <20240917073117.1531207-8-anshuman.khandual@arm.com> <202409190310.ViHBRe12-lkp@intel.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <202409190310.ViHBRe12-lkp@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: c6syq984upuu8yec98wu43mzqopju9o4 X-Rspamd-Queue-Id: 8E9258000F X-Rspamd-Server: rspam02 X-HE-Tag: 1726732520-435338 X-HE-Meta: U2FsdGVkX1/iV7xBauXhSRE+K9seXBUv/iVZZ0XMm7pEiNSQ5e+moTT74CtSwBmSLN8auhjlBSx3lRnpK4FkOMLycSu3MRvsDITeQC1WYF2M09sajsYZGDNCQhZ8nXzBm2JFGTbigsdA5Fyx7V617a095lVszpeAg2w23nkP3yuCdbdFUzPVt307OzIqE4hk65B9vbjdFE5NvEitKNJvysmEBs6/swGBShGleKFzdC2fZCTGnJkj4n62Qtv42PvqqkBVBhuI9ateu6U/dPlk1/bUZsEaftG5Zjc+ik5DCe5YjfKh0LPcOLX7UXFMPiUJY/ro/M3w2erP/J6PUtDlyW308zxXmK5ETqrtQxU3GxxlTQYyh5pI48Im3UAFnJtNz1JZQFm8P9FB9Pssi66V6aAKuqPPg2YDQoGUymZ6TCJdk+VtMnB1PdqA+fzDaiJQj/q6xN08r58cNel9SsqifnyCUkY5vzo9DGI8W/kvuW6uACoIzBOBYYl3OD2YxaZLLhhhNXHW+zr6M8BGVW7UlzOxw5fqXPtRRL+aGP/DRBIVO35PDV7sBoH26S5zHWZelXI6shXE2JdBvh5NB21Ui1N/+8fZ5byhGbN3+bmCkQMfJcHOX8rwcNXSEe94Qlm5apY7mz2XcZtc2pmpgOeXrrdp8aLXyMLFQCeDZiAP0bVoBsB+imF0R7E5ekO12IXNSaMqZb15JI7PIugWqZVgislz8rcJ7gemYy81gOULC4ICzeBj6g+6ksy0cvCF0LXpA0vdsWVANMdChzgqBYWjVu2N4g0tg8psHDSTliKnYHjmQi0gRJTTncdv41wyi03Mytv9y9NC/paFamrWbLxy+WNFmxOfQaHqAyCAw9ziImlWuMqLYvrPlxYABVPnUIzxd7QtbSfumx4O7sJY2jsZD4+mrooxgMbMo05fMe2F+sAKJSaz5MAJhOjzDTsDDzJtxNAA62sAMmSwlWYRb48 AQk7VfT1 mJEs3qDsQVO+5WlGLpoRzckxDT3QE5TFpA/XUkat1J/wVoedDqie06+Xs4PsnKs15gymi6PJDTnODG+lZ5fN2tPzltaRhXw5MZKZ0qOMsYcgVPnIMCysLnRAmrLizZW25lQPqIUP7NpzHls3qJ7vul6OT6rwUaXXUkruYGC4ge3dLhPylO/atz+UvWqY9wK/Es6w93Ndcg6DvfwheEzraiQIduFN2MF2KIQJy5xHTO0ovHcgFkDHHFYwc7wfX9TJjwtQqP6iheKlPAgbhMiykrneSu5JupLCAnx5yIu+LJ0QqfJ+UMRkzVQdoqwmv/QOmHnWZeXwKLL3pfrDNXI815Zq5AKS54nl6DKXH4L/b9mA94xF2P0KBLNrWfBZb4dAO9Q8xm0h/iXl6dS/mXjk7e8KETpNCnjuJjeqbPTkBFzY9CKrPcJPuHPZQCEDNV4tVS4+2JVn6UDf8O3whjeGbVHCKwqr6m/gYUF1j 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/19/24 02:00, kernel test robot wrote: > Hi Anshuman, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on char-misc/char-misc-testing] > [also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus brauner-vfs/vfs.all dennis-percpu/for-next linus/master v6.11] > [cannot apply to akpm-mm/mm-everything next-20240918] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/m68k-mm-Change-pmd_val/20240917-153331 > base: char-misc/char-misc-testing > patch link: https://lore.kernel.org/r/20240917073117.1531207-8-anshuman.khandual%40arm.com > patch subject: [PATCH V2 7/7] mm: Use pgdp_get() for accessing PGD entries > config: arm-footbridge_defconfig (https://download.01.org/0day-ci/archive/20240919/202409190310.ViHBRe12-lkp@intel.com/config) > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240919/202409190310.ViHBRe12-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202409190310.ViHBRe12-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > In file included from arch/arm/kernel/asm-offsets.c:12: > In file included from include/linux/mm.h:30: >>> include/linux/pgtable.h:1245:18: error: use of undeclared identifier 'pgdp'; did you mean 'pgd'? > 1245 | pgd_t old_pgd = pgdp_get(pgd); > | ^ > arch/arm/include/asm/pgtable.h:154:36: note: expanded from macro 'pgdp_get' > 154 | #define pgdp_get(pgpd) READ_ONCE(*pgdp) > | ^ > include/linux/pgtable.h:1243:48: note: 'pgd' declared here > 1243 | static inline int pgd_none_or_clear_bad(pgd_t *pgd) > | ^ arm (32) platform currently overrides pgdp_get() helper in the platform but defines that like the exact same version as the generic one, albeit with a typo which can be fixed with something like this. diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index be91e376df79..aedb32d49c2a 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -151,7 +151,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; -#define pgdp_get(pgpd) READ_ONCE(*pgdp) +#define pgdp_get(pgdp) READ_ONCE(*pgdp) #define pud_page(pud) pmd_page(__pmd(pud_val(pud))) #define pud_write(pud) pmd_write(__pmd(pud_val(pud))) Regardless there is another problem here. On arm platform there are multiple pgd_t definitions available depending on various configs but some are arrays instead of a single data element, although platform pgdp_get() helper remains the same for all. arch/arm/include/asm/page-nommu.h:typedef unsigned long pgd_t[2]; arch/arm/include/asm/pgtable-2level-types.h:typedef struct { pmdval_t pgd[2]; } pgd_t; arch/arm/include/asm/pgtable-2level-types.h:typedef pmdval_t pgd_t[2]; arch/arm/include/asm/pgtable-3level-types.h:typedef struct { pgdval_t pgd; } pgd_t; arch/arm/include/asm/pgtable-3level-types.h:typedef pgdval_t pgd_t; I guess it might need different pgdp_get() variants depending applicable pgd_t definition. Will continue looking into this further but meanwhile copied Russel King in case he might be able to give some direction.