From: Gérard Roudier <groudier@club-internet.fr>
To: "David S. Miller" <davem@redhat.com>
Cc: mj@suse.cz, lk@tantalophile.demon.co.uk, davej@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: pdev_enable_device no longer used ?
Date: Mon, 11 Dec 2000 23:07:01 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.10.10012112250330.2255-100000@linux.local> (raw)
In-Reply-To: <200012112221.OAA01081@pizda.ninka.net>
On Mon, 11 Dec 2000, David S. Miller wrote:
> Date: Mon, 11 Dec 2000 22:30:59 +0100 (CET)
> From: Gérard Roudier <groudier@club-internet.fr>
>
> On Mon, 11 Dec 2000, David S. Miller wrote:
>
> > Really, in 2.4.x sparc64 requires PCI config space hackery no longer.
>
> Really?
>
> I was thinking about the pcivtophys() alias bus_dvma_to_mem() hackery used
> to retrieve the actual BAR address from the so-called pcidev bar cookies.
>
> Really :-) This conversation was about drivers making modifications
> to PCI config space areas which are being argued to be only modified
> by arch-specific PCI support layers. That is the context in which
> I made my statements.
Was more general in my opinion. :-)
> Interpreting physical BAR values is another issue altogether. Kernel
> wide interfaces for this may be easily added to include/asm/pci.h
> infrastructure, please just choose some sane name for it and I will
> compose a patch ok? :-)
Really? :-)
It is the bar cookies in pci dev structure that are insane, in my opinion.
If a driver needs BARs values, it needs actual BARs values and not some
stinking cookies. What a driver can do with BAR cookies other than using
them as band-aid for dubiously designed kernel interface.
BUT, a driver does not care about handles passed to read*/write* and
friends and should not have to care. Using cookies, handle or tag or
whatever means 'user should not worry about but just pass them when
needed' is good here.
So, if you want to fix this insane PCI interface:
1) Provide the _actual_ BARs values in the pci dev structure, otherwise
drivers that need them will have to deal with ugly hackery or access
explicitely the PCI configuration space.
2) Provide an interface that accepts the PCI dev and the BAR offset as
input and that return somes cookie for read*/write* interface.
GiveMeSomeCookieForMmIo(pcidev, bar_offset).
Gérard.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-11 23:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-09 11:30 davej
2000-12-09 11:38 ` Russell King
2000-12-09 12:15 ` Ivan Kokshaysky
2000-12-09 12:36 ` davej
2000-12-09 12:53 ` Alan Cox
2000-12-09 13:08 ` davej
2000-12-09 13:44 ` Ivan Kokshaysky
2000-12-09 14:26 ` Gérard Roudier
2000-12-09 17:48 ` Russell King
2000-12-09 20:57 ` Alan Cox
2000-12-09 15:04 ` Martin Mares
2000-12-09 18:11 ` davej
2000-12-10 23:28 ` Jamie Lokier
2000-12-11 0:34 ` davej
2000-12-11 19:40 ` Gérard Roudier
2000-12-12 2:43 ` Jes Sorensen
2000-12-11 19:20 ` Gérard Roudier
2000-12-11 20:55 ` Martin Mares
2000-12-11 20:49 ` Gérard Roudier
2000-12-11 21:48 ` David S. Miller
2000-12-11 21:30 ` Gérard Roudier
2000-12-11 22:21 ` David S. Miller
2000-12-11 22:07 ` Gérard Roudier [this message]
2000-12-11 23:03 ` David S. Miller
2000-12-12 19:17 ` Gérard Roudier
2000-12-12 20:14 ` David S. Miller
2000-12-12 20:28 ` Gérard Roudier
2000-12-12 22:39 ` David S. Miller
2000-12-11 23:16 ` Martin Mares
2000-12-12 18:56 ` Gérard Roudier
2000-12-12 12:21 ` Adrian Cox
2000-12-12 2:39 ` Jes Sorensen
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=Pine.LNX.4.10.10012112250330.2255-100000@linux.local \
--to=groudier@club-internet.fr \
--cc=davej@suse.de \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lk@tantalophile.demon.co.uk \
--cc=mj@suse.cz \
/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®