netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
       [not found] <1363298204-8014-1-git-send-email-arnd@arndb.de>
@ 2013-03-14 21:56 ` Arnd Bergmann
  2013-03-15  6:26   ` Geert Uytterhoeven
  2013-03-17 16:01   ` David Miller
  2013-03-14 21:56 ` [PATCH] ethernet/tulip: DE4x5 needs VIRT_TO_BUS Arnd Bergmann
  1 sibling, 2 replies; 10+ messages in thread
From: Arnd Bergmann @ 2013-03-14 21:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arm-kernel, Arnd Bergmann, Karsten Keil, netdev

Disabling CONFIG_VIRT_TO_BUS on ARM showed that the hisax netjet
driver depends on this deprecated functionality but is not
marked so in Kconfig.

Rather than adding ARM to the already long list of architectures
that this driver is broken on, this patch adds 'depends on
VIRT_TO_BUS' and removes the dependency on !SPARC, which is
also implied by that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
---
Please apply for 3.9 or 3.10, this one is not urgent

 drivers/isdn/hisax/Kconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 5313c9e..d9edcc9 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,8 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
 	  Technologies.
@@ -248,7 +249,8 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card
 	  from Traverse Technologies.
-- 
1.8.1.2

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

* [PATCH] ethernet/tulip: DE4x5 needs VIRT_TO_BUS
       [not found] <1363298204-8014-1-git-send-email-arnd@arndb.de>
  2013-03-14 21:56 ` [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS Arnd Bergmann
@ 2013-03-14 21:56 ` Arnd Bergmann
  2013-03-17 16:01   ` David Miller
  1 sibling, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2013-03-14 21:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arm-kernel, Arnd Bergmann, Grant Grundler, netdev

The automated ARM build tests have shown that the tulip de4x5 driver
uses the old-style virt_to_bus() interface on some architectures.

Alpha, Sparc and PowerPC did not hit this problem, because they
use a different code path, and most other architectures actually
do provide VIRT_TO_BUS.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: netdev@vger.kernel.org
---
Please apply for 3.9 or 3.10, this one is not urgent

 drivers/net/ethernet/dec/tulip/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/dec/tulip/Kconfig b/drivers/net/ethernet/dec/tulip/Kconfig
index 0c37fb2..1df33c7 100644
--- a/drivers/net/ethernet/dec/tulip/Kconfig
+++ b/drivers/net/ethernet/dec/tulip/Kconfig
@@ -108,6 +108,7 @@ config TULIP_DM910X
 config DE4X5
 	tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"
 	depends on (PCI || EISA)
+	depends on VIRT_TO_BUS || ALPHA || PPC || SPARC
 	select CRC32
 	---help---
 	  This is support for the DIGITAL series of PCI/EISA Ethernet cards.
-- 
1.8.1.2

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-14 21:56 ` [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS Arnd Bergmann
@ 2013-03-15  6:26   ` Geert Uytterhoeven
  2013-03-15 10:15     ` Arnd Bergmann
  2013-03-17 16:01   ` David Miller
  1 sibling, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2013-03-15  6:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-arm-kernel, Karsten Keil, netdev

On Thu, Mar 14, 2013 at 10:56 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Disabling CONFIG_VIRT_TO_BUS on ARM showed that the hisax netjet
> driver depends on this deprecated functionality but is not
> marked so in Kconfig.
>
> Rather than adding ARM to the already long list of architectures
> that this driver is broken on, this patch adds 'depends on
> VIRT_TO_BUS' and removes the dependency on !SPARC, which is
> also implied by that.

IIRC, the real "arch" dependency for this driver is !BIG_ENDIAN, but
unfortunately
we don't have a generic Kconfig symbol for that.
Perhaps we may want to introduce that?
Of course we prefer to make drivers work on all endianness instead...

> --- a/drivers/isdn/hisax/Kconfig
> +++ b/drivers/isdn/hisax/Kconfig
> @@ -237,7 +237,8 @@ config HISAX_MIC
>
>  config HISAX_NETJET
>         bool "NETjet card"
> -       depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
> +       depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
> +       depends on VIRT_TO_BUS
>         help
>           This enables HiSax support for the NetJet from Traverse
>           Technologies.
> @@ -248,7 +249,8 @@ config HISAX_NETJET
>
>  config HISAX_NETJET_U
>         bool "NETspider U card"
> -       depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
> +       depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
> +       depends on VIRT_TO_BUS

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-15  6:26   ` Geert Uytterhoeven
@ 2013-03-15 10:15     ` Arnd Bergmann
  2013-03-15 12:16       ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2013-03-15 10:15 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel, linux-arm-kernel, Karsten Keil, netdev,
	David Howells

On Friday 15 March 2013, Geert Uytterhoeven wrote:
> On Thu, Mar 14, 2013 at 10:56 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > Disabling CONFIG_VIRT_TO_BUS on ARM showed that the hisax netjet
> > driver depends on this deprecated functionality but is not
> > marked so in Kconfig.
> >
> > Rather than adding ARM to the already long list of architectures
> > that this driver is broken on, this patch adds 'depends on
> > VIRT_TO_BUS' and removes the dependency on !SPARC, which is
> > also implied by that.
> 
> IIRC, the real "arch" dependency for this driver is !BIG_ENDIAN, but
> unfortunately
> we don't have a generic Kconfig symbol for that.
> Perhaps we may want to introduce that?
> Of course we prefer to make drivers work on all endianness instead...

CONFIG_VIRT_TO_BUS is certainly also a dependency, since it fails
to build without that. I think we can address the two problems separately.

David Howells brought up the topic of endian checks recently, noting
that the way we define __BIG_ENDIAN and __LITTLE_ENDIAN in the kernel
is incompatible to how do it in user space, and not much better either.

A few architectures that are bi-endian (arc, arm, c6x, mips, sh) already
have CONFIG_CPU_IS_LITTLE_ENDIAN and CONFIG_CPU_IS_BIG_ENDIAN. I guess
it would be a good idea to provide these on all architectures.

	Arnd

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-15 10:15     ` Arnd Bergmann
@ 2013-03-15 12:16       ` David Miller
  2013-03-15 12:29         ` Arnd Bergmann
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2013-03-15 12:16 UTC (permalink / raw)
  To: arnd; +Cc: geert, linux-kernel, linux-arm-kernel, isdn, netdev, dhowells

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 15 Mar 2013 10:15:00 +0000

> David Howells brought up the topic of endian checks recently, noting
> that the way we define __BIG_ENDIAN and __LITTLE_ENDIAN in the kernel
> is incompatible to how do it in user space, and not much better either.
> 
> A few architectures that are bi-endian (arc, arm, c6x, mips, sh) already
> have CONFIG_CPU_IS_LITTLE_ENDIAN and CONFIG_CPU_IS_BIG_ENDIAN. I guess
> it would be a good idea to provide these on all architectures.

I do not want to see us add such a Kconfig dependency knob.

Then the real tendency will exist to make new drivers little-endian
only, refuse to fix endian-broken old drivers, etc.

Which means that allmodconfig on my architecture will have build
coverage on less code, which is really the only thing that matters
for me.  I want all drivers that could be effected by my changes
to be compile testable on as many platforms as possible.

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-15 12:16       ` David Miller
@ 2013-03-15 12:29         ` Arnd Bergmann
  2013-03-15 12:33           ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2013-03-15 12:29 UTC (permalink / raw)
  To: David Miller
  Cc: geert, linux-kernel, linux-arm-kernel, isdn, netdev, dhowells

On Friday 15 March 2013, David Miller wrote:
> I do not want to see us add such a Kconfig dependency knob.
> 
> Then the real tendency will exist to make new drivers little-endian
> only, refuse to fix endian-broken old drivers, etc.
> 
> Which means that allmodconfig on my architecture will have build
> coverage on less code, which is really the only thing that matters
> for me.  I want all drivers that could be effected by my changes
> to be compile testable on as many platforms as possible.

There are two separate issues here. The first one that David Howells
brought up was ill-defined __BIG_ENDIAN/__LITTLE_ENDIAN macros.
Using CONFIG_CPU_IS_BIG_ENDIAN/CONFIG_CPU_IS_LITTLE_ENDIAN in the code
is what Linus suggested as a replacement, although I see little
incentive to do mass conversion there, it would be mainly for new
code.

The other issue is the Kconfig logic where Geert would replace
all the instances of "depends on BROKEN || !(SPARC || PPC || PARISC ||
M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA &&
!CPU_LITTLE_ENDIAN))" with something that actually reflects what
we mean. I think it would be a nice cleanup, but I can also understand
your hesitation there.

