linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Olaf Hering <olaf@aepfle.de>
Subject: Re: [PATCH] generic check_legacy_ioport
Date: Tue, 17 Apr 2007 23:22:22 +0200	[thread overview]
Message-ID: <200704172322.23362.arnd@arndb.de> (raw)
In-Reply-To: <20070417210745.GA3567@aepfle.de>

On Tuesday 17 April 2007, Olaf Hering wrote:
>=20
> =A0int check_legacy_ioport(unsigned long base_port)
> =A0{
> -=A0=A0=A0=A0=A0=A0=A0if (ppc_md.check_legacy_ioport =3D=3D NULL)
> +=A0=A0=A0=A0=A0=A0=A0struct device_node *np;
> +=A0=A0=A0=A0=A0=A0=A0if (ppc_md.check_legacy_ioport =3D=3D NULL) {
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0np =3D of_find_node_by_type=
(NULL, "isa");
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (np =3D=3D NULL)
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0ret=
urn -ENODEV;
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0of_node_put(np);
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return 0;
> +=A0=A0=A0=A0=A0=A0=A0}
> =A0=A0=A0=A0=A0=A0=A0=A0return ppc_md.check_legacy_ioport(base_port);
> =A0}

I could be wrong, but I think I've seen fake 'isa' bus nodes in the device =
tree
for machines that don't actually have isa. I probably saw this on very early
cell blades (not the ones currently shipping), but perhaps others have
made the same mistake.

How about simply defining a new common function like

int generic_deny_legacy_ioport(unsigned long base_port)
{
	return -EINVAL;
}

so that not every platform has to define their own but can either
set ppc_md.check_legacy_ioport to NULL, to generic_deny_legacy_ioport
or their own function if they do something fancy?

	Arnd <><

  reply	other threads:[~2007-04-17 21:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-17 21:07 [PATCH] generic check_legacy_ioport Olaf Hering
2007-04-17 21:22 ` Arnd Bergmann [this message]
2007-04-17 23:28   ` Segher Boessenkool
2007-04-20 18:51 ` Olaf Hering
2007-04-22  5:15   ` Milton Miller
2007-04-22  6:46     ` Olaf Hering
2007-04-23  8:15 ` [PATCH] " Olaf Hering
2007-04-24  0:53   ` Benjamin Herrenschmidt
2007-04-24 11:25     ` Olaf Hering
2007-04-24 15:45       ` Milton Miller
2007-04-24 18:54       ` Olaf Hering
2007-04-24 22:01         ` Arnd Bergmann
2007-04-25  0:12           ` Benjamin Herrenschmidt
2007-04-25  1:54           ` Segher Boessenkool
2007-04-25  7:49             ` Arnd Bergmann
2007-04-25 13:33               ` Segher Boessenkool
2007-04-25 22:02                 ` Arnd Bergmann
2007-04-25  0:09         ` Benjamin Herrenschmidt
2007-04-24 22:34       ` Benjamin Herrenschmidt
2007-04-25 20:36   ` Olaf Hering

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=200704172322.23362.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olaf@aepfle.de \
    /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;
as well as URLs for NNTP newsgroup(s).