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=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 034B1C63697 for ; Wed, 18 Nov 2020 11:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97AB824181 for ; Wed, 18 Nov 2020 11:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727719AbgKRLPK (ORCPT ); Wed, 18 Nov 2020 06:15:10 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:37552 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726156AbgKRLPJ (ORCPT ); Wed, 18 Nov 2020 06:15:09 -0500 Received: by mail-oi1-f193.google.com with SMTP id m17so1791637oie.4; Wed, 18 Nov 2020 03:15:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D8wT37MkPFkyxY6qYH5+6Fkhw2mpanFwYZDumxMMKKk=; b=HyHYGweC6n65p+vjQ8/8miLZYweHigIBz4YeORsAnKGEDjb452OSKvcYNxHXy1irjb hXFSzv1aZ8usyQsRJzDyuhWX9Vb9hA8ttiY0EX89XSYccfCS3TsK+Ub1KJL8mnPeHUaz cSVp8AfSzbq1bKTxx2CRAvNqFMde6JcfVy20IYZO4iWDvsUrL+pOcnppd+4tu3bXDEdo B97MI/Xf2LF1AvSzWL2Kr3XFRcw5cbaiHHy7sYFa5qJXwqGHzqghI+WimeUcyfoBpVQp uHDdE1gAQSXPYC6yc/N0l1RP1v8SCI+0f0gOQ5nwvMyhaHTcNKwhrCyTkG2lz/obF5O5 TGVw== X-Gm-Message-State: AOAM530BapPIJyxlarGunAZBc1jK9QuAlpvCaP/HKkA84OnSf0ZvHS2d gxEyJBuLRpQdVCgc3n1FW9D9gTUSmkx9a5Y3t8g= X-Google-Smtp-Source: ABdhPJzei9Pt9brHCLe1ebo8Ar52GK3xgnsIYzUePmBrlhAXtq1sMyLFWo7UO2GTITvUtXBAJsO4hUqZYtB8eqd5Eeg= X-Received: by 2002:aca:c4c9:: with SMTP id u192mr2294643oif.69.1605698108951; Wed, 18 Nov 2020 03:15:08 -0800 (PST) MIME-Version: 1.0 References: <20201111054356.793390-1-ben.widawsky@intel.com> <20201111054356.793390-2-ben.widawsky@intel.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 18 Nov 2020 12:14:56 +0100 Message-ID: Subject: Re: [RFC PATCH 1/9] cxl/acpi: Add an acpi_cxl module for the CXL interconnect To: Dan Williams Cc: "Rafael J. Wysocki" , Ben Widawsky , linux-cxl@vger.kernel.org, Linux Kernel Mailing List , Linux PCI , ACPI Devel Maling List , Ira Weiny , Vishal Verma , "Kelley, Sean V" , Bjorn Helgaas , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Tue, Nov 17, 2020 at 10:45 PM Dan Williams wrote: > > On Tue, Nov 17, 2020 at 6:33 AM Rafael J. Wysocki wrote: > [..] > > > +static struct acpi_driver acpi_cxl_driver = { > > > > First of all, no new acpi_driver instances, pretty please! > > > > acpi_default_enumeration() should create a platform device with the > > ACPI0017 ID for you. Can't you provide a driver for this one? > > > > Ah, yes, I recall we had this discussion around the time the ACPI0012 > NFIT driver was developed. IIRC the reason ACPI0012 remaining an > acpi_driver was due to a need to handle ACPI notifications, is that > the deciding factor? Sort of. In fact, a platform device driver can still handle ACPI notifications just fine, it just needs to install a notify handler for that. The cases when an acpi_driver is really needed are basically when creating the platform device during the enumeration is not desirable, like in the PCI or PNP cases (because they both create device objects of a different type to represent the "physical" device). It doesn't look like it is really needed for ACPI0012, but since it is there already, well ... > ACPI0017 does not have any notifications so it seems like platform driver is the way to go. Indeed.