public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: /proc/pci deprecation?
@ 2002-12-06 23:18 Petr Vandrovec
  2002-12-07  7:44 ` Willy Tarreau
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Petr Vandrovec @ 2002-12-06 23:18 UTC (permalink / raw)
  To: Patrick Mochel; +Cc: linux-kernel, Linus Torvalds, jgarzik

On  6 Dec 02 at 16:13, Patrick Mochel wrote:
> 
> > IIRC it was one of (a) deprecated, (b) removed, or (c) almost removed in
> > the past, and Linus un-deprecated it.  The logic back then was that it
> > provides a quick summary of a lot of useful info, a la /proc/cpuinfo and
> > /proc/meminfo.  i.e. you don't need lspci installed, just been /bin/cat.
> 
> Ok, I can see that. But, are there really many systems that do not come with
> lspci(8) pre-installed? I would expect that most distributions do; at least
> the one I use does..
> 
> But, look the usage model. Who queries PCI information from the system? I
> would argue a) developers, b) power users, and c) users hitting a bug. 

It is invaluable during installation, when no lspci is installed yet.
I know that I need e100/eepro100 for 
'Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM E', but I do not
have even slightest idea what device 8086:2449 is, whether USB or NIC or
VGA or some bridge.

Next problem is that some drivers want to print "user readable" hardware
name to user, and although some have its own name database (e100), some
use name from pcidev...
 
> > I do grant you it would make various __init sections and in-memory 
> > structures smaller if we eliminated the names...   do we want to?  Sure we
> > have lseisa and lspci and lsusb, et. al.  Does that obviate the need for a
> > simple summary of attached hardware?
> 
> IMO, yes, since those tools provide the summary, and exist almost purely in
> userspace. I forgot to mention in the orginal email that we could also drop
> the PCI names database, right? This would save a considerable amount in the
> kernel image alone..

If you want, make it user configurable like it was during 2.2.x. But
I personally prefer descriptive names and system overview I can parse 
without having mounted /usr to get working lspci.
                                                Best regards,
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
                                                    

^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: /proc/pci deprecation?
@ 2002-12-09 11:00 Nicolas Mailhot
  0 siblings, 0 replies; 39+ messages in thread
From: Nicolas Mailhot @ 2002-12-09 11:00 UTC (permalink / raw)
  To: linux-kernel

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

[Please CC me replies as I'm not on the list ]

Hi

	When I added kt400 agp support recently (just a ID declaration since
generic via routines work fine on my box), I had to declare the KT400
pci id in gart. Which was the only thing really needed (or so I thought
in a sane world).

	Then I did the 2.4 patch. And guess what ? I found I had to declare it
in dri (two times, ie for each versions supported) and in the pci id
database. What kind of madness is it ? How many people do you expect to
update *four* lists with the same info (and btw the last time I checked
2.4 followups were not merged in 2.5) ?

	And all this time lspci knew my chip. In fact, I *used* lspci info to
get the right info to put in the kernel. And to this day since not
everything was merged in 2.5 lspci is more accurate than the kernel.

	So from my very naïve point of view /proc/pci wouldn't be mourned,
quite the contrary.

Regards,

-- 
Nicolas Mailhot

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: /proc/pci deprecation?
@ 2002-12-09  9:15 Adam J. Richter
  0 siblings, 0 replies; 39+ messages in thread
From: Adam J. Richter @ 2002-12-09  9:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: rth, torvalds

Linus Torvalds wrote:
> - we should _never_ update the PCI_INTERRUPT_LINE register, because it
>   destroys boot loader information (the same way we need to not overwrite
>   BIOS extended areas and ACPI areas etc in order to be able to reboot
>   cleanly)

	I don't think the kernel presently does this, but if it
were to actually do the chipset-specific programming change the IRQ
routing of a device, it should update PCI_INTERRUPT_LINE precisely
so that the information will be passed on across a soft reboot.

	This comes up for me because I have daone motherobard with a
BIOS that never programs the USB controller's interrupt line, so I
have to do the chipset-specific bit twiddling (which, in this case
happens to be simply writing the desired irq into the device's
PCI_INTERRUPT_LINE register anyhow).  By the way, I also had to change
arch/i386/kernel/pci.c to get it to reread PCI_INTERRUPT_LINE if it
thought the interrupt was not routed, although all that I would really
need is some way for a user level program to persuade the kernel to
believe that a particular PCI device's interrupt line A has changed to
irq n.

	This exception is probably not relevant to what Linus and
Richard are discussing, but I thought should mention it, lest that
"_never_" be interpreted too absolutely.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 39+ messages in thread
* /proc/pci deprecation?
@ 2002-12-06 21:13 Patrick Mochel
  2002-12-06 22:17 ` Jeff Garzik
  0 siblings, 1 reply; 39+ messages in thread
