linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
@ 2011-09-16  9:22 Wolfgang Grandegger
  2011-09-16 19:19 ` Valdis.Kletnieks
  2011-09-16 22:33 ` Andi Kleen
  0 siblings, 2 replies; 12+ messages in thread
From: Wolfgang Grandegger @ 2011-09-16  9:22 UTC (permalink / raw)
  To: x86; +Cc: SocketCAN Core Mailing List, LKML, Willy Lambert

There are 64-bit systems out there, like the ATOM N450, which
have ISA slots. This patch is necessary to get the "sja1000_isa"
Socket-CAN driver working on such systems.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
 arch/x86/Kconfig |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6a47bb2..08ee2d4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1947,7 +1947,6 @@ source "drivers/pci/pcie/Kconfig"
 
 source "drivers/pci/Kconfig"
 
-# x86_64 have no ISA slots, but can have ISA-style DMA.
 config ISA_DMA_API
 	bool "ISA-style DMA support" if (X86_64 && EXPERT)
 	default y
@@ -1955,8 +1954,6 @@ config ISA_DMA_API
 	  Enables ISA-style DMA support for devices requiring such controllers.
 	  If unsure, say Y.
 
-if X86_32
-
 config ISA
 	bool "ISA support"
 	---help---
@@ -1966,6 +1963,8 @@ config ISA
 	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
 	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
 
+if X86_32
+
 config EISA
 	bool "EISA support"
 	depends on ISA
-- 
1.7.4.1


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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-16  9:22 [PATCH] x86_64: permit to configure ISA support also for x86_64 systems Wolfgang Grandegger
@ 2011-09-16 19:19 ` Valdis.Kletnieks
  2011-09-16 19:31   ` Wolfgang Grandegger
  2011-09-18 23:19   ` Calvin Walton
  2011-09-16 22:33 ` Andi Kleen
  1 sibling, 2 replies; 12+ messages in thread
From: Valdis.Kletnieks @ 2011-09-16 19:19 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: x86, SocketCAN Core Mailing List, LKML, Willy Lambert

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

On Fri, 16 Sep 2011 11:22:45 +0200, Wolfgang Grandegger said:
> There are 64-bit systems out there, like the ATOM N450, which
> have ISA slots.

That's a scary thought...

> +if X86_32
> +
>  config EISA

But not as scary as the implication that the N450 has ISA but *not* EISA??!?

