Commit fca24bf2 authored by Kan Liang's avatar Kan Liang Committed by Peter Zijlstra
Browse files

perf/x86/intel/uncore: Support customized MMIO map size



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: default avatarKan Liang <kan.liang@linux.intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarDapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20250707201750.616527-3-kan.liang@linux.intel.com
parent cf002daf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ void intel_generic_uncore_mmio_init_box(struct intel_uncore_box *box)
	}

	addr = unit->addr;
	box->io_addr = ioremap(addr, UNCORE_GENERIC_MMIO_SIZE);
	box->io_addr = ioremap(addr, type->mmio_map_size);
	if (!box->io_addr) {
		pr_warn("Uncore type %d box %d: ioremap error for 0x%llx.\n",
			type->type_id, unit->id, (unsigned long long)addr);
+2 −0
Original line number Diff line number Diff line
@@ -6409,6 +6409,8 @@ static void uncore_type_customized_copy(struct intel_uncore_type *to_type,
		to_type->get_topology = from_type->get_topology;
	if (from_type->cleanup_mapping)
		to_type->cleanup_mapping = from_type->cleanup_mapping;
	if (from_type->mmio_map_size)
		to_type->mmio_map_size = from_type->mmio_map_size;
}

static struct intel_uncore_type **