1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2e839ca52SDavid Howells #ifndef __ASM_SH_CACHE_INSNS_32_H 3e839ca52SDavid Howells #define __ASM_SH_CACHE_INSNS_32_H 4e839ca52SDavid Howells 5e839ca52SDavid Howells #include <linux/types.h> 6e839ca52SDavid Howells 7e839ca52SDavid Howells #if defined(CONFIG_CPU_SH4A) 8e839ca52SDavid Howells #define __icbi(addr) __asm__ __volatile__ ( "icbi @%0\n\t" : : "r" (addr)) 9e839ca52SDavid Howells #else 10e839ca52SDavid Howells #define __icbi(addr) mb() 11e839ca52SDavid Howells #endif 12e839ca52SDavid Howells 13e839ca52SDavid Howells #define __ocbp(addr) __asm__ __volatile__ ( "ocbp @%0\n\t" : : "r" (addr)) 14e839ca52SDavid Howells #define __ocbi(addr) __asm__ __volatile__ ( "ocbi @%0\n\t" : : "r" (addr)) 15e839ca52SDavid Howells #define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb @%0\n\t" : : "r" (addr)) 16e839ca52SDavid Howells register_align(void * val)17e839ca52SDavid Howellsstatic inline reg_size_t register_align(void *val) 18e839ca52SDavid Howells { 19e839ca52SDavid Howells return (unsigned long)(signed long)val; 20e839ca52SDavid Howells } 21e839ca52SDavid Howells 22e839ca52SDavid Howells #endif /* __ASM_SH_CACHE_INSNS_32_H */ 23