Re: [PATCH v2 10/15] NTB: ntb_test: Update ntb_tool DB tests

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 01:27:57PM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > DB interface of ntb_tool driver hasn't been changed much, but > > db_valid_mask DebugFS file has still

Re: [PATCH v2 05/15] NTB: ntb_tool: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 01:03:25PM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > NTB API has been updated to support multi-port devices like IDT > > 89HPESx series or Microsemi S

Re: [PATCH v2 09/15] NTB: ntb_test: Update ntb_tool link tests

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 01:26:29PM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > Link Up and Down methods are used to change NTB link settings on > > local side only for multi-port dev

Re: [PATCH v2 03/15] NTB: Fix UB/bug in ntb_mw_get_align()

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 01:08:44PM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Tue, Dec 5, 2017 at 12:56 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > On Tue, Dec 05, 2017 at 11:52:32AM -0500, Jon Mason <jdma...@kudzu.us> > > wrote: > >> O

Re: [PATCH v2 02/15] NTB: Set dma mask and dma coherent mask to NTB devices

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 11:51:08AM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > The dma_mask and dma_coherent_mask fields of the NTB struct device > > weren't initialized in hardware drivers

Re: [PATCH v2 01/15] NTB: Rename NTB messaging API methods

2017-12-05 Thread Serge Semin
On Tue, Dec 05, 2017 at 11:49:10AM -0500, Jon Mason <jdma...@kudzu.us> wrote: > On Sun, Dec 3, 2017 at 2:17 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > There is a common methods signature form used over all the NTB API > > like functions naming scheme, arg

Re: [PATCH v2 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-03 Thread Serge Semin
On Sun, Dec 03, 2017 at 09:54:58PM -0700, Logan Gunthorpe <log...@deltatee.com> wrote: > > > On 03/12/17 12:17 PM, Serge Semin wrote: > > The multi-port NTB API was introduced in kernel 4.13 as well as the > > first driver for the true multi-port devices of I

[PATCH v3 13/15] NTB: ntb_test: Update ntb_tool MW tests

2017-12-05 Thread Serge Semin
previous Intel/AMD and new IDT-like devices. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 89 + 1 file changed, 68 insertions(+), 21 deletions(-) diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/t

[PATCH v3 04/15] NTB: ntb_pp: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
hardware, which doesn't support Scratchpads, but such alternative as NTB Message register. Additional cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Add Multi-port API support - Use NTB Message registers if available - Ping-pong now

[PATCH v3 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-05 Thread Serge Semin
. This patchset is intended to fix the issue by amending the NTB test drivers and script so they would be fully compatible with multi-port NTB API. Additionally I found a few NTB subsystem issues while developing the submitted patches. So they are also fixed in this patchset. Serge Semin (15): NTB

[PATCH v3 02/15] NTB: Set dma mask and dma coherent mask to NTB devices

2017-12-05 Thread Serge Semin
to that ntb_device_register() method shouldn't clear the passed ntb_dev structure, since it dma_mask is initialized by hardware drivers. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/ntb/hw/amd/ntb_hw_amd.c | 4 drivers/ntb/hw/idt/ntb_hw_idt.c | 8 +++- drivers/ntb/hw

[PATCH v3 15/15] NTB: ntb_hw_idt: Set NTB_TOPO_SWITCH topology

2017-12-05 Thread Serge Semin
Since Switchtec patch there has been a new topology added to the NTB API. It's called NTB_TOPO_SWITCH and dedicated for PCIe switch chips. Even though topo field isn't used within the IDT driver much, lets set it for the sake of unification. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v3 14/15] NTB: ntb_test: Update ntb_perf tests

2017-12-05 Thread Serge Semin
ntb_perf driver has been also updated so to have the multi-port interface support. User now must specify what peer port is going to be used to perform the test. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 13 +++-- 1 file chan

[PATCH v3 06/15] NTB: ntb_perf: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
any available NTB peer. Additionally it allows to set NTB memory windows up using any available data exchange interface: Scratchpad or Message registers. Some cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Alter interface in comp

[PATCH v3 12/15] NTB: ntb_test: Add ntb_tool Message tests

2017-12-05 Thread Serge Semin
Messages NTB API is now available. ntb_tool driver has been altered to perform messages send and receive operation. The test of messages read/write to/from peer device has been added to the script. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_t

[PATCH v3 05/15] NTB: ntb_tool: Add full multi-port NTB API support

2017-12-05 Thread Serge Semin
fully expose all the new NTB API interfaces. Particularly it concerns the Message registers, peer ports API, NTB link settings. Additional cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Alter interface in compliance with multi-port API

[PATCH v3 09/15] NTB: ntb_test: Update ntb_tool link tests

2017-12-05 Thread Serge Semin
the link state. Such behaviour should be reflected in the test code. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v3: - Redirect errors to /dev/null instead of /dev/nulle tools/testing/selftests/ntb/ntb_test.sh | 26 +++--- 1 file changed, 15 inse

[PATCH v3 10/15] NTB: ntb_test: Update ntb_tool DB tests

2017-12-05 Thread Serge Semin
DB interface of ntb_tool driver hasn't been changed much, but db_valid_mask DebugFS file has still been added. In this case it's much better to test all valid DB bits instead of using the predefined mask, which may be incorrect in general. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v3 07/15] NTB: ntb_test: Safely use paths with whitespace

