Re: [PATCH] Introduce PCI <-> CPU address conversion [1/2]

From: Christoph Hellwig <hch_at_infradead.org>
Date: 2004-10-14 22:53:48
> +#define IS_MEMORY(l)	(((l) & PCI_BASE_ADDRESS_SPACE) == \
> +				PCI_BASE_ADDRESS_SPACE_MEMORY)
> +#define IS_64BIT(l)	(((l) & PCI_BASE_ADDRESS_MEM_TYPE_64) != 0)

Should got to pci.h with more descriptive names

>  /*
> + * Convert between the CPU's view of addresses on a PCI card and the PCI
> + * device's view of the same location.  The default implementation is a no-op
> + * as most architectures have the same addresses on the CPU and PCI busses.
> + */
> +
> +#ifndef pci_phys_to_bus
> +#define pci_phys_to_bus(busdev, addr, flags) (addr)
> +#define pci_bus_to_phys(busdev, addr, flags) (addr)
> +#endif

I'd rather have this declared in every architectures asm/ header, so it's
more explicit that it's an per-arch thing.  Also make it a static inline
so we get typechecking.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Oct 14 08:54:11 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST