Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752114Ab2KLSlN (ORCPT ); Mon, 12 Nov 2012 13:41:13 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:51714 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751576Ab2KLSlM (ORCPT ); Mon, 12 Nov 2012 13:41:12 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Bjorn Helgaas Date: Mon, 12 Nov 2012 11:40:50 -0700 Message-ID: Subject: Re: Q: Kconfig option VIRT_TO_BUS To: H Hartley Sweeten Cc: "linux-kernel@vger.kernel.org" , Stephen Rothwell Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1363 Lines: 33 On Mon, Nov 12, 2012 at 9:18 AM, H Hartley Sweeten wrote: > Hello all, > > Does anyone know what the Kconfig option VIRT_TO_BUS does? > There are a number of "depends on" that option but it does not > seem to directly enable any code in the kernel. virt_to_bus() is a deprecated interface for converting a kernel virtual address to a bus address. It's deprecated because it's impossible to implement correctly when there are multiple bus address spaces, because you don't know which bus address space the caller has in mind. See Documentation/DMA-API-HOWTO.txt and Documentation/bus-virt-phys-mapping.txt for more details about virt_to_bus() and its replacements (dma_map_*()). It looks like f057eac0d7ad967138390a9dd7fd8267e1e39d19 added CONFIG_VIRT_TO_BUS as a way to prevent drivers that use virt_to_bus() from being built on architectures that can't support virt_to_bus(). Architectures that can't implement virt_to_bus() set CONFIG_ARCH_NO_VIRT_TO_BUS. It looks like powerpc, sh, and sparc currently set it, but ia64, x86, and probably other arches should also set it. Bjorn -- 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/