[PATCH 3/3] cpuidle: Select a different state on tick_broadcast_enter() failures

2015-05-09 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com If tick_broadcast_enter() fails in cpuidle_enter_state(), try to find another idle state to enter instead of invoking default_idle_call() immediately and returning -EBUSY which should increase the chances of saving some energy in those cases.

[PATCH 0/3] cpuidle: updates related to tick_broadcast_enter() failures

2015-05-09 Thread Rafael J. Wysocki
On Saturday, May 09, 2015 10:33:05 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 10:11:41 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki wrote: [cut] + /* Take

[PATCH 2/3] sched / idle: Call default_idle_call() from cpuidle_enter_state()

2015-05-09 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com The check of the cpuidle_enter() return value against -EBUSY made in call_cpuidle() will not be necessary any more if cpuidle_enter_state() calls default_idle_call() directly when it is about to return -EBUSY, so make that happen and eliminate

[PATCH 1/3] sched / idle: Call idle_set_state() from cpuidle_enter_state()

2015-05-09 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com Introduce a wrapper function around idle_set_state() called sched_idle_set_state() that will pass this_rq() to it as the first argument and make cpuidle_enter_state() call the new function before and after entering the target state. At the same

Re: [PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-09 Thread Rafael J. Wysocki
On Saturday, May 09, 2015 10:11:41 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki wrote: [cut] +/* Take note of the planned idle state. */ +

Re: [PATCH v4 03/21] powerpc/powernv: M64 support improvement

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: We're having the hardware or enforced (on P7IOC) limitation: M64 I would think if it is enforced, then it is enforced by hardware but you say hardware OR enforced :) segment#x can only be assigned to PE#x. IO and M32 segment can be mapped to

Re: [PATCH v4 07/21] powerpc/powernv: Release PEs dynamically

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: The original code doesn't support releasing PEs dynamically, meaning that PE and the associated resources (IO, M32, M64 and DMA) can't be released when unplugging a PCI adapter from one hotpluggable slot. The patch takes object oriented methodology,

Re: [PATCH v4 06/21] powerpc/powernv: Create PEs dynamically

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: Currently, the PEs and their associated resources are assigned in ppc_md.pcibios_fixup(). The function is called for once after PCI probing and resources assignment are finished. Obviously, it's not hotplug friendly. The patch creates PEs dynamically by

Re: [PATCH v4 08/21] powerpc/powernv: Drop pnv_ioda_setup_dev_PE()

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: Nobody is using the this function. The patch drops it. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com Yay! :) I would move this patchset along with other mechanical changes to the beginning of the patchset. Reviewed-by: Alexey Kardashevskiy

Re: [PATCH v4 04/21] powerpc/powernv: Improve IO and M32 mapping

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: The PHB's IO or M32 window is divided evenly to segments, each of them can be mapped to arbitrary PE# by IODT or M32DT. Current code figures out the consumed IO and M32 segments by one particular PE from the windows of the PE's upstream bridge. It won't

Re: [PATCH v4 21/21] pci/hotplug: PowerPC PowerNV PCI hotplug driver

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:03 PM, Gavin Shan wrote: The patch intends to add standalone driver to support PCI hotplug for PowerPC PowerNV platform, which runs on top of skiboot firmware. The firmware identified hotpluggable slots and marked their device tree node with proper ibm,slot-pluggable and

Re: [PATCH v4 10/21] powerpc/powernv: Fundamental reset for PCI bus reset

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: Function pnv_pci_reset_secondary_bus() is used to reset specified PCI bus, which is leaded by root complex or PCI bridge. That means the function shouldn't be called on PCI root bus and the patch removes the logic for that case. Also, some adapters

Re: [PATCH v4 09/21] powerpc/powernv: Use PCI slot reset infrastructure

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:02 PM, Gavin Shan wrote: For PowerNV platform, running on top of skiboot, all PE level reset should be routed to firmware if the bridge of the PE primary bus has device-node property ibm,reset-by-firmware. Otherwise, the kernel has to issue hot reset on PE's primary bus despite

Re: [PATCH v4 13/21] powerpc/powernv: Introduce pnv_pci_poll()

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:03 PM, Gavin Shan wrote: We might not get some PCI slot information (e.g. power status) immediately by OPAL API. Instead, opal_pci_poll() need to be called for the required information. The patch introduces pnv_pci_poll(), which bases on original pnv_eeh_poll(), to cover the

Re: [PATCH v4 15/21] powerpc/pci: Delay creating pci_dn

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:03 PM, Gavin Shan wrote: The pci_dn instances are allocated from memblock or bootmem when creating PCI controller (hoses) in setup_arch(). The PCI hotplug, which will be supported by proceeding patches, will release PCI device nodes and their corresponding pci_dn on unplugging

Re: [PATCH v4 14/21] powerpc/powernv: Functions to get/reset PCI slot status

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:03 PM, Gavin Shan wrote: The patch exports 3 functions, which base on corresponding OPAL APIs to get or set PCI slot status. Those functions are going to be used by PCI hotplug module in subsequent patches: pnv_pci_get_presence_status() opal_pci_get_presence_status()

Re: [PATCH v4 16/21] powerpc/pci: Create eeh_dev while creating pci_dn

2015-05-09 Thread Alexey Kardashevskiy
On 05/01/2015 04:03 PM, Gavin Shan wrote: The eeh_dev is always created based on pci_dn, but with initcall supported by core_initcall_sync(). The patch creates eeh_dev when pci_dn is created, indicating they have same life cycle. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com ---

[PATCH] i2c: powermac: don't workaround for keywest

2015-05-09 Thread Wolfram Sang
Commit 3a3dd0186f619b (i2c/powermac: Improve detection of devices from device-tree) added a codec device instantiation workaround unconditionally although it is only needed for onyx. Do it conditionally since keywest has its own codec instantiation in the sound drivers. Thanks must go to

[PATCH RESEND] sound: ppc: keywest: drop using attach adapter

2015-05-09 Thread Wolfram Sang
As we now have deferred probing, we can use a custom mechanism and finally get rid of this legacy interface from the i2c core. Signed-off-by: Wolfram Sang w...@the-dreams.de Tested-by: Dan DeVoto dand1...@yahoo.com Tested-by: Mark Elliott txliteb...@gmail.com --- Changes since last time: Added

Re: [PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-09 Thread Rafael J. Wysocki
On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki wrote: +/* + * find_tick_valid_state - select a state where tick does not stop + * @dev: cpuidle device for this cpu + * @drv: cpuidle driver for this cpu + */ +static

Re: [PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-09 Thread Rafael J. Wysocki
On Saturday, May 09, 2015 08:46:20 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki wrote: +/* + * find_tick_valid_state - select a state where tick does not stop + * @dev: cpuidle device

Re: [PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-09 Thread Rafael J. Wysocki
On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki wrote: [cut] + /* Take note of the planned idle state. */ + idle_set_state(smp_processor_id(), target_state); And I wouldn't do this either. The behavior here