public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: willy@debian.org, jbarnes@engr.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: multi-domain PCI and sysfs
Date: Tue, 7 Sep 2004 16:11:40 -0700	[thread overview]
Message-ID: <20040907161140.29fbfccc.davem@davemloft.net> (raw)
In-Reply-To: <9e47339104090715585fa4f8af@mail.gmail.com>

On Tue, 7 Sep 2004 18:58:53 -0400
Jon Smirl <jonsmirl@gmail.com> wrote:

> > $ ls -1 /sys/devices/
> > pci0000:00
> > pci0000:80
> > pci0000:a0
> > pci0000:c0
> > platform
> > system
> 
> How many active VGA devices can I have in this system 1 or 4? If the
> answer is 4, how do I independently address each VGA card? If the
> answer is one, you can see why I want a pci0000 node to hold the
> attribute for turning it off and on.

I don't know about the above but for a multi-domain system the
way it works is that the I/O ports are accessed using a different
base address for each domain.

On my box I/O space looks like:

7ffed000000-7ffedffffff : SCHIZO0 PBMA
  7ffed000300-7ffed0003ff : 0000:00:04.0
    7ffed000300-7ffed0003fe : qlogicfc
7ffef000000-7ffefffffff : SCHIZO0 PBMB
  7ffef000300-7ffef0003ff : 0001:00:06.0
    7ffef000300-7ffef0003ff : sym53c8xx
  7ffef000400-7ffef0004ff : 0001:00:06.1
    7ffef000400-7ffef0004ff : sym53c8xx

SCHIZO is the PCI controller name, there are two PCI segments.

davem@nuts:~$ ls /sys/devices/pci*
/sys/devices/pci0000:00:
0000:00:00.0  0000:00:01.0  0000:00:04.0  detach_state

/sys/devices/pci0001:00:
0001:00:00.0  0001:00:03.0  0001:00:05.2  0001:00:06.1
0001:00:01.0  0001:00:05.0  0001:00:05.3  detach_state
0001:00:02.0  0001:00:05.1  0001:00:06.0
davem@nuts:~$ 

So to access some VGA port on domain zero the
address would likely end up being:

	0x7ffed000000 + VGA_FOO

This is a real touchy area btw, because if there is no
VGA card, such I/O port accesses are going to trap and
we need to have a common way to handle that somehow.


  reply	other threads:[~2004-09-07 23:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 20:00 multi-domain PCI and sysfs Jon Smirl
2004-09-04 21:57 ` Jesse Barnes
2004-09-04 22:12   ` Jon Smirl
2004-09-04 22:27     ` Jesse Barnes
2004-09-04 22:45       ` Jon Smirl
2004-09-04 23:03         ` Jesse Barnes
2004-09-05 23:04           ` Matthew Wilcox
2004-09-05 23:50             ` Jon Smirl
2004-09-05 23:00               ` Alan Cox
2004-09-06  1:40               ` Matthew Wilcox
2004-09-07 22:58                 ` Jon Smirl
2004-09-07 23:11                   ` David S. Miller [this message]
2004-09-08  3:39                     ` Jon Smirl
2004-09-08  4:12                       ` David S. Miller
2004-09-08  4:16                       ` Jesse Barnes
2004-09-08  4:15                     ` Jesse Barnes
2004-09-08  4:16                       ` David S. Miller
2004-09-08  4:25                         ` Jesse Barnes
2004-09-08  6:01                           ` Jon Smirl
2004-09-08 13:02                             ` Alan Cox
2004-09-08 16:02                             ` Jesse Barnes
2004-09-08 18:20                               ` David S. Miller
2004-09-08 18:32                                 ` Jesse Barnes
2004-09-08 18:54                                   ` David S. Miller
2004-09-08  6:55                           ` Jon Smirl
2004-09-08 11:11                             ` Geert Uytterhoeven
2004-09-08 11:38                               ` Matthew Wilcox
2004-09-08 18:21                             ` David S. Miller
2004-09-08 22:41                               ` Alan Cox
2004-09-09  0:31                                 ` Jon Smirl
2004-09-09 13:06                                   ` Alan Cox
2004-09-08 15:03                   ` Matthew Wilcox
2004-09-06  0:06             ` Jesse Barnes
2004-09-06  0:31               ` Jon Smirl
2004-09-06  1:38               ` Jon Smirl

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=20040907161140.29fbfccc.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jbarnes@engr.sgi.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@debian.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