From patchwork Wed Apr 10 03:08:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2419031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 5733D3FC71 for ; Wed, 10 Apr 2013 03:08:50 +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 1UPlOv-0006Gb-UU; Wed, 10 Apr 2013 03:08:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPlOt-0002Si-6m; Wed, 10 Apr 2013 03:08:43 +0000 Received: from mail-qa0-f49.google.com ([209.85.216.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPlOq-0002SF-53 for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2013 03:08:40 +0000 Received: by mail-qa0-f49.google.com with SMTP id i13so49795qae.15 for ; Tue, 09 Apr 2013 20:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=sV6PzrXq399TQMnpx9pLD+TBXAUkCvGoNxT7pfbY6D0=; b=XhEw/+hhrTv+IAC8UwD6nHy4g71rxk2GMJ6Zw3StXGUXGlbq5HaqRBJBwsUpluUOyk XFi0dLUuQJwppKDTbXMpDNWH+nYcWha5AYPV/TGbCFFzGvNfHV0JPIySPJ0swh7FESsZ X2NSkb308sQ1mEvCWhnCFi3OSi04DFxawRYBvEFQrFUEsuOW7ttM23JA0YRO/9HH8Yfu cVTx95hyzoKBCy7w+WTI1QwjyaqYeg0WnbXGWUI6DOwvyN8FcJLt6GGeqhXwO51bW26/ K53nsFVcxKt8M6FiEwCFFQZ7fRlCfb9uvrXG7c7u0cXBJklqVU03cMFbCjffkxp4fDPM caQQ== X-Received: by 10.229.146.69 with SMTP id g5mr56575qcv.131.1365563318895; Tue, 09 Apr 2013 20:08:38 -0700 (PDT) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPS id ed8sm20964127qeb.7.2013.04.09.20.08.37 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 20:08:38 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/3] pstore-ram: use write-combine mappings Date: Tue, 9 Apr 2013 22:08:15 -0500 Message-Id: <1365563297-12480-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130409_230840_274368_952DE2C6 X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Tony Luck , Colin Cross , Kees Cook , Rob Herring , Anton Vorontsov 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 From: Rob Herring Atomic operations are undefined behavior on ARM for device or strongly ordered memory types. So use write-combine variants for mappings. This corresponds to normal, non-cacheable memory on ARM. For many other architectures, this change should not change the mapping type. Signed-off-by: Rob Herring Cc: Anton Vorontsov Cc: Colin Cross Cc: Kees Cook Cc: Tony Luck Cc: linux-kernel@vger.kernel.org --- fs/pstore/ram_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 0306303..e126d9f 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -337,7 +337,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size) page_start = start - offset_in_page(start); page_count = DIV_ROUND_UP(size + offset_in_page(start), PAGE_SIZE); - prot = pgprot_noncached(PAGE_KERNEL); + prot = pgprot_writecombine(PAGE_KERNEL); pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL); if (!pages) { @@ -364,7 +364,7 @@ static void *persistent_ram_iomap(phys_addr_t start, size_t size) return NULL; } - return ioremap(start, size); + return ioremap_wc(start, size); } static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,