From: Patrick Mochel @ 2002-12-06 21:13 UTC (permalink / raw)
  To: linux-kernel


ISTR /proc/pci being deprecated at one point in the past. It may have only
been discussed, though. In which case, is it possible to deprecate it?
lscpi(8) is considered a superior means to derive the same information.

Elimination of it would eliminate a chunk of code in drivers/pci/proc.c, 
and obviate the use of struct device::name by the PCI layer. This change 
would probably allow us to remove the name field altogether, since PCI is 
the only code that really relies on it (and only for /proc/pci AFAICT).

Is anything in userspace still relying on /proc/pci? 

	-pat


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

end of thread, other threads:[~2002-12-13 12:35 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-06 23:18 /proc/pci deprecation? Petr Vandrovec
2002-12-07  7:44 ` Willy Tarreau
2002-12-07 13:20   ` Tomas Szepe
2002-12-07 19:03   ` Linus Torvalds
2002-12-08  2:56     ` Patrick Mochel
2002-12-08  4:21       ` Linus Torvalds
2002-12-08 20:56         ` Richard Henderson
2002-12-09  1:54           ` Linus Torvalds
2002-12-09  3:59             ` Patrick Mochel
2002-12-13 12:36               ` kernel isapnp (2.4.20) h-peter recktenwald
2002-12-09 13:35             ` /proc/pci deprecation? Ivan Kokshaysky
2002-12-09 14:11             ` Alan Cox
2002-12-09 17:00               ` Linus Torvalds
2002-12-09 18:29                 ` Alan Cox
2002-12-09 18:11                   ` Linus Torvalds
2002-12-09 18:16                     ` Jeff Garzik
2002-12-10  0:43                     ` Alan Cox
2002-12-10  0:30                       ` Linus Torvalds
2002-12-10  5:57                   ` Eric W. Biederman
2002-12-09 23:27                 ` Vojtech Pavlik
2002-12-09 14:14             ` Alan Cox
2002-12-10 16:42         ` Martin Mares
2002-12-07 12:35 ` Erik Hensema
2002-12-07 13:15   ` Dr. David Alan Gilbert
2002-12-07 17:46     ` Arnaldo Carvalho de Melo
2002-12-09 19:03       ` Rogier Wolff
2002-12-09 19:08         ` Arnaldo Carvalho de Melo
2002-12-07 13:14 ` Tomas Szepe
2002-12-07 18:52   ` Petr Vandrovec
2002-12-08 12:30     ` Erik Hensema
2002-12-09 10:14       ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2002-12-09 11:00 Nicolas Mailhot
2002-12-09  9:15 Adam J. Richter
2002-12-06 21:13 Patrick Mochel
2002-12-06 22:17 ` Jeff Garzik
2002-12-06 22:13   ` Patrick Mochel
2002-12-07 16:23     ` Krzysztof Halasa
2002-12-07 21:18     ` Kai Henningsen
2002-12-08 20:01       ` Krzysztof Halasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox