Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753638AbdGUHpH (ORCPT ); Fri, 21 Jul 2017 03:45:07 -0400 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:51760 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752650AbdGUHoV (ORCPT ); Fri, 21 Jul 2017 03:44:21 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=George.Cherian@cavium.com; From: George Cherian To: devel@acpica.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, jassisinghbrar@gmail.com, robert.moore@intel.com, lv.zheng@intel.com, pprakash@codeaurora.org, George Cherian Subject: [PATCHv2 2/2] ACPI / CPPC: Make cppc acpi driver aware of pcc subspace ids Date: Fri, 21 Jul 2017 07:43:47 +0000 Message-Id: <1500623027-19712-3-git-send-email-george.cherian@cavium.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1500623027-19712-1-git-send-email-george.cherian@cavium.com> References: <1500623027-19712-1-git-send-email-george.cherian@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (10.174.208.162) To BLUPR0701MB1698.namprd07.prod.outlook.com (10.163.85.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 257836e9-0eb5-4641-d688-08d4d00c4b8b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BLUPR0701MB1698; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1698;3:s/vf0wRaLUJKq8T2aOfdpTUrVxS8jTR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0qE/AxndXL50Ilz7ZnE4EFIiOChsilmsKFwRXZX47JsovtITjhvxJ+B8Iodm199TX2HUzhQEjDlbxc6h/TWtnxfxrsdo7+BUnbYa9rZ6htSQ6NaPomyCX4TYnPdXEfyeVJN73pWR1BB6MS6ISQs3jasFixGhe/gbdtMvlKPeMPhhsF3nwsSUg5M1DiDlz2NFcQvJUO172INkwCOsMguTAQuA7x3rnDf3iGZ4Af6u4uL0NPdOjVOAzffUzbQeS6QxfL/PE/fUCMmivgilDsyMFqnbskon3EfMST0EFBdw= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1698;20:AnerzF3S1KBi+yRGxiDdzMEcPjMPYx0Y6bY3dgSCh1UJ1CGiYHHFPEuPrWwmxJyAARcSLwFpKEbf2IAd1vj3hURqw0gkhsRAo1xHR6Fl/Ikz/+IGG4m6x1bT1fPjta4MdSug/jG6zQ3SkBOdq/caVoL8fMjUo00TaJzR9jKrhfdRVoO0E4//O5qfNa/b+/HikyCggzYJv1JH3qOB95GvH8r7znwulivb6HC8ToIUOiIiT/lDPDpUzMkS2ix3KguNWaPT/nHlF4ES57ShRXPBUT5l+/lkH58YN1nEZB7gE5pf+mlitwrMhluAmu1ZgEyYYmc/KpULLi6uG5zrHmnaLDKvxHWFCsXSqbt0d60X7q+318xR0CKrPeyrbCYrpDl5p67cS/QOl8cGVukE3Ud+DWDZUUexMns7+usXIBBzTe/z9SjVKRu1+L3KuccgZo2p33qt2XdCch31H1sQtNxK+MGeoDLgj7mG5zXkCMCqxq5DHBMtLLOS8CefFvVogFLA X-Exchange-Antispam-Report-Test: UriScan:(60795455431006); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR0701MB1698;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR0701MB1698; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1698;4:bOVQ0alKS9yXRdiwUb3rsz7WmbOKkm5ntZC0xqK+?= =?us-ascii?Q?vQ3lwQjFx3nig+QfsMb1lLtdwKp0V3KzQLC2JNwW6ZCzdtke0y71Wr52tPOF?= =?us-ascii?Q?VNHcoHlGnw+ypwuNMtjQhp6UvIoakDlTfAEavIxdm/D+lRZ9kHZz9RahPUmz?= =?us-ascii?Q?hsH4HJ8EWInpXhHKDAXmeXJS0GTxbkplJZloZOtBmTsIj8U8M4oWe1gCUzxJ?= =?us-ascii?Q?UuzHfJUN7G2wxKzBo1yoewxbZlF1bOLc47fhdtuVSLD9X7rsWGqZg32JWCPs?= =?us-ascii?Q?B5ge+aeLk2+5kAvBh39fzVzbolOajkU5k7n4GdDtAPDHR5R1dHzMT2rLtRlt?= =?us-ascii?Q?oJ+E1Y2ANYnmtgvpfYE65yGg4RtX29f83kEnoUvrjQhnF+Gmz07EE8mp/6aI?= =?us-ascii?Q?h99ljJpfrMuf5yuRBLOEq+c2oLG6BTpZjvhfgGpgnmUdwEUyd/5cgHRCXcAX?= =?us-ascii?Q?Nj/Kecc3Gq7jxgB0U63ds4UjeeQtgNdKLZifO42+1rDPtwM8UN/lUvyNouKk?= =?us-ascii?Q?uGMzVzwnzObuyfwjWQeie+sJSDUmqNTIxoiQd9XNBmVOq4pn6fX45YYkXKAo?= =?us-ascii?Q?2roU+8fa6tcqAVUUJZ66husMoXOD7yJSlwhllcfzR4YF+TNjT/cvDYg9Lxgu?= =?us-ascii?Q?37KLsKe3gAy+63zomoBdPDySjMYeqG2nUcPGCY28yaQn6jygSnTIABt2S6Yi?= =?us-ascii?Q?Vnjb2UR4VrdAYnyc5b7egx4Hcjr7gfxd7Kehsc377wlNvQ7CHgikvCDYjfW6?= =?us-ascii?Q?H2qdXWu2WKZ0+WHmmB6X/NrKVcSxPCmO8YNki8eM3/Lg9/e41NbWrD5uId3+?= =?us-ascii?Q?ppN/JRTierKsFvaMrN4WLj7FPB8NAoJFZrOo7x32etoVTyLEWbPWGg+KtCR9?= =?us-ascii?Q?pR32qRzejqIFkZxADUf5pA2DodskfZN47hv66/k6rKFvpqWDsy/bLgT82A7h?= =?us-ascii?Q?fHcc9zm58lsje20VnQsHVMA4md1jiCaF8ayNuP9LeGKMOTXTp2vZuERG9F0W?= =?us-ascii?Q?alzNdTdEucGRjZPMrVSrfjV+Bh4XnxjVDTi0tu+3OO98U+D4A+jZlQgwMoMC?= =?us-ascii?Q?fu/UzKisCNWKSukjZBwp6UuqDGq2AkTJ6RMByHcaGQa6bVZcfYfB5ekrQYlP?= =?us-ascii?Q?OZPFynFZ2mtGs6uaVHWuJg4YThUzV+ya7Mqq28YxZMM55aLUFNnmj6C+rNDD?= =?us-ascii?Q?IEVDbVXxkjG9vuA=3D?= X-Forefront-PRVS: 0375972289 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39410400002)(39450400003)(39840400002)(39400400002)(39850400002)(39860400002)(189002)(199003)(42186005)(81166006)(72206003)(305945005)(47776003)(7736002)(33646002)(105586002)(106356001)(5660300001)(50226002)(36756003)(53416004)(189998001)(5009440100003)(68736007)(81156014)(7350300001)(4326008)(97736004)(38730400002)(6512007)(110136004)(101416001)(5003940100001)(66066001)(3846002)(478600001)(50986999)(69596002)(8676002)(6116002)(2906002)(107886003)(6506006)(50466002)(76176999)(86362001)(53936002)(2950100002)(6486002)(25786009)(48376002)(6666003);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1698;H:ubuntu.caveonetworks.com;FPR:;SPF:None;PTR:InfoN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wCTw+Q9YtprZ3b77Z9c7wZ6wj1JtGPOZ4dKcd7f4HfyEB44OBSDZIBSn1YoxcgHztuiw8z8U5Rl1LN+2oPn3Gh2pqC7TgWxeMuPzk+eLRMok2gOBiVH4toEgD4U+aues5tREb6dOlSgzhIo/b42TeuSJvOBZqAZXv6Q7j7xO7c80a7nw75XneJNG2wsjtVuaVHvdxPfbUxK3EYb/gytcL+GPZPmKm1YHnNrBRVQC8giGtaSK8BzEsTiEHvBcCwD5LbSxNe40m5/RPZ1g2Ul1MCfpQ+uCdNFTUqmomHn+EMsDhPeKfC88aaIIhyOGVPsHfQjDQnhCXrQXGRhI0oz5NAs= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2017 07:44:16.3284 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1698 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 19764 Lines: 547 Based on ACPI 6.2 Section 8.4.7.1.9 If the PCC register space is used, all PCC registers, for all processors in the same performance domain (as defined by _PSD), must be defined to be in the same subspace. Based on Section 14.1 of ACPI specification, it is possible to have a maximum of 256 PCC subspace ids. Add support of multiple PCC subspace id instead of using a single global pcc_data structure. While at that fix the time_delta check in send_pcc_cmd() so that last_mpar_reset and mpar_count is initialized properly. Signed-off-by: George Cherian --- drivers/acpi/cppc_acpi.c | 228 ++++++++++++++++++++++++++++++----------------- 1 file changed, 144 insertions(+), 84 deletions(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index e5b47f0..6c99f2f 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -75,13 +75,16 @@ struct cppc_pcc_data { /* Wait queue for CPUs whose requests were batched */ wait_queue_head_t pcc_write_wait_q; + ktime_t last_cmd_cmpl_time; + ktime_t last_mpar_reset; + int mpar_count; + int refcount; }; -/* Structure to represent the single PCC channel */ -static struct cppc_pcc_data pcc_data = { - .pcc_subspace_idx = -1, - .platform_owns_pcc = true, -}; +/* Array to represent the PCC channel per subspace id */ +static struct cppc_pcc_data *pcc_data[MAX_PCC_SUBSPACES]; +/* The cpu_pcc_subspace_idx contains per CPU subspace id */ +static DEFINE_PER_CPU(int, cpu_pcc_subspace_idx); /* * The cpc_desc structure contains the ACPI register details @@ -93,7 +96,8 @@ static struct cppc_pcc_data pcc_data = { static DEFINE_PER_CPU(struct cpc_desc *, cpc_desc_ptr); /* pcc mapped address + header size + offset within PCC subspace */ -#define GET_PCC_VADDR(offs) (pcc_data.pcc_comm_addr + 0x8 + (offs)) +#define GET_PCC_VADDR(offs, pcc_ss_id) (pcc_data[pcc_ss_id]->pcc_comm_addr + \ + 0x8 + (offs)) /* Check if a CPC register is in PCC */ #define CPC_IN_PCC(cpc) ((cpc)->type == ACPI_TYPE_BUFFER && \ @@ -188,13 +192,16 @@ static struct kobj_type cppc_ktype = { .default_attrs = cppc_attrs, }; -static int check_pcc_chan(bool chk_err_bit) +static int check_pcc_chan(int pcc_ss_id, bool chk_err_bit) { int ret = -EIO, status = 0; - struct acpi_pcct_shared_memory __iomem *generic_comm_base = pcc_data.pcc_comm_addr; - ktime_t next_deadline = ktime_add(ktime_get(), pcc_data.deadline); + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; + struct acpi_pcct_shared_memory __iomem *generic_comm_base = + pcc_ss_data->pcc_comm_addr; + ktime_t next_deadline = ktime_add(ktime_get(), + pcc_ss_data->deadline); - if (!pcc_data.platform_owns_pcc) + if (!pcc_ss_data->platform_owns_pcc) return 0; /* Retry in case the remote processor was too slow to catch up. */ @@ -219,7 +226,7 @@ static int check_pcc_chan(bool chk_err_bit) } if (likely(!ret)) - pcc_data.platform_owns_pcc = false; + pcc_ss_data->platform_owns_pcc = false; else pr_err("PCC check channel failed. Status=%x\n", status); @@ -230,13 +237,15 @@ static int check_pcc_chan(bool chk_err_bit) * This function transfers the ownership of the PCC to the platform * So it must be called while holding write_lock(pcc_lock) */ -static int send_pcc_cmd(u16 cmd) +static int send_pcc_cmd(int pcc_ss_id, u16 cmd) { int ret = -EIO, i; + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; struct acpi_pcct_shared_memory *generic_comm_base = - (struct acpi_pcct_shared_memory *) pcc_data.pcc_comm_addr; - static ktime_t last_cmd_cmpl_time, last_mpar_reset; - static int mpar_count; + (struct acpi_pcct_shared_memory *)pcc_ss_data->pcc_comm_addr; + ktime_t last_cmd_cmpl_time = pcc_ss_data->last_cmd_cmpl_time; + ktime_t last_mpar_reset = pcc_ss_data->last_mpar_reset; + int mpar_count = pcc_ss_data->mpar_count; unsigned int time_delta; /* @@ -249,24 +258,24 @@ static int send_pcc_cmd(u16 cmd) * before write completion, so first send a WRITE command to * platform */ - if (pcc_data.pending_pcc_write_cmd) - send_pcc_cmd(CMD_WRITE); + if (pcc_ss_data->pending_pcc_write_cmd) + send_pcc_cmd(pcc_ss_id, CMD_WRITE); - ret = check_pcc_chan(false); + ret = check_pcc_chan(pcc_ss_id, false); if (ret) goto end; } else /* CMD_WRITE */ - pcc_data.pending_pcc_write_cmd = FALSE; + pcc_ss_data->pending_pcc_write_cmd = FALSE; /* * Handle the Minimum Request Turnaround Time(MRTT) * "The minimum amount of time that OSPM must wait after the completion * of a command before issuing the next command, in microseconds" */ - if (pcc_data.pcc_mrtt) { + if (pcc_ss_data->pcc_mrtt) { time_delta = ktime_us_delta(ktime_get(), last_cmd_cmpl_time); - if (pcc_data.pcc_mrtt > time_delta) - udelay(pcc_data.pcc_mrtt - time_delta); + if (pcc_ss_data->pcc_mrtt > time_delta) + udelay(pcc_ss_data->pcc_mrtt - time_delta); } /* @@ -280,16 +289,16 @@ static int send_pcc_cmd(u16 cmd) * not send the request to the platform after hitting the MPAR limit in * any 60s window */ - if (pcc_data.pcc_mpar) { + if (pcc_ss_data->pcc_mpar) { if (mpar_count == 0) { time_delta = ktime_ms_delta(ktime_get(), last_mpar_reset); - if (time_delta < 60 * MSEC_PER_SEC) { + if ((time_delta < 60 * MSEC_PER_SEC) && last_mpar_reset) { pr_debug("PCC cmd not sent due to MPAR limit"); ret = -EIO; goto end; } last_mpar_reset = ktime_get(); - mpar_count = pcc_data.pcc_mpar; + mpar_count = pcc_ss_data->pcc_mpar; } mpar_count--; } @@ -300,10 +309,10 @@ static int send_pcc_cmd(u16 cmd) /* Flip CMD COMPLETE bit */ writew_relaxed(0, &generic_comm_base->status); - pcc_data.platform_owns_pcc = true; + pcc_ss_data->platform_owns_pcc = true; /* Ring doorbell */ - ret = mbox_send_message(pcc_data.pcc_channel, &cmd); + ret = mbox_send_message(pcc_ss_data->pcc_channel, &cmd); if (ret < 0) { pr_err("Err sending PCC mbox message. cmd:%d, ret:%d\n", cmd, ret); @@ -311,15 +320,15 @@ static int send_pcc_cmd(u16 cmd) } /* wait for completion and check for PCC errro bit */ - ret = check_pcc_chan(true); + ret = check_pcc_chan(pcc_ss_id, true); - if (pcc_data.pcc_mrtt) + if (pcc_ss_data->pcc_mrtt) last_cmd_cmpl_time = ktime_get(); - if (pcc_data.pcc_channel->mbox->txdone_irq) - mbox_chan_txdone(pcc_data.pcc_channel, ret); + if (pcc_ss_data->pcc_channel->mbox->txdone_irq) + mbox_chan_txdone(pcc_ss_data->pcc_channel, ret); else - mbox_client_txdone(pcc_data.pcc_channel, ret); + mbox_client_txdone(pcc_ss_data->pcc_channel, ret); end: if (cmd == CMD_WRITE) { @@ -329,12 +338,12 @@ static int send_pcc_cmd(u16 cmd) if (!desc) continue; - if (desc->write_cmd_id == pcc_data.pcc_write_cnt) + if (desc->write_cmd_id == pcc_ss_data->pcc_write_cnt) desc->write_cmd_status = ret; } } - pcc_data.pcc_write_cnt++; - wake_up_all(&pcc_data.pcc_write_wait_q); + pcc_ss_data->pcc_write_cnt++; + wake_up_all(&pcc_ss_data->pcc_write_wait_q); } return ret; @@ -536,16 +545,16 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) } EXPORT_SYMBOL_GPL(acpi_get_psd_map); -static int register_pcc_channel(int pcc_subspace_idx) +static int register_pcc_channel(int pcc_ss_idx) { struct acpi_pcct_hw_reduced *cppc_ss; u64 usecs_lat; - if (pcc_subspace_idx >= 0) { - pcc_data.pcc_channel = pcc_mbox_request_channel(&cppc_mbox_cl, - pcc_subspace_idx); + if (pcc_ss_idx >= 0) { + pcc_data[pcc_ss_idx]->pcc_channel = + pcc_mbox_request_channel(&cppc_mbox_cl, pcc_ss_idx); - if (IS_ERR(pcc_data.pcc_channel)) { + if (IS_ERR(pcc_data[pcc_ss_idx]->pcc_channel)) { pr_err("Failed to find PCC communication channel\n"); return -ENODEV; } @@ -556,7 +565,7 @@ static int register_pcc_channel(int pcc_subspace_idx) * PCC channels) and stored pointers to the * subspace communication region in con_priv. */ - cppc_ss = (pcc_data.pcc_channel)->con_priv; + cppc_ss = (pcc_data[pcc_ss_idx]->pcc_channel)->con_priv; if (!cppc_ss) { pr_err("No PCC subspace found for CPPC\n"); @@ -569,19 +578,20 @@ static int register_pcc_channel(int pcc_subspace_idx) * So add an arbitrary amount of wait on top of Nominal. */ usecs_lat = NUM_RETRIES * cppc_ss->latency; - pcc_data.deadline = ns_to_ktime(usecs_lat * NSEC_PER_USEC); - pcc_data.pcc_mrtt = cppc_ss->min_turnaround_time; - pcc_data.pcc_mpar = cppc_ss->max_access_rate; - pcc_data.pcc_nominal = cppc_ss->latency; - - pcc_data.pcc_comm_addr = acpi_os_ioremap(cppc_ss->base_address, cppc_ss->length); - if (!pcc_data.pcc_comm_addr) { + pcc_data[pcc_ss_idx]->deadline = ns_to_ktime(usecs_lat * NSEC_PER_USEC); + pcc_data[pcc_ss_idx]->pcc_mrtt = cppc_ss->min_turnaround_time; + pcc_data[pcc_ss_idx]->pcc_mpar = cppc_ss->max_access_rate; + pcc_data[pcc_ss_idx]->pcc_nominal = cppc_ss->latency; + + pcc_data[pcc_ss_idx]->pcc_comm_addr = + acpi_os_ioremap(cppc_ss->base_address, cppc_ss->length); + if (!pcc_data[pcc_ss_idx]->pcc_comm_addr) { pr_err("Failed to ioremap PCC comm region mem\n"); return -ENOMEM; } /* Set flag so that we dont come here for each CPU. */ - pcc_data.pcc_channel_acquired = true; + pcc_data[pcc_ss_idx]->pcc_channel_acquired = true; } return 0; @@ -600,6 +610,37 @@ bool __weak cpc_ffh_supported(void) return false; } + +/** + * pcc_data_alloc() - Allocate the pcc_data memory for pcc subspace + * + * Check and allocate the cppc_pcc_data memory. + * In some processor configurations it is possible that same subspace + * is shared between multiple CPU's. This is seen especially in CPU's + * with hardware multi-threading support. + * + * Return: 0 for success, errno for failure + */ +int pcc_data_alloc(int pcc_ss_id) +{ + int loop; + + if (pcc_ss_id < 0) + return -EINVAL; + + for (loop = 0; pcc_data[loop] != NULL; loop++) { + if (pcc_data[loop]->pcc_subspace_idx == pcc_ss_id) { + pcc_data[loop]->refcount++; + return 0; + } + } + + pcc_data[pcc_ss_id] = kzalloc(sizeof(struct cppc_pcc_data), GFP_KERNEL); + pcc_data[pcc_ss_id]->pcc_subspace_idx = pcc_ss_id; + pcc_data[pcc_ss_id]->refcount++; + + return 0; +} /* * An example CPC table looks like the following. * @@ -661,6 +702,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) struct device *cpu_dev; acpi_handle handle = pr->handle; unsigned int num_ent, i, cpc_rev; + unsigned int pcc_subspace_id = 0; acpi_status status; int ret = -EFAULT; @@ -733,12 +775,10 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) * so extract it only once. */ if (gas_t->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) { - if (pcc_data.pcc_subspace_idx < 0) - pcc_data.pcc_subspace_idx = gas_t->access_width; - else if (pcc_data.pcc_subspace_idx != gas_t->access_width) { - pr_debug("Mismatched PCC ids.\n"); + pcc_subspace_id = gas_t->access_width; + if (pcc_data_alloc(pcc_subspace_id)) goto out_free; - } + per_cpu(cpu_pcc_subspace_idx, pr->id) = pcc_subspace_id; } else if (gas_t->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { if (gas_t->address) { void __iomem *addr; @@ -771,14 +811,14 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) if (ret) goto out_free; - /* Register PCC channel once for all CPUs. */ - if (!pcc_data.pcc_channel_acquired) { - ret = register_pcc_channel(pcc_data.pcc_subspace_idx); + /* Register PCC channel once for all PCC subspace id. */ + if (!pcc_data[pcc_subspace_id]->pcc_channel_acquired) { + ret = register_pcc_channel(pcc_subspace_id); if (ret) goto out_free; - init_rwsem(&pcc_data.pcc_lock); - init_waitqueue_head(&pcc_data.pcc_write_wait_q); + init_rwsem(&pcc_data[pcc_subspace_id]->pcc_lock); + init_waitqueue_head(&pcc_data[pcc_subspace_id]->pcc_write_wait_q); } /* Everything looks okay */ @@ -831,6 +871,16 @@ void acpi_cppc_processor_exit(struct acpi_processor *pr) struct cpc_desc *cpc_ptr; unsigned int i; void __iomem *addr; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, pr->id); + + if (pcc_data[pcc_ss_id]->pcc_channel_acquired) { + pcc_data[pcc_ss_id]->refcount--; + if (!pcc_data[pcc_ss_id]->refcount) { + pcc_mbox_free_channel(pcc_data[pcc_ss_id]->pcc_channel); + pcc_data[pcc_ss_id]->pcc_channel_acquired = 0; + kfree(pcc_data[pcc_ss_id]); + } + } cpc_ptr = per_cpu(cpc_desc_ptr, pr->id); if (!cpc_ptr) @@ -888,6 +938,7 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) { int ret_val = 0; void __iomem *vaddr = 0; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); struct cpc_reg *reg = ®_res->cpc_entry.reg; if (reg_res->type == ACPI_TYPE_INTEGER) { @@ -897,7 +948,7 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) *val = 0; if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) - vaddr = GET_PCC_VADDR(reg->address); + vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) vaddr = reg_res->sys_mem_vaddr; else if (reg->space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) @@ -932,10 +983,11 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) { int ret_val = 0; void __iomem *vaddr = 0; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); struct cpc_reg *reg = ®_res->cpc_entry.reg; if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) - vaddr = GET_PCC_VADDR(reg->address); + vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) vaddr = reg_res->sys_mem_vaddr; else if (reg->space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) @@ -980,6 +1032,8 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps) struct cpc_register_resource *highest_reg, *lowest_reg, *lowest_non_linear_reg, *nominal_reg; u64 high, low, nom, min_nonlinear; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; int ret = 0, regs_in_pcc = 0; if (!cpc_desc) { @@ -996,9 +1050,9 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps) if (CPC_IN_PCC(highest_reg) || CPC_IN_PCC(lowest_reg) || CPC_IN_PCC(lowest_non_linear_reg) || CPC_IN_PCC(nominal_reg)) { regs_in_pcc = 1; - down_write(&pcc_data.pcc_lock); + down_write(&pcc_ss_data->pcc_lock); /* Ring doorbell once to update PCC subspace */ - if (send_pcc_cmd(CMD_READ) < 0) { + if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { ret = -EIO; goto out_err; } @@ -1021,7 +1075,7 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps) out_err: if (regs_in_pcc) - up_write(&pcc_data.pcc_lock); + up_write(&pcc_ss_data->pcc_lock); return ret; } EXPORT_SYMBOL_GPL(cppc_get_perf_caps); @@ -1038,6 +1092,8 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs) struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpunum); struct cpc_register_resource *delivered_reg, *reference_reg, *ref_perf_reg, *ctr_wrap_reg; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; u64 delivered, reference, ref_perf, ctr_wrap_time; int ret = 0, regs_in_pcc = 0; @@ -1061,10 +1117,10 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs) /* Are any of the regs PCC ?*/ if (CPC_IN_PCC(delivered_reg) || CPC_IN_PCC(reference_reg) || CPC_IN_PCC(ctr_wrap_reg) || CPC_IN_PCC(ref_perf_reg)) { - down_write(&pcc_data.pcc_lock); + down_write(&pcc_ss_data->pcc_lock); regs_in_pcc = 1; /* Ring doorbell once to update PCC subspace */ - if (send_pcc_cmd(CMD_READ) < 0) { + if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) { ret = -EIO; goto out_err; } @@ -1094,7 +1150,7 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs) perf_fb_ctrs->wraparound_time = ctr_wrap_time; out_err: if (regs_in_pcc) - up_write(&pcc_data.pcc_lock); + up_write(&pcc_ss_data->pcc_lock); return ret; } EXPORT_SYMBOL_GPL(cppc_get_perf_ctrs); @@ -1110,6 +1166,8 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) { struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpu); struct cpc_register_resource *desired_reg; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; int ret = 0; if (!cpc_desc) { @@ -1127,11 +1185,11 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) * achieve that goal here */ if (CPC_IN_PCC(desired_reg)) { - down_read(&pcc_data.pcc_lock); /* BEGIN Phase-I */ - if (pcc_data.platform_owns_pcc) { - ret = check_pcc_chan(false); + down_read(&pcc_ss_data->pcc_lock); /* BEGIN Phase-I */ + if (pcc_ss_data->platform_owns_pcc) { + ret = check_pcc_chan(pcc_ss_id, false); if (ret) { - up_read(&pcc_data.pcc_lock); + up_read(&pcc_ss_data->pcc_lock); return ret; } } @@ -1139,8 +1197,8 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) * Update the pending_write to make sure a PCC CMD_READ will not * arrive and steal the channel during the switch to write lock */ - pcc_data.pending_pcc_write_cmd = true; - cpc_desc->write_cmd_id = pcc_data.pcc_write_cnt; + pcc_ss_data->pending_pcc_write_cmd = true; + cpc_desc->write_cmd_id = pcc_ss_data->pcc_write_cnt; cpc_desc->write_cmd_status = 0; } @@ -1151,7 +1209,7 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) cpc_write(cpu, desired_reg, perf_ctrls->desired_perf); if (CPC_IN_PCC(desired_reg)) - up_read(&pcc_data.pcc_lock); /* END Phase-I */ + up_read(&pcc_ss_data->pcc_lock); /* END Phase-I */ /* * This is Phase-II where we transfer the ownership of PCC to Platform * @@ -1199,15 +1257,15 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) * the write command before servicing the read command */ if (CPC_IN_PCC(desired_reg)) { - if (down_write_trylock(&pcc_data.pcc_lock)) { /* BEGIN Phase-II */ + if (down_write_trylock(&pcc_ss_data->pcc_lock)) {/* BEGIN Phase-II */ /* Update only if there are pending write commands */ - if (pcc_data.pending_pcc_write_cmd) - send_pcc_cmd(CMD_WRITE); - up_write(&pcc_data.pcc_lock); /* END Phase-II */ + if (pcc_ss_data->pending_pcc_write_cmd) + send_pcc_cmd(pcc_ss_id, CMD_WRITE); + up_write(&pcc_ss_data->pcc_lock); /* END Phase-II */ } else /* Wait until pcc_write_cnt is updated by send_pcc_cmd */ - wait_event(pcc_data.pcc_write_wait_q, - cpc_desc->write_cmd_id != pcc_data.pcc_write_cnt); + wait_event(pcc_ss_data->pcc_write_wait_q, + cpc_desc->write_cmd_id != pcc_ss_data->pcc_write_cnt); /* send_pcc_cmd updates the status in case of failure */ ret = cpc_desc->write_cmd_status; @@ -1240,6 +1298,8 @@ unsigned int cppc_get_transition_latency(int cpu_num) unsigned int latency_ns = 0; struct cpc_desc *cpc_desc; struct cpc_register_resource *desired_reg; + int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num); + struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; cpc_desc = per_cpu(cpc_desc_ptr, cpu_num); if (!cpc_desc) @@ -1249,11 +1309,11 @@ unsigned int cppc_get_transition_latency(int cpu_num) if (!CPC_IN_PCC(desired_reg)) return CPUFREQ_ETERNAL; - if (pcc_data.pcc_mpar) - latency_ns = 60 * (1000 * 1000 * 1000 / pcc_data.pcc_mpar); + if (pcc_ss_data->pcc_mpar) + latency_ns = 60 * (1000 * 1000 * 1000 / pcc_ss_data->pcc_mpar); - latency_ns = max(latency_ns, pcc_data.pcc_nominal * 1000); - latency_ns = max(latency_ns, pcc_data.pcc_mrtt * 1000); + latency_ns = max(latency_ns, pcc_ss_data->pcc_nominal * 1000); + latency_ns = max(latency_ns, pcc_ss_data->pcc_mrtt * 1000); return latency_ns; } -- 2.1.4