[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-16 19:19 ` Valdis.Kletnieks
@ 2011-09-16 19:31   ` Wolfgang Grandegger
  2011-09-20 15:47     ` Arnd Bergmann
  2011-09-18 23:19   ` Calvin Walton
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2011-09-16 19:31 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: x86, SocketCAN Core Mailing List, LKML, Willy Lambert

On 09/16/2011 09:19 PM, Valdis.Kletnieks@vt.edu wrote:
> On Fri, 16 Sep 2011 11:22:45 +0200, Wolfgang Grandegger said:
>> There are 64-bit systems out there, like the ATOM N450, which
>> have ISA slots.
> 
> That's a scary thought...

Well. Actually we need it for Intel Atom N450 PC/104-Plus SBCs.

> 
>> +if X86_32
>> +
>>  config EISA
> 
> But not as scary as the implication that the N450 has ISA but *not* EISA??!?

Ok, then I will allow EISA as well.

Wolfgang.

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-16  9:22 [PATCH] x86_64: permit to configure ISA support also for x86_64 systems Wolfgang Grandegger
  2011-09-16 19:19 ` Valdis.Kletnieks
@ 2011-09-16 22:33 ` Andi Kleen
  1 sibling, 0 replies; 12+ messages in thread
From: Andi Kleen @ 2011-09-16 22:33 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: public-x86-DgEjT+Ai2ygdnm+yROfE0A, SocketCAN Core Mailing List,
	Willy Lambert, LKML



Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> writes:

> There are 64-bit systems out there, like the ATOM N450, which
> have ISA slots. This patch is necessary to get the "sja1000_isa"
> Socket-CAN driver working on such systems.

Really bad idea.

You'll get a zillion non 64bit safe unmaintained old ISA 
drivers then, a non trivial percentage of them will likely 
explode when just loaded. 

Not to speak of the warning load at allyesconfig builds.

Maybe define a ISA_64 or so.

But it's really a bad idea.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only


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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-16 19:19 ` Valdis.Kletnieks
  2011-09-16 19:31   ` Wolfgang Grandegger
@ 2011-09-18 23:19   ` Calvin Walton
  1 sibling, 0 replies; 12+ messages in thread
From: Calvin Walton @ 2011-09-18 23:19 UTC (permalink / raw)
  To: Valdis.Kletnieks
  Cc: Wolfgang Grandegger, x86, SocketCAN Core Mailing List, LKML,
	Willy Lambert

On Fri, 2011-09-16 at 15:19 -0400, Valdis.Kletnieks@vt.edu wrote:
> On Fri, 16 Sep 2011 11:22:45 +0200, Wolfgang Grandegger said:
> > There are 64-bit systems out there, like the ATOM N450, which
> > have ISA slots.
> 
> That's a scary thought...
> 
> > +if X86_32
> > +
> >  config EISA
> 
> But not as scary as the implication that the N450 has ISA but *not* EISA??!?

Don't get confused, EISA is a completely different bus from ISA! Take a
look at
http://en.wikipedia.org/wiki/Extended_Industry_Standard_Architecture
The ports are physically different from standard ISA (although they are
backwards compatible), and it requires some complicated BIOS
configuration for cards to be detected... I've only ever seen it once on
an old 486 portable computer. (The BIOS battery had gone, so it lost its
EISA configuration info, and wouldn't boot because it failed to detect
the IDE controller.)

The Atom N450 board that Wolfgang has almost certainly does not support
EISA.

Calvin

-- 
Calvin Walton <calvin.walton@kepstin.ca>


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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-16 19:31   ` Wolfgang Grandegger
@ 2011-09-20 15:47     ` Arnd Bergmann
  2011-09-21  8:33       ` Wolfgang Grandegger
  0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2011-09-20 15:47 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: Valdis.Kletnieks, x86, SocketCAN Core Mailing List, LKML, Willy Lambert

On Friday 16 September 2011, Wolfgang Grandegger wrote:
> On 09/16/2011 09:19 PM, Valdis.Kletnieks@vt.edu wrote:
> > On Fri, 16 Sep 2011 11:22:45 +0200, Wolfgang Grandegger said:
> >> There are 64-bit systems out there, like the ATOM N450, which
> >> have ISA slots.
> > 
> > That's a scary thought...
> 
> Well. Actually we need it for Intel Atom N450 PC/104-Plus SBCs.

I would assume that you have a small set of ISA add-on cards that
you actually need to support, right?

Since most ISA drivers don't actually use isa_register_driver
(for good or bad), how about changing the Kconfig entry for
the ones you need to 'depends on ISA || PLAT_GRANDEGGER_PC104_ATOM'
or similar?

	Arnd

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-20 15:47     ` Arnd Bergmann
@ 2011-09-21  8:33       ` Wolfgang Grandegger
  2011-09-21  9:24         ` Arnd Bergmann
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2011-09-21  8:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: SocketCAN Core Mailing List, Willy Lambert, x86, Valdis.Kletnieks, LKML

On 09/20/2011 05:47 PM, Arnd Bergmann wrote:
> On Friday 16 September 2011, Wolfgang Grandegger wrote:
>> On 09/16/2011 09:19 PM, Valdis.Kletnieks@vt.edu wrote:
>>> On Fri, 16 Sep 2011 11:22:45 +0200, Wolfgang Grandegger said:
>>>> There are 64-bit systems out there, like the ATOM N450, which
>>>> have ISA slots.
>>>
>>> That's a scary thought...
>>
>> Well. Actually we need it for Intel Atom N450 PC/104-Plus SBCs.
> 
> I would assume that you have a small set of ISA add-on cards that
> you actually need to support, right?

Yes, various PC/104 compatible boards can be connected to the ISA bus on
such systems (via PC/104 connector). I personally do only care about the
CAN devices (as maintainer).

> Since most ISA drivers don't actually use isa_register_driver
> (for good or bad), how about changing the Kconfig entry for
> the ones you need to 'depends on ISA || PLAT_GRANDEGGER_PC104_ATOM'
> or similar?

What should the PLAT_GRANDEGGER_PC104_ATOM be good for? If I replace
isa_register_driver() with platform_driver_register(), like the serial
8250 driver does, HAS_IOMEM should be just fine. This would then also
avoid the 64-bit trouble expected with old ISA drivers (enabled via
ISA). Or have I missed something?

Wolfgang.

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-21  8:33       ` Wolfgang Grandegger
@ 2011-09-21  9:24         ` Arnd Bergmann
  2011-09-21 22:13           ` Andi Kleen
  2011-09-22  6:43           ` Wolfgang Grandegger
  0 siblings, 2 replies; 12+ messages in thread
From: Arnd Bergmann @ 2011-09-21  9:24 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: SocketCAN Core Mailing List, Willy Lambert, x86, Valdis.Kletnieks, LKML

On Wednesday 21 September 2011 10:33:10 Wolfgang Grandegger wrote:
> 
> > Since most ISA drivers don't actually use isa_register_driver
> > (for good or bad), how about changing the Kconfig entry for
> > the ones you need to 'depends on ISA || PLAT_GRANDEGGER_PC104_ATOM'
> > or similar?
> 
> What should the PLAT_GRANDEGGER_PC104_ATOM be good for? If I replace
> isa_register_driver() with platform_driver_register(), like the serial
> 8250 driver does, HAS_IOMEM should be just fine. This would then also
> avoid the 64-bit trouble expected with old ISA drivers (enabled via
> ISA). Or have I missed something?

I was thinking of the drivers that are for ISA cards but don't actually
use the isa_register_driver() function. If you have to change the driver
to a platform driver, you are right.

The other point is that you are probably using inb/outb operations,
which I'm trying to provide only on ISA/PCMCIA/PCI based systems in
the future. Once I finish that work, you will also need to depend on
HAS_IOPORT (which currently means something else).

	Arnd

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-21  9:24         ` Arnd Bergmann
@ 2011-09-21 22:13           ` Andi Kleen
  2011-09-22  6:43           ` Wolfgang Grandegger
  1 sibling, 0 replies; 12+ messages in thread
From: Andi Kleen @ 2011-09-21 22:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Wolfgang Grandegger, SocketCAN Core Mailing List, Willy Lambert,
	public-x86-DgEjT+Ai2ygdnm+yROfE0A,
	public-Valdis.Kletnieks-PjAqaU27lzQ, LKML



Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> writes:
>
> The other point is that you are probably using inb/outb operations,
> which I'm trying to provide only on ISA/PCMCIA/PCI based systems in
> the future. Once I finish that work, you will also need to depend on
> HAS_IOPORT (which currently means something else).

What does that mean? Most PCs need at least some ioport usage
during boot.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only


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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-21  9:24         ` Arnd Bergmann
  2011-09-21 22:13           ` Andi Kleen
@ 2011-09-22  6:43           ` Wolfgang Grandegger
  2011-09-22 14:20             ` Arnd Bergmann
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Grandegger @ 2011-09-22  6:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: SocketCAN Core Mailing List, Willy Lambert, x86, Valdis.Kletnieks, LKML

On 09/21/2011 11:24 AM, Arnd Bergmann wrote:
> On Wednesday 21 September 2011 10:33:10 Wolfgang Grandegger wrote:
>>
>>> Since most ISA drivers don't actually use isa_register_driver
>>> (for good or bad), how about changing the Kconfig entry for
>>> the ones you need to 'depends on ISA || PLAT_GRANDEGGER_PC104_ATOM'
>>> or similar?
>>
>> What should the PLAT_GRANDEGGER_PC104_ATOM be good for? If I replace
>> isa_register_driver() with platform_driver_register(), like the serial
>> 8250 driver does, HAS_IOMEM should be just fine. This would then also
>> avoid the 64-bit trouble expected with old ISA drivers (enabled via
>> ISA). Or have I missed something?
> 
> I was thinking of the drivers that are for ISA cards but don't actually
> use the isa_register_driver() function. If you have to change the driver
> to a platform driver, you are right.

OK, then I will finally convert the sja1000_isa driver to a platform
driver instead of allowing CONFIG_ISA for x86_64.

> The other point is that you are probably using inb/outb operations,
> which I'm trying to provide only on ISA/PCMCIA/PCI based systems in
> the future. Once I finish that work, you will also need to depend on
> HAS_IOPORT (which currently means something else).

OK, the sja1000_isa driver just uses memory mapped access.

Wolfgang.

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-22  6:43           ` Wolfgang Grandegger
@ 2011-09-22 14:20             ` Arnd Bergmann
  2011-09-22 14:57               ` Wolfgang Grandegger
  0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2011-09-22 14:20 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: SocketCAN Core Mailing List, Willy Lambert, x86, Valdis.Kletnieks, LKML

On Thursday 22 September 2011, Wolfgang Grandegger wrote:
> On 09/21/2011 11:24 AM, Arnd Bergmann wrote:
> > On Wednesday 21 September 2011 10:33:10 Wolfgang Grandegger wrote:
> > The other point is that you are probably using inb/outb operations,
> > which I'm trying to provide only on ISA/PCMCIA/PCI based systems in
> > the future. Once I finish that work, you will also need to depend on
> > HAS_IOPORT (which currently means something else).
> 
> OK, the sja1000_isa driver just uses memory mapped access.

According to this it uses both PIO and MMIO:

$ git grep '\(in\|out\|read\|write\)\(b\|w\|l\)' drivers/net/can/sja1000/sja1000_isa.c 
drivers/net/can/sja1000/sja1000_isa.c:  return readb(priv->reg_base + reg);
drivers/net/can/sja1000/sja1000_isa.c:  writeb(val, priv->reg_base + reg);
drivers/net/can/sja1000/sja1000_isa.c:  return inb((unsigned long)priv->reg_base + reg);
drivers/net/can/sja1000/sja1000_isa.c:  outb(val, (unsigned long)priv->reg_base + reg);
drivers/net/can/sja1000/sja1000_isa.c:  outb(reg, base);
drivers/net/can/sja1000/sja1000_isa.c:  return inb(base + 1);
drivers/net/can/sja1000/sja1000_isa.c:  outb(reg, base);
drivers/net/can/sja1000/sja1000_isa.c:  outb(val, base + 1);

But don't worry about it, I'll make the right Kconfig annotation when I submit my
patches.

	Arnd

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

* Re: [PATCH] x86_64: permit to configure ISA support also for x86_64 systems
  2011-09-22 14:20             ` Arnd Bergmann
@ 2011-09-22 14:57               ` Wolfgang Grandegger
  0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Grandegger @ 2011-09-22 14:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: SocketCAN Core Mailing List, Willy Lambert, x86, Valdis.Kletnieks, LKML

On 09/22/2011 04:20 PM, Arnd Bergmann wrote:
> On Thursday 22 September 2011, Wolfgang Grandegger wrote:
>> On 09/21/2011 11:24 AM, Arnd Bergmann wrote:
>>> On Wednesday 21 September 2011 10:33:10 Wolfgang Grandegger wrote:
>>> The other point is that you are probably using inb/outb operations,
>>> which I'm trying to provide only on ISA/PCMCIA/PCI based systems in
>>> the future. Once I finish that work, you will also need to depend on
>>> HAS_IOPORT (which currently means something else).
>>
>> OK, the sja1000_isa driver just uses memory mapped access.
> 
> According to this it uses both PIO and MMIO:
> 
> $ git grep '\(in\|out\|read\|write\)\(b\|w\|l\)' drivers/net/can/sja1000/sja1000_isa.c 
> drivers/net/can/sja1000/sja1000_isa.c:  return readb(priv->reg_base + reg);
> drivers/net/can/sja1000/sja1000_isa.c:  writeb(val, priv->reg_base + reg);
> drivers/net/can/sja1000/sja1000_isa.c:  return inb((unsigned long)priv->reg_base + reg);
> drivers/net/can/sja1000/sja1000_isa.c:  outb(val, (unsigned long)priv->reg_base + reg);
> drivers/net/can/sja1000/sja1000_isa.c:  outb(reg, base);
> drivers/net/can/sja1000/sja1000_isa.c:  return inb(base + 1);
> drivers/net/can/sja1000/sja1000_isa.c:  outb(reg, base);
> drivers/net/can/sja1000/sja1000_isa.c:  outb(val, base + 1);

Ah, oh, I forgot. The driver supports both, I/O port and memory mapped
access.

> But don't worry about it, I'll make the right Kconfig annotation when I submit my
> patches.

OK,

Wolfgang.

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

end of thread, other threads:[~2011-09-22 14:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16  9:22 [PATCH] x86_64: permit to configure ISA support also for x86_64 systems Wolfgang Grandegger
2011-09-16 19:19 ` Valdis.Kletnieks
2011-09-16 19:31   ` Wolfgang Grandegger
2011-09-20 15:47     ` Arnd Bergmann
2011-09-21  8:33       ` Wolfgang Grandegger
2011-09-21  9:24         ` Arnd Bergmann
2011-09-21 22:13           ` Andi Kleen
2011-09-22  6:43           ` Wolfgang Grandegger
2011-09-22 14:20             ` Arnd Bergmann
2011-09-22 14:57               ` Wolfgang Grandegger
2011-09-18 23:19   ` Calvin Walton
2011-09-16 22:33 ` Andi Kleen

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).