Re: [PATCH][PPC32[NEWBIE] enhancement to virt_to_bus/bus_to_virt (try 2)

From: Paul Mackerras
Date: Thu Dec 02 2004 - 15:36:50 EST


Linh Dang writes:

> In 2.6.9 on non-APUS ppc32 platforms, virt_to_bus() will just subtract
> KERNELBASE from the the virtual address. bus_to_virt() will perform
> the reverse operation.
>
> This patch will make virt_to_bus():
>
> - perform the current operation if the virtual address is between
> KERNELBASE and ioremap_bot.

Why do you want to do this? The only code that should be using
virt_to_bus or bus_to_virt is the DMA API code, and it's happy with
them the way they are.

> The patch also changes virt_to_phys()/phys_to_virt() in a similar way.

What do you want to use them for? They are only for use in low-level
memory management code.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/