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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160422222106.GP13149@codeaurora.org>
Date:	Fri, 22 Apr 2016 15:21:06 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Rafael Wysocki <rjw@...ysocki.net>,
	Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
	linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
	arnd.bergmann@...aro.org, andrew@...n.ch,
	gregory.clement@...e-electrons.com, jason@...edaemon.net,
	sebastian.hesselbarth@...il.com,
	thomas.petazzoni@...e-electrons.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus()

On 04/21, Viresh Kumar wrote:
> diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
> index 55cbf9bd8707..9c4eb90759fb 100644
> --- a/drivers/base/power/opp/cpu.c
> +++ b/drivers/base/power/opp/cpu.c
> @@ -329,3 +329,48 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus);
> +
> +/**
> + * dev_pm_opp_get_sharing_cpus() - Get cpumask of CPUs sharing OPPs with @cpu_dev
> + * @cpu_dev:	CPU device for which we do this operation
> + * @cpumask:	cpumask to update with information of sharing CPUs
> + *
> + * This updates the @cpumask with CPUs that are sharing OPPs with @cpu_dev.
> + *
> + * Returns -ENODEV if OPP table isn't already present.
> + *
> + * Locking: The internal opp_table and opp structures are RCU protected.
> + * Hence this function internally uses RCU updater strategy with mutex locks
> + * to keep the integrity of the internal data structures. Callers should ensure
> + * that this function is *NOT* called under RCU protection or in contexts where
> + * mutex cannot be locked.
> + */
> +int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)

Is there a reason we use cpumask_var_t instead of struct cpumask *
here? My understanding is that cpumask_var_t is for stack
declarations.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