public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2005-11-18  1:40 Adrian Bunk
  2005-11-18  1:50 ` Andrew Morton
  0 siblings, 1 reply; 60+ messages in thread
From: Adrian Bunk @ 2005-11-18  1:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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


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

---

This patch was already sent on:
- 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] 60+ messages in thread
* Undefined '.bus_to_virt', '.virt_to_bus' causes compile error on Powerpc 64-bit
@ 2006-10-02 21:49 Judith Lebzelter
  2006-10-02 23:44 ` Adrian Bunk
  0 siblings, 1 reply; 60+ messages in thread
From: Judith Lebzelter @ 2006-10-02 21:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: linuxppc-dev

Hello:

For the automated cross-compile builds at OSDL, powerpc 64-bit 
'allmodconfig' is failing.  The warnings/errors below appear in 
the 'modpost' stage of kernel compiles for 2.6.18 and -mm2 kernels.

Thanks;
Judith Lebzelter
OSDL

-----------

  Building modules, stage 2.
  MODPOST 1658 modules
WARNING: Can't handle masks in drivers/ata/ahci:FFFF05
WARNING: ".virt_to_bus" [sound/oss/sscape.ko] undefined!
WARNING: ".virt_to_bus" [sound/oss/sound.ko] undefined!
WARNING: ".bus_to_virt" [sound/oss/cs46xx.ko] undefined!
WARNING: ".virt_to_bus" [sound/oss/cs46xx.ko] undefined!
WARNING: ".bus_to_virt" [drivers/scsi/tmscsim.ko] undefined!
WARNING: ".bus_to_virt" [drivers/scsi/BusLogic.ko] undefined!
WARNING: ".virt_to_bus" [drivers/net/wan/lmc/lmc.ko] undefined!
WARNING: ".virt_to_bus" [drivers/message/i2o/i2o_config.ko] undefined!
WARNING: ".bus_to_virt" [drivers/block/cpqarray.ko] undefined!
WARNING: ".bus_to_virt" [drivers/atm/zatm.ko] undefined!
WARNING: ".virt_to_bus" [drivers/atm/zatm.ko] undefined!
WARNING: ".bus_to_virt" [drivers/atm/horizon.ko] undefined!
WARNING: ".virt_to_bus" [drivers/atm/firestream.ko] undefined!
WARNING: ".bus_to_virt" [drivers/atm/firestream.ko] undefined!
WARNING: ".bus_to_virt" [drivers/atm/ambassador.ko] undefined!
WARNING: ".virt_to_bus" [drivers/atm/ambassador.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2


^ permalink raw reply	[flat|nested] 60+ messages in thread
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2006-07-06 22:30 Adrian Bunk
  0 siblings, 0 replies; 60+ messages in thread
From: Adrian Bunk @ 2006-07-06 22:30 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 catches 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:
- 26 Jun 2006
- 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] 60+ messages in thread
* [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; 60+ 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] 60+ messages in thread
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2006-04-27 20:33 Adrian Bunk
  0 siblings, 0 replies; 60+ messages in thread
From: Adrian Bunk @ 2006-04-27 20:33 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.

As an example, the only usage of bus_to_virt() in the infiniband code 
was added in 2.6.17-rc1 (sic). 

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:
- 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] 60+ messages in thread
[parent not found: <fa.mZJQjHk9A5D4GHpUn7lttlNhH5U@ifi.uio.no>]
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2006-04-18 22:07 Adrian Bunk
  2006-04-18 22:19 ` Roland Dreier
       [not found] ` <20060419051355.GI4825@rhun.haifa.ibm.com>
  0 siblings, 2 replies; 60+ messages in thread
From: Adrian Bunk @ 2006-04-18 22:07 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 
Andrew's all*config PPC64 builds.

And yes, some of the drivers affected are maintained.

As an example, the only usage of bus_to_virt() in the infiniband code 
was added in 2.6.17-rc1 (sic). 

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:
- 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] 60+ messages in thread
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2006-01-06 13:27 Adrian Bunk
  2006-01-07  9:51 ` Andrew Morton
  0 siblings, 1 reply; 60+ messages in thread
From: Adrian Bunk @ 2006-01-06 13:27 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 
Andrew's all*config ppc64 builds.


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

---

This patch was already sent on:
- 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] 60+ messages in thread
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2005-12-13 17:02 Adrian Bunk
  0 siblings, 0 replies; 60+ messages in thread
From: Adrian Bunk @ 2005-12-13 17:02 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 
Andrew's all*config ppc64 builds.


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

---

This patch was already sent on:
- 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] 60+ messages in thread
* [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386
@ 2005-11-23 22:34 Adrian Bunk
  0 siblings, 0 replies; 60+ messages in thread
From: Adrian Bunk @ 2005-11-23 22:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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


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

---

This patch was already sent on:
- 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] 60+ messages in thread
* [2.6 patch] add -Werror-implicit-function-declaration to CFLAGS
@ 2005-11-07 20:03 Adrian Bunk
  2005-11-10 12:28 ` Andrew Morton
  0 siblings, 1 reply; 60+ messages in thread
