Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp278945pxb; Wed, 18 Nov 2020 04:27:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTcidsLjGBQiaLa+W+XENAVmeqT6fKEsy1eVf67yMBgdg1FPUS6Lo8FVbcW5Og617Mr77+ X-Received: by 2002:a17:906:a108:: with SMTP id t8mr23226116ejy.435.1605702477913; Wed, 18 Nov 2020 04:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605702477; cv=none; d=google.com; s=arc-20160816; b=tli+GrI7aRnSNWfhZvhAcvfuecLt7vVRDV78X0ycjc0BpX3vXZpLxdrAVKukD80aWP e00FzAYq3Ts0aja4SDaQEDbuTRV/8WCk9WdnqSiyBre4hbYzpNPxGTvf8N03XCr/A3JD YxTZ9Nkfzm+xcr9WzpbZ2hynUWRKdbOS///vwYNNhzFJfZCeiynhMmvfPr1S2OfW1Sd6 e5JcIglqp9GxsoG1d4yjZp7qICe+Y5t/n5k8inXfyrF2EEDJ47KQbbtEOPfecLiqVaCg MyqzaLXIdMj+GENvomDMj6dYzvJ31dKxrH7m5f1FVzr2FaIUGsy0236j3AAuMBPzPFn6 m0YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=PiA+hYcssZWHOVn8FUP0jNEzq1o0bLIoAhov7HTRa3s=; b=VRDm81NGiCq8o0X3/TTvVcsmA6FLpuDHV5XGd9TU9dwh/gOmCvSBJlv6vniLU5tBIi 2XRGPqi4/H/1IKfDJV5B31hb2l8f0RG4+BkC0FNQ48sEIqrYOYRYY7pR/9ypvQ1yO9mW k/S4ORkiqwTdGEbbJwnPRGgc/IirOvFsUm95IhTeQYNOcVFBJj+GTTuk8sd3rUrTRuK/ nc9IDCh4OSFINbd+4woRBpJeR2BnOIJ2DERYJCKI+QoadglwpkAAKD9KdeZj45+pRU8r Toa1I9BHzOZKJest8Reeeb6BNWqsUunYTv/+K1IbMa6X5p3bKa2BMmdeuYksPUMyZ8E2 2e2Q== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si597850ejc.47.2020.11.18.04.27.33; Wed, 18 Nov 2020 04:27:57 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726923AbgKRM0E (ORCPT + 99 others); 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-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-kernel@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.