Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757911AbcLOJsC (ORCPT ); Thu, 15 Dec 2016 04:48:02 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:2930 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755107AbcLOJr6 (ORCPT ); Thu, 15 Dec 2016 04:47:58 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 15 Dec 2016 01:47:56 -0800 Subject: Re: [PATCH] vfio-mdev: Fix mtty sample driver building To: Alex Williamson References: <20161214193859.32293.43760.stgit@gimli.home> <20161215011218.1103e435@t450s.home> CC: , , X-Nvconfidentiality: public From: Kirti Wankhede Message-ID: <2e5f62bd-1dc9-f4cc-66b4-de72a9b0ea78@nvidia.com> Date: Thu, 15 Dec 2016 15:17:46 +0530 MIME-Version: 1.0 In-Reply-To: <20161215011218.1103e435@t450s.home> X-Originating-IP: [10.24.216.210] X-ClientProxiedBy: BGMAIL103.nvidia.com (10.25.59.12) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2869 Lines: 89 On 12/15/2016 1:42 PM, Alex Williamson wrote: > On Thu, 15 Dec 2016 13:15:34 +0530 > Kirti Wankhede wrote: > >> On 12/15/2016 1:09 AM, Alex Williamson wrote: >>> This sample driver was originally under Documentation/ and was moved >>> to samples, but build support was never adjusted for the new location. >>> >>> Signed-off-by: Alex Williamson >>> --- >>> samples/Kconfig | 7 +++++++ >>> samples/Makefile | 3 ++- >>> samples/vfio-mdev/Makefile | 14 +------------- >>> 3 files changed, 10 insertions(+), 14 deletions(-) >>> >> >> This change would bring this example driver in Kernel build system if >> selected. I do have verified build and tested it on x86_64 platform. >> Have you verified x86 and PPC/ARM build (which I think primarily could >> use VFIO)? > > I have not, but I'm fairly confident that CONFIG_SAMPLES is not a > typical user or distro config option, so I think we're at a low risk > of breaking anyone. In general I test almost exclusively for x86_64 and > rely on external auto builders to identify issues on other archs. Ok. I'm fine with this change. Also saw Eric's confirmation on ARM aarch64 compilations. Thanks. Reviewed-by: Kirti Wankhede Thanks, Kirti > Thanks, > > Alex > >>> diff --git a/samples/Kconfig b/samples/Kconfig >>> index a6d2a43..b124f62 100644 >>> --- a/samples/Kconfig >>> +++ b/samples/Kconfig >>> @@ -105,4 +105,11 @@ config SAMPLE_BLACKFIN_GPTIMERS >>> help >>> Build samples of blackfin gptimers sample module. >>> >>> +config SAMPLE_VFIO_MDEV_MTTY >>> + tristate "Build VFIO mtty example mediated device sample code -- loadable modules only" >>> + depends on VFIO_MDEV_DEVICE && m >>> + help >>> + Build a virtual tty sample driver for use as a VFIO >>> + mediated device >>> + >>> endif # SAMPLES >>> diff --git a/samples/Makefile b/samples/Makefile >>> index e17d66d..86a137e 100644 >>> --- a/samples/Makefile >>> +++ b/samples/Makefile >>> @@ -2,4 +2,5 @@ >>> >>> obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ >>> hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ >>> - configfs/ connector/ v4l/ trace_printk/ blackfin/ >>> + configfs/ connector/ v4l/ trace_printk/ blackfin/ \ >>> + vfio-mdev/ >>> diff --git a/samples/vfio-mdev/Makefile b/samples/vfio-mdev/Makefile >>> index a932edb..cbbd868 100644 >>> --- a/samples/vfio-mdev/Makefile >>> +++ b/samples/vfio-mdev/Makefile >>> @@ -1,13 +1 @@ >>> -# >>> -# Makefile for mtty.c file >>> -# >>> -KERNEL_DIR:=/lib/modules/$(shell uname -r)/build >>> - >>> -obj-m:=mtty.o >>> - >>> -modules clean modules_install: >>> - $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) $@ >>> - >>> -default: modules >>> - >>> -module: modules >>> +obj-$(CONFIG_SAMPLE_VFIO_MDEV_MTTY) += mtty.o >>> >