<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/soc/fsl/dpio, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/soc/fsl/dpio?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/soc/fsl/dpio?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-02-09T13:15:35Z</updated>
<entry>
<title>soc: fsl: dpio: read the consumer index from the cache inhibited area</title>
<updated>2022-02-09T13:15:35Z</updated>
<author>
<name>Ioana Ciornei</name>
<email>ioana.ciornei@nxp.com</email>
</author>
<published>2022-02-09T09:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=86ec882f59a070e07d1e74c5b03340180ad90a1e'/>
<id>urn:sha1:86ec882f59a070e07d1e74c5b03340180ad90a1e</id>
<content type='text'>
Once we added support in the dpaa2-eth for driver level software TSO we
observed the following situation: if the EQCR CI (consumer index) is
read from the cache-enabled area we sometimes end up with a computed
value of available enqueue entries bigger than the size of the ring.

This eventually will lead to the multiple enqueue of the same FD which
will determine the same FD to end up on the Tx confirmation path and the
same skb being freed twice.

Just read the consumer index from the cache inhibited area so that we
avoid this situation.

Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bus: fsl-mc: fsl-mc-allocator: Rework MSI handling</title>
<updated>2021-12-16T21:16:41Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-10T22:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d86a6d47bcc6b41fe2a4e13313d66a772d00382f'/>
<id>urn:sha1:d86a6d47bcc6b41fe2a4e13313d66a772d00382f</id>
<content type='text'>
Storing a pointer to the MSI descriptor just to track the Linux interrupt
number is daft. Just store the interrupt number and be done with it.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211210221815.207838579@linutronix.de

</content>
</entry>
<entry>
<title>Merge tag 'arm-fixes-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc</title>
<updated>2021-11-10T19:25:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-11-10T19:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3f55f177edb88293bad08ebe217d3ce20cda427b'/>
<id>urn:sha1:3f55f177edb88293bad08ebe217d3ce20cda427b</id>
<content type='text'>
Pull ARM SoC fixes from Arnd Bergmann:
 "This is one set of fixes for the NXP/FSL DPAA2 drivers, addressing a
  few minor issues. I received these just after sending out the last
  v5.15 fixes, and nothing in here seemed urgent enough for a quick
  follow-up"

* tag 'arm-fixes-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read
  soc: fsl: dpio: use the combined functions to protect critical zone
  soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id
</content>
</entry>
<entry>
<title>Merge tag 'drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc</title>
<updated>2021-11-04T00:00:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-11-04T00:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d461e96cd22b5aeb1df448536b92e8d8e88c4a05'/>
<id>urn:sha1:d461e96cd22b5aeb1df448536b92e8d8e88c4a05</id>
<content type='text'>
Pull ARM SoC driver updates from Arnd Bergmann:
 "These are all the driver updates for SoC specific drivers. There are a
  couple of subsystems with individual maintainers picking up their
  patches here:

   - The reset controller subsystem add support for a few new SoC
     variants to existing drivers, along with other minor improvements

   - The OP-TEE subsystem gets a driver for the ARM FF-A transport

   - The memory controller subsystem has improvements for Tegra,
     Mediatek, Renesas, Freescale and Broadcom specific drivers.

   - The tegra cpuidle driver changes get merged through this tree this
     time. There are only minor changes, but they depend on other tegra
     driver updates here.

   - The ep93xx platform finally moves to using the drivers/clk/
     subsystem, moving the code out of arch/arm in the process. This
     depends on a small sound driver change that is included here as
     well.

   - There are some minor updates for Qualcomm and Tegra specific
     firmware drivers.

  The other driver updates are mainly for drivers/soc, which contains a
  mixture of vendor specific drivers that don't really fit elsewhere:

   - Mediatek drivers gain more support for MT8192, with new support for
     hw-mutex and mmsys routing, plus support for reset lines in the
     mmsys driver.

   - Qualcomm gains a new "sleep stats" driver, and support for the
     "Generic Packet Router" in the APR driver.

   - There is a new user interface for routing the UARTS on ASpeed BMCs,
     something that apparently nobody else has needed so far.

   - More drivers can now be built as loadable modules, in particular
     for Broadcom and Samsung platforms.

   - Lots of improvements to the TI sysc driver for better
     suspend/resume support"

  Finally, there are lots of minor cleanups and new device IDs for
  amlogic, renesas, tegra, qualcomm, mediateka, samsung, imx,
  layerscape, allwinner, broadcom, and omap"

