From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 142F9C43331 for ; Fri, 8 Nov 2019 00:37:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEE70207FA for ; Fri, 8 Nov 2019 00:37:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEE70207FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=au1.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 62ECB6B0005; Thu, 7 Nov 2019 19:37:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5DF376B0006; Thu, 7 Nov 2019 19:37:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CD9F6B0007; Thu, 7 Nov 2019 19:37:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 32DFE6B0005 for ; Thu, 7 Nov 2019 19:37:30 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id C50F38249980 for ; Fri, 8 Nov 2019 00:37:29 +0000 (UTC) X-FDA: 76131246618.02.coat93_415fa842c6354 X-HE-Tag: coat93_415fa842c6354 X-Filterd-Recvd-Size: 7189 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 00:37:29 +0000 (UTC) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xA80WhAi157283 for ; Thu, 7 Nov 2019 19:37:28 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2w4ufnvd62-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Nov 2019 19:37:28 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 8 Nov 2019 00:37:25 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 8 Nov 2019 00:37:17 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xA80bGhr40173716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 8 Nov 2019 00:37:16 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C106F52050; Fri, 8 Nov 2019 00:37:16 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2601B5204E; Fri, 8 Nov 2019 00:37:16 +0000 (GMT) Received: from adsilva.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id C87D3A01E3; Fri, 8 Nov 2019 11:37:13 +1100 (AEDT) Subject: Re: [PATCH 10/10] ocxl: Conditionally bind SCM devices to the generic OCXL driver From: "Alastair D'Silva" To: Frederic Barrat Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Keith Busch , Ira Weiny , Anton Blanchard , Krzysztof Kozlowski , Vasant Hegde , David Gibson , Hari Bathini , Allison Randal , Anju T Sudhakar , Mahesh Salgaonkar , =?ISO-8859-1?Q?C=E9dric?= Le Goater , Thomas Gleixner , Greg Kurz , Nicholas Piggin , Masahiro Yamada , Alexey Kardashevskiy , Andrew Morton , David Hildenbrand , Oscar Salvador , Michal Hocko , Pavel Tatashin , Wei Yang , Qian Cai , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org Date: Fri, 08 Nov 2019 11:37:14 +1100 In-Reply-To: References: <20191025044721.16617-1-alastair@au1.ibm.com> <20191025044721.16617-11-alastair@au1.ibm.com> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1 (3.34.1-1.fc31) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19110800-0020-0000-0000-0000038390E2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19110800-0021-0000-0000-000021D9C758 Message-Id: <46d72d7b2f91900c4499db127e365baade38e18c.camel@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-07_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911080004 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 2019-11-07 at 19:08 +0100, Frederic Barrat wrote: >=20 > Le 25/10/2019 =C3=A0 06:47, Alastair D'Silva a =C3=A9crit : > > From: Alastair D'Silva > >=20 > > This patch allows the user to bind OpenCAPI SCM devices to the > > generic OCXL > > driver. > >=20 > > Signed-off-by: Alastair D'Silva > > --- >=20 > I'm wondering if we should upstream this. Is it of any use outside > of=20 > some serious debug session for a developer? > Also we would now have 2 drivers picking up the same device ID, > since=20 > the SCM driver is always registering for that ID, irrespective of=20 > CONFIG_OCXL_SCM_GENERIC >=20 > Fred >=20 I think I'll drop this patch. It's easy enough to maintain out-of-tree for our in-house SCM hardware engineers. >=20 > > drivers/misc/ocxl/Kconfig | 7 +++++++ > > drivers/misc/ocxl/pci.c | 3 +++ > > 2 files changed, 10 insertions(+) > >=20 > > diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig > > index 1916fa65f2f2..8a683715c97c 100644 > > --- a/drivers/misc/ocxl/Kconfig > > +++ b/drivers/misc/ocxl/Kconfig > > @@ -29,3 +29,10 @@ config OCXL > > dedicated OpenCAPI link, and don't follow the same protocol. > > =20 > > If unsure, say N. > > + > > +config OCXL_SCM_GENERIC > > + bool "Treat OpenCAPI Storage Class Memory as a generic OpenCAPI > > device" > > + default n > > + help > > + Select this option to treat OpenCAPI Storage Class Memory > > + devices an generic OpenCAPI devices. > > diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c > > index cb920aa88d3a..7137055c1883 100644 > > --- a/drivers/misc/ocxl/pci.c > > +++ b/drivers/misc/ocxl/pci.c > > @@ -10,6 +10,9 @@ > > */ > > static const struct pci_device_id ocxl_pci_tbl[] =3D { > > { PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x062B), }, > > +#ifdef CONFIG_OCXL_SCM_GENERIC > > + { PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x0625), }, > > +#endif > > { } > > }; > > MODULE_DEVICE_TABLE(pci, ocxl_pci_tbl); > >=20 --=20 Alastair D'Silva Open Source Developer Linux Technology Centre, IBM Australia mob: 0423 762 819