Skip to content

Commit 9e45788

Browse files
committed
perf/x86/intel/uncore: Support customized MMIO map size
JIRA: https://issues.redhat.com/browse/RHEL-47456 JIRA: https://issues.redhat.com/browse/RHEL-47442 upstream ======== commit fca24bf Author: Kan Liang <kan.liang@linux.intel.com> Date: Mon Jul 7 13:17:48 2025 -0700 description =========== For a server platform, the MMIO map size is always 0x4000. However, a client platform may have a smaller map size. Make the map size customizable. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Link: https://lore.kernel.org/r/20250707201750.616527-3-kan.liang@linux.intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 97c08c6 commit 9e45788

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arch/x86/events/intel/uncore_discovery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ void intel_generic_uncore_mmio_init_box(struct intel_uncore_box *box)
650650
}
651651

652652
addr = unit->addr;
653-
box->io_addr = ioremap(addr, UNCORE_GENERIC_MMIO_SIZE);
653+
box->io_addr = ioremap(addr, type->mmio_map_size);
654654
if (!box->io_addr) {
655655
pr_warn("Uncore type %d box %d: ioremap error for 0x%llx.\n",
656656
type->type_id, unit->id, (unsigned long long)addr);

arch/x86/events/intel/uncore_snbep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6495,6 +6495,8 @@ static void uncore_type_customized_copy(struct intel_uncore_type *to_type,
64956495
to_type->get_topology = from_type->get_topology;
64966496
if (from_type->cleanup_mapping)
64976497
to_type->cleanup_mapping = from_type->cleanup_mapping;
6498+
if (from_type->mmio_map_size)
6499+
to_type->mmio_map_size = from_type->mmio_map_size;
64986500
}
64996501

65006502
static struct intel_uncore_type **

0 commit comments

Comments
 (0)