* tag 'drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (179 commits)
  optee: Fix spelling mistake "reclain" -&gt; "reclaim"
  Revert "firmware: qcom: scm: Add support for MC boot address API"
  qcom: spm: allow compile-testing
  firmware: arm_ffa: Remove unused 'compat_version' variable
  soc: samsung: exynos-chipid: add exynosautov9 SoC support
  firmware: qcom: scm: Don't break compile test on non-ARM platforms
  soc: qcom: smp2p: Add of_node_put() before goto
  soc: qcom: apr: Add of_node_put() before return
  soc: qcom: qcom_stats: Fix client votes offset
  soc: qcom: rpmhpd: fix sm8350_mxc's peer domain
  dt-bindings: arm: cpus: Document qcom,msm8916-smp enable-method
  ARM: qcom: Add qcom,msm8916-smp enable-method identical to MSM8226
  firmware: qcom: scm: Add support for MC boot address API
  soc: qcom: spm: Add 8916 SPM register data
  dt-bindings: soc: qcom: spm: Document qcom,msm8916-saw2-v3.0-cpu
  soc: qcom: socinfo: Add PM8150C and SMB2351 models
  firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
  soc: aspeed: Add UART routing support
  soc: fsl: dpio: rename the enqueue descriptor variable
  soc: fsl: dpio: use an explicit NULL instead of 0
  ...
</content>
</entry>
<entry>
<title>soc: fsl: dpio: rename the enqueue descriptor variable</title>
<updated>2021-10-22T00:38:56Z</updated>
<author>
<name>Youri Querry</name>
<email>youri.querry_1@nxp.com</email>
</author>
<published>2021-04-21T13:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=54c8b5b6f8a868b9c21a7b0efe92ed2fbcc67080'/>
<id>urn:sha1:54c8b5b6f8a868b9c21a7b0efe92ed2fbcc67080</id>
<content type='text'>
The struct qbman_eq_desc 'd' variable declaration is covering one of the
function parameters. This has no functional impact since this function
parameter was not used after the new declaration.
Even so, rename the variable so that we make the code more readable.

Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue")
Signed-off-by: Youri Querry &lt;youri.querry_1@nxp.com&gt;
Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: Li Yang &lt;leoyang.li@nxp.com&gt;
</content>
</entry>
<entry>
<title>soc: fsl: dpio: use an explicit NULL instead of 0</title>
<updated>2021-10-22T00:38:49Z</updated>
<author>
<name>Ioana Ciornei</name>
<email>ioana.ciornei@nxp.com</email>
</author>
<published>2021-10-14T14:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a7ff7dcaf4d2dfbfd901e28ab0101ee9a1b8bf98'/>
<id>urn:sha1:a7ff7dcaf4d2dfbfd901e28ab0101ee9a1b8bf98</id>
<content type='text'>
Use an explicit NULL pointer when calling qbman_swp_enqueue_multiple()
instead of a plain integer. Without this fix, we get the following
compile time error.

drivers/soc/fsl/dpio/dpio-service.c:466:60: warning: Using plain integer as NULL pointer

Fixes: 9d98809711ae ("soc: fsl: dpio: Adding QMAN multiple enqueue interface")
Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: Li Yang &lt;leoyang.li@nxp.com&gt;
</content>
</entry>
<entry>
<title>soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()</title>
<updated>2021-10-20T13:21:31Z</updated>
<author>
<name>Tim Gardner</name>
<email>tim.gardner@canonical.com</email>
</author>
<published>2021-10-19T12:19:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=818a76a55d6e9e7ec7568ae580390e941da84b62'/>
<id>urn:sha1:818a76a55d6e9e7ec7568ae580390e941da84b62</id>
<content type='text'>
Coverity complains of unsigned compare against 0. There are 2 cases in
this function:

1821        itp = (irq_holdoff * 1000) / p-&gt;desc-&gt;qman_256_cycles_per_ns;

CID 121131 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)
unsigned_compare: This less-than-zero comparison of an unsigned value is never true. itp &lt; 0U.
1822        if (itp &lt; 0 || itp &gt; 4096) {
1823                max_holdoff = (p-&gt;desc-&gt;qman_256_cycles_per_ns * 4096) / 1000;
1824                pr_err("irq_holdoff must be between 0..%dus\n", max_holdoff);
1825                return -EINVAL;
1826        }
1827
    	unsigned_compare: This less-than-zero comparison of an unsigned value is never true. irq_threshold &lt; 0U.
1828        if (irq_threshold &gt;= p-&gt;dqrr.dqrr_size || irq_threshold &lt; 0) {
1829                pr_err("irq_threshold must be between 0..%d\n",
1830                       p-&gt;dqrr.dqrr_size - 1);
1831                return -EINVAL;
1832        }

Fix this by removing the comparisons altogether as they are incorrect. Zero is
a possible value in either case. Also fix a minor comment typo and update the
2 pr_err() calls to use %u formatting as well as be more precise regarding
the exact error.

