Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754834AbdCGH7I (ORCPT ); Tue, 7 Mar 2017 02:59:08 -0500 Received: from mail-eopbgr40064.outbound.protection.outlook.com ([40.107.4.64]:7552 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754727AbdCGH6v (ORCPT ); Tue, 7 Mar 2017 02:58:51 -0500 From: Parav Pandit To: Bart Van Assche , "gregkh@linuxfoundation.org" CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "sebott@linux.vnet.ibm.com" , "linux@armlinux.org.uk" , "hpa@zytor.com" , "mingo@redhat.com" , "dwmw2@infradead.org" , "bhelgaas@google.com" , "dledford@redhat.com" , "benh@kernel.crashing.org" Subject: RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev Thread-Topic: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev Thread-Index: AQHSltr7A9hsfT8RwUyV7gxEsYQ73qGIz5EAgAAC0hCAAAMDAIAAAKWQ Date: Tue, 7 Mar 2017 05:20:54 +0000 Message-ID: References: <20170307003549.3872-1-bart.vanassche@sandisk.com> <20170307003549.3872-2-bart.vanassche@sandisk.com> <20170307045236.GC3913@kroah.com> <1488863593.2997.3.camel@sandisk.com> In-Reply-To: <1488863593.2997.3.camel@sandisk.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: sandisk.com; dkim=none (message not signed) header.d=none;sandisk.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [68.203.16.89] x-ms-office365-filtering-correlation-id: 3cdfb1ea-f02c-429f-f9d2-08d46519ba6f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:VI1PR0502MB3008; x-microsoft-exchange-diagnostics: 1;VI1PR0502MB3008;7:38vxBjcn5yS6lEqREAK5+nqVa8P3GQATKu032F+9UzsCZUxDcVLecLaQdEYKLqpdHrVYgzqEPtJpA4LisOtqt6KAhNi4QwmoqfsVBOYgu6nnUQPh6Lld0k/L78Iz4UEWja7mneYpEDuxcige6YBh5wVDM7l7NAzQdV04VRmJEPgP8jR7uu44LOPMZIDpVOePvsM6M7sQMJ3Uy7GDG+3Ecd6izj+XSmS/+yc8NxKUyhL3rxH3qgeoDQYlxpc58kXizX6jPI1dlAKk28jCFd/hq6bvWCS8ZeswXVjtzygjRMbYs+Zd8xsdtsdmThcDM0HbHnMp6R8xaHMc5GlAl4Zqqg== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(211936372134217)(104084551191319); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(20161123558025)(6072148);SRVR:VI1PR0502MB3008;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0502MB3008; x-forefront-prvs: 0239D46DB6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39410400002)(39850400002)(377454003)(13464003)(24454002)(377424004)(53546006)(6246003)(33656002)(4326008)(122556002)(38730400002)(7736002)(7416002)(54356999)(6436002)(2900100001)(92566002)(305945005)(77096006)(3846002)(6116002)(102836003)(229853002)(2950100002)(6506006)(25786008)(54906002)(99286003)(189998001)(55016002)(8656002)(9686003)(76176999)(5660300001)(50986999)(93886004)(86362001)(3660700001)(2906002)(3280700002)(66066001)(81166006)(74316002)(2501003)(8936002)(53936002)(8676002)(7696004)(106116001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0502MB3008;H:VI1PR0502MB3008.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2017 05:20:54.0849 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3008 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 base64 to 8bit by mail.home.local id v277xlPJ029639 Content-Length: 1643 Lines: 39 Hi Bart, > -----Original Message----- > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma- > owner@vger.kernel.org] On Behalf Of Bart Van Assche > Sent: Monday, March 6, 2017 11:13 PM > To: Parav Pandit ; gregkh@linuxfoundation.org > Cc: linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; > sebott@linux.vnet.ibm.com; linux@armlinux.org.uk; hpa@zytor.com; > mingo@redhat.com; dwmw2@infradead.org; bhelgaas@google.com; > dledford@redhat.com; benh@kernel.crashing.org > Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is > embedded in struct pci_dev > > On Tue, 2017-03-07 at 05:08 +0000, Parav Pandit wrote: > > I replied with pseudo code in previous reply to Bart to bring back > dma_device member in the ib_device. > > dma_device member was already present in near past of few weeks. > > It should be able to work using it without performance impact and without > touching driver core layer like in this patch. > > That's confusing and was a source of bugs and inconsistencies. We do not > want two device structures in struct ib_device (struct device dev and struct > device *dma_device). device dev represents, dev structure of the ib_device. While dma_device is for the actual device as you know. If you look at net_device, It has device dev. vendor drivers store pci_dev pointer and access device of pci_dev etc. Every net_device driver has to do that. Ib_device simplifies that work for ib stack by storing dma_device. I think this is less confusing. > > Bart.N r y b X ǧv ^ )޺{.n + { ٚ {ay ʇڙ ,j f h z  w j:+v w j m zZ+ > ݢj" ! i