linux-mips
[Top] [All Lists]

Re: [RFC] implement syscall pciconfig_iobase

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [RFC] implement syscall pciconfig_iobase
From: Zhang Le <r0bertz@gentoo.org>
Date: Sat, 21 Feb 2009 15:03:59 +0800
Cc: linux-mips@linux-mips.org
In-reply-to: <20090220145127.GD19924@linux-mips.org>
Mail-followup-to: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20090220130156.GA14095@adriano.hkcable.com.hk> <20090220145127.GD19924@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-09)
On 14:51 Fri 20 Feb     , Ralf Baechle wrote:
> You can find the resources either by something like:
> 
> # lspci -vvv -s 1d.1
> 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #2 (rev 02) (prog-if 00 [UHCI])
>       Subsystem: Dell Device 01fe
>       Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- SERR- FastB2B- DisINTx-
>       Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>       Latency: 0
>       Interrupt: pin B routed to IRQ 21
>       Region 4: I/O ports at 6f60 [size=32]
>       Kernel driver in use: uhci_hcd
> 
> Now let's see how to find this in sysfs:
[snip]

Hi, Ralf,

After careful thought, I think this may be not what I need.
Actually libpciaccess, which is a integral component of X now, need this
mmap-able resourceN (N=1,2,3..) file. And previously mips don't have these file.
This patch just solved this problem.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98873f53becea9a8a46972ff252e96fe575b120d

What I need is access to this address in userspace:
#define LOONGSON2E_IO_PORT_BASE         0x1fd00000UL
which is defined in arch/mips/include/asm/mach-lemote/pci.h

Or maybe a better idea is to implement ioperm/iopl for mips, as discussed 7
years ago:
http://www.linux-mips.org/archives/linux-mips/2002-04/msg00085.html

Zhang, Le

<Prev in Thread] Current Thread [Next in Thread>