Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1308735ybx; Thu, 7 Nov 2019 10:10:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzbrV+OiO4jx7+WrhC+L6FWX3CI3BPopBPlpXz0W2YwcjSqlSL6NSEirzqZj+Mj6LF0Zm3P X-Received: by 2002:a17:906:f108:: with SMTP id gv8mr4509122ejb.180.1573150212606; Thu, 07 Nov 2019 10:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573150212; cv=none; d=google.com; s=arc-20160816; b=ZxtRzezh3YNBoWbYFI+CiWlVyNHbJPw71CAGmYbSSyymKxjJBzZkqN9b2hKo31DBHx rDbGWmVVBdrl2gsXbGQe50leQ1GLTjPD1AGVqai9gaSUlIwJc3S6nc/dVQxsVsZe5/TO RtiHuDJX9iIg4nADY+E2SzDRVdg1aNMAci6NBFh+dUnr0em9gJ5q4GTB/lvheCjlhVD7 yuIPFt/ooxK22f9t1U0idznakMoOmBge7M/e3+VIAw/bijjqBFriZC1fT7NYkptUwsCh ewgBBMJ7oG0akvTk3uK7P457tNAaBylk/zrSHYdUPatZMtzfnvvkMCJxRbTYFLs4B9m1 /0Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=dP1kaBaZwikRq4IaXJj3+2V3B38qptVryzISXA06w9g=; b=i5QeFyUP6i9Wov3l6fd8iBtoH8r9pDSF25/JH7DIh11QjeAAIiqh+8+dcFhg2yk6Z2 /OsTBRp9OKfvZ7kmyxZ2gU/YLKdMD9cFcNJCvuVQgAUYI2l2zhAZsn9xj/PSd50zJVOF 8dLHJ/IFfU9XvEaWLLN1psGYm5UmXTtojH7C9DNSyDK3psnvs5WBTUJ3Ibrr4OTU9YFe HatUu9c7qaRd2qNKcdD2mR8kT2JTAstFLYQP0LTuV/XsYEYyhRy6L/dOYI9IFqOkqSUE Rpu66S7mDGJSnVoYDRdU/YgQNc2nbohNWZ7ZfCQdiIRjpMLzgT8xHp+hGpdB/P1EUK/Z vGQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22si1748970edq.415.2019.11.07.10.09.45; Thu, 07 Nov 2019 10:10:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729311AbfKGSI5 (ORCPT + 99 others); Thu, 7 Nov 2019 13:08:57 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:23336 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbfKGSI5 (ORCPT ); Thu, 7 Nov 2019 13:08:57 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xA7I7L7I031779 for ; Thu, 7 Nov 2019 13:08:55 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w4qcf2dps-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Nov 2019 13:08:55 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Nov 2019 18:08:52 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 7 Nov 2019 18:08:43 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xA7I86IF10486184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Nov 2019 18:08:06 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F06D64C044; Thu, 7 Nov 2019 18:08:41 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BFE874C04E; Thu, 7 Nov 2019 18:08:40 +0000 (GMT) Received: from pic2.home (unknown [9.145.15.120]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 7 Nov 2019 18:08:40 +0000 (GMT) Subject: Re: [PATCH 10/10] ocxl: Conditionally bind SCM devices to the generic OCXL driver To: "Alastair D'Silva" , alastair@d-silva.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Keith Busch , Ira Weiny , Geert Uytterhoeven , Anton Blanchard , Krzysztof Kozlowski , Vasant Hegde , David Gibson , Hari Bathini , Allison Randal , Anju T Sudhakar , Mahesh Salgaonkar , =?UTF-8?Q?C=c3=a9dric_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 References: <20191025044721.16617-1-alastair@au1.ibm.com> <20191025044721.16617-11-alastair@au1.ibm.com> From: Frederic Barrat Date: Thu, 7 Nov 2019 19:08:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191025044721.16617-11-alastair@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19110718-0012-0000-0000-00000361A638 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19110718-0013-0000-0000-0000219D084A Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-07_05:,, 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-1911070167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : > From: Alastair D'Silva > > This patch allows the user to bind OpenCAPI SCM devices to the generic OCXL > driver. > > Signed-off-by: Alastair D'Silva > --- I'm wondering if we should upstream this. Is it of any use outside of some serious debug session for a developer? Also we would now have 2 drivers picking up the same device ID, since the SCM driver is always registering for that ID, irrespective of CONFIG_OCXL_SCM_GENERIC Fred > drivers/misc/ocxl/Kconfig | 7 +++++++ > drivers/misc/ocxl/pci.c | 3 +++ > 2 files changed, 10 insertions(+) > > 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. > > 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[] = { > { 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); >