https://github.com/torvalds/linux
Revision fbedd9b9905c1643b9f7244d88999e39632bbd87 authored by John Keeping on 05 April 2016, 14:05:46 UTC, committed by Joerg Roedel on 07 April 2016, 12:50:18 UTC
Since commit cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi
slaves") rk_iommu_is_stall_active() always returns false because the
bitwise AND operates on the boolean flag promoted to an integer and a
value that is either zero or BIT(2).

Explicitly convert the right-hand value to a boolean so that both sides
are guaranteed to be either zero or one.

rk_iommu_is_paging_enabled() does not suffer from the same problem since
RK_MMU_STATUS_PAGING_ENABLED is BIT(0), but let's apply the same change
for consistency and to make it clear that it's correct without needing
to lookup the value.

Fixes: cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves")
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent eebb803
History
Tip revision: fbedd9b9905c1643b9f7244d88999e39632bbd87 authored by John Keeping on 05 April 2016, 14:05:46 UTC
iommu/rockchip: Fix "is stall active" check
Tip revision: fbedd9b
File Mode Size
Kconfig -rw-r--r-- 9.6 KB
Makefile -rw-r--r-- 702 bytes
acorn.c -rw-r--r-- 12.3 KB
acorn.h -rw-r--r-- 488 bytes
aix.c -rw-r--r-- 6.2 KB
aix.h -rw-r--r-- 59 bytes
amiga.c -rw-r--r-- 3.7 KB
amiga.h -rw-r--r-- 89 bytes
atari.c -rw-r--r-- 3.9 KB
atari.h -rw-r--r-- 1.0 KB
check.c -rw-r--r-- 4.2 KB
check.h -rw-r--r-- 1.1 KB
cmdline.c -rw-r--r-- 2.2 KB
cmdline.h -rw-r--r-- 57 bytes
efi.c -rw-r--r-- 22.7 KB
efi.h -rw-r--r-- 4.4 KB
ibm.c -rw-r--r-- 9.3 KB
ibm.h -rw-r--r-- 47 bytes
karma.c -rw-r--r-- 1.1 KB
karma.h -rw-r--r-- 124 bytes
ldm.c -rw-r--r-- 44.1 KB
ldm.h -rw-r--r-- 5.4 KB
mac.c -rw-r--r-- 3.5 KB
mac.h -rw-r--r-- 1.2 KB
msdos.c -rw-r--r-- 15.8 KB
msdos.h -rw-r--r-- 124 bytes
osf.c -rw-r--r-- 1.9 KB
osf.h -rw-r--r-- 123 bytes
sgi.c -rw-r--r-- 2.2 KB
sgi.h -rw-r--r-- 128 bytes
sun.c -rw-r--r-- 3.7 KB
sun.h -rw-r--r-- 169 bytes
sysv68.c -rw-r--r-- 1.9 KB
sysv68.h -rw-r--r-- 62 bytes
ultrix.c -rw-r--r-- 1.2 KB
ultrix.h -rw-r--r-- 90 bytes

back to top