Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3000303ybi; Mon, 17 Jun 2019 14:23:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6HUiHZJDjtrhv7j4kl/WgAlbVQGgFwX6DTWraQ82uRMRHNXmSmcCm/cRknuPdG+W4mFev X-Received: by 2002:a17:902:e20f:: with SMTP id ce15mr3161868plb.112.1560806618638; Mon, 17 Jun 2019 14:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560806618; cv=none; d=google.com; s=arc-20160816; b=RWA0s6QgGlGXWBk0mrnh/aREZdaJk5pKgQlukm0sFdGEFh8RBGORHZ0gVGz2yjt0wW p7BRpCOM8O+ZykGmgGiyJY23AFi4B1muTp/4l2a/k2jeGaxORmoLO3WYPj8yQJZn3kt6 IvOWeO0p2asR6WEJ1cTNwfzoMU/U7nhqb1d7PQ2qfkYGZONA0lx+hPyEPh4sd3Ij0+Jk ySbIgrJnENpyQ7ISEqnB+3/aDop6wwd/wzbufqc0Ax6FLE6k6Vmeacxnz6yxHUWxDOtw eqztX/xWqCFbKYjiJYB4pMIGT9uJXTJoS+bc220Ddk2eJ4LyXptbpFD3ZQGRTLzPVyR1 mtTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=0vExjNkxEaziZ4b4IshyoRz6y0wU5XbZC2yOEd47e48=; b=GhpYzAveD0Q+adRcDhEEMrcSuaXgFMxaPrux8UG000iJVkI6CIykPbIVtyaB2+uLvb 75+pCkwa4j6Pd5FRtE7hWKLGc5urkiTenbLyE3vFnHCZFqF69fgKjWprCWzFYAwxb6LC iPj4DNXsupRkwoWBiKCT3rHiGAznwMS5ZHaI3GCkGJB2t+y/Lyh6TKtLJTf9xFnqHys4 lo5fUPh3ewZT1ONalVblGgxL3EPuggOndznqCMv4CV461nH1e1NN2nzDx312EiCPtv2a x5SBdAKk4zfn9Xno7J5oueKQ+AfoDl1cnHtCbcyHaj2DPCdizAkGgl4V7iTebQKN3EcC HCzg== ARC-Authentication-Results: i=1; mx.google.com; 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 s37si316953pjb.16.2019.06.17.14.23.23; Mon, 17 Jun 2019 14:23:38 -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; 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 S1729566AbfFQVWe (ORCPT + 99 others); Mon, 17 Jun 2019 17:22:34 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:51939 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729135AbfFQVW0 (ORCPT ); Mon, 17 Jun 2019 17:22:26 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45SPLR482Fz1rWT1; Mon, 17 Jun 2019 23:22:23 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45SPLR3Sk9z1qql7; Mon, 17 Jun 2019 23:22:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Ofi2Vk0dQod8; Mon, 17 Jun 2019 23:22:22 +0200 (CEST) X-Auth-Info: kxoQWfsuvJNGfuKCoxPyz8lu9v+YflcEBGhwLMkqB17xmmElfILuca/iqbizjt6/ Received: from igel.home (ppp-46-244-166-202.dynamic.mnet-online.de [46.244.166.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 17 Jun 2019 23:22:22 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 852962C1101; Mon, 17 Jun 2019 23:22:20 +0200 (CEST) From: Andreas Schwab To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , j.neuschaefer@gmx.net, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/mm/32s: fix condition that is always true References: <1e412310cc18ea654fb2ce4c935654d8d1069f27.1550775950.git.christophe.leroy@c-s.fr> X-Yow: .. I have a VISION! It's a RANCID double-FISHWICH on an ENRICHED BUN!! Date: Mon, 17 Jun 2019 23:22:20 +0200 In-Reply-To: <1e412310cc18ea654fb2ce4c935654d8d1069f27.1550775950.git.christophe.leroy@c-s.fr> (Christophe Leroy's message of "Thu, 21 Feb 2019 19:08:49 +0000 (UTC)") Message-ID: <87muif52lv.fsf_-_@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move a misplaced paren that makes the condition always true. Fixes: 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX") Signed-off-by: Andreas Schwab --- 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 d53188dee18f..35cb96cfc258 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -360,7 +360,7 @@ void mark_initmem_nx(void) unsigned long numpages = PFN_UP((unsigned long)_einittext) - PFN_DOWN((unsigned long)_sinittext); - if (v_block_mapped((unsigned long)_stext) + 1) + if (v_block_mapped((unsigned long)_stext + 1)) mmu_mark_initmem_nx(); else change_page_attr(page, numpages, PAGE_KERNEL); -- 2.22.0 -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."