[PATCH 1/1 v2] powerpc: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
Once an address range is associated with an allocated pkey, it cannot be reverted back to key-0. There is no valid reason for the above behavior. On the contrary applications need the ability to do so. The patch relaxes the restriction. Tested on powerpc. cc: Dave Hansen cc: Michael Ellermen

[PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
Once an address range is associated with an allocated pkey, it cannot be reverted back to key-0. There is no valid reason for the above behavior. On the contrary applications need the ability to do so. The patch relaxes the restriction. Tested on x86_64. cc: Dave Hansen cc: Michael Ellermen c

PASEMI: PCI_SCAN_ALL_PCIE_DEVS

2018-03-14 Thread Christian Zigotzky
Hi All, Please find attached the current pci.c patch. We use this patch on our P.A. Semi boards because we don't need to add 'pci=pcie_scan_all' to the kernel boot arguments. Please add this patch to the official kernel source code. Thanks, Christian arch/powerpc/platforms/pasemi/pci.c | 2 +

[PATCH v2] powerpc/numa: Correct kernel message severity

2018-03-14 Thread Vipin K Parashar
printk() in unmap_cpu_from_node() uses KERN_ERR message severity, for a WARNING message. Change it to pr_warn(). Signed-off-by: Vipin K Parashar --- arch/powerpc/mm/numa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index

Re: [PATCH] powerpc/numa: Correct kernel message severity

2018-03-14 Thread Vipin K Parashar
On Tuesday 13 March 2018 03:58 PM, Christophe LEROY wrote: Le 13/03/2018 à 11:11, Vipin K Parashar a écrit : printk in unmap_cpu_from_node() uses KERN_ERR message severity for a WARNING message. Correct message severity to KERN_WARNING. Signed-off-by: Vipin K Parashar ---   arch/powerpc/mm/

Re: [PATCH v2] powerpc/numa: Correct kernel message severity

2018-03-14 Thread Christophe LEROY
Le 14/03/2018 à 08:52, Vipin K Parashar a écrit : printk() in unmap_cpu_from_node() uses KERN_ERR message severity, for a WARNING message. Change it to pr_warn(). Signed-off-by: Vipin K Parashar Reviewed-by: Christophe Leroy --- arch/powerpc/mm/numa.c | 3 +-- 1 file changed, 1 insert

Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0

2018-03-14 Thread Florian Weimer
On 03/09/2018 09:00 PM, Ram Pai wrote: On Fri, Mar 09, 2018 at 12:04:49PM +0100, Florian Weimer wrote: On 03/09/2018 09:12 AM, Ram Pai wrote: Once an address range is associated with an allocated pkey, it cannot be reverted back to key-0. There is no valid reason for the above behavior. mprot

Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0

2018-03-14 Thread Florian Weimer
On 03/14/2018 09:00 AM, Florian Weimer wrote: On 03/09/2018 09:00 PM, Ram Pai wrote: On Fri, Mar 09, 2018 at 12:04:49PM +0100, Florian Weimer wrote: On 03/09/2018 09:12 AM, Ram Pai wrote: Once an address range is associated with an allocated pkey, it cannot be reverted back to key-0. There is

Re: [PATCH] powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features

2018-03-14 Thread Li Yi (Adam)
> Date: Wed, 14 Mar 2018 10:14:11 +1100 > From: Michael Ellerman > To: linuxppc-...@ozlabs.org > Cc: suka...@linux.vnet.ibm.com, npig...@gmail.com > Subject: [PATCH] powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT > CPU features > Message-ID: <20180313231411.9537-1-...@ellerman.id.au>

[linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant

2018-03-14 Thread Abdul Haleem
Greetings, Today's next kernel fails to build with gcc 4.8.5 on powerpc machine. ./include/linux/jiffies.h: In function ‘jiffies_delta_to_clock_t’: ./include/linux/kernel.h:855:2: error: first argument to ‘__builtin_choose_expr’ not a constant __builtin_choose_expr(__builtin_constant_p(x) &&

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant

2018-03-14 Thread Stephen Rothwell
ro ‘__max’ > #define max(x, y) __max(typeof(x), typeof(y), x, y) > > Machine Type: Power8 Baremetal > gcc: 4.8.5 > > > Builds fine when below patch is reverted > c7c133f3 kernel.h: skip single-eval logic on literals in min()/max() Those patches have been removed from toda

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-03-14 Thread Peter Zijlstra
On Tue, Mar 13, 2018 at 06:59:47PM +0100, Laurent Dufour wrote: > This change is inspired by the Peter's proposal patch [1] which was > protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in > that particular case, and it is introducing major performance degradation > due to exce

Re: powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features

2018-03-14 Thread Michael Ellerman
On Tue, 2018-03-13 at 23:14:11 UTC, Michael Ellerman wrote: > When running virtualised the powerpc kernel is able to run the system > in "compat mode" - which means the kernel and hardware are pretending > to userspace that the CPU is an older version than it actually is. > > AT_BASE_PLATFORM is a

Re: selftest/powerpc: Add test for sigreturn in transaction

2018-03-14 Thread Michael Ellerman
On Mon, 2016-08-22 at 16:53:02 UTC, Laurent Dufour wrote: > Ensure that kernel is throwing away the suspended transaction when > sigreturn() is called otherwise it if fails to restore the signal > frame's TM SPRS. > > Signed-off-by: Laurent Dufour > Reviewed-by: Cyril Bur Applied to powerpc nex

Re: [1/1] vas: vas_window_init_dbgdir: fix order of cleanup.

2018-03-14 Thread Michael Ellerman
On Wed, 2017-12-20 at 01:10:29 UTC, Sukadev Bhattiprolu wrote: > Fix the order of cleanup to ensure we free the name buffer in case > of an error creating 'hvwc' or 'info' files. > > Signed-off-by: Sukadev Bhattiprolu Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1373cc31074

Re: [1/5] powerpc/vas: Remove a stray line in Makefile

2018-03-14 Thread Michael Ellerman
On Wed, 2018-01-17 at 02:50:39 UTC, Sukadev Bhattiprolu wrote: > Remove a bogus line from arch/powerpc/platforms/powernv/Makefile that > was added by commit ece4e51 ("powerpc/vas: Export HVWC to debugfs"). > > Signed-off-by: Sukadev Bhattiprolu Applied to powerpc next, thanks. https://git.kerne

Re: [v2] macintosh: Add module license to ans-lcd

2018-03-14 Thread Michael Ellerman
On Tue, 2018-01-30 at 14:23:51 UTC, Larry Finger wrote: > In kernel 4.15, the modprobe step on my PowerBook G4 started complaining that > there was no module license for ans-lcd. > > Signed-off-by: Larry Finger Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/47d703e1d55f068c73

Re: powerpc/epapr: Move register keyword at the beginning of declaration

2018-03-14 Thread Michael Ellerman
On Wed, 2018-01-31 at 07:54:43 UTC, Mathieu Malaterre wrote: > Fix warning for all register unsigned long (0,3-12) that appear during W=1 > compilation: > > ./arch/powerpc/include/asm/epapr_hcalls.h:479:2: warning: ‘register’ is > not at beginning of declaration [-Wold-style-declaration] >

Re: cxl: Enable NORST bit in PSL_DEBUG register for PSL9

2018-03-14 Thread Michael Ellerman
On Fri, 2018-02-09 at 04:09:16 UTC, Vaibhav Jain wrote: > We enable the NORST bit by default for debug afu images to prevent > reset of AFU trace-data on a PCI link drop. For production AFU images > this bit is always ignored and PSL gets reconfigured anyways thereby > resetting the trace data. So

Re: [v2] powerpc/via-pmu: Fix section mismatch warning

2018-03-14 Thread Michael Ellerman
On Wed, 2018-02-14 at 21:15:18 UTC, Mathieu Malaterre wrote: > Make the struct via_pmu_driver const to avoid following warning: > > WARNING: vmlinux.o(.data+0x4739c): Section mismatch in reference from the > variable via_pmu_driver to the function .init.text:pmu_init() > The variable via_pmu_driv

Re: [v2] cxl: Remove function write_timebase_ctrl_psl9() for PSL9

2018-03-14 Thread Michael Ellerman
On Thu, 2018-02-15 at 06:19:36 UTC, Vaibhav Jain wrote: > For PSL9 the contents of PSL_TB_CTLSTAT register have changed in PSL9 > and all of the register is now readonly. Hence we don't need an sl_ops > implementation for 'write_timebase_ctrl' for to populate this register > for PSL9. > > Hence th

Re: [v2] cxl: Check if PSL data-cache is available before issue flush request

2018-03-14 Thread Michael Ellerman
On Thu, 2018-02-15 at 15:49:24 UTC, Vaibhav Jain wrote: > PSL9D doesn't have a data-cache that needs to be flushed before > resetting the card. However when cxl tries to flush data-cache on such > a card, it times-out as PSL_Control register never indicates flush > operation complete due to missing

Re: [02/21] powerpc: Move the inline keyword at the beginning of function declaration

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:17 UTC, Mathieu Malaterre wrote: > The inline keyword was not at the beginning of the function declaration. > Fix the following warning (treated as error in W=1) > > CC kernel/sys.o > arch/powerpc/lib/sstep.c:283:1: error: ‘inline’ is not at beginning of > d

Re: [04/21] powerpc: Mark both tmp variables as unused

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:19 UTC, Mathieu Malaterre wrote: > Since the value of `tmp` is never intended to be read, declare both `tmp` > variables as unused. Fix warning (treated as error in W=1): > > CC arch/powerpc/kernel/signal_32.o > arch/powerpc/kernel/signal_32.c: In function ‘sys

Re: [07/21] powerpc: Make functions flipper_pic_init & ug_udbg_putc static

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:22 UTC, Mathieu Malaterre wrote: > Change signature of two functions, adding static keyword to prevent the > following two warnings (treated as errors on W=1): > > CC kernel/sys.o > arch/powerpc/platforms/embedded6xx/flipper-pic.c:135:28: error: no previous > pr

Re: [10/21] powerpc: Add missing prototype for slb_miss_bad_addr

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:25 UTC, Mathieu Malaterre wrote: > In commit f0f558b131db ("powerpc/mm: Preserve CFAR value on SLB miss caused > by access to bogus address"), the function slb_miss_bad_addr was added > without a prototype. This commit adds it. > > Fix a warning (treated as error in W=1

Re: [11/21] powerpc: Add missing prototype for hdec_interrupt

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:26 UTC, Mathieu Malaterre wrote: > In commit dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts > their own handler") an empty body function was added, but no prototype was > declared. Fix warning (treated as error in W=1): > > CC arch/powerpc/kernel/

Re: [12/21] powerpc: Add missing prototype for time_init

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:27 UTC, Mathieu Malaterre wrote: > The function time_init did not have a prototype defined in the time.h > header. Fix the following warning (treated as error in W=1): > > CC arch/powerpc/kernel/time.o > arch/powerpc/kernel/time.c:1068:13: error: no previous prot

Re: [14/21] powerpc: Add missing prototype for arch_irq_work_raise

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:29 UTC, Mathieu Malaterre wrote: > In commit 4f8b50bbbe63 ("irq_work, ppc: Fix up arch hooks") a new function > arch_irq_work_raise was added without a prototype in header irq_work.h. > > Fix the following warning (treated as error in W=1): > > CC arch/powerpc/k

Re: [13/21] powerpc: Add missing prototype for arch_dup_task_struct

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:28 UTC, Mathieu Malaterre wrote: > In commit 55ccf3fe3f9a ("fork: move the real prepare_to_copy() users to > arch_dup_task_struct()") a new arch_dup_task_struct was added without a > prototype declared in thread_info.h header. Fix the following warning > (treated as erro

Re: [16/21] powerpc: Add missing prototype for init_IRQ

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:31 UTC, Mathieu Malaterre wrote: > A function init_IRQ was added without a prototype declared in header irq.h. > Fix the following warning (treated as error in W=1): > > CC arch/powerpc/kernel/irq.o > arch/powerpc/kernel/irq.c:662:13: error: no previous prototype

Re: [18/21] powerpc: Add missing prototypes for sys_sigreturn & sys_rt_sigreturn

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:33 UTC, Mathieu Malaterre wrote: > Two functions did not have a prototype defined in signal.h header. Fix the > following two warnings (treated as errors in W=1): > > CC arch/powerpc/kernel/signal_32.o > arch/powerpc/kernel/signal_32.c:1135:6: error: no previous

Re: [17/21] powerpc: Add missing prototype for sys_debug_setcontext

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:32 UTC, Mathieu Malaterre wrote: > In commit 81e7009ea46c ("powerpc: merge ppc signal.c and ppc64 signal32.c") > the function sys_debug_setcontext was added without a prototype. > > Fix compilation warning (treated as error in W=1): > > CC arch/powerpc/kernel/si

Re: [19/21] powerpc: Add missing prototypes for hw_breakpoint_handler & arch_unregister_hw_breakpoint

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:34 UTC, Mathieu Malaterre wrote: > In commit 5aae8a537080 ("powerpc, hw_breakpoints: Implement hw_breakpoints > for 64-bit server processors") function hw_breakpoint_handler and > arch_unregister_hw_breakpoint were added without function prototypes in > hw_breakpoint.h h

Re: [20/21] powerpc: Add missing prototypes for ppc_select & ppc_fadvise64_64

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:35 UTC, Mathieu Malaterre wrote: > Add missing prototypes for ppc_select & ppc_fadvise64_64 to header > asm-prototypes.h. Fix the following warnings (treated as errors in W=1) > > CC arch/powerpc/kernel/syscalls.o > arch/powerpc/kernel/syscalls.c:87:1: error: no

Re: [08/21] powerpc: Make function __giveup_fpu static

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:23 UTC, Mathieu Malaterre wrote: > When CONFIG_PPC_FPU is defined the prototype exposed in asm/switch_to.h is: > > extern void giveup_fpu(struct task_struct *); > > Change the function prototype of __giveup_fpu to static. Fix warning > (treated as error in W=1): > >

Re: [21/21] powerpc: Add missing prototypes in setup_32.c

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:36 UTC, Mathieu Malaterre wrote: > This commit add the prototypes for the following function: > > - early_init > - machine_init > - ppc_setup_l2cr > - ppc_setup_l3cr > - ppc_init > > the other missing ones were already added in setup.h previously. Fix the > following w

Re: [v10,1/2] powerpc/powernv: Enable tunneled operations

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 09:56:11 UTC, Philippe Bergheaud wrote: > P9 supports PCI tunneled operations (atomics and as_notify). This > patch adds support for tunneled operations on powernv, with a new > API, to be called by device drivers: > > pnv_pci_enable_tunnel() >Enable tunnel operations, te

Re: [v3] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 05:18:45 UTC, Alistair Popple wrote: > When sending TLB invalidates to the NPU we need to send extra flushes due > to a hardware issue. The original implementation would lock the all the > ATSD MMIO registers sequentially before unlocking and relocking each of > them sequentia

Re: [v2,01/21] powerpc: Remove warning on array size when empty

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 19:49:18 UTC, Mathieu Malaterre wrote: > When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the > array feature_properties is defined as an empty array, which in turn > triggers the following warning (treated as error on W=1): > > CC arch/powerpc/k

Re: powerpc/8xx: fix cpm_cascade() dual end of interrupt

2018-03-14 Thread Michael Ellerman
On Tue, 2018-02-27 at 11:25:55 UTC, Christophe Leroy wrote: > cpm_cascade() doesn't have to call eoi() as it is already called > by handle_fasteoi_irq() > > And cpm_get_irq() will always return an unsigned int so the test > is useless > > Signed-off-by: Christophe Leroy Applied to powerpc next,

Re: [v2,15/21] powerpc: Make function MMU_setup static

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 20:32:55 UTC, Mathieu Malaterre wrote: > Since function `MMU_setup` is not meant to be exported, change the > signature to `static`. Fix warning (treated as error with W=1): > > CC kernel/sys.o > arch/powerpc/mm/init_32.c:102:13: error: no previous prototype for > ‘

Re: powerpc/mm: Drop the function native_register_proc_table()

2018-03-14 Thread Michael Ellerman
On Sat, 2018-03-03 at 09:24:02 UTC, Anshuman Khandual wrote: > This is left over from the segment table implementation and not getting > called from any where now. Hence just drop it. > > Suggested-by: Aneesh Kumar K.V > Signed-off-by: Anshuman Khandual Applied to powerpc next, thanks. https:/

Re: [v2, 05/21] powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 20:34:35 UTC, Mathieu Malaterre wrote: > Rewrite comparison since all values compared are of type `unsigned long`. > > Instead of using unsigned properties and rewriting the original code as: > (originally suggested by Segher Boessenkool ) > > #define pfn_valid(pfn) \ >

Re: [v2, 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 19:50:51 UTC, Mathieu Malaterre wrote: > Rewrite function-like macro into regular static inline function to avoid a > warning during macro expansion. > Fix warning (treated as error in W=1): > > CC arch/powerpc/kernel/signal_32.o > In file included from ./include/linux

Re: xmon: Clear all breakpoints when xmon is disabled via debugfs

2018-03-14 Thread Michael Ellerman
On Sun, 2018-03-04 at 17:31:32 UTC, Vaibhav Jain wrote: > Presently when xmon is disabled by debugfs any existing > instruction/data-access breakpoints set are not disabled. This may > lead to kernel oops when those breakpoints are hit as the necessary > debugger hooks aren't installed. > > Hence

Re: selftests/powerpc: Skip tm-unavailable if TM is not enabled

2018-03-14 Thread Michael Ellerman
On Mon, 2018-03-05 at 20:48:55 UTC, Gustavo Romero wrote: > Some processor revisions do not support transactional memory, and > additionally kernel support can be disabled. In either case the > tm-unavailable test should be skipped, otherwise it will fail with > a SIGILL. > > That commit also sets

Re: [v2, 01/10] powerpc/mm/slice: Simplify and optimise slice context initialisation

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 01:37:09 UTC, Nicholas Piggin wrote: > The slice state of an mm gets zeroed then initialised upon exec. > This is the only caller of slice_set_user_psize now, so that can be > removed and instead implement a faster and simplified approach that > requires no locking or checking

Re: [v2] xmon: Setup xmon debugger hooks when first break-point is set

2018-03-14 Thread Michael Ellerman
On Sun, 2018-03-04 at 17:30:25 UTC, Vaibhav Jain wrote: > Presently sysrq key for xmon('x') is registered during kernel init > irrespective of the value of kernel param 'xmon'. Thus xmon is enabled > even if 'xmon=off' is passed on the kernel command line. However this > doesn't enable the kernel d

Re: powerpc/powernv/mce: Don't silently restart the machine

2018-03-14 Thread Michael Ellerman
On Thu, 2018-03-08 at 00:36:06 UTC, Balbir Singh wrote: > On MCE the current code will restart the machine with > ppc_md.restart(). This case was extremely unlikely since > prior to that a skiboot call is made and that resulted in > a checkstop for analysis. > > With newer skiboots, on P9 we don't

Re: [1/4] powerpc/pseries: Move smp_query_cpu_stopped() etc. out of plpar_wrappers.h

2018-03-14 Thread Michael Ellerman
On Thu, 2018-03-08 at 02:54:39 UTC, Michael Ellerman wrote: > smp_query_cpu_stopped() and related #defines are currently in > plpar_wrappers.h. The function actually does an RTAS call, not an > hcall, and basically has nothing to do with plpar_wrappers.h > > Move it into pseries.h, where it can ea

Re: PCI/hotplug: ppc: correct a php_slot usage after free

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 08:46:04 UTC, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > In pnv_php_unregister_one(), pnv_php_put_slot() might kfree > php_slot structure. But there is pci_hp_deregister() after > that with php_slot reference. > > This patch moves pnv_php_put_slot() to the end of

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant

2018-03-14 Thread Abdul Haleem
metal > > gcc: 4.8.5 > > > > > > Builds fine when below patch is reverted > > c7c133f3 kernel.h: skip single-eval logic on literals in min()/max() > > Those patches have been removed from today's linux-next (next-20180314). -- Regard's Abdul Haleem IBM Linux Technology Centre

Re: [PATCH 04/21] powerpc: Mark both tmp variables as unused

2018-03-14 Thread Christophe LEROY
Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : Since the value of `tmp` is never intended to be read, declare both `tmp` variables as unused. Fix warning (treated as error in W=1): What about using fault_in_pages_readable() instead ? Christophe CC arch/powerpc/kernel/signal_32

[RESEND PATCH] Input: joystick/analog - Use get_cycles() on PPC

2018-03-14 Thread Michael Ellerman
The analog joystick driver spits a warning at us: drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. PPC has get_cycles() so use that. Signed-off-by: Michael Ellerman --- drivers/input/joystick/analog.c | 2 +- 1 file changed, 1 insert

Re: [PATCH v9 00/24] Speculative page faults

2018-03-14 Thread Michal Hocko
On Tue 13-03-18 18:59:30, Laurent Dufour wrote: > Changes since v8: > - Don't check PMD when locking the pte when THP is disabled >Thanks to Daniel Jordan for reporting this. > - Rebase on 4.16 Is this really worth reposting the whole pile? I mean this is at v9, each doing little changes. It

Re: [PATCH v9 00/24] Speculative page faults

2018-03-14 Thread Laurent Dufour
On 14/03/2018 14:11, Michal Hocko wrote: > On Tue 13-03-18 18:59:30, Laurent Dufour wrote: >> Changes since v8: >> - Don't check PMD when locking the pte when THP is disabled >>Thanks to Daniel Jordan for reporting this. >> - Rebase on 4.16 > > Is this really worth reposting the whole pile?

[PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread Madalin Bucur
Hi, This patch set is addressing several issues in the DPAA Ethernet driver suite: - module unload crash caused by wrong reference to device being left in the cleanup code after the DSA related changes - scheduling wile atomic bug in QMan code revealed during dpaa_eth module unload - a c

[PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe()

2018-03-14 Thread Madalin Bucur
The wait_for_completion() call in qman_delete_cgr_safe() was triggering a scheduling while atomic bug, replacing the kthread with a smp_call_function_single() call to fix it. Signed-off-by: Madalin Bucur Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 28 +--

[PATCH 2/5] dpaa_eth: fix error in dpaa_remove()

2018-03-14 Thread Madalin Bucur
The recent changes that make the driver probing compatible with DSA were not propagated in the dpa_remove() function, breaking the module unload function. Using the proper device to address the issue. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file

[PATCH 3/5] dpaa_eth: remove duplicate initialization

2018-03-14 Thread Madalin Bucur
From: Camelia Groza The fd_format has already been initialized at this point. Signed-off-by: Camelia Groza --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa

[PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed

2018-03-14 Thread Madalin Bucur
From: Camelia Groza Signed-off-by: Camelia Groza --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 3e83d79..76b3c9e 1006

[PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter

2018-03-14 Thread Madalin Bucur
From: Camelia Groza The tx_errors counter is incremented by the dpaa_xmit caller. Signed-off-by: Camelia Groza Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/d

Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 01:00 AM, Florian Weimer wrote: > ... but not the key which is used for PROT_EXEC emulation, which is still > reserved The PROT_EXEC key is dynamically allocated. There is no "the key".

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 12:46 AM, Ram Pai wrote: > Once an address range is associated with an allocated pkey, it cannot be > reverted back to key-0. There is no valid reason for the above behavior. On > the contrary applications need the ability to do so. I'm trying to remember why we cared in the first p

[PATCH 45/47] tty: hvc: remove tile driver

2018-03-14 Thread Arnd Bergmann
The Tile architecture is obsolete and getting removed from the kernel, this removes the corresponding console driver as well. Signed-off-by: Arnd Bergmann --- drivers/tty/hvc/Makefile | 1 - drivers/tty/hvc/hvc_tile.c | 196 - 2 files changed, 197

[PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers

2018-03-14 Thread Arnd Bergmann
The blackfin architecture is getting removed, so these drivers are not needed any more. Signed-off-by: Arnd Bergmann --- drivers/tty/Kconfig | 13 -- drivers/tty/Makefile| 1 - drivers/tty/bfin_jtag_comm.c| 353 drivers/tty/

Re: [PATCH v5 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2018-03-14 Thread Arnd Bergmann
On Wed, Mar 14, 2018 at 5:03 AM, Deepa Dinamani wrote: > The series is a preparation series for individual architectures > to use 64 bit time_t syscalls in compat and 32 bit emulation modes. > > This is a follow up to the series Arnd Bergmann posted: > https://sourceware.org/ml/libc-alpha/2015-05/

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-03-14 Thread Laurent Dufour
On 14/03/2018 09:48, Peter Zijlstra wrote: > On Tue, Mar 13, 2018 at 06:59:47PM +0100, Laurent Dufour wrote: >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and it is introdu

Re: [PATCH 45/47] tty: hvc: remove tile driver

2018-03-14 Thread Greg Kroah-Hartman
On Wed, Mar 14, 2018 at 04:35:58PM +0100, Arnd Bergmann wrote: > The Tile architecture is obsolete and getting removed from the kernel, > this removes the corresponding console driver as well. > > Signed-off-by: Arnd Bergmann > --- > drivers/tty/hvc/Makefile | 1 - > drivers/tty/hvc/hvc_tile

Re: [PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers

2018-03-14 Thread Greg Kroah-Hartman
On Wed, Mar 14, 2018 at 04:35:57PM +0100, Arnd Bergmann wrote: > The blackfin architecture is getting removed, so these drivers > are not needed any more. > > Signed-off-by: Arnd Bergmann > --- > drivers/tty/Kconfig | 13 -- > drivers/tty/Makefile| 1 - > drivers/tty/b

[PATCH 0/2] Silent PCI realignment messages during boot

2018-03-14 Thread Desnes A. Nunes do Rosario
This patchset introduces PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute in pci_dev_flags which informs the pci subsystem to suppress all realignment messages. Powerpc has aligned all of its PCI resources to its PAGE_SIZE, and this feature can be easily used on any other arch through the __weak pcibios_

[PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes A. Nunes do Rosario
Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver. Signed-off-by: Desnes A. Nunes do Rosario --- drivers/pci/pci.c | 3 ++- drivers/pci/setup-res.c | 3 ++- include/linux/pci.h | 2 ++ 3 files changed

[PATCH 2/2, powerpc/powernv] powerpc/powernv: Tweak PCI_DEV_FLAGS_QUIET_PCI_REALIGN on/off during boot

2018-03-14 Thread Desnes A. Nunes do Rosario
Turn on PCI_DEV_FLAGS_QUIET_PCI_REALIGN flag on powernv's pci driver to silent PCI realignment messages through a early stage hook, and turn it off right before the pci device is enabled with a final stage hook. Fixes: 38274637699 ("powerpc/powernv: Override pcibios_default_alignment() to force P

Re: [RESEND PATCH] Input: joystick/analog - Use get_cycles() on PPC

2018-03-14 Thread Dmitry Torokhov
On Wed, Mar 14, 2018 at 10:17:52PM +1100, Michael Ellerman wrote: > The analog joystick driver spits a warning at us: > > drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer > not defined for this architecture. > > PPC has get_cycles() so use that. > > Signed-off-by: Micha

[RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Frederic Barrat
If a driver has called free_irq() but an irq is waiting in a queue, an error is logged when a cpu processes it: irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 ->handle_irq(): 23f2e352, handle_bad_irq+0x0/0x2e0 ->irq_data.chip(): 7fd7bf50,

[PATCH] powerpc/xive: Fix wrong xmon output caused by typo

2018-03-14 Thread Frederic Barrat
Signed-off-by: Frederic Barrat --- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 40c06110821c..3459015092fa 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arc

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
On Wed, Mar 14, 2018 at 07:19:23AM -0700, Dave Hansen wrote: > On 03/14/2018 12:46 AM, Ram Pai wrote: > > Once an address range is associated with an allocated pkey, it cannot be > > reverted back to key-0. There is no valid reason for the above behavior. On > > the contrary applications need the

Re: [PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread David Miller
From: Madalin Bucur Date: Wed, 14 Mar 2018 08:37:27 -0500 > This patch set is addressing several issues in the DPAA Ethernet > driver suite: > > - module unload crash caused by wrong reference to device being left >in the cleanup code after the DSA related changes > - scheduling wile atomi

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 6:34 PM, Desnes A. Nunes do Rosario wrote: > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to > silent PCI realignment messages if the flag is turned on by a driver. It doesn't explain "Why?" Why the driver needs that? Another approach is to increase lev

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 7:41 PM, Andy Shevchenko wrote: > I would rather name it _NO_PCI_REALIGN_MSG I meant _NO_REALIGN_MSG of course (PCI is already at the beginning). -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 10:14 AM, Ram Pai wrote: > I look at key-0 as 'the key'. It has special status. > (a) It always exist. Do you mean "is always allocated"? > (b) it cannot be freed. This is the one I'm questioning. > (c) it is assigned by default. I agree on this totally. :) > (d) its permission

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Bjorn Helgaas
On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to > silent PCI realignment messages if the flag is turned on by a driver. > > Signed-off-by: Desnes A. Nunes do Rosario > --- > drivers/pci/pci.c |

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
Hello Andy, On 03/14/2018 02:41 PM, Andy Shevchenko wrote: On Wed, Mar 14, 2018 at 6:34 PM, Desnes A. Nunes do Rosario wrote: Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver. It doesn't explain "Why?" Why

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
Hello Bjorn, On 03/14/2018 03:06 PM, Bjorn Helgaas wrote: On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver. Signed-off-by: Desnes A

Re: [PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread Joakim Tjernlund
On Wed, 2018-03-14 at 08:37 -0500, Madalin Bucur wrote: > Hi, > > This patch set is addressing several issues in the DPAA Ethernet > driver suite: > > - module unload crash caused by wrong reference to device being left >in the cleanup code after the DSA related changes > - scheduling wile

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Bjorn Helgaas
On Wed, Mar 14, 2018 at 03:22:44PM -0300, Desnes Augusto Nunes do Rosário wrote: > Hello Bjorn, > > On 03/14/2018 03:06 PM, Bjorn Helgaas wrote: > > On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: > > > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
On Wed, Mar 14, 2018 at 10:51:26AM -0700, Dave Hansen wrote: > On 03/14/2018 10:14 AM, Ram Pai wrote: > > I look at key-0 as 'the key'. It has special status. > > (a) It always exist. > > Do you mean "is always allocated"? always allocated and cannot be freed. Hence always exists. If we let it

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 11:54 AM, Ram Pai wrote: >>> (e) it bypasses key-permission checks when assigned. >> I don't think this is necessary. I think the only rule we *need* is: >> >> pkey-0 is allocated implicitly at execve() time. You do not >> need to call pkey_alloc() to allocate it. > And ca

Re: [GIT PULL] Please pull JSON files for POWR9 PMU events

2018-03-14 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 13, 2018 at 03:46:47PM -0700, Sukadev Bhattiprolu escreveu: > > Hi Arnaldo, > > Please pull an update to the JSON files for POWER9 PMU events. Can you please be a bit more verbose in the next pull requets, something like describing what is the nature of this specific pull request, sa

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-14 Thread Arnd Bergmann
On Wed, Mar 14, 2018 at 4:50 AM, Deepa Dinamani wrote: > The file arch/arm64/kernel/process.c needs asm/compat.h also to be > included directly since this is included conditionally from > include/compat.h. This does seem to be typical of arm64 as I was not > completely able to get rid of asm/compa

[PATCH v3] x86: treat pkey-0 special

2018-03-14 Thread Ram Pai
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range. This

[PATCH v3] powerpc: treat pkey-0 special

2018-03-14 Thread Ram Pai
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range. This

[PATCH, pci, v2] pci: Delete PCI disabling informational messages

2018-03-14 Thread Desnes A. Nunes do Rosario
The disabling informational messages on the PCI subsystem should be deleted since they do not represent any real value for the system logs. These messages are either not presented, or presented for all PCI devices (e.g., powerpc now realigns all PCI devices to its page size). Thus, they are floodi

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
On 03/14/2018 03:55 PM, Bjorn Helgaas wrote: As far as I'm concerned, we can just remove these messages completely. I don't think there's any real value there. After I found out that this was happening to all PCI devices on powerpc due to the __weak pcibios_default_alignment() interface (neces

Re: [PATCH] powerpc: Use common error handling code in setup_new_fdt()

2018-03-14 Thread Thiago Jung Bauermann
SF Markus Elfring writes: > From: Markus Elfring > Date: Sun, 11 Mar 2018 09:03:42 +0100 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring

Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Cédric Le Goater
On 03/14/2018 05:58 PM, Frederic Barrat wrote: > If a driver has called free_irq() but an irq is waiting in a queue, an > error is logged when a cpu processes it: > > irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 > ->handle_irq(): 23f2e352, > handle_bad_

[PATCH v3 0/5] Setup RFI flush after PowerVM LPM migration

2018-03-14 Thread Mauricio Faria de Oliveira
This patchset allows for setup_rfi_flush() to be called again after PowerVM LPM (live partition mobility) aka LPAR migration, in order to possibly switch to a different flush method. The patches are mostly from Michael Ellerman, I have rebased to powerpc/linux.git merge branch as of commit d8443ef

[PATCH v3 1/5] rfi-flush: Move the logic to avoid a redo into the debugfs code

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman rfi_flush_enable() includes a check to see if we're already enabled (or disabled), and in that case does nothing. But that means calling setup_rfi_flush() a 2nd time doesn't actually work, which is a bit confusing. Move that check into the debugfs code, where it really be

[PATCH v3 2/5] rfi-flush: Make it possible to call setup_rfi_flush() again

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman For PowerVM migration we want to be able to call setup_rfi_flush() again after we've migrated the partition. To support that we need to check that we're not trying to allocate the fallback flush area after memblock has gone away (i.e., boot-time only). Signed-off-by: Mich

  1   2   >