2017-12-05 Thread Serge Semin
If some of variables like LOC/REM or LOCAL_*/REMOTE_* got whitespaces, the script may fail with syntax error. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 62 - 1 file changed, 31 insertions(+), 31 del

[PATCH v3 08/15] NTB: ntb_test: Add ntb_tool port tests

2017-12-05 Thread Serge Semin
the local and peer ports as well as their indexes. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 52 + 1 file changed, 52 insertions(+) diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/t

[PATCH v3 11/15] NTB: ntb_test: Update ntb_tool Scratchpad tests

2017-12-05 Thread Serge Semin
Scratchpad NTB API has changed so has the ntb_tool driver. Outbound Scratchpad DebugFS files have been moved to peer specific directories. Each scratchpad is now available via separate file. The test code has been accordingly altered. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v3 01/15] NTB: Rename NTB messaging API methods

2017-12-05 Thread Serge Semin
There is a common methods signature form used over all the NTB API like functions naming scheme, arguments names and order, etc. Recently added NTB messaging API IO callbacks were named a bit different so should be renamed to be in compliance with the rest of the API. Signed-off-by: Serge Semin

[PATCH v3 03/15] NTB: Fix UB/bug in ntb_mw_get_align()

2017-12-05 Thread Serge Semin
in "linux/bitops.h" to perform the bit-set-shift operations, so it's recommended to have them used for proper bit setting. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- include/linux/ntb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/nt

