Age | Commit message (Collapse) | Author |
|
Compress two lines into a single line if immediate return statement is found.
It also remove variables retval, freq, effective, vector, ovf and now
as they are no longer needed.
Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Reviewed-by: Wei Liu <wl@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
Move the parameter related definitions from init.h into a new header
file param.h. This will avoid include hell when new dependencies are
added to parameter definitions.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <julien@xen.org>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
These files either don't use any PER_CPU() infrastructure at all, or use
DEFINE_PER_CPU_*(). This is declared in xen/percpu.h, not asm/percpu.h, which
means that xen/percpu.h is included via a different path.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
Add Hygon Dhyana support to the acpi cpufreq and cpuidle subsystems by
using the code path of AMD.
Signed-off-by: Pu Wen <puwen@hygon.cn>
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
CPUs from different vendors sometimes share characteristics. All users of
X86_VENDOR_* are now direct equal/not-equal comparisons. By expressing the
X86_VENDOR_* constants in a bitmap fashon, we can more concicely and
efficiently test whether a vendor is one of a group.
Update all parts of the code which can already benefit from this improvement.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
|
This reduces the post-init memory footprint, eliminates a pointless
level of indirection at the use sites, and allows for subsequent
alternatives call patching.
Take the opportunity and also add a name to the PowerNow! instance.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
These features are soon to be exposed in the Xen public API. Rename them to
better match the vendor definitions.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
|
Add support to detect the APERF/MPERF feature. Also, remove the identical
code in cpufreq.c and powernow.c.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Cosmetics.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
As recommended in http://www.gnu.org/licenses/gpl-howto.en.html.
This is the result of:
$ git grep -El Mass\|Temple\|Franklin | xargs ./fsf.pl
Where fsf.pl is:
#!/usr/bin/perl -w -pi.bak -0777
my $repl = 'If not, see <http://www.gnu.org/licenses/>.';
my $br = qr/(?:\s*\n\s*(?:[\*\#]|\/\/|\.\\" )?\s*|\s+)/;
my $inwt = qr/[Ii]f${br}not,${br}write${br}(?:to${br})?the${br}Free${br}Software${br}Foundation,(?:${br}Inc\.,)?/;
my $mass = qr/675${br}Mass${br}Ave,?${br}Cambridge,?${br}MA${br}02139,?${br}USA,?\.?/;
my $franklin = qr/51${br}Franklin${br}St(?:reet)?(?:,${br}| - )Fifth${br}Floor,?${br}Boston,?${br}MA,?${br}02110-1301,?${br}USA,?\.?/;
my $temple = qr/59${br}Temple${br}Place(?:,${br}| - )Suite${br}330,?${br}Boston,?${br}MA,?${br}021110?-1307,?${br}USA,?\.?/;
s|$inwt$br$mass|$repl|m;
s|$inwt$br$franklin|$repl|m;
s|$inwt$br$temple|$repl|m;
The only remaining mentions of these addresses are in COPYING files which I
haven't touched.
Some of the changed files are imports from elsewhere, however
filtering them out is tricky, I think it is tolerable to have these
files be modified here and then perhaps reverted on the next sync,
since it's only 1-2 lines and obvious what is going on.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
Improving their documentation, and converting one option to boolean
since it has only boolean meaning.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Signed-off-by: Keir Fraser <keir@xen.org>
|
|
This was always bogus (xen/config.h should have been used instead) and
is superfluous now that xen/config.h gets included through the compiler
command line.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
This includes the conversion from for_each_cpu_mask() to for_each-cpu().
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
struct cpufreq_policy, including a cpumask_t member, gets copied in
cpufreq_limit_change(), cpufreq_add_cpu(), set_cpufreq_gov(), and
set_cpufreq_para(). Make the member a cpumask_var_t, thus reducing the
amount of data needing copying (particularly with large NR_CPUS).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
... in favor of using the new, nr_cpumask_bits-based ones.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
The former is the runtime equivalent of NR_CPUS (and users of NR_CPUS,
where necessary, get adjusted accordingly), while the latter is for the
sole use of determining the allocation size when dynamically allocating
CPU masks (done later in this series).
Adjust accessors to use either of the two to bound their bitmap
operations - which one gets used depends on whether accessing the bits
in the gap between nr_cpu_ids and nr_cpumask_bits is benign but more
efficient.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
This includes the removal of a redundant memset() from microcode_amd.c.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
|
|
The AMD and INTEL specific parts of cpufreq handling used different
per-cpu data structures with nearly identical semantics. Fold the two
structures into one by adding a generic architecture data item.
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
|
|
c/s 20325 change AMD cpufreq init logic. Before that, AMD cpu start
cpufreq init logic only when all cpus ready. c/s 20325 change it to
per cpu add, however, leave code un-elegant.
This patch do a little cleanup work.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
This includes replacing the bogus definition of cpumask_test_cpu()
(introduced by c/s 20073) with a Linux compatible one and replacing
the bad uses with cpu_isset().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Replace them with per-CPU data.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
... rather than after.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
|
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
{acpi,powernow}_cpufreq_cpu_init() generally don't run on the CPU the
policy they deal with is related to, hence using cpuid() directly
works only as long as all CPUs in the system are identical (which
admittedly is commonly the case).
Further add a per-policy flag indicating the availability of
APERF/MPERF MSRs, so that globally setting the .getavg accessor won't
be a problem on heterogeneous configurations.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Starting with Family 0x10, model 10 processors, some AMD processors
will have support for the APERF/MPERF MSRs. This patch adds the
checks necessary to support those MSRs.
It also makes the get_measured_perf function defined inside cpufreq.c
driver independent. max_freq is taken from the policy definition
instead of being a private argument in struct acpi_cpufreq_data.
The struct member is entirely removed from the function since it
is no longer used.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
|
|
Refactor the existing code that supports the Intel Turbo feature to
move all the driver specific bits in the cpufreq driver. Create
a tri-state interface for the Turbo feature that can distinguish
amongst enabled Turbo, disabled Turbo, and processors that don't
support Turbo at all.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
|
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
The general cpufreq infrastructure has been improved over the
last year. Update the AMD PowerNow! driver powernow.c to
take advantage of those improvements.
Specifically, addresses Novell bugzilla # 530035.
Signed-of-by: Mark Langsdorf <mark.langsdorf@amd.com>
|
|
Remove the unused "retry" parameter of on_selected_cpus(),
on_each_cpu(), smp_call_function(), and smp_call_function_single().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Rather than passing cpumasks by value in all cases (which is
problematic for large NR_CPUS configurations), pass them 'by
reference' (i.e. through a pointer to a const cpumask).
On x86 this changes send_IPI_mask() to always only send IPIs to remote
CPUs (meaning any caller needing to handle the current CPU as well has
to do so on its own).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
Currently cpufreq HW-ALL coordination is handled same way as SW-ALL.
However, SW-ALL will bring more IPIs which is bad for cpuidle.
This patch implement HW-ALL coordination handled in different way from
SW-ALL, for the sake of performance and reduce IPIs. We also
suspend/resume HW-ALL dbs timer for idle.
Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Tian, Kevin <kevin.tian@intel.com>
|
|
by both ondemand gov and user program
Current __get_measured_perf read aperf and mperf MSR and then clear
them for the sake of ondemand governor. This solution block user
program to get aperf and mperf on their purpose. In this patch, it no
longer clear aperf and mperf MSR, so that it can be used by both
ondemand gov and user program.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
c/s 19149 update cpufreq get_cur_val logic to avoid cross processor
call. However, to avoid null drv_data pointer, we adjust some logic in
this patch to keep advantage of c/s 19149 and at same time to avoid
null drv_data pointer.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
Avoid the call to check_freq() by default, since that function may
spin up to 1ms on certain systems without indicating any kind of severe
failure. This matches similar behavior in Linux.
Avoid doing a cross processor call in get_cur_val() if the current CPU
has its bit set in the mask passed in. Also use the local variable
'cpu' consistently, allowing to remove another local variable.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
cmdline)
Set userspace governor as default, which stays same effect
as when cpufreq in xen is not enabled. As a result, enable cpufreq
in xen by default to avoid reboot to activate cpufreq. Now it's
always on but w/o performance impact if user doesn't attempt
to change governor.
Add governor option at cmdline, add some warning info for debug.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
cpu's real physical freq.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
These messages don't exist in powernow's equivalent code, and are
pretty useless anyway, hence just cluttering the logs.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
This patch enhances hypervisor px sanity check in 2 level:
Firstly, move per-cpu-level px sanity check from each cpufreq driver
to common point (@ hypercall path). Secondly, add per-domain-level px
sanity check to common point (@ cpufreq_add_cpu).
Signed-off-by: Jinsong Liu <jinsong.liu@intel.com>
|
|
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
This patch move the cpufreq notify code from x86 specfic place to
common place, since it can be used by both x86 and ia64 cpufreq
driver.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
|
|
and ia64
Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
arch
Rebase cpufreq logic for supporting both x86 and ia64 arch:
1. move cpufreq arch-independent logic into common dir
(xen/drivers/acpi
and xen/drivers/cpufreq dir);
2. leave cpufreq x86-dependent logic at xen/arch/x86/acpi/cpufreq dir;
Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|
|
... as this is rather wasteful when Xen is configured to support many
CPUs but is running on systems having only a few.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Clean up cpufreq core logic, which now can cope with cpu
online/offline event, and also dynamic platform limitation event
(_PPC).
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
|