From patchwork Tue Sep 17 07:31:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13805942 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 DA54DC35FEB for ; Tue, 17 Sep 2024 07:31:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DB396B008A; Tue, 17 Sep 2024 03:31:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 68AE16B0092; Tue, 17 Sep 2024 03:31:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 552A96B0093; Tue, 17 Sep 2024 03:31:44 -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 3A2546B008A for ; Tue, 17 Sep 2024 03:31:44 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BDCA61A01D6 for ; Tue, 17 Sep 2024 07:31:43 +0000 (UTC) X-FDA: 82573410486.28.AAE2687 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf27.hostedemail.com (Postfix) with ESMTP id 24A104000A for ; Tue, 17 Sep 2024 07:31:40 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.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=1726558190; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kf+QKFudpY6BIdljIQcwJegJXtg0lo4RbS3FDlRfCHA=; b=JuvV+UCN9o1CnQDQ/2ogNYPMx7xnLNZkc2oxsTu+GGa4dhi/7JuPHu1m+GXMOGzLHG4MVv 5XYzcpzPfUPakWj6gkJhiS94wgIQ4aiMzPipHwTp8yk8f0rpAjSWIV8Oivp+mBr/zaOLBH EFWFVZ4g6gZhR8MAkxlJKTbHpRfEsNo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726558190; a=rsa-sha256; cv=none; b=wi+qByFlwra3dmcxZ+Dr9wYl/TqTNGQMcVxn8B7RAnUpgwX7TMzY47R20S5tFJDmCVANc4 3y1P8a5NHUJ+j26OcXEveNa9+shH44Tf2MuGBOTmjStYuWQn0O8up6ZgJxkxhQTb4YqGZk YkgbSd+o/rhhWLd4FBht6VUZFxrLaac= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.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 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 D43661063; Tue, 17 Sep 2024 00:32:09 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.61.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B83D53F64C; Tue, 17 Sep 2024 00:31:34 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , 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, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: [PATCH V2 2/7] x86/mm: Drop page table entry address output from pxd_ERROR() Date: Tue, 17 Sep 2024 13:01:12 +0530 Message-Id: <20240917073117.1531207-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240917073117.1531207-1-anshuman.khandual@arm.com> References: <20240917073117.1531207-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 24A104000A X-Stat-Signature: z3d4irnz7tqgxxhrpkyqa77gyg568xbf X-HE-Tag: 1726558300-395841 X-HE-Meta: U2FsdGVkX18Kt0ZsRxWn+SPJ1mMB0+N9HQ1UEqL7nj7sOSbk+J4re8gUpszynxHJfZ5hwBeNrcF5EEAgroexGxX+eL0QW7T49ym2bM4qOmLGK9gToiZxf0ruFnSrfcbKl442uxj69H/auKWwlGiDA6BZglwBYg1hRaQ0ncEGrm3mGW+zOcmnhDWJrZXVmH1IADC3GM5PUSoWBkP3zIJOom21WRqt5fZdeyUVe5wHBPXECvX4TZ3C4JLFgyfNMoKOR17hzkUkATPLrBmFUoqoes/C9OGYUpnWDqn5o2CaO+HZE27OiAVL3DfEpOWLH8CrivxajQKFjLaGdvPvADEIu+FZSqjUinna0r087znmd9ZaH+16mYNsSJgyJVQUZ5aTrnMz1CQO6O+HIqfl4j3kgPxhULKPgEfsaZMe93TTn1fRgyruGnTg6H+8by9BLMHbQIQBkfYyApiMhG57gtoHmKYmFdl6UDEYBZ/bSP+6Dy6UAW0szh83a+3asZPDW42hrYXFkAR7TTdm5jTQ+DFzwtycXSNVMBaGzGNcStinzeYfR/77Fx8PRZ4z3ipCkr3YOlRsH1x6rMsVIuJa86ffbqDLB3Upwv/UrdEijGK9Al/AyeEycWLblfPCCn1m6E92UV5d1wbnLZ2DOGue/EQolRyA5HBJKhfBM46JfBfnCsv+JGEwF86O99lm8SltL1P8EDzhQH9joYqDG+Uw/Qr4XDYbUkjzVZLQbXfX24913NT76SMW4mO9ZUKyo8cHvj+nxc6guyo4rkLvBKf40XeTs/olbyBB/Vg91HrfP9UZQ3Fms/laXmsRg1PBr+4Bxo6Ne3lZbH9LcmpJTvR9vW3CKzymYOY+7+zMJ+S0kYAAzbZrPdQN9yCwSOccHONGD77ko1xl01THWhIxBcQSdJE/Jijj7sRCKVqpn7x/jJ62UxdVL5p09kH53Gc+CN8hoTWlhtcW8LrL8UR5eqfof0/ z8dnRNCA fvX6Vn0WES09ZndLE5l7NQE6Rut9G+zOO3viZUkQbkV6PHiV8ck8yHkSdtLu57i4MatsDxW79/LcFIVrhv+axOg80yD++wshB59RX7aeUD2i5oE1TTVqRF3nBdTOQhqvE4PTmdh21TsK7ju+Qehk8kWBWGsWCiPXwqGp/dDLhO8VpxrPmAZnnQJLFBtS6Qgh4s6T/Uj0loLnfUBpcfteNog6A4Ex9ITTXbOqed+f5ZhjV+IAIy8RS4o8hx+Elj0EbbXkQD/1anbS2TbQ= 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: This drops page table entry address output from all pxd_ERROR() definitions which now matches with other architectures. This also prevents build issues while transitioning into pxdp_get() based page table entry accesses. The mentioned build error is caused with changed macros pxd_ERROR() ends up doing &pxdp_get(pxd) which does not make sense and generates "error: lvalue required as unary '&' operand" warning. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand --- arch/x86/include/asm/pgtable-3level.h | 12 ++++++------ arch/x86/include/asm/pgtable_64.h | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index dabafba957ea..e1fa4dd87753 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h @@ -10,14 +10,14 @@ */ #define pte_ERROR(e) \ - pr_err("%s:%d: bad pte %p(%08lx%08lx)\n", \ - __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low) + pr_err("%s:%d: bad pte (%08lx%08lx)\n", \ + __FILE__, __LINE__, (e).pte_high, (e).pte_low) #define pmd_ERROR(e) \ - pr_err("%s:%d: bad pmd %p(%016Lx)\n", \ - __FILE__, __LINE__, &(e), pmd_val(e)) + pr_err("%s:%d: bad pmd (%016Lx)\n", \ + __FILE__, __LINE__, pmd_val(e)) #define pgd_ERROR(e) \ - pr_err("%s:%d: bad pgd %p(%016Lx)\n", \ - __FILE__, __LINE__, &(e), pgd_val(e)) + pr_err("%s:%d: bad pgd (%016Lx)\n", \ + __FILE__, __LINE__, pgd_val(e)) #define pxx_xchg64(_pxx, _ptr, _val) ({ \ _pxx##val_t *_p = (_pxx##val_t *)_ptr; \ diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 3c4407271d08..4e462c825cab 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -32,24 +32,24 @@ extern void paging_init(void); static inline void sync_initial_page_table(void) { } #define pte_ERROR(e) \ - pr_err("%s:%d: bad pte %p(%016lx)\n", \ - __FILE__, __LINE__, &(e), pte_val(e)) + pr_err("%s:%d: bad pte (%016lx)\n", \ + __FILE__, __LINE__, pte_val(e)) #define pmd_ERROR(e) \ - pr_err("%s:%d: bad pmd %p(%016lx)\n", \ - __FILE__, __LINE__, &(e), pmd_val(e)) + pr_err("%s:%d: bad pmd (%016lx)\n", \ + __FILE__, __LINE__, pmd_val(e)) #define pud_ERROR(e) \ - pr_err("%s:%d: bad pud %p(%016lx)\n", \ - __FILE__, __LINE__, &(e), pud_val(e)) + pr_err("%s:%d: bad pud (%016lx)\n", \ + __FILE__, __LINE__, pud_val(e)) #if CONFIG_PGTABLE_LEVELS >= 5 #define p4d_ERROR(e) \ - pr_err("%s:%d: bad p4d %p(%016lx)\n", \ - __FILE__, __LINE__, &(e), p4d_val(e)) + pr_err("%s:%d: bad p4d (%016lx)\n", \ + __FILE__, __LINE__, p4d_val(e)) #endif #define pgd_ERROR(e) \ - pr_err("%s:%d: bad pgd %p(%016lx)\n", \ - __FILE__, __LINE__, &(e), pgd_val(e)) + pr_err("%s:%d: bad pgd (%016lx)\n", \ + __FILE__, __LINE__, pgd_val(e)) struct mm_struct;