[PATCH] macintosh: windfarm: Use NULL to compare with pointer-typed value rather than 0

2020-11-12 Thread Xu Wang
Compare pointer-typed values to NULL rather than 0.

Signed-off-by: Xu Wang 
---
 drivers/macintosh/windfarm_pm121.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/macintosh/windfarm_pm121.c 
b/drivers/macintosh/windfarm_pm121.c
index ab467b9c31be..62826844b584 100644
--- a/drivers/macintosh/windfarm_pm121.c
+++ b/drivers/macintosh/windfarm_pm121.c
@@ -650,7 +650,7 @@ static void pm121_create_cpu_fans(void)
 
/* First, locate the PID params in SMU SBD */
hdr = smu_get_sdb_partition(SMU_SDB_CPUPIDDATA_ID, NULL);
-   if (hdr == 0) {
+   if (hdr == NULL) {
printk(KERN_WARNING "pm121: CPU PID fan config not found.\n");
goto fail;
}
@@ -969,7 +969,7 @@ static int pm121_init_pm(void)
const struct smu_sdbp_header *hdr;
 
hdr = smu_get_sdb_partition(SMU_SDB_SENSORTREE_ID, NULL);
-   if (hdr != 0) {
+   if (hdr != NULL) {
struct smu_sdbp_sensortree *st =
(struct smu_sdbp_sensortree *)[1];
pm121_mach_model = st->model_id;
-- 
2.17.1



Re: [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'

2020-11-12 Thread Lee Jones
On Thu, 12 Nov 2020, Leo Li wrote:

> 
> 
> > -Original Message-
> > From: Lee Jones 
> > Sent: Thursday, November 12, 2020 4:33 AM
> > To: linux-arm-ker...@lists.infradead.org; linux-ker...@vger.kernel.org;
> > Qiang Zhao ; Leo Li ; Scott
> > Wood ; act ; Dan Malek
> > ; Software, Inc ; Vitaly
> > Bordug ; linuxppc-dev@lists.ozlabs.org
> > Subject: Re: [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function
> > attribute 'addr'
> > 
> > On Tue, 03 Nov 2020, Lee Jones wrote:
> > 
> > > Fixes the following W=1 kernel build warning(s):
> > >
> > >  drivers/soc/fsl/qe/qe_common.c:237: warning: Function parameter or
> > member 'addr' not described in 'cpm_muram_dma'
> > >  drivers/soc/fsl/qe/qe_common.c:237: warning: Excess function parameter
> > 'offset' description in 'cpm_muram_dma'
> > >
> > > Cc: Qiang Zhao 
> > > Cc: Li Yang 
> > > Cc: Scott Wood 
> > > Cc: act 
> > > Cc: Dan Malek 
> > > Cc: "Software, Inc" 
> > > Cc: Vitaly Bordug 
> > > Cc: linuxppc-dev@lists.ozlabs.org
> > > Signed-off-by: Lee Jones 
> > > ---
> > >  drivers/soc/fsl/qe/qe_common.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/soc/fsl/qe/qe_common.c
> > > b/drivers/soc/fsl/qe/qe_common.c index 75075591f6308..497a7e0fd0272
> > > 100644
> > > --- a/drivers/soc/fsl/qe/qe_common.c
> > > +++ b/drivers/soc/fsl/qe/qe_common.c
> > > @@ -231,7 +231,7 @@ EXPORT_SYMBOL(cpm_muram_offset);
> > >
> > >  /**
> > >   * cpm_muram_dma - turn a muram virtual address into a DMA address
> > > - * @offset: virtual address from cpm_muram_addr() to convert
> > > + * @addr: virtual address from cpm_muram_addr() to convert
> > >   */
> > >  dma_addr_t cpm_muram_dma(void __iomem *addr)  {
> > 
> > Any idea who will pick this up?
> 
> I can pick them up through my tree, but I haven't created the
> for-next branch for the next kernel yet.  Will look through this
> series soon.  Thanks.

Thank you Leo.

There's not rush.  Just trying to ensure they don't get forgotten.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v4 01/18] dt-bindings: usb: usb-hcd: Detach generic USB controller properties

2020-11-12 Thread Chunfeng Yun
On Wed, 2020-11-11 at 12:08 +0300, Serge Semin wrote:
> There can be three distinctive types of the USB controllers: USB hosts,
> USB peripherals/gadgets and USB OTG, which can switch from one role to
> another. In order to have that hierarchy handled in the DT binding files,
> we need to collect common properties in a common DT schema and specific
> properties in dedicated schemas. Seeing the usb-hcd.yaml DT schema is
> dedicated for the USB host controllers only, let's move some common
> properties from there into the usb.yaml schema. So the later would be
> available to evaluate all currently supported types of the USB
> controllers.
> 
> While at it add an explicit "additionalProperties: true" into the
> usb-hcd.yaml as setting the additionalProperties/unevaluateProperties
> properties is going to be get mandatory soon.
> 
> Signed-off-by: Serge Semin 
> 
> ---
> 
> Changelog v4:
> - This is a new patch created as a result of the comment left
>   by Chunfeng Yun in v3
> ---
>  .../devicetree/bindings/usb/usb-hcd.yaml  | 14 ++---
>  .../devicetree/bindings/usb/usb.yaml  | 29 +++
>  2 files changed, 32 insertions(+), 11 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml 
> b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> index 7263b7f2b510..81f3ad1419d8 100644
> --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> @@ -9,18 +9,10 @@ title: Generic USB Host Controller Device Tree Bindings
>  maintainers:
>- Greg Kroah-Hartman 
>  
> -properties:
> -  $nodename:
> -pattern: "^usb(@.*)?"
> +allOf:
> +  - $ref: usb.yaml#
>  
> -  phys:
> -$ref: /schemas/types.yaml#/definitions/phandle-array
> -description:
> -  List of all the USB PHYs on this HCD
> -
> -  phy-names:
> -description:
> -  Name specifier for the USB PHY
> +additionalProperties: true
This seems already added by the applied patch 6a0e321ea735 "dt-bindings:
Explicitly allow additional properties in common schemas"

>  
>  examples:
>- |
> diff --git a/Documentation/devicetree/bindings/usb/usb.yaml 
> b/Documentation/devicetree/bindings/usb/usb.yaml
> new file mode 100644
> index ..941ad59fbac5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/usb.yaml
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/usb.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic USB Controller Device Tree Bindings
> +
> +maintainers:
> +  - Greg Kroah-Hartman 
> +
> +select: false
> +
> +properties:
> +  $nodename:
> +pattern: "^usb(@.*)?"
> +
> +  phys:
> +$ref: /schemas/types.yaml#/definitions/phandle-array
> +description:
> +  List of all the USB PHYs on this HCD
> +
> +  phy-names:
> +description:
> +  Name specifier for the USB PHY
> +
> +additionalProperties: true
> +
> +...



Re: [PATCH net-next 12/12] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-12 Thread drt

On 2020-11-12 11:10, Thomas Falcon wrote:

From: "Dwip N. Banerjee" 

Reduce the amount of time spent replenishing RX buffers by
only doing so once available buffers has fallen under a certain
threshold, in this case half of the total number of buffers, or
if the polling loop exits before the packets processed is less
than its budget.

Signed-off-by: Dwip N. Banerjee 


Acked-by: Dany Madden 


---
 drivers/net/ethernet/ibm/ibmvnic.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
b/drivers/net/ethernet/ibm/ibmvnic.c
index 0791dbf1cba8..66f8068bee5a 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2476,7 +2476,10 @@ static int ibmvnic_poll(struct napi_struct
*napi, int budget)
frames_processed++;
}

-   if (adapter->state != VNIC_CLOSING)
+   if (adapter->state != VNIC_CLOSING &&
+   ((atomic_read(>rx_pool[scrq_num].available) <
+ adapter->req_rx_add_entries_per_subcrq / 2) ||
+ frames_processed < budget))
replenish_rx_pool(adapter, >rx_pool[scrq_num]);
if (frames_processed < budget) {
if (napi_complete_done(napi, frames_processed)) {


Re: [PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads are ordered

2020-11-12 Thread drt

On 2020-11-12 11:09, Thomas Falcon wrote:

Ensure that received Subordinate Command-Response Queue
entries are properly read in order by the driver.

Signed-off-by: Thomas Falcon 


Acked-by: Dany Madden 


---
 drivers/net/ethernet/ibm/ibmvnic.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
b/drivers/net/ethernet/ibm/ibmvnic.c
index da15913879f8..5647f54bf387 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2391,6 +2391,8 @@ static int ibmvnic_poll(struct napi_struct
*napi, int budget)

if (!pending_scrq(adapter, adapter->rx_scrq[scrq_num]))
break;
+   /* ensure that we do not prematurely exit the polling loop */
+   dma_rmb();
next = ibmvnic_next_scrq(adapter, adapter->rx_scrq[scrq_num]);
rx_buff =
(struct ibmvnic_rx_buff *)be64_to_cpu(next->
@@ -3087,6 +3089,8 @@ static int ibmvnic_complete_tx(struct
ibmvnic_adapter *adapter,
int num_entries = 0;

next = ibmvnic_next_scrq(adapter, scrq);
+   /* ensure that we are reading the correct queue entry */
+   dma_rmb();
for (i = 0; i < next->tx_comp.num_comps; i++) {
if (next->tx_comp.rcs[i]) {
dev_err(dev, "tx error %x\n",


Re: [PATCH kernel] vfio_pci_nvlink2: Do not attempt NPU2 setup on old P8's NPU

2020-11-12 Thread Andrew Donnellan

On 13/11/20 4:06 pm, Alexey Kardashevskiy wrote:

We execute certain NPU2 setup code (such as mapping an LPID to a device
in NPU2) unconditionally if an Nvlink bridge is detected. However this
cannot succeed on P8+ machines as the init helpers return an error other
than ENODEV which means the device is there is and setup failed so
vfio_pci_enable() fails and pass through is not possible.

This changes the two NPU2 related init helpers to return -ENODEV if
there is no "memory-region" device tree property as this is
the distinction between NPU and NPU2.

Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
Signed-off-by: Alexey Kardashevskiy 


Should this be Cc: stable?


Andrew

--
Andrew Donnellan  OzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited


[PATCH kernel] vfio_pci_nvlink2: Do not attempt NPU2 setup on old P8's NPU

2020-11-12 Thread Alexey Kardashevskiy
We execute certain NPU2 setup code (such as mapping an LPID to a device
in NPU2) unconditionally if an Nvlink bridge is detected. However this
cannot succeed on P8+ machines as the init helpers return an error other
than ENODEV which means the device is there is and setup failed so
vfio_pci_enable() fails and pass through is not possible.

This changes the two NPU2 related init helpers to return -ENODEV if
there is no "memory-region" device tree property as this is
the distinction between NPU and NPU2.

Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
Signed-off-by: Alexey Kardashevskiy 
---
 drivers/vfio/pci/vfio_pci_nvlink2.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c 
b/drivers/vfio/pci/vfio_pci_nvlink2.c
index 65c61710c0e9..9adcf6a8f888 100644
--- a/drivers/vfio/pci/vfio_pci_nvlink2.c
+++ b/drivers/vfio/pci/vfio_pci_nvlink2.c
@@ -231,7 +231,7 @@ int vfio_pci_nvdia_v100_nvlink2_init(struct vfio_pci_device 
*vdev)
return -EINVAL;
 
if (of_property_read_u32(npu_node, "memory-region", _phandle))
-   return -EINVAL;
+   return -ENODEV;
 
mem_node = of_find_node_by_phandle(mem_phandle);
if (!mem_node)
@@ -393,7 +393,7 @@ int vfio_pci_ibm_npu2_init(struct vfio_pci_device *vdev)
int ret;
struct vfio_pci_npu2_data *data;
struct device_node *nvlink_dn;
-   u32 nvlink_index = 0;
+   u32 nvlink_index = 0, mem_phandle = 0;
struct pci_dev *npdev = vdev->pdev;
struct device_node *npu_node = pci_device_to_OF_node(npdev);
struct pci_controller *hose = pci_bus_to_host(npdev->bus);
@@ -408,6 +408,9 @@ int vfio_pci_ibm_npu2_init(struct vfio_pci_device *vdev)
if (!pnv_pci_get_gpu_dev(vdev->pdev))
return -ENODEV;
 
+   if (of_property_read_u32(npu_node, "memory-region", _phandle))
+   return -ENODEV;
+
/*
 * NPU2 normally has 8 ATSD registers (for concurrency) and 6 links
 * so we can allocate one register per link, using nvlink index as
-- 
2.17.1



Re: [PATCH 3/3] powerpc: rewrite atomics to use ARCH_ATOMIC

2020-11-12 Thread kernel test robot
Hi Nicholas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on asm-generic/master linus/master v5.10-rc3 
next-20201112]
[cannot apply to scottwood/next]
[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 in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-convert-to-use-ARCH_ATOMIC/2020-190941
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-s031-2020 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# 
https://github.com/0day-ci/linux/commit/9e1bec8fe216b0745c647e52c40d1f0033fb4efd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Nicholas-Piggin/powerpc-convert-to-use-ARCH_ATOMIC/2020-190941
git checkout 9e1bec8fe216b0745c647e52c40d1f0033fb4efd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


"sparse warnings: (new ones prefixed by >>)"
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 
>> 1 (different modifiers) @@ expected void *ptr @@ got unsigned int 
>> volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:75:24: sparse: expected void *ptr
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: got unsigned int volatile 
>> *__ai_ptr
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 
>> 1 (different modifiers) @@ expected void *ptr @@ got unsigned int 
>> volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:75:24: sparse: expected void *ptr
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: got unsigned int volatile 
>> *__ai_ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:118:24: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: got unsigned int volatile 
*__ai_ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:118:24: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: got unsigned int volatile 
*__ai_ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:141:24: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: got unsigned int volatile 
*__ai_ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:141:24: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: got unsigned int volatile 
*__ai_ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:319:40: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: got unsigned int volatile 
*__ai_ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: sparse: incorrect type in 
argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned 
int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:319:40: sparse: expected void *ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: got unsigned int volatile 
*__ai_ptr

vim +75 drivers/gpu/drm/drm_lock.c

4ac5ec40ec70022 Daniel Vetter 2010-08-23  48  
bd50d4a2168370b Benjamin Gaignard 2020-03-06  49  /*
1a75a222f5ca106 Daniel Vetter 2016-06-14  50   * Take the heavyweight lock.
1a75a222f5ca106 Daniel Vetter 2016-06-14  51   *
1a75a222f5ca106 Daniel Vetter 2016-06-14  52   * \param lock lock pointer.
1a75a222f5ca106 Daniel Vetter 2016-06-14  53   * \param context locking 
context.
1a75a222f5ca106 Daniel Vetter 2016-06-14  54   * \return one if the lock is 
held, or zero otherwise.
1a75a222f5ca106 Daniel Vetter 2016-06-14  55   *
1a75a222f5

[PATCH kernel] powerpc/powernv/npu: Do not attempt NPU2 setup on old P8's NPU

2020-11-12 Thread Alexey Kardashevskiy
We execute certain NPU2 setup code (such as mapping an LPID to a device
in NPU2) unconditionally if an Nvlink bridge is detected. However this
cannot succeed on P8+ machines and errors appear in dmesg. This is
harmless as skiboot returns an error and the only place we check it is
vfio-pci but that code does not get called on P8+ either.

This adds a check if pnv_npu2_xxx helpers are called on a machine with
NPU2 which initializes pnv_phb::npu in pnv_npu2_init();
pnv_phb::npu==NULL on P8+.

Fixes: 1b785611e119 ("powerpc/powernv/npu: Add release_ownership hook")
Signed-off-by: Alexey Kardashevskiy 
---
 arch/powerpc/platforms/powernv/npu-dma.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/npu-dma.c 
b/arch/powerpc/platforms/powernv/npu-dma.c
index abeaa533b976..7b28b284a594 100644
--- a/arch/powerpc/platforms/powernv/npu-dma.c
+++ b/arch/powerpc/platforms/powernv/npu-dma.c
@@ -623,6 +623,11 @@ int pnv_npu2_map_lpar_dev(struct pci_dev *gpdev, unsigned 
int lparid,
return -ENODEV;
 
hose = pci_bus_to_host(npdev->bus);
+   if (hose->npu == NULL) {
+   dev_info_once(>dev, "Nvlink1 does not support contexts");
+   return 0;
+   }
+
nphb = hose->private_data;
 
dev_dbg(>dev, "Map LPAR opalid=%llu lparid=%u\n",
@@ -670,6 +675,11 @@ int pnv_npu2_unmap_lpar_dev(struct pci_dev *gpdev)
return -ENODEV;
 
hose = pci_bus_to_host(npdev->bus);
+   if (hose->npu == NULL) {
+   dev_info_once(>dev, "Nvlink1 does not support contexts");
+   return 0;
+   }
+
nphb = hose->private_data;
 
dev_dbg(>dev, "destroy context opalid=%llu\n",
-- 
2.17.1



RE: [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'

2020-11-12 Thread Leo Li


> -Original Message-
> From: Lee Jones 
> Sent: Thursday, November 12, 2020 4:33 AM
> To: linux-arm-ker...@lists.infradead.org; linux-ker...@vger.kernel.org;
> Qiang Zhao ; Leo Li ; Scott
> Wood ; act ; Dan Malek
> ; Software, Inc ; Vitaly
> Bordug ; linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function
> attribute 'addr'
> 
> On Tue, 03 Nov 2020, Lee Jones wrote:
> 
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/soc/fsl/qe/qe_common.c:237: warning: Function parameter or
> member 'addr' not described in 'cpm_muram_dma'
> >  drivers/soc/fsl/qe/qe_common.c:237: warning: Excess function parameter
> 'offset' description in 'cpm_muram_dma'
> >
> > Cc: Qiang Zhao 
> > Cc: Li Yang 
> > Cc: Scott Wood 
> > Cc: act 
> > Cc: Dan Malek 
> > Cc: "Software, Inc" 
> > Cc: Vitaly Bordug 
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/soc/fsl/qe/qe_common.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/soc/fsl/qe/qe_common.c
> > b/drivers/soc/fsl/qe/qe_common.c index 75075591f6308..497a7e0fd0272
> > 100644
> > --- a/drivers/soc/fsl/qe/qe_common.c
> > +++ b/drivers/soc/fsl/qe/qe_common.c
> > @@ -231,7 +231,7 @@ EXPORT_SYMBOL(cpm_muram_offset);
> >
> >  /**
> >   * cpm_muram_dma - turn a muram virtual address into a DMA address
> > - * @offset: virtual address from cpm_muram_addr() to convert
> > + * @addr: virtual address from cpm_muram_addr() to convert
> >   */
> >  dma_addr_t cpm_muram_dma(void __iomem *addr)  {
> 
> Any idea who will pick this up?

I can pick them up through my tree, but I haven't created the for-next branch 
for the next kernel yet.  Will look through this series soon.  Thanks.

> 
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services Linaro.org │ Open source
> software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog


[PATCH net-next 12/12] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" 

Reduce the amount of time spent replenishing RX buffers by
only doing so once available buffers has fallen under a certain
threshold, in this case half of the total number of buffers, or
if the polling loop exits before the packets processed is less
than its budget.

Signed-off-by: Dwip N. Banerjee 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index 0791dbf1cba8..66f8068bee5a 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2476,7 +2476,10 @@ static int ibmvnic_poll(struct napi_struct *napi, int 
budget)
frames_processed++;
}
 
-   if (adapter->state != VNIC_CLOSING)
+   if (adapter->state != VNIC_CLOSING &&
+   ((atomic_read(>rx_pool[scrq_num].available) <
+ adapter->req_rx_add_entries_per_subcrq / 2) ||
+ frames_processed < budget))
replenish_rx_pool(adapter, >rx_pool[scrq_num]);
if (frames_processed < budget) {
if (napi_complete_done(napi, frames_processed)) {
-- 
2.26.2



[PATCH net-next 11/12] ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" 

Take advantage of the additional optimizations in netdev_alloc_skb when
allocating socket buffers to be used for packet reception.

Signed-off-by: Dwip N. Banerjee 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index e48a44d8884c..0791dbf1cba8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -323,7 +323,7 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
rx_scrq = adapter->rx_scrq[pool->index];
ind_bufp = _scrq->ind_buf;
for (i = 0; i < count; ++i) {
-   skb = alloc_skb(pool->buff_size, GFP_ATOMIC);
+   skb = netdev_alloc_skb(adapter->netdev, pool->buff_size);
if (!skb) {
dev_err(dev, "Couldn't replenish rx buff\n");
adapter->replenish_no_mem++;
-- 
2.26.2



[PATCH net-next 10/12] ibmvnic: Correctly re-enable interrupts in NAPI polling routine

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" 

If the current NAPI polling loop exits without completing it's
budget, only re-enable interrupts if there are no entries remaining
in the queue and napi_complete_done is successful. If there are entries
remaining on the queue that were missed, restart the polling loop.

Signed-off-by: Dwip N. Banerjee 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 37 +++---
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index dc42bdc6d3e1..e48a44d8884c 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2387,10 +2387,17 @@ static void remove_buff_from_pool(struct 
ibmvnic_adapter *adapter,
 
 static int ibmvnic_poll(struct napi_struct *napi, int budget)
 {
-   struct net_device *netdev = napi->dev;
-   struct ibmvnic_adapter *adapter = netdev_priv(netdev);
-   int scrq_num = (int)(napi - adapter->napi);
-   int frames_processed = 0;
+   struct ibmvnic_sub_crq_queue *rx_scrq;
+   struct ibmvnic_adapter *adapter;
+   struct net_device *netdev;
+   int frames_processed;
+   int scrq_num;
+
+   netdev = napi->dev;
+   adapter = netdev_priv(netdev);
+   scrq_num = (int)(napi - adapter->napi);
+   frames_processed = 0;
+   rx_scrq = adapter->rx_scrq[scrq_num];
 
 restart_poll:
while (frames_processed < budget) {
@@ -2403,16 +2410,16 @@ static int ibmvnic_poll(struct napi_struct *napi, int 
budget)
 
if (unlikely(test_bit(0, >resetting) &&
 adapter->reset_reason != VNIC_RESET_NON_FATAL)) {
-   enable_scrq_irq(adapter, adapter->rx_scrq[scrq_num]);
+   enable_scrq_irq(adapter, rx_scrq);
napi_complete_done(napi, frames_processed);
return frames_processed;
}
 
-   if (!pending_scrq(adapter, adapter->rx_scrq[scrq_num]))
+   if (!pending_scrq(adapter, rx_scrq))
break;
/* ensure that we do not prematurely exit the polling loop */
dma_rmb();
-   next = ibmvnic_next_scrq(adapter, adapter->rx_scrq[scrq_num]);
+   next = ibmvnic_next_scrq(adapter, rx_scrq);
rx_buff =
(struct ibmvnic_rx_buff *)be64_to_cpu(next->
  rx_comp.correlator);
@@ -2471,14 +2478,16 @@ static int ibmvnic_poll(struct napi_struct *napi, int 
budget)
 
if (adapter->state != VNIC_CLOSING)
replenish_rx_pool(adapter, >rx_pool[scrq_num]);
-
if (frames_processed < budget) {
-   enable_scrq_irq(adapter, adapter->rx_scrq[scrq_num]);
-   napi_complete_done(napi, frames_processed);
-   if (pending_scrq(adapter, adapter->rx_scrq[scrq_num]) &&
-   napi_reschedule(napi)) {
-   disable_scrq_irq(adapter, adapter->rx_scrq[scrq_num]);
-   goto restart_poll;
+   if (napi_complete_done(napi, frames_processed)) {
+   enable_scrq_irq(adapter, rx_scrq);
+   if (pending_scrq(adapter, rx_scrq)) {
+   rmb();
+   if (napi_reschedule(napi)) {
+   disable_scrq_irq(adapter, rx_scrq);
+   goto restart_poll;
+   }
+   }
}
}
return frames_processed;
-- 
2.26.2



[PATCH net-next 06/12] ibmvnic: Clean up TX code and TX buffer data structure

2020-11-12 Thread Thomas Falcon
Remove unused and superfluous code and members in
existing TX implementation and data structures.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 31 +++---
 drivers/net/ethernet/ibm/ibmvnic.h |  8 
 2 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index c9437b2d1aa8..b523da20bffc 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1496,17 +1496,18 @@ static int create_hdr_descs(u8 hdr_field, u8 *hdr_data, 
int len, int *hdr_len,
  * L2/L3/L4 packet header descriptors to be sent by send_subcrq_indirect.
  */
 
-static void build_hdr_descs_arr(struct ibmvnic_tx_buff *txbuff,
+static void build_hdr_descs_arr(struct sk_buff *skb,
+   union sub_crq *indir_arr,
int *num_entries, u8 hdr_field)
 {
int hdr_len[3] = {0, 0, 0};
+   u8 hdr_data[140] = {0};
int tot_len;
-   u8 *hdr_data = txbuff->hdr_data;
 
-   tot_len = build_hdr_data(hdr_field, txbuff->skb, hdr_len,
-txbuff->hdr_data);
+   tot_len = build_hdr_data(hdr_field, skb, hdr_len,
+hdr_data);
*num_entries += create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
-txbuff->indir_arr + 1);
+indir_arr + 1);
 }
 
 static int ibmvnic_xmit_workarounds(struct sk_buff *skb,
@@ -1537,6 +1538,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
unsigned int tx_send_failed = 0;
netdev_tx_t ret = NETDEV_TX_OK;
unsigned int tx_map_failed = 0;
+   union sub_crq indir_arr[16];
unsigned int tx_dropped = 0;
unsigned int tx_packets = 0;
unsigned int tx_bytes = 0;
@@ -1620,11 +1622,8 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
 
tx_buff = _pool->tx_buff[index];
tx_buff->skb = skb;
-   tx_buff->data_dma[0] = data_dma_addr;
-   tx_buff->data_len[0] = skb->len;
tx_buff->index = index;
tx_buff->pool_index = queue_num;
-   tx_buff->last_frag = true;
 
memset(_crq, 0, sizeof(tx_crq));
tx_crq.v1.first = IBMVNIC_CRQ_CMD;
@@ -1671,7 +1670,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
}
 
if ((*hdrs >> 7) & 1)
-   build_hdr_descs_arr(tx_buff, _entries, *hdrs);
+   build_hdr_descs_arr(skb, indir_arr, _entries, *hdrs);
 
netdev_tx_sent_queue(txq, skb->len);
 
@@ -1688,8 +1687,8 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
ind_bufp->index = 0;
}
 
-   tx_buff->indir_arr[0] = tx_crq;
-   memcpy(_bufp->indir_arr[ind_bufp->index], tx_buff->indir_arr,
+   indir_arr[0] = tx_crq;
+   memcpy(_bufp->indir_arr[ind_bufp->index], _arr[0],
   num_entries * sizeof(struct ibmvnic_generic_scrq));
ind_bufp->index += num_entries;
if (!netdev_xmit_more() || netif_xmit_stopped(txq) ||
@@ -3140,7 +3139,7 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
struct netdev_queue *txq;
union sub_crq *next;
int index;
-   int i, j;
+   int i;
 
 restart_loop:
while (pending_scrq(adapter, scrq)) {
@@ -3169,14 +3168,6 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
}
 
txbuff = _pool->tx_buff[index];
-
-   for (j = 0; j < IBMVNIC_MAX_FRAGS_PER_CRQ; j++) {
-   if (!txbuff->data_dma[j])
-   continue;
-
-   txbuff->data_dma[j] = 0;
-   }
-
num_packets++;
num_entries += txbuff->num_entries;
if (txbuff->skb) {
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h 
b/drivers/net/ethernet/ibm/ibmvnic.h
index 05bf212d387d..11af1f29210b 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -225,8 +225,6 @@ struct ibmvnic_tx_comp_desc {
 #define IBMVNIC_TCP_CHKSUM 0x20
 #define IBMVNIC_UDP_CHKSUM 0x08
 
-#define IBMVNIC_MAX_FRAGS_PER_CRQ 3
-
 struct ibmvnic_tx_desc {
u8 first;
u8 type;
@@ -897,14 +895,8 @@ struct ibmvnic_long_term_buff {
 
 struct ibmvnic_tx_buff {
struct sk_buff *skb;
-   dma_addr_t data_dma[IBMVNIC_MAX_FRAGS_PER_CRQ];
-   unsigned int data_len[IBMVNIC_MAX_FRAGS_PER_CRQ];
int index;
int pool_index;
-   bool last_frag;
-   union sub_crq indir_arr[6];
-   u8 hdr_data[140];
-   dma_addr_t indir_dma;
int num_entries;
 };
 
-- 
2.26.2



[PATCH net-next 09/12] ibmvnic: Ensure that device queue memory is cache-line aligned

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" 

PCI bus slowdowns were observed on IBM VNIC devices as a result
of partial cache line writes and non-cache aligned full cache line writes.
Ensure that packet data buffers are cache-line aligned to avoid these
slowdowns.

Signed-off-by: Dwip N. Banerjee 
---
 drivers/net/ethernet/ibm/ibmvnic.c |  9 ++---
 drivers/net/ethernet/ibm/ibmvnic.h | 10 +-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index b2ca34e94078..dc42bdc6d3e1 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -498,7 +498,7 @@ static int reset_rx_pools(struct ibmvnic_adapter *adapter)
 
if (rx_pool->buff_size != buff_size) {
free_long_term_buff(adapter, _pool->long_term_buff);
-   rx_pool->buff_size = buff_size;
+   rx_pool->buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
rc = alloc_long_term_buff(adapter,
  _pool->long_term_buff,
  rx_pool->size *
@@ -592,7 +592,7 @@ static int init_rx_pools(struct net_device *netdev)
 
rx_pool->size = adapter->req_rx_add_entries_per_subcrq;
rx_pool->index = i;
-   rx_pool->buff_size = buff_size;
+   rx_pool->buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
rx_pool->active = 1;
 
rx_pool->free_map = kcalloc(rx_pool->size, sizeof(int),
@@ -745,6 +745,7 @@ static int init_tx_pools(struct net_device *netdev)
 {
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
int tx_subcrqs;
+   u64 buff_size;
int i, rc;
 
tx_subcrqs = adapter->num_active_tx_scrqs;
@@ -761,9 +762,11 @@ static int init_tx_pools(struct net_device *netdev)
adapter->num_active_tx_pools = tx_subcrqs;
 
for (i = 0; i < tx_subcrqs; i++) {
+   buff_size = adapter->req_mtu + VLAN_HLEN;
+   buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
rc = init_one_tx_pool(netdev, >tx_pool[i],
  adapter->req_tx_entries_per_subcrq,
- adapter->req_mtu + VLAN_HLEN);
+ buff_size);
if (rc) {
release_tx_pools(adapter);
return rc;
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h 
b/drivers/net/ethernet/ibm/ibmvnic.h
index c6f1842d2023..1e4c7702402b 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -884,7 +884,7 @@ struct ibmvnic_sub_crq_queue {
atomic_t used;
char name[32];
u64 handle;
-};
+} cacheline_aligned;
 
 struct ibmvnic_long_term_buff {
unsigned char *buff;
@@ -908,7 +908,7 @@ struct ibmvnic_tx_pool {
struct ibmvnic_long_term_buff long_term_buff;
int num_buffers;
int buf_size;
-};
+} cacheline_aligned;
 
 struct ibmvnic_rx_buff {
struct sk_buff *skb;
@@ -929,7 +929,7 @@ struct ibmvnic_rx_pool {
int next_alloc;
int active;
struct ibmvnic_long_term_buff long_term_buff;
-};
+} cacheline_aligned;
 
 struct ibmvnic_vpd {
unsigned char *buff;
@@ -1014,8 +1014,8 @@ struct ibmvnic_adapter {
atomic_t running_cap_crqs;
bool wait_capability;
 
-   struct ibmvnic_sub_crq_queue **tx_scrq;
-   struct ibmvnic_sub_crq_queue **rx_scrq;
+   struct ibmvnic_sub_crq_queue **tx_scrq cacheline_aligned;
+   struct ibmvnic_sub_crq_queue **rx_scrq cacheline_aligned;
 
/* rx structs */
struct napi_struct *napi;
-- 
2.26.2



[PATCH net-next 04/12] ibmvnic: Introduce xmit_more support using batched subCRQ hcalls

2020-11-12 Thread Thomas Falcon
Include support for the xmit_more feature utilizing the
H_SEND_SUB_CRQ_INDIRECT hypervisor call which allows the sending
of multiple subordinate Command Response Queue descriptors in one
hypervisor call via a DMA-mapped buffer. This update reduces hypervisor
calls and thus hypervisor call overhead per TX descriptor.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 151 +
 1 file changed, 91 insertions(+), 60 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index 524020691ef8..0f6aba760d65 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1165,6 +1165,7 @@ static int __ibmvnic_open(struct net_device *netdev)
if (prev_state == VNIC_CLOSED)
enable_irq(adapter->tx_scrq[i]->irq);
enable_scrq_irq(adapter, adapter->tx_scrq[i]);
+   netdev_tx_reset_queue(netdev_get_tx_queue(netdev, i));
}
 
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);
@@ -1529,10 +1530,12 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
int queue_num = skb_get_queue_mapping(skb);
u8 *hdrs = (u8 *)>tx_rx_desc_req;
struct device *dev = >vdev->dev;
+   struct ibmvnic_ind_xmit_queue *ind_bufp;
struct ibmvnic_tx_buff *tx_buff = NULL;
struct ibmvnic_sub_crq_queue *tx_scrq;
struct ibmvnic_tx_pool *tx_pool;
unsigned int tx_send_failed = 0;
+   netdev_tx_t ret = NETDEV_TX_OK;
unsigned int tx_map_failed = 0;
unsigned int tx_dropped = 0;
unsigned int tx_packets = 0;
@@ -1547,7 +1550,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
int index = 0;
u8 proto = 0;
u64 handle;
-   netdev_tx_t ret = NETDEV_TX_OK;
+   int i;
 
if (test_bit(0, >resetting)) {
if (!netif_subqueue_stopped(netdev, skb))
@@ -1666,55 +1669,37 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
tx_crq.v1.mss = cpu_to_be16(skb_shinfo(skb)->gso_size);
hdrs += 2;
}
-   /* determine if l2/3/4 headers are sent to firmware */
-   if ((*hdrs >> 7) & 1) {
+
+   if ((*hdrs >> 7) & 1)
build_hdr_descs_arr(tx_buff, _entries, *hdrs);
-   tx_crq.v1.n_crq_elem = num_entries;
-   tx_buff->num_entries = num_entries;
-   tx_buff->indir_arr[0] = tx_crq;
-   tx_buff->indir_dma = dma_map_single(dev, tx_buff->indir_arr,
-   sizeof(tx_buff->indir_arr),
-   DMA_TO_DEVICE);
-   if (dma_mapping_error(dev, tx_buff->indir_dma)) {
-   dev_kfree_skb_any(skb);
-   tx_buff->skb = NULL;
-   if (!firmware_has_feature(FW_FEATURE_CMO))
-   dev_err(dev, "tx: unable to map descriptor 
array\n");
-   tx_map_failed++;
-   tx_dropped++;
-   ret = NETDEV_TX_OK;
-   goto tx_err_out;
-   }
-   lpar_rc = send_subcrq_indirect(adapter, handle,
-  (u64)tx_buff->indir_dma,
-  (u64)num_entries);
-   dma_unmap_single(dev, tx_buff->indir_dma,
-sizeof(tx_buff->indir_arr), DMA_TO_DEVICE);
-   } else {
-   tx_buff->num_entries = num_entries;
-   lpar_rc = send_subcrq(adapter, handle,
- _crq);
-   }
-   if (lpar_rc != H_SUCCESS) {
-   if (lpar_rc != H_CLOSED && lpar_rc != H_PARAMETER)
-   dev_err_ratelimited(dev, "tx: send failed\n");
-   dev_kfree_skb_any(skb);
-   tx_buff->skb = NULL;
 
-   if (lpar_rc == H_CLOSED || adapter->failover_pending) {
-   /* Disable TX and report carrier off if queue is closed
-* or pending failover.
-* Firmware guarantees that a signal will be sent to the
-* driver, triggering a reset or some other action.
-*/
-   netif_tx_stop_all_queues(netdev);
-   netif_carrier_off(netdev);
-   }
+   netdev_tx_sent_queue(txq, skb->len);
 
-   tx_send_failed++;
-   tx_dropped++;
-   ret = NETDEV_TX_OK;
-   goto tx_err_out;
+   tx_crq.v1.n_crq_elem = num_entries;
+   tx_buff->num_entries = num_entries;
+   ind_bufp = _scrq->ind_buf;
+   /* flush buffer if current entry can not fit */
+   if (num_entries + ind_bufp->index > 

[PATCH net-next 02/12] ibmvnic: Introduce indirect subordinate Command Response Queue buffer

2020-11-12 Thread Thomas Falcon
This patch introduces the infrastructure to send batched subordinate
Command Response Queue descriptors, which are used by the ibmvnic
driver to send TX frame and RX buffer descriptors.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 19 +++
 drivers/net/ethernet/ibm/ibmvnic.h | 10 ++
 2 files changed, 29 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index 5647f54bf387..dd9ca06f355b 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2860,6 +2860,7 @@ static int reset_one_sub_crq_queue(struct ibmvnic_adapter 
*adapter,
memset(scrq->msgs, 0, 4 * PAGE_SIZE);
atomic_set(>used, 0);
scrq->cur = 0;
+   scrq->ind_buf.index = 0;
 
rc = h_reg_sub_crq(adapter->vdev->unit_address, scrq->msg_token,
   4 * PAGE_SIZE, >crq_num, >hw_irq);
@@ -2911,6 +2912,11 @@ static void release_sub_crq_queue(struct ibmvnic_adapter 
*adapter,
}
}
 
+   dma_free_coherent(dev,
+ IBMVNIC_IND_ARR_SZ,
+ scrq->ind_buf.indir_arr,
+ scrq->ind_buf.indir_dma);
+
dma_unmap_single(dev, scrq->msg_token, 4 * PAGE_SIZE,
 DMA_BIDIRECTIONAL);
free_pages((unsigned long)scrq->msgs, 2);
@@ -2957,6 +2963,19 @@ static struct ibmvnic_sub_crq_queue 
*init_sub_crq_queue(struct ibmvnic_adapter
 
scrq->adapter = adapter;
scrq->size = 4 * PAGE_SIZE / sizeof(*scrq->msgs);
+   scrq->ind_buf.index = 0;
+
+   scrq->ind_buf.indir_arr =
+   dma_alloc_coherent(dev,
+  IBMVNIC_IND_ARR_SZ,
+  >ind_buf.indir_dma,
+  GFP_KERNEL);
+
+   if (!scrq->ind_buf.indir_arr) {
+   dev_err(dev, "Couldn't allocate indirect scrq buffer\n");
+   goto reg_failed;
+   }
+
spin_lock_init(>lock);
 
netdev_dbg(adapter->netdev,
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h 
b/drivers/net/ethernet/ibm/ibmvnic.h
index 217dcc7ded70..05bf212d387d 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -31,6 +31,7 @@
 #define IBMVNIC_BUFFS_PER_POOL 100
 #define IBMVNIC_MAX_QUEUES 16
 #define IBMVNIC_MAX_QUEUE_SZ   4096
+#define IBMVNIC_MAX_IND_DESCS  128
 
 #define IBMVNIC_TSO_BUF_SZ 65536
 #define IBMVNIC_TSO_BUFS   64
@@ -861,6 +862,14 @@ union sub_crq {
struct ibmvnic_rx_buff_add_desc rx_add;
 };
 
+#define IBMVNIC_IND_ARR_SZ (IBMVNIC_MAX_IND_DESCS * sizeof(union sub_crq))
+
+struct ibmvnic_ind_xmit_queue {
+   union sub_crq *indir_arr;
+   dma_addr_t indir_dma;
+   int index;
+};
+
 struct ibmvnic_sub_crq_queue {
union sub_crq *msgs;
int size, cur;
@@ -873,6 +882,7 @@ struct ibmvnic_sub_crq_queue {
spinlock_t lock;
struct sk_buff *rx_skb_top;
struct ibmvnic_adapter *adapter;
+   struct ibmvnic_ind_xmit_queue ind_buf;
atomic_t used;
char name[32];
u64 handle;
-- 
2.26.2



[PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads are ordered

2020-11-12 Thread Thomas Falcon
Ensure that received Subordinate Command-Response Queue
entries are properly read in order by the driver.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index da15913879f8..5647f54bf387 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2391,6 +2391,8 @@ static int ibmvnic_poll(struct napi_struct *napi, int 
budget)
 
if (!pending_scrq(adapter, adapter->rx_scrq[scrq_num]))
break;
+   /* ensure that we do not prematurely exit the polling loop */
+   dma_rmb();
next = ibmvnic_next_scrq(adapter, adapter->rx_scrq[scrq_num]);
rx_buff =
(struct ibmvnic_rx_buff *)be64_to_cpu(next->
@@ -3087,6 +3089,8 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
int num_entries = 0;
 
next = ibmvnic_next_scrq(adapter, scrq);
+   /* ensure that we are reading the correct queue entry */
+   dma_rmb();
for (i = 0; i < next->tx_comp.num_comps; i++) {
if (next->tx_comp.rcs[i]) {
dev_err(dev, "tx error %x\n",
-- 
2.26.2



[PATCH net-next 03/12] ibmvnic: Introduce batched RX buffer descriptor transmission

2020-11-12 Thread Thomas Falcon
Utilize the H_SEND_SUB_CRQ_INDIRECT hypervisor call to send
multiple RX buffer descriptors to the device in one hypervisor
call operation. This change will reduce the number of hypervisor
calls and thus hypervisor call overhead needed to transmit
RX buffer descriptors to the device.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 57 +++---
 1 file changed, 37 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index dd9ca06f355b..524020691ef8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -306,9 +306,11 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
int count = pool->size - atomic_read(>available);
u64 handle = adapter->rx_scrq[pool->index]->handle;
struct device *dev = >vdev->dev;
+   struct ibmvnic_ind_xmit_queue *ind_bufp;
+   struct ibmvnic_sub_crq_queue *rx_scrq;
+   union sub_crq *sub_crq;
int buffers_added = 0;
unsigned long lpar_rc;
-   union sub_crq sub_crq;
struct sk_buff *skb;
unsigned int offset;
dma_addr_t dma_addr;
@@ -320,6 +322,8 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
if (!pool->active)
return;
 
+   rx_scrq = adapter->rx_scrq[pool->index];
+   ind_bufp = _scrq->ind_buf;
for (i = 0; i < count; ++i) {
skb = alloc_skb(pool->buff_size, GFP_ATOMIC);
if (!skb) {
@@ -346,12 +350,13 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
pool->rx_buff[index].pool_index = pool->index;
pool->rx_buff[index].size = pool->buff_size;
 
-   memset(_crq, 0, sizeof(sub_crq));
-   sub_crq.rx_add.first = IBMVNIC_CRQ_CMD;
-   sub_crq.rx_add.correlator =
+   sub_crq = _bufp->indir_arr[ind_bufp->index++];
+   memset(sub_crq, 0, sizeof(*sub_crq));
+   sub_crq->rx_add.first = IBMVNIC_CRQ_CMD;
+   sub_crq->rx_add.correlator =
cpu_to_be64((u64)>rx_buff[index]);
-   sub_crq.rx_add.ioba = cpu_to_be32(dma_addr);
-   sub_crq.rx_add.map_id = pool->long_term_buff.map_id;
+   sub_crq->rx_add.ioba = cpu_to_be32(dma_addr);
+   sub_crq->rx_add.map_id = pool->long_term_buff.map_id;
 
/* The length field of the sCRQ is defined to be 24 bits so the
 * buffer size needs to be left shifted by a byte before it is
@@ -361,15 +366,20 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
 #ifdef __LITTLE_ENDIAN__
shift = 8;
 #endif
-   sub_crq.rx_add.len = cpu_to_be32(pool->buff_size << shift);
-
-   lpar_rc = send_subcrq(adapter, handle, _crq);
-   if (lpar_rc != H_SUCCESS)
-   goto failure;
-
-   buffers_added++;
-   adapter->replenish_add_buff_success++;
+   sub_crq->rx_add.len = cpu_to_be32(pool->buff_size << shift);
pool->next_free = (pool->next_free + 1) % pool->size;
+   if (ind_bufp->index == IBMVNIC_MAX_IND_DESCS ||
+   i == count - 1) {
+   lpar_rc =
+   send_subcrq_indirect(adapter, handle,
+(u64)ind_bufp->indir_dma,
+(u64)ind_bufp->index);
+   if (lpar_rc != H_SUCCESS)
+   goto failure;
+   buffers_added += ind_bufp->index;
+   adapter->replenish_add_buff_success += ind_bufp->index;
+   ind_bufp->index = 0;
+   }
}
atomic_add(buffers_added, >available);
return;
@@ -377,13 +387,20 @@ static void replenish_rx_pool(struct ibmvnic_adapter 
*adapter,
 failure:
if (lpar_rc != H_PARAMETER && lpar_rc != H_CLOSED)
dev_err_ratelimited(dev, "rx: replenish packet buffer 
failed\n");
-   pool->free_map[pool->next_free] = index;
-   pool->rx_buff[index].skb = NULL;
-
-   dev_kfree_skb_any(skb);
-   adapter->replenish_add_buff_failure++;
-   atomic_add(buffers_added, >available);
+   for (i = ind_bufp->index - 1; i >= 0; --i) {
+   struct ibmvnic_rx_buff *rx_buff;
 
+   pool->next_free = pool->next_free == 0 ?
+ pool->size - 1 : pool->next_free - 1;
+   sub_crq = _bufp->indir_arr[i];
+   rx_buff = (struct ibmvnic_rx_buff *)
+   be64_to_cpu(sub_crq->rx_add.correlator);
+   index = (int)(rx_buff - pool->rx_buff);
+   pool->free_map[pool->next_free] = index;
+   dev_kfree_skb_any(pool->rx_buff[index].skb);
+   

[PATCH net-next 07/12] ibmvnic: Clean up TX error handling and statistics tracking

2020-11-12 Thread Thomas Falcon
Update error handling code in ibmvnic_xmit to be more readable
and remove unused statistics counters. Also record statistics
when TX completions are received to improve accuracy.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 38 ++
 drivers/net/ethernet/ibm/ibmvnic.h |  2 --
 2 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index b523da20bffc..2c24d4774457 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1535,13 +1535,9 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
struct ibmvnic_tx_buff *tx_buff = NULL;
struct ibmvnic_sub_crq_queue *tx_scrq;
struct ibmvnic_tx_pool *tx_pool;
-   unsigned int tx_send_failed = 0;
netdev_tx_t ret = NETDEV_TX_OK;
-   unsigned int tx_map_failed = 0;
union sub_crq indir_arr[16];
unsigned int tx_dropped = 0;
-   unsigned int tx_packets = 0;
-   unsigned int tx_bytes = 0;
dma_addr_t data_dma_addr;
struct netdev_queue *txq;
unsigned long lpar_rc;
@@ -1558,18 +1554,13 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
if (!netif_subqueue_stopped(netdev, skb))
netif_stop_subqueue(netdev, queue_num);
dev_kfree_skb_any(skb);
-
-   tx_send_failed++;
tx_dropped++;
-   ret = NETDEV_TX_OK;
-   goto out;
+   goto err_out;
}
 
if (ibmvnic_xmit_workarounds(skb, netdev)) {
tx_dropped++;
-   tx_send_failed++;
-   ret = NETDEV_TX_OK;
-   goto out;
+   goto err_out;
}
if (skb_is_gso(skb))
tx_pool = >tso_pool[queue_num];
@@ -1584,10 +1575,8 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
 
if (index == IBMVNIC_INVALID_MAP) {
dev_kfree_skb_any(skb);
-   tx_send_failed++;
tx_dropped++;
-   ret = NETDEV_TX_OK;
-   goto out;
+   goto err_out;
}
 
tx_pool->free_map[tx_pool->consumer_index] = IBMVNIC_INVALID_MAP;
@@ -1707,12 +1696,9 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
netif_stop_subqueue(netdev, queue_num);
}
 
-   tx_packets++;
-   tx_bytes += skb->len;
txq->trans_start = jiffies;
-   ret = NETDEV_TX_OK;
-   goto out;
 
+   return ret;
 tx_flush_err:
dev_kfree_skb_any(skb);
tx_buff->skb = NULL;
@@ -1758,14 +1744,8 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, 
struct net_device *netdev)
netif_tx_stop_all_queues(netdev);
netif_carrier_off(netdev);
}
-out:
+err_out:
netdev->stats.tx_dropped += tx_dropped;
-   netdev->stats.tx_bytes += tx_bytes;
-   netdev->stats.tx_packets += tx_packets;
-   adapter->tx_send_failed += tx_send_failed;
-   adapter->tx_map_failed += tx_map_failed;
-   adapter->tx_stats_buffers[queue_num].packets += tx_packets;
-   adapter->tx_stats_buffers[queue_num].bytes += tx_bytes;
adapter->tx_stats_buffers[queue_num].dropped_packets += tx_dropped;
 
return ret;
@@ -3147,6 +3127,7 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
int num_entries = 0;
int total_bytes = 0;
int num_packets = 0;
+   int tx_dropped = 0;
 
next = ibmvnic_next_scrq(adapter, scrq);
/* ensure that we are reading the correct queue entry */
@@ -3157,6 +3138,7 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
if (next->tx_comp.rcs[i]) {
dev_err(dev, "tx error %x\n",
next->tx_comp.rcs[i]);
+   tx_dropped++;
error = true;
}
index = be32_to_cpu(next->tx_comp.correlators[i]);
@@ -3200,6 +3182,12 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
netdev_dbg(adapter->netdev, "Started queue %d\n",
   scrq->pool_index);
}
+   adapter->netdev->stats.tx_packets += num_packets;
+   adapter->netdev->stats.tx_bytes += total_bytes;
+   adapter->netdev->stats.tx_dropped += tx_dropped;
+   adapter->tx_stats_buffers[scrq->pool_index].packets += 
num_packets;
+   adapter->tx_stats_buffers[scrq->pool_index].bytes += 
total_bytes;
+   adapter->tx_stats_buffers[scrq->pool_index].dropped_packets += 
tx_dropped;
}
 

[PATCH net-next 05/12] ibmvnic: Fix TX completion error handling

2020-11-12 Thread Thomas Falcon
When firmware reports that a transmission was not successful,
the driver is not correctly processing the completion.
It should be freeing the socket buffer and updating the
device queue's inflight frame count and BQL structures.
Do that now.

Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index 0f6aba760d65..c9437b2d1aa8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3153,10 +3153,12 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
/* ensure that we are reading the correct queue entry */
dma_rmb();
for (i = 0; i < next->tx_comp.num_comps; i++) {
+   bool error = false;
+
if (next->tx_comp.rcs[i]) {
dev_err(dev, "tx error %x\n",
next->tx_comp.rcs[i]);
-   continue;
+   error = true;
}
index = be32_to_cpu(next->tx_comp.correlators[i]);
if (index & IBMVNIC_TSO_POOL_MASK) {
@@ -3179,7 +3181,10 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter 
*adapter,
num_entries += txbuff->num_entries;
if (txbuff->skb) {
total_bytes += txbuff->skb->len;
-   dev_consume_skb_irq(txbuff->skb);
+   if (error)
+   dev_kfree_skb_irq(txbuff->skb);
+   else
+   dev_consume_skb_irq(txbuff->skb);
txbuff->skb = NULL;
} else {
netdev_warn(adapter->netdev,
-- 
2.26.2



[PATCH net-next 00/12] ibmvnic: Performance improvements and other updates

2020-11-12 Thread Thomas Falcon
First, memory barrier protection of device queue reads to ensure RX
and TX buffer completions are not missed. The subsequent three
patches utilize a hypervisor call allowing multiple TX and RX buffer
replenishment descriptors to be sent in one operation, which
significantly reduces hypervisor call overhead. The xmit_more and
Byte Queue Limits API's are leveraged to provide this support
for TX descriptors.

The next four patches fix TX completion error handling, remove
superfluous code and members in TX completion handling function
and TX buffer structure respectively, update ndo_start_xmit error
handling and improve accuracy of statistics tracking, and remove
unused routines.

Finally, patches to ensure that device queue memory
is cache-line aligned, resolving slowdowns observed in PCI traces,
as well as optimizatons to the driver's NAPI polling function and 
to RX buffer replenishment are provided by Dwip Banerjee.

This series provides significant performance improvements, allowing
the driver to fully utilize 100Gb NIC's.

Dwip N. Banerjee (4):
  ibmvnic: Ensure that device queue memory is cache-line aligned
  ibmvnic: Correctly re-enable interrupts in NAPI polling routine
  ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX
buffers
  ibmvnic: Do not replenish RX buffers after every polling loop

Thomas Falcon (8):
  ibmvnic: Ensure that subCRQ entry reads are ordered
  ibmvnic: Introduce indirect subordinate Command Response Queue buffer
  ibmvnic: Introduce batched RX buffer descriptor transmission
  ibmvnic: Introduce xmit_more support using batched subCRQ hcalls
  ibmvnic: Fix TX completion error handling
  ibmvnic: Clean up TX code and TX buffer data structure
  ibmvnic: Clean up TX error handling and statistics tracking
  ibmvnic: Remove send_subcrq function

 drivers/net/ethernet/ibm/ibmvnic.c | 390 -
 drivers/net/ethernet/ibm/ibmvnic.h |  30 +--
 2 files changed, 228 insertions(+), 192 deletions(-)

-- 
2.26.2



[PATCH net-next 08/12] ibmvnic: Remove send_subcrq function

2020-11-12 Thread Thomas Falcon
It is not longer used, so remove it.

Signed-off-by: Thomas Falcon 
---
 drivers/net/ethernet/ibm/ibmvnic.c | 34 --
 1 file changed, 34 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
b/drivers/net/ethernet/ibm/ibmvnic.c
index 2c24d4774457..b2ca34e94078 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -84,8 +84,6 @@ static int ibmvnic_reset_crq(struct ibmvnic_adapter *);
 static int ibmvnic_send_crq_init(struct ibmvnic_adapter *);
 static int ibmvnic_reenable_crq_queue(struct ibmvnic_adapter *);
 static int ibmvnic_send_crq(struct ibmvnic_adapter *, union ibmvnic_crq *);
-static int send_subcrq(struct ibmvnic_adapter *adapter, u64 remote_handle,
-  union sub_crq *sub_crq);
 static int send_subcrq_indirect(struct ibmvnic_adapter *, u64, u64, u64);
 static irqreturn_t ibmvnic_interrupt_rx(int irq, void *instance);
 static int enable_scrq_irq(struct ibmvnic_adapter *,
@@ -3579,38 +3577,6 @@ static void print_subcrq_error(struct device *dev, int 
rc, const char *func)
}
 }
 
-static int send_subcrq(struct ibmvnic_adapter *adapter, u64 remote_handle,
-  union sub_crq *sub_crq)
-{
-   unsigned int ua = adapter->vdev->unit_address;
-   struct device *dev = >vdev->dev;
-   u64 *u64_crq = (u64 *)sub_crq;
-   int rc;
-
-   netdev_dbg(adapter->netdev,
-  "Sending sCRQ %016lx: %016lx %016lx %016lx %016lx\n",
-  (unsigned long int)cpu_to_be64(remote_handle),
-  (unsigned long int)cpu_to_be64(u64_crq[0]),
-  (unsigned long int)cpu_to_be64(u64_crq[1]),
-  (unsigned long int)cpu_to_be64(u64_crq[2]),
-  (unsigned long int)cpu_to_be64(u64_crq[3]));
-
-   /* Make sure the hypervisor sees the complete request */
-   mb();
-
-   rc = plpar_hcall_norets(H_SEND_SUB_CRQ, ua,
-   cpu_to_be64(remote_handle),
-   cpu_to_be64(u64_crq[0]),
-   cpu_to_be64(u64_crq[1]),
-   cpu_to_be64(u64_crq[2]),
-   cpu_to_be64(u64_crq[3]));
-
-   if (rc)
-   print_subcrq_error(dev, rc, __func__);
-
-   return rc;
-}
-
 static int send_subcrq_indirect(struct ibmvnic_adapter *adapter,
u64 remote_handle, u64 ioba, u64 num_entries)
 {
-- 
2.26.2



[PATCH v3] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-12 Thread Laurentiu Tudor
From: Ionut-robert Aron 

Convert fsl,qoriq-mc to YAML in order to automate the verification
process of dts files. In addition, update MAINTAINERS accordingly
and, while at it, add some missing files.

Signed-off-by: Ionut-robert Aron 
[laurentiu.tu...@nxp.com: update MINTAINERS, updates & fixes in schema]
Signed-off-by: Laurentiu Tudor 
---
Changes in v3:
 - dropped duplicated "fsl,qoriq-mc-dpmac" schema and replaced with
   reference to it
 - fixed a dt_binding_check warning
Changes in v2:
 - fixed errors reported by yamllint
 - dropped multiple unnecessary quotes
 - used schema instead of text in description
 - added constraints on dpmac reg property

 .../devicetree/bindings/misc/fsl,qoriq-mc.txt | 196 --
 .../bindings/misc/fsl,qoriq-mc.yaml   | 187 +
 .../ethernet/freescale/dpaa2/overview.rst |   5 +-
 MAINTAINERS   |   4 +-
 4 files changed, 194 insertions(+), 198 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
 create mode 100644 Documentation/devicetree/bindings/misc/fsl,qoriq-mc.yaml

diff --git a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt 
b/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
deleted file mode 100644
index 7b486d4985dc..
--- a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
+++ /dev/null
@@ -1,196 +0,0 @@
-* Freescale Management Complex
-
-The Freescale Management Complex (fsl-mc) is a hardware resource
-manager that manages specialized hardware objects used in
-network-oriented packet processing applications. After the fsl-mc
-block is enabled, pools of hardware resources are available, such as
-queues, buffer pools, I/O interfaces. These resources are building
-blocks that can be used to create functional hardware objects/devices
-such as network interfaces, crypto accelerator instances, L2 switches,
-etc.
-
-For an overview of the DPAA2 architecture and fsl-mc bus see:
-Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst
-
-As described in the above overview, all DPAA2 objects in a DPRC share the
-same hardware "isolation context" and a 10-bit value called an ICID
-(isolation context id) is expressed by the hardware to identify
-the requester.
-
-The generic 'iommus' property is insufficient to describe the relationship
-between ICIDs and IOMMUs, so an iommu-map property is used to define
-the set of possible ICIDs under a root DPRC and how they map to
-an IOMMU.
-
-For generic IOMMU bindings, see
-Documentation/devicetree/bindings/iommu/iommu.txt.
-
-For arm-smmu binding, see:
-Documentation/devicetree/bindings/iommu/arm,smmu.yaml.
-
-The MSI writes are accompanied by sideband data which is derived from the ICID.
-The msi-map property is used to associate the devices with both the ITS
-controller and the sideband data which accompanies the writes.
-
-For generic MSI bindings, see
-Documentation/devicetree/bindings/interrupt-controller/msi.txt.
-
-For GICv3 and GIC ITS bindings, see:
-Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml.
-
-Required properties:
-
-- compatible
-Value type: 
-Definition: Must be "fsl,qoriq-mc".  A Freescale Management Complex
-compatible with this binding must have Block Revision
-Registers BRR1 and BRR2 at offset 0x0BF8 and 0x0BFC in
-the MC control register region.
-
-- reg
-Value type: 
-Definition: A standard property.  Specifies one or two regions
-defining the MC's registers:
-
-   -the first region is the command portal for the
-this machine and must always be present
-
-   -the second region is the MC control registers. This
-region may not be present in some scenarios, such
-as in the device tree presented to a virtual machine.
-
-- ranges
-Value type: 
-Definition: A standard property.  Defines the mapping between the child
-MC address space and the parent system address space.
-
-The MC address space is defined by 3 components:
- 
-
-Valid values for region type are
-   0x0 - MC portals
-   0x1 - QBMAN portals
-
-- #address-cells
-Value type: 
-Definition: Must be 3.  (see definition in 'ranges' property)
-
-- #size-cells
-Value type: 
-Definition: Must be 1.
-
-Sub-nodes:
-
-The fsl-mc node may optionally have dpmac sub-nodes that describe
-the relationship between the Ethernet MACs which belong to the MC
-and the Ethernet PHYs on the system board.
-
-The dpmac nodes must be under a node named "dpmacs" which contains
-the following properties:
-
-- #address-cells
-  

Re: [PATCH 00/25] Rid W=1 warnings in SoC

2020-11-12 Thread Heiko Stuebner
On Tue, 3 Nov 2020 15:28:13 +, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> Lee Jones (25):
>   soc: bcm: brcmstb: pm: pm-arm: Provide prototype for
> brcmstb_pm_s3_finish()
>   soc: qcom: qcom_aoss: Remove set but unused variable 'tlen'
>   soc: qcom: qcom_aoss: Add missing description for 'cooling_devs'
>   soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours
>   soc: rockchip: io-domain: Remove incorrect and incomplete comment
> header
>   soc: ti: knav_qmss_queue: Remove set but unchecked variable 'ret'
>   soc: ti: knav_qmss_queue: Fix a whole host of function documentation
> issues
>   soc: ti: knav_dma: Fix a kernel function doc formatting issue
>   soc: ti: pm33xx: Remove set but unused variable 'ret'
>   soc: ti: wkup_m3_ipc: Document 'm3_ipc' parameter throughout
>   soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'
>   soc: qcom: qcom-geni-se: Fix misnamed function parameter 'rx_rfr'
>   soc: tegra: fuse: speedo-tegra124: Remove some set but unused
> variables
>   soc: samsung: s3c-pm-check: Fix incorrectly named variable 'val'
>   soc: qcom: rpmh: Fix possible doc-rot in rpmh_write()'s header
>   soc: qcom: smem: Fix formatting and missing documentation issues
>   soc: qcom: smsm: Fix some kernel-doc formatting and naming problems
>   soc: qcom: wcnss_ctrl: Demote non-conformant struct header and fix
> function headers
>   soc: qcom: smp2p: Remove unused struct attribute provide another
>   soc: qcom: llcc-qcom: Fix expected kernel-doc formatting
>   soc: qcom: rpmhpd: Provide some missing struct member descriptions
>   soc: qcom: kryo-l2-accessors: Fix misnaming of 'val'
>   soc: ti: k3-ringacc: Provide documentation for 'k3_ring's 'state'
>   soc: tegra: fuse: speedo-tegra210: Remove a group of set but unused
> variables
>   soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'
> 
> [...]

Applied, thanks!

[1/1] soc: rockchip: io-domain: Remove incorrect and incomplete comment header
  commit: a6a3a24c129d229a0eb26b329ab617e2a04245dd

Best regards,
-- 
Heiko Stuebner 


Re: [patch V3 10/37] ARM: highmem: Switch to generic kmap atomic

2020-11-12 Thread Sebastian Andrzej Siewior
On 2020-11-12 09:10:34 [+0100], Marek Szyprowski wrote:
> I can do more tests to help fixing this issue. Just let me know what to do.

-> https://lkml.kernel.org/r/87y2j6n8mj@nanos.tec.linutronix.de

Sebastian


Re: [patch V3 10/37] ARM: highmem: Switch to generic kmap atomic

2020-11-12 Thread Thomas Gleixner
Marek,

On Thu, Nov 12 2020 at 09:10, Marek Szyprowski wrote:
> On 03.11.2020 10:27, Thomas Gleixner wrote:
>
> I can do more tests to help fixing this issue. Just let me know what to do.

Just sent out the fix before I saw your report.

 https://lore.kernel.org/r/87y2j6n8mj@nanos.tec.linutronix.de

Thanks,

tglx


[PATCH v2 4/4] tty: serial: pmac_zilog: Remove unused disposable variable 'garbage'

2020-11-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set but 
not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Jiri Slaby 
Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: linux-ser...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones 
---
 drivers/tty/serial/pmac_zilog.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/pmac_zilog.h b/drivers/tty/serial/pmac_zilog.h
index bb874e76810e0..fa85b0de5c2fd 100644
--- a/drivers/tty/serial/pmac_zilog.h
+++ b/drivers/tty/serial/pmac_zilog.h
@@ -362,10 +362,10 @@ static inline void zssync(struct uart_pmac_port *port)
 
 /* Misc macros */
 #define ZS_CLEARERR(port)(write_zsreg(port, 0, ERR_RES))
-#define ZS_CLEARFIFO(port)   do { volatile unsigned char garbage; \
-garbage = read_zsdata(port); \
-garbage = read_zsdata(port); \
-garbage = read_zsdata(port); \
+#define ZS_CLEARFIFO(port)   do {   \
+read_zsdata(port); \
+read_zsdata(port); \
+read_zsdata(port); \
} while(0)
 
 #define ZS_IS_CONS(UP) ((UP)->flags & PMACZILOG_FLAG_IS_CONS)
-- 
2.25.1



[PATCH v2 3/4] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location

2020-11-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for 
‘hvc_vio_init_early’ [-Wmissing-prototypes]
 385 | void __init hvc_vio_init_early(void)
 | ^~

Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones 
Acked-by: Michael Ellerman 
---
 arch/powerpc/include/asm/hvconsole.h | 3 +++
 arch/powerpc/platforms/pseries/pseries.h | 3 ---
 arch/powerpc/platforms/pseries/setup.c   | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/hvconsole.h 
b/arch/powerpc/include/asm/hvconsole.h
index 999ed5ac90531..ccb2034506f0f 100644
--- a/arch/powerpc/include/asm/hvconsole.h
+++ b/arch/powerpc/include/asm/hvconsole.h
@@ -24,5 +24,8 @@
 extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
 extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
 
+/* Provided by HVC VIO */
+void hvc_vio_init_early(void);
+
 #endif /* __KERNEL__ */
 #endif /* _PPC64_HVCONSOLE_H */
diff --git a/arch/powerpc/platforms/pseries/pseries.h 
b/arch/powerpc/platforms/pseries/pseries.h
index 13fa370a87e4e..7be5b054dfc36 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -43,9 +43,6 @@ extern void pSeries_final_fixup(void);
 /* Poweron flag used for enabling auto ups restart */
 extern unsigned long rtas_poweron_auto;
 
-/* Provided by HVC VIO */
-extern void hvc_vio_init_early(void);
-
 /* Dynamic logical Partitioning/Mobility */
 extern void dlpar_free_cc_nodes(struct device_node *);
 extern void dlpar_free_cc_property(struct property *);
diff --git a/arch/powerpc/platforms/pseries/setup.c 
b/arch/powerpc/platforms/pseries/setup.c
index 633c45ec406da..6999b83f06612 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "pseries.h"
 #include "../../../../drivers/pci/pci.h"
-- 
2.25.1



[PATCH v2 0/4] Rid W=1 issues from TTY

2020-11-12 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

v2:
 - Remove unused variable completely
 - Remove unnecessary 'extern' keyword

Lee Jones (4):
  tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  tty: serial: 8250: 8250_port: Move prototypes to shared location
  powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to
shared location
  tty: serial: pmac_zilog: Remove unused disposable variable 'garbage'

 arch/powerpc/include/asm/hvconsole.h |  3 +++
 arch/powerpc/platforms/pseries/pseries.h |  3 ---
 arch/powerpc/platforms/pseries/setup.c   |  1 +
 drivers/tty/serial/8250/8250_early.c |  3 ---
 drivers/tty/serial/pmac_zilog.h  |  8 
 drivers/tty/tty_ldisc.c  | 10 +-
 include/linux/serial_8250.h  |  5 +
 7 files changed, 18 insertions(+), 15 deletions(-)

Cc: Benjamin Herrenschmidt 
Cc: Greg Kroah-Hartman 
Cc: Jiri Slaby 
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ser...@vger.kernel.org
Cc: Michael Ellerman 
Cc: Mike Hudson 
Cc: Paul Mackerras 
-- 
2.25.1



Re: [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr'

2020-11-12 Thread Lee Jones
On Tue, 03 Nov 2020, Lee Jones wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/soc/fsl/qe/qe_common.c:237: warning: Function parameter or member 
> 'addr' not described in 'cpm_muram_dma'
>  drivers/soc/fsl/qe/qe_common.c:237: warning: Excess function parameter 
> 'offset' description in 'cpm_muram_dma'
> 
> Cc: Qiang Zhao 
> Cc: Li Yang 
> Cc: Scott Wood 
> Cc: act 
> Cc: Dan Malek 
> Cc: "Software, Inc" 
> Cc: Vitaly Bordug 
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/soc/fsl/qe/qe_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
> index 75075591f6308..497a7e0fd0272 100644
> --- a/drivers/soc/fsl/qe/qe_common.c
> +++ b/drivers/soc/fsl/qe/qe_common.c
> @@ -231,7 +231,7 @@ EXPORT_SYMBOL(cpm_muram_offset);
>  
>  /**
>   * cpm_muram_dma - turn a muram virtual address into a DMA address
> - * @offset: virtual address from cpm_muram_addr() to convert
> + * @addr: virtual address from cpm_muram_addr() to convert
>   */
>  dma_addr_t cpm_muram_dma(void __iomem *addr)
>  {

Any idea who will pick this up?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v4 10/18] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-11-12 Thread Serge Semin
On Wed, Nov 11, 2020 at 02:14:23PM -0600, Rob Herring wrote:
> On Wed, Nov 11, 2020 at 12:08:45PM +0300, Serge Semin wrote:
> > DWC USB3 DT node is supposed to be compliant with the Generic xHCI
> > Controller schema, but with additional vendor-specific properties, the
> > controller-specific reference clocks and PHYs. So let's convert the
> > currently available legacy text-based DWC USB3 bindings to the DT schema
> > and make sure the DWC USB3 nodes are also validated against the
> > usb-xhci.yaml schema.
> > 
> > Note we have to discard the nodename restriction of being prefixed with
> > "dwc3@" string, since in accordance with the usb-hcd.yaml schema USB nodes
> > are supposed to be named as "^usb(@.*)".
> > 
> > Signed-off-by: Serge Semin 
> > 
> > ---
> > 
> > Changelog v2:
> > - Discard '|' from the descriptions, since we don't need to preserve
> >   the text formatting in any of them.
> > - Drop quotes from around the string constants.
> > - Fix the "clock-names" prop description to be referring the enumerated
> >   clock-names instead of the ones from the Databook.
> > 
> > Changelog v3:
> > - Apply usb-xhci.yaml# schema only if the controller is supposed to work
> >   as either host or otg.
> > 
> > Changelog v4:
> > - Apply usb-drd.yaml schema first. If the controller is configured
> >   to work in a gadget mode only, then apply the usb.yaml schema too,
> >   otherwise apply the usb-xhci.yaml schema.
> > - Discard the Rob'es Reviewed-by tag. Please review the patch one more
> >   time.
> > ---
> >  .../devicetree/bindings/usb/dwc3.txt  | 125 
> >  .../devicetree/bindings/usb/snps,dwc3.yaml| 303 ++
> >  2 files changed, 303 insertions(+), 125 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/usb/dwc3.txt
> >  create mode 100644 Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt 
> > b/Documentation/devicetree/bindings/usb/dwc3.txt
> > deleted file mode 100644
> > index d03edf9d3935..
> > --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> > +++ /dev/null
> > @@ -1,125 +0,0 @@
> > -synopsys DWC3 CORE
> > -
> > -DWC3- USB3 CONTROLLER. Complies to the generic USB binding properties
> > -  as described in 'usb/generic.txt'
> > -
> > -Required properties:
> > - - compatible: must be "snps,dwc3"
> > - - reg : Address and length of the register set for the device
> > - - interrupts: Interrupts used by the dwc3 controller.
> > - - clock-names: list of clock names. Ideally should be "ref",
> > -"bus_early", "suspend" but may be less or more.
> > - - clocks: list of phandle and clock specifier pairs corresponding to
> > -   entries in the clock-names property.
> > -
> > -Exception for clocks:
> > -  clocks are optional if the parent node (i.e. glue-layer) is compatible to
> > -  one of the following:
> > -"cavium,octeon-7130-usb-uctl"
> > -"qcom,dwc3"
> > -"samsung,exynos5250-dwusb3"
> > -"samsung,exynos5433-dwusb3"
> > -"samsung,exynos7-dwusb3"
> > -"sprd,sc9860-dwc3"
> > -"st,stih407-dwc3"
> > -"ti,am437x-dwc3"
> > -"ti,dwc3"
> > -"ti,keystone-dwc3"
> > -"rockchip,rk3399-dwc3"
> > -"xlnx,zynqmp-dwc3"
> > -
> > -Optional properties:
> > - - usb-phy : array of phandle for the PHY device.  The first element
> > -   in the array is expected to be a handle to the USB2/HS PHY and
> > -   the second element is expected to be a handle to the USB3/SS PHY
> > - - phys: from the *Generic PHY* bindings
> > - - phy-names: from the *Generic PHY* bindings; supported names are 
> > "usb2-phy"
> > -   or "usb3-phy".
> > - - resets: set of phandle and reset specifier pairs
> > - - snps,usb2-lpm-disable: indicate if we don't want to enable USB2 HW LPM
> > - - snps,usb3_lpm_capable: determines if platform is USB3 LPM capable
> > - - snps,dis-start-transfer-quirk: when set, disable isoc START TRANSFER 
> > command
> > -   failure SW work-around for DWC_usb31 version 1.70a-ea06
> > -   and prior.
> > - - snps,disable_scramble_quirk: true when SW should disable data 
> > scrambling.
> > -   Only really useful for FPGA builds.
> > - - snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum 
> > enabled
> > - - snps,lpm-nyet-threshold: LPM NYET threshold
> > - - snps,u2exit_lfps_quirk: set if we want to enable u2exit lfps quirk
> > - - snps,u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk
> > - - snps,req_p1p2p3_quirk: when set, the core will always request for
> > -   P1/P2/P3 transition sequence.
> > - - snps,del_p1p2p3_quirk: when set core will delay P1/P2/P3 until a certain
> > -   amount of 8B10B errors occur.
> > - - snps,del_phy_power_chg_quirk: when set core will delay PHY power change
> > -   from P0 to P1/P2/P3.
> > - - snps,lfps_filter_quirk: when set core will filter LFPS reception.
> > - - 

[PATCH 3/3] hwmon: ibmpowernv: Silence strncpy() warning

2020-11-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 from drivers/hwmon/ibmpowernv.c:11:
 In function ‘strncpy’,
 inlined from ‘get_sensor_index_attr’ at drivers/hwmon/ibmpowernv.c:243:2,
 inlined from ‘create_device_attrs’ at drivers/hwmon/ibmpowernv.c:280:8:
 include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 
equals destination size [-Wstringop-truncation]
 297 | #define __underlying_strncpy __builtin_strncpy
 | ^
 include/linux/string.h:307:9: note: in expansion of macro 
‘__underlying_strncpy’
 307 | return __underlying_strncpy(p, q, size);
 | ^~~~

Cc: Jean Delvare 
Cc: Guenter Roeck 
Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: Neelesh Gupta 
Cc: linux-hw...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones 
---
 drivers/hwmon/ibmpowernv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
index a750647e66a47..8e3724728cce0 100644
--- a/drivers/hwmon/ibmpowernv.c
+++ b/drivers/hwmon/ibmpowernv.c
@@ -240,7 +240,7 @@ static int get_sensor_index_attr(const char *name, u32 
*index, char *attr)
if (err)
return err;
 
-   strncpy(attr, dash_pos + 1, MAX_ATTR_LEN);
+   strscpy(attr, dash_pos + 1, MAX_ATTR_LEN);
 
return 0;
 }
-- 
2.25.1



[PATCH 0/3] Rid W=1 warnings from HWMON

2020-11-12 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (3):
  hwmon: adm1177: Fix kerneldoc attribute formatting
  hwmon: ina3221: Demote seemingly unintentional kerneldoc header
  hwmon: ibmpowernv: Silence strncpy() warning

 drivers/hwmon/adm1177.c| 10 +-
 drivers/hwmon/ibmpowernv.c |  2 +-
 drivers/hwmon/ina3221.c|  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

Cc: "Andrew F. Davis" 
Cc: Beniamin Bia 
Cc: Benjamin Herrenschmidt 
Cc: Guenter Roeck 
Cc: Jean Delvare 
Cc: linux-hw...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Michael Ellerman 
Cc: Michael Hennerich 
Cc: Neelesh Gupta 
Cc: Paul Mackerras 
-- 
2.25.1



Re: [PATCH 1/6] ibmvfc: byte swap login_buf.resp values in attribute show functions

2020-11-12 Thread Christoph Hellwig
On Wed, Nov 11, 2020 at 07:04:37PM -0600, Tyrel Datwyler wrote:
> Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve
> values from vhost->login_buf.resp buffer. This is the MAD response
> buffer from the VIOS and as such any multi-byte non-string values are in
> big endian format.
> 
> Byte swap these values to host cpu endian format for better human
> readability.

The whole series creates tons of pointlessly over 80 char lines.
Please do a quick fixup.


Re: [patch V3 10/37] ARM: highmem: Switch to generic kmap atomic

2020-11-12 Thread Marek Szyprowski
Hi Thomas,

On 03.11.2020 10:27, Thomas Gleixner wrote:
> No reason having the same code in every architecture.
>
> Signed-off-by: Thomas Gleixner 
> Cc: Russell King 
> Cc: Arnd Bergmann 
> Cc: linux-arm-ker...@lists.infradead.org

This patch landed in linux-next 20201109 as commit 2a15ba82fa6c ("ARM: 
highmem: Switch to generic kmap atomic"). However it causes a following 
warning on my test boards (Samsung Exynos SoC based):

Run /sbin/init as init process
INIT: version 2.88 booting
[ cut here ]
WARNING: CPU: 3 PID: 120 at mm/highmem.c:502 
kunmap_local_indexed+0x194/0x1d0
Modules linked in:
CPU: 3 PID: 120 Comm: init Not tainted 5.10.0-rc2-00010-g2a15ba82fa6c #1924
Hardware name: Samsung Exynos (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (dump_stack+0xb4/0xd4)
[] (dump_stack) from [] (__warn+0x98/0x104)
[] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8)
[] (warn_slowpath_fmt) from [] 
(kunmap_local_indexed+0x194/0x1d0)
[] (kunmap_local_indexed) from [] 
(remove_arg_zero+0xa0/0x158)
[] (remove_arg_zero) from [] (load_script+0x250/0x318)
[] (load_script) from [] (bprm_execve+0x3d0/0x930)
[] (bprm_execve) from [] 
(do_execveat_common+0x174/0x184)
[] (do_execveat_common) from [] (sys_execve+0x30/0x38)
[] (sys_execve) from [] (ret_fast_syscall+0x0/0x28)
Exception stack(0xc4561fa8 to 0xc4561ff0)
1fa0:   b6f2bab8 bef7dac4 bef7dac4 bef7d8fc 004b9b58 
bef7dac8
1fc0: b6f2bab8 bef7dac4 bef7d8fc 000b 004b8000 004bac44 bef7da3c 
bef7d8dc
1fe0: 002f bef7d89c b6d6dc74 b6d6d65c
irq event stamp: 1283
hardirqs last  enabled at (1293): [] console_unlock+0x430/0x6b0
hardirqs last disabled at (1302): [] console_unlock+0x428/0x6b0
softirqs last  enabled at (1282): [] __do_softirq+0x528/0x674
softirqs last disabled at (1269): [] irq_exit+0x1dc/0x1e8
---[ end trace 6f32a2fb4294655f ]---

I can do more tests to help fixing this issue. Just let me know what to do.

...

Best regards

-- 
Marek Szyprowski, PhD
Samsung R Institute Poland