Merge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Kill off stray HAVE_FTRACE_SYSCALLS reference.
sh: Remove BKL from landisk gio.
sh: disabled cache handling fix.
sh: Fix up single page flushing to use PAGE_SIZE.

+24 -19
-1
arch/sh/Kconfig
··· 37 37 select HAVE_FTRACE_MCOUNT_RECORD 38 38 select HAVE_DYNAMIC_FTRACE 39 39 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 40 - select HAVE_FTRACE_SYSCALLS 41 40 select HAVE_FUNCTION_GRAPH_TRACER 42 41 select HAVE_ARCH_KGDB 43 42 select ARCH_HIBERNATION_POSSIBLE if MMU
+4 -6
arch/sh/boards/mach-landisk/gio.c
··· 14 14 */ 15 15 #include <linux/module.h> 16 16 #include <linux/init.h> 17 - #include <linux/smp_lock.h> 18 17 #include <linux/kdev_t.h> 19 18 #include <linux/cdev.h> 20 19 #include <linux/fs.h> ··· 34 35 int minor; 35 36 int ret = -ENOENT; 36 37 37 - lock_kernel(); 38 + preempt_disable(); 38 39 minor = MINOR(inode->i_rdev); 39 40 if (minor < DEVCOUNT) { 40 41 if (openCnt > 0) { ··· 44 45 ret = 0; 45 46 } 46 47 } 47 - unlock_kernel(); 48 + preempt_enable(); 48 49 return ret; 49 50 } 50 51 ··· 59 60 return 0; 60 61 } 61 62 62 - static int gio_ioctl(struct inode *inode, struct file *filp, 63 - unsigned int cmd, unsigned long arg) 63 + static long gio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 64 64 { 65 65 unsigned int data; 66 66 static unsigned int addr = 0; ··· 127 129 .owner = THIS_MODULE, 128 130 .open = gio_open, /* open */ 129 131 .release = gio_close, /* release */ 130 - .ioctl = gio_ioctl, /* ioctl */ 132 + .unlocked_ioctl = gio_ioctl, 131 133 }; 132 134 133 135 static int __init gio_init(void)
+10 -12
arch/sh/mm/cache-sh4.c
··· 26 26 #define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */ 27 27 #define MAX_ICACHE_PAGES 32 28 28 29 - static void __flush_cache_4096(unsigned long addr, unsigned long phys, 29 + static void __flush_cache_one(unsigned long addr, unsigned long phys, 30 30 unsigned long exec_offset); 31 31 32 32 /* ··· 89 89 local_irq_restore(flags); 90 90 } 91 91 92 - static inline void flush_cache_4096(unsigned long start, 93 - unsigned long phys) 92 + static inline void flush_cache_one(unsigned long start, unsigned long phys) 94 93 { 95 94 unsigned long flags, exec_offset = 0; 96 95 ··· 102 103 exec_offset = 0x20000000; 103 104 104 105 local_irq_save(flags); 105 - __flush_cache_4096(start | SH_CACHE_ASSOC, 106 - P1SEGADDR(phys), exec_offset); 106 + __flush_cache_one(start | SH_CACHE_ASSOC, P1SEGADDR(phys), exec_offset); 107 107 local_irq_restore(flags); 108 108 } 109 109 ··· 127 129 128 130 /* Loop all the D-cache */ 129 131 n = boot_cpu_data.dcache.n_aliases; 130 - for (i = 0; i < n; i++, addr += 4096) 131 - flush_cache_4096(addr, phys); 132 + for (i = 0; i < n; i++, addr += PAGE_SIZE) 133 + flush_cache_one(addr, phys); 132 134 } 133 135 134 136 wmb(); ··· 316 318 /* We only need to flush D-cache when we have alias */ 317 319 if ((address^phys) & alias_mask) { 318 320 /* Loop 4K of the D-cache */ 319 - flush_cache_4096( 321 + flush_cache_one( 320 322 CACHE_OC_ADDRESS_ARRAY | (address & alias_mask), 321 323 phys); 322 324 /* Loop another 4K of the D-cache */ 323 - flush_cache_4096( 325 + flush_cache_one( 324 326 CACHE_OC_ADDRESS_ARRAY | (phys & alias_mask), 325 327 phys); 326 328 } ··· 335 337 * kernel has never executed the code through its identity 336 338 * translation. 337 339 */ 338 - flush_cache_4096( 340 + flush_cache_one( 339 341 CACHE_IC_ADDRESS_ARRAY | (address & alias_mask), 340 342 phys); 341 343 } ··· 391 393 } 392 394 393 395 /** 394 - * __flush_cache_4096 396 + * __flush_cache_one 395 397 * 396 398 * @addr: address in memory mapped cache array 397 399 * @phys: P1 address to flush (has to match tags if addr has 'A' bit ··· 404 406 * operation (purge/write-back) is selected by the lower 2 bits of 405 407 * 'phys'. 406 408 */ 407 - static void __flush_cache_4096(unsigned long addr, unsigned long phys, 409 + static void __flush_cache_one(unsigned long addr, unsigned long phys, 408 410 unsigned long exec_offset) 409 411 { 410 412 int way_count;
+10
arch/sh/mm/cache.c
··· 265 265 266 266 void __init cpu_cache_init(void) 267 267 { 268 + unsigned int cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE); 269 + 268 270 compute_alias(&boot_cpu_data.icache); 269 271 compute_alias(&boot_cpu_data.dcache); 270 272 compute_alias(&boot_cpu_data.scache); ··· 274 272 __flush_wback_region = noop__flush_region; 275 273 __flush_purge_region = noop__flush_region; 276 274 __flush_invalidate_region = noop__flush_region; 275 + 276 + /* 277 + * No flushing is necessary in the disabled cache case so we can 278 + * just keep the noop functions in local_flush_..() and __flush_..() 279 + */ 280 + if (unlikely(cache_disabled)) 281 + goto skip; 277 282 278 283 if (boot_cpu_data.family == CPU_FAMILY_SH2) { 279 284 extern void __weak sh2_cache_init(void); ··· 321 312 sh5_cache_init(); 322 313 } 323 314 315 + skip: 324 316 emit_cache_params(); 325 317 }