Do you object to both uses of that symbol, or just to using it in order
to disable drivers in Kconfig? I don't care too much right now, since
nothing is actually broken at the moment, I would just like to get
the VIRT_TO_BUS patch merged so people can also build allmodconfig
on my architecture ;-)

	Arnd

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-15 12:29         ` Arnd Bergmann
@ 2013-03-15 12:33           ` David Miller
  2013-03-15 13:41             ` Arnd Bergmann
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2013-03-15 12:33 UTC (permalink / raw)
  To: arnd; +Cc: geert, linux-kernel, linux-arm-kernel, isdn, netdev, dhowells

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 15 Mar 2013 12:29:52 +0000

> On Friday 15 March 2013, David Miller wrote:
>> I do not want to see us add such a Kconfig dependency knob.
>> 
>> Then the real tendency will exist to make new drivers little-endian
>> only, refuse to fix endian-broken old drivers, etc.
>> 
>> Which means that allmodconfig on my architecture will have build
>> coverage on less code, which is really the only thing that matters
>> for me.  I want all drivers that could be effected by my changes
>> to be compile testable on as many platforms as possible.
> 
> There are two separate issues here. The first one that David Howells
> brought up was ill-defined __BIG_ENDIAN/__LITTLE_ENDIAN macros.
> Using CONFIG_CPU_IS_BIG_ENDIAN/CONFIG_CPU_IS_LITTLE_ENDIAN in the code
> is what Linus suggested as a replacement, although I see little
> incentive to do mass conversion there, it would be mainly for new
> code.
> 
> The other issue is the Kconfig logic where Geert would replace
> all the instances of "depends on BROKEN || !(SPARC || PPC || PARISC ||
> M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA &&
> !CPU_LITTLE_ENDIAN))" with something that actually reflects what
> we mean. I think it would be a nice cleanup, but I can also understand
> your hesitation there.
> 
> Do you object to both uses of that symbol, or just to using it in order
> to disable drivers in Kconfig? I don't care too much right now, since
> nothing is actually broken at the moment, I would just like to get
> the VIRT_TO_BUS patch merged so people can also build allmodconfig
> on my architecture ;-)

The first usage seems reason, but the temtation is going to be quite
strong to misuse to block out drivers when there is "no value" in
spending time necessary to simply make them endian clean instead.

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-15 12:33           ` David Miller
@ 2013-03-15 13:41             ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2013-03-15 13:41 UTC (permalink / raw)
  To: David Miller
  Cc: geert, linux-kernel, linux-arm-kernel, isdn, netdev, dhowells

