Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261375AbVBWBg2 (ORCPT ); Tue, 22 Feb 2005 20:36:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261383AbVBWBg2 (ORCPT ); Tue, 22 Feb 2005 20:36:28 -0500 Received: from it4systems-kln-gw.de.clara.net ([212.6.222.118]:33881 "EHLO frankbuss.de") by vger.kernel.org with ESMTP id S261375AbVBWBgY convert rfc822-to-8bit (ORCPT ); Tue, 22 Feb 2005 20:36:24 -0500 From: "Frank Buss" To: "'Linux Kernel Mailing List'" Cc: Subject: RE: Problems with dma_mmap_writecombine on mach-pxa Date: Wed, 23 Feb 2005 02:36:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUZR1eJK15ELao0TDWR9vDxj7TZZQAAJEqg Message-Id: <20050223013624.346885B8C4@frankbuss.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1083 Lines: 26 Russell King wrote: > Since we map the whole lot in one go, if you get one page, there's no > reason why you shouldn't get the lot. This is why I'm wondering if > it has something to do with your other modifications. my colleage has found the bug: in the function dma_mmap in arch/arm/mm/consistent.c the call to remap_pfn_range uses user_size in PAGE_SIZE units, but looks like it is expected in bytes. When using (user_size << PAGE_SHIFT), it works. I don't know, where to fix it: Should the lower level calls get the size in bytes (most function arguments in Linux kernel sources are not commented), this means fixing the dma_mmap, or should PAGE_SIZE be used, then the lower level functions needs to be fixed. -- Frank Bu?, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de - 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/