aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-04-16 03:41:07 -0400
committerMichal Simek <monstr@monstr.eu>2010-05-06 05:21:58 -0400
commite7682231092d1d1dd49bc590d6d3b7f0ddc07e74 (patch)
treed12df03e944bdee450a17d8fcdf924bab23c6751 /arch
parent63f1032b97638fc2b023fa968b7703c8ebe6d6d9 (diff)
microblaze: Remove ancient code
I found several function which we don't use that's why I am removing them. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/include/asm/exceptions.h6
-rw-r--r--arch/microblaze/include/asm/io.h2
-rw-r--r--arch/microblaze/include/asm/pgtable.h33
-rw-r--r--arch/microblaze/kernel/traps.c34
-rw-r--r--arch/microblaze/mm/pgtable.c36
5 files changed, 0 insertions, 111 deletions
diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h
index 90731df9e574..4c7b5d037c88 100644
--- a/arch/microblaze/include/asm/exceptions.h
+++ b/arch/microblaze/include/asm/exceptions.h
@@ -64,12 +64,6 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
64void die(const char *str, struct pt_regs *fp, long err); 64void die(const char *str, struct pt_regs *fp, long err);
65void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); 65void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
66 66
67#ifdef CONFIG_MMU
68void __bug(const char *file, int line, void *data);
69int bad_trap(int trap_num, struct pt_regs *regs);
70int debug_trap(struct pt_regs *regs);
71#endif /* CONFIG_MMU */
72
73#if defined(CONFIG_KGDB) 67#if defined(CONFIG_KGDB)
74void (*debugger)(struct pt_regs *regs); 68void (*debugger)(struct pt_regs *regs);
75int (*debugger_bpt)(struct pt_regs *regs); 69int (*debugger_bpt)(struct pt_regs *regs);
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index e45a6eea92e0..00b5398d08c7 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -139,8 +139,6 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
139 139
140#ifdef CONFIG_MMU 140#ifdef CONFIG_MMU
141 141
142#define mm_ptov(addr) ((void *)__phys_to_virt(addr))
143#define mm_vtop(addr) ((unsigned long)__virt_to_phys(addr))
144#define phys_to_virt(addr) ((void *)__phys_to_virt(addr)) 142#define phys_to_virt(addr) ((void *)__phys_to_virt(addr))
145#define virt_to_phys(addr) ((unsigned long)__virt_to_phys(addr)) 143#define virt_to_phys(addr) ((unsigned long)__virt_to_phys(addr))
146#define virt_to_bus(addr) ((unsigned long)__virt_to_phys(addr)) 144#define virt_to_bus(addr) ((unsigned long)__virt_to_phys(addr))
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h
index dd2bb60651c7..16a117ed2606 100644
--- a/arch/microblaze/include/asm/pgtable.h
+++ b/arch/microblaze/include/asm/pgtable.h
@@ -512,15 +512,6 @@ static inline pmd_t *pmd_offset(pgd_t *dir, unsigned long address)
512extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 512extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
513 513
514/* 514/*
515 * When flushing the tlb entry for a page, we also need to flush the hash
516 * table entry. flush_hash_page is assembler (for speed) in hashtable.S.
517 */
518extern int flush_hash_page(unsigned context, unsigned long va, pte_t *ptep);
519
520/* Add an HPTE to the hash table */
521extern void add_hash_page(unsigned context, unsigned long va, pte_t *ptep);
522
523/*
524 * Encode and decode a swap entry. 515 * Encode and decode a swap entry.
525 * Note that the bits we use in a PTE for representing a swap entry 516 * Note that the bits we use in a PTE for representing a swap entry
526 * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit 517 * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit
@@ -533,15 +524,7 @@ extern void add_hash_page(unsigned context, unsigned long va, pte_t *ptep);
533#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 }) 524#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 })
534#define __swp_entry_to_pte(x) ((pte_t) { (x).val << 2 }) 525#define __swp_entry_to_pte(x) ((pte_t) { (x).val << 2 })
535 526
536
537/* CONFIG_APUS */
538/* For virtual address to physical address conversion */
539extern void cache_clear(__u32 addr, int length);
540extern void cache_push(__u32 addr, int length);
541extern int mm_end_of_chunk(unsigned long addr, int len);
542extern unsigned long iopa(unsigned long addr); 527extern unsigned long iopa(unsigned long addr);
543/* extern unsigned long mm_ptov(unsigned long addr) \
544 __attribute__ ((const)); TBD */
545 528
546/* Values for nocacheflag and cmode */ 529/* Values for nocacheflag and cmode */
547/* These are not used by the APUS kernel_map, but prevents 530/* These are not used by the APUS kernel_map, but prevents
@@ -552,18 +535,6 @@ extern unsigned long iopa(unsigned long addr);
552#define IOMAP_NOCACHE_NONSER 2 535#define IOMAP_NOCACHE_NONSER 2
553#define IOMAP_NO_COPYBACK 3 536#define IOMAP_NO_COPYBACK 3
554 537
555/*
556 * Map some physical address range into the kernel address space.
557 */
558extern unsigned long kernel_map(unsigned long paddr, unsigned long size,
559 int nocacheflag, unsigned long *memavailp);
560
561/*
562 * Set cache mode of (kernel space) address range.
563 */
564extern void kernel_set_cachemode(unsigned long address, unsigned long size,
565 unsigned int cmode);
566
567/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ 538/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
568#define kern_addr_valid(addr) (1) 539#define kern_addr_valid(addr) (1)
569 540
@@ -577,10 +548,6 @@ extern void kernel_set_cachemode(unsigned long address, unsigned long size,
577void do_page_fault(struct pt_regs *regs, unsigned long address, 548void do_page_fault(struct pt_regs *regs, unsigned long address,
578 unsigned long error_code); 549 unsigned long error_code);
579 550
580void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
581 unsigned int size, int flags);
582
583void __init adjust_total_lowmem(void);
584void mapin_ram(void); 551void mapin_ram(void);
585int map_page(unsigned long va, phys_addr_t pa, int flags); 552int map_page(unsigned long va, phys_addr_t pa, int flags);
586 553
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c
index 5e4570ef515c..75e49202a5ed 100644
--- a/arch/microblaze/kernel/traps.c
+++ b/arch/microblaze/kernel/traps.c
@@ -95,37 +95,3 @@ void dump_stack(void)
95 show_stack(NULL, NULL); 95 show_stack(NULL, NULL);
96} 96}
97EXPORT_SYMBOL(dump_stack); 97EXPORT_SYMBOL(dump_stack);
98
99#ifdef CONFIG_MMU
100void __bug(const char *file, int line, void *data)
101{
102 if (data)
103 printk(KERN_CRIT "kernel BUG at %s:%d (data = %p)!\n",
104 file, line, data);
105 else
106 printk(KERN_CRIT "kernel BUG at %s:%d!\n", file, line);
107
108 machine_halt();
109}
110
111int bad_trap(int trap_num, struct pt_regs *regs)
112{
113 printk(KERN_CRIT
114 "unimplemented trap %d called at 0x%08lx, pid %d!\n",
115 trap_num, regs->pc, current->pid);
116 return -ENOSYS;
117}
118
119int debug_trap(struct pt_regs *regs)
120{
121 int i;
122 printk(KERN_CRIT "debug trap\n");
123 for (i = 0; i < 32; i++) {
124 /* printk("r%i:%08X\t",i,regs->gpr[i]); */
125 if ((i % 4) == 3)
126 printk(KERN_CRIT "\n");
127 }
128 printk(KERN_CRIT "pc:%08lX\tmsr:%08lX\n", regs->pc, regs->msr);
129 return -ENOSYS;
130}
131#endif
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c
index c43bfc94e714..784557fb28cf 100644
--- a/arch/microblaze/mm/pgtable.c
+++ b/arch/microblaze/mm/pgtable.c
@@ -161,24 +161,6 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
161 return err; 161 return err;
162} 162}
163 163
164void __init adjust_total_lowmem(void)
165{
166/* TBD */
167#if 0
168 unsigned long max_low_mem = MAX_LOW_MEM;
169
170 if (total_lowmem > max_low_mem) {
171 total_lowmem = max_low_mem;
172#ifndef CONFIG_HIGHMEM
173 printk(KERN_INFO "Warning, memory limited to %ld Mb, use "
174 "CONFIG_HIGHMEM to reach %ld Mb\n",
175 max_low_mem >> 20, total_memory >> 20);
176 total_memory = total_lowmem;
177#endif /* CONFIG_HIGHMEM */
178 }
179#endif
180}
181
182/* 164/*
183 * Map in all of physical memory starting at CONFIG_KERNEL_START. 165 * Map in all of physical memory starting at CONFIG_KERNEL_START.
184 */ 166 */
@@ -206,24 +188,6 @@ void __init mapin_ram(void)
206/* is x a power of 2? */ 188/* is x a power of 2? */
207#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) 189#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
208 190
209/*
210 * Set up a mapping for a block of I/O.
211 * virt, phys, size must all be page-aligned.
212 * This should only be called before ioremap is called.
213 */
214void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
215 unsigned int size, int flags)
216{
217 int i;
218
219 if (virt > CONFIG_KERNEL_START && virt < ioremap_bot)
220 ioremap_bot = ioremap_base = virt;
221
222 /* Put it in the page tables. */
223 for (i = 0; i < size; i += PAGE_SIZE)
224 map_page(virt + i, phys + i, flags);
225}
226
227/* Scan the real Linux page tables and return a PTE pointer for 191/* Scan the real Linux page tables and return a PTE pointer for
228 * a virtual address in a context. 192 * a virtual address in a context.
229 * Returns true (1) if PTE was found, zero otherwise. The pointer to 193 * Returns true (1) if PTE was found, zero otherwise. The pointer to