Re: [RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-11 Thread Claire Chang
On Fri, Jan 8, 2021 at 2:15 AM Florian Fainelli wrote: > > On 1/7/21 10:00 AM, Konrad Rzeszutek Wilk wrote: > >>> > >>> > >>> - Nothing stops the physical device from bypassing the SWIOTLB buffer. > >>>That is if an errant device screwed up the length or DMA address, the > >>>SWIOTLB

Re: [RFC PATCH v3 0/6] Restricted DMA

2021-01-11 Thread Claire Chang
On Fri, Jan 8, 2021 at 1:59 AM Florian Fainelli wrote: > > On 1/7/21 9:42 AM, Claire Chang wrote: > > >> Can you explain how ATF gets involved and to what extent it does help, > >> besides enforcing a secure region from the ARM CPU's perpsective? Does > >> the PCIe root complex not have an IOMMU

Re: [PATCH v2] powerpc/vdso: fix clock_gettime_fallback for vdso32

2021-01-11 Thread Michael Ellerman
Christophe Leroy writes: > From: Andreas Schwab > > The second argument of __kernel_clock_gettime64 points to a struct > __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall > in the fallback function for the 32-bit vdso. Similarily, > clock_getres_fallback should use the

[PATCH v4 19/21] ibmvfc: purge scsi channels after transport loss/reset

2021-01-11 Thread Tyrel Datwyler
Grab the queue and list lock for each Sub-CRQ and add any uncompleted events to the host purge list. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v4 21/21] ibmvfc: provide modules parameters for MQ settings

2021-01-11 Thread Tyrel Datwyler
Add the various module parameter toggles for adjusting the MQ characteristics at boot/load time as well as a device attribute for changing the client scsi channel request amount. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 75 ++ 1 file

[PATCH v4 20/21] ibmvfc: enable MQ and set reasonable defaults

2021-01-11 Thread Tyrel Datwyler
Turn on MQ by default and set sane values for the upper limit on hw queues for the scsi host, and number of hw scsi channels to request from the partner VIOS. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v4 18/21] ibmvfc: send Cancel MAD down each hw scsi channel

2021-01-11 Thread Tyrel Datwyler
In general the client needs to send Cancel MADs and task management commands down the same channel as the command(s) intended to cancel or abort. The client assigns cancel keys per LUN and thus must send a Cancel down each channel commands were submitted for that LUN. Further, the client then must

[PATCH v4 16/21] ibmvfc: register Sub-CRQ handles with VIOS during channel setup

2021-01-11 Thread Tyrel Datwyler
If the ibmvfc client adapter requests channels it must submit a number of Sub-CRQ handles matching the number of channels being requested. The VIOS in its response will overwrite the actual number of channel resources allocated which may be less than what was requested. The client then must store

[PATCH v4 17/21] ibmvfc: add cancel mad initialization helper

2021-01-11 Thread Tyrel Datwyler
Add a helper routine for initializing a Cancel MAD. This will be useful for a channelized client that needs to send Cancel commands down every channel commands were sent for a particular LUN. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 68

[PATCH v4 11/21] ibmvfc: map/request irq and register Sub-CRQ interrupt handler

2021-01-11 Thread Tyrel Datwyler
Create an irq mapping for the hw_irq number provided from phyp firmware. Request an irq assigned our Sub-CRQ interrupt handler. Unmap these irqs at Sub-CRQ teardown. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 25 + 1 file changed, 25 insertions(+)

[PATCH v4 13/21] ibmvfc: advertise client support for using hardware channels

2021-01-11 Thread Tyrel Datwyler
Previous patches have plumbed the necessary Sub-CRQ interface and channel negotiation MADs to fully channelize via hardware backed queues. Advertise client support via NPIV Login capability IBMVFC_CAN_USE_CHANNELS when the client bits have MQ enabled via vhost->mq_enabled, or when channels were

[PATCH v4 15/21] ibmvfc: send commands down HW Sub-CRQ when channelized

2021-01-11 Thread Tyrel Datwyler
When the client has negotiated the use of channels all vfcFrames are required to go down a Sub-CRQ channel or it is a protocoal violation. If the adapter state is channelized submit vfcFrames to the appropriate Sub-CRQ via the h_send_sub_crq() helper. Signed-off-by: Tyrel Datwyler ---

[PATCH v4 08/21] ibmvfc: add Sub-CRQ IRQ enable/disable routine

2021-01-11 Thread Tyrel Datwyler
Each Sub-CRQ has its own interrupt. A hypercall is required to toggle the IRQ state. Provide the necessary mechanism via a helper function. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 1 file changed, 20 insertions(+) diff --git

[PATCH v4 14/21] ibmvfc: set and track hw queue in ibmvfc_event struct

2021-01-11 Thread Tyrel Datwyler
Extract the hwq id from a SCSI command and store it in the ibmvfc_event structure to identify which Sub-CRQ to send the command down when channels are being utilized. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files

