Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-18 Thread Reza Arbab
d testcase for the same in core/test/run-device.c Series applied to skiboot master with the fixup we discussed. -- Reza Arbab

Re: [PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-15 Thread Reza Arbab
can fix during commit, so no need for a new patch. + assert(dt_find_by_name_before_addr(root, "node0_1") == addr2); + assert(dt_find_by_name_before_addr(root, "node0") == NULL); + assert(dt_find_by_name_before_addr(root, "node0_") == NULL); + dt_free(root); + return 0; } -- Reza Arbab

Re: [PATCH V5 3/3] skiboot: Update IMC PMU node names for power10

2023-08-09 Thread Reza Arbab
s_p10[i]); + if (!target) + continue; + /* Remove the device node */ + dt_free(target); + } + } -- Reza Arbab

Re: [PATCH V5 1/3] core/device: Add function to return child node using name at substring "@"

2023-08-09 Thread Reza Arbab
addr2 = dt_new_addr(root, "node", 0x2); assert(dt_find_by_name_substr(root, "node") == ???); ^^^ -- Reza Arbab

Re: [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing

2023-07-31 Thread Reza Arbab
On Sat, Jul 29, 2023 at 08:58:57PM +0530, Aneesh Kumar K V wrote: Thanks for correcting the right device tree node and testing the changes. Can I add Co-authored-by: Reza Arbab Sure, that's fine. Signed-off-by: Reza Arbab -- Reza Arbab

Re: [PATCH v3 1/2] powerpc/mm: Cleanup memory block size probing

2023-07-28 Thread Reza Arbab
ions. +*/ + compatible = of_get_flat_dt_prop(node, "compatible", NULL); + if (compatible && !strcmp(compatible, "ibm,coherent-device-memory")) { + *block_size = SZ_256M; + return 1; + } } /* continue looking for other memory device types */ return 0; -- Reza Arbab

Re: [PATCH v2 2/2] powerpc/mm: Add memory_block_size as a kernel parameter

2023-06-13 Thread Reza Arbab
determined at boot is 1GB, but we know that 15.75GB of device memory will be hotplugged during runtime. Reviewed-by: Reza Arbab -- Reza Arbab

Re: [PATCH v2 1/2] powerpc/mm: Cleanup memory block size probing

2023-06-13 Thread Reza Arbab
and make sure we can map them all correctly using the computed memory block size value. Reviewed-by: Reza Arbab -- Reza Arbab

Re: [Skiboot] [PATCH V4 3/3] skiboot: Update IMC PMU node names for power10

2023-03-22 Thread Reza Arbab
rget = dt_find_by_name_substr(dev, otl); + if (target) + dt_free(target); + break; As far as I know skiboot follows the kernel coding style. Would you mind fixing up the minor style nits checkpatch.pl reports for this patch? -- Reza Arbab

Re: [Skiboot] [PATCH V4 1/3] core/device: Add function to return child node using name at substring "@"

2023-03-22 Thread Reza Arbab
patch, but since you're specifically looking for '@' now, maybe call it something like dt_find_by_name_before_addr? -- Reza Arbab

[PATCH] powerpc: Remove TM XER[SO] bug workaround on POWER9 v2.3

2023-03-08 Thread Reza Arbab via B4 Relay
From: Reza Arbab When creating the CPU feature bits for DD2.3, I should not have carried forward CPU_FTR_P9_TM_XER_SO_BUG. That bug is fixed in DD2.3, so remove the flag. Fixes: 26b78c81e84c ("powerpc: Enable the DAWR on POWER9 DD2.3 and above") Signed-off-by: Reza Arbab --- ar

[PATCH] powerpc: Enable the DAWR on POWER9 DD2.3 and above

2022-05-03 Thread Reza Arbab
ding DD2.3 as a discrete case for the first time here, I'm carrying the quirks of DD2.2 forward to keep all behavior outside of this DAWR change the same. This leaves the assessment and potential removal of those quirks on DD2.3 for later. Signed-off-by: Reza Arbab --- Documentation/powerpc/dawr-power

