Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1764973pxy; Thu, 6 May 2021 15:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3w91kEj5f8UEjh1HaFhetPoC0emfueKdVMnbzL/l/m4orUx8o3c8h/khX0L6vnHdIGR1k X-Received: by 2002:a05:6402:31a7:: with SMTP id dj7mr7725304edb.314.1620340718475; Thu, 06 May 2021 15:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620340718; cv=none; d=google.com; s=arc-20160816; b=FZ3iWJXtkKGYCcKXf4Hw+CFdwycWC4JBDaXpOkfZvYxX0CoANpgxpz1RDkphfsFj0E CkSjjhDfyLzpGr0QsZsHxmkqqGe1YCwjZ2v9R574lx7/+AZgUV3Qh9n9q8QK5Koj2q0d 44OXfMcL0wGX9B6iz/vabsaoNppXkd1dr4S8eKigG+WbxE3U3XQG2pSzm7mryAqM+m2j AdtucAERs/p1tZUPqviK/minC3+J0p2YiKWEPLfrVmdWoCkswfa2lrGo9hFZFh2uRJKe gCX3YK6IYwV9dOIy/1cv8YF56iJhuDXPsPyO2X80sIkojHzDRwBGpdolLxTP4SZ3lDBl myrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=S2KmlhSJ3t/ZhGpSFzVd+91OYsAMkAKxNNPBRdwaD+0=; b=JZilWbCjgt5p/BqlZBx7b9m0l5/LoqMaQ4lcXgtEn4gXJ51pCsNSxkTQQQpgVq1Wpe gaSsOASXmFOqTgmgh88/ZeUO0Hvmbu+SRAn/QSb3EVO3LXWKH3oMrh39P3cKvI35edvb 7XibCd5tsbPVXpowFz/3sidDJ6eqlOiMn5GcunGeQnWMcVQlroDR3iXlqj5/2/B+A+KF 494GTdQ3+bP+5l6lH2HLBvtK6Zke9epVGnq/q3nSd/G8S8oYhHFdE7mY3C2di+BB9Oop jxvIPw6kKUb/m6d6fnybd6P7XuKzhm6ei/pmgKJXjHFaYjzPohiej4yNqsjbU3gM/0Yx BIyA== 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=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 q18si3443840ejs.509.2021.05.06.15.38.13; Thu, 06 May 2021 15:38:38 -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; 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 S231218AbhEFWiL (ORCPT + 99 others); Thu, 6 May 2021 18:38:11 -0400 Received: from mga11.intel.com ([192.55.52.93]:13614 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbhEFWiH (ORCPT ); Thu, 6 May 2021 18:38:07 -0400 IronPort-SDR: yKs74Z4mdVkBp91sHy3fP2QERj0bt29KO7lHxkN3/vCtpWzydWItLrkiDV8BuhLpra+H/4cwtb c7xYZeDWaYDA== X-IronPort-AV: E=McAfee;i="6200,9189,9976"; a="195479002" X-IronPort-AV: E=Sophos;i="5.82,279,1613462400"; d="scan'208";a="195479002" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 15:37:08 -0700 IronPort-SDR: xQlnBnlWhujIKuhuSxksW7zkRrRAr5xXvj7qKUGZIVIh82uMyBuyGy8L0KXcQs/HCwgF44DzzQ PVG4eFSOYvPA== X-IronPort-AV: E=Sophos;i="5.82,279,1613462400"; d="scan'208";a="434607076" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 15:37:07 -0700 From: ira.weiny@intel.com To: Ben Widawsky , Dan Williams Cc: Ira Weiny , Alison Schofield , Vishal Verma , Jonathan Cameron , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] Map register blocks individually Date: Thu, 6 May 2021 15:36:50 -0700 Message-Id: <20210506223654.1310516-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.28.0.rc0.12.gb6a658bd00c9 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny User space will want to map some register blocks. Currently BARs are mapped in their entirety and pointers to the register blocks are created into those mappings. This will prevent mappings from user space. This series has 3 clean up patches followed by a patch to mapping the register blocks individually. Unfortunately, the information for the register blocks is contained inside the BARs themselves. Which means the BAR must be mapped, probed, and unmapped prior to the registers being mapped individually. The probe stage creates list of register maps which is then iterated to map the individual register blocks. Ira Weiny (4): cxl/mem: Fully decode device capability header cxl/mem: Reserve all device regions at once cxl/mem: Introduce cxl_decode_register_block() cxl/mem: Map registers based on capabilities drivers/cxl/core.c | 84 ++++++++++++++++++++------ drivers/cxl/cxl.h | 34 +++++++++-- drivers/cxl/pci.c | 147 +++++++++++++++++++++++++++++++++++---------- 3 files changed, 211 insertions(+), 54 deletions(-) -- 2.28.0.rc0.12.gb6a658bd00c9