Message ID | 20240503212139.5811-1-ansuelsmth@gmail.com |
---|---|
Headers | show |
Series | mips: bmips: improve handling of RAC and CBR addr | expand |
On 5/3/24 14:20, Christian Marangi wrote: > It was discovered that some device have CBR address set to 0 causing > kernel panic when arch_sync_dma_for_cpu_all is called. > > This was notice in situation where the system is booted from TP1 and > BMIPS_GET_CBR() returns 0 instead of a valid address and > !!(read_c0_brcm_cmt_local() & (1 << 31)); not failing. > > The current check whether RAC flush should be disabled or not are not > enough hence lets check if CBR is a valid address or not. > > Fixes: ab327f8acdf8 ("mips: bmips: BCM6358: disable RAC flush for TP1") > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
On 5/3/24 14:20, Christian Marangi wrote: > Rework the handling of the CBR address and cache it. This address > doesn't change and can be cached instead of reading the register every > time. > > This is in preparation of permitting to tweak the CBR address in DT with > broken SoC or bootloader. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
On 5/3/24 14:21, Christian Marangi wrote: > From: Daniel González Cabanelas <dgcbueu@gmail.com> > > The data RAC is left disabled by the bootloader in some SoCs, at least in > the core it boots from. > Enabling this feature increases the performance up to +30% depending on the > task. > > Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> > Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> > [ rework code and reduce code duplication ] > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>