Re: [PATCH v2 2/4] powerpc/mm/radix: Free PUD table when freeing pagetable

2020-07-08 Thread Reza Arbab
not free, and it wasn't quite clear if their motivation also applies to us. Probably not, but I thought it was worth mentioning again. -- Reza Arbab

Re: [PATCH 00/11] powerpv/powernv: Restore pnv_npu_try_dma_set_bypass()

2019-10-30 Thread Reza Arbab
On Wed, Oct 30, 2019 at 07:13:59PM +0100, Christoph Hellwig wrote: On Wed, Oct 30, 2019 at 01:08:51PM -0500, Reza Arbab wrote: On Wed, Oct 30, 2019 at 06:53:41PM +0100, Christoph Hellwig wrote: How do you even use this code? Nothing in the kernel even calls dma_set_mask for NPU devices, as we

Re: [PATCH 11/11] powerpc/powernv: Add pnv_pci_ioda_dma_set_mask()

2019-10-30 Thread Reza Arbab
On Wed, Oct 30, 2019 at 06:55:18PM +0100, Christoph Hellwig wrote: On Wed, Oct 30, 2019 at 12:00:00PM -0500, Reza Arbab wrote: Change pnv_pci_ioda_iommu_bypass_supported() to have no side effects, by separating the part of the function that determines if bypass is supported from the part

Re: [PATCH 00/11] powerpv/powernv: Restore pnv_npu_try_dma_set_bypass()

2019-10-30 Thread Reza Arbab
of pnv_npu_try_dma_set_bypass() is to then propagate the same bypass configuration to all the NPU devices associated with that GPU. -- Reza Arbab

[PATCH 03/11] powerpc/powernv/npu: Change pnv_npu_try_dma_set_bypass() argument

2019-10-30 Thread Reza Arbab
To enable simpler calling code, change this function to find the value of bypass instead of taking it as an argument. Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/npu-dma.c | 12 +--- arch/powerpc/platforms/powernv/pci.h | 2 +- 2 files changed, 10 insertions(+), 4

[PATCH 00/11] powerpv/powernv: Restore pnv_npu_try_dma_set_bypass()

2019-10-30 Thread Reza Arbab
pnv_pci_ioda_iommu_bypass_supported(). It seems wrong for a boolean *_supported() function to have side effects. They reintroduce a pci controller based dma_set_mask() hook. If that's undesirable, these last three patches can be dropped. Reza Arbab (11): Revert "powerpc/powernv: Remove unused pnv_npu_try_dma_set_b

[PATCH 09/11] Revert "powerpc/pci: remove the dma_set_mask pci_controller ops methods"

2019-10-30 Thread Reza Arbab
Bring back the pci controller based hook in dma_set_mask(), as it will have a user again. This reverts commit 662acad4067a ("powerpc/pci: remove the dma_set_mask pci_controller ops methods"). The callback signature has been adjusted with void return to fit its caller. Signed-off-by:

[PATCH 02/11] powerpc/powernv: Add pnv_ioda_pe_iommu_bypass_supported()

2019-10-30 Thread Reza Arbab
This little calculation will be needed in other places. Move it to a convenience function. Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/pci-ioda.c | 8 +++- arch/powerpc/platforms/powernv/pci.h | 8 2 files changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 10/11] powerpc/powernv: Add pnv_phb3_iommu_bypass_supported()

2019-10-30 Thread Reza Arbab
Move this code to its own function for reuse. As a side benefit, rearrange the comments and spread things out for readability. Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/pci-ioda.c | 37 +-- 1 file changed, 25 insertions(+), 12 deletions(-) diff

[PATCH 07/11] powerpc/powernv/npu: Simplify pnv_npu_try_dma_set_bypass() loop

2019-10-30 Thread Reza Arbab
Write this loop more compactly to improve readability. Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/npu-dma.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c index

[PATCH 01/11] Revert "powerpc/powernv: Remove unused pnv_npu_try_dma_set_bypass() function"

