]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Fix bitshift/mask multipliers
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 2 Aug 2017 09:55:05 +0000 (12:55 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 17 Aug 2017 15:57:06 +0000 (17:57 +0200)
commitba80ad7bc8c0665b2c149040f80dcd74f4d8850c
treefe8175fd876a5b689efb2aca83e3446daceea077
parent3db5b47a335c03da481b508813b51caf9a02fefc
gpu: host1x: Fix bitshift/mask multipliers

Some parts of Host1x uses BIT_WORD/BIT_MASK/BITS_PER_LONG to calculate
register or field offsets. This worked fine on ARMv7, but now that
BITS_PER_LONG is 64 but our registers are still 32-bit things are
broken.

Fix by replacing..
- BIT_WORD with (x / 32)
- BIT_MASK with BIT(x % 32)
- BITS_PER_LONG with 32

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/hw/intr_hw.c
drivers/gpu/host1x/hw/syncpt_hw.c