On Friday 15 March 2013, David Miller wrote:
> The first usage seems reason, but the temtation is going to be quite
> strong to misuse to block out drivers when there is "no value" in
> spending time necessary to simply make them endian clean instead.

Right. I'll let someone else start that discussion then if they
really want to see that patch.

	Arnd

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

* Re: [PATCH] ethernet/tulip: DE4x5 needs VIRT_TO_BUS
  2013-03-14 21:56 ` [PATCH] ethernet/tulip: DE4x5 needs VIRT_TO_BUS Arnd Bergmann
@ 2013-03-17 16:01   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2013-03-17 16:01 UTC (permalink / raw)
  To: arnd; +Cc: linux-kernel, linux-arm-kernel, grundler, netdev

From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 14 Mar 2013 22:56:42 +0100

> The automated ARM build tests have shown that the tulip de4x5 driver
> uses the old-style virt_to_bus() interface on some architectures.
> 
> Alpha, Sparc and PowerPC did not hit this problem, because they
> use a different code path, and most other architectures actually
> do provide VIRT_TO_BUS.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied.

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

* Re: [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS
  2013-03-14 21:56 ` [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS Arnd Bergmann
  2013-03-15  6:26   ` Geert Uytterhoeven
@ 2013-03-17 16:01   ` David Miller
  1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2013-03-17 16:01 UTC (permalink / raw)
  To: arnd; +Cc: linux-kernel, linux-arm-kernel, isdn, netdev

From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 14 Mar 2013 22:56:41 +0100

> Disabling CONFIG_VIRT_TO_BUS on ARM showed that the hisax netjet
> driver depends on this deprecated functionality but is not
> marked so in Kconfig.
> 
> Rather than adding ARM to the already long list of architectures
> that this driver is broken on, this patch adds 'depends on
> VIRT_TO_BUS' and removes the dependency on !SPARC, which is
> also implied by that.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied.

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

end of thread, other threads:[~2013-03-17 16:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1363298204-8014-1-git-send-email-arnd@arndb.de>
2013-03-14 21:56 ` [PATCH] isdn: hisax: netjet requires VIRT_TO_BUS Arnd Bergmann
2013-03-15  6:26   ` Geert Uytterhoeven
2013-03-15 10:15     ` Arnd Bergmann
2013-03-15 12:16       ` David Miller
2013-03-15 12:29         ` Arnd Bergmann
2013-03-15 12:33           ` David Miller
2013-03-15 13:41             ` Arnd Bergmann
2013-03-17 16:01   ` David Miller
2013-03-14 21:56 ` [PATCH] ethernet/tulip: DE4x5 needs VIRT_TO_BUS Arnd Bergmann
2013-03-17 16:01   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).