From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] drivers/char/mem.c: Add /dev/ioports, supporting 16-bit and 32-bit ports Date: Tue, 22 Dec 2015 22:56:20 +0100 Message-ID: <201512222256.20580.arnd@arndb.de> References: <20140509191914.GA7286@jtriplet-mobl1> <4845518.edhUzAktsU@wuerfel> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Santosh Shukla Cc: "H. Peter Anvin" , josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org, Greg Kroah-Hartman , akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, Linux Kernel Mailing List , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On Tuesday 22 December 2015, Santosh Shukla wrote: > } > > So I care for /dev/ioport types interface who could do more than byte > data copy to/from user-space. I tested this patch with little > modification and could able to run pmd driver for arm/arm64 case. > > Like to know how to address pci_io region mapping problem for > arm/arm64, in-case /dev/ioports approach is not acceptable or else I > can spent time on restructuring the patch? > For the use case you describe, can't you use the vfio framework to access the PCI BARs? After all, you are talking about regular PCI devices, not access to random unknown I/O port numbers. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600AbbLVV5s (ORCPT ); Tue, 22 Dec 2015 16:57:48 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:59708 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbbLVV5q (ORCPT ); Tue, 22 Dec 2015 16:57:46 -0500 From: Arnd Bergmann To: Santosh Shukla Subject: Re: [PATCH] drivers/char/mem.c: Add /dev/ioports, supporting 16-bit and 32-bit ports Date: Tue, 22 Dec 2015 22:56:20 +0100 User-Agent: KMail/1.12.2 (Linux/3.19.0-27-generic; KDE/4.3.2; x86_64; ; ) Cc: "H. Peter Anvin" , josh@joshtriplett.org, "Greg Kroah-Hartman" , akpm@linux-foundation.org, Linux Kernel Mailing List , linux-api@vger.kernel.org References: <20140509191914.GA7286@jtriplet-mobl1> <4845518.edhUzAktsU@wuerfel> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201512222256.20580.arnd@arndb.de> X-Provags-ID: V03:K0:EhNCIQ9E3iMmf1TBNBlPYzd06fuuDqsSmXWusMGLsFcCZca9tSk FDhc6DsFwWdh3NjQbk5gGwv8uxgIk6YGfYwg/pozgm3HmTXZBkysaLZ7HI7HsQ6SrKITuKC VjzBA39nkF0IIH+HttD6cwpttbupYr/pg0am6xXal0GZhQ3FNp5aNCbt+E47JuLD5+5umqx 4OuZ26jHxAa8M+FsDRUcA== X-UI-Out-Filterresults: notjunk:1;V01:K0:YW4EqUdA0yw=:EZrLkfLdHDGY0lBP/m/lBk Mduj3KTR/37bUcSiyuY39iIWju0isHV7xI8Sy3yBeYKmz+Eon4qLisfNP4YDw+TtHLqRNs/n+ qDjQ3k+GTIXHY67lfLxIK2N3Fy38LnGv5lyhVDdy3NaDlM84WD5d5F9ErV1A41+JXPcyqLlbj /BMQnmPTBLuJpsIU1tirkchcaL/ejXCR9y4hbDFgdS1Vp1rL2zhSnWqmLvzizo+FTR6rSR0tn +nzKOmFcdfVn4DP3W1lO3nBCcIml803aJNNTNU3H0uecV05xxXzTjPcUJGE7EdMS6Gh3gYaF+ jB+aW8/4ZVStHugWZCBIOhdl/695dMhWgU+h9YVlTDGDEKtjKoYKbnfHgTGZ8u3ORoUTCkw+f 4q71nVmg1YwKOnuaHmeb8+YBZkf2A/JyXMR/dRGY6dj+M1AVm/N7/kMv+uQ6VUFjlChC+VL8k lcm8b+GZkUG24K7Z2NFsJZBvap2/+7eQA9KdRIEGLkZ/VKX6rZV8lJWG2Ddb/5W6sxKzHfa3/ NnyZFneDNk3s1NEPONlxam/lWgrx2fgR7JVNxvGKreUqfx205yM+20LcuRzQgT6a9y9+FhNVn dsEpoDiJMs/QpG9j6OdKJd78LQ4jYDYz+tjj0aQZaUPE5uTsVQeXPK7cRBzjsBx1JjB9kz1sY 9ZHY4VwfmJq7Cz955VNi9NkpqRDslSEld0JLjqFGN4bqAxoXAHhdrv0UN+V+9YQbvrXNV+JE9 dJ0pKVjELLShJ1lP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 22 December 2015, Santosh Shukla wrote: > } > > So I care for /dev/ioport types interface who could do more than byte > data copy to/from user-space. I tested this patch with little > modification and could able to run pmd driver for arm/arm64 case. > > Like to know how to address pci_io region mapping problem for > arm/arm64, in-case /dev/ioports approach is not acceptable or else I > can spent time on restructuring the patch? > For the use case you describe, can't you use the vfio framework to access the PCI BARs? After all, you are talking about regular PCI devices, not access to random unknown I/O port numbers. Arnd