Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp462498pxb; Thu, 5 Nov 2020 05:00:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9prQHSaLMnMrHnq1VGz/E0jnZc/XVzwoq2Z0mJ0hgFfpyc5ARi/wIHxdlSCU+fv/eMKot X-Received: by 2002:a17:906:49cf:: with SMTP id w15mr2256736ejv.252.1604581211571; Thu, 05 Nov 2020 05:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604581211; cv=none; d=google.com; s=arc-20160816; b=FOpkCn3kUaveu8PWaaXZxanGQkFfcAV3SqYjzviCrIGvRwcc4X6srgVmviVcM902tD 4e3lWgdKnRQsB2klGlPvFn/IMuAaobaKsdAkqUkCksM6cEGTEtksAyOtVGrTUe/mCPUo 9HysyV7C/7reNB32J0tozaSarhff1DXfM9n35eEu/+ykmCHwBZMzNrQki5Um2cHQZvuY Br8B82PhZ6ndfKimdFoTHF8ulmIFH1RrNa82rBiQ9uoJcR6KrjpFIq/OlFzJHUI1BKuH jWw4PVIRlb9gs69MMzVp45Lht3pXztaoNau0TF6jAhxEVzHOMK7Rtoqfinhzp3Tp6ZeL wJRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=G7aEjR3+VBaL0WERzi1DFbIA/xwYUgExZvrCfimpLLc=; b=vLiAh6FUf6wiuhyP71AabYeof41P7zlHPPBKVYafCN7JxM2FmHlvxWq+Y6lBDJLPiy KUjDfvJHiJF+2cpXpGrwxLW/09oMZC0m5vNlIzEhgyFYrQCF07g1dTPCE3wdYhS//H7Q 9lDCWvMbOc2kDi0bU9RzsnMNXMpkOHxgtfyNfdAVNM2bkge0OeEXZTguIoAztszyJpck 88xDxlT3R09+9Yo8vq+Dw+1VEebVe+Hnm5/dxxIka52k6vSjYEBzXLhhQXGKDtTEabGO 0720Tvz8ojDIwJ+rJQr8bQ1Ue7f7wWu7heqRNtIjDIDBI9o+Vye/tHhckj6YrD6cbJO1 FFwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si1016637edf.5.2020.11.05.04.59.48; Thu, 05 Nov 2020 05:00:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731008AbgKEM5f (ORCPT + 99 others); Thu, 5 Nov 2020 07:57:35 -0500 Received: from foss.arm.com ([217.140.110.172]:60060 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730829AbgKEM4z (ORCPT ); Thu, 5 Nov 2020 07:56:55 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 790FC142F; Thu, 5 Nov 2020 04:56:54 -0800 (PST) Received: from e108754-lin.cambridge.arm.com (e108754-lin.cambridge.arm.com [10.1.198.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4518C3F719; Thu, 5 Nov 2020 04:56:53 -0800 (PST) From: Ionela Voinescu To: rjw@rjwysocki.net, viresh.kumar@linaro.org, lenb@kernel.org, sudeep.holla@arm.com Cc: morten.rasmussen@arm.com, jeremy.linton@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ionela.voinescu@arm.com Subject: [PATCH 8/8] acpi: fix NONE coordination for domain mapping failure Date: Thu, 5 Nov 2020 12:55:24 +0000 Message-Id: <20201105125524.4409-9-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201105125524.4409-1-ionela.voinescu@arm.com> References: <20201105125524.4409-1-ionela.voinescu@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For errors parsing the _PSD domains, a separate domain is returned for each CPU in the failed _PSD domain with no coordination (as per previous comment). But contrary to the intention, the code was setting CPUFREQ_SHARED_TYPE_ALL as coordination type. Change shared_type to CPUFREQ_SHARED_TYPE_NONE in case of errors parsing the domain information. The function still return the error and the caller is free to bail out the domain initialisation altogether in that case. Given that both functions return domains with a single CPU, this change does not affect the functionality, but clarifies the intention. Signed-off-by: Ionela Voinescu Cc: Rafael J. Wysocki Cc: Len Brown Cc: Viresh Kumar --- drivers/acpi/cppc_acpi.c | 2 +- drivers/acpi/processor_perflib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 75e36b909ae6..e1e46cc66eeb 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -477,7 +477,7 @@ int acpi_get_psd_map(unsigned int cpu, struct psd_data *domain) /* Assume no coordination on any error parsing domain info */ cpumask_clear(domain->shared_cpu_map); cpumask_set_cpu(cpu, domain->shared_cpu_map); - domain->shared_type = CPUFREQ_SHARED_TYPE_ALL; + domain->shared_type = CPUFREQ_SHARED_TYPE_NONE; return -EFAULT; } diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 5909e8fa4013..5ce638537791 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -710,7 +710,7 @@ int acpi_processor_preregister_performance( if (retval) { cpumask_clear(pr->performance->shared_cpu_map); cpumask_set_cpu(i, pr->performance->shared_cpu_map); - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; + pr->performance->shared_type = CPUFREQ_SHARED_TYPE_NONE; } pr->performance = NULL; /* Will be set for real in register */ } -- 2.17.1