| 54c8b5b6 | 21-Apr-2021 |
Youri Querry <[email protected]> |
soc: fsl: dpio: rename the enqueue descriptor variable
The struct qbman_eq_desc 'd' variable declaration is covering one of the function parameters. This has no functional impact since this function
soc: fsl: dpio: rename the enqueue descriptor variable
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 <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Li Yang <[email protected]>
show more ...
|
| dc7e5940 | 19-Oct-2021 |
Meng Li <[email protected]> |
soc: fsl: dpio: use the combined functions to protect critical zone
In orininal code, use 2 function spin_lock() and local_irq_save() to protect the critical zone. But when enable the kernel debug c
soc: fsl: dpio: use the combined functions to protect critical zone
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} -> {IN-SOFTIRQ-W} usage. lock_torture_wr/226 [HC0[0]:SC1[5]:HE1:SE0] takes: ffff002005b2dd80 (&p->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): [<ffff800010fcf980>] _raw_spin_unlock_irqrestore+0x90/0xb0 hardirqs last disabled at (4497): [<ffff800010fcffc4>] _raw_spin_lock_irqsave+0xd4/0xe0 softirqs last enabled at (4458): [<ffff8000100108c4>] __do_softirq+0x674/0x724 softirqs last disabled at (4465): [<ffff80001005b2a4>] __irq_exit_rcu+0x190/0x19c
other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&p->access_spinlock); <Interrupt> lock(&p->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: [email protected] Signed-off-by: Meng Li <[email protected]> Signed-off-by: Li Yang <[email protected]>
show more ...
|
| 69651bd8 | 15-Oct-2021 |
Ioana Ciornei <[email protected]> |
soc: fsl: dpio: add Net DIM integration
Use the generic dynamic interrupt moderation (dim) framework to implement adaptive interrupt coalescing on Rx. With the per-packet interrupt scheme, a high in
soc: fsl: dpio: add Net DIM integration
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| ed1d2143 | 15-Oct-2021 |
Ioana Ciornei <[email protected]> |
soc: fsl: dpio: add support for irq coalescing per software portal
In DPAA2 based SoCs, the IRQ coalesing support per software portal has 2 configurable parameters: - the IRQ timeout period (QBMAN_
soc: fsl: dpio: add support for irq coalescing per software portal
In DPAA2 based SoCs, the IRQ coalesing support per software portal has 2 configurable parameters: - the IRQ timeout period (QBMAN_CINH_SWP_ITPR): how many 256 QBMAN cycles need to pass until a dequeue interrupt is asserted. - the IRQ threshold (QBMAN_CINH_SWP_DQRR_ITR): how many dequeue responses in the DQRR ring would generate an IRQ.
Add support for setting up and querying these IRQ coalescing related parameters.
Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 5c4a5999 | 08-Apr-2020 |
Arnd Bergmann <[email protected]> |
soc: fsl: dpio: avoid stack usage warning
A 1024 byte variable on the stack will warn on any 32-bit architecture during compile-testing, and is generally a bad idea anyway:
fsl/dpio/dpio-service.c:
soc: fsl: dpio: avoid stack usage warning
A 1024 byte variable on the stack will warn on any 32-bit architecture during compile-testing, and is generally a bad idea anyway:
fsl/dpio/dpio-service.c: In function 'dpaa2_io_service_enqueue_multiple_desc_fq': fsl/dpio/dpio-service.c:495:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
There are currently no callers of this function, so I cannot tell whether dynamic memory allocation is allowed once callers are added. Change it to kcalloc for now, if anyone gets a warning about calling this in atomic context after they start using it, they can fix it later.
Link: https://lore.kernel.org/r/[email protected] Fixes: 9d98809711ae ("soc: fsl: dpio: Adding QMAN multiple enqueue interface") Signed-off-by: Arnd Bergmann <[email protected]>
show more ...
|
| 6a7f10c7 | 21-Feb-2020 |
Colin Ian King <[email protected]> |
soc: fsl: dpio: fix dereference of pointer p before null check
Pointer p is currently being dereferenced before it is null checked on a memory allocation failure check. Fix this by checking if p is
soc: fsl: dpio: fix dereference of pointer p before null check
Pointer p is currently being dereferenced before it is null checked on a memory allocation failure check. Fix this by checking if p is null before dereferencing it.
Addresses-Coverity: ("Dereference before null check") Fixes: 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Li Yang <[email protected]>
show more ...
|