Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference

2017-09-16 Thread Naveen N. Rao
On 2017/09/16 12:53PM, Sergey Senozhatsky wrote: > We are moving towards separate kernel and module function descriptor > dereference callbacks. This patch enables it for powerpc64. > > For pointers that belong to the kernel > - Added __start_opd and __end_opd pointers, to track the kernel >

Re: [PATCH 3/5] powerpc/kprobes: Fix warnings from __this_cpu_read() on preempt kernels

2017-09-16 Thread Naveen N. Rao
On 2017/09/14 03:10AM, Masami Hiramatsu wrote: > On Thu, 14 Sep 2017 12:17:20 +0530 > "Naveen N. Rao" wrote: > > > On 2017/09/13 05:36PM, Masami Hiramatsu wrote: > > > On Thu, 14 Sep 2017 02:50:34 +0530 > > > "Naveen N. Rao"

Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference

2017-09-16 Thread Sergey Senozhatsky
On (09/16/17 15:13), Naveen N. Rao wrote: [..] > Would it be simpler to just use kernel_text_address() and dereference > everything else? See commit 83e840c770f2c5 ("powerpc64/elfv1: Only > dereference function descriptor for non-text symbols") for a related > patch. I had this idea, see

[Part1 PATCH v4 09/17] resource: Provide resource struct in resource walk callback

2017-09-16 Thread Brijesh Singh
From: Tom Lendacky In prep for a new function that will need additional resource information during the resource walk, update the resource walk callback to pass the resource structure. Since the current callback start and end arguments are pulled from the resource

[PATCH] Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD"

2017-09-16 Thread Jan H . Schönherr
This reverts commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563. The commit broke compilation on !CONFIG_HAVE_KVM_IRQ_ROUTING. Also, there may be cases with CONFIG_HAVE_KVM_IRQ_ROUTING, where larger gsi values make sense. As the commit was meant as an early indicator to user space that something is

[mainline][bisected 36ae3c0] Build fail at virt/kvm/eventfd.c:568

2017-09-16 Thread Abdul Haleem
Hi, Today's mainline kernel failed to build on powerpc with below error arch/powerpc/kvm/../../../virt/kvm/eventfd.c: In function ‘kvm_irqfd’: arch/powerpc/kvm/../../../virt/kvm/eventfd.c:568:19: error: ‘KVM_MAX_IRQ_ROUTES’ undeclared (first use in this function) if (args->gsi >=

Re: [mainline][bisected 36ae3c0] Build fail at virt/kvm/eventfd.c:568

2017-09-16 Thread Jan H. Schönherr
On 09/16/2017 06:24 PM, Abdul Haleem wrote: > Hi, > > Today's mainline kernel failed to build on powerpc with below error > > arch/powerpc/kvm/../../../virt/kvm/eventfd.c: In function ‘kvm_irqfd’: > arch/powerpc/kvm/../../../virt/kvm/eventfd.c:568:19: error: > ‘KVM_MAX_IRQ_ROUTES’ undeclared

[PATCH 08/10] powerpc/vas: poll for return of window credits

2017-09-16 Thread Sukadev Bhattiprolu
Normally, the NX driver waits for the CRBs to be processed before closing the window. But it is better to ensure that the credits are returned before the window gets reassigned later. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c

[PATCH 07/10] powerpc/vas: Save configured window credits

2017-09-16 Thread Sukadev Bhattiprolu
Save the configured max window credits for a window in the vas_window structure. We will need this when polling for return of window credits. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 6 --

[PATCH 09/10] powerpc/vas: Create cpu to vas id mapping

2017-09-16 Thread Sukadev Bhattiprolu
Create a cpu to vasid mapping so callers can specify -1 instead of trying to find a VAS id. Changelog[v2] [Michael Ellerman] Use per-cpu variables to simplify code. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas.c | 14

[PATCH 06/10] powerpc/vas: Reduce polling interval for busy state

2017-09-16 Thread Sukadev Bhattiprolu
A VAS window is normally in "busy" state for only a short duration. Reduce the time we wait for the window to go to "not-busy" state to speed-up vas_win_close() a bit. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 10 ++

[PATCH 02/10] powerpc/vas: Validate window credits

2017-09-16 Thread Sukadev Bhattiprolu
NX-842, the only user of VAS, sets the window credits to default values but VAS should check the credits against the possible max values. The VAS_WCREDS_MIN is not needed and can be dropped. Signed-off-by: Sukadev Bhattiprolu ---

[PATCH 00/10] powerpc/vas: cleanup and optimizations

2017-09-16 Thread Sukadev Bhattiprolu
Sanitize cpu/chip id to VAS id mapping, improve vas_win_close() performance and add a check for return of credits. Also, fix up couple of initializations/error checks and cleanup some comments and debug code. Sukadev Bhattiprolu (10): powerpc/vas: init missing fields from [rt]xattr

[PATCH 03/10] powerpc/vas: Cleanup some debug code

2017-09-16 Thread Sukadev Bhattiprolu
Cleanuup vas.h and the debug code around ifdef vas_debug. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h| 56 +++-- 2 files changed, 18 insertions(+),

[PATCH 05/10] powerpc/vas: Use helper to unpin/close window

2017-09-16 Thread Sukadev Bhattiprolu
Use a helper to have the hardware unpin and mark a window closed. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git

[PATCH 04/10] powerpc/vas: Drop poll_window_cast_out().

2017-09-16 Thread Sukadev Bhattiprolu
Polling for window cast out is listed in the spec, but turns out that it is not strictly necessary and slows down window close. Making it a stub for now. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 34

[PATCH 01/10] powerpc/vas: init missing fields from [rt]xattr

2017-09-16 Thread Sukadev Bhattiprolu
Initialize a few missing window context fields from the window attributes specified by the caller. These fields are currently set to their default values by the caller (NX-842), but would be good to apply them anyway. Signed-off-by: Sukadev Bhattiprolu ---

[PATCH 10/10] powerpc/vas, nx-842: Define and use chip_to_vas_id()

2017-09-16 Thread Sukadev Bhattiprolu
Define a helper, chip_to_vas_id() to map a given chip id to corresponding vas id. Normally, callers of vas_rx_win_open() and vas_tx_win_open() would need the VAS window to be on the same chip where the calling thread is executing. These callers can pass in -1 for the VAS id. This interface will

Re: [PATCH v3] Make initramfs honor CONFIG_DEVTMPFS_MOUNT

2017-09-16 Thread Rob Landley
On 09/14/2017 04:17 AM, Christophe LEROY wrote: > Le 14/09/2017 à 01:51, Rob Landley a écrit : >> From: Rob Landley >> >> Make initramfs honor CONFIG_DEVTMPFS_MOUNT, and move >> /dev/console open after devtmpfs mount. >> >> Add workaround for Debian bug that was copied by