Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp422085ybl; Fri, 10 Jan 2020 00:46:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwUrnbbTQfQftpimEy1Cw3SxV63Ec0EIpOLQltlbqZVO5NeBkSkQxrZGPr4nUTjCPciHI8i X-Received: by 2002:a9d:6557:: with SMTP id q23mr1561971otl.368.1578645964367; Fri, 10 Jan 2020 00:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578645964; cv=none; d=google.com; s=arc-20160816; b=mALMAkTmFef4FfZyVOZIRBFWS0vdXLC9MzKGA9HpDqkSFgh34U1wUg1Eln73zZoKS2 UfNxkT+rTZexRCTliELekh6riwYt8R46nAzVfcZUZknOi41QiIvDpDmZCsNC/Ou/Fndh yFVpVKa4dLTWybkoOLrcwQQ9qLu+6CgnFSTQnkb+yrweMj3nPa0v3GmhA1/J53ntVFo/ uZvW3yKk094NcE/Gz0IO9vq2xYxQRLpGxl7dz6Hdg87cm4HSERuHRYyPHgBUa508aNty n+N793NdAuuoqFgp/MxP9cVGdhK5eS7LBtE2iBSalk1f8KgO1rTxDIqB1CIn3ZDcJ6xg 7zlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=X4bhvXuqtswvV10n057izmhqNVRm8lbtqjvUU8z28JI=; b=fq74BWoBdXainXiFgbeaamArCfH/vlpuvF5Bi02JY2iuWqMDneMqVWxnpBipa+10Vp LImTwFfn0j815qUA5i4hs0XTIyClPcmfczWEbLAlAGO3fgiEcu6Q7qi4LVMuxRHhHpyx g48Mo2+yQmpgsoIPoygrtP03s2VhEwXh4oX6mlajTlWrRCAljR54ZQv9qlxfqR1i81OM 6kdrwNbQ9j95brut6TL0749YI7A3RFvLkgKHNP8YGbeaPAxrR/Ib6q8MuYGEcArl/JHi Kc2/odZoC0KpkOjkM2m9XD6Y1aeLftfhqs71z+cbJL7dYn/CK5kWOxztO3yqGRUdpp+V JPhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ODEtV2P7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si689493otp.107.2020.01.10.00.45.52; Fri, 10 Jan 2020 00:46:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ODEtV2P7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbgAJIo7 (ORCPT + 99 others); Fri, 10 Jan 2020 03:44:59 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:15671 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727105AbgAJIo6 (ORCPT ); Fri, 10 Jan 2020 03:44:58 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 47vGkv6r8mz9v3lj; Fri, 10 Jan 2020 09:44:55 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=ODEtV2P7; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id PTbvLHgRYo7m; Fri, 10 Jan 2020 09:44:55 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47vGkv5VdMz9v3lg; Fri, 10 Jan 2020 09:44:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1578645895; bh=X4bhvXuqtswvV10n057izmhqNVRm8lbtqjvUU8z28JI=; h=From:Subject:To:Cc:Date:From; b=ODEtV2P7aOXi6VbY2+nbMaTviixfpCJAbAkRSdMoBNFPzskw3hDJHUWmfIr/hnH0Q 1pUnVcOYnvgG+AcZiV5ocD6nQ4poII4hUhkIvgTj7uufYnZaKkapVbfopwhqwTxthk HC3TQPmPyXieW2HjqnJ1vAKAXfleZLuFcCl6f50g= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C65B28B781; Fri, 10 Jan 2020 09:44:56 +0100 (CET) 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 6LX6hgl553vk; Fri, 10 Jan 2020 09:44:56 +0100 (CET) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.102]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9D75C8B755; Fri, 10 Jan 2020 09:44:56 +0100 (CET) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 6040563B90; Fri, 10 Jan 2020 08:44:56 +0000 (UTC) Message-Id: <176774c19b0398634e004835b9515c93030d326f.1578645835.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH] powerpc/ptdump: don't entirely rebuild kernel when selecting CONFIG_PPC_DEBUG_WX To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 10 Jan 2020 08:44:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Selecting CONFIG_PPC_DEBUG_WX only impacts ptdump and pgtable_32/64 init calls. Declaring related functions in asm/pgtable.h implies rebuilding almost everything. Move ptdump_check_wx() declaration in a new dedicated header file. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable.h | 6 ------ arch/powerpc/include/asm/ptdump.h | 15 +++++++++++++++ arch/powerpc/mm/pgtable_32.c | 1 + arch/powerpc/mm/pgtable_64.c | 1 + arch/powerpc/mm/ptdump/ptdump.c | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 arch/powerpc/include/asm/ptdump.h diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 0e4ec8cc37b7..8cc543ed114c 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -94,12 +94,6 @@ void mark_initmem_nx(void); static inline void mark_initmem_nx(void) { } #endif -#ifdef CONFIG_PPC_DEBUG_WX -void ptdump_check_wx(void); -#else -static inline void ptdump_check_wx(void) { } -#endif - /* * When used, PTE_FRAG_NR is defined in subarch pgtable.h * so we are sure it is included when arriving here. diff --git a/arch/powerpc/include/asm/ptdump.h b/arch/powerpc/include/asm/ptdump.h new file mode 100644 index 000000000000..246b92c21729 --- /dev/null +++ b/arch/powerpc/include/asm/ptdump.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_POWERPC_PTDUMP_H +#define _ASM_POWERPC_PTDUMP_H + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_PPC_DEBUG_WX +void ptdump_check_wx(void); +#else +static inline void ptdump_check_wx(void) { } +#endif + +#endif /* __ASSEMBLY__ */ + +#endif /* _ASM_POWERPC_PTDUMP_H */ diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 73b84166d06a..6c866f1b1eeb 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -29,6 +29,7 @@ #include #include #include +#include #include diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index e78832dce7bb..3686cd887c2f 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -45,6 +45,7 @@ #include #include #include +#include #include diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index 2f9ddc29c535..d7b02bcd0691 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "ptdump.h" -- 2.13.3