From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] doc: remove iomem and ioport handling in igb_uio Date: Fri, 30 Sep 2016 11:13:16 +0100 Message-ID: <35ec3183-09a4-d5c8-df2d-90ba5485a3f0@intel.com> References: <1472696197-37614-1-git-send-email-jianfeng.tan@intel.com> <1474523045-2674-1-git-send-email-jianfeng.tan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: david.marchand@6wind.com, thomas.monjalon@6wind.com To: Jianfeng Tan , dev@dpdk.org Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id ADAAA29CD for ; Fri, 30 Sep 2016 12:13:18 +0200 (CEST) In-Reply-To: <1474523045-2674-1-git-send-email-jianfeng.tan@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/22/2016 6:44 AM, Jianfeng Tan wrote: > In igb_uio, iomem is mapped, and both ioport and io mem are recorded > into uio framework (then into sysfs files), which is duplicated with > what Linux has already provided for user space, and makes the code > too complex. > > For iomem, DPDK user space code never opens or reads files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/. Instead, > /sys/pci/bus/devices/xxxx:xx:xx.x/resourceY are used to map device > memory. > > For ioport, non-x86 platforms cannot read from files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/ directly, because > non-x86 platforms need to map port region for access in user space, > see non-x86 version pci_uio_ioport_map(). x86 platforms can use the > the same way as uio_pci_generic. > > This will remove iomem and ioport mapping in igb_uio kernel module, > and adjusts the iomem implementation in both igb_uio and > uio_pci_generic: > - for x86 platform, get ports info from /proc/ioports; > - for non-x86 platform, map and get ports info by pci_uio_ioport_map(). > > Note: this will affect those applications who are using files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/ and > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/. > > Suggested-by: Yigit, Ferruh > Signed-off-by: Jianfeng Tan > --- Acked-by: Ferruh Yigit