[PATCH v4 09/21] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2021-01-11 Thread Tyrel Datwyler
The logic for iterating over the Sub-CRQ responses is similiar to that of the primary CRQ. Add the necessary handlers for processing those responses. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 86 ++ 1 file changed, 86 insertions(+) diff

[PATCH v4 12/21] ibmvfc: implement channel enquiry and setup commands

2021-01-11 Thread Tyrel Datwyler
New NPIV_ENQUIRY_CHANNEL and NPIV_SETUP_CHANNEL management datagrams (MADs) were defined in a previous patchset. If the client advertises a desire to use channels and the partner VIOS is channel capable then the client must proceed with channel enquiry to determine the maximum number of channels

[PATCH v4 10/21] ibmvfc: define Sub-CRQ interrupt handler routine

2021-01-11 Thread Tyrel Datwyler
Simple handler that calls Sub-CRQ drain routine directly. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f3cd092478ee..51bcafad9490 100644 ---

[PATCH v4 00/21] ibmvfc: initial MQ development

2021-01-11 Thread Tyrel Datwyler
Recent updates in pHyp Firmware and VIOS releases provide new infrastructure towards enabling Subordinate Command Response Queues (Sub-CRQs) such that each Sub-CRQ is a channel backed by an actual hardware queue in the FC stack on the partner VIOS. Sub-CRQs are registered with the firmware via

[PATCH v4 05/21] ibmvfc: define hcall wrapper for registering a Sub-CRQ

2021-01-11 Thread Tyrel Datwyler
Sub-CRQs are registred with firmware via a hypercall. Abstract that interface into a simpler helper function. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v4 02/21] ibmvfc: move event pool init/free routines

2021-01-11 Thread Tyrel Datwyler
The next patch in this series reworks the event pool allocation calls to happen within the individual queue allocation routines instead of as independent calls. Move the init/free routines earlier in ibmvfc.c to prevent undefined reference errors when calling these functions from the queue

[PATCH v4 01/21] ibmvfc: add vhost fields and defaults for MQ enablement

2021-01-11 Thread Tyrel Datwyler
Introduce several new vhost fields for managing MQ state of the adapter as well as initial defaults for MQ enablement. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 8 drivers/scsi/ibmvscsi/ibmvfc.h | 9 + 2 files changed, 17 insertions(+) diff --git

[PATCH v4 06/21] ibmvfc: add Subordinate CRQ definitions

2021-01-11 Thread Tyrel Datwyler
Subordinate Command Response Queues (Sub CRQ) are used in conjunction with the primary CRQ when more than one queue is needed by the virtual IO adapter. Recent phyp firmware versions support Sub CRQ's with ibmvfc adapters. This feature is a prerequisite for supporting multiple hardware backed

[PATCH v4 04/21] ibmvfc: add size parameter to ibmvfc_init_event_pool

2021-01-11 Thread Tyrel Datwyler
With the upcoming addition of Sub-CRQs the event pool size may vary per-queue. Add a size parameter to ibmvfc_init_event_pool such that different size event pools can be requested by ibmvfc_alloc_queue. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 25

[PATCH v4 07/21] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2021-01-11 Thread Tyrel Datwyler
Allocate a set of Sub-CRQs in advance. During channel setup the client and VIOS negotiate the number of queues the VIOS supports and the number that the client desires to request. Its possible that the final channel resources allocated is less than requested, but the client is still responsible

[PATCH v4 03/21] ibmvfc: init/free event pool during queue allocation/free

2021-01-11 Thread Tyrel Datwyler
The event pool and CRQ used to be separate entities of the adapter host structure and as such were allocated and freed independently of each other. Recent work as defined a generic queue structure with an event pool specific to each queue. As such the event pool for each queue shouldn't be

Re: [PATCH v2] powerpc/vdso: fix clock_gettime_fallback for vdso32

2021-01-11 Thread kernel test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.11-rc3 next-20210111] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

Re: [PATCH 02/17] rtc: pl031: use RTC_FEATURE_ALARM

2021-01-11 Thread Linus Walleij
On Mon, Jan 11, 2021 at 12:18 AM Alexandre Belloni wrote: > Clear RTC_FEATURE_ALARM instead of setting set_alarm, read_alarm and > alarm_irq_enable to NULL. > > Signed-off-by: Alexandre Belloni Acked-by: Linus Walleij Yours, Linus Walleij

[PATCH v2] powerpc/vdso: fix clock_gettime_fallback for vdso32

2021-01-11 Thread Christophe Leroy
From: Andreas Schwab The second argument of __kernel_clock_gettime64 points to a struct __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall in the fallback function for the 32-bit vdso. Similarily, clock_getres_fallback should use the clock_getres_time64 syscall, though it

Re: [PATCH] powerpc/vdso: fix clock_gettime_fallback for vdso32

