Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754949Ab3DJDIk (ORCPT ); Tue, 9 Apr 2013 23:08:40 -0400 Received: from mail-qe0-f51.google.com ([209.85.128.51]:63396 "EHLO mail-qe0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129Ab3DJDIj (ORCPT ); Tue, 9 Apr 2013 23:08:39 -0400 From: Rob Herring To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Rob Herring , Anton Vorontsov , Colin Cross , Kees Cook , Tony Luck 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 47 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, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/