All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2006-06-26 15:10 Adrian Bunk
  2006-06-26 15:38 ` Dave Jones
  2006-06-26 15:48 ` Alan Cox
  0 siblings, 2 replies; 13+ messages in thread
From: Adrian Bunk @ 2006-06-26 15:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

virt_to_bus/bus_to_virt are long deprecated, mark them as __deprecated 
on i386.

Without such warnings people will never update their code and fix 
the errors in PPC64 builds.

And yes, some of the drivers affected are maintained.

This also ctches accidential additions of users for these functions like 
a usage of bus_to_virt() in the infiniband code that was added in 
2.6.17-rc1 (already removed).

This patch increases the number of warnings shown during builds, but it 
seems worth including it at least in -mm for making people aware of this 
issue.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 27 Apr 2006
- 19 Apr 2006
- 6 Jan 2006
- 13 Dec 2005
- 23 Nov 2005
- 18 Nov 2005
- 12 Nov 2005

--- linux-2.6.14-mm2-full/include/asm-i386/io.h.old	2005-11-12 01:44:38.000000000 +0100
+++ linux-2.6.14-mm2-full/include/asm-i386/io.h	2005-11-12 01:45:58.000000000 +0100
@@ -144,8 +144,14 @@
  *
  * Allow them on x86 for legacy drivers, though.
  */
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
+static inline unsigned long __deprecated virt_to_bus(volatile void * address)
+{
+	return __pa(address);
+}
+static inline void * __deprecated bus_to_virt(unsigned long address)
+{
+	return __va(address);
+}
 
 /*
  * readX/writeX() are used to access memory mapped devices. On some


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-06-27 19:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 15:10 [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 Adrian Bunk
2006-06-26 15:38 ` Dave Jones
2006-06-26 15:46   ` Arjan van de Ven
2006-06-26 15:54     ` Dave Jones
2006-06-27 14:27       ` Jan Engelhardt
2006-06-27 14:42         ` Arjan van de Ven
2006-06-27 15:17         ` Alan Cox
2006-06-27 19:09           ` Jan Engelhardt
2006-06-27 19:17             ` Arjan van de Ven
2006-06-26 16:14   ` Adrian Bunk
2006-06-26 16:45     ` Dave Jones
2006-06-26 20:50     ` PATCH: stallion clean up: " Alan Cox
2006-06-26 15:48 ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.