mbox series

[kvm-unit-tests,v3,0/3] arm: Use gic_enable/disable_irq() macro to clean up code

Message ID 20230303031148.162816-1-shahuang@redhat.com (mailing list archive)
Headers show
Series arm: Use gic_enable/disable_irq() macro to clean up code | expand

Message

Shaoqin Huang March 3, 2023, 3:11 a.m. UTC
Some tests still use their own code to enable/disable irq, use
gic_enable/disable_irq() to clean up them.

The first patch fixes a problem which will disable all irq when use
gic_disable_irq().

The patch 2-3 clean up the code by using the macro.

Changelog:
----------
v3:
  - s/diretly/directly.
  - Refer Gic Spec to make comments more clear.
v2:
  - tweak the comments in patch 1. (Eric)
  - Reviewed by Eric.

Shaoqin Huang (3):
  arm: gic: Write one bit per time in gic_irq_set_clr_enable()
  arm64: timer: Use gic_enable/disable_irq() macro in timer test
  arm64: microbench: Use gic_enable_irq() macro in microbench test

 arm/micro-bench.c | 15 +--------------
 arm/timer.c       | 20 +++-----------------
 lib/arm/gic.c     |  4 +---
 3 files changed, 5 insertions(+), 34 deletions(-)

Comments

Zenghui Yu March 7, 2023, 1:44 p.m. UTC | #1
On 2023/3/3 11:11, Shaoqin Huang wrote:
> Some tests still use their own code to enable/disable irq, use
> gic_enable/disable_irq() to clean up them.
> 
> The first patch fixes a problem which will disable all irq when use
> gic_disable_irq().
> 
> The patch 2-3 clean up the code by using the macro.

Series,

Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>

and seems that gic_irq_unmask() in arm/pl031.c can also be replaced
by gic_enable_irq(pl031_irq).
Andrew Jones March 21, 2023, 3:41 p.m. UTC | #2
On Thu, 2 Mar 2023 22:11:44 -0500, Shaoqin Huang wrote:
> Some tests still use their own code to enable/disable irq, use
> gic_enable/disable_irq() to clean up them.
> 
> The first patch fixes a problem which will disable all irq when use
> gic_disable_irq().
> 
> The patch 2-3 clean up the code by using the macro.
> 
> [...]

Applied to arm/queue, thanks!

https://gitlab.com/jones-drew/kvm-unit-tests/-/commits/arm/queue

drew