From patchwork Wed Jan 7 18:06:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 426371 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 950791400B7 for ; Thu, 8 Jan 2015 05:49:14 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8vbz-0006gy-3T; Wed, 07 Jan 2015 18:45:43 +0000 Received: from mail-pa0-f52.google.com ([209.85.220.52]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8v0X-0000Su-Jm for linux-arm-kernel@lists.infradead.org; Wed, 07 Jan 2015 18:07:02 +0000 Received: by mail-pa0-f52.google.com with SMTP id eu11so6276660pac.11 for ; Wed, 07 Jan 2015 10:06:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=kBuQ/8P43eVXTtzjw+yaW5HE3KVq0KvWygRzOds0rec=; b=PNxQoRNTOQcn/JsCP6kXcsbC+B9pNcZM6aoH0G9UzNvafUSluP33rcMJozonRQvZXQ mDtd1n9U7fRxA9Avhc2vnGC0T3rI4+kryztKIrbh4BUo8BjOxAALGUDricl5ha5X0W+7 c1KvprQEr3cL5n93Yq6q8rExkGOe7oDWybzrBb6uJH09IMqQQeuWevSWls0hkaaiDujL qTUX8aCXvNTXd+NBakO6KDc20GpcWbqDpUR701ZR1Ry55GTjqFh9x8UtAGJR2nTi2Fhu zHD8J4ZzXnE/lStsFCNyWK2uuauLTbF5+eOG14C7o8Y8VAVueqwg+KJpHJDNf6RrxQ8N vwSA== X-Gm-Message-State: ALoCoQnQ/f3kr3PRD/57h3Etwe65eWIKzd5GZeqhN1ohqXMX/SbxA+FSaKzlKTDrwaBXqZlJlyl4 X-Received: by 10.68.132.42 with SMTP id or10mr7644360pbb.162.1420653996986; Wed, 07 Jan 2015 10:06:36 -0800 (PST) Received: from kamensky-w530.cisco.com (128-107-239-233.cisco.com. [128.107.239.233]) by mx.google.com with ESMTPSA id c9sm2411183pdj.52.2015.01.07.10.06.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jan 2015 10:06:36 -0800 (PST) From: Victor Kamensky To: linux-arm-kernel@lists.infradead.org, Kees Cook , Steve Capper , linux@arm.linux.org.uk Subject: [PATCH] ARM: mm: fix PMD_SECT_RDONLY undeclared compile error Date: Wed, 7 Jan 2015 10:06:09 -0800 Message-Id: <1420653969-4048-1-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150107_100701_713181_E362AF10 X-CRM114-Status: GOOD ( 10.19 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.220.52 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: nicolas.pitre@linaro.org, Victor Kamensky , will.deacon@arm.com, Victor Kamensky X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Victor Kamensky In v3.19-rc3 tree when CONFIG_ARM_LPAE and CONFIG_DEBUG_RODATA are enabled image failed to compile with the following error: arch/arm/mm/init.c:661:14: error: ‘PMD_SECT_RDONLY’ undeclared here (not in a function) It seems that '80d6b0c ARM: mm: allow text and rodata sections to be read-only' and 'ded9477 ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE' commits crossed. 80d6b0c uses PMD_SECT_RDONLY macro but ded9477 renames it and uses software bits L_PMD_SECT_RDONLY instead. Fix is to use L_PMD_SECT_RDONLY instead PMD_SECT_RDONLY as ded9477 does in another places. Signed-off-by: Victor Kamensky Acked-by: Will Deacon --- arch/arm/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 98ad9c7..2495c8c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -658,8 +658,8 @@ static struct section_perm ro_perms[] = { .start = (unsigned long)_stext, .end = (unsigned long)__init_begin, #ifdef CONFIG_ARM_LPAE - .mask = ~PMD_SECT_RDONLY, - .prot = PMD_SECT_RDONLY, + .mask = ~L_PMD_SECT_RDONLY, + .prot = L_PMD_SECT_RDONLY, #else .mask = ~(PMD_SECT_APX | PMD_SECT_AP_WRITE), .prot = PMD_SECT_APX | PMD_SECT_AP_WRITE,