2021-01-11 Thread Christophe Leroy
Le 11/01/2021 à 16:18, Andreas Schwab a écrit : The second argument of __kernel_clock_gettime64 points to a struct __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall in the fallback function for the 32-bit vdso. Similarily, clock_getres_fallback should use the

[PATCH] powerpc/vdso: fix clock_gettime_fallback for vdso32

2021-01-11 Thread Andreas Schwab
The second argument of __kernel_clock_gettime64 points to a struct __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall in the fallback function for the 32-bit vdso. Similarily, clock_getres_fallback should use the clock_getres_time64 syscall, though it isn't yet called from

[PATCH v2] powerpc/perf: Adds support for programming of Thresholding in P10

2021-01-11 Thread Kajol Jain
Thresholding, a performance monitoring unit feature, can be used to identify marked instructions which take more than expected cycles between start event and end event. Threshold compare (thresh_cmp) bits are programmed in MMCRA register. In Power9, thresh_cmp bits were part of the event code. But

Re: [PATCH v3 4/8] powerpc/signal64: Remove TM ifdefery in middle of if/else block

2021-01-11 Thread Christophe Leroy
Le 09/01/2021 à 04:25, Christopher M. Riedl a écrit : Rework the messy ifdef breaking up the if-else for TM similar to commit f1cf4f93de2f ("powerpc/signal32: Remove ifdefery in middle of if/else"). Unlike that commit for ppc32, the ifdef can't be removed entirely since uc_transact in

Re: [PATCH v3 1/8] powerpc/uaccess: Add unsafe_copy_from_user

2021-01-11 Thread Christophe Leroy
Le 09/01/2021 à 04:25, Christopher M. Riedl a écrit : Implement raw_copy_from_user_allowed() which assumes that userspace read access is open. Use this new function to implement raw_copy_from_user(). Finally, wrap the new function to follow the usual "unsafe_" convention of taking a label

[PATCH 3/3] powerpc: Merge raw_copy_to_user_allowed() into raw_copy_to_user()

2021-01-11 Thread Christophe Leroy
Since commit 17bc43367fc2 ("powerpc/uaccess: Implement unsafe_copy_to_user() as a simple loop"), raw_copy_to_user_allowed() is only used by raw_copy_to_user(). Merge raw_copy_to_user_allowed() into raw_copy_to_user(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 8

[PATCH 2/3] powerpc: Merge __put_user_size_allowed() into __put_user_size()

2021-01-11 Thread Christophe Leroy
__put_user_size_allowed() is only called from __put_user_size() now. Merge them together. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h

[PATCH 1/3] powerpc: get rid of small constant size cases in raw_copy_{to,from}_user()

2021-01-11 Thread Christophe Leroy
Copied from commit 4b842e4e25b1 ("x86: get rid of small constant size cases in raw_copy_{to,from}_user()") Very few call sites where that would be triggered remain, and none of those is anywhere near hot enough to bother. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/uaccess.h |

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-11 Thread Sebastian Andrzej Siewior
On 2021-01-09 01:33:52 [+0100], Thomas Bogendoerfer wrote: > On Sat, Jan 09, 2021 at 12:58:05AM +0100, Thomas Bogendoerfer wrote: > > On Fri, Jan 08, 2021 at 08:20:43PM +, Paul Cercueil wrote: > > > Hi Thomas, > > > > > > 5.11 does not boot anymore on Ingenic SoCs, I bisected it to this

[PATCH 1/3] powerpc: retire sbc8548 board support

2021-01-11 Thread Paul Gortmaker
The support was for this was mainlined 13 years ago, in v2.6.25 [0e0fffe88767] just around the ppc --> powerpc migration. I believe the board was introduced a year or two before that, so it is roughly a 15 year old platform - with the CPU speed and memory size that was typical for that era. I

[PATCH 2/3] powerpc: retire sbc8641d board support

2021-01-11 Thread Paul Gortmaker
The support was for this was added to mainline over 12 years ago, in v2.6.26 [4e8aae89a35d] just around the ppc --> powerpc migration. I believe the board was introduced shortly after the sbc8548 board, making it roughly a 14 year old platform - with the CPU speed and memory size typical for that

[PATCH 3/3] MAINTAINERS: update for Paul Gortmaker

2021-01-11 Thread Paul Gortmaker
Signed-off-by: Paul Gortmaker --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cc1e6a5ee6e6..c5f5cdb24674 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6529,7 +6529,6 @@ F:Documentation/admin-guide/media/em28xx* F:

[PATCH 0/3] Retire remaining WindRiver embedded SBC BSPs

2021-01-11 Thread Paul Gortmaker
In v2.6.27 (2008, 917f0af9e5a9) the sbc8260 support was implicitly retired by not being carried forward through the ppc --> powerpc device tree transition. Then, in v3.6 (2012, b048b4e17cbb) we retired the support for the sbc8560 boards. Next, in v4.18 (2017, 3bc6cf5a86e5) we retired the support