Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964992AbWEYEfT (ORCPT ); Thu, 25 May 2006 00:35:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965003AbWEYEfT (ORCPT ); Thu, 25 May 2006 00:35:19 -0400 Received: from srv5.dvmed.net ([207.36.208.214]:152 "EHLO mail.dvmed.net") by vger.kernel.org with ESMTP id S964992AbWEYEfR (ORCPT ); Thu, 25 May 2006 00:35:17 -0400 Message-ID: <447533FB.1080400@garzik.org> Date: Thu, 25 May 2006 00:35:07 -0400 From: Jeff Garzik User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: Jon Mason CC: Andi Kleen , Muli Ben-Yehuda , Muli Ben-Yehuda , Linux-Kernel , discuss@x86-64.org, Andrew Morton Subject: Re: [PATCH 2/4] x86-64: Calgary IOMMU - move valid_dma_direction into the callers References: <20060525033550.GD7720@us.ibm.com> In-Reply-To: <20060525033550.GD7720@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.1.1 on srv5.dvmed.net summary: Content analysis details: (-4.2 points, 5.0 required) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 844 Lines: 27 Jon Mason wrote: >>From Andi Kleen's comments on the original Calgary patch, move > valid_dma_direction into the calling functions. > > Signed-off-by: Muli Ben-Yehuda > Signed-off-by: Jon Mason Even though BUG_ON() includes unlikely(), this introduces additional tests in very hot paths. _Why_ do we need this at all? I would prefer to NAK the patch, and fix the odd user that gets it wrong. It becomes REALLY obvious that a driver has gotten this wrong, REALLY quickly. I see no need to burden critical hot paths with dumb checks like this. Jeff - 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/