Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1563003pxb; Thu, 28 Oct 2021 06:08:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4XO856GknfbBngNBW1FX2Acu/PMrwISDHlb87/8z5y4FpSwmGHvXQvmO5UWGtgEIdQ6QW X-Received: by 2002:a17:902:aa03:b0:13f:a07e:da04 with SMTP id be3-20020a170902aa0300b0013fa07eda04mr3831815plb.80.1635426531297; Thu, 28 Oct 2021 06:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635426531; cv=none; d=google.com; s=arc-20160816; b=kAN5TBzsL5TIX68yaoVWJlbnnBqfP3qtjx8PnoDXcdlykvurs5TPx8MEzYTHI/S7wu QZCbVCHVq0oY+uc1oM5/XNG8yj//QfXgBpXDlReBMtOOL86K9cqqwwxxh/rvuX7/gSot UFh3TmNqT0wU1PfRArj9NIibwMFRAaRvPbObDGMAztRSI9j6VnC5B9PkNbP1HAlw7mQX oN+J2adZEaGviEuyGAnVYSLpAH12KCO5hIP9ztRwPIg7jQIe4DV1sWts9rTExFQ1dbKc 7QFaGfY4IXPBuSG/p0wC6fRLGynkgqecPDgRGQVsw6CZR6E0fs+WF0b7zDxrfdpPoC3e XK+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=p6WZKk/v0yTe//di6IiagqG1UV2ZrpdQU4uq7qr9DyE=; b=jQWH9/4hONEUSot5/AQ+pekUzIsv3SeA1kXVrsboLGoa3FPrIEeTapdzI0qHv2rmpG BNqqQ9HR+lEvie4SnVn72ovGO0sKDYvk+f+Z0DwIESMzrfMAePKDpMsvEiblw6ySeg0E awdcO3tN3L6JS94wdgIFe5W3Q5dTzG3dgSqDYaGR5bZDQXQkDl3w+RSYA9XWSNpwqvSK tKpPrGvIxlO+Jyc3I/yNhL7w8pRPzn0Zag1FuFb9GTGsQy+WUw6xzQLCCFcTQ+uZu9PA cvnKX6q2I7mSZLwyenYBql1nMjUgbxBHMvQKh7z5rQuEAitoEm3Zl8/0AKHrKHReugC0 PKdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si4064221pgt.382.2021.10.28.06.08.37; Thu, 28 Oct 2021 06:08:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230225AbhJ1NJi (ORCPT + 99 others); Thu, 28 Oct 2021 09:09:38 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:52441 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbhJ1NJh (ORCPT ); Thu, 28 Oct 2021 09:09:37 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4Hg5SF3GNPz9sSx; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tvGwtnYp-lih; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4Hg5SF2TNVz9sSg; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 419078B787; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id eqfnO5qTU4i5; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.232.217]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1353C8B763; Thu, 28 Oct 2021 15:07:09 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1) with ESMTPS id 19SCxHHx195803 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 28 Oct 2021 14:59:17 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1/Submit) id 19SCxFn5195802; Thu, 28 Oct 2021 14:59:15 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kernel test robot Subject: [PATCH] powerpc: Don't provide __kernel_map_pages() without ARCH_SUPPORTS_DEBUG_PAGEALLOC Date: Thu, 28 Oct 2021 14:59:15 +0200 Message-Id: <971b69739ff4746252e711a9845210465c023a9e.1635425947.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1635425954; l=1115; s=20211009; h=from:subject:message-id; bh=LxlwKSgR4iWA1DQx6k6WwBk3KZkX6hJQqb0HjweCiQg=; b=QFpxsaYfvyxKVMiy03gV7TAuhARS2grI6N6AL6sMRvnBlfWWD5yDEpCh4M+QgTXfhuhYFmhli2GY EG/egSvOAmreQ8Me0DTPHFr3LZqLYD7MLCsEX+PXLKdhmCafXxWs X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When ARCH_SUPPORTS_DEBUG_PAGEALLOC is not selected, the user can still select CONFIG_DEBUG_PAGEALLOC in which case __kernel_map_pages() is provided by mm/page_poison.c So only define __kernel_map_pages() when both CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC and CONFIG_DEBUG_PAGEALLOC are defined. Fixes: 68b44f94d637 ("powerpc/booke: Disable STRICT_KERNEL_RWX, DEBUG_PAGEALLOC and KFENCE") Reported-by: kernel test robot Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index dcf5ecca19d9..fde1ed445ca4 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -173,7 +173,7 @@ void mark_rodata_ro(void) } #endif -#ifdef CONFIG_DEBUG_PAGEALLOC +#if defined(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC) && defined(CONFIG_DEBUG_PAGEALLOC) void __kernel_map_pages(struct page *page, int numpages, int enable) { unsigned long addr = (unsigned long)page_address(page); -- 2.31.1