[PATCH v5 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-31 Thread Alexandre Ghiti
[CC linux-mm for inclusion in -mm tree] In order to reduce copy/paste of functions across architectures and then make riscv hugetlb port (and future ports) simpler and smaller, this patchset intends to factorize the numerous hugetlb primitives that are defined across all the architectures.

[PATCH v5 04/11] hugetlb: Introduce generic version of huge_ptep_get_and_clear

2018-07-31 Thread Alexandre Ghiti
arm, ia64, sh, x86 architectures use the same version of huge_ptep_get_and_clear, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb-3level.h | 6 -- arch/arm64/include/asm/hugetlb.h

[PATCH v5 08/11] hugetlb: Introduce generic version of prepare_hugepage_range

2018-07-31 Thread Alexandre Ghiti
arm, arm64, powerpc, sparc, x86 architectures use the same version of prepare_hugepage_range, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb.h | 11 ---

Re: [RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively

2018-07-31 Thread Anshuman Khandual
On 07/30/2018 03:00 PM, Christoph Hellwig wrote: >>> + >>> + if (xen_domain()) >>> + goto skip_override; >>> + >>> + if (virtio_has_iommu_quirk(dev)) >>> + set_dma_ops(dev->dev.parent, _direct_dma_ops); >>> + >>> + skip_override: >>> + >> >> I prefer normal if scoping as

Re: [PATCH] powerpc/mobility: Fix node detach/rename problem

2018-07-31 Thread Michael Ellerman
Tyrel Datwyler writes: > On 07/29/2018 06:11 AM, Michael Bringmann wrote: >> During LPAR migration, the content of the device tree/sysfs may >> be updated including deletion and replacement of nodes in the >> tree. When nodes are added to the internal node structures, they >> are appended in

[PATCH v5 03/11] hugetlb: Introduce generic version of set_huge_pte_at

2018-07-31 Thread Alexandre Ghiti
arm, ia64, mips, powerpc, sh, x86 architectures use the same version of set_huge_pte_at, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb-3level.h | 6 --

[PATCH v5 06/11] hugetlb: Introduce generic version of huge_pte_none

2018-07-31 Thread Alexandre Ghiti
arm, arm64, ia64, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_none, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb.h | 5 -

[PATCH v5 09/11] hugetlb: Introduce generic version of huge_ptep_set_wrprotect

2018-07-31 Thread Alexandre Ghiti
arm, ia64, mips, sh, x86 architectures use the same version of huge_ptep_set_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Note: powerpc uses twice for book3s/32 and nohash/32 the same version as the above architectures, but the modification was not straightforward and

[PATCH v5 02/11] hugetlb: Introduce generic version of hugetlb_free_pgd_range

2018-07-31 Thread Alexandre Ghiti
arm, arm64, mips, parisc, sh, x86 architectures use the same version of hugetlb_free_pgd_range, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb.h | 9 -

[PATCH v5 01/11] hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h

2018-07-31 Thread Alexandre Ghiti
asm-generic/hugetlb.h proposes generic implementations of hugetlb related functions: use __HAVE_ARCH_HUGE* defines in order to make arch specific implementations of hugetlb functions consistent with pgtable.h scheme. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz ---

[PATCH v5 07/11] hugetlb: Introduce generic version of huge_pte_wrprotect

2018-07-31 Thread Alexandre Ghiti
arm, arm64, ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb.h | 5 -

phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Michael Ellerman
Hi Rob/Frank, I think we might have a problem with the phandle_cache not interacting well with of_detach_node(): Michael Bringmann writes: > See below. > > On 07/30/2018 01:31 AM, Michael Ellerman wrote: >> Michael Bringmann writes: >> >>> During LPAR migration, the content of the device

Re: [PATCH] powerpc/pasemi: Seach for PCI root bus by compatible property

2018-07-31 Thread Michael Ellerman
Darren Stevens writes: > Pasemi arch code finds the root of the PCI-e bus by searching the > device-tree for a node called 'pxp'. But the root bus has a > compatible property of 'pasemi,rootbus' so search for that instead. > > Signed-off-by: Darren Stevens > --- > > This works on the Amigaone

[RESEND PATCH 4/6] mips: factor out RapidIO Kconfig entry

2018-07-31 Thread Alexei Colin
The menu entry is now defined in the rapidio subtree. Platforms with a PCI bus will be offered the RapidIO menu since they may be want support for a RapidIO PCI device. Platforms without a PCI bus that might include a RapidIO IP block will need to "select HAS_RAPIDIO" in the

[PATCH v3 1/9] powerpc/traps: Print unhandled signals in a separate function

2018-07-31 Thread Murilo Opsfelder Araujo
Isolate the logic of printing unhandled signals out of _exception_pkey(). No functional change, only code rearrangement. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git

[PATCH] powerpc/fadump: handle crash memory ranges array overflow

2018-07-31 Thread Hari Bathini
Crash memory ranges is an array of memory ranges of the crashing kernel to be exported as a dump via /proc/vmcore file. The size of the array is set based on INIT_MEMBLOCK_REGIONS, which works alright in most cases where memblock memory regions count is less than INIT_MEMBLOCK_REGIONS value. But

Re: [PATCH 0/6] rapidio: move Kconfig menu definition to subsystem

2018-07-31 Thread Alex Bounine
Acked-by: Alexandre Bounine On 2018-07-30 06:50 PM, Alexei Colin wrote: The top-level Kconfig entry for RapidIO subsystem is currently duplicated in several architecture-specific Kconfig files. This set of patches does two things: 1. Move the Kconfig menu definition into the RapidIO subsystem

[PATCH v3 4/9] powerpc/traps: Print VMA for unhandled signals

2018-07-31 Thread Murilo Opsfelder Araujo
This adds VMA address in the message printed for unhandled signals, similarly to what other architectures, like x86, print. Before this patch, a page fault looked like: pandafault[61470]: unhandled signal 11 at 17d0 nip 161c lr 7fff8d185100 code 2 After this patch, a page fault looks

Re: [PATCH] powerpc/pasemi: Seach for PCI root bus by compatible property

2018-07-31 Thread Michael Ellerman
Michael Ellerman writes: > Darren Stevens writes: > >> Pasemi arch code finds the root of the PCI-e bus by searching the >> device-tree for a node called 'pxp'. But the root bus has a >> compatible property of 'pasemi,rootbus' so search for that instead. >> >> Signed-off-by: Darren Stevens >>

[RESEND PATCH 0/6] rapidio: move Kconfig menu definition to subsystem

2018-07-31 Thread Alexei Colin
Resending the patchset from prior submission: https://lkml.org/lkml/2018/7/30/911 The only change are the Cc tags in all patches now include the mailing lists for all affected architectures, and patch 1/6 (which adds the menu item to RapdidIO subsystem Kconfig) is CCed to all maintainers who are

[PATCH v3 0/9] powerpc: Modernize unhandled signals message

2018-07-31 Thread Murilo Opsfelder Araujo
Hi, everyone. This series was inspired by the need to modernize and display more informative messages about unhandled signals. The "unhandled signal NN" is not very informative. We thought it would be helpful adding a human-readable message describing what the signal number means, printing the

[PATCH v3 3/9] powerpc/traps: Use %lx format in show_signal_msg()

2018-07-31 Thread Murilo Opsfelder Araujo
Use %lx format to print registers. This avoids having two different formats and avoids checking for MSR_64BIT, improving readability of the function. Even though we could have used %px, which is functionally equivalent to %lx as per Documentation/core-api/printk-formats.rst, it is not

[PATCH v3 8/9] powerpc/traps: Show instructions on exceptions

2018-07-31 Thread Murilo Opsfelder Araujo
Call show_instructions() in arch/powerpc/kernel/traps.c to dump instructions at faulty location, useful to debugging. Before this patch, an unhandled signal message looked like: pandafault[10524]: segfault (11) at 17d0 nip 161c lr 7fffbd295100 code 2 in pandafault[1000+1]

Re: [PATCH v5 09/11] hugetlb: Introduce generic version of huge_ptep_set_wrprotect

2018-07-31 Thread Alexandre Ghiti
On 07/31/2018 12:06 PM, Michael Ellerman wrote: Alexandre Ghiti writes: arm, ia64, mips, sh, x86 architectures use the same version of huge_ptep_set_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Note: powerpc uses twice for book3s/32 and nohash/32 the same

Re: [PATCH 08/20] powerpc/dma: remove the unused dma_nommu_ops export

2018-07-31 Thread Christoph Hellwig
It turns out cxl actually uses it. So for now skip this patch, although random code in drivers messing with dma ops will need to be sorted out sooner or later.

Re: [RFC PATCH kernel 0/5] powerpc/P9/vfio: Pass through NVIDIA Tesla V100

2018-07-31 Thread Alex Williamson
On Tue, 31 Jul 2018 14:03:35 +1000 Alexey Kardashevskiy wrote: > On 31/07/2018 02:29, Alex Williamson wrote: > > On Mon, 30 Jul 2018 18:58:49 +1000 > > Alexey Kardashevskiy wrote: > >> After some local discussions, it was pointed out that force disabling > >> nvlinks won't bring us much as for

[RESEND PATCH 2/6] x86: factor out RapidIO Kconfig menu

2018-07-31 Thread Alexei Colin
The menu entry is now defined in the rapidio subtree. Cc: Andrew Morton Cc: Russell King Cc: John Paul Walters Cc: x...@kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-m...@linux-mips.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Alexei

[PATCH v3 2/9] powerpc/traps: Return early in show_signal_msg()

2018-07-31 Thread Murilo Opsfelder Araujo
Modify the logic of show_signal_msg() to return early, if possible. Replace printk_ratelimited() by printk() and a default rate limit burst to limit displaying unhandled signals messages. Mainly reason of this change is to improve readability of the function. The conditions to display the message

[PATCH v3 9/9] powerpc/traps: Add line prefix in show_instructions()

2018-07-31 Thread Murilo Opsfelder Araujo
Remove "Instruction dump:" line by adding a prefix to display current->comm and current->pid, along with the instructions dump. The prefix can serve as a glue that links the instructions dump to its originator, allowing messages to be interleaved in the logs. Before this patch, a page fault

[PATCH v2 2/2] selftests/powerpc: Add more version checks to alignment_handler test

2018-07-31 Thread Michael Ellerman
The alignment_handler is documented to only work on Power8/Power9, but we can make it run on older CPUs by guarding more of the tests with feature checks. Signed-off-by: Michael Ellerman --- .../powerpc/alignment/alignment_handler.c | 67 +++--- 1 file changed, 59

[PATCH] powerpc/selftests: Avoid backgroud process/threads

2018-07-31 Thread Breno Leitao
Current tm-unavailable test runs for a long period (>120 seconds), and if it is interrupted, as pressing CRTL-C (SIGINT), the foreground process (harness) dies but the child process and threads continue to execute (with PPID = 1 now). In this case, you'd think the test is gone, but there are two

[RESEND PATCH 6/6] arm64: enable RapidIO menu in Kconfig

2018-07-31 Thread Alexei Colin
Platforms with a PCI bus will be offered the RapidIO menu since they may be want support for a RapidIO PCI device. Platforms without a PCI bus that might include a RapidIO IP block will need to "select HAS_RAPIDIO" in the platform-/machine-specific "config ARCH_*" Kconfig entry. Tested that

[PATCH v3 7/9] powerpc: Add stacktrace.h header

2018-07-31 Thread Murilo Opsfelder Araujo
Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which contains the implementation. This allows show_instructions() to be called on, for example, show_signal_msg(). Signed-off-by: Murilo Opsfelder Araujo

[PATCH v3 5/9] powerpc/traps: Print signal name for unhandled signals

2018-07-31 Thread Murilo Opsfelder Araujo
This adds a human-readable name in the unhandled signal message. Before this patch, a page fault looked like: pandafault[6303]: unhandled signal 11 at 17d0 nip 161c lr 7fff93c55100 code 2 in pandafault[1000+1] After this patch, a page fault looks like: pandafault[6352]:

Re: [PATCH v3] PCI: Data corruption happening due to race condition

2018-07-31 Thread Michael Ellerman
Bjorn Helgaas writes: > On Thu, Jul 19, 2018 at 02:18:09PM +1000, Benjamin Herrenschmidt wrote: >> On Wed, 2018-07-18 at 18:29 -0500, Bjorn Helgaas wrote: >> > [+cc Paul, Michael, linuxppc-dev] >> > >> >>/... >> >> > > Debugging revealed a race condition between pcie core driver >> > >

Re: [PATCH resend] powerpc/64s: fix page table fragment refcount race vs speculative references

2018-07-31 Thread Michael Ellerman
Nicholas Piggin writes: > On Fri, 27 Jul 2018 08:38:35 -0700 > Matthew Wilcox wrote: >> On Sat, Jul 28, 2018 at 12:29:06AM +1000, Nicholas Piggin wrote: >> > On Fri, 27 Jul 2018 06:41:56 -0700 >> > Matthew Wilcox wrote: >> > > On Fri, Jul 27, 2018 at 09:48:17PM +1000, Nicholas Piggin wrote:

[RESEND PATCH 3/6] powerpc: factor out RapidIO Kconfig menu entry

2018-07-31 Thread Alexei Colin
The menu entry is now defined in the rapidio subtree. Also, re-order the bus menu so tha the platform-specific RapidIO controller appears after the entry for the RapidIO subsystem. Platforms with a PCI bus will be offered the RapidIO menu since they may be want support for a RapidIO PCI device.

Re: [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE

2018-07-31 Thread Michael Ellerman
Christoph Hellwig writes: > kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it > from PPC64 and NOT_COHERENT_CACHE instead. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/Kconfig | 3 --- > arch/powerpc/platforms/Kconfig.cputype | 2 ++ > 2 files

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Bjorn Helgaas
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. > > Signed-off-by: Christoph Hellwig Applied with acks from Thomas and Michael to pci/misc for

RE: [PATCH 3/3] ptp_qoriq: convert to use module parameters for initialization

2018-07-31 Thread Y.b. Lu
Hi Richard, > -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Monday, July 30, 2018 10:31 PM > To: Y.b. Lu > Cc: net...@vger.kernel.org; Madalin-cristian Bucur > ; Rob Herring ; Shawn Guo > ; David S . Miller ; > devicet...@vger.kernel.org;

Re: [v4, 1/2] powernv/cpuidle: Parse dt idle properties into global structure

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 11:40:21 UTC, Akshay Adiga wrote: > Device-tree parsing happens twice, once while deciding idle state to be > used for hotplug and once during cpuidle init. Hence, parsing the device > tree and caching it will reduce code duplication. Parsing code has been > moved to

Re: [v3,01/16] powerpc: remove kdump.h from page.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:24:51 UTC, Christophe Leroy wrote: > page.h doesn't need kdump.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/db0a2b633da4216b767d7aed95ffe3 cheers

Re: [v3,03/16] powerpc/405: move PPC405_ERR77 in asm-405.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:24:55 UTC, Christophe Leroy wrote: > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/36a7eeaff7d06cef253c8df6dfe363 cheers

Re: [v3,05/16] powerpc: clean the inclusion of stringify.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:24:59 UTC, Christophe Leroy wrote: > Only include linux/stringify.h is files using __stringify() > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5c35a02c545a7bbe77f3a1ae337d9e cheers

Re: [v3,06/16] powerpc: clean inclusions of asm/feature-fixups.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:01 UTC, Christophe Leroy wrote: > files not using feature fixup don't need asm/feature-fixups.h > files using feature fixup need asm/feature-fixups.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: [v3,12/16] powerpc/44x: remove page.h from mmu-44x.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:13 UTC, Christophe Leroy wrote: > mmu-44x.h doesn't need asm/page.h if PAGE_SHIFT are replaced by > CONFIG_PPC_XX_PAGES > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7bc396958cafba126078ad92480a42 cheers

Re: powerpc/mm: Don't report PUDs as memory leaks when using kmemleak

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-19 at 14:33:16 UTC, Michael Ellerman wrote: > Paul Menzel reported that kmemleak was producing reports such as: > > unreferenced object 0xc000f8b8 (size 16384): > comm "init", pid 1, jiffies 4294937416 (age 312.240s) > hex dump (first 32 bytes): > 00 00 00

RE: [PATCH 3/3] ptp_qoriq: convert to use module parameters for initialization

2018-07-31 Thread Y.b. Lu
Hi David, > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, July 31, 2018 12:26 AM > To: Y.b. Lu > Cc: net...@vger.kernel.org; Madalin-cristian Bucur > ; richardcoch...@gmail.com; robh...@kernel.org; > shawn...@kernel.org; devicet...@vger.kernel.org;

Re: [v4,01/11] macintosh/via-pmu: Fix section mismatch warning

2018-07-31 Thread Michael Ellerman
On Mon, 2018-07-02 at 08:21:18 UTC, Finn Thain wrote: > The pmu_init() function has the __init qualifier, but the ops struct > that holds a pointer to it does not. This causes a build warning. > The driver works fine because the pointer is only dereferenced early. > > The function is so small

Re: [v3,07/16] powerpc: remove superflous inclusions of asm/fixmap.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:03 UTC, Christophe Leroy wrote: > Files not using fixmap consts or functions don't need asm/fixmap.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e8cb7a55eb8dcf65838d0911dc7ba0 cheers

Re: [v3,10/16] powerpc: fix includes in asm/processor.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:09 UTC, Christophe Leroy wrote: > Remove superflous includes and add missing ones > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/62b8426578c414c918468ab4cc7517 cheers

Re: [v3,09/16] powerpc/book3s: Remove PPC_PIN_SIZE

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:07 UTC, Christophe Leroy wrote: > PPC_PIN_SIZE is specific to the 44x and is defined in mmu.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/6b622669119e20a53a1983cd41115e cheers

Re: [v3, 15/16] powerpc: remove unnecessary inclusion of asm/tlbflush.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:19 UTC, Christophe Leroy wrote: > asm/tlbflush.h is only needed for: > - using functions xxx_flush_tlb_xxx() > - using MMU_NO_CONTEXT > - including asm-generic/pgtable.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: Adds __init annotation at mmu_init_secondary func

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-26 at 12:52:50 UTC, Alexey Spirkov wrote: > mmu_init_secondary function called at initialization sequence > but it misses __init annotation. As result modpost warning is generated. > Some building systems sensitive to such kind of warnings. > > Signed-off-by: Alexey Spirkov

Re: [v8, 1/2] powernv:opal-sensor-groups: Add support to enable sensor groups

2018-07-31 Thread Michael Ellerman
On Tue, 2018-07-24 at 09:13:08 UTC, Shilpasri G Bhat wrote: > Adds support to enable/disable a sensor group at runtime. This > can be used to select the sensor groups that needs to be copied to > main memory by OCC. Sensor groups like power, temperature, current, > voltage, frequency, utilization

Re: [v3, 02/16] powerpc: remove unneeded inclusions of cpu_has_feature.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:24:53 UTC, Christophe Leroy wrote: > Files not using cpu_has_feature() don't need cpu_has_feature.h > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/8c58259bba43084eb5876aeefa574e cheers

Re: [v3, 04/16] powerpc: move ASM_CONST and stringify_in_c() into asm-const.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:24:57 UTC, Christophe Leroy wrote: > This patch moves ASM_CONST() and stringify_in_c() into > dedicated asm-const.h, then cleans all related inclusions. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: [v3,08/16] powerpc: declare set_breakpoint() static

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:05 UTC, Christophe Leroy wrote: > set_breakpoint() is only used in process.c so make it static > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/b5ac51d747122f8858bdcb3fc7a5c7 cheers

Re: [v3, 11/16] powerpc/nohash: fix hash related comments in pgtable.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:11 UTC, Christophe Leroy wrote: > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/0c295d0e9c9f7a592f230bbcf51655 cheers

Re: [v3,16/16] powerpc: split asm/tlbflush.h

2018-07-31 Thread Michael Ellerman
On Thu, 2018-07-05 at 16:25:21 UTC, Christophe Leroy wrote: > Split asm/tlbflush.h into: > asm/nohash/tlbflush.h > asm/book3s/32/tlbflush.h > asm/book3s/64/tlbflush.h (already existing) > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: [v3,1/1] powerpc/pseries: fix EEH recovery of some IOV devices

2018-07-31 Thread Michael Ellerman
On Mon, 2018-07-30 at 01:59:14 UTC, Sam Bobroff wrote: > EEH recovery currently fails on pSeries for some IOV capable PCI > devices, if CONFIG_PCI_IOV is on and the hypervisor doesn't provide > certain device tree properties for the device. (Found on an IOV > capable device using the ipr driver.)

[PATCH v2 1/2] selftests/powerpc: Skip earlier in alignment_handler test

2018-07-31 Thread Michael Ellerman
Currently the alignment_handler test prints "Can't open /dev/fb0" about 80 times per run, which is a little annoying. Refactor it to check earlier if it can open /dev/fb0 and skip if not, this results in each test printing something like: test: test_alignment_handler_vsx_206 tags:

[PATCH] powerpc/64s/radix: Fix missing global invalidations when removing copro

2018-07-31 Thread Frederic Barrat
With the optimizations for TLB invalidation from commit 0cef77c7798a ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask"), the scope of a TLBI (global vs. local) can now be influenced by the value of the 'copros' counter of the memory context. When calling

[RESEND PATCH 1/6] rapidio: define top Kconfig menu in driver subtree

2018-07-31 Thread Alexei Colin
The top-level Kconfig entry for RapidIO subsystem is currently duplicated in several architecture-specific Kconfigs. This commit re-defines it in the driver subtree, and subsequent commits, one per architecture, will remove the duplicated definitions from respective per-architecture Kconfigs. Cc:

[RESEND PATCH 5/6] arm: enable RapidIO menu in Kconfig

2018-07-31 Thread Alexei Colin
Platforms with a PCI bus will be offered the RapidIO menu since they may be want support for a RapidIO PCI device. Platforms without a PCI bus that might include a RapidIO IP block will need to "select HAS_RAPIDIO" in the platform-/machine-specific "config ARCH_*" Kconfig entry. Tested that

Re: [PATCH] powerpc/mobility: Fix node detach/rename problem

2018-07-31 Thread Tyrel Datwyler
On 07/30/2018 11:42 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 07/29/2018 06:11 AM, Michael Bringmann wrote: >>> During LPAR migration, the content of the device tree/sysfs may >>> be updated including deletion and replacement of nodes in the >>> tree. When nodes are added to the

Re: phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Frank Rowand
On 07/31/18 07:17, Rob Herring wrote: > On Tue, Jul 31, 2018 at 12:34 AM Michael Ellerman wrote: >> >> Hi Rob/Frank, >> >> I think we might have a problem with the phandle_cache not interacting >> well with of_detach_node(): > > Probably needs a similar fix as this commit did for overlays: > >

Re: phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Frank Rowand
On 07/31/18 12:18, Frank Rowand wrote: > On 07/31/18 07:17, Rob Herring wrote: >> On Tue, Jul 31, 2018 at 12:34 AM Michael Ellerman >> wrote: >>> >>> Hi Rob/Frank, >>> >>> I think we might have a problem with the phandle_cache not interacting >>> well with of_detach_node(): >> >> Probably needs

[PATCH] powerpc/pasemi: Seach for PCI root bus by compatible property

2018-07-31 Thread Christian Zigotzky
Just for info: I tested it on my Nemo board today and it works. -- Christian On 31 July 2018 at 2:04PM, Michael Ellerman wrote: Michael Ellerman writes: Darren Stevens writes: Pasemi arch code finds the root of the PCI-e bus by searching the device-tree for a node called 'pxp'. But the

Re: [RESEND PATCH 0/6] rapidio: move Kconfig menu definition to subsystem

2018-07-31 Thread Russell King - ARM Linux
For the thread associated with this patch set, a review of a previous patch for ARM posted last Tuesday on this subject asked a series of questions about the PCI-nature of this. The review has not been responded to. If it is inappropriate to offer RapidIO for any architecture that happens to has

Re: phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Michael Bringmann
On 07/31/2018 02:18 PM, Frank Rowand wrote: > On 07/31/18 07:17, Rob Herring wrote: >> On Tue, Jul 31, 2018 at 12:34 AM Michael Ellerman >> wrote: >>> >>> Hi Rob/Frank, >>> >>> I think we might have a problem with the phandle_cache not interacting >>> well with of_detach_node(): >> >> Probably

Re: [RESEND PATCH 0/6] rapidio: move Kconfig menu definition to subsystem

2018-07-31 Thread Alex Bounine
On 2018-07-31 11:59 AM, Russell King - ARM Linux wrote: For the thread associated with this patch set, a review of a previous patch for ARM posted last Tuesday on this subject asked a series of questions about the PCI-nature of this. The review has not been responded to. We are dealing

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-31 Thread Christoph Hellwig
On Mon, Jul 30, 2018 at 04:26:32PM +0300, Michael S. Tsirkin wrote: > Real hardware would reuse parts of the interface but by necessity it > needs to behave slightly differently on some platforms. However for > some platforms (such as x86) a PV virtio driver will by luck work with a > PCI device

Re: phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Michael Bringmann
I applied your suggestion with a couple of modifications, and it looks to have worked for the first 2 migration events. I am not seeing the errors from repeated migrations. The revised patch tested is, diff --git a/drivers/of/base.c b/drivers/of/base.c index 466e3c8..8bf64e5 100644 ---

Re: [RESEND PATCH 1/6] rapidio: define top Kconfig menu in driver subtree

2018-07-31 Thread Russell King - ARM Linux
On Tue, Jul 31, 2018 at 10:29:49AM -0400, Alexei Colin wrote: > The top-level Kconfig entry for RapidIO subsystem is currently > duplicated in several architecture-specific Kconfigs. This > commit re-defines it in the driver subtree, and subsequent > commits, one per architecture, will remove the

[RFC PATCH v3] powerpc/64s: Move idle code to powernv C code

2018-07-31 Thread Nicholas Piggin
Reimplement Book3S idle code to C, in the powernv platform code. Assembly stubs are used to save and restore the stack frame and non-volatile GPRs before going to idle, but these are small and mostly agnostic to microarchitecture implementation details. The optimisation where EC=ESL=0 idle modes

Re: phandle_cache vs of_detach_node (was Re: [PATCH] powerpc/mobility: Fix node detach/rename problem)

2018-07-31 Thread Rob Herring
On Tue, Jul 31, 2018 at 12:34 AM Michael Ellerman wrote: > > Hi Rob/Frank, > > I think we might have a problem with the phandle_cache not interacting > well with of_detach_node(): Probably needs a similar fix as this commit did for overlays: commit b9952b5218added5577e4a3443969bc20884cea9

[PATCH v3 6/9] powerpc: Do not call __kernel_text_address() in show_instructions()

2018-07-31 Thread Murilo Opsfelder Araujo
Modify show_instructions() not to call __kernel_text_address(), allowing userspace instruction dump. probe_kernel_address(), which returns -EFAULT if something goes wrong, is still being called. Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/process.c | 3 +-- 1 file changed, 1

Re: [RESEND PATCH 1/6] rapidio: define top Kconfig menu in driver subtree

2018-07-31 Thread Alexander Sverdlin
Hi! On 31/07/18 16:29, Alexei Colin wrote: > The top-level Kconfig entry for RapidIO subsystem is currently > duplicated in several architecture-specific Kconfigs. This > commit re-defines it in the driver subtree, and subsequent > commits, one per architecture, will remove the duplicated >

Re: [RESEND PATCH 5/6] arm: enable RapidIO menu in Kconfig

2018-07-31 Thread Russell King - ARM Linux
On Tue, Jul 31, 2018 at 10:29:53AM -0400, Alexei Colin wrote: > Platforms with a PCI bus will be offered the RapidIO menu since they may > be want support for a RapidIO PCI device. Platforms without a PCI bus > that might include a RapidIO IP block will need to "select HAS_RAPIDIO" > in the

Re: [RESEND PATCH 0/6] rapidio: move Kconfig menu definition to subsystem

2018-07-31 Thread Alex Bounine
Acked-by: Alexandre Bounine On 2018-07-31 10:29 AM, Alexei Colin wrote: Resending the patchset from prior submission: https://lkml.org/lkml/2018/7/30/911 The only change are the Cc tags in all patches now include the mailing lists for all affected architectures, and patch 1/6 (which adds the

[PATCH] powerpc/selftests: Wait all threads to join

2018-07-31 Thread Breno Leitao
Test tm-tmspr might exit before all threads stop executing, because it just waits for the very last thread to join before proceeding/exiting. This patch makes sure that all threads that were created will join before proceeding/exiting. This patch also guarantees that the amount of threads being

Re: [PATCH 1/4] treewide: convert ISO_8859-1 text comments to utf-8

2018-07-31 Thread Rob Herring
On Tue, Jul 24, 2018 at 01:13:25PM +0200, Arnd Bergmann wrote: > Almost all files in the kernel are either plain text or UTF-8 > encoded. A couple however are ISO_8859-1, usually just a few > characters in a C comments, for historic reasons. > > This converts them all to UTF-8 for consistency. >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-31 Thread Benjamin Herrenschmidt
On Tue, 2018-07-31 at 10:30 -0700, Christoph Hellwig wrote: > > However the question people raise is that DMA API is already full of > > arch-specific tricks the likes of which are outlined in your post linked > > above. How is this one much worse? > > None of these warts is visible to the

ssb: Remove SSB_WARN_ON, SSB_BUG_ON and SSB_DEBUG

2018-07-31 Thread Michael Büsch
Use the standard WARN_ON instead. If a small kernel is desired, WARN_ON can be disabled globally. Also remove SSB_DEBUG. Besides WARN_ON it only adds a tiny debug check. Include this check unconditionally. Signed-off-by: Michael Buesch --- CC-ing Mips and PPC maintainers due to changes in

Re: [PATCH v5 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-31 Thread Luiz Capitulino
On Tue, 31 Jul 2018 06:01:44 + Alexandre Ghiti wrote: > [CC linux-mm for inclusion in -mm tree] > > In order to reduce copy/paste of functions across architectures and then > make riscv hugetlb port (and future ports) simpler and smaller, this > patchset intends to factorize the numerous

Re: [resend] [PATCH 0/3] powerpc/pseries: use H_BLOCK_REMOVE

2018-07-31 Thread Nicholas Piggin
On Fri, 27 Jul 2018 15:51:30 +0200 Laurent Dufour wrote: > [Resending so everyone is getting the cover letter] > > On very large system we could see soft lockup fired when a process is exiting > > watchdog: BUG: soft lockup - CPU#851 stuck for 21s! [forkoff:215523] > Modules linked in:

Re: [PATCH] powerpc/64s: Make rfi_flush_fallback a little more robust

2018-07-31 Thread Nicholas Piggin
On Thu, 26 Jul 2018 22:42:44 +1000 Michael Ellerman wrote: > Because rfi_flush_fallback runs immediately before the return to > userspace it currently runs with the user r1 (stack pointer). This > means if we oops in there we will report a bad kernel stack pointer in > the exception entry path,

Re: [PATCH resend] powerpc/64s: fix page table fragment refcount race vs speculative references

2018-07-31 Thread Nicholas Piggin
On Tue, 31 Jul 2018 21:42:22 +1000 Michael Ellerman wrote: > Nicholas Piggin writes: > > On Fri, 27 Jul 2018 08:38:35 -0700 > > Matthew Wilcox wrote: > >> On Sat, Jul 28, 2018 at 12:29:06AM +1000, Nicholas Piggin wrote: > >> > On Fri, 27 Jul 2018 06:41:56 -0700 > >> > Matthew Wilcox

Re: [PATCH v2 2/2] selftests/powerpc: Add more version checks to alignment_handler test

2018-07-31 Thread Andrew Donnellan
On 31/07/18 22:08, Michael Ellerman wrote: The alignment_handler is documented to only work on Power8/Power9, but we can make it run on older CPUs by guarding more of the tests with feature checks. Signed-off-by: Michael Ellerman Looks good to me. Reviewed-by: Andrew Donnellan ---

Re: [PATCH] powerpc/64s/radix: Fix missing global invalidations when removing copro

2018-07-31 Thread Nicholas Piggin
On Tue, 31 Jul 2018 15:24:52 +0200 Frederic Barrat wrote: > With the optimizations for TLB invalidation from commit 0cef77c7798a > ("powerpc/64s/radix: flush remote CPUs out of single-threaded > mm_cpumask"), the scope of a TLBI (global vs. local) can now be > influenced by the value of the

Re: [PATCH] powerpc/64s: Make unrecoverable SLB miss less confusing

2018-07-31 Thread Nicholas Piggin
On Thu, 26 Jul 2018 23:01:51 +1000 Michael Ellerman wrote: > If we take an SLB miss while MSR[RI]=0 we can't recover and have to > oops. Currently this is reported by faking up a 0x4100 exception, eg: > > Unrecoverable exception 4100 at 0 > Oops: Unrecoverable exception, sig: 6 [#1] > ...

Re: Infinite looping observed in __offline_pages

2018-07-31 Thread Rashmica
On 26/07/18 04:11, John Allen wrote: > Hi All, > > Under heavy stress and constant memory hot add/remove, I have observed > the following loop to occasionally loop infinitely: > > mm/memory_hotplug.c:__offline_pages > > repeat: >    /* start memory hot removal */ >    ret = -EINTR; >    

Re: [PATCH 00/16] Finally remove PSERIES from exception naming

2018-07-31 Thread Nicholas Piggin
On Thu, 26 Jul 2018 23:07:01 +1000 Michael Ellerman wrote: > This finally annoyed me enough to do something about it, I foolishly started > pulling the string and now here I am. > > I think the end result is sufficiently more readable to justify the churn. I > particularly like that we now have

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Joerg Roedel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > > There is nothing arch specific about PCI or dma-debug, so move this > > call to common code just after registering the bus type. > > I assume

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Christoph Hellwig
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > > There is nothing arch specific about PCI or dma-debug, so move this > > call to common code just after registering the bus type. > > I assume

Re: [RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively

2018-07-31 Thread Anshuman Khandual
On 07/30/2018 02:55 PM, Christoph Hellwig wrote: >> +const struct dma_map_ops virtio_direct_dma_ops; > > This belongs into a header if it is non-static. If you only > use it in this file anyway please mark it static and avoid a forward > declaration. Sure, will make it static, move the

[PATCH v5 05/11] hugetlb: Introduce generic version of huge_ptep_clear_flush

2018-07-31 Thread Alexandre Ghiti
arm, x86 architectures use the same version of huge_ptep_clear_flush, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb-3level.h | 6 -- arch/arm64/include/asm/hugetlb.h | 1 +

[PATCH v5 10/11] hugetlb: Introduce generic version of huge_ptep_set_access_flags

2018-07-31 Thread Alexandre Ghiti
arm, ia64, sh, x86 architectures use the same version of huge_ptep_set_access_flags, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb-3level.h | 7 --- arch/arm64/include/asm/hugetlb.h

[PATCH v5 11/11] hugetlb: Introduce generic version of huge_ptep_get

2018-07-31 Thread Alexandre Ghiti
ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_ptep_get, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Reviewed-by: Mike Kravetz --- arch/arm/include/asm/hugetlb-3level.h | 1 +

  1   2   >