Re: [PATCH v2 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-05 Thread Serge Semin
On Mon, Dec 04, 2017 at 03:10:20PM -0500, Allen Hubbe <allen.hu...@dell.com> wrote: > From: Serge Semin > > The multi-port NTB API was introduced in kernel 4.13 as well as the > > first driver for the true multi-port devices of IDT PCIe-switches > > series. But the t

[PATCH v4 03/15] NTB: Fix UB/bug in ntb_mw_get_align()

2017-12-06 Thread Serge Semin
in "linux/bitops.h" to perform the bit-set-shift operations, so it's recommended to have them used for proper bit setting. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> Reviewed-by: Logan Gunthorpe <log...@deltatee.com> --- include/linux/ntb.h | 2 +- 1 file changed, 1 in

[PATCH v4 13/15] NTB: ntb_test: Update ntb_tool MW tests

2017-12-06 Thread Serge Semin
previous Intel/AMD and new IDT-like devices. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 89 + 1 file changed, 68 insertions(+), 21 deletions(-) diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/t

[PATCH v4 02/15] NTB: Set dma mask and dma coherent mask to NTB devices

2017-12-06 Thread Serge Semin
to that ntb_device_register() method shouldn't clear the passed ntb_dev structure, since it dma_mask is initialized by hardware drivers. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/ntb/hw/amd/ntb_hw_amd.c | 4 drivers/ntb/hw/idt/ntb_hw_idt.c | 8 +++- drivers/ntb/hw

[PATCH v4 00/15] NTB: Add full multi-port API support to the test drivers

2017-12-06 Thread Serge Semin
on top of the recent Jon Mason's repo state: https://github.com/jonmason/ntb Particularly the "ntb/ntb-next" branch is used. The last commit hash had been: commit ("ntb_hw_switchtec: Force down the link before") Serge Semin (15): NTB: Rename NTB messaging API methods NTB:

[PATCH v4 09/15] NTB: ntb_test: Update ntb_tool link tests

2017-12-06 Thread Serge Semin
the link state. Such behaviour should be reflected in the test code. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v3: - Redirect errors to /dev/null instead of /dev/nulle tools/testing/selftests/ntb/ntb_test.sh | 26 +++--- 1 file changed, 15 inse

[PATCH v4 01/15] NTB: Rename NTB messaging API methods

2017-12-06 Thread Serge Semin
There is a common methods signature form used over all the NTB API like functions naming scheme, arguments names and order, etc. Recently added NTB messaging API IO callbacks were named a bit different so should be renamed to be in compliance with the rest of the API. Signed-off-by: Serge Semin

[PATCH v4 10/15] NTB: ntb_test: Update ntb_tool DB tests

2017-12-06 Thread Serge Semin
DB interface of ntb_tool driver hasn't been changed much, but db_valid_mask DebugFS file has still been added. In this case it's much better to test all valid DB bits instead of using the predefined mask, which may be incorrect in general. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v4 11/15] NTB: ntb_test: Update ntb_tool Scratchpad tests

2017-12-06 Thread Serge Semin
Scratchpad NTB API has changed so has the ntb_tool driver. Outbound Scratchpad DebugFS files have been moved to peer specific directories. Each scratchpad is now available via separate file. The test code has been accordingly altered. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v4 04/15] NTB: ntb_pp: Add full multi-port NTB API support

2017-12-06 Thread Serge Semin
hardware, which doesn't support Scratchpads, but such alternative as NTB Message register. Additional cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Add Multi-port API support - Use NTB Message registers if available - Ping-pong now work

[PATCH v4 12/15] NTB: ntb_test: Add ntb_tool Message tests

2017-12-06 Thread Serge Semin
Messages NTB API is now available. ntb_tool driver has been altered to perform messages send and receive operation. The test of messages read/write to/from peer device has been added to the script. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_t

[PATCH v4 14/15] NTB: ntb_test: Update ntb_perf tests

2017-12-06 Thread Serge Semin
ntb_perf driver has been also updated so to have the multi-port interface support. User now must specify what peer port is going to be used to perform the test. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 13 +++-- 1 file chan

[PATCH v4 15/15] NTB: ntb_hw_idt: Set NTB_TOPO_SWITCH topology

2017-12-06 Thread Serge Semin
Since Switchtec patch there has been a new topology added to the NTB API. It's called NTB_TOPO_SWITCH and dedicated for PCIe switch chips. Even though topo field isn't used within the IDT driver much, lets set it for the sake of unification. Signed-off-by: Serge Semin <fancer.lan...@gmail.

[PATCH v4 05/15] NTB: ntb_tool: Add full multi-port NTB API support

2017-12-06 Thread Serge Semin
fully expose all the new NTB API interfaces. Particularly it concerns the Message registers, peer ports API, NTB link settings. Additional cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Alter interface in compliance with multi-port API

[PATCH v4 06/15] NTB: ntb_perf: Add full multi-port NTB API support

