Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1218487pxb; Thu, 15 Apr 2021 17:50:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWHXTp2xUAVdZSFC77e4TA7S2WB8qJHxk5vmkvSFY3Wu+X3uJsFtA7+w2JSE5RNBfsC0+8 X-Received: by 2002:a17:906:1984:: with SMTP id g4mr5920478ejd.525.1618534232085; Thu, 15 Apr 2021 17:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618534232; cv=none; d=google.com; s=arc-20160816; b=0sUoCERuu2hniNWtJc3NgfAEtZ2YJwC05CX4FySmUnwCTt649fZVkV1Pmw/5vI+DlR Kxww203OmcjMwvgIM8L3caxn/p3mRGcSaZs7Xr4YLff45ZfGnw6sMoo3JTJlyLa+BAr3 itUYZJj3V7wYRAFksdQIe3FpiltolU3IlfX819TMiRAihPP4q0gfhexWWEboXT99ycrU /wMXqKlW0f/A7O3KtzIACksY8MjNKZdf3kJETBs0amju5lRDp1dlTpN2VhUpA+4CQ2iG emviJKd/pvmP9rhwkmgz0fLx+tH5bvdglWz4HGH0Af8cJph5aB2DXG44v4Vf6KfqnGeK Cofw== 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:dkim-signature; bh=LZPmXSJHlNJkGabrxCzQ+1bNVgcNhlvvFPZsThC87BQ=; b=ls+NHBAOq4lXOxmzo2Cg1NIJwa+GGAH+Z/AbgStMPkiXB71Lb22TD7ocMWnfoOr8Mn VuSWE/pvjWsu4nJFejr2kxcKN2mE+QnZkthfubujgxCwRH8/mwhSZUn+5J7GZhBXARBJ repbYmUe0R2518kUaXrmgFWrmWXB4hlDyXL18iDdkznNjFB4IyxCBMTDBl/m8DyFXpzg TpP+NdgtuJdoyEpyWZ4O0eE3bKFf9mOvWHM4S+JNtZzRD2s81e9n6+xU55j1+E3uMEb1 i3p4IPpGjk4VG+MO3BplEsHNJPjYAvu3QvmWlLswoTA+k5llTndA+qYfXMUEm2RDMdYQ JZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="0/Bv9AMj"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si3548497eje.178.2021.04.15.17.49.32; Thu, 15 Apr 2021 17:50:32 -0700 (PDT) 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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="0/Bv9AMj"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235055AbhDOWyl (ORCPT + 99 others); Thu, 15 Apr 2021 18:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234949AbhDOWyh (ORCPT ); Thu, 15 Apr 2021 18:54:37 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D829CC061574 for ; Thu, 15 Apr 2021 15:54:13 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id f8so29986675edd.11 for ; Thu, 15 Apr 2021 15:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LZPmXSJHlNJkGabrxCzQ+1bNVgcNhlvvFPZsThC87BQ=; b=0/Bv9AMjps8ZT69MpMit11F2p9twNVTVYb+XVv9QK0JxYFc5DvplRTa70eF1YbSfMu IBkP1v8RHWg08P2iK/miye29yig2XeDlud0R4CkYnz0EAOTuVpy+cX7jEx6dcHmdnzsC 6DhGckcXW/uRc2ecX2R+QDWHPUPGMN2b7OZhI25TlWuDwO7+Y7BtCCGo+z1tHYpWubGh W6IOmdyWPbvgjU9ZxMQ2zo0MnTE+QTrwXHN2bNY/B/wuPeBSD8viT2PIlL34ggRpAtYF RFPmZfJFEWz3M/cDojI6+EXjosI04PgHYSlkQH/mCcaVIhycSv9J0ikMzMpmmbuP7qgb PPAA== 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=LZPmXSJHlNJkGabrxCzQ+1bNVgcNhlvvFPZsThC87BQ=; b=TiZPw6N08el3qvADp2gc39j3Dj0qB5mxkuFthqOaqObDjL9ghGDfDlwzojr5jzPO9L L4qU4jGxGjWYacOMEUTY31r9MC8HbYRp8YpqFJhshKMWoxWNPFp6cQRsZJB5BGGcOpW3 RKADMLwLIWzrH/5h71y5LFBJuLJLybxBGv18Snv8QdCcfDL6dmMcCQg1bwxKxUPdDzQ5 UHDMLK8EX2vMxNmE3OikBxiG0ikZNuc1GqOVZK3eN1I/RGviiuJwSC4SeNNjx8X7c2zg 12BpH4bCbvenf+G3awYRkqvgKzN0ffRgtZ0M3aBmkMmN0jswRIKd31rvQpf09WrimHke md3Q== X-Gm-Message-State: AOAM530lCGxQnvNIecE8Nc/F6LpiRBJ25czb0950nKY+L8Nf7jIAE3Dy t/CtEUyZEO/OXb4wkeUFjqbH9k8S1ujAWSiW6cosMw== X-Received: by 2002:a50:e607:: with SMTP id y7mr7076665edm.18.1618527252572; Thu, 15 Apr 2021 15:54:12 -0700 (PDT) MIME-Version: 1.0 References: <20210407222625.320177-1-ben.widawsky@intel.com> <20210407222625.320177-7-ben.widawsky@intel.com> In-Reply-To: <20210407222625.320177-7-ben.widawsky@intel.com> From: Dan Williams Date: Thu, 15 Apr 2021 15:54:00 -0700 Message-ID: Subject: Re: [PATCH 6/7] cxl/mem: Create a helper to setup device regs To: Ben Widawsky Cc: linux-cxl@vger.kernel.org, Linux PCI , Linux ACPI , "Weiny, Ira" , Vishal L Verma , "Schofield, Alison" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 7, 2021 at 3:26 PM Ben Widawsky wrote: > > Memory devices have a list of required register regions within the > register block, but this isn't required of all CXL components or > devices. To make things more tidy, and allow for easily setting up other > block types in this loop, the helper is introduced. I don't understand the point of this or the organization choice. cxl_setup_device_regs() *is* the core implementation so there shouldn't be a "__" prefixed version wrapping it. I agree that some users will not care that some of the device registers are not found, but that won't be cxl_mem_setup_regs() making that call.