From b5f2d739e1f1fcfd3b9277cd43afad024bd7eca9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 5 Nov 2007 07:47:12 +0900 Subject: sh: remove PTRACE_O_TRACESYSGOOD from asm/ptrace.h The common linux/ptrace.h already defines PTRACE_O_TRACESYSGOOD so there is no need to have arches do it. This also keeps glibc-2.7 from breaking since it has an enum for the PTRACE_O_* flags. Signed-off-by: Mike Frysinger Signed-off-by: Paul Mundt --- include/asm-sh/ptrace.h | 3 --- include/asm-sh64/ptrace.h | 2 -- 2 files changed, 5 deletions(-) (limited to 'include') diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index ed358a376e6..b9789c8b4d1 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h @@ -42,9 +42,6 @@ #define REG_FPSCR 55 #define REG_FPUL 56 -/* options set using PTRACE_SETOPTIONS */ -#define PTRACE_O_TRACESYSGOOD 0x00000001 - /* * This struct defines the way the registers are stored on the * kernel stack during a system call or other kernel entry. diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h index a6d4da519db..c424f80e3ae 100644 --- a/include/asm-sh64/ptrace.h +++ b/include/asm-sh64/ptrace.h @@ -32,6 +32,4 @@ struct pt_regs { extern void show_regs(struct pt_regs *); #endif -#define PTRACE_O_TRACESYSGOOD 0x00000001 - #endif /* __ASM_SH64_PTRACE_H */ -- cgit v1.2.3 From f96691872439ab2071171d4531c4a95b5d493ae5 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 7 Nov 2007 11:05:32 +0900 Subject: sh: Kill off the remaining ST40 cruft. The ST40 stuff in-tree hasn't built for some time, and hasn't been updated for over 3 years. ST maintains their own out-of-tree changes and rebases occasionally, and that's ultimately where all of the ST40 users go anyways. In order for the ST40 code to be brought up to date most of the stuff removed in this changeset would have to be rewritten anyways, so there's very little benefit in keeping the remnants around either. Signed-off-by: Paul Mundt --- include/asm-sh/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index ab0028db645..fda68480f37 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h @@ -49,7 +49,7 @@ enum cpu_type { /* SH-4 types */ CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, - CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, + CPU_SH7760, CPU_SH4_202, CPU_SH4_501, /* SH-4A types */ CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, -- cgit v1.2.3 From 7747b9a493a197cb4db44c98d25ce6d3d9f586d1 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 5 Nov 2007 16:12:32 +0900 Subject: sh: Wire up clear_user_highpage(). With the kmap_coherent() API in place, this is trivial to implement, and lets us avoid the cache flush in certain cases. Signed-off-by: Paul Mundt --- include/asm-sh/page.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 3aa8b07da47..5e69de1eacd 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -73,10 +73,16 @@ extern void copy_page_nommu(void *to, void *from); #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) struct page; +struct vm_area_struct; extern void clear_user_page(void *to, unsigned long address, struct page *pg); extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); extern void __clear_user_page(void *to, void *orig_to); extern void __copy_user_page(void *to, void *from, void *orig_to); +#ifdef CONFIG_CPU_SH4 +extern void copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +#define __HAVE_ARCH_COPY_USER_HIGHPAGE +#endif #else #define clear_user_page(page, vaddr, pg) clear_page(page) #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) -- cgit v1.2.3 From ba1789efea81acc6633f427bfeb871fd608965b5 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 5 Nov 2007 16:18:16 +0900 Subject: sh: Optimized copy_{to,from}_user_page() for SH-4. This moves copy_{to,from}_user_page() out-of-line on SH-4 and converts for the kmap_coherent() API. Based on the MIPS implementation. Signed-off-by: Paul Mundt --- include/asm-sh/cacheflush.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index aa558da0847..b91246153b7 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h @@ -43,21 +43,31 @@ extern void __flush_purge_region(void *start, int size); extern void __flush_invalidate_region(void *start, int size); #endif -#define flush_cache_vmap(start, end) flush_cache_all() -#define flush_cache_vunmap(start, end) flush_cache_all() +#ifdef CONFIG_CPU_SH4 +extern void copy_to_user_page(struct vm_area_struct *vma, + struct page *page, unsigned long vaddr, void *dst, const void *src, + unsigned long len); -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +extern void copy_from_user_page(struct vm_area_struct *vma, + struct page *page, unsigned long vaddr, void *dst, const void *src, + unsigned long len); +#else +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ flush_icache_user_range(vma, page, vaddr, len); \ } while (0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ do { \ flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ } while (0) +#endif + +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() #define HAVE_ARCH_UNMAPPED_AREA -- cgit v1.2.3 From af39c16bd843ee8bde495c8ccb95a5ca209f3051 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 5 Nov 2007 16:20:42 +0900 Subject: sh: Kill off __{copy,clear}_user_page(). Now that copy_to_user_page()/copy_from_user_page() are wired up, we can drop the old __copy_xxx() implementations. Now that the page colouring scheme has changed via kmap_coherent(), we can avoid the flush in these specific helpers. Signed-off-by: Paul Mundt --- include/asm-sh/page.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 5e69de1eacd..d00a8fde7c7 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -74,10 +74,7 @@ extern void copy_page_nommu(void *to, void *from); (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) struct page; struct vm_area_struct; -extern void clear_user_page(void *to, unsigned long address, struct page *pg); -extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); -extern void __clear_user_page(void *to, void *orig_to); -extern void __copy_user_page(void *to, void *from, void *orig_to); +extern void clear_user_page(void *to, unsigned long address, struct page *page); #ifdef CONFIG_CPU_SH4 extern void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr, struct vm_area_struct *vma); -- cgit v1.2.3 From ac11584ccbd14aadcc6613598f3bac4589ea3a11 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 7 Nov 2007 11:40:24 +0900 Subject: sh: Fix up PAGE_KERNEL_PCC() for nommu. PAGE_KERNEL_PCC() takes two arguments, which weren't reflected in the nommu case. Fix it up. Signed-off-by: Paul Mundt --- include/asm-sh/pgtable.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 0b1d7c66565..8f1e8be8d15 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -322,7 +322,9 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; #define PAGE_KERNEL __pgprot(0) #define PAGE_KERNEL_NOCACHE __pgprot(0) #define PAGE_KERNEL_RO __pgprot(0) -#define PAGE_KERNEL_PCC __pgprot(0) + +#define PAGE_KERNEL_PCC(slot, type) \ + __pgprot(0) #endif #endif /* __ASSEMBLY__ */ -- cgit v1.2.3 From cbeb13447f015d90367c9f72fbf87227f3e186c8 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 7 Nov 2007 20:19:30 +0900 Subject: sh: Add a dummy vga.h. We have nothing to do here, but there are continually drivers that fail to build without it. Stub it in. Signed-off-by: Paul Mundt --- include/asm-sh/vga.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 include/asm-sh/vga.h (limited to 'include') diff --git a/include/asm-sh/vga.h b/include/asm-sh/vga.h new file mode 100644 index 00000000000..06a5de8ace1 --- /dev/null +++ b/include/asm-sh/vga.h @@ -0,0 +1,6 @@ +#ifndef __ASM_SH_VGA_H +#define __ASM_SH_VGA_H + +/* Stupid drivers. */ + +#endif /* __ASM_SH_VGA_H */ -- cgit v1.2.3 From 3d9144c222ee52c924a96781163f5d6f6b93858a Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Fri, 9 Nov 2007 04:45:29 +0900 Subject: sh: remove dead config symbols from SH code Signed-off-by: Jiri Olsa Signed-off-by: Paul Mundt --- include/asm-sh/cpu-sh3/timer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-sh/cpu-sh3/timer.h b/include/asm-sh/cpu-sh3/timer.h index 3880ce047fe..7b795ac5477 100644 --- a/include/asm-sh/cpu-sh3/timer.h +++ b/include/asm-sh/cpu-sh3/timer.h @@ -23,8 +23,7 @@ * --------------------------------------------------------------------------- */ -#if !defined(CONFIG_CPU_SUBTYPE_SH7720) && \ - !defined(CONFIG_CPU_SUBTYPE_SH7727) +#if !defined(CONFIG_CPU_SUBTYPE_SH7720) #define TMU_TOCR 0xfffffe90 /* Byte access */ #endif @@ -58,8 +57,7 @@ #define TMU2_TCOR 0xfffffeac /* Long access */ #define TMU2_TCNT 0xfffffeb0 /* Long access */ #define TMU2_TCR 0xfffffeb4 /* Word access */ -#if !defined(CONFIG_CPU_SUBTYPE_SH7720) && \ - !defined(CONFIG_CPU_SUBTYPE_SH7727) +#if !defined(CONFIG_CPU_SUBTYPE_SH7720) #define TMU2_TCPR2 0xfffffeb8 /* Long access */ #endif #endif -- cgit v1.2.3