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: vkamensky X-Patchwork-Id: 42851 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8CD1A2055F for ; Wed, 7 Jan 2015 18:47:41 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u14sf973997lbd.3 for ; Wed, 07 Jan 2015 10:47:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :mime-version:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=7KqjSSVHQVXgkeoOBWlKQ4IXhK3MajZnCXHC7+KrtFw=; b=Yu4vXBZODJvK+LSX5qY51YzRvKxoUXFW3zRrGcD8Q/aYIjE7Y0FTTvPscUt7Dg5SM1 j60lEU/dDOZxnPt2VQRn6Pdr5f1Uu+Hfe8A0qvyxiNUG69g1ehcs8HepJJPd5FSW81bp jGsCktjGKz46BhLeqB8QKnRWHcHEpzqY8VHlNt/2FLc0YmIKIJvAMLUMheEdAonllGnT lWcacOF0NE62mrb1onwtGE5YpEG1fI4wx7jyhW7wDEoi+AEq9J41jGE7bGqAzqiZANYu qCnCK1QdpjLjvzJ0FD3gtV1XRFDlRP6rkxEtDsve1ays2Ql+F/cYr3h+xM5BEhnlgJDa hD7g== X-Gm-Message-State: ALoCoQno0wBBewG9bhjMForc0YbNeRCWap1cZ3WIzT41q/tKRTFdd2JOqsDX6DLEJExlXSAYAAlN X-Received: by 10.180.108.101 with SMTP id hj5mr716371wib.3.1420656460286; Wed, 07 Jan 2015 10:47:40 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.40 with SMTP id h8ls213349lah.12.gmail; Wed, 07 Jan 2015 10:47:40 -0800 (PST) X-Received: by 10.112.13.103 with SMTP id g7mr7268966lbc.29.1420656460124; Wed, 07 Jan 2015 10:47:40 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id q2si4334358lbb.130.2015.01.07.10.47.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Jan 2015 10:47:39 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so5208911lab.6 for ; Wed, 07 Jan 2015 10:47:39 -0800 (PST) X-Received: by 10.112.64.35 with SMTP id l3mr7173436lbs.82.1420656459681; Wed, 07 Jan 2015 10:47:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp29185lbb; Wed, 7 Jan 2015 10:47:38 -0800 (PST) X-Received: by 10.68.227.72 with SMTP id ry8mr7644072pbc.101.1420656457920; Wed, 07 Jan 2015 10:47:37 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id pn9si4609196pdb.52.2015.01.07.10.47.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jan 2015 10:47:37 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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-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-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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,