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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 C4CF5C63697 for ; Wed, 18 Nov 2020 12:26:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 707D8238E6 for ; Wed, 18 Nov 2020 12:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726156AbgKRM0E (ORCPT ); Wed, 18 Nov 2020 07:26:04 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34547 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbgKRM0D (ORCPT ); Wed, 18 Nov 2020 07:26:03 -0500 Received: by mail-ot1-f65.google.com with SMTP id j14so1553667ots.1; Wed, 18 Nov 2020 04:26:01 -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=PiA+hYcssZWHOVn8FUP0jNEzq1o0bLIoAhov7HTRa3s=; b=FhXiut2BdlaNbRz4GLN4QeL7bHmOhrVLxBNtOC2CobR8RpJwTenI1Xr6G/Z/BH5XTo o9VzSibPEI1YJfL/yfxPMngmvPaVHmd0mcg+lrS3DLcTMijAGgOMEaqAWp3AhySwOD3E BPmCOQClB3LcL+lQJWpjsuXFB0uiwBmmH8kgf0TfOVy7NBNteYPc9e6SVmvemzL7RxSO G6gIW4hbs9o1xtqbwFrwiRbCNSLLGuThNi4/NpcxnTnumbWsqFXnSvsM/57hm7ZEO4ma PJZ7715lrMFJOERyGsID+vfGRCoZZrYCYLQr8vy02r3XQ72/jxnDbvLbbxDJWGNQfAQN pICQ== X-Gm-Message-State: AOAM532EM9+pMbw+TgbcyuS0A4J2af9AbC33rlTdKK85YL9oZufxNVVZ YvcBgCT/GsZ3I+oMpc081HyqnXvnuG9c4BmSYmY= X-Google-Smtp-Source: ABdhPJzoeLJSnBwU2uet5BoMgaxg6p2GPAzJTKIfrW4HwcWnUV0X+T3Z2xvmIMz+HD3psO6w0GaKCsVc5AjXi/P4qGw= X-Received: by 2002:a9d:16f:: with SMTP id 102mr6592389otu.206.1605702361517; Wed, 18 Nov 2020 04:26:01 -0800 (PST) MIME-Version: 1.0 References: <20201111054356.793390-1-ben.widawsky@intel.com> <20201111054356.793390-3-ben.widawsky@intel.com> <20201116175909.00007e53@Huawei.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 18 Nov 2020 13:25:49 +0100 Message-ID: Subject: Re: [RFC PATCH 2/9] cxl/acpi: add OSC support To: Dan Williams Cc: Jonathan Cameron , Ben Widawsky , linux-cxl@vger.kernel.org, Linux Kernel Mailing List , Linux PCI , Linux ACPI , 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 12:26 AM Dan Williams wrote: > > On Mon, Nov 16, 2020 at 10:00 AM Jonathan Cameron > wrote: > > > > On Tue, 10 Nov 2020 21:43:49 -0800 > > Ben Widawsky wrote: > > > > > From: Vishal Verma > > > > > > Add support to advertise OS capabilities, and request OS control for CXL > > > features using the ACPI _OSC mechanism. Advertise support for all > > > possible CXL features, and attempt to request control too for all > > > possible features. > > > > > > Based on a patch by Sean Kelley. > > > > > > Signed-off-by: Vishal Verma > > > Signed-off-by: Ben Widawsky > > > > I guess unsurprisingly a lot of this is cut and paste from PCIe > > so can we share some of the code? > > > > I do not see a refactoring effort for these bit being all that > fruitful. Well, that depends on how much code duplication could be avoided this way. > The backport pressure for this driver stack I expect will be > higher than most, so I'm sensitive to avoiding unnecessary core > entanglements. If two pieces of code are based on the same underlying common code, it is immediately clear to the reader how similar to each other they are. Otherwise, they need to be carefully compared with each other to find out what the differences are and whether or not they are arbitrary or vitally important. That is essential both from the revirem perspective today and to anyone wanting to understand the given code in the future (possibly in order to modify it without breaking it). It outweighs the convenience by far IMV, with all due respect. Recall how much effort it took to combine x86 with x86_64 and why it turned out to be necessary to do that work, for one example.