From patchwork Wed Oct 30 12:46:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 3114531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D90FDBF924 for ; Wed, 30 Oct 2013 12:47:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4255A201CD for ; Wed, 30 Oct 2013 12:47:19 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BD43201BE for ; Wed, 30 Oct 2013 12:47:14 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbVAw-0002Is-Il; Wed, 30 Oct 2013 12:47:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbVAu-0003kq-4o; Wed, 30 Oct 2013 12:47:04 +0000 Received: from mail-ea0-f182.google.com ([209.85.215.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbVAp-0003jv-T0 for linux-arm-kernel@lists.infradead.org; Wed, 30 Oct 2013 12:47:00 +0000 Received: by mail-ea0-f182.google.com with SMTP id o10so630278eaj.27 for ; Wed, 30 Oct 2013 05:46:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :content-type; bh=TUGVZDoyKLJHN7Hia04mRNcY7HqF+lV4kEcv5ssl5b0=; b=nMeTEyZ9Saoxpl0Wme/vtdeA8+Zy004wvGspwjulih8Vw99WnU185/ekxArr6hMpPO iNLzQiiBRZbvM6nN30rrreCDncLFc6YudbI89k0bwPgb3EyfZBXuDxScKw+ril0Lyx8/ uOZrrxAa19pSuJ6UaOhhAcpOkzcLrdSVvMo4tLgtP+6yNGgoB60oNlmy2IOSl2gzJz72 G64x1XT2jxdTHYaXc7T1r+3hTb2vYLFbqIl4v8CP862DIBQWB2O5/zDcjAqzofYF72I7 LabKTFew2oDPyYawGY6gIsigBAD53eHsVrIVdtqhPH8dadgDj6Nursnua1Is3dYzBBYX 7LbA== X-Gm-Message-State: ALoCoQl8ILeK3S33uHz0c+GecIVgLiES7ooJy+qjZYnLpq1ptpd5Ys/snrDOyH9j9BKN7ktyCBFf X-Received: by 10.14.216.136 with SMTP id g8mr2119867eep.61.1383137189782; Wed, 30 Oct 2013 05:46:29 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id m54sm83130682eex.2.2013.10.30.05.46.28 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 05:46:29 -0700 (PDT) From: Michal Simek To: Russell King Subject: [PATCH] ARM: mm: Fix ECC mem policy printk Date: Wed, 30 Oct 2013 13:46:18 +0100 Message-Id: <8986e8f1a3761e45a7927bdb0e54393c9155e6bf.1383137171.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131030_084700_046001_01579DE1 X-CRM114-Status: GOOD ( 16.61 ) X-Spam-Score: -1.9 (-) Cc: monstr@monstr.eu, Nicolas Pitre , Will Deacon , linux-kernel@vger.kernel.org, Vitaly Andrianov , Cyril Chemparathy , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ECC policy can be applied to the whole system when this bit is implemented by SoC vendor (IMP - bit 9 - in L1 page table entry format). When this bit is not implemented by SoC vendor it doesn't mean that system has no other way how to do ECC. This patch ensures to show this message only when ECC is requested via cmd line ecc=on and runs on appropriate ARM core. Signed-off-by: Michal Simek --- Russell, Will: We discussed this at KS that will be good to rephrase it or have different logic around this. I am not sure if we can also test that this bit is implemented by particular SoC or not. Maybe logic should be that if SoC uses this bit that message is shown in origin format to declare that ECC is enabled or disabled. When SoC doesn't implement it then do not show this message. --- arch/arm/mm/mmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.8.2.3 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b1d17ee..1b88ce3 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -556,8 +556,9 @@ static void __init build_mem_type_table(void) mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; break; } - printk("Memory policy: ECC %sabled, Data cache %s\n", - ecc_mask ? "en" : "dis", cp->policy); + if (ecc_mask) + pr_info("Memory policy: ECC enabled, Data cache %s\n", + cp->policy); for (i = 0; i < ARRAY_SIZE(mem_types); i++) { struct mem_type *t = &mem_types[i];