2019-10-30 Thread Reza Arbab
Revert commit b4d37a7b6934 ("powerpc/powernv: Remove unused pnv_npu_try_dma_set_bypass() function") so that this function can be reintegrated. Fixes: 2d6ad41b2c21 ("powerpc/powernv: use the generic iommu bypass code") Signed-off-by: Reza Arbab Cc: Christoph Hellwig --- ar

[PATCH 08/11] powerpc/powernv: Replace open coded pnv_ioda_get_pe()s

2019-10-30 Thread Reza Arbab
Collapse several open coded instances of pnv_ioda_get_pe(). Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/npu-dma.c | 22 +- arch/powerpc/platforms/powernv/pci-ioda.c | 10 +++--- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/arch

[PATCH 11/11] powerpc/powernv: Add pnv_pci_ioda_dma_set_mask()

2019-10-30 Thread Reza Arbab
Change pnv_pci_ioda_iommu_bypass_supported() to have no side effects, by separating the part of the function that determines if bypass is supported from the part that actually attempts to configure it. Move the latter to a controller-specific dma_set_mask() callback. Signed-off-by: Reza Arbab

[PATCH 05/11] powerpc/powernv: Return failure for some uses of dma_set_mask()

2019-10-30 Thread Reza Arbab
ly falling back to 32 bits. Fixes: 2d6ad41b2c21 ("powerpc/powernv: use the generic iommu bypass code") Signed-off-by: Reza Arbab Cc: Christoph Hellwig --- arch/powerpc/kernel/dma-iommu.c | 19 +++ arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++--

[PATCH 04/11] powerpc/powernv/npu: Wire up pnv_npu_try_dma_set_bypass()

2019-10-30 Thread Reza Arbab
code") Signed-off-by: Reza Arbab Cc: Christoph Hellwig --- arch/powerpc/platforms/powernv/pci-ioda.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 8849218187d7..70

[PATCH 06/11] powerpc/powernv: Remove intermediate variable

2019-10-30 Thread Reza Arbab
Trim the pointless temporary variable. Signed-off-by: Reza Arbab --- arch/powerpc/platforms/powernv/pci-ioda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index b78b5e81f941

Re: [PATCH v3 2/2] powerpc/mm/radix: Free PUD table when freeing pagetable

2019-07-30 Thread Reza Arbab
fe3633c5a4 ("x86/mm/hotplug: Fix BUG_ON() after hot-remove by not freeing PUD") Does their reasoning apply to powerpc as well? -- Reza Arbab

Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules

2019-07-08 Thread Reza Arbab
so it might be enough to have a notifier in the irq work processing. We can pick up this thread later, but if I remember correctly the sticking point we ran into was that we never got that far. Instead of returning from the MCE, we went down the fatal codepath. -- Reza Arbab

Re: [v3 7/7] powerpc/64s: save r13 in MCE handler (simulator workaroud)

2019-07-08 Thread Reza Arbab
On Sat, Jul 06, 2019 at 07:56:39PM +1000, Nicholas Piggin wrote: Santosh Sivaraj's on July 6, 2019 7:26 am: From: Reza Arbab Testing my memcpy_mcsafe() work in progress with an injected UE, I get an error like this immediately after the function returns: BUG: Unable to handle kernel data

Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules

2019-07-04 Thread Reza Arbab
for the others. -- Reza Arbab

Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules

2019-07-03 Thread Reza Arbab
potential users of the notifier from external modules (so their callbacks would require virtual mode). -- Reza Arbab

Re: [v2 03/12] powerpc/mce: Add MCE notification chain

2019-07-02 Thread Reza Arbab
On Tue, Jul 02, 2019 at 10:49:23AM +0530, Santosh Sivaraj wrote: +static BLOCKING_NOTIFIER_HEAD(mce_notifier_list); Mahesh suggested using an atomic notifier chain instead of blocking, since we are in an interrupt. -- Reza Arbab

Re: [PATCH 11/13] powerpc/64s: Save r13 in machine_check_common_early

