aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/mips/arc/console.c31
-rw-r--r--arch/mips/jazz/io.c135
-rw-r--r--arch/mips/jazz/reset.c13
-rw-r--r--arch/mips/jazz/setup.c4
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c2
-rw-r--r--arch/mips/kernel/gdb-stub.c4
-rw-r--r--arch/mips/kernel/head.S2
-rw-r--r--arch/mips/kernel/linux32.c2
-rw-r--r--arch/mips/kernel/rtlx.c2
-rw-r--r--arch/mips/kernel/syscall.c4
-rw-r--r--arch/mips/kernel/vpe.c3
-rw-r--r--arch/mips/mm/c-sb1.c2
-rw-r--r--arch/mips/mm/init.c2
-rw-r--r--arch/mips/sni/sniprom.c5
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c2
-rw-r--r--include/asm-mips/war.h1
17 files changed, 16 insertions, 200 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 20d19c9b7761..a9a987a06daf 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -328,7 +328,7 @@ load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
328# MIPS SIM 328# MIPS SIM
329# 329#
330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/ 330core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/
331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim 331cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-mipssim
332load-$(CONFIG_MIPS_SIM) += 0x80100000 332load-$(CONFIG_MIPS_SIM) += 0x80100000
333 333
334# 334#
diff --git a/arch/mips/arc/console.c b/arch/mips/arc/console.c
deleted file mode 100644
index 0fe6032999cb..000000000000
--- a/arch/mips/arc/console.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996 David S. Miller (dm@sgi.com)
7 * Compability with board caches, Ulf Carlsson
8 */
9#include <linux/kernel.h>
10#include <asm/sgialib.h>
11#include <asm/bcache.h>
12
13/*
14 * IP22 boardcache is not compatible with board caches. Thus we disable it
15 * during romvec action. Since r4xx0.c is always compiled and linked with your
16 * kernel, this shouldn't cause any harm regardless what MIPS processor you
17 * have.
18 *
19 * The ARC write and read functions seem to interfere with the serial lines
20 * in some way. You should be careful with them.
21 */
22
23void prom_putchar(char c)
24{
25 ULONG cnt;
26 CHAR it = c;
27
28 bc_disable();
29 ArcWrite(1, &it, 1, &cnt);
30 bc_enable();
31}
diff --git a/arch/mips/jazz/io.c b/arch/mips/jazz/io.c
deleted file mode 100644
index e86904454c89..000000000000
--- a/arch/mips/jazz/io.c
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Low level I/O functions for Jazz family machines.
7 *
8 * Copyright (C) 1997 by Ralf Baechle.
9 */
10#include <linux/string.h>
11#include <linux/spinlock.h>
12#include <asm/addrspace.h>
13#include <asm/system.h>
14#include <asm/jazz.h>
15
16/*
17 * Map an 16mb segment of the EISA address space to 0xe3000000;
18 */
19static inline void map_eisa_address(unsigned long address)
20{
21 /* XXX */
22 /* We've got an wired entry in the TLB. We just need to modify it.
23 fast and clean. But since we want to get rid of wired entries
24 things are a little bit more complicated ... */
25}
26
27static unsigned char jazz_readb(unsigned long addr)
28{
29 unsigned char res;
30
31 map_eisa_address(addr);
32 addr &= 0xffffff;
33 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
34
35 return res;
36}
37
38static unsigned short jazz_readw(unsigned long addr)
39{
40 unsigned short res;
41
42 map_eisa_address(addr);
43 addr &= 0xffffff;
44 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
45
46 return res;
47}
48
49static unsigned int jazz_readl(unsigned long addr)
50{
51 unsigned int res;
52
53 map_eisa_address(addr);
54 addr &= 0xffffff;
55 res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr);
56
57 return res;
58}
59
60static void jazz_writeb(unsigned char val, unsigned long addr)
61{
62 map_eisa_address(addr);
63 addr &= 0xffffff;
64 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
65}
66
67static void jazz_writew(unsigned short val, unsigned long addr)
68{
69 map_eisa_address(addr);
70 addr &= 0xffffff;
71 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
72}
73
74static void jazz_writel(unsigned int val, unsigned long addr)
75{
76 map_eisa_address(addr);
77 addr &= 0xffffff;
78 *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val;
79}
80
81static void jazz_memset_io(unsigned long addr, int val, unsigned long len)
82{
83 unsigned long waddr;
84
85 waddr = JAZZ_EISA_BASE | (addr & 0xffffff);
86 while(len) {
87 unsigned long fraglen;
88
89 fraglen = (~addr + 1) & 0xffffff;
90 fraglen = (fraglen < len) ? fraglen : len;
91 map_eisa_address(addr);
92 memset((char *)waddr, val, fraglen);
93 addr += fraglen;
94 waddr = waddr + fraglen - 0x1000000;
95 len -= fraglen;
96 }
97}
98
99static void jazz_memcpy_fromio(unsigned long to, unsigned long from, unsigned long len)
100{
101 unsigned long waddr;
102
103 waddr = JAZZ_EISA_BASE | (from & 0xffffff);
104 while(len) {
105 unsigned long fraglen;
106
107 fraglen = (~from + 1) & 0xffffff;
108 fraglen = (fraglen < len) ? fraglen : len;
109 map_eisa_address(from);
110 memcpy((void *)to, (void *)waddr, fraglen);
111 to += fraglen;
112 from += fraglen;
113 waddr = waddr + fraglen - 0x1000000;
114 len -= fraglen;
115 }
116}
117
118static void jazz_memcpy_toio(unsigned long to, unsigned long from, unsigned long len)
119{
120 unsigned long waddr;
121
122 waddr = JAZZ_EISA_BASE | (to & 0xffffff);
123 while(len) {
124 unsigned long fraglen;
125
126 fraglen = (~to + 1) & 0xffffff;
127 fraglen = (fraglen < len) ? fraglen : len;
128 map_eisa_address(to);
129 memcpy((char *)to + JAZZ_EISA_BASE, (void *)from, fraglen);
130 to += fraglen;
131 from += fraglen;
132 waddr = waddr + fraglen - 0x1000000;
133 len -= fraglen;
134 }
135}
diff --git a/arch/mips/jazz/reset.c b/arch/mips/jazz/reset.c
index 2a9754750bc8..d8ade85060b3 100644
--- a/arch/mips/jazz/reset.c
+++ b/arch/mips/jazz/reset.c
@@ -6,10 +6,6 @@
6 */ 6 */
7#include <linux/jiffies.h> 7#include <linux/jiffies.h>
8#include <asm/jazz.h> 8#include <asm/jazz.h>
9#include <asm/io.h>
10#include <asm/system.h>
11#include <asm/reboot.h>
12#include <asm/delay.h>
13 9
14#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ 10#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */
15 11
@@ -58,12 +54,3 @@ void jazz_machine_restart(char *command)
58 jazz_write_output (0x00); 54 jazz_write_output (0x00);
59 } 55 }
60} 56}
61
62void jazz_machine_halt(void)
63{
64}
65
66void jazz_machine_power_off(void)
67{
68 /* Jazz machines don't have a software power switch */
69}
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index 81ec559a1c26..798279e06691 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -34,8 +34,6 @@
34extern asmlinkage void jazz_handle_int(void); 34extern asmlinkage void jazz_handle_int(void);
35 35
36extern void jazz_machine_restart(char *command); 36extern void jazz_machine_restart(char *command);
37extern void jazz_machine_halt(void);
38extern void jazz_machine_power_off(void);
39 37
40void __init plat_timer_setup(struct irqaction *irq) 38void __init plat_timer_setup(struct irqaction *irq)
41{ 39{
@@ -95,8 +93,6 @@ void __init plat_mem_setup(void)
95 /* The RTC is outside the port address space */ 93 /* The RTC is outside the port address space */
96 94
97 _machine_restart = jazz_machine_restart; 95 _machine_restart = jazz_machine_restart;
98 _machine_halt = jazz_machine_halt;
99 pm_power_off = jazz_machine_power_off;
100 96
101 screen_info = (struct screen_info) { 97 screen_info = (struct screen_info) {
102 0, 0, /* orig-x, orig-y */ 98 0, 0, /* orig-x, orig-y */
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index d1ef2895d564..8303001516d2 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -434,7 +434,7 @@ EXPORT_SYMBOL(__swizzle_addr_b);
434 434
435static int __init jmr3927_rtc_init(void) 435static int __init jmr3927_rtc_init(void)
436{ 436{
437 struct resource res = { 437 static struct resource __initdata res = {
438 .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE, 438 .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE,
439 .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1, 439 .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1,
440 .flags = IORESOURCE_MEM, 440 .flags = IORESOURCE_MEM,
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c
index 7bc882049269..cb5623aad552 100644
--- a/arch/mips/kernel/gdb-stub.c
+++ b/arch/mips/kernel/gdb-stub.c
@@ -1099,12 +1099,12 @@ void adel(void)
1099 * malloc is needed by gdb client in "call func()", even a private one 1099 * malloc is needed by gdb client in "call func()", even a private one
1100 * will make gdb happy 1100 * will make gdb happy
1101 */ 1101 */
1102static void * __attribute_used__ malloc(size_t size) 1102static void __used *malloc(size_t size)
1103{ 1103{
1104 return kmalloc(size, GFP_ATOMIC); 1104 return kmalloc(size, GFP_ATOMIC);
1105} 1105}
1106 1106
1107static void __attribute_used__ free (void *where) 1107static void __used free(void *where)
1108{ 1108{
1109 kfree(where); 1109 kfree(where);
1110} 1110}
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index f78538eceef7..c15bbc436bbd 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -141,7 +141,7 @@
141EXPORT(stext) # used for profiling 141EXPORT(stext) # used for profiling
142EXPORT(_stext) 142EXPORT(_stext)
143 143
144#ifdef CONFIG_BOOT_RAW 144#ifndef CONFIG_BOOT_RAW
145 /* 145 /*
146 * Give us a fighting chance of running if execution beings at the 146 * Give us a fighting chance of running if execution beings at the
147 * kernel load address. This is needed because this platform does 147 * kernel load address. This is needed because this platform does
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 06e04da211d5..c37568d6fb55 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -567,7 +567,7 @@ asmlinkage long sys32_fadvise64_64(int fd, int __pad,
567} 567}
568 568
569save_static_function(sys32_clone); 569save_static_function(sys32_clone);
570__attribute_used__ noinline static int 570static int noinline __used
571_sys32_clone(nabi_no_regargs struct pt_regs regs) 571_sys32_clone(nabi_no_regargs struct pt_regs regs)
572{ 572{
573 unsigned long clone_flags; 573 unsigned long clone_flags;
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index bfc8ca168f83..8cf24d716d41 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -85,7 +85,7 @@ static irqreturn_t rtlx_interrupt(int irq, void *dev_id)
85 return IRQ_HANDLED; 85 return IRQ_HANDLED;
86} 86}
87 87
88static __attribute_used__ void dump_rtlx(void) 88static void __used dump_rtlx(void)
89{ 89{
90 int i; 90 int i;
91 91
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index b947c61c0cc8..b53f7edbc159 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -167,14 +167,14 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
167} 167}
168 168
169save_static_function(sys_fork); 169save_static_function(sys_fork);
170__attribute_used__ noinline static int 170static int __used noinline
171_sys_fork(nabi_no_regargs struct pt_regs regs) 171_sys_fork(nabi_no_regargs struct pt_regs regs)
172{ 172{
173 return do_fork(SIGCHLD, regs.regs[29], &regs, 0, NULL, NULL); 173 return do_fork(SIGCHLD, regs.regs[29], &regs, 0, NULL, NULL);
174} 174}
175 175
176save_static_function(sys_clone); 176save_static_function(sys_clone);
177__attribute_used__ noinline static int 177static int __used noinline
178_sys_clone(nabi_no_regargs struct pt_regs regs) 178_sys_clone(nabi_no_regargs struct pt_regs regs)
179{ 179{
180 unsigned long clone_flags; 180 unsigned long clone_flags;
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 9e66354dee8b..a2bee10f04cf 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -154,7 +154,6 @@ struct {
154}; 154};
155 155
156static void release_progmem(void *ptr); 156static void release_progmem(void *ptr);
157/* static __attribute_used__ void dump_vpe(struct vpe * v); */
158extern void save_gp_address(unsigned int secbase, unsigned int rel); 157extern void save_gp_address(unsigned int secbase, unsigned int rel);
159 158
160/* get the vpe associated with this minor */ 159/* get the vpe associated with this minor */
@@ -1024,7 +1023,7 @@ static int vpe_elfload(struct vpe * v)
1024 return 0; 1023 return 0;
1025} 1024}
1026 1025
1027__attribute_used__ void dump_vpe(struct vpe * v) 1026void __used dump_vpe(struct vpe * v)
1028{ 1027{
1029 struct tc *t; 1028 struct tc *t;
1030 1029
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 6f9bd7fbd481..85ce2842d0da 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -272,7 +272,7 @@ void sb1_flush_cache_data_page(unsigned long)
272/* 272/*
273 * Invalidate all caches on this CPU 273 * Invalidate all caches on this CPU
274 */ 274 */
275static void __attribute_used__ local_sb1___flush_cache_all(void) 275static void __used local_sb1___flush_cache_all(void)
276{ 276{
277 __sb1_writeback_inv_dcache_all(); 277 __sb1_writeback_inv_dcache_all();
278 __sb1_flush_icache_all(); 278 __sb1_flush_icache_all();
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4c80528deadd..b8cb0dde3af0 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -484,7 +484,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
484} 484}
485#endif 485#endif
486 486
487void free_initmem(void) 487void __init_refok free_initmem(void)
488{ 488{
489 prom_free_prom_memory(); 489 prom_free_prom_memory();
490 free_init_pages("unused kernel memory", 490 free_init_pages("unused kernel memory",
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c
index 00a03a6e8f58..db544a6e23f3 100644
--- a/arch/mips/sni/sniprom.c
+++ b/arch/mips/sni/sniprom.c
@@ -19,6 +19,7 @@
19#include <asm/addrspace.h> 19#include <asm/addrspace.h>
20#include <asm/sni.h> 20#include <asm/sni.h>
21#include <asm/mipsprom.h> 21#include <asm/mipsprom.h>
22#include <asm/mipsregs.h>
22#include <asm/bootinfo.h> 23#include <asm/bootinfo.h>
23 24
24/* special SNI prom calls */ 25/* special SNI prom calls */
@@ -71,7 +72,7 @@ const char *get_system_type(void)
71#define SNI_IDPROM_SIZE 0x1000 72#define SNI_IDPROM_SIZE 0x1000
72 73
73#ifdef DEBUG 74#ifdef DEBUG
74static void sni_idprom_dump(void) 75static void __init sni_idprom_dump(void)
75{ 76{
76 int i; 77 int i;
77 78
@@ -88,7 +89,7 @@ static void sni_idprom_dump(void)
88} 89}
89#endif 90#endif
90 91
91static void sni_mem_init(void ) 92static void __init sni_mem_init(void )
92{ 93{
93 int i, memsize; 94 int i, memsize;
94 struct membank { 95 struct membank {
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index 40c7c3eeafaf..ab72292a172e 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -1020,7 +1020,7 @@ void __init toshiba_rbtx4927_timer_setup(struct irqaction *irq)
1020 1020
1021static int __init toshiba_rbtx4927_rtc_init(void) 1021static int __init toshiba_rbtx4927_rtc_init(void)
1022{ 1022{
1023 struct resource res = { 1023 static struct resource __initdata res = {
1024 .start = 0x1c010000, 1024 .start = 0x1c010000,
1025 .end = 0x1c010000 + 0x800 - 1, 1025 .end = 0x1c010000 + 0x800 - 1,
1026 .flags = IORESOURCE_MEM, 1026 .flags = IORESOURCE_MEM,
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h
index 9de52a5b0f3d..2883ccc69ed0 100644
--- a/include/asm-mips/war.h
+++ b/include/asm-mips/war.h
@@ -188,7 +188,6 @@
188#define ICACHE_REFILLS_WORKAROUND_WAR 1 188#define ICACHE_REFILLS_WORKAROUND_WAR 1
189#endif 189#endif
190 190
191
192/* 191/*
193 * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that 192 * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that
194 * may cause ll / sc and lld / scd sequences to execute non-atomically. 193 * may cause ll / sc and lld / scd sequences to execute non-atomically.