2017-12-06 Thread Serge Semin
any available NTB peer. Additionally it allows to set NTB memory windows up using any available data exchange interface: Scratchpad or Message registers. Some cleanups are also added here. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- Changelog v1: - Alter interface in comp

[PATCH v4 07/15] NTB: ntb_test: Safely use paths with whitespace

2017-12-06 Thread Serge Semin
If some of variables like LOC/REM or LOCAL_*/REMOTE_* got whitespaces, the script may fail with syntax error. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> Acked-by: Logan Gunthorpe <log...@deltatee.com> Fixes: a9c59ef77458 ("ntb_test: Add a selftest script for

[PATCH v4 08/15] NTB: ntb_test: Add ntb_tool port tests

2017-12-06 Thread Serge Semin
the local and peer ports as well as their indexes. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- tools/testing/selftests/ntb/ntb_test.sh | 52 + 1 file changed, 52 insertions(+) diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/t

Re: [PATCH 6/9] NTB: ntb_hw_idt: fix typo 'can by' to 'can be'

2018-05-11 Thread Serge Semin
ich state can be changed by any > * NT-function of the IDT device in accordance with global permissions. These > * permissions configs are not supported by NTB API, so it must be done by > * either BIOS or EEPROM settings. In the same way the state of the global Acked-by: Serge Semin <fancer.lan...@gmail.com> > -- > 2.11.0 >

Re: [PATCH 4/8] NTB: ntb_pingpong: Choose doorbells based on port number

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:14PM -0600, Logan Gunthorpe wrote: > This commit fixes pingpong support for existing drivers that do not > implement ntb_default_port_number() and ntb_default_peer_port_number(). > This is required for hardware (like the crosslink topology of > switchtec) which

Re: [PATCH 5/8] NTB: perf: Don't require one more memory window than number of peers

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:15PM -0600, Logan Gunthorpe wrote: > ntb_perf should not require more than one memory window per peer. This > was probably an off-by-one error. > Good catch. Thanks. IDT got a lot of MWs especially if LookUpTables are enabled. That's why I didn't find the effect

Re: [PATCH 1/8] NTB: ntb_tool: reading the link file should not end in a NULL byte

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:11PM -0600, Logan Gunthorpe wrote: > When running ntb_test this warning is issued: > > ./ntb_test.sh: line 200: warning: command substitution: ignored null > byte in input > This is weird. Neither me nor the folks' who tested the script saw this warning. I tried

Re: [PATCH 3/8] NTB: Fix the default port and peer numbers for legacy drivers

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:13PM -0600, Logan Gunthorpe wrote: > When the commit adding ntb_default_port_number() and > ntb_default_peer_port_number() entered the kernel there was no > users of it so it was impossible to tell what the API needed. > > When a user finally landed a year later

Re: [PATCH 0/8] Fix breakage caused by the NTB multi-port patchset

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:10PM -0600, Logan Gunthorpe wrote: Good day, Logan. Thanks for the patchset you submitted. My hopefully useful comments are under the corresponding patches. Regards, -Sergey > Hey, > > Here are all the fixes required to get ntb_test on switchtec working > again

Re: [PATCH 6/8] NTB: perf: Fix support for hardware that doesn't have port numbers

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:17PM -0600, Logan Gunthorpe wrote: > Legacy drivers do not have port numbers (but is reliably only two ports) > and was broken by the recent commit that added mult-port support to > ntb_perf. This is especially important to support the cross link > topology which is

Re: [PATCH 7/8] NTB: perf: Fix race condition when run with ntb_test

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:18PM -0600, Logan Gunthorpe wrote: > When running ntb_test, the script tries to run the ntb_perf test > immediately after probing the modules. Since adding multi-port support, > this fails seeing the new initialization procedure in ntb_perf > can not complete

Re: [PATCH 8/8] NTB: ntb_test: Fix bug when counting remote files

2018-06-15 Thread Serge Semin
On Fri, Jun 08, 2018 at 06:08:19PM -0600, Logan Gunthorpe wrote: > When remote files are counted in get_files_count, without using SSH, > the code returns 0 because there is a colon prepended to $LOC. $VPATH > should have been used instead of $LOC. > Good catch. Thanks for the patch. I

[PATCH 01/10 v3] usb: usb251xb: Update usb251xb bindings

2017-10-22 Thread Serge Semin
parameters is hardware specific it needs to be defined in dts. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- .../devicetree/bindings/usb/usb251xb.txt | 46 +++--- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/binding

[PATCH 03/10 v3] usb: usb251xb: Add USB251x specific port count setting

2017-10-22 Thread Serge Semin
be checked whether it doesn't get out of available ports. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/usb/misc/usb251xb.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb2

[PATCH 00/10 v3] usb: usb251xb: Add USB2517i hub support and fix some bugs

2017-10-22 Thread Serge Semin
- Fix some types Serge Semin (10): usb: usb251xb: Update usb251xb bindings usb: usb251xb: Add USB2517i specific struct and IDs usb: usb251xb: Add USB251x specific port count setting usb: usb251xb: Add 5,6,7 ports mapping def setting usb: usb251xb: Add 5,6,7 ports boost settings usb: usb

[PATCH 07/10 v3] usb: usb251xb: Add USB2517 LED settings

2017-10-22 Thread Serge Semin
USB2517 supports two LED modes: USB mode and speed (default) indication mode. The last one can be switched on by corresponding dts property. Since USB251xb hubs doesn't support LEDs settings, we need to ignore this setting. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drive

[PATCH 04/10 v3] usb: usb251xb: Add 5,6,7 ports mapping def setting

2017-10-22 Thread Serge Semin
USB2517 got three additionl downstream ports, which can as well be mapped to another logical ports. USB251xb driver currently doesn't fully support such setting configuration from dts file. This patch doesn't change this, but adds usb2517 spcific ports default liner mapping. Signed-off-by: Serge

[PATCH 08/10 v3] usb: usb251xb: Fix property_u32 NULL pointer dereference

2017-10-22 Thread Serge Semin
The methods like of_property_read_u32 utilizing the specified pointer permit only the pointer to a preallocated u32 storage as the third argument. As a result the driver crashes on NULL pointer dereference in case if "oc-delay-us" or "power-on-time-ms" declared in dts file.

[PATCH 10/10 v3] usb: usb251xb: Use GPIO descriptor consumer interface

2017-10-22 Thread Serge Semin
including the logical value inversion. Secondly, by requesting the reset GPIO descriptor the driver prevent the other applications from changing its value. And last but not least the legacy GPIO interface should be avoided in the new code due to it obsolescence. Signed-off-by: Serge Semin <fancer.

[PATCH 02/10 v3] usb: usb251xb: Add USB2517i specific struct and IDs

2017-10-22 Thread Serge Semin
discovered on i2c-bus. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/usb/misc/Kconfig| 4 ++-- drivers/usb/misc/usb251xb.c | 23 +-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig

[PATCH 05/10 v3] usb: usb251xb: Add 5,6,7 ports boost settings

2017-10-22 Thread Serge Semin
-by: Serge Semin <fancer.lan...@gmail.com> Acked-by: Richard Leitner <richard.leit...@skidata.com> --- drivers/usb/misc/usb251xb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index a05bd2e1

[PATCH 06/10 v3] usb: usb251xb: Add battery enable setting flag

2017-10-22 Thread Serge Semin
in the driver, but still can be helpful in future, when necessity of the corresponding dts setting arises. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/usb/misc/usb251xb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/us

[PATCH 09/10 v3] usb: usb251xb: Add max power/current dts property support

2017-10-22 Thread Serge Semin
This parameters may be varied in accordance with hardware specifics. So lets add the corresponding settings to the usb251xb driver dts specification. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/usb/misc/usb251xb.c | 24 1 file changed, 20 inse

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-18 Thread Serge Semin
On Thu, Jan 18, 2018 at 12:03:03PM -0800, Florian Fainelli <f.faine...@gmail.com> wrote: > On 01/17/2018 02:23 PM, Serge Semin wrote: > > It is useful to have the kernel virtual memory layout printed > > at boot time so to have the full information about the booted >

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-19 Thread Serge Semin
On Fri, Jan 19, 2018 at 07:59:43AM +, Matt Redfearn <matt.redfe...@mips.com> wrote: Hello Matt, > Hi Serge, > > > > On 18/01/18 20:18, Serge Semin wrote: > >On Thu, Jan 18, 2018 at 12:03:03PM -0800, Florian Fainelli > ><f.faine...@gmail.com> w

[PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
to forcibly cast all the u32 to be __le32 and vise-versa where it's supposed to be in accordance with the driver logic. Fixes: b83003b3fdc1 ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- drivers/ntb/test

Re: [PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
On Fri, Jan 19, 2018 at 09:42:17PM +0100, Arnd Bergmann <a...@arndb.de> wrote: > On Fri, Jan 19, 2018 at 6:30 PM, Serge Semin <fancer.lan...@gmail.com> wrote: > > Sparse is whining about the u32 and __le32 mixed usage in the > > driver. > > > > drivers/nt

Re: [PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
On Sat, Jan 20, 2018 at 12:03:10AM +0300, Serge Semin <fancer.lan...@gmail.com> wrote: > On Fri, Jan 19, 2018 at 09:42:17PM +0100, Arnd Bergmann <a...@arndb.de> wrote: > > On Fri, Jan 19, 2018 at 6:30 PM, Serge Semin <fancer.lan...@gmail.com> > > wrote: >

Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Serge Semin
that kfree on buf frees > the memory. > > Detected by CoverityScan, CID#1464286 ("Resource leak") > > Fixes: d637628ce00c ("NTB: ntb_tool: Add full multi-port NTB API support") > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Good catch, thanks! A

[PATCH 04/14] MIPS: memblock: Discard bootmem initialization

2018-01-17 Thread Serge Semin
regions initialization the only thing left is to set the upper allocation limit to be up to the max low memory PFN, so the memblock API can be fully used from now. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 86 -- 1 file chang

[PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section

2018-01-17 Thread Serge Semin
The current MIPS code makes sure the kernel code/data/init sections are in the maps, but BSS should also be there. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/

[PATCH 03/14] MIPS: memblock: Reserve initrd memory in memblock

2018-01-17 Thread Serge Semin
There is no reserve_bootmem() method in the nobootmem interface, so we need to replace it with memblock-specific one. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/set

[PATCH 08/14] MIPS: memblock: Simplify DMA contiguous reservation

2018-01-17 Thread Serge Semin
CMA reserves it areas in the memblock allocator. Since we aren't using bootmem anymore, the reservations copying should be discarded. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/mips/kernel/s

[PATCH 10/14] MIPS: memblock: Perform early low memory test

2018-01-17 Thread Serge Semin
Low memory can be tested at this point, since all the reservations have just been finished without much of additional allocations. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/set

[PATCH 07/14] MIPS: memblock: Mark present sparsemem sections

2018-01-17 Thread Serge Semin
If sparsemem is activated all sections with present pages must be accordingly marked after memblock is fully initialized. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/

[PATCH 05/14] MIPS: memblock: Add reserved memory regions to memblock

2018-01-17 Thread Serge Semin
the function description/code). Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 96 +- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 0ffbc3bb5..9e14d9833

[PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-17 Thread Serge Semin
l be involved in reviewing and testing. The patchset is applied on top of kernel 4.15-rc8 and can be found submitted at my repo: https://github.com/fancer/Linux-kernel-MIPS-memblock-project Signed-off-by: Serge Semin <fancer.lan...@gmail.com> Serge Semin (14): MIPS: memblock: Add RESERVED_NO

[PATCH 14/14] MIPS: memblock: Deactivate bootmem allocator

2018-01-17 Thread Serge Semin
Memblock allocator can be successfully used from now for early memory management Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 725b5ece7..a6c4fb6b6

[PATCH 06/14] MIPS: memblock: Reserve kdump/crash regions in memblock

2018-01-17 Thread Serge Semin
Kdump/crashkernel memory regions should be reserved in the memblock allocator so they wouldn't be occupied by any further allocations. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH 01/14] MIPS: memblock: Add RESERVED_NOMAP memory flag

2018-01-17 Thread Serge Semin
to be changed in the further patches. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/include/asm/bootinfo.h | 1 + arch/mips/kernel/prom.c | 8 ++-- arch/mips/kernel/setup.c | 8 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arc

[PATCH 12/14] MIPS: memblock: Discard bootmem from Loongson3 code

2018-01-17 Thread Serge Semin
-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/loongson64/loongson-3/numa.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c index 282c5a8c2..902843516 100644 --- a/arc

[PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-17 Thread Serge Semin
It is useful to have the kernel virtual memory layout printed at boot time so to have the full information about the booted kernel. In some cases it might be unsafe to have virtual addresses freely visible in logs, so the %pK format is used if one want to hide them. Signed-off-by: Serge Semin

[PATCH 13/14] MIPS: memblock: Discard bootmem from SGI IP27 code

2018-01-17 Thread Serge Semin
since I couldn't find a place where prom_meminit() called and kernel memory isn't reserved. It must have been untested since the time the arch/mips/mips-boards/generic code was in the kernel. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/sgi-ip27/ip27-memory.c | 9 ++

[PATCH 09/14] MIPS: memblock: Allow memblock regions resize

2018-01-17 Thread Serge Semin
When all the main reservations are done the memblock regions can be dynamically resized. Additionally it would be useful to have memblock regions dumped on debug at this point. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 4 1 file chan

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-25 Thread Serge Semin
Hello Alexander, On Thu, Jan 25, 2018 at 06:58:07PM +0100, Alexander Sverdlin <alexander.sverd...@nokia.com> wrote: > Hello Serge, > > On 17/01/18 23:22, Serge Semin wrote: > > The patchset is applied on top of kernel 4.15-rc8 and can be found > > submitted at my r

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-30 Thread Serge Semin
So, since there haven't been any new comments for over a week, I'll be collecting the patchset v2 tomorrow. Regards, -Sergey On Thu, Jan 18, 2018 at 01:22:58AM +0300, Serge Semin <fancer.lan...@gmail.com> wrote: > Even though it's common to see the architecture code using both

[PATCH v2 06/15] MIPS: memblock: Add reserved memory regions to memblock

2018-02-01 Thread Serge Semin
the function description/code). Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 96 +++- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c

[PATCH v2 11/15] MIPS: memblock: Perform early low memory test

2018-02-01 Thread Serge Semin
Low memory can be tested at this point, since all the reservations have just been finished without much of additional allocations. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/set

[PATCH v2 12/15] MIPS: memblock: Print out kernel virtual mem layout

2018-02-01 Thread Serge Semin
It is useful to have the kernel virtual memory layout printed at boot time so to have the full information about the booted kernel. In some cases it might be unsafe to have virtual addresses freely visible in logs, so the %pK format is used if one want to hide them. Signed-off-by: Serge Semin

[PATCH v2 10/15] MIPS: memblock: Allow memblock regions resize

2018-02-01 Thread Serge Semin
When all the main reservations are done the memblock regions can be dynamically resized. Additionally it would be useful to have memblock regions dumped on debug at this point. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 4 1 file chan

[PATCH v2 09/15] MIPS: memblock: Simplify DMA contiguous reservation

2018-02-01 Thread Serge Semin
CMA reserves it areas in the memblock allocator. Since we aren't using bootmem anymore, the reservations copying should be discarded. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH v2 07/15] MIPS: memblock: Reserve kdump/crash regions in memblock

2018-02-01 Thread Serge Semin
Kdump/crashkernel memory regions should be reserved in the memblock allocator so they wouldn't be occupied by any further allocations. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH v2 08/15] MIPS: memblock: Mark present sparsemem sections

2018-02-01 Thread Serge Semin
If sparsemem is activated all sections with present pages must be accordingly marked after memblock is fully initialized. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/setup.c

[PATCH v2 01/15] MIPS: memblock: Add RESERVED_NOMAP memory flag

2018-02-01 Thread Serge Semin
to be changed in the further patches. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/include/asm/bootinfo.h | 1 + arch/mips/kernel/prom.c | 8 ++-- arch/mips/kernel/setup.c | 8 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arc

[PATCH v2 00/15] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-02-01 Thread Serge Semin
7 to patch 8 (requested by Marcin Nowakowski) - Add tested platforms to the cover letter Signed-off-by: Serge Semin <fancer.lan...@gmail.com> Tested-by: Matt Redfearn <matt.redfe...@mips.com> Tested-by: Alexander Sverdlin <alexander.sverd...@nokia.com> Matt Redfearn (1): MIPS:

[PATCH v2 14/15] MIPS: memblock: Discard bootmem from SGI IP27 code

2018-02-01 Thread Serge Semin
since I couldn't find a place where prom_meminit() called and kernel memory isn't reserved. It must have been untested since the time the arch/mips/mips-boards/generic code was in the kernel. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/sgi-ip27/ip27-memory.c | 9 ++

[PATCH v2 15/15] MIPS: memblock: Deactivate bootmem allocator

2018-02-01 Thread Serge Semin
Memblock allocator can be successfully used from now for early memory management Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 350a990fc719..434f75

[PATCH v2 13/15] MIPS: memblock: Discard bootmem from Loongson3 code

2018-02-01 Thread Serge Semin
-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/loongson64/loongson-3/numa.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c index f17ef520799a..2f1ebf496c17

[PATCH v2 05/15] MIPS: KASLR: Drop relocatable fixup from reservation_init

2018-02-01 Thread Serge Semin
From: Matt Redfearn A recent change ("MIPS: memblock: Discard bootmem initialization") removed the reservation of all memory below the kernel's _end symbol in bootmem. This makes the call to free_bootmem unnecessary, since the memory region is no longer marked reserved.

[PATCH v2 04/15] MIPS: memblock: Discard bootmem initialization

2018-02-01 Thread Serge Semin
regions initialization the only thing left is to set the upper allocation limit to be up to the max low memory PFN, so the memblock API can be fully used from now. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 86 +++--

[PATCH v2 02/15] MIPS: memblock: Surely map BSS kernel memory section

2018-02-01 Thread Serge Semin
The current MIPS code makes sure the kernel code/data/init sections are in the maps, but BSS should also be there. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/

[PATCH v2 03/15] MIPS: memblock: Reserve initrd memory in memblock

2018-02-01 Thread Serge Semin
There is no reserve_bootmem() method in the nobootmem interface, so we need to replace it with memblock-specific one. Signed-off-by: Serge Semin <fancer.lan...@gmail.com> --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/set

Re: [RFC] MIPS memblock: Remove bootmem code and switch to NO_BOOTMEM

2017-12-26 Thread Serge Semin
On Fri, Dec 22, 2017 at 08:18:09AM +0100, Marcin Nowakowski <marcin.nowakow...@mips.com> wrote: > Hi Serge, > > On 19.12.2017 21:14, Serge Semin wrote: > >Hello folks, > > > >Almost a year ago I sent a patchset to the Linux MIPS community. The main > >t

<    1   2   3   4   5   6   7   8   9   10   >