linux/drivers/iommu/arm
Luis Claudio R. Goncalves 1f80621816 iommu/tegra241-cmdqv: do not use smp_processor_id in preemptible context
During boot some of the calls to tegra241_cmdqv_get_cmdq() will happen
in preemptible context. As this function calls smp_processor_id(), if
CONFIG_DEBUG_PREEMPT is enabled, these calls will trigger a series of
"BUG: using smp_processor_id() in preemptible" backtraces.

As tegra241_cmdqv_get_cmdq() only calls smp_processor_id() to use the
CPU number as a factor to balance out traffic on cmdq usage, it is safe
to use raw_smp_processor_id() here.

Cc: <stable@vger.kernel.org>
Fixes: 918eb5c856 ("iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV")
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Link: https://lore.kernel.org/r/Z1L1mja3nXzsJ0Pk@uudg.org
Signed-off-by: Will Deacon <will@kernel.org>
2024-12-09 23:38:30 +00:00
..
arm-smmu Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
arm-smmu-v3 iommu/tegra241-cmdqv: do not use smp_processor_id in preemptible context 2024-12-09 23:38:30 +00:00
Makefile iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory 2020-07-27 12:53:10 +01:00