On 10/17/24 5:36 PM, Tudor Ambarus wrote: > +static int exynos_acpm_chans_init(struct exynos_acpm *exynos_acpm) > +{ > + struct exynos_acpm_shmem_chan *shmem_chans, *shmem_chan; > + struct exynos_acpm_shmem *shmem = exynos_acpm->shmem; As Krzysztof has already noticed, I need to use the __iomem pointer token when referring to shmem structures. This could be caught with sparse as well, lesson learnt: drivers/firmware/samsung/exynos-acpm.c:493:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int * @@ The following changes will be needed for v3: --- a/drivers/firmware/samsung/exynos-acpm.c +++ b/drivers/firmware/samsung/exynos-acpm.c @@ -161,7 +161,7 @@ struct exynos_acpm_chan { * @num_chans: number of channels available for this controller. */ struct exynos_acpm { - struct exynos_acpm_shmem *shmem; + struct exynos_acpm_shmem __iomem *shmem; struct exynos_acpm_chan *chans; void __iomem *sram_base; void __iomem *regs; @@ -485,8 +485,8 @@ static void __iomem *exynos_acpm_get_iomem_addr(void __iomem *base, } static void exynos_acpm_rx_queue_init(struct exynos_acpm *exynos_acpm, - struct exynos_acpm_shmem_chan *shmem_chan, - struct exynos_acpm_queue *rx) + struct exynos_acpm_shmem_chan __iomem *shmem_chan, + struct exynos_acpm_queue *rx) { void __iomem *base = exynos_acpm->sram_base; @@ -496,8 +496,8 @@ static void exynos_acpm_rx_queue_init(struct exynos_acpm *exynos_acpm, } static void exynos_acpm_tx_queue_init(struct exynos_acpm *exynos_acpm, - struct exynos_acpm_shmem_chan *shmem_chan, - struct exynos_acpm_queue *tx) + struct exynos_acpm_shmem_chan __iomem *shmem_chan, + struct exynos_acpm_queue *tx) { void __iomem *base = exynos_acpm->sram_base; @@ -527,8 +527,8 @@ static int exynos_acpm_alloc_cmds(struct exynos_acpm *exynos_acpm, static int exynos_acpm_chans_init(struct exynos_acpm *exynos_acpm) { - struct exynos_acpm_shmem_chan *shmem_chans, *shmem_chan; - struct exynos_acpm_shmem *shmem = exynos_acpm->shmem; + struct exynos_acpm_shmem_chan __iomem *shmem_chans, *shmem_chan; + struct exynos_acpm_shmem __iomem *shmem = exynos_acpm->shmem; struct mbox_chan *mbox_chan, *mbox_chans; struct exynos_acpm_chan *chan, *chans; struct device *dev = exynos_acpm->dev;