mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Lee Jones <lee.jones@canonical.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] Stop ARM boards crashing when CUPS is loaded - 2.6.35-rc5
Date: Fri, 16 Jul 2010 10:20:18 +0100	[thread overview]
Message-ID: <20100716092018.GB16995@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4C40218A.4090806@canonical.com>

On Fri, Jul 16, 2010 at 10:08:26AM +0100, Lee Jones wrote:
> On 15/07/10 21:06, Russell King - ARM Linux wrote:
> > Note that we have machines which have ISA parallel ports, so it's not
> > this simple.
> 
> Do they have ISA parallel ports, or do they just pretend to?

I have four machines here which have real ISA parallel ports - as in
an ISA multi-IO chip with the serial/parallel/ide ports at the standard
PC IO offsets.  Whether there are more or not, I couldn't say.

When platforms implement the PCI/ISA IO macros correctly (as these four
platforms do), then these drivers work with no modification.

The problem comes when determining what is a "correct" implementation
for some machines - particularly machines which have no PCI/ISA busses
but have PCMCIA support.  PCMCIA has its own ISA-like bus, which can
appear to be quite different from PCs - eg, each socket has its own
separate chunk of MMIO emulating the ISA IO accesses to the cards.

In this case, most platforms prefer to have the PCI/ISA IO macros just
dereference the address they're passed, and arrange for the PCMCIA
support to provide a base address relevant to the IO mapping which has
been established.

This leads to drivers which try the standard ISA IO addresses
dereferencing addresses within the first page, thereby causing a kernel
oops.

> > Why not just avoid selecting and building parport_pc on these machines?
> 
> > I mean, the Beagleboard doesn't have PCI nor ISA, so why is parport_pc
> > being built for production use?
> 
> I am happy to make a Kconfig change to disallow OMAP builds from building
> the parport_pc driver. Do you think this would be more sensible?

Making Kconfig changes to disallow drivers which don't work on certain
platforms will result in a massive expansion of dependencies.  I'm
not certain that this is the right solution.

The best solution is probably for the parport code to go through a
modernisation cycle like the serial code did, essentially using
platform devices to pass the base addresses.  This would make the
driver more portable, and eliminates this problem entirely (because
platforms which don't have parports won't register the platform device(s)
necessary for parport to even probe illegal addresses.)

  reply	other threads:[~2010-07-16  9:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 14:05 Lee Jones
2010-07-15 20:02 ` Andrew Morton
2010-07-15 20:06   ` Russell King - ARM Linux
2010-07-16  9:08     ` Lee Jones
2010-07-16  9:20       ` Russell King - ARM Linux [this message]
2010-07-16  9:32         ` Lee Jones
2010-07-16 11:12           ` Lee Jones
2010-07-26 22:26             ` Greg KH
2010-07-16 16:23           ` Milton Miller
2010-07-16 16:42             ` Lee Jones
2010-07-16 19:38             ` Milton Miller
2010-07-16 20:54               ` Russell King - ARM Linux
2010-07-16  9:37       ` Martin Michlmayr
2010-07-16 13:27         ` Woody Suwalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100716092018.GB16995@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=lee.jones@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®