Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbdILMSw (ORCPT ); Tue, 12 Sep 2017 08:18:52 -0400 Received: from mail-sn1nam02on0057.outbound.protection.outlook.com ([104.47.36.57]:13337 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751457AbdILMSn (ORCPT ); Tue, 12 Sep 2017 08:18:43 -0400 Authentication-Results: spf=pass (sender IP is 204.128.141.23) smtp.mailfrom=infinera.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=infinera.com; From: Joakim Tjernlund To: "linux-kernel@vger.kernel.org" , "gregkh@linuxfoundation.org" Subject: uio_dmem_genirq.c and DMA mapping to user space ? Thread-Topic: uio_dmem_genirq.c and DMA mapping to user space ? Thread-Index: AQHTK8E8HLPFFLcg7UGmHa5JtgT7eA== Date: Tue, 12 Sep 2017 12:18:27 +0000 Message-ID: <1505218705.31322.108.camel@infinera.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.100.99.93] Content-Type: text/plain; charset="iso-8859-15" Content-ID: <0738A8912579094F958C3CFD6222234F@infinera.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:204.128.141.23;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(356003)(36756003)(2900100001)(189998001)(53416004)(478600001)(7636002)(305945005)(7736002)(5660300001)(316002)(14454004)(23756003)(50466002)(33646002)(106466001)(2906002)(50986999)(54356999)(86362001)(2501003)(103116003)(8936002)(72206003)(8746002)(246002)(8676002)(77096006)(47776003)(102836003)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR10MB1003;H:owa.infinera.com;FPR:;SPF:Pass;PTR:outgoingmail1.infinera.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2NAM03FT027;1:fEHrIUtYiz8PlKbPXe321hWKt4/GQQZTOQud/3DjoBybD0S7G8kGP+Yn1Hj1sub2E2ZRG5Q+YKOolKV61uG1tZ/RU6CFKmZBy13x174tQ+O6sfQSj71u/P0NoPA/NKBo X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53d2d611-d74f-4852-20b4-08d4f9d8605b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM3PR10MB1003; X-Microsoft-Exchange-Diagnostics: 1;DM3PR10MB1003;3:vwDK27sz8Bt+LZYsV3WUf6owdwxEsqbhYOdG9BcctpVR3Y/ak75JEad5g7FD0ar6XA//tDqoSLX2ioixpND8UGjToX9ZT8Dpa6dItS1iK8wnCjDlrZIB4GHGqiPBlNUQmQhWpvlykVllq76+uf5m2NsDT2xXADtSkugcT0QdgnSipzfUWFf5ZvU6KYSKDb+zhpf1HTttJslGd2a92x70a62ZzX7JkQQJb+JDkcT0zr+84ytK6maJQOOwOTrkvQOYMZ8herCG3AQtGLJ+5TtQLLXnqoW9MYtyfSVtJnTE2Yygys929/HUDW9rd4TjDN+qOweOFohC3sQGtX2ylS641tFq3begWOaXa+d0u5GDL9o=;25:x4L2TEkH72t+kA9euuO/W2nZlxjsdOFGVd/YjRGVHQT+as7f61DaoW/KFWvsvQFv4UVpSdusmVJEheqUBv59suOc0pCVg0NmOKpZYB745cv95wjdfpNyAkYEfFZKOZybx6imyu7CQNnW3y36WCZtCp4Siz7l6F0jbtvn71r/CTPDbWRZ713DHUZq120idD8rClkWiYl3q3QmqC90N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lVLP5v4b6g4GM/qMghfpdM1nDHHQ2ipNOHkia1U+s4nho4WLJsU X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(93006095)(93004095)(10201501046)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM3PR10MB1003;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM3PR10MB1003; X-Forefront-PRVS: 042857DBB5 X-Microsoft-Exchange-Diagnostics: 1;DM3PR10MB1003;23:ER9ZKCQ1jn0QmLKHuhIUdo3FO/r2Qvfp2kh6tnN3iuR/gk0tetMUWfcSySBVhH8ikVFFucWyQpbOpJzP4X9KPqF2qBBB0NnvY7WOkvrGI8V1WhouhIzSvsskdQMGnacmIIiHamExbLFVF8yKMejniMLhoXVrzOPfi9TYnko9PjeGCY3Ics3JH3WSlOPIaqgGIg8zrqJ+9l1UsLKBcF5EHbEucw2Yy029O5JcO8sWrE2SYvq4wqi5TCs7SXNvW3kzzDtfAqGJJwCXDsjH/TE8k/WYlITUtv/B7c/o1wM9nIWN3MAnJgAVnzzL1fHHlqlVvMfLM4nSpwPw3s5H6WOOjmyhfKHn91DZQNT1/EvpnQoYz+uV3IHZwpf5gAeXLORZyTo5zga6KgDsYShKbCZiPW63i3dDy7YOM7VmWaafMs4T98aS5yS/lUGHbrHbz+//wB7WhNMCd4hyJFVTiUu6SNn84n+D7zBIh0QFJaHk3tb6JFX9LVIxg8q2icLu5nQ40+twYgRf7PH7ZVw5XR92mlbCfC0cGDr+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lEc8du6lLtsrMsc0OOQHnWzrdkbdFirmqa1w/89TsfkMxBHzQAjbdjevlS4ZjN1MsC1J6svG8zxvsvIGu7L4pASiWnLOuyrP69MFGqgX7pRE9hrX957KK/AtO3thyoJEqoi34XrM2aF7k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: infinera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2017 12:18:29.0450 (UTC) X-MS-Exchange-CrossTenant-Id: 285643de-5f5b-4b03-a153-0ae2dc8aaf77 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=285643de-5f5b-4b03-a153-0ae2dc8aaf77;Ip=[204.128.141.23];Helo=[owa.infinera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR10MB1003 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8CCIxP2023213 Content-Length: 464 Lines: 14 Hi I am trying to use the uio_dmem_genirq.c driver for allocating DMA memory to a PCI device using the uio_pci_generic.c driver. I got as far as defining an UIO dev containing only Dynamic DMA memory and now I am stuck. I can see how DMA memory is allocated when opening the /dev/uio device but I cannot figure out how to mmap this memory to User space as well so I can share this memory with the PCI device and my user space driver. What am I missing? Jocke