From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 C634822BAC8 for ; Mon, 13 Jan 2025 15:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736780520; cv=none; b=qyGqPyKvpwhXQ3aUFL5ScVUzLlkZeif+zPI9vAlN1JZHHmzme0IlfgVfsBaxfjHb20a5bQRowCYxGto6u2BdyCS8D0xsIzM8WkmXZi5T4C/Qcmrhy/4eYbN9Aqpqe7Yimk/2FhDsOlm11LjEBNikp/GYY/pbg7uwOeX68zJxWig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736780520; c=relaxed/simple; bh=IFpKm6pYH22rlTaITTCSYACTHmdZpZqNR8MLKCc9PyA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=haPpqvINwyk/o+/WGTeIBrL0GadWft1WRk7t6IKohzRrkZNQCAiP8HYKlEBdwM37L/MNC9b4HyXswZmwg1/8JnWsWtDgfxzpsfO5VUFIWUo7vTxJKQlGT5cCQXPpN/goeQzz9HAbs7WA7HY2qIO3vOD0oFY3GndZbeykx76NlQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AQ+IlYaX; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none 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="AQ+IlYaX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736780519; x=1768316519; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IFpKm6pYH22rlTaITTCSYACTHmdZpZqNR8MLKCc9PyA=; b=AQ+IlYaX+EEq4y2/Gn31Z7NK5cELqQKpZxDtoa0VLPNCSy6m5KD7qCaC 00uvY1WlzNbBcPBxfMt2iFe0S29d0Ieo+BgQjiGB+Kim5qvwa6fzFMvBo Td1+oHDKRbrkWMhcCyjum31TU5UWjsanohGbEfZ3Tg3+bH7qqyn/hZPKz iESA2g4/vKBEXQISavXd2kbxqOHVG5s0uogc/uBU1TMPlNruzJ8giF4jU Nxj9nYEey6lGLLjw3a3+MKxXRiTRHiTsWnlheHboUW42RXqjZLPpQCcDW 7+X1w9ytnN4vkyEM6F0MUc0YbNx25iNwwDnfj1rTEsEg1KnbsA5W7HQN7 A==; X-CSE-ConnectionGUID: ekxBsTO5SmKYrgTrFpdDqg== X-CSE-MsgGUID: gr42SqS4RMKipx5WIu5ZtQ== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="36954027" X-IronPort-AV: E=Sophos;i="6.12,310,1728975600"; d="scan'208";a="36954027" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2025 07:01:56 -0800 X-CSE-ConnectionGUID: MIYhZziiQM+Vj5owvfymHg== X-CSE-MsgGUID: Nnd1DXknQjOy18km9uyRSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="135405774" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmviesa001.fm.intel.com with ESMTP; 13 Jan 2025 07:01:55 -0800 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: Kan Liang Subject: [PATCH 2/4] perf/x86/intel/uncore: Support customized MMIO map size Date: Mon, 13 Jan 2025 07:02:16 -0800 Message-Id: <20250113150218.2375811-2-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20250113150218.2375811-1-kan.liang@linux.intel.com> References: <20250113150218.2375811-1-kan.liang@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: 8bit From: Kan Liang 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 --- arch/x86/events/intel/uncore_discovery.c | 2 +- arch/x86/events/intel/uncore_snbep.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore_discovery.c b/arch/x86/events/intel/uncore_discovery.c index 8dc9b712dafb..bfd8af90d02d 100644 --- a/arch/x86/events/intel/uncore_discovery.c +++ b/arch/x86/events/intel/uncore_discovery.c @@ -655,7 +655,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); diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 60973c209c0e..48e19b26dca6 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -6495,6 +6495,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 ** -- 2.38.1