--- zzzz-none-000/linux-4.19.183/arch/arm/include/asm/outercache.h 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/arch/arm/include/asm/outercache.h 2023-06-28 08:54:18.000000000 +0000 @@ -39,6 +39,13 @@ /* This is an ARM L2C thing */ void (*write_sec)(unsigned long, unsigned); void (*configure)(const struct l2x0_regs *); +#if defined(CONFIG_BCM_KF_L2CACHE_OPTIMIZATION) + unsigned long (*spin_lock_irqsave)(void); + void (*spin_unlock_irqrestore)(unsigned long flags); + void (*sync_no_lock)(void); + void (*flush_line_no_lock)(unsigned long); + void (*inv_line_no_lock)(unsigned long); +#endif }; extern struct outer_cache_fns outer_cache; @@ -114,6 +121,32 @@ if (outer_cache.resume) outer_cache.resume(); } +#if defined(CONFIG_BCM_KF_L2CACHE_OPTIMIZATION) +static inline unsigned long outer_spin_lock_irqsave(void) +{ + return outer_cache.spin_lock_irqsave(); +} + +static inline void outer_spin_unlock_irqrestore(unsigned long flags) +{ + outer_cache.spin_unlock_irqrestore(flags); +} + +static inline void outer_sync_no_lock(void) +{ + outer_cache.sync_no_lock(); +} + +static inline void outer_flush_line_no_lock(phys_addr_t addr) +{ + outer_cache.flush_line_no_lock(addr); +} + +static inline void outer_inv_line_no_lock(phys_addr_t addr) +{ + outer_cache.inv_line_no_lock(addr); +} +#endif #else