From patchwork Tue Jun 25 03:56:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2774351 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7E4ECC0AB1 for ; Tue, 25 Jun 2013 03:56:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93771200D9 for ; Tue, 25 Jun 2013 03:56:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48C06200EC for ; Tue, 25 Jun 2013 03:56:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751586Ab3FYD4Q (ORCPT ); Mon, 24 Jun 2013 23:56:16 -0400 Received: from mail-ob0-f170.google.com ([209.85.214.170]:46609 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473Ab3FYD4Q (ORCPT ); Mon, 24 Jun 2013 23:56:16 -0400 Received: by mail-ob0-f170.google.com with SMTP id ef5so11604643obb.1 for ; Mon, 24 Jun 2013 20:56:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=yakBajxY1vMRvaKmYtuZxtVrxtWb8k3xj2fnO9dEzLk=; b=a20lOSK73wVxUkFljMfC+XAd24IAKCCnPFTqDtXlK/koWtA25/cnP+MxMBjP/uT5Et qe/BWdCjCgVZelVM3qwhFQSZLHWsdfPivXDtkSHZJ34uW6kFxoiuWPogSYCd6IVWUWRk XOA5CajDZb9WBBojMVU7C4LSqhJ2qhNySTzXKQJvDR6Lw1yPXnoDloP+fBDY06gfWdDq sxAvtPdyzYxicoX0iRQugbjD10gbuxj4us2h5QH/EQUtwr4eou2RBiHy8wk6qymxg+DL hm06ncYP6eSkuNzhUeyJIsepRtM4iMPmnjcTbP7k6A8KRaS/AtVp0+0cmShHnxwMDP/g 69zg== MIME-Version: 1.0 X-Received: by 10.60.46.225 with SMTP id y1mr12133008oem.17.1372132575438; Mon, 24 Jun 2013 20:56:15 -0700 (PDT) Received: by 10.182.96.138 with HTTP; Mon, 24 Jun 2013 20:56:15 -0700 (PDT) In-Reply-To: <1372126006-4950-2-git-send-email-tianyu.lan@intel.com> References: <1372126006-4950-1-git-send-email-tianyu.lan@intel.com> <1372126006-4950-2-git-send-email-tianyu.lan@intel.com> Date: Tue, 25 Jun 2013 09:26:15 +0530 Message-ID: Subject: Re: [PATCH 2/2] CPUFreq: Add new sysfs attribute freqdomain_cpus for acpi-freq driver From: Viresh Kumar To: Lan Tianyu Cc: rjw@sisk.pl, lenb@kernel.org, jean-philippe.halimi@exascale-computing.eu, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, cpufreq@vger.kernel.org X-Gm-Message-State: ALoCoQl774G9FG3pkaQRHqH4AXM0XnHd4IBazk/bTZ2YZU+NvpNHD8WgPk3XwD1u3Qc8siUDqRkJ Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, TRACKER_ID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 25 June 2013 07:36, Lan Tianyu wrote: > diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt > index ff2f283..0cc72f7 100644 > --- a/Documentation/cpu-freq/user-guide.txt > +++ b/Documentation/cpu-freq/user-guide.txt > @@ -196,6 +196,10 @@ affected_cpus : List of Online CPUs that require software > related_cpus : List of Online + Offline CPUs that need software > coordination of frequency. > > +freqdomain_cpus : List of Online + Offline CPUs in same CPU dependency > + domain. (This is only available for acpi-cpufreq > + driver) > + This is generic file, don't add this information here. Add this in acpi-cpufreq file. > scaling_driver : Hardware driver for cpufreq. > > scaling_cur_freq : Current frequency of the CPU as determined by > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c > index 17e3496..b859997 100644 > --- a/drivers/cpufreq/acpi-cpufreq.c > +++ b/drivers/cpufreq/acpi-cpufreq.c > @@ -176,6 +176,16 @@ static struct global_attr global_boost = __ATTR(boost, 0644, > show_global_boost, > store_global_boost); > > +static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) > +{ > + struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); > + struct acpi_processor_performance *perf = data->acpi_data; > + > + return cpufreq_show_cpus(perf->shared_cpu_map, buf); > +} I am not sure if this is enough. Check this commit: aa77a52764a92216b61a6c8079b5c01937c046cd It had these changes: dmi_check_system(sw_any_bug_dmi_table); @@ -742,7 +741,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) { cpumask_clear(policy->cpus); cpumask_set_cpu(cpu, policy->cpus); - cpumask_copy(policy->related_cpus, cpu_sibling_mask(cpu)); policy->shared_type = CPUFREQ_SHARED_TYPE_HW; pr_info_once(PFX "overriding BIOS provided _PSD data\n"); --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 937bc28..57a8774 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -730,7 +730,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { cpumask_copy(policy->cpus, perf->shared_cpu_map); } - cpumask_copy(policy->related_cpus, perf->shared_cpu_map); #ifdef CONFIG_SMP