From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5F8C33BBD1; Fri, 13 Mar 2026 01:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773366746; cv=none; b=tYOqpakkXLGE/c8xymVm8BLpoZufZLq6NoQrVOLmlpDi8XrHhw+F3Ih7QezdlxEi+zbRHu0MzZJO0lr3kLFu8LWoi4UfnMBTnIXBXMNbKlPDELqkxSClnlCiWPKfTHf4/90RkulWSLqKT0azC86apiJyjPR7nGcMK0QZdU4bFcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773366746; c=relaxed/simple; bh=FwrIZvhC393jVxgoQvl41shUwjFWL+jsAsS7ui/cgso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m9EeLdWFeQmDnGKuY92gKbZ4wrrhkxTPvMsMfhyBAi63XB9ZLCPuFvF6aDGT2ryH19L28aNymITe4Puaew84Anb7vRz6px0ufBhL4Fv0apz+44PhbyDVcMUqlRUeBcnQCszBxrpgWeOwj/pyumIevVE2r8KvDTfxKG+bEJqP9EE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aNwqI4VV; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aNwqI4VV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773366745; x=1804902745; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FwrIZvhC393jVxgoQvl41shUwjFWL+jsAsS7ui/cgso=; b=aNwqI4VVSzuXp0MZ/ARechn980buFMJhoJkzwBv7+rqIyOtSjPlhSK3D YXv5KrDVpkjaLoxVJR8+/H0qQQq1MuQ/5R20kB5q/rNpexzfQ0bqf+v8x bbz4qM+1kWoxOwvipmM92FCbc5WXu3srx2So6Gi2d9oTnkzia+ynGDvUz 1aTg2jzspkrDSGanC0ZDPSQvKVtHtlIS6Jgg3o7tXK2GDWr/NAHYqnQ8o ihetBsz5RpvYaYuOYb9Fxo/WTDpxPjh8r3xC9klNmXQ6O/QZs+7n2/IEZ WV3uZsR3NLXwCgbuxk2W4xY+JeLZQo1Seu+KjUi2J4U2XARkV2dRj2gSY Q==; X-CSE-ConnectionGUID: TpGyjevsQ3+AwLv/9bVfpw== X-CSE-MsgGUID: gtAfAzS+QACoSyv5RLmC2g== X-IronPort-AV: E=McAfee;i="6800,10657,11727"; a="74354580" X-IronPort-AV: E=Sophos;i="6.23,117,1770624000"; d="scan'208";a="74354580" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2026 18:52:12 -0700 X-CSE-ConnectionGUID: TDvBLrxtRHq0FW+O4xYBQw== X-CSE-MsgGUID: FbedKJiZSZas7FzHAHNLQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,117,1770624000"; d="scan'208";a="220108500" Received: from debox1-desk4.jf.intel.com ([10.88.27.138]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2026 18:52:12 -0700 From: "David E. Box" To: thomas.hellstrom@linux.intel.com, rodrigo.vivi@intel.com, irenic.rajneesh@gmail.com, ilpo.jarvinen@linux.intel.com, srinivas.pandruvada@linux.intel.com, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, xi.pardee@linux.intel.com Cc: david.e.box@linux.intel.com, hansg@kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 11/22] platform/x86/intel/pmt: Pass discovery index instead of resource Date: Thu, 12 Mar 2026 18:51:50 -0700 Message-ID: <20260313015202.3660072-12-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260313015202.3660072-1-david.e.box@linux.intel.com> References: <20260313015202.3660072-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Change PMT class code to pass a discovery index rather than a direct struct resource when creating entries. This allows the class to identify the discovery source generically without assuming PCI BAR resources. For PCI devices, the index still resolves to a resource in the intel_vsec_device. Other discovery sources, such as ACPI, can use the same index without needing a struct resource. Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmt/class.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel/pmt/class.c b/drivers/platform/x86/= intel/pmt/class.c index a4d6ffed2fed..f94f51178043 100644 --- a/drivers/platform/x86/intel/pmt/class.c +++ b/drivers/platform/x86/intel/pmt/class.c @@ -207,11 +207,12 @@ EXPORT_SYMBOL_GPL(intel_pmt_class); =20 static int intel_pmt_populate_entry(struct intel_pmt_entry *entry, struct intel_vsec_device *ivdev, - struct resource *disc_res) + int idx) { struct pci_dev *pci_dev =3D to_pci_dev(ivdev->dev); struct device *dev =3D &ivdev->auxdev.dev; struct intel_pmt_header *header =3D &entry->header; + struct resource *disc_res; u8 bir; =20 /* @@ -236,6 +237,7 @@ static int intel_pmt_populate_entry(struct intel_pmt_en= try *entry, * For access_type LOCAL, the base address is as follows: * base address =3D end of discovery region + base offset */ + disc_res =3D &ivdev->resource[idx]; entry->base_addr =3D disc_res->end + 1 + header->base_offset; =20 /* @@ -413,7 +415,7 @@ int intel_pmt_dev_create(struct intel_pmt_entry *entry,= struct intel_pmt_namespa return ret; } =20 - ret =3D intel_pmt_populate_entry(entry, intel_vsec_dev, &intel_vsec_dev->= resource[idx]); + ret =3D intel_pmt_populate_entry(entry, intel_vsec_dev, idx); if (ret) return ret; =20 --=20 2.43.0