Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2850477pxb; Fri, 12 Feb 2021 03:05:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzudkQoHeP3dsEqkTPTkGxcya2T/5BfwrMVvu2IwwHSt41+uyiAQSc1M8DxIIxyqSJSoip4 X-Received: by 2002:aa7:c755:: with SMTP id c21mr2754126eds.47.1613127919660; Fri, 12 Feb 2021 03:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613127919; cv=none; d=google.com; s=arc-20160816; b=vr7qubp9xr5aS1Yiq7pL8Vdnp6TfR89mZ4cWz2TfpL3qfDAEng9a755CHfwDWyE+rC eXWLTozVaMGwzBcc7HI9zYLcb7PJb1xstp3+Z1GhAenT/1WO2soIRYujSsqwLk+Uhe4F gonav8Xzk1v8P9nZPEXYiLYXL5WyzX2dMwqDuUJmkM92N0SoHvY5opcdmL4dLcq19WbS qs6UMnOy57lxoIm3aw2AMYlRqABFermkVpZPnnSsNsGAZzRFsZ+d/His08raUAEuLu8Z /kqYt9Kj6qMUwz8SL9V798j6rhl2slwE1gf7w+yIwVauq1rR1ZYcjXYYoTgQbmF1kfzk yFFg== 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=bUZ5msK56xGZMndYPTwoG90kzp6MWPcuqTyZmLM4m3I=; b=YJ9w+aqWlAEGw6ZHlJsBxzi0lKZqthCCCcvr650+XmYxzFbbLttr42AqIC9Nc5wvM6 rRClBwg3JHfQOs/33Lr1lp16798L2F80E54ZEvuSbvBB4e4wFMhoSCwuQHR3eKuF2Rnz /VHo3SycjlbYuw3JDFwAdwaefR97dKZ69/rBjtGzE3nNcy3Nj5Oi3dUSIGdsnAPuKFBn ZBqqqrfwwHKyvZdXj8Nc7EKCg8YHzhzs0ICo9vVetGDvVfaVR3egaKfKeiq620HIyrSg aisRTBQNy+vLDrDN3HRzFrOgyveG7tBrzy/7hye5kMynnyK/lfa0LwGZA9aymKKRmBNM Z6Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SkGnK2cK; 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 r4si7001824edi.177.2021.02.12.03.04.56; Fri, 12 Feb 2021 03:05:19 -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=SkGnK2cK; 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 S230280AbhBLLDC (ORCPT + 99 others); Fri, 12 Feb 2021 06:03:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:58422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230318AbhBLLA6 (ORCPT ); Fri, 12 Feb 2021 06:00:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AF0964E6C; Fri, 12 Feb 2021 11:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613127617; bh=BWRBsjwiSKYLwWPvGudoNuvoYqx9M15+3k2atM4UMEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SkGnK2cKmvjUrYQXiDLnAm+9kD1UIHC6nfB8BmBu+ySVMxWkoEE0CX6W2ahagWtLG qXAZtJalwun1n+7HHJM6/nZaV16DZDPRndtjgBkmrY8tyCIul9VLDrk0HgkR69KIx5 X/IGrykAwycbMZRxzyt5eDIT1fr9WZ2mV5RSLwaM= Date: Fri, 12 Feb 2021 12:00:14 +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 1/3] misc/pvpanic: split-up generic and platform dependent code Message-ID: References: <1613121426-15585-1-git-send-email-mihai.carabas@oracle.com> <1613121426-15585-2-git-send-email-mihai.carabas@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 12:29:49PM +0200, Mihai Carabas wrote: > ..snip > > > -}; > > > -module_platform_driver(pvpanic_mmio_driver); > > > diff --git a/drivers/misc/pvpanic/Kconfig b/drivers/misc/pvpanic/Kconfig > > > new file mode 100644 > > > index 00000000..0dce6ef > > > --- /dev/null > > > +++ b/drivers/misc/pvpanic/Kconfig > > > @@ -0,0 +1,12 @@ > > > +config PVPANIC > > > + bool "pvpanic device support" > > > + help > > > + This option enables pvpanic device driver. > > No it doesn't, it allows you to _select_ a specific pvpanic driver, on > > its own, it is not a driver, right? > > Yes. I will update the comment. > > > > > + > > > +config PVPANIC_MMIO > > > + tristate "pvpanic MMIO device support" > > > + depends on HAS_IOMEM && (ACPI || OF) && 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 > > > new file mode 100644 > > > index 00000000..9ea3355 > > > --- /dev/null > > > +++ b/drivers/misc/pvpanic/Makefile > > > @@ -0,0 +1,2 @@ > > > +obj-$(CONFIG_PVPANIC_MMIO) += pvpanic-mmio.o > > > +pvpanic-mmio-objs := pvpanic-common.o mmio.o > > You put the "common" logic in the mmio driver? How is that going to > > work for the PCI driver? > > > > Why is there not a pvpanic.ko that contains the "core" code only? > > My intention was to put the code in both drivers. There is no generic module > as it will complicate things: the generic module would have to have its own > state (e.g. pvpanic_probe would have to create a queue of base addresses). And when you link both into the kernel image directly, you end up with duplicate symbols that break the build :( > Do you want to see a generic module pvpanic.ko with its own state? As it is, it will just not work so you have to do something... thanks, greg k-h