2019-06-22 Thread Reza Arbab
n't see how memcpy_mcsafe() would be causing it. I tried changing it to save/restore r13 where it already does r14-r22, but that didn't make a difference. Any ideas? -- Reza Arbab

Re: [PATCH 05/13] powerpc/mce: Allow notifier callback to handle MCE

2019-06-22 Thread Reza Arbab
if ((rc & NOTIFY_STOP_MASK) && (regs->msr & MSR_RI)) { evt->disposition = MCE_DISPOSITION_RECOVERED; -- Reza Arbab

Re: [PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-29 Thread Reza Arbab
is a little confusing to define _PAGE_CACHE_CTL this way: #define _PAGE_CACHE_CTL (_PAGE_NON_IDEMPOTENT | _PAGE_TOLERANT) I like Alexey's idea, maybe just use a literal? #define _PAGE_CACHE_CTL 0x30 -- Reza Arbab

[PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-28 Thread Reza Arbab
vent any issues if these particulars ever change, add _PAGE_SAO to the mask. Suggested-by: Charles Johns Signed-off-by: Reza Arbab --- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/

Re: [PATCH] Correct PowerPC VDSO call frame info

2018-09-13 Thread Reza Arbab
d-by: Reza Arbab -- Reza Arbab

Re: [PATCH v2 3/3] powerpc/mce: Handle memcpy_mcsafe

2018-08-13 Thread Reza Arbab
ueue is full, just return for now. */ if (index >= MAX_MC_EVT) { -- 2.13.6 -- Reza Arbab

[PATCH] powerpc/powernv: Add support for NPU2 relaxed-ordering mode

2018-08-07 Thread Reza Arbab
Popple [ar...@linux.ibm.com: Rebase, add commit log] Signed-off-by: Reza Arbab --- arch/powerpc/include/asm/opal-api.h| 4 ++- arch/powerpc/include/asm/opal.h| 3 ++ arch/powerpc/include/asm/powernv.h | 12 arch/powerpc/platforms/powernv/npu-dma.c

[PATCH] powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage

2018-08-02 Thread Reza Arbab
it to the punch. There may be a long-term way to fix this at a larger scale, but for now resolve the immediate problem by gating our call to test_and_set_bit_lock() with one to test_bit(), which is obviously implemented without using a store. Signed-off-by: Reza Arbab --- arch/powerpc/platforms

Re: [PATCH 1/2] powerpc/mm: Flush cache on memory hot(un)plug

2018-04-09 Thread Reza Arbab
On Fri, Apr 06, 2018 at 03:24:23PM +1000, Balbir Singh wrote: This patch adds support for flushing potentially dirty cache lines when memory is hot-plugged/hot-un-plugged. Acked-by: Reza Arbab <ar...@linux.ibm.com> -- Reza Arbab

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-07 Thread Reza Arbab
oid *)addr, PAGE_INUSE, next - addr); page_addr = page_address(pte_page(*pte)); if (!memchr_inv(page_addr, PAGE_INUSE, PAGE_SIZE)) { ... pte_clear(_mm, addr, pte); ... } ---%<--- -- Reza Arbab

Re: [FIX PATCH v0] powerpc: Fix memory unplug failure on radix guest

2017-08-11 Thread Reza Arbab
On Fri, Aug 11, 2017 at 02:07:51PM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: On Thu, Aug 10, 2017 at 02:53:48PM +0530, Bharata B Rao wrote: diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f830562..24ecf53 100644 --- a/arch/p

Re: [FIX PATCH v0] powerpc: Fix memory unplug failure on radix guest

2017-08-10 Thread Reza Arbab
On Thu, Aug 10, 2017 at 11:50:19AM -0500, Reza Arbab wrote: On Thu, Aug 10, 2017 at 02:53:48PM +0530, Bharata B Rao wrote: diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f830562..24ecf53 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c

Re: [FIX PATCH v0] powerpc: Fix memory unplug failure on radix guest

2017-08-10 Thread Reza Arbab
cal_mapping(reg->base, + reg->base + reg->size)); + } + } /* Find out how many PID bits are supported */ if (cpu_has_feature(CPU_FTR_HVMODE)) { -- 2.7.4 -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-06-01 Thread Reza Arbab
continue; + + node_set(nid, node_possible_map); + } + for_each_online_node(nid) { unsigned long start_pfn, end_pfn; -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-26 Thread Reza Arbab
On Fri, May 26, 2017 at 01:46:58PM +1000, Michael Ellerman wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: On Thu, May 25, 2017 at 04:19:53PM +1000, Michael Ellerman wrote: The commit message for 3af229f2071f says: In practice, we never see a system with 256 NUMA nodes, and i

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-25 Thread Reza Arbab
...@gmail.com -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-24 Thread Reza Arbab
On Tue, May 23, 2017 at 05:44:23PM -0500, Michael Bringmann wrote: On 05/23/2017 04:49 PM, Reza Arbab wrote: On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote: On 05/23/2017 10:52 AM, Reza Arbab wrote: On Tue, May 23, 2017 at 10:15:44AM -0500, Michael Bringmann wrote: +static

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-23 Thread Reza Arbab
On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote: On 05/23/2017 10:52 AM, Reza Arbab wrote: On Tue, May 23, 2017 at 10:15:44AM -0500, Michael Bringmann wrote: +static void setup_nodes(void) +{ +int i, l = 32 /* MAX_NUMNODES */; + +for (i = 0; i < l

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-23 Thread Reza Arbab
.kernel.org/r/1479253501-26261-1-git-send-email-bsinghar...@gmail.com (see patch 3/3) -- Reza Arbab

Re: ioctl structs differ from x86_64?

2017-03-15 Thread Reza Arbab
On Wed, Mar 15, 2017 at 01:11:19PM -0500, Reza Arbab wrote: https://groups.google.com/forum/#!topic/golang-nuts/K5NoG8slez0 Oops. https://groups.google.com/d/msg/golang-nuts/K5NoG8slez0/mixUse17iaMJ -- Reza Arbab

Re: ioctl structs differ from x86_64?

2017-03-15 Thread Reza Arbab
termios struct. It's the issue described here: https://groups.google.com/forum/#!topic/golang-nuts/K5NoG8slez0 Things work if you replace syscall.TCGETS with 0x402c7413 and syscall.TCSETS with 0x802c7414, the correct values on ppc64le. -- Reza Arbab

Re: [PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-30 Thread Reza Arbab
are you ending up with -Werror=maybe-uninitialized? On powerpc/next, with pseries_le_defconfig, I get -Wno-maybe-uninitialized. -- Reza Arbab

[PATCH] powerpc/mm: use the correct pointer when setting a 2M pte

2017-01-25 Thread Reza Arbab
When setting a 2M pte, radix__map_kernel_page() is using the address ptep = (pte_t *)pudp; Fix this conversion to use pmdp instead. Use pmdp_ptep() to do this instead of casting the pointer. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix

Re: [PATCH v5 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-17 Thread Reza Arbab
On Tue, Jan 17, 2017 at 12:55:13PM +0530, Balbir Singh wrote: On Mon, Jan 16, 2017 at 01:07:46PM -0600, Reza Arbab wrote: Use remove_pagetable() and friends for radix vmemmap removal. We do not require the special-case handling of vmemmap done in the x86 versions of these functions

Re: [PATCH v5 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-17 Thread Reza Arbab
-0600, Reza Arbab wrote: #ifdef CONFIG_MEMORY_HOTPLUG +static void free_pte_table(pte_t *pte_start, pmd_t *pmd) +{ + pte_t *pte; + int i; + + for (i = 0; i < PTRS_PER_PTE; i++) { + pte = pte_start + i; + if (!pte_none(*

Re: [PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-17 Thread Reza Arbab
Thanks for your review! On Tue, Jan 17, 2017 at 12:16:35PM +0530, Balbir Singh wrote: On Mon, Jan 16, 2017 at 01:07:43PM -0600, Reza Arbab wrote: --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c @@ -107,54 +107,66 @@ int radix__map_kernel_page(unsigned long ea

Re: Normal service will resume shortly ...

2017-01-16 Thread Reza Arbab
/1483475991-16999-1-git-send-email-ar...@linux.vnet.ibm.com (aka http://patchwork.ozlabs.org/patch/710629/) -- Reza Arbab

[PATCH v5 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-16 Thread Reza Arbab
-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c| 133 + 3 files changed, 135 insertions(+), 1 deletion(-) diff

[PATCH v5 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-16 Thread Reza Arbab
WARNs, but otherwise the code to remove physical mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powe

[PATCH v5 2/4] powerpc/mm: add radix__create_section_mapping()

2017-01-16 Thread Reza Arbab
Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/p

[PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-16 Thread Reza Arbab
ends of the range. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 88 +++-- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 6

[PATCH v5 0/4] powerpc/mm: enable memory hotplug on radix

2017-01-16 Thread Reza Arbab
* https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: refactor radix physical page mapping powerpc/mm: add radix__create_section_mapping() powerpc/mm: add radix__remove_section_mapping() powerpc/mm: unstub radix__vmemmap_remove_mapping

Re: [PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-04 Thread Reza Arbab
On Wed, Jan 04, 2017 at 10:37:58AM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: +static void remove_pagetable(unsigned long start, unsigned long end) +{ + unsigned long addr, next; + pud_t *pud_base; + pgd_t *pgd; + + spi

Re: [PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-04 Thread Reza Arbab
here a way to dump the range and the size with which we mapped that range ? Sure. It's a little more difficult than before, because the mapping size is now reselected in each iteration of the loop, but a similar print can be done. -- Reza Arbab

[PATCH v4 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-03 Thread Reza Arbab
WARNs, but otherwise the code to remove physical mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powe

[PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-03 Thread Reza Arbab
ends of the range. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 69 ++--- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 6

[PATCH v4 0/4] powerpc/mm: enable memory hotplug on radix

2017-01-03 Thread Reza Arbab
what I needed by luck anyway. v1: * https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: refactor radix physical page mapping powerpc/mm: add radix__create_section_mapping() powerpc/mm: add radix__remove_section_mapping() powerpc/mm:

[PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-03 Thread Reza Arbab
must be offline to be removed, thus not in use. So there shouldn't be the sort of concurrent page walking activity here that might prompt us to use RCU. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/pgtable-book

[PATCH v4 2/4] powerpc/mm: add radix__create_section_mapping()

2017-01-03 Thread Reza Arbab
Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/p

[PATCH] powerpc/mm: fix memory hotplug BUG() on radix

2017-01-03 Thread Reza Arbab
() into hash__ and radix__ variants. Leave the radix versions stubbed for now. Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- It was suggested that this fix be separ

Re: [PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-20 Thread Reza Arbab
gtable() and reuse? Yes, that's my plan for v4. -- Reza Arbab

Re: [PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 03:18:07PM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: +static void remove_pte_table(pte_t *pte_start, unsigned long addr, +unsigned long end) +{ + unsigned long next; + pte_t *pte; + +

Re: [PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 02:34:13PM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: Add the linear page mapping function for radix, used by memory hotplug. This is similar to vmemmap_populate(). Ok with this patch your first patch becomes useful. Can you

Re: [PATCH v3 2/5] powerpc/mm: refactor {create,remove}_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 02:30:28PM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: Change {create,remove}_section_mapping() to be wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__&quo

Re: [PATCH v3 0/5] powerpc/mm: enable memory hotplug on radix

2016-12-19 Thread Reza Arbab
On Sat, Dec 17, 2016 at 01:38:40AM +1100, Balbir Singh wrote: Do we care about alt maps yet? Good question. I'll try to see if/how altmaps might need special consideration here. -- Reza Arbab

[PATCH v3 0/5] powerpc/mm: enable memory hotplug on radix

2016-12-15 Thread Reza Arbab
esh and Michael pointed out, they are tied to CONFIG_SPARSEMEM_VMEMMAP and only did what I needed by luck anyway. v1: * https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (5): powerpc/mm: set the radix linear page mapping size powerpc/mm: refactor {cre

[PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-15 Thread Reza Arbab
Add the linear page mapping function for radix, used by memory hotplug. This is similar to vmemmap_populate(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powe

[PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-15 Thread Reza Arbab
Tear down and free the four-level page tables of the linear mapping during memory hotremove. We borrow the basic structure of remove_pagetable() and friends from the identically-named x86 functions. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/boo

[PATCH v3 1/5] powerpc/mm: set the radix linear page mapping size

2016-12-15 Thread Reza Arbab
This was defaulting to 4K, regardless of PAGE_SIZE. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 623a0dc..54bd70e

[PATCH v3 5/5] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2016-12-15 Thread Reza Arbab
WARNs, but otherwise the code to remove linear mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/p

[PATCH v3 2/5] powerpc/mm: refactor {create, remove}_section_mapping()

2016-12-15 Thread Reza Arbab
Change {create,remove}_section_mapping() to be wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__" variants. No functional change. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include

[PATCH] powerpc/mm: allow memory hotplug into an offline node

2016-11-16 Thread Reza Arbab
e addition will actually cause the node to be initialized and onlined; add_memory_resource() calls hotadd_new_pgdat() (if necessary) and node_set_online(). Cc: Balbir Singh <bsinghar...@gmail.com> Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com> Cc: John Allen <jal...@linux.vnet.ibm.com> S

Re: [RESEND] [PATCH v1 3/3] powerpc: fix node_possible_map limitations

2016-11-16 Thread Reza Arbab
On Wed, Nov 16, 2016 at 10:45:01AM +1100, Balbir Singh wrote: Reverts: commit 3af229f2071f ("powerpc/numa: Reset node_possible_map to only node_online_map") Nice! With this limitation going away, I have a small patch to enable onlining new nodes via memory hotplug. Incoming. -- Reza Arbab

Re: [PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-15 Thread Reza Arbab
they are added. There is no gap between the addition and the marking, as there is on x86, during which an allocation might accidentally occur in a movable node. -- Reza Arbab

[PATCH v7 4/5] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
, configs supporting early fdt may then also do this marking and use movable nodes. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Tested-by: Balbir Singh <bsinghar...@gmail.com> --- drivers/of/fdt.c | 19 +++ include/linux/of_fdt.h | 1 + mm/Kconfig

[PATCH v7 1/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-14 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-of

[PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-14 Thread Reza Arbab
setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 -

[PATCH v7 3/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-11-14 Thread Reza Arbab
by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Sin

[PATCH v7 0/5] enable movable nodes on non-x86 configs

2016-11-14 Thread Reza Arbab
bm,hotplug-aperture" compatible id. * Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.i

[PATCH v7 5/5] dt: add documentation of "hotpluggable" memory property

2016-11-14 Thread Reza Arbab
Summarize the "hotpluggable" property of dt memory nodes. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/devicetree/booting-without-of.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
documentation. Hopefully I've explained it well enough there. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-10 Thread Reza Arbab
On Thu, Nov 10, 2016 at 11:56:02AM +1100, Balbir Singh wrote: Have you tested this across all combinations of skiboot/kexec/SLOF boots? I've tested it under qemu/grub, simics/skiboot, and via kexec. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-09 Thread Reza Arbab
On Wed, Nov 09, 2016 at 12:12:55PM -0600, Rob Herring wrote: On Mon, Nov 7, 2016 at 5:44 PM, Reza Arbab <ar...@linux.vnet.ibm.com> wrote: + hotpluggable = of_get_flat_dt_prop(node, "linux,hotpluggable", NULL); Memory being hotpluggable doesn't seem like a linux property

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-08 Thread Reza Arbab
} Ah, I need to adjust for !CONFIG_HAVE_MEMBLOCK. Will correct in v7. -- Reza Arbab

[PATCH v6 1/4] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-07 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-of

[PATCH v6 2/4] mm: remove x86-only restriction of movable_node

2016-11-07 Thread Reza Arbab
setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 -

  1   2   >