Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2828304pxb; Fri, 12 Feb 2021 02:21:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyw7dCnncCL2JLIkNaVGICSJEjkclMGuGaRae80NunOcEdj8JzgHAeXJ7iTl/YgBHJ6o9ZI X-Received: by 2002:a17:906:380c:: with SMTP id v12mr2252337ejc.65.1613125265336; Fri, 12 Feb 2021 02:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613125265; cv=none; d=google.com; s=arc-20160816; b=iO1fXFviubTP7CLl6/ePiTXXP/VbqsLSb03kKIbJufOiXIKIVqaRPPau4ANVHeRrZV VAK5ma/9eeMHZePCyp/Sa/e/QXPKWcHbEKDn9zmm0dZAHAtVcPFZFS+GcWmUKL3N0Ehm 2ISDLoz77ntbrKUjUD6JktzppzO/XDZFV9Ehuz/dZgNulQ3puLTl+8GCyu3r18GBmEvv oibsj7DnWmUKp0UChgsjCQxlaI39RDEO+JX0xI8BC8037risBSDpZLBl3JIV2KnWMXT8 Q6AN40otRZO6oaqARagDZOpOgq7o7i/MEGY8WdUlM8K0dJsydS+FKSnNXXk3dDSZguy5 FNDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dh4+YIViwAgLJ0T8yHkOnTn6erlVb3XDBz/e+IYkJT8=; b=xLXtudQgRgwCTtKpYtM82GL8L3nljjzoGezo8eRWJfj54ijabLsxNTuhd51N+3z+22 6oUJuhbbqME7qneQ1TrZJ2YOBhP3TT3S5PT62JK0xjMXobErIzoaGQnh+ahcgSrhrku8 V7bblTB4WaE9W+kL9s/fdLcPuoVme7+8A4YcOLOGEg1uWw2wraD6OIxsmf3NMEic144w kBAxeht9KwuCUCDmDsquPt/hIg3EmAeuj6MRXfn2iYgBsEsJ4y/J725cs32WAkiVYQeE Eeb8NvWbrhDqqhLsXPcYzj24qoKXzWPTaZ095/6vAazCw/tuqKNT/nwhxdM4IrC2RIN0 ZeuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mavilDIN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si5857072eju.171.2021.02.12.02.20.42; Fri, 12 Feb 2021 02:21:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mavilDIN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230461AbhBLKS6 (ORCPT + 99 others); Fri, 12 Feb 2021 05:18:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:49684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbhBLKSw (ORCPT ); Fri, 12 Feb 2021 05:18:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF7A764D9E; Fri, 12 Feb 2021 10:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613125092; bh=++TO0FzpWyCcpzyrLlTpDrUGOU9gYPmoQtgnh1Lwg50=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mavilDINhCrA2C9pmaR5in8LaI8W4nt/H0G5wDQE+kq4XebTsQ863wI3/TIZEMMoa vysuEM7PFIZV6iwXgMDdqLEaGkyDxq8wcYfpZtw2L2g4sI8pFfz05n1YzQomJJsQ5c vNhSv9KCKH4lF5R1xGibfJtbJF/iHoqymfS5z70I= Date: Fri, 12 Feb 2021 11:18:09 +0100 From: Greg KH To: Mihai Carabas Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, rdunlap@infradead.org, bobo.shaobowang@huawei.com Subject: Re: [PATCH v2 2/3] misc/pvpanic: add PCI driver Message-ID: References: <1613121426-15585-1-git-send-email-mihai.carabas@oracle.com> <1613121426-15585-3-git-send-email-mihai.carabas@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1613121426-15585-3-git-send-email-mihai.carabas@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 11:17:05AM +0200, Mihai Carabas wrote: > Add support for pvpanic PCI device added in qemu [1]. At probe time, obtain the > address where to read/write pvpanic events and pass it to the generic handling > code. Will follow the same logic as pvpanic MMIO device driver. At remove time, > unmap base address and disable PCI device. > > [1] https://github.com/qemu/qemu/commit/9df52f58e76e904fb141b10318362d718f470db2 > > Signed-off-by: Mihai Carabas > --- > drivers/misc/pvpanic/Kconfig | 8 +++++++ > drivers/misc/pvpanic/Makefile | 2 ++ > drivers/misc/pvpanic/pci.c | 49 +++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 59 insertions(+) > create mode 100644 drivers/misc/pvpanic/pci.c > > diff --git a/drivers/misc/pvpanic/Kconfig b/drivers/misc/pvpanic/Kconfig > index 0dce6ef..ce8b93e 100644 > --- a/drivers/misc/pvpanic/Kconfig > +++ b/drivers/misc/pvpanic/Kconfig > @@ -10,3 +10,11 @@ config PVPANIC_MMIO > This driver provides support for the pvpanic device. pvpanic is > a paravirtualized device provided by QEMU; it lets a virtual machine > (guest) communicate panic events to the host. > + > +config PVPANIC_PCI > + tristate "pvpanic PCI device support" > + depends on PCI && PVPANIC > + help > + This driver provides support for the pvpanic device. pvpanic is > + a paravirtualized device provided by QEMU; it lets a virtual machine > + (guest) communicate panic events to the host. > diff --git a/drivers/misc/pvpanic/Makefile b/drivers/misc/pvpanic/Makefile > index 9ea3355..1763450 100644 > --- a/drivers/misc/pvpanic/Makefile > +++ b/drivers/misc/pvpanic/Makefile > @@ -1,2 +1,4 @@ > obj-$(CONFIG_PVPANIC_MMIO) += pvpanic-mmio.o > pvpanic-mmio-objs := pvpanic-common.o mmio.o > +obj-$(CONFIG_PVPANIC_PCI) += pvpanic-pci.o > +pvpanic-pci-objs := pvpanic-common.o pci.o So you now have the pvpanic-common.o file linked into both modules at the same time? What happens if they are both loaded? This feels really broken... greg k-h