~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/parisc/include/asm/cache.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * include/asm-parisc/cache.h
  4  */
  5 
  6 #ifndef __ARCH_PARISC_CACHE_H
  7 #define __ARCH_PARISC_CACHE_H
  8 
  9 #include <asm/alternative.h>
 10 
 11 /*
 12  * PA 2.0 processors have 64 and 128-byte L2 cachelines; PA 1.1 processors
 13  * have 32-byte cachelines.  The L1 length appears to be 16 bytes but this
 14  * is not clearly documented.
 15  */
 16 #define L1_CACHE_BYTES 16
 17 #define L1_CACHE_SHIFT 4
 18 
 19 #ifndef __ASSEMBLY__
 20 
 21 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 22 
 23 #ifdef CONFIG_PA20
 24 #define ARCH_DMA_MINALIGN       128
 25 #else
 26 #define ARCH_DMA_MINALIGN       32
 27 #endif
 28 #define ARCH_KMALLOC_MINALIGN   16      /* ldcw requires 16-byte alignment */
 29 
 30 #define arch_slab_minalign()    ((unsigned)dcache_stride)
 31 #define cache_line_size()       dcache_stride
 32 #define dma_get_cache_alignment cache_line_size
 33 
 34 #define __read_mostly __section(".data..read_mostly")
 35 
 36 void parisc_cache_init(void);   /* initializes cache-flushing */
 37 void disable_sr_hashing_asm(int); /* low level support for above */
 38 void disable_sr_hashing(void);   /* turns off space register hashing */
 39 void free_sid(unsigned long);
 40 unsigned long alloc_sid(void);
 41 
 42 struct seq_file;
 43 extern void show_cache_info(struct seq_file *m);
 44 
 45 extern int split_tlb;
 46 extern int dcache_stride;
 47 extern int icache_stride;
 48 extern struct pdc_cache_info cache_info;
 49 extern struct pdc_btlb_info btlb_info;
 50 void parisc_setup_cache_timing(void);
 51 
 52 #define pdtlb(sr, addr) asm volatile("pdtlb 0(%%sr%0,%1)" \
 53                         ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
 54                         : : "i"(sr), "r" (addr) : "memory")
 55 #define pitlb(sr, addr) asm volatile("pitlb 0(%%sr%0,%1)" \
 56                         ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
 57                         ALTERNATIVE(ALT_COND_NO_SPLIT_TLB, INSN_NOP) \
 58                         : : "i"(sr), "r" (addr) : "memory")
 59 
 60 #define asm_io_fdc(addr) asm volatile("fdc %%r0(%0)" \
 61                         ALTERNATIVE(ALT_COND_NO_DCACHE, INSN_NOP) \
 62                         ALTERNATIVE(ALT_COND_NO_IOC_FDC, INSN_NOP) \
 63                         : : "r" (addr) : "memory")
 64 #define asm_io_sync()   asm volatile("sync" \
 65                         ALTERNATIVE(ALT_COND_NO_DCACHE, INSN_NOP) \
 66                         ALTERNATIVE(ALT_COND_NO_IOC_FDC, INSN_NOP) :::"memory")
 67 #define asm_syncdma()   asm volatile("syncdma" :::"memory")
 68 
 69 #endif /* ! __ASSEMBLY__ */
 70 
 71 /* Classes of processor wrt: disabling space register hashing */
 72 
 73 #define SRHASH_PCXST    0   /* pcxs, pcxt, pcxt_ */
 74 #define SRHASH_PCXL     1   /* pcxl */
 75 #define SRHASH_PA20     2   /* pcxu, pcxu_, pcxw, pcxw_ */
 76 
 77 #endif
 78 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php