Skip to content

Commit fca24bf

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
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: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Dapeng Mi <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cf002da commit fca24bf

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
@@ -651,7 +651,7 @@ void intel_generic_uncore_mmio_init_box(struct intel_uncore_box *box)
651651
}
652652

653653
addr = unit->addr;
654-
box->io_addr = ioremap(addr, UNCORE_GENERIC_MMIO_SIZE);
654+
box->io_addr = ioremap(addr, type->mmio_map_size);
655655
if (!box->io_addr) {
656656
pr_warn("Uncore type %d box %d: ioremap error for 0x%llx.\n",
657657
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
@@ -6409,6 +6409,8 @@ static void uncore_type_customized_copy(struct intel_uncore_type *to_type,
64096409
to_type->get_topology = from_type->get_topology;
64106410
if (from_type->cleanup_mapping)
64116411
to_type->cleanup_mapping = from_type->cleanup_mapping;
6412+
if (from_type->mmio_map_size)
6413+
to_type->mmio_map_size = from_type->mmio_map_size;
64126414
}
64136415

64146416
static struct intel_uncore_type **

0 commit comments

Comments
 (0)