Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265776AbUFSNwg (ORCPT ); Sat, 19 Jun 2004 09:52:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265764AbUFSNwg (ORCPT ); Sat, 19 Jun 2004 09:52:36 -0400 Received: from hq.pm.waw.pl ([195.116.170.10]:15081 "EHLO hq.pm.waw.pl") by vger.kernel.org with ESMTP id S265756AbUFSNvS (ORCPT ); Sat, 19 Jun 2004 09:51:18 -0400 To: James Bottomley Cc: Linux Kernel , SCSI Mailing List Subject: Re: Proposal for new generic device API: dma_get_required_mask() References: <1087481331.2210.27.camel@mulgrave> <1087523134.2210.97.camel@mulgrave> From: Krzysztof Halasa Date: Sat, 19 Jun 2004 01:07:36 +0200 In-Reply-To: <1087523134.2210.97.camel@mulgrave> (James Bottomley's message of "17 Jun 2004 20:45:33 -0500") 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: 1340 Lines: 30 James Bottomley writes: > It falls victim to the 95/5 rule---when you engineer an API, if 95% of > the complexity is dealing with the 5% of special cases, you're over > engineering. > > So the original proposal is the remaining 5% that covers 95% of the use > cases (and will do better even on the remaining 5%). I don't think so. We already have separate masks for coherent and non-coherent mappings (in PCI API, and I'm told it's to be extended to DMA API as well). And we need them. The problem is we're missing DMA masks for non-alloc calls (depending on the platform) and thus that it isn't very reliable. Drivers which need this are forced to bounce buffers themselves, and many of them will not work on 64-bit platforms (as of ~ 2.6.0, I don't check that regularly). And yes, we really need reliable masks for non-alloc mappings. I can't see any added complexity in this scheme, we basically already do all of that (except the cost, but it's hardly complex and most drivers would just need to test check_dma_mask() for error). -- Krzysztof Halasa, B*FH - 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/