Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 30 Sep 2002 12:12:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 30 Sep 2002 12:12:50 -0400 Received: from gate.perex.cz ([194.212.165.105]:39698 "EHLO gate.perex.cz") by vger.kernel.org with ESMTP id ; Mon, 30 Sep 2002 12:12:49 -0400 Date: Mon, 30 Sep 2002 18:17:54 +0200 (CEST) From: Jaroslav Kysela X-X-Sender: To: Alan Cox cc: "David S. Miller" , "jgarzik@pobox.com" , "linux-kernel@vger.kernel.org" , "alan@redhat.com" Subject: Re: [PATCH] ALSA update [6/10] - 2002/07/20 In-Reply-To: <1033390451.16337.33.camel@irongate.swansea.linux.org.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 43 On 30 Sep 2002, Alan Cox wrote: > On Mon, 2002-09-30 at 01:53, David S. Miller wrote: > > From: Jaroslav Kysela > > Date: Sun, 29 Sep 2002 22:34:51 +0200 (CEST) > > > > - if (hwdev == NULL || ((u32)hwdev->dma_mask != 0xffffffff)) > > + if (hwdev == NULL || (u32)hwdev->dma_mask <= 0x00ffffff) > > gfp |= GFP_DMA; > > > > So alan, why is this really broken? > > > > EISA/ISA DMA is defined as using a hwdev of NULL or requiring > > <16MB address, he is preserving GFP_DMA in those cases. > > Firstly the DMA mask on x86 can't be below 24bits, we don't support > allocation from a smaller zone. Secondly what about PCI for 25-31bits - > there we do need to force gfp_dma to have any chance of getting the > right pages Not really. The test in original code - if the page is in right area - was bellow first allocation. Sure, it's dirty hack. > Giving the page allocator a mask argument does sound a lot nicer Right, my aim was to point to a bug. Let's go to create proper DMA allocation for broken hardware. I still wonder why hardware vendors are lazy to support full bus addressing. Perhaps, saving few coins per chip make them happy. Jaroslav ----- Jaroslav Kysela Linux Kernel Sound Maintainer ALSA Project http://www.alsa-project.org SuSE Linux http://www.suse.com - 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/