- Jul 20, 2015
-
-
Viresh Kumar authored
Some information is common to all CPUs belonging to a policy, but are kept on per-cpu basis. Lets keep that in another structure common to all policy->cpus. That will make updates/reads to that less complex and less error prone. The memory for cpu_common_dbs_info is allocated/freed at INIT/EXIT, so that it we don't reallocate it for STOP/START sequence. It will be also be used (in next patch) while the governor is stopped and so must not be freed that early. Reviewed-and-tested-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 17, 2015
-
-
Viresh Kumar authored
Just call it 'policy', cur_policy is unnecessarily long and doesn't have any special meaning. Reviewed-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
It is called as 'cdbs' at most of the places and 'cpu_dbs' at others. Lets use 'cdbs' consistently for better readability. Reviewed-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
Its not common info to all CPUs, but a structure representing common type of cpu info to both governor types. Lets drop 'common_' from its name. Reviewed-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
Its not used at all, drop it. Reviewed-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
Delayed work was named as 'work' and to access work within it we do work.work. Not much readable. Rename delayed_work as 'dwork'. Reviewed-by:
Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 16, 2015
-
-
Kristen Carlson Accardi authored
HWP previously was only enabled at driver load time, on the boot CPU, however, HWP must be enabled per package. Move the code to enable HWP to the cpufreq driver init path so that it will be called per CPU. Signed-off-by:
Kristen Carlson Accardi <kristen@linux.intel.com> Tested-by:
David Zhuang <david.zhuang@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Cristian Ardelean authored
Fixed coding style issues found by checkpatch.pl tool. Changed space indentation to tab, removed unneccesary braces, removed space between MODULE macros and parentheses. REMARKS: failed to 'make' this file with error message 'fatal error: asm/mach-types.h: No such file or directory'. Signed-off-by:
Cristian Ardelean <cristian97.ardelean@gmail.com> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Pan Xinhui authored
As policy->cpu may not be same in acpi_cpufreq_cpu_init() and acpi_cpufreq_cpu_exit(). There is a risk that we use different CPU to un/register ACPI performance. So acpi_processor_unregister_performance() may not be able to do the cleanup work. That causes a memory leak. And if there will be another acpi_processor_register_performance() call, it may also fail thanks to the internal check of pr->performace. So add a new struct acpi_cpufreq_data field, acpi_perf_cpu, to fix this issue. Signed-off-by:
Pan Xinhui <xinhuix.pan@intel.com> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> [ rjw: Changelog ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
cpufreq_init_policy() can fail, and we don't do anything except a call to ->exit() on that. The policy should be freed if this happens. Do it properly. Reported-and-tested-by:
"Jon Medhurst (Tixy)" <tixy@linaro.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
These labels are are named in two ways normally: - Based on what caused to jump to such labels - Based on what we do under such labels We follow the first naming convention today and that leads to multiple labels for doing the same work. Fix it by switching to the second way of naming them. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Pan Xinhui authored
Drivers can store their internal per-policy information in policy->driver_data, lets use it. we have benefits after this replacing. 1) memory saving. 2) policy is shared by several cpus, per_cpu seems not correct. using *driver_data* is more reasonable. 3) fix a memory leak in acpi_cpufreq_cpu_exit. as policy->cpu might change during cpu hotplug. So sometimes we cant't free *data*, use *driver_data* to fix it. 4) fix a zero return value of get_cur_freq_on_cpu. Only per_cpu of policy->cpu is set to *data*, if we try to get cpufreq on other cpus, we get zero instead of correct values. Use *driver_data* to fix it. Signed-off-by:
Pan Xinhui <xinhuix.pan@intel.com> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 09, 2015
-
-
Viresh Kumar authored
Users of freq table may want to access it for any CPU from policy->related_cpus mask. One such user is cpu-cooling layer. It gets a list of 'clip_cpus' (equivalent to policy->related_cpus) during registration and tries to get freq_table for the first CPU of this mask. If the CPU, for which it tries to fetch freq_table, is offline, cpufreq_frequency_get_table() fails. This happens because it relies on cpufreq_cpu_get_raw() for its functioning which returns policy only for online CPUs. The fix is to access the policy data structure for the given CPU directly (which also returns a valid policy for offline CPUs), but the policy itself has to be active (meaning that at least one CPU using it is online) for the frequency table to be returned. Because we will be using 'cpufreq_cpu_data' now, which is internal to the cpufreq core, move cpufreq_frequency_get_table() to cpufreq.c. Reported-and-tested-by:
Pi-Cheng Chen <pi-cheng.chen@linaro.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Viresh Kumar authored
When all CPUs of a policy are hot-unplugged, we EXIT the governor but don't mark policy->governor as NULL. This was done in order to keep last used governor's information intact in sysfs, while the CPUs are offline. But we also need to clear policy->governor when restoring the policy. Because policy->governor still points to the last governor while policy is restored, following sequence of event happens: - cpufreq_init_policy() called while restoring policy - find_governor() matches last_governor string for present governors and returns last used governor's pointer, say ondemand. policy->governor already has the same address, unless the governor was removed in between. - cpufreq_set_policy() is called with both old/new policies governor set as ondemand. - Because governors matched, we skip governor initialization and return after calling __cpufreq_governor(CPUFREQ_GOV_LIMITS). Because the governor wasn't initialized for this policy, it returned -EBUSY. - cpufreq_init_policy() exits the policy on this error, but doesn't destroy it properly (should be fixed separately). - And so we enter a scenario where the policy isn't completely initialized but used. Fix this by setting policy->governor to NULL while restoring the policy. Reported-and-tested-by:
Pi-Cheng Chen <pi-cheng.chen@linaro.org> Reported-and-tested-by:
"Jon Medhurst (Tixy)" <tixy@linaro.org> Reported-and-tested-by:
Steven Rostedt <rostedt@goodmis.org> Fixes: 18bf3a12 (cpufreq: Mark policy->governor = NULL for inactive policies) Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 04, 2015
-
-
Dave Jiang authored
When split BAR is enabled, the driver needs to dump out the split BAR registers rather than the original 64bit BAR registers. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
The unsafe doorbell and scratchpad access should display reason when WARN is called. Otherwise we get a stack dump without any explanation. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Printouts driver name and version to indicate what is being loaded. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Benchmarking showed a significant performance increase with the MTU size to 64k instead of 16k. Change the driver default to 64k. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Instead of using the platform code names, use the correct platform names to identify the respective Intel NTB hardware. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Disable DMA usage by default, since the CPU provides much better performance with write combining. Provide a module parameter to enable DMA usage when offloading the memcpy is preferred. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Changing the memory window BAR mappings to write combining significantly boosts the performance. We will also use memcpy that uses non-temporal store, which showed performance improvement when doing non-cached memcpys. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Allocate memory for the NUMA node of the NTB device. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Allocate memory and request the DMA channel for the same NUMA node as the NTB device. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
When the ntb transport is connecting and waiting for the peer, the debug console receives lots of debug level messages about the remote qp link status being down. Rate limit those messages. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
This is a simple debugging driver that enables the doorbell and scratch pad registers to be read and written from the debugfs. This tool enables more complicated debugging to be scripted from user space. This driver may be used to test that your ntb hardware and drivers are functioning at a basic level. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
This is a simple ping pong driver that exercises the scratch pads and doorbells of the ntb hardware. This driver may be used to test that your ntb hardware and drivers are functioning at a basic level. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Add module parameters for the addresses to be used in B2B topology. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Reset the link stats when the link goes down. In particular, the TX and RX index and count must be reset, or else the TX side will be sending packets to the RX side where the RX side is not expecting them. Reset all the stats, to be consistent. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
On link down, don't advance RX index to the next entry. The next entry should never be valid after receiving the link down flag. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
The same message "qp %d: Link Down\n" was printed at two locations in ntb_transport. Change the messages so they are distinct. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Set errata flags for the specific device IDs to which they apply, instead of the whole Xeon hardware class. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
Link training should be enabled in the driver probe for root port mode. We should not have to wait for transport to be loaded for this to happen. Otherwise the ntb device will not show up on the transparent bridge side of the link. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Dave Jiang authored
The transport was writing and then reading the peer scratch pad, essentially reading what it just wrote instead of exchanging any information with the peer. The transport expects the peer values to be the same as the local values, so this issue was not obvious. Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Change ntb_hw_intel to use the new NTB hardware abstraction layer. Split ntb_transport into its own driver. Change it to use the new NTB hardware abstraction layer. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
Allen Hubbe authored
Abstract the NTB device behind a programming interface, so that it can support different hardware and client drivers. Signed-off-by:
Allen Hubbe <Allen.Hubbe@emc.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>
-
- Jul 03, 2015
-
-
Shixin Zeng authored
The length of each EDID block is EDID_LENGTH, and number of blocks is (1 + edid->extensions) - we need to multiply not add them. This causes wrong EDID to be passed on, and is a regression introduced by d2ed3436 (drm: Introduce helper for replacing blob properties) Signed-off-by:
Shixin Zeng <zeng.shixin@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> [danvet: Add Cc: and fix commit summary.] Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
Stephen Rothwell authored
Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Cornelia Huck authored
Eric noticed problems with vhost-scsi and virtio-ccw: vhost-scsi complained about overwriting values in the config space, which was triggered by a broken implementation of virtio-ccw's config get/set routines. It was probably sheer luck that we did not hit this before. When writing a value to the config space, the WRITE_CONF ccw will always write from the beginning of the config space up to and including the value to be set. If the config space up to the value has not yet been retrieved from the device, however, we'll end up overwriting values. Keep track of the known config space and update if needed to avoid this. Moreover, READ_CONF will only read the number of bytes it has been instructed to retrieve, so we must not copy more than that to the buffer, or we might overwrite trailing values. Reported-by:
Eric Farman <farman@linux.vnet.ibm.com> Signed-off-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by:
Eric Farman <farman@linux.vnet.ibm.com> Tested-by:
Eric Farman <farman@linux.vnet.ibm.com> Signed-off-by:
Christian Borntraeger <borntraeger@de.ibm.com> Cc: stable@vger.kernel.org Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Fabian Frederick authored
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by:
Fabian Frederick <fabf@skynet.be> Signed-off-by:
Jean Delvare <jdelvare@suse.de>
-
Roger Lucas authored
Add pwm[4-7] and the associated pwm[4-7]_mode attributes. Signed-off-by:
Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by:
Jean Delvare <jdelvare@suse.de>
-