lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <932082455.1194101447927858604.JavaMail.weblogic@ep2mlwas06b>
Date:	Thu, 19 Nov 2015 10:10:58 +0000 (GMT)
From:	MyungJoo Ham <myungjoo.ham@...sung.com>
To:	최찬우 <cw00.choi@...sung.com>,
	박경민 <kyungmin.park@...sung.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 6/6] PM / devfreq: Set the min_freq and max_freq of devfreq
 device

> After probing the devfreq device driver, the value of both min_freq and
> max_freq are zero(0). So, this patch initializes the 'min_freq' and 'max_freq'
> field of devfreq device by using the freq_table array.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> ---
>  drivers/devfreq/devfreq.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index c292ceb7ff19..0b24ae7b7a48 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -121,6 +121,11 @@ static void devfreq_set_freq_table(struct devfreq *devfreq)
>  		profile->freq_table[i] = freq;
>  	}
>  	rcu_read_unlock();
> +
> +	mutex_lock(&devfreq->lock);
> +	devfreq->min_freq = profile->freq_table[0];
> +	devfreq->max_freq = profile->freq_table[profile->max_state - 1];
> +	mutex_unlock(&devfreq->lock);
>  }

No, you should not do this.

It is allowed to use devfreq without both OPP and freq_table
assuming that the devfreq device may operate with very many
frequencies so that practically, we can virtually give it
any frequency numbers in a given range.
(cases where profile->max_state is 0 and it is not an error)

The value 0 is used for min/max_freq to declare
that min/max_freq is deactivated. Therefore, it is not
required to do so; they are not intended to show the hardware
configuration as well.

Cheers,
MyungJoo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