Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by kanga.kvack.org (Postfix) with ESMTP id E39A46B00FE for ; Mon, 10 Nov 2014 09:33:02 -0500 (EST) Received: by mail-wg0-f41.google.com with SMTP id k14so8948580wgh.28 for ; Mon, 10 Nov 2014 06:33:02 -0800 (PST) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id lv10si29406925wjb.131.2014.11.10.06.33.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 06:33:01 -0800 (PST) Date: Mon, 10 Nov 2014 15:33:00 +0100 Message-ID: From: Takashi Iwai Subject: Inconsistent pgprot between dma_alloc_coherent() and dma_mmap_cohernet() MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Hi, I noticed using dma_mmap_coherent() on pages allocated via dma_alloc_coherent() results in a warning on x86: map pfn RAM range req uncached-minus for [mem 0x21d500000-0x21d51ffff], got write-back which comes from arch/x86/mm/pat.c. Looking at the code, it seems that dma_mmap_coherent() blindly assumes that the pages are with pgprot_noncached(), but on x86, it's obviously not. Maybe some other archs have the same problem. How should we fix this? Defining a new pgprot_xxx(), and falling back to pgprot_noncached if undefined? Or is it just x86 and do it only there? thanks, Takashi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org