diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-07-03 12:10:27 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-07-03 12:10:27 +0000 |
commit | 940e3165d31370871e66e0ae2cce13f010cb26ba (patch) | |
tree | 1fa8e6ab8b56e335b02a0047b95b7986629955b8 /sys/src/9 | |
parent | 548a48d1561dd77dbc082dddf0f9a2776ee91914 (diff) |
imx8: less stupid pci interrupt handler
Diffstat (limited to 'sys/src/9')
-rw-r--r-- | sys/src/9/imx8/pciimx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/9/imx8/pciimx.c b/sys/src/9/imx8/pciimx.c index a18b07c9b..fbfca1546 100644 --- a/sys/src/9/imx8/pciimx.c +++ b/sys/src/9/imx8/pciimx.c @@ -248,7 +248,7 @@ pciinterrupt(Ureg *ureg, void *arg) { Ctlr *ctlr = arg; Intvec *vec; - u32int status, mask; + u32int status; status = ctlr->dbi[MSI_CTRL_INT_0_STATUS]; if(status == 0) @@ -256,8 +256,8 @@ pciinterrupt(Ureg *ureg, void *arg) ctlr->dbi[MSI_CTRL_INT_0_STATUS] = status; ilock(ctlr); - for(vec = ctlr->vec, mask = 1; vec < &ctlr->vec[nelem(ctlr->vec)]; vec++, mask <<= 1){ - if((status & mask) != 0 && vec->f != nil) + for(vec = ctlr->vec; status != 0 && vec < &ctlr->vec[nelem(ctlr->vec)]; vec++, status >>= 1){ + if((status & 1) != 0 && vec->f != nil) (*vec->f)(ureg, vec->a); } iunlock(ctlr); |