Fixes: ed1d2143fee5 ("soc: fsl: dpio: add support for irq coalescing per software portal")
Cc: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Cc: Roy Pledge &lt;Roy.Pledge@nxp.com&gt;
Cc: Li Yang &lt;leoyang.li@nxp.com&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Tested-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Reviewed-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>soc: fsl: dpio: use the combined functions to protect critical zone</title>
<updated>2021-10-20T01:47:14Z</updated>
<author>
<name>Meng Li</name>
<email>Meng.Li@windriver.com</email>
</author>
<published>2021-10-19T03:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dc7e5940aad6641bd5ab33ea8b21c4b3904d989f'/>
<id>urn:sha1:dc7e5940aad6641bd5ab33ea8b21c4b3904d989f</id>
<content type='text'>
In orininal code, use 2 function spin_lock() and local_irq_save() to
protect the critical zone. But when enable the kernel debug config,
there are below inconsistent lock state detected.
================================
WARNING: inconsistent lock state
5.10.63-yocto-standard #1 Not tainted
--------------------------------
inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
lock_torture_wr/226 [HC0[0]:SC1[5]:HE1:SE0] takes:
ffff002005b2dd80 (&amp;p-&gt;access_spinlock){+.?.}-{3:3}, at: qbman_swp_enqueue_multiple_mem_back+0x44/0x270
{SOFTIRQ-ON-W} state was registered at:
  lock_acquire.part.0+0xf8/0x250
  lock_acquire+0x68/0x84
  _raw_spin_lock+0x68/0x90
  qbman_swp_enqueue_multiple_mem_back+0x44/0x270
  ......
  cryptomgr_test+0x38/0x60
  kthread+0x158/0x164
  ret_from_fork+0x10/0x38
irq event stamp: 4498
hardirqs last  enabled at (4498): [&lt;ffff800010fcf980&gt;] _raw_spin_unlock_irqrestore+0x90/0xb0
hardirqs last disabled at (4497): [&lt;ffff800010fcffc4&gt;] _raw_spin_lock_irqsave+0xd4/0xe0
softirqs last  enabled at (4458): [&lt;ffff8000100108c4&gt;] __do_softirq+0x674/0x724
softirqs last disabled at (4465): [&lt;ffff80001005b2a4&gt;] __irq_exit_rcu+0x190/0x19c

other info that might help us debug this:
 Possible unsafe locking scenario:
       CPU0
       ----
  lock(&amp;p-&gt;access_spinlock);
  &lt;Interrupt&gt;
    lock(&amp;p-&gt;access_spinlock);
 *** DEADLOCK ***

So, in order to avoid deadlock, use the combined functions
spin_lock_irqsave/spin_unlock_irqrestore() to protect critical zone.

Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue")
Cc: stable@vger.kernel.org
Signed-off-by: Meng Li &lt;Meng.Li@windriver.com&gt;
Signed-off-by: Li Yang &lt;leoyang.li@nxp.com&gt;
</content>
</entry>
<entry>
<title>soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id</title>
<updated>2021-10-20T01:35:17Z</updated>
<author>
<name>Meng Li</name>
<email>Meng.Li@windriver.com</email>
</author>
<published>2021-10-19T02:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e775eb9fc2a4107f03222fa48bc95c2c82427e64'/>
<id>urn:sha1:e775eb9fc2a4107f03222fa48bc95c2c82427e64</id>
<content type='text'>
When enable debug kernel configs,there will be calltrace as below:

BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
caller is debug_smp_processor_id+0x20/0x30
CPU: 6 PID: 1 Comm: swapper/0 Not tainted 5.10.63-yocto-standard #1
Hardware name: NXP Layerscape LX2160ARDB (DT)
Call trace:
 dump_backtrace+0x0/0x1a0
 show_stack+0x24/0x30
 dump_stack+0xf0/0x13c
 check_preemption_disabled+0x100/0x110
 debug_smp_processor_id+0x20/0x30
 dpaa2_io_query_fq_count+0xdc/0x154
 dpaa2_eth_stop+0x144/0x314
 __dev_close_many+0xdc/0x160
 __dev_change_flags+0xe8/0x220
 dev_change_flags+0x30/0x70
 ic_close_devs+0x50/0x78
 ip_auto_config+0xed0/0xf10
 do_one_initcall+0xac/0x460
 kernel_init_freeable+0x30c/0x378
 kernel_init+0x20/0x128
 ret_from_fork+0x10/0x38

Based on comment in the context, it doesn't matter whether
preemption is disable or not. So, replace smp_processor_id()
with raw_smp_processor_id() to avoid above call trace.

Fixes: c89105c9b390 ("staging: fsl-mc: Move DPIO from staging to drivers/soc/fsl")
Cc: stable@vger.kernel.org
Signed-off-by: Meng Li &lt;Meng.Li@windriver.com&gt;
Signed-off-by: Li Yang &lt;leoyang.li@nxp.com&gt;
</content>
</entry>
<entry>
<title>soc: fsl: dpio: add Net DIM integration</title>
<updated>2021-10-15T13:32:41Z</updated>
<author>
<name>Ioana Ciornei</name>
<email>ioana.ciornei@nxp.com</email>
</author>
<published>2021-10-15T09:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=69651bd8d303e0b4d160569de37d04512acd6b2f'/>
<id>urn:sha1:69651bd8d303e0b4d160569de37d04512acd6b2f</id>
<content type='text'>
Use the generic dynamic interrupt moderation (dim) framework to
implement adaptive interrupt coalescing on Rx. With the per-packet
interrupt scheme, a high interrupt rate has been noted for moderate
traffic flows leading to high CPU utilization.

The dpio driver exports new functions to enable/disable adaptive IRQ
coalescing on a DPIO object, to query the state or to update Net DIM
with a new set of bytes and frames dequeued.

Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
