| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * include/asm-parisc/cache.h | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __ARCH_PARISC_CACHE_H
 | 
					
						
							|  |  |  | #define __ARCH_PARISC_CACHE_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have | 
					
						
							|  |  |  |  * 32-byte cachelines.  The default configuration is not for SMP anyway, | 
					
						
							|  |  |  |  * so if you're building for SMP, you should select the appropriate | 
					
						
							|  |  |  |  * processor type.  There is a potential livelock danger when running | 
					
						
							|  |  |  |  * a machine with this value set too small, but it's more probable you'll | 
					
						
							|  |  |  |  * just ruin performance. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #ifdef CONFIG_PA20
 | 
					
						
							|  |  |  | #define L1_CACHE_BYTES 64
 | 
					
						
							|  |  |  | #define L1_CACHE_SHIFT 6
 | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  | #define L1_CACHE_BYTES 32
 | 
					
						
							|  |  |  | #define L1_CACHE_SHIFT 5
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __ASSEMBLY__
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define SMP_CACHE_BYTES L1_CACHE_BYTES
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-10 18:03:23 -07:00
										 |  |  | #define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-20 01:03:44 +01:00
										 |  |  | #define __read_mostly __attribute__((__section__(".data..read_mostly")))
 | 
					
						
							| 
									
										
										
										
											2006-03-23 03:00:16 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-12 05:51:54 -08:00
										 |  |  | void parisc_cache_init(void);	/* initializes cache-flushing */ | 
					
						
							|  |  |  | void disable_sr_hashing_asm(int); /* low level support for above */ | 
					
						
							|  |  |  | void disable_sr_hashing(void);   /* turns off space register hashing */ | 
					
						
							|  |  |  | void free_sid(unsigned long); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | unsigned long alloc_sid(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct seq_file; | 
					
						
							|  |  |  | extern void show_cache_info(struct seq_file *m); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern int split_tlb; | 
					
						
							|  |  |  | extern int dcache_stride; | 
					
						
							|  |  |  | extern int icache_stride; | 
					
						
							|  |  |  | extern struct pdc_cache_info cache_info; | 
					
						
							| 
									
										
										
										
											2006-12-12 05:51:54 -08:00
										 |  |  | void parisc_setup_cache_timing(void); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #define pdtlb(addr)         asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr));
 | 
					
						
							|  |  |  | #define pitlb(addr)         asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr));
 | 
					
						
							|  |  |  | #define pdtlb_kernel(addr)  asm volatile("pdtlb 0(%0)" : : "r" (addr));
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* ! __ASSEMBLY__ */
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Classes of processor wrt: disabling space register hashing */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define SRHASH_PCXST    0   /* pcxs, pcxt, pcxt_ */
 | 
					
						
							|  |  |  | #define SRHASH_PCXL     1   /* pcxl */
 | 
					
						
							|  |  |  | #define SRHASH_PA20     2   /* pcxu, pcxu_, pcxw, pcxw_ */
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |