linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominic Eschweiler <eschweiler@fias.uni-frankfurt.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
	Andreas Schallenberg <embedded@gmx.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kvm@vger.kernel.org
Subject: Re: UIO: missing resource mapping
Date: Fri, 13 Jul 2012 16:42:51 +0200	[thread overview]
Message-ID: <1342190571.6607.36.camel@blech> (raw)
In-Reply-To: <20120713132223.GA10959@redhat.com>

Am Freitag, den 13.07.2012, 16:22 +0300 schrieb Michael S. Tsirkin:
> Could you give an example of the problem? How do you bind
> both UIO and another driver to the same device? 

Sorry, I'm looking on it from the user-space perspective. Maybe I'm
wrong, but I can give you an example :

lspci -v
...
03:00.0 Network controller: Broadcom Corporation BCM4331 802.11a/b/g/n
(rev 02)
	Subsystem: Apple Inc. AirPort Extreme
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Memory at b0600000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [58] Vendor Specific Information: Len=78 <?>
	Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [d0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [13c] Virtual Channel
	Capabilities: [160] Device Serial Number 85-f2-6d-ff-ff-42-68-a8
	Capabilities: [16c] Power Budgeting <?>
	Kernel driver in use: bcma-pci-bridge
...

This Device has one 64 Bit Bar. When I look at the related sysfs
entry ...


ls /sys/bus/pci/devices/0000:03:00.0
...
--w------- 1 root root 4.0K Jul 13 16:35 reset
-r--r--r-- 1 root root 4.0K Jul 12 21:43 resource
-rw------- 1 root root  16K Jul 13 16:35 resource0
lrwxrwxrwx 1 root root    0 Jul 12 23:41 subsystem
-> ../../../../bus/pci
...

... I can see that it should be possible to map resource0 and directly
write into a BAR which is already managed by a kernel drivers. 

Moving this functionality to UIO would only generate those resource
files, if the device is handled by UIO and therefore intended to be
managed from the user-space. 

-- 
Gruß
  Dominic


  parent reply	other threads:[~2012-07-13 14:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  7:26 UIO: missing resource mapping Andreas Schallenberg
2012-07-12 19:44 ` Hans J. Koch
2012-07-12 23:16   ` Michael S. Tsirkin
2012-07-12 23:40     ` Hans J. Koch
2012-07-12 23:58       ` Michael S. Tsirkin
2012-07-13  8:09     ` Dominic Eschweiler
2012-07-13 13:22       ` Michael S. Tsirkin
2012-07-13 14:18         ` Hans J. Koch
2012-07-13 14:44           ` Dominic Eschweiler
2012-07-13 14:42         ` Dominic Eschweiler [this message]
2012-07-13 18:19           ` Michael S. Tsirkin
2012-07-16 18:16             ` Dominic Eschweiler
2012-07-16 21:58               ` Hans J. Koch
2012-07-18 10:40                 ` Dominic Eschweiler
2012-07-18 23:47                   ` Hans J. Koch
2012-08-06 11:49                     ` Dominic Eschweiler
2012-08-08 22:08                   ` Hans J. Koch

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=1342190571.6607.36.camel@blech \
    --to=eschweiler@fias.uni-frankfurt.de \
    --cc=embedded@gmx.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hjk@hansjkoch.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    /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).