Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp757098ybl; Wed, 14 Aug 2019 05:37:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFdOc5z+Lk5I32cgLZcSKTAhp3NhbkXnaY0FCRQiBSy4leHrMAmkkifmm4kagXcWnRASm0 X-Received: by 2002:a17:90a:30ad:: with SMTP id h42mr6913476pjb.31.1565786231081; Wed, 14 Aug 2019 05:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565786231; cv=none; d=google.com; s=arc-20160816; b=hKvFCY+FTPm/D6xB+suJNnYSew0i36lzQpG6xEt9VrHv7iAFT6eZ0rD0l1ISRmiatK cG3T3o2rgdt9OmxFpB9yq0Litld2uVXKVTtI8heGAnDlNcPrQ6Nu144jstufnTc4sL9H 43vnMS8ErXeSbjKWtiVBcsNoTpbS2+5vr49x0YMF0ag0DJ9WtRe5TAsWStSr+lMkDSd2 ciAiTOKqStroxsyiExKDzrkfPfFZKxg9r0AKpbPRZTDTwCA31TwNSOVu8eu3Lb1fmhKq zOxLnVddiv+stjXLoCphx8xTFF4D3OyHeC17GNgv+SiY17WsZOJFdCYh6xy3mCQUjRyz CQlQ== 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:references :in-reply-to:message-id:dkim-signature; bh=FQUyM6c7VYcuMFXgP9DLplR+JJixkhgbCHgFtfjWXKI=; b=Wa9b/Ko50UXMZTqZiN/dX79PYVsW67ilN0ijN+TE7ui4AQOlCi7vAy3I8YarxT5z46 BAK3Xrsn2GOEonVUWUuRJMQSfLeMrYqrFtZ5XHtDMAW83FjxGGQCDfY/4mDmel7v71vj 5/Bule//MuhB/5fvM6Nd1HfR8cFiZtwK2GRCROonw6IV4CmHAhpyqTd4TLyB7LSgxhz4 C00ZBUgdjSffMpLOW9iUpPqKEUM/gSoGf6QbLiaMqS1Dp0hizJlUgEHnGMrOrFltlpup jx2jcdsE5yHkBlxHcOgt4GJxhbEFFbgzFodhqn/J4GiEnsSqneFksarj79qSVo2/9M9T kk3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=M1CfgpGd; 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 t26si12042674pfh.275.2019.08.14.05.36.55; Wed, 14 Aug 2019 05:37:11 -0700 (PDT) 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=M1CfgpGd; 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 S1727819AbfHNMgR (ORCPT + 99 others); Wed, 14 Aug 2019 08:36:17 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:8398 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726575AbfHNMgO (ORCPT ); Wed, 14 Aug 2019 08:36:14 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 467pwW3NxJz9v0QX; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=M1CfgpGd; 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 zL9cEQFFkHXo; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) 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 467pwW2Fkdz9v0dJ; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1565786171; bh=FQUyM6c7VYcuMFXgP9DLplR+JJixkhgbCHgFtfjWXKI=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=M1CfgpGd+59YMGG2W3jHT6lt4augCL1HrXFI/qdUfyYvag/qTpQyDcKVJgtXrTS6L mVkfJj+eOkxRDJjD4VLoe8cKv2cfrAXT9bKnPipM2Wb0+o+kDKKk7nii3PhS2gBfMa gH96bfUKLqnLxpO5/sOuCeT+0HZ/zb33ek0OYUdY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CCCA58B7F5; Wed, 14 Aug 2019 14:36:12 +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 T43b992SB-7o; Wed, 14 Aug 2019 14:36:12 +0200 (CEST) Received: from pc17473vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AF41D8B761; Wed, 14 Aug 2019 14:36:12 +0200 (CEST) Received: by pc17473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id A92906B6C0; Wed, 14 Aug 2019 12:36:12 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 4/5] powerpc/ptdump: get out of note_prot_wx() when CONFIG_PPC_DEBUG_WX is not selected. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Wed, 14 Aug 2019 12:36:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PPC_DEBUG_WX, note_prot_wx() is useless. Get out of it early and inconditionnally in that case, so that GCC can kick all the code out. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ptdump/ptdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index 9a2186c133e6..ab6a572202b4 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -177,7 +177,7 @@ static void dump_addr(struct pg_state *st, unsigned long addr) static void note_prot_wx(struct pg_state *st, unsigned long addr) { - if (!st->check_wx) + if (!IS_ENABLED(CONFIG_PPC_DEBUG_WX) || !st->check_wx) return; if (!((st->current_flags & pgprot_val(PAGE_KERNEL_X)) == pgprot_val(PAGE_KERNEL_X))) -- 2.13.3