Re: [PATCH 2/2] powerpc/pseries: Implemented indexed-count hotplug memory remove

2016-07-11 Thread Nathan Fontenot
On 06/30/2016 02:24 PM, Sahil Mehta wrote: > Indexed-count remove for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be unassigned (NOT > that lmbs will be removed). Because of Qemu's per-DIMM memory > management, the removal of a contiguous block of me

Re: [PATCH 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-11 Thread Nathan Fontenot
On 06/30/2016 02:22 PM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory c

Re: [PATCH] rpaphp: fix slot registration for multiple slots under a PHB

2016-07-08 Thread Nathan Fontenot
On 07/08/2016 06:19 PM, Tyrel Datwyler wrote: > PowerVM seems to only ever provide a single hotplug slot per PHB. > The under lying slot hotplug registration code assumed multiple slots, > but the actual implementation is broken for multiple slots. This went > unnoticed for years due to the nature

[PATCH v2 2/2] powerpc/pseries: Remove call to memblock_add()

2016-06-29 Thread Nathan Fontenot
The call to memblock_add is not needed, this is already done by memory_add(). This patch removes this call which shrinks dlpar_add_lmb_memory() enough that it can be merged into dlpar_add_lmb(). Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 37

[PATCH v2 1/2] powerpc/pseries: Auto-online hotplugged memory

2016-06-29 Thread Nathan Fontenot
explicitly onlining the memory. Signed-off-by: Nathan Fontenot --- arch/powerpc/configs/pseries_defconfig |1 + arch/powerpc/platforms/pseries/hotplug-memory.c | 14 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/powerpc/configs/pseries_defconfig b

[PATCH v2 0/2] powerpc/pseries: Auto-online hotplugged memory

2016-06-29 Thread Nathan Fontenot
Recent updates to the core mm code allow for auto-onlining of added memory, commit id 31bc3858ea3. This update to the pseries hotplug memory code takes advantage of this by setting the config option CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y so that we online added memory by default, this maintains the

Re: [PATCH] powerpc/pseries: Auto online hotplugged memory

2016-06-28 Thread Nathan Fontenot
On 06/27/2016 10:46 PM, Michael Ellerman wrote: > On Mon, 2016-06-27 at 09:41 -0500, Nathan Fontenot wrote: >> On 06/24/2016 12:35 AM, Michael Ellerman wrote: >>> On Mon, 2016-06-20 at 21:14 -0500, Nathan Fontenot wrote: >>>> On 06/20/2016 07:57 PM, Michael Ellerman w

Re: [PATCH] powerpc/pseries: Auto online hotplugged memory

2016-06-27 Thread Nathan Fontenot
On 06/24/2016 12:35 AM, Michael Ellerman wrote: > On Mon, 2016-06-20 at 21:14 -0500, Nathan Fontenot wrote: >> On 06/20/2016 07:57 PM, Michael Ellerman wrote: >>> On Mon, 2016-06-20 at 08:51 -0500, Nathan Fontenot wrote: >>> >>>> Auto online hotplugged memo

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Nathan Fontenot
On 06/23/2016 12:17 PM, Aneesh Kumar K.V wrote: > Reza Arbab writes: > >> These functions are making direct calls to the hash table APIs, >> leading to a BUG() on systems using radix. >> >> Switch them to the vmemmap_{create,remove}_mapping() wrappers, and >> move to the __meminit section. > >

Re: [PATCH] powerpc/pseries: Auto online hotplugged memory

2016-06-20 Thread Nathan Fontenot
On 06/20/2016 07:57 PM, Michael Ellerman wrote: > On Mon, 2016-06-20 at 08:51 -0500, Nathan Fontenot wrote: > >> Auto online hotplugged memory >> >> A recent update (commit id 31bc3858ea3) to the core mm hotplug code >> introduced the memhp_auto_online varia

[PATCH 2/2] powerpc/pseries: Dynamic add entires to associativity lookup array

2016-06-20 Thread Nathan Fontenot
to add new entries to the associativity lookup array. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 93 --- 1 file changed, 66 insertions(+), 27 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc

[PATCH 1/2] powerpc/pseries: Move property cloning into its own routine

2016-06-20 Thread Nathan Fontenot
Move property cloning code into its own routine Split the pieces of dlpar_clone_drconf_property() that create a copy of the property struct into its own routine. This allows for creating clones of more than just the ibm,dynamic-memory property used in memory hotplug. Signed-off-by: Nathan

[PATCH 0/2] powerpc/pseries: Dynamic associativity-lookup-arrays updating

2016-06-20 Thread Nathan Fontenot
The ibm,dynamic-reconfiguration-memory/ibm,associativity-lookup-arrays property used to track the associativity for LMBs assigned to a system may not contain all of the possible associativity arrays for the system at boot time. When a LMB is added to the system and its associativity array is not pr

[PATCH] powerpc/pseries: Auto online hotplugged memory

2016-06-20 Thread Nathan Fontenot
the system is automatically onlined. The code to add the memory block for memory added from add_memory() is removed as this is not needed, the memory_add code does this. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 52 +-- 1 file

Re: [RFC FIX PATCH v0] powerpc,numa: Fix memory_hotplug_max()

2016-05-04 Thread Nathan Fontenot
On 04/18/2016 10:54 PM, Bharata B Rao wrote: > On Sat, Apr 09, 2016 at 03:44:31PM +0530, Bharata B Rao wrote: >> On Fri, Apr 08, 2016 at 12:27:44AM -0500, Nathan Fontenot wrote: >>> On 04/06/2016 04:44 AM, Bharata B Rao wrote: >>>> memory_hotplug_max() uses hot_

Re: [RFC FIX PATCH v0] powerpc,numa: Fix memory_hotplug_max()

2016-04-07 Thread Nathan Fontenot
On 04/06/2016 04:44 AM, Bharata B Rao wrote: > memory_hotplug_max() uses hot_add_drconf_memory_max() to get maxmimum > addressable memory by referring to ibm,dyanamic-memory property. There > are three problems with the current approach: > > 1 hot_add_drconf_memory_max() assumes that ibm,dynamic-m

Re: [PATCH 2/3] powerpc: make kernel/nvram_64.c explicitly non-modular

2016-03-28 Thread Nathan Fontenot
he file already has that. > > We delete the MODULE_LICENSE tag since that information is already > contained at the top of the file in the comments. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Hari Bathini > Cc: Nathan Fontenot

Re: [3/3] powerpc/pseries: Cleanup property cloning in memory dlpar

2016-03-03 Thread Nathan Fontenot
On 03/01/2016 07:47 PM, Michael Ellerman wrote: > On Wed, 2016-03-02 at 10:02 +1100, Michael Ellerman wrote: >> On Wed, 2016-10-02 at 17:13:29 UTC, Nathan Fontenot wrote: >>> Now that the DLPAR add/remove flow updates the ibm,dynamic-memory device >>> tree property each

[PATCH 3/3] powerpc/pseries: Cleanup property cloning in memory dlpar

2016-02-10 Thread Nathan Fontenot
nce we can now do everything in dlpar_update_device_tree_lmb(). Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 79 +-- 1 file changed, 32 insertions(+), 47 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/a

[PATCH 2/3] powerpc/pseries: Update LMB associativity index during DLPAR add/remove

2016-02-10 Thread Nathan Fontenot
update of the device tree property after all of the requested DLPAR operations are complete and now does a property update during the add or remove of each LMB. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 193 +++ 1 file changed, 162

[PATCH 1/3] powerpc/pseries: Refactor dlpar_add_lmb() code

2016-02-10 Thread Nathan Fontenot
updating the lmb's affinity prior to adding the memory. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 34 ++- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/po

[PATCH 0/3] powerpc/pseries: Update affinity index during memory dlpar

2016-02-10 Thread Nathan Fontenot
When adding or removing a LMB the associativity index for the LMB needs to be updated in the device tree property ibm,dynamic-memory. Without updating the associativity index for a LMB before adding the LMB it could be added with the incorrect affinity. For LMBs that are not present at boot the as

Re: [RFCv2 4/9] arch/powerpc: Clean up memory hotplug failure paths

2016-02-02 Thread Nathan Fontenot
On 01/28/2016 11:23 PM, David Gibson wrote: > This makes a number of cleanups to handling of mapping failures during > memory hotplug on Power: > > For errors creating the linear mapping for the hot-added region: > * This is now reported with EFAULT which is more appropriate than the > previ

Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-25 Thread Nathan Fontenot
On 01/22/2016 04:41 AM, Denis Kirjanov wrote: > On 1/22/16, Michael Ellerman wrote: >> On Fri, 2016-01-22 at 11:58 +0530, Vasant Hegde wrote: >>> On 01/22/2016 10:59 AM, Michael Ellerman wrote: On Thu, 2016-01-21 at 21:45 +0530, Vasant Hegde wrote: > With commit 90a545e9 (restrict /d

Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-25 Thread Nathan Fontenot
On 01/22/2016 02:35 AM, Michael Ellerman wrote: > On Fri, 2016-01-22 at 11:58 +0530, Vasant Hegde wrote: >> On 01/22/2016 10:59 AM, Michael Ellerman wrote: >>> On Thu, 2016-01-21 at 21:45 +0530, Vasant Hegde wrote: >>> With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping >

[PATCH v3 6/6] powerpc/pseries: Enable kernel CPU dlpar from sysfs

2015-12-16 Thread Nathan Fontenot
Enable new kernel cpu hotplug functionality by allowing cpu dlpar requests to be initiated from sysfs. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc

[PATCH v3 4/6] powerpc/pseries: Add CPU dlpar remove functionality

2015-12-16 Thread Nathan Fontenot
be removed. We can then traverse the list remove each cpu and easily clean up in any cases of failure. Signed-off-by: Nathan Fontenot --- v3: - Re-wrote dlpar_cpus_to_remove(), now named find_dlpar_cpus_to_remove(), to make the routine easier to understand and provide better messages in

[PATCH v3 5/6] powerpc/pseries: Add CPU dlpar add functionality

2015-12-16 Thread Nathan Fontenot
Add the ability to hotplug add cpus via rtas hotplug events by either specifying the drc index of the CPU to add, or providing a count of the number of CPUs to add. Signed-off-by: Nathan Fontenot --- v3: - Add new routine valid_cpu_drc_index() to validate the drc index of a CPU before trying

[PATCH v3 3/6] powerpc/pseries: Update CPU hotplug error recovery

2015-12-16 Thread Nathan Fontenot
Update the cpu dlpar add/remove paths to do better error recovery when a failure occurs during the add/remove operation. Signed-off-by: Nathan Fontenot --- v2: - Corrected some pr_* statements moving pr_info to pr_debug statements and pr_debug to pr_warn statements. arch/powerpc/platforms

[PATCH v3 2/6] powerpc/pseries: Factor out common cpu hotplug code

2015-12-16 Thread Nathan Fontenot
are no functional changes introduced. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 70 ++ 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries

[PATCH v3 1/6] powerpc/pseries: Consolidate CPU hotplug code to hotplug-cpu.c

2015-12-16 Thread Nathan Fontenot
No functional changes, this patch is simply a move of the cpu hotplug code from pseries/dlpar.c to pseries/hotplug-cpu.c. This is in an effort to consolidate all of the cpu hotplug code in a common place. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 226

[PATCH v3] powerpc/pseries: Move CPU DLPAR into the kernel

2015-12-16 Thread Nathan Fontenot
To better support CPU hotplug in PowerKVM and PowerVM environments, the handling of CPU dlpar should be done entirely in the kernel. This will allow a common entry point to be used for PowerVM and PowerKVM CPU dlpar requests. For both environments the entry point is the same one introduced in a pr

Re: [PATCH] powerpc/nvram: Fix a memory leak in err path

2015-12-09 Thread Nathan Fontenot
On 12/09/2015 04:00 AM, xinhui wrote: > > If kmemdup fails, We need kfree *buff* first then return -ENOMEM. > Otherwise there is a memory leak. > > Signed-off-by: Pan Xinhui Reviewed-by: Nathan Fontenot > --- > arch/powerpc/kernel/nvram_64.c | 2 +- > 1 file ch

Re: [PATCH v2 5/6] powerpc/pseries: Add CPU dlpar add functionality

2015-12-01 Thread Nathan Fontenot
On 11/25/2015 11:13 PM, Michael Ellerman wrote: > On Tue, 2015-10-27 at 13:27 -0500, Nathan Fontenot wrote: > >> Add the ability to hotplug add cpus via rtas hotplug events by either >> specifying the drc index of the CPU to add, or providing a count of the >> number o

Re: [PATCH v2 4/6] powerpc/pseries: Add CPU dlpar remove functionality

2015-12-01 Thread Nathan Fontenot
On 11/25/2015 11:02 PM, Michael Ellerman wrote: > On Tue, 2015-10-27 at 13:26 -0500, Nathan Fontenot wrote: > >> Add the ability to dlpar remove CPUs via hotplug rtas events, either by >> specifying the drc-index of the CPU to remove or providing a count of cpus >> to re

Re: [PATCH v2] memory-hotplug: Fix kernel warning during memory hotplug on ppc64

2015-11-09 Thread Nathan Fontenot
uses memory_probe_store to reserve memory, > this can interrupt the memory reservation process. This patch modifies > memory_probe_store to take the hotplug sysfs lock to prevent the online > of added memory before the completion of the probe. > > Signed-off-by: John Allen Revi

[PATCH v2 3/6] powerpc/pseries: Update CPU hotplug error recovery

2015-10-27 Thread Nathan Fontenot
Update the cpu dlpar add/remove paths to do better error recovery when a failure occurs during the add/remove operation. Signed-off-by: Nathan Fontenot --- Updates for v2: - Corrected some pr_* statements moving pr_info to pr_debug staements and pr_debug to pr_warn statements. arch/powerpc

[PATCH v2 6/6] powerpc/pseries: Enable kernel CPU dlpar from sysfs

2015-10-27 Thread Nathan Fontenot
Enable new kernel cpu hotplug functionality by allowing cpu dlpar requests to be initiated from sysfs. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc

[PATCH v2 5/6] powerpc/pseries: Add CPU dlpar add functionality

2015-10-27 Thread Nathan Fontenot
Add the ability to hotplug add cpus via rtas hotplug events by either specifying the drc index of the CPU to add, or providing a count of the number of CPUs to add. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 94 ++ 1 file changed

[PATCH v2 4/6] powerpc/pseries: Add CPU dlpar remove functionality

2015-10-27 Thread Nathan Fontenot
be removed. We can then traverse the list remove each cpu and easily clean up in any cases of failure. Signed-off-by: Nathan Fontenot --- Updates for v2: - use for_each_node_by_type() instead of for_each_child_of_node - updated how the list of cpus to remove is generated - change to remove all

[PATCH v2 2/6] powerpc/pseries: Factor out common cpu hotplug code

2015-10-27 Thread Nathan Fontenot
are no functional changes introduced. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 70 ++ 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries

[PATCH v2 1/6] powerpc/pseries: Consolidate CPU hotplug code to hotplug-cpu.c

2015-10-27 Thread Nathan Fontenot
No functional changes, this patch is simply a move of the cpu hotplug code from pseries/dlpar.c to pseries/hotplug-cpu.c. This is in an effort to consolidate all of the cpu hotplug code in a common place. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 226

[PATCH v2 0/6] powerpc/pseries: Move CPU DLPAR into the kernel

2015-10-27 Thread Nathan Fontenot
To better support CPU hotplug in PowerKVM and PowerVM environments, the handling of CPU dlpar should be done entirely in the kernel. This will allow a common entry point to be used for PowerVM and PowerKVM CPU dlpar requests. For both environments the entry point is the same one introduced in a pr

[PATCH v2] powerpc/pseries: Correct string length in pseries_of_derive_parent()

2015-10-27 Thread Nathan Fontenot
, and in the case of DLPAR add operations the DLPAR request fails. This patch decrements the pointer returned from kbasename() to point to the '/' character before the base name instead of the base name. This then adjusts the string length calculations to not include the trailing '/

Re: [PATCH] powerpc/pseries: Correct string length in pseries_of_derive_parent()

2015-10-27 Thread Nathan Fontenot
On 10/27/2015 03:17 AM, Andy Shevchenko wrote: > On Mon, 2015-10-26 at 14:33 -0500, Nathan Fontenot wrote: >> Commit a030e1e4bbd085bbcfd0a23f8d355fcd41f39bed made a change to use >> kstrndup() instead of kmalloc() + strlcpy() in >> pseries_of_derive_parent() >> which in

Re: [PATCH] powerpc/pseries: Verify CPU doesn't exist before adding

2015-10-26 Thread Nathan Fontenot
On 10/25/2015 11:30 AM, Denis Kirjanov wrote: > On 10/23/15, Nathan Fontenot wrote: >> When DLPAR adding a CPU we should verify that the CPU does not already >> exist. Failure to do so can generate a kernel oops; >> >> [9.465585] kernel BUG at arch/powerpc/pl

[PATCH] powerpc/pseries: Correct string length in pseries_of_derive_parent()

2015-10-26 Thread Nathan Fontenot
e case of DLPAR add operations, the DLPAR request fails. This patch reduces the total length of the string to copy in kstrndup by 1 so we no longer copy the trailing '/'. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/of_helpers.c |2 +- 1 file changed, 1 insert

[PATCH] powerpc/pseries: Verify CPU doesn't exist before adding

2015-10-23 Thread Nathan Fontenot
probe to be performed on a cpu by writing to the sysfs cpu probe file (/sys/devices/system/cpu/probe). This patch adds a check for the existence of cpu prior to probing the cpu so userspace doing the wrong thing won't trigger a BUG_ON(). Signed-off-by: Nathan Fontenot --- arch/powerpc/plat

Re: [PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails

2015-09-04 Thread Nathan Fontenot
On 09/04/2015 05:04 AM, Bharata B Rao wrote: > From: Bharata B Rao > > dlpar_cpu_probe() should release the acquired DRC if configure_connector > call fails. > > Signed-off-by: Bharata B Rao > Cc: Nathan Fontenot Reviewed-by: Nathan Fontenot > --- > arch/powerp

Re: [PATCH 06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Nathan Fontenot
On 08/07/2015 02:59 AM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda Reviewed-b

Re: [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation

2015-08-07 Thread Nathan Fontenot
On 08/07/2015 02:59 AM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda Reviewed-b

Re: [4/6] pseries: Add CPU dlpar remove functionality

2015-07-22 Thread Nathan Fontenot
On 07/21/2015 08:11 PM, Michael Ellerman wrote: > On Tue, 2015-07-21 at 16:34 -0500, Nathan Fontenot wrote: >> On 07/21/2015 04:27 AM, Michael Ellerman wrote: >>> On Mon, 2015-22-06 at 21:00:49 UTC, Nathan Fontenot wrote: >>>> +static int dlpar_cpu_remove_by_co

Re: [4/6] pseries: Add CPU dlpar remove functionality

2015-07-21 Thread Nathan Fontenot
On 07/21/2015 04:27 AM, Michael Ellerman wrote: > On Mon, 2015-22-06 at 21:00:49 UTC, Nathan Fontenot wrote: >> Add the ability to dlpar remove CPUs via hotplug rtas events, either by >> specifying the drc-index of the CPU to remove or providing a count of cpus >> to remove

Re: [3/6] pseries: Update CPU hotplug error recovery

2015-07-21 Thread Nathan Fontenot
On 07/20/2015 11:46 PM, Michael Ellerman wrote: > On Mon, 2015-22-06 at 20:59:20 UTC, Nathan Fontenot wrote: >> Update the cpu dlpar add/remove paths to do better error recovery when >> a failure occurs during the add/remove operation. This includes adding >> some pr_info an

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-20 Thread Nathan Fontenot
SY condition (which should be the case > for the sensor that is queried by the EPOW IRQ handler). > > Signed-off-by: Thomas Huth Reviewed-by: Nathan Fontenot > --- > arch/powerpc/include/asm/rtas.h | 1 + > arch/powerpc/kernel/rtas.c | 17 ++

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-16 Thread Nathan Fontenot
On 07/16/2015 01:23 AM, Thomas Huth wrote: > On 07/15/2015 09:58 PM, Nathan Fontenot wrote: >> On 07/15/2015 09:35 AM, Thomas Huth wrote: >>> On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: >>>> On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: >>

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-15 Thread Nathan Fontenot
On 07/15/2015 09:35 AM, Thomas Huth wrote: > On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: >> On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: >>> Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use >>> mdelay() instead of msleep() in rtas_busy_delay()? Something more >>>

Re: powerpc,numa: Memory hotplug to memory-less nodes ?

2015-06-24 Thread Nathan Fontenot
On 06/23/2015 11:01 PM, Bharata B Rao wrote: > So will it be correct to say that memory hotplug to memory-less node > isn't supported by PowerPC kernel ? Should I enforce the same in QEMU > for PowerKVM ? > I'm not sure if that is correct. It appears that we initialize all online nodes, even those

[PATCH 6/6] pseries: Enable kernel CPU dlpar from sysfs

2015-06-22 Thread Nathan Fontenot
Enable new kernel cpu hotplug functionality by allowing cpu dlpar requests to be initiated from sysfs. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc

[PATCH 5/6] pseries: Add CPU dlpar add functionality

2015-06-22 Thread Nathan Fontenot
Add the ability to hotplug add cpus via rtas hotplug events by either specifying the drc index of the CPU to add, or providing a count of the number of CPUs to add. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 76 ++ 1 file changed

[PATCH 4/6] pseries: Add CPU dlpar remove functionality

2015-06-22 Thread Nathan Fontenot
remove and easily clean up in any cases of failure. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 202 ++ arch/powerpc/platforms/pseries/pseries.h |5 + 2 files changed, 207 insertions(+) diff --git a/arch/powerpc/platforms/pseries

[PATCH 3/6] pseries: Update CPU hotplug error recovery

2015-06-22 Thread Nathan Fontenot
Update the cpu dlpar add/remove paths to do better error recovery when a failure occurs during the add/remove operation. This includes adding some pr_info and pr_debug statements. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 34

[PATCH 2/6] pseries: Factor out common cpu hotplug code

2015-06-22 Thread Nathan Fontenot
. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 83 ++ 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index c55cdbc..f58d902

[PATCH 1/6] pseries: Consolidate CPU hotplug code to hotplug-cpu.c

2015-06-22 Thread Nathan Fontenot
No functional changes, this patch is simply a move of the cpu hotplug code from pseries/dlpar.c to pseries/hotplug-cpu.c. This is in an effort to consolidate all of the cpu hotplug code in a common place. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 189

[PATCH 0/6] pseries: Move CPU dlpar into the kernel

2015-06-22 Thread Nathan Fontenot
To better support CPU hotplug in PowerKVM and PowerVM environments, the handling of CPU dlpar should be done entirely in the kernel. This will allow a common entry point for PowerVM and PowerKVM CPU dlpar requests. For both environments, the entry point is the same one introduced in a previous patc

Re: of/dynamic: Fix test for PPC_PSERIES

2015-06-04 Thread Nathan Fontenot
On 06/04/2015 05:57 AM, Michael Ellerman wrote: > On Thu, 2015-04-06 at 09:34:41 UTC, Geert Uytterhoeven wrote: >> "IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is >> supposed to be used with the full Kconfig symbol name, including the >> "CONFIG_" prefix. >> >> Add the missi

Re: [PATCH] powerpc/pseries: hibernation/migration should honor topology update policy

2015-05-05 Thread Nathan Fontenot
by storing the current policy and only calling > start_topology_update() in the case where either PRRN/VPHN were enabled to > start with. > > Fixes: e04fa61214a3 (powerpc/pseries: Add /proc interface to control topology > updates) > > Signed-off-by: Tyrel Datwyler >

[PATCH] powerpc/pseries: Fix possible leaked device node reference

2015-04-29 Thread Nathan Fontenot
arent node aware") Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 019d34a..47d9cebe 100644 --- a/ar

[PATCH v2] powerpc/pseries: Correct cpu affinity for dlpar added cpus

2015-04-29 Thread Nathan Fontenot
calls (done in dlpar_acquire_drc) before calling rtas configure-connector. Fixes: 1a8061c46c46 ("powerpc/pseries: Add kernel based CPU DLPAR handling") Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 10 -- 1 file changed, 4 insertions(+), 6

Re: [PATCH] Correct cpu affinity for dlpar added cpus

2015-04-29 Thread Nathan Fontenot
On 04/28/2015 11:53 PM, Michael Ellerman wrote: > Subject should be "powerpc/pseries: ..." please. ok > > On Tue, 2015-04-28 at 10:37 -0500, Nathan Fontenot wrote: >> The incorrect ordering of operations during cpu dlpar causes the affinity >> of cpus being add

[PATCH] Correct cpu affinity for dlpar added cpus

2015-04-28 Thread Nathan Fontenot
-connector before making the set-indicator calls which results in invalid data in the ibm,associativity property for the cpu we're adding. This patch corrects the order of operations to make the set-indicator calls (done in acquire_drc) before calling configure-connector. Signed-off-by: Nathan Fon

Re: [PATCH kernel] powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE

2015-04-14 Thread Nathan Fontenot
on next week. > Signed-off-by: Alexey Kardashevskiy Acked-by: Nathan Fontenot > --- > > This is made against ad30cb99465 (mpe/next) and can be squashed into > 51925fb3c5 > if not too late. > > > --- > arch/powerpc/platforms/pseries/hotplug-memory.c | 13 ++

[PATCH] Correct memory hotplug locking

2015-04-07 Thread Nathan Fontenot
Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 742ef88..5cefcad 100644 --- a

Re: [PATCH 1/3] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-04 Thread Nathan Fontenot
On 03/03/2015 02:16 PM, Tyrel Datwyler wrote: > On 03/02/2015 10:15 PM, Michael Ellerman wrote: >> On Mon, 2015-03-02 at 13:30 -0800, Tyrel Datwyler wrote: >>> On 03/01/2015 08:19 PM, Cyril Bur wrote: On Fri, 2015-02-27 at 18:24 -0800, Tyrel Datwyler wrote: > During suspend/migration opera

[PATCH v3 5/5] pseries: Implement memory hotplug remove in the kernel

2015-02-10 Thread Nathan Fontenot
work to the kernel we can do the remove faster, and provide a common code path to do memory hotplug for both the PowerVM and PowerKVM environments. Signed-off-by: Nathan Fontenot --- Changes from previous cversion: Changes from previous version: - converted uint32_t to u32 - Updated the messaging

[PATCH v3 4/5] pseries: Implement memory hotplug add in the kernel

2015-02-10 Thread Nathan Fontenot
to the kernel we can do the add faster, and provide a common code path to do memory hotplug for both the PowerVM and PowerKVM environments. Signed-off-by: Nathan Fontenot --- Changes from previous version: - converted uint32_t to u32 - removed un-needed phys_addr/page_block checking - Updated the

[PATCH v3 3/5] pseries: Create new device hotplug entry point

2015-02-10 Thread Nathan Fontenot
string and create a rtas hotplug section that can be passed to the common entry point for handling hotplug requests. It should be noted that there is no chance of updating how we receive hotplug (dlpar) requests from the HMC on PowerVM systems. Signed-off-by: Nathan Fontenot --- Changes from previo

[PATCH v3 2/5] pseries: Export the acquire/release drc index routines

2015-02-10 Thread Nathan Fontenot
Export the routines to acquire and release a drc index. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/pseries.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 1796c54

[PATCH v3 1/5]pseries: Define rtas hotplug event sections

2015-02-10 Thread Nathan Fontenot
In order to handle device hotplug in the kernel on pseries the hotplug request will be communicated in the kernel in the form of a rtas hotplug event. This patch adds the definition of rtas hotplug event sections. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/rtas.h | 26

[PATCH v3 0/5] pseries: Move memory hotplug to the kernel

2015-02-10 Thread Nathan Fontenot
In order to improve hotplug support for cpus, memory, and pci devices in the PowerVM and PowerKVM environments, the handling of hotplugging devices should be updated to perform the hotplug operation entirely in the kernel. This patch set begins to address this by providing a framework and a common

Re: [PATCH 1/2] MAINTAINERS: ibmvscsi driver maintainer change

2015-01-14 Thread Nathan Fontenot
On 01/12/2015 06:31 PM, Tyrel Datwyler wrote: > Change maintainer of ibmvscsi driver to Tyrel Datwyler. > > Signed-off-by: Tyrel Datwyler > Cc: Nathan Fontenot > Cc: Brian King Acked-by: Nathan Fontenot > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+),

Re: Right location in sysfs for dlpar file

2014-12-08 Thread Nathan Fontenot
On 12/03/2014 10:31 PM, Greg KH wrote: > On Wed, Dec 03, 2014 at 09:07:27PM -0600, Nathan Fontenot wrote: >> On 12/01/2014 10:26 PM, Greg KH wrote: >>> On Mon, Dec 01, 2014 at 09:41:03AM -0600, Nathan Fontenot wrote: >>>> On 11/26/2014 09:12 PM, Benjamin Herr

Re: Right location in sysfs for dlpar file

2014-12-03 Thread Nathan Fontenot
On 12/01/2014 10:26 PM, Greg KH wrote: > On Mon, Dec 01, 2014 at 09:41:03AM -0600, Nathan Fontenot wrote: >> On 11/26/2014 09:12 PM, Benjamin Herrenschmidt wrote: >>> Hi Greg, >>> >>> So Nathan is working on a patch series to cleanup and improve our >>&

Re: Right location in sysfs for dlpar file

2014-12-03 Thread Nathan Fontenot
On 12/01/2014 11:09 PM, Michael Ellerman wrote: > On Mon, 2014-12-01 at 09:41 -0600, Nathan Fontenot wrote: >> On 11/26/2014 09:12 PM, Benjamin Herrenschmidt wrote: >>> Hi Greg, >>> >>> So Nathan is working on a patch series to cleanup and improve our >>&

Re: Right location in sysfs for dlpar file

2014-12-01 Thread Nathan Fontenot
On 11/26/2014 09:12 PM, Benjamin Herrenschmidt wrote: > Hi Greg, > > So Nathan is working on a patch series to cleanup and improve our > "DLPAR" infrastructure which is basically our hotplug mechanism when > running under the PowerVM (aka pHyp) and KVM hypervisors. The cleanup to the dlpar infras

Re: [PATCH v2 07/14] of/reconfig: Always use the same structure for notifiers

2014-11-25 Thread Nathan Fontenot
rt/bug on !update->dn / update->prop ? > > (Same for the rest of the patch) > > Or do you reckon it's pointless ? > I'm not sure it's worth it, if those are NULL pointers the drivers/of code would have tried t

Re: [PATCH v2 6/6] pseries: Implement memory hotplug remove in the kernel

2014-11-24 Thread Nathan Fontenot
On 11/21/2014 01:49 AM, Cyril Bur wrote: > > On Mon, 2014-11-17 at 15:56 -0600, Nathan Fontenot wrote: >> Move handling of memory hotplug remove on pseries completely into the kernel. >> >> The current memory hotplug remove path involves the drmgr command doing part >

Re: [PATCH v2 5/6] pseries: Implement memory hotplug add in the kernel

2014-11-24 Thread Nathan Fontenot
On 11/21/2014 01:49 AM, Cyril Bur wrote: > > On Mon, 2014-11-17 at 15:54 -0600, Nathan Fontenot wrote: >> Move handling of memory hotplug add on pseries completely into the kernel. >> >> The current memory hotplug add path involves the drmgr command doing part >>

Re: [PATCH v2 3/6] pseries: Create new device hotplug entry point

2014-11-24 Thread Nathan Fontenot
On 11/21/2014 01:49 AM, Cyril Bur wrote: > > On Mon, 2014-11-17 at 15:51 -0600, Nathan Fontenot wrote: >> Create a new entry point for device hotplug on pseries that will >> work for both PowerVM and PowerKVM systems. >> >> The current process to hotplug (or dlpa

Re: [PATCH v2 0/6] pseries: Move memory hotplug to the kernel

2014-11-18 Thread Nathan Fontenot
tree and found that they do apply with some fuzz to the master branch. Which tree were you having issue with patch 5? -Nathan > > Could you point out where I'm going wrong? > > Thanks, > > Cyril > > On Mon, 2014-11-17 at 15:44 -0600, Nathan Fontenot wrote: >&g

Re: [PATCH v2 3/6] pseries: Create new device hotplug entry point

2014-11-18 Thread Nathan Fontenot
On 11/17/2014 04:53 PM, Gavin Shan wrote: > On Mon, Nov 17, 2014 at 03:51:42PM -0600, Nathan Fontenot wrote: >> Create a new entry point for device hotplug on pseries that will >> work for both PowerVM and PowerKVM systems. >> >> The current process to hotplug (or dl

[PATCH v2 6/6] pseries: Implement memory hotplug remove in the kernel

2014-11-17 Thread Nathan Fontenot
via rtas hotplug events. This allows us to perform the operation faster and provide a common memory hotplug remove path for PowerVM and PowerKVM systems. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/hotplug-memory.c | 206 ++- 1 file changed, 201

[PATCH v2 5/6] pseries: Implement memory hotplug add in the kernel

2014-11-17 Thread Nathan Fontenot
hotplug event. This is needed because we do not need to do the work in the of notifier, this work is already performed in handling the hotplug request. At a later time we can remove this when we deprecate the previous method of memory hotplug. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms

[PATCH v2 4/6] pseries: Export the acquire/release drc index routines

2014-11-17 Thread Nathan Fontenot
Export the routines to acquire and release a drc index. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/pseries.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 1796c54

[PATCH v2 3/6] pseries: Create new device hotplug entry point

2014-11-17 Thread Nathan Fontenot
requests on PowerVM systems. Signed-off-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/dlpar.c | 72 ++- arch/powerpc/platforms/pseries/hotplug-memory.c | 19 ++ arch/powerpc/platforms/pseries/pseries.h| 10 +++ 3 files changed, 99 insertions(+), 2

[PATCH v2 2/6] pseries: Update of_drconf_cell struct for endian-ness

2014-11-17 Thread Nathan Fontenot
The of_drconf_cell defines each LMB for a system in the device tree property ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory. The values are in BE format by definition, this patch updates the of_drconf_cell struct to reflect the proper endian-ness. Signed-off-by: Nathan Fontenot --- arch

[PATCH v2 1/6] pseries: Define rtas hotplug event sections

2014-11-17 Thread Nathan Fontenot
In order to handle device hotplug in the kernel on pseries hotplug notifications will be communicated to the kernel in the form of a rtas hotplug events. This patch adds the definition of rtas hotplug event sections. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/rtas.h | 26

[PATCH v2 0/6] pseries: Move memory hotplug to the kernel

2014-11-17 Thread Nathan Fontenot
In order to better support device hotplug (cpu, memory, and pci) in the PowerVM and PowerKVM environments, the handling of device hotplug could be updated so that the act of hotplugging a device occurs entirely in the kernel. This patch set begins to address this by moving memory hotplug to the ker

Re: [PATCH] powerpc: use device_online/offline() instead of cpu_up/down()

2014-11-03 Thread Nathan Fontenot
rom cpu_probe|release_store. > > This patch fixes errors on PowerVM systems that have cpu(s) added/removed > using dlpar operations; without this patch, the > /sys/devices/system/cpu/cpuN/online nodes do not correctly show the > online state of added/removed cpus. > > Signed-off-by:

Re: [PATCH] MAINTAINERS: nx-842 driver maintainer change

2014-10-17 Thread Nathan Fontenot
On 10/17/2014 06:19 PM, Dan Streetman wrote: > Change maintainer of nx-842 compression coprocessor driver > to Dan Streetman. > > Signed-off-by: Dan Streetman > Cc: Nathan Fontenot Acked-by: Nathan Fontenot > --- > MAINTAINERS | 2 +- > 1 file changed, 1

<    1   2   3   4   5   6   7   8   >