diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2007-11-10 06:35:53 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:44 -0500 |
| commit | 959f7d587e236a2d218f527771f156c336409d11 (patch) | |
| tree | 9cbc0ec58d072dc58c04e91488a8013518582af4 | |
| parent | 256b22ca66987c537064dc25b0b267966189b5ba (diff) | |
sh: Move over the SH-5 head.S and tlb.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | arch/sh/kernel/Makefile_32 | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/Makefile_64 | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/head_32.S (renamed from arch/sh/kernel/head.S) | 0 | ||||
| -rw-r--r-- | arch/sh/kernel/head_64.S (renamed from arch/sh64/kernel/head.S) | 9 | ||||
| -rw-r--r-- | include/asm-sh/tlb.h | 10 | ||||
| -rw-r--r-- | include/asm-sh/tlb_64.h (renamed from include/asm-sh64/tlb.h) | 45 |
6 files changed, 24 insertions, 44 deletions
diff --git a/arch/sh/kernel/Makefile_32 b/arch/sh/kernel/Makefile_32 index 29b44eb3b934..35be5e9674f8 100644 --- a/arch/sh/kernel/Makefile_32 +++ b/arch/sh/kernel/Makefile_32 | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Makefile for the Linux/SuperH kernel. | 2 | # Makefile for the Linux/SuperH kernel. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | extra-y := head.o init_task.o vmlinux.lds | 5 | extra-y := head_32.o init_task.o vmlinux.lds |
| 6 | 6 | ||
| 7 | obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_32.o \ | 7 | obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_32.o \ |
| 8 | ptrace_32.o semaphore.o setup.o signal_32.o sys_sh.o syscalls.o \ | 8 | ptrace_32.o semaphore.o setup.o signal_32.o sys_sh.o syscalls.o \ |
diff --git a/arch/sh/kernel/Makefile_64 b/arch/sh/kernel/Makefile_64 index fb87d642d1c1..6e72ed4c07fb 100644 --- a/arch/sh/kernel/Makefile_64 +++ b/arch/sh/kernel/Makefile_64 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | extra-y := head.o init_task.o vmlinux.lds | 1 | extra-y := head_64.o init_task.o vmlinux.lds |
| 2 | 2 | ||
| 3 | obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_64.o \ | 3 | obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_64.o \ |
| 4 | ptrace_64.o semaphore.o setup.o signal_64.o sys_sh64.o syscalls.o \ | 4 | ptrace_64.o semaphore.o setup.o signal_64.o sys_sh64.o syscalls.o \ |
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head_32.S index 3338239717f1..3338239717f1 100644 --- a/arch/sh/kernel/head.S +++ b/arch/sh/kernel/head_32.S | |||
diff --git a/arch/sh64/kernel/head.S b/arch/sh/kernel/head_64.S index 186406d3ad9c..8015af6d1da2 100644 --- a/arch/sh64/kernel/head.S +++ b/arch/sh/kernel/head_64.S | |||
| @@ -19,14 +19,11 @@ | |||
| 19 | * lethal@linux-sh.org: 8th May 2004 | 19 | * lethal@linux-sh.org: 8th May 2004 |
| 20 | * Add early SCIF console DTLB mapping. | 20 | * Add early SCIF console DTLB mapping. |
| 21 | */ | 21 | */ |
| 22 | |||
| 23 | |||
| 24 | #include <asm/page.h> | 22 | #include <asm/page.h> |
| 25 | #include <asm/mmu_context.h> | ||
| 26 | #include <asm/cache.h> | 23 | #include <asm/cache.h> |
| 27 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
| 28 | #include <asm/processor.h> | 25 | #include <asm/cpu/registers.h> |
| 29 | #include <asm/registers.h> | 26 | #include <asm/cpu/mmu_context.h> |
| 30 | #include <asm/thread_info.h> | 27 | #include <asm/thread_info.h> |
| 31 | 28 | ||
| 32 | /* | 29 | /* |
| @@ -368,5 +365,3 @@ hopeless: | |||
| 368 | * (r32) _start_kernel address | 365 | * (r32) _start_kernel address |
| 369 | */ | 366 | */ |
| 370 | blink tr7, ZERO | 367 | blink tr7, ZERO |
| 371 | |||
| 372 | |||
diff --git a/include/asm-sh/tlb.h b/include/asm-sh/tlb.h index 53d185bcf872..56ad1fb888a2 100644 --- a/include/asm-sh/tlb.h +++ b/include/asm-sh/tlb.h | |||
| @@ -1,6 +1,12 @@ | |||
| 1 | #ifndef __ASM_SH_TLB_H | 1 | #ifndef __ASM_SH_TLB_H |
| 2 | #define __ASM_SH_TLB_H | 2 | #define __ASM_SH_TLB_H |
| 3 | 3 | ||
| 4 | #ifdef CONFIG_SUPERH64 | ||
| 5 | # include "tlb_64.h" | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #ifndef __ASSEMBLY__ | ||
| 9 | |||
| 4 | #define tlb_start_vma(tlb, vma) \ | 10 | #define tlb_start_vma(tlb, vma) \ |
| 5 | flush_cache_range(vma, vma->vm_start, vma->vm_end) | 11 | flush_cache_range(vma, vma->vm_start, vma->vm_end) |
| 6 | 12 | ||
| @@ -15,4 +21,6 @@ | |||
| 15 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | 21 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) |
| 16 | 22 | ||
| 17 | #include <asm-generic/tlb.h> | 23 | #include <asm-generic/tlb.h> |
| 18 | #endif | 24 | |
| 25 | #endif /* __ASSEMBLY__ */ | ||
| 26 | #endif /* __ASM_SH_TLB_H */ | ||
diff --git a/include/asm-sh64/tlb.h b/include/asm-sh/tlb_64.h index 4979408bd88c..0308e05fc57b 100644 --- a/include/asm-sh64/tlb.h +++ b/include/asm-sh/tlb_64.h | |||
| @@ -1,20 +1,14 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/asm-sh64/tlb.h | 2 | * include/asm-sh/tlb_64.h |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2003 Paul Mundt | 4 | * Copyright (C) 2003 Paul Mundt |
| 5 | * | 5 | * |
| 6 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
| 7 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
| 8 | * for more details. | 8 | * for more details. |
| 9 | * | ||
| 10 | */ | ||
| 11 | #ifndef __ASM_SH64_TLB_H | ||
| 12 | #define __ASM_SH64_TLB_H | ||
| 13 | |||
| 14 | /* | ||
| 15 | * Note! These are mostly unused, we just need the xTLB_LAST_VAR_UNRESTRICTED | ||
| 16 | * for head.S! Once this limitation is gone, we can clean the rest of this up. | ||
| 17 | */ | 9 | */ |
| 10 | #ifndef __ASM_SH_TLB_64_H | ||
| 11 | #define __ASM_SH_TLB_64_H | ||
| 18 | 12 | ||
| 19 | /* ITLB defines */ | 13 | /* ITLB defines */ |
| 20 | #define ITLB_FIXED 0x00000000 /* First fixed ITLB, see head.S */ | 14 | #define ITLB_FIXED 0x00000000 /* First fixed ITLB, see head.S */ |
| @@ -63,30 +57,13 @@ static inline void __flush_tlb_slot(unsigned long long slot) | |||
| 63 | } | 57 | } |
| 64 | 58 | ||
| 65 | /* arch/sh64/mm/tlb.c */ | 59 | /* arch/sh64/mm/tlb.c */ |
| 66 | extern int sh64_tlb_init(void); | 60 | int sh64_tlb_init(void); |
| 67 | extern unsigned long long sh64_next_free_dtlb_entry(void); | 61 | unsigned long long sh64_next_free_dtlb_entry(void); |
| 68 | extern unsigned long long sh64_get_wired_dtlb_entry(void); | 62 | unsigned long long sh64_get_wired_dtlb_entry(void); |
| 69 | extern int sh64_put_wired_dtlb_entry(unsigned long long entry); | 63 | int sh64_put_wired_dtlb_entry(unsigned long long entry); |
| 70 | 64 | void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, | |
| 71 | extern void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, unsigned long asid, unsigned long paddr); | 65 | unsigned long asid, unsigned long paddr); |
| 72 | extern void sh64_teardown_tlb_slot(unsigned long long config_addr); | 66 | void sh64_teardown_tlb_slot(unsigned long long config_addr); |
| 73 | |||
| 74 | #define tlb_start_vma(tlb, vma) \ | ||
| 75 | flush_cache_range(vma, vma->vm_start, vma->vm_end) | ||
| 76 | |||
| 77 | #define tlb_end_vma(tlb, vma) \ | ||
| 78 | flush_tlb_range(vma, vma->vm_start, vma->vm_end) | ||
| 79 | |||
| 80 | #define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) | ||
| 81 | |||
| 82 | /* | ||
| 83 | * Flush whole TLBs for MM | ||
| 84 | */ | ||
| 85 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | ||
| 86 | |||
| 87 | #include <asm-generic/tlb.h> | ||
| 88 | 67 | ||
| 89 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
| 90 | 69 | #endif /* __ASM_SH_TLB_64_H */ | |
| 91 | #endif /* __ASM_SH64_TLB_H */ | ||
| 92 | |||