From: Adrian Bunk @ 2005-11-07 20:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Currently, using an undeclared function gives a compile warning, but it 
can lead to a nasty runtime error if the prototype of the function is 
different from what gcc guessed.

With -Werror-implicit-function-declaration, we are getting an immediate 
compile error instead.

There will be some compile errors in cases where compilation previously
worked because the undefined function wasn't called due to gcc dead code
elimination, but in these cases a proper fix doesnt harm.


This patch also removes some unneeded spaces between two tabs in the 
following line.


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

---

This patch was already sent on:
- 30 Aug 2005
- 30 Jul 2005

--- linux-2.6.13-rc3-mm3-full/Makefile.old	2005-07-30 13:55:32.000000000 +0200
+++ linux-2.6.13-rc3-mm3-full/Makefile	2005-07-30 13:55:56.000000000 +0200
@@ -351,7 +351,8 @@
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS 		:= -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-	  	   -fno-strict-aliasing -fno-common \
+		   -Werror-implicit-function-declaration \
+		   -fno-strict-aliasing -fno-common \
 		   -ffreestanding
 AFLAGS		:= -D__ASSEMBLY__
 


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

end of thread, other threads:[~2006-10-03 11:07 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18  1:40 [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 Adrian Bunk
2005-11-18  1:50 ` Andrew Morton
2005-11-18  2:06   ` Adrian Bunk
2005-11-18  2:20     ` Andrew Morton
2005-11-18  2:44       ` Adrian Bunk
2005-11-18  2:55         ` Andrew Morton
2005-11-18  3:17           ` Dave Jones
2005-11-18  3:37             ` [2.6 patch] build kernel/intermodule.c only when required Adrian Bunk
2005-11-18  3:42             ` [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 David S. Miller
2005-11-18  4:03               ` Andrew Morton
2005-11-18  4:11                 ` Dave Jones
2005-11-19  0:34                 ` Sam Ravnborg
2005-11-19  0:39                   ` Dave Jones
2005-11-19  1:19                   ` David S. Miller
2005-11-19 20:44                     ` Adrian Bunk
2005-11-19 20:51                   ` Adrian Bunk
2005-11-19 21:01                     ` Sam Ravnborg
2005-11-20 23:27                   ` Pavel Machek
2005-11-21  4:27                     ` David S. Miller
2005-11-19 13:44   ` Jesper Juhl
  -- strict thread matches above, loose matches on Subject: below --
2006-10-02 21:49 Undefined '.bus_to_virt', '.virt_to_bus' causes compile error on Powerpc 64-bit Judith Lebzelter
2006-10-02 23:44 ` Adrian Bunk
2006-10-03  1:22   ` [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 Adrian Bunk
2006-10-03  1:48     ` Nicholas Miell
2006-10-03  1:58       ` Adrian Bunk
2006-10-03  2:55         ` Nicholas Miell
2006-10-03  4:37       ` Benjamin Herrenschmidt
2006-10-03 11:29         ` Alan Cox
2006-10-03  4:37     ` Benjamin Herrenschmidt
2006-10-03  4:44       ` Andrew Morton
2006-10-03  4:49         ` Benjamin Herrenschmidt
2006-10-03  4:55           ` Andrew Morton
2006-10-03  5:07             ` Adrian Bunk
2006-10-03  9:36           ` Stefan Richter
2006-10-03 11:24     ` Alan Cox
2006-07-06 22:30 Adrian Bunk
2006-06-26 15:10 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 15:48 ` Alan Cox
2006-04-27 20:33 Adrian Bunk
     [not found] <fa.mZJQjHk9A5D4GHpUn7lttlNhH5U@ifi.uio.no>
     [not found] ` <fa.aQp/JAmWqmBjqeleRNK2yrIEx2o@ifi.uio.no>
2006-04-22 21:57   ` Dave Olson
2006-04-18 22:07 Adrian Bunk
2006-04-18 22:19 ` Roland Dreier
     [not found] ` <20060419051355.GI4825@rhun.haifa.ibm.com>
2006-04-19 18:07   ` Adrian Bunk
2006-04-19 18:21     ` linux-os (Dick Johnson)
2006-04-19 19:23       ` Arjan van de Ven
     [not found]     ` <20060419184957.GK4825@rhun.haifa.ibm.com>
2006-04-19 22:55       ` Adrian Bunk
2006-01-06 13:27 Adrian Bunk
2006-01-07  9:51 ` Andrew Morton
2006-01-07 10:53   ` Adrian Bunk
2005-12-13 17:02 Adrian Bunk
2005-11-23 22:34 Adrian Bunk
2005-11-07 20:03 [2.6 patch] add -Werror-implicit-function-declaration to CFLAGS Adrian Bunk
2005-11-10 12:28 ` Andrew Morton
2005-11-11  2:12   ` Adrian Bunk
2005-11-11  2:24     ` Andrew Morton
2005-11-11 20:18       ` Adrian Bunk
2005-11-11 20:20         ` Adrian Bunk
2005-11-12  4:34           ` [2.6 patch] mark virt_to_bus/bus_to_virt as __deprecated on i386 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox