aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/Kconfig14
-rw-r--r--arch/mips/alchemy/Kconfig50
-rw-r--r--arch/mips/alchemy/Platform22
-rw-r--r--arch/mips/alchemy/devboards/Makefile7
-rw-r--r--arch/mips/alchemy/devboards/db1000.c120
-rw-r--r--arch/mips/alchemy/devboards/db1200.c37
-rw-r--r--arch/mips/alchemy/devboards/db1235.c94
-rw-r--r--arch/mips/alchemy/devboards/db1300.c12
-rw-r--r--arch/mips/alchemy/devboards/db1550.c192
-rw-r--r--arch/mips/alchemy/devboards/pb1100.c167
-rw-r--r--arch/mips/alchemy/devboards/pb1500.c198
-rw-r--r--arch/mips/alchemy/devboards/pb1550.c244
-rw-r--r--arch/mips/alchemy/devboards/platform.c9
-rw-r--r--arch/mips/boot/compressed/uart-alchemy.c4
-rw-r--r--arch/mips/configs/db1200_defconfig170
-rw-r--r--arch/mips/configs/db1235_defconfig434
-rw-r--r--arch/mips/configs/db1300_defconfig391
-rw-r--r--arch/mips/configs/db1550_defconfig285
-rw-r--r--arch/mips/configs/pb1100_defconfig124
-rw-r--r--arch/mips/configs/pb1500_defconfig141
-rw-r--r--arch/mips/configs/pb1550_defconfig145
-rw-r--r--arch/mips/include/asm/Kbuild5
-rw-r--r--arch/mips/include/asm/atomic.h64
-rw-r--r--arch/mips/include/asm/cpu-features.h8
-rw-r--r--arch/mips/include/asm/cpu.h4
-rw-r--r--arch/mips/include/asm/errno.h120
-rw-r--r--arch/mips/include/asm/kspd.h4
-rw-r--r--arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h2
-rw-r--r--arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-db1x00/bcsr.h2
-rw-r--r--arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-powertv/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-rm/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mach-yosemite/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/mipsregs.h3
-rw-r--r--arch/mips/include/asm/pgtable-64.h1
-rw-r--r--arch/mips/include/asm/pmc-sierra/msp71xx/cpu-feature-overrides.h1
-rw-r--r--arch/mips/include/asm/ptrace.h107
-rw-r--r--arch/mips/include/asm/setup.h5
-rw-r--r--arch/mips/include/asm/sigcontext.h66
-rw-r--r--arch/mips/include/asm/siginfo.h104
-rw-r--r--arch/mips/include/asm/signal.h115
-rw-r--r--arch/mips/include/asm/socket.h83
-rw-r--r--arch/mips/include/asm/termios.h73
-rw-r--r--arch/mips/include/asm/types.h16
-rw-r--r--arch/mips/include/asm/unistd.h1022
-rw-r--r--arch/mips/include/uapi/asm/Kbuild34
-rw-r--r--arch/mips/include/uapi/asm/auxvec.h (renamed from arch/mips/include/asm/auxvec.h)0
-rw-r--r--arch/mips/include/uapi/asm/bitsperlong.h (renamed from arch/mips/include/asm/bitsperlong.h)0
-rw-r--r--arch/mips/include/uapi/asm/byteorder.h (renamed from arch/mips/include/asm/byteorder.h)0
-rw-r--r--arch/mips/include/uapi/asm/cachectl.h (renamed from arch/mips/include/asm/cachectl.h)0
-rw-r--r--arch/mips/include/uapi/asm/errno.h129
-rw-r--r--arch/mips/include/uapi/asm/fcntl.h (renamed from arch/mips/include/asm/fcntl.h)0
-rw-r--r--arch/mips/include/uapi/asm/ioctl.h (renamed from arch/mips/include/asm/ioctl.h)0
-rw-r--r--arch/mips/include/uapi/asm/ioctls.h (renamed from arch/mips/include/asm/ioctls.h)0
-rw-r--r--arch/mips/include/uapi/asm/ipcbuf.h (renamed from arch/mips/include/asm/ipcbuf.h)0
-rw-r--r--arch/mips/include/uapi/asm/kvm_para.h (renamed from arch/mips/include/asm/kvm_para.h)0
-rw-r--r--arch/mips/include/uapi/asm/mman.h (renamed from arch/mips/include/asm/mman.h)0
-rw-r--r--arch/mips/include/uapi/asm/msgbuf.h (renamed from arch/mips/include/asm/msgbuf.h)0
-rw-r--r--arch/mips/include/uapi/asm/param.h (renamed from arch/mips/include/asm/param.h)0
-rw-r--r--arch/mips/include/uapi/asm/poll.h (renamed from arch/mips/include/asm/poll.h)0
-rw-r--r--arch/mips/include/uapi/asm/posix_types.h (renamed from arch/mips/include/asm/posix_types.h)0
-rw-r--r--arch/mips/include/uapi/asm/ptrace.h116
-rw-r--r--arch/mips/include/uapi/asm/resource.h (renamed from arch/mips/include/asm/resource.h)0
-rw-r--r--arch/mips/include/uapi/asm/sembuf.h (renamed from arch/mips/include/asm/sembuf.h)0
-rw-r--r--arch/mips/include/uapi/asm/setup.h7
-rw-r--r--arch/mips/include/uapi/asm/sgidefs.h (renamed from arch/mips/include/asm/sgidefs.h)0
-rw-r--r--arch/mips/include/uapi/asm/shmbuf.h (renamed from arch/mips/include/asm/shmbuf.h)0
-rw-r--r--arch/mips/include/uapi/asm/sigcontext.h78
-rw-r--r--arch/mips/include/uapi/asm/siginfo.h114
-rw-r--r--arch/mips/include/uapi/asm/signal.h123
-rw-r--r--arch/mips/include/uapi/asm/socket.h93
-rw-r--r--arch/mips/include/uapi/asm/sockios.h (renamed from arch/mips/include/asm/sockios.h)0
-rw-r--r--arch/mips/include/uapi/asm/stat.h (renamed from arch/mips/include/asm/stat.h)0
-rw-r--r--arch/mips/include/uapi/asm/statfs.h (renamed from arch/mips/include/asm/statfs.h)0
-rw-r--r--arch/mips/include/uapi/asm/swab.h (renamed from arch/mips/include/asm/swab.h)0
-rw-r--r--arch/mips/include/uapi/asm/sysmips.h (renamed from arch/mips/include/asm/sysmips.h)0
-rw-r--r--arch/mips/include/uapi/asm/termbits.h (renamed from arch/mips/include/asm/termbits.h)0
-rw-r--r--arch/mips/include/uapi/asm/termios.h80
-rw-r--r--arch/mips/include/uapi/asm/types.h27
-rw-r--r--arch/mips/include/uapi/asm/unistd.h1035
-rw-r--r--arch/mips/kernel/Makefile1
-rw-r--r--arch/mips/kernel/asm-offsets.c10
-rw-r--r--arch/mips/kernel/cpu-probe.c11
-rw-r--r--arch/mips/kernel/kspd.c423
-rw-r--r--arch/mips/kernel/perf_event_mipsxx.c262
-rw-r--r--arch/mips/kernel/proc.c19
-rw-r--r--arch/mips/kernel/vmlinux.lds.S21
-rw-r--r--arch/mips/kernel/vpe.c24
-rw-r--r--arch/mips/mm/init.c17
-rw-r--r--arch/mips/mm/pgtable-64.c20
-rw-r--r--arch/mips/mm/tlbex.c23
-rw-r--r--arch/mips/pci/fixup-malta.c3
-rw-r--r--arch/mips/sni/a20r.c27
-rw-r--r--include/asm-generic/vmlinux.lds.h9
107 files changed, 2895 insertions, 4493 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index aae16cdfe306..dba9390d37cf 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1931,6 +1931,7 @@ config MIPS_MT_SMP
1931 select SYS_SUPPORTS_SCHED_SMT if SMP 1931 select SYS_SUPPORTS_SCHED_SMT if SMP
1932 select SYS_SUPPORTS_SMP 1932 select SYS_SUPPORTS_SMP
1933 select SMP_UP 1933 select SMP_UP
1934 select MIPS_PERF_SHARED_TC_COUNTERS
1934 help 1935 help
1935 This is a kernel model which is known a VSMP but lately has been 1936 This is a kernel model which is known a VSMP but lately has been
1936 marketesed into SMVP. 1937 marketesed into SMVP.
@@ -2041,16 +2042,6 @@ config MIPS_VPE_APSP_API
2041 depends on MIPS_VPE_LOADER 2042 depends on MIPS_VPE_LOADER
2042 help 2043 help
2043 2044
2044config MIPS_APSP_KSPD
2045 bool "Enable KSPD"
2046 depends on MIPS_VPE_APSP_API
2047 default y
2048 help
2049 KSPD is a kernel daemon that accepts syscall requests from the SP
2050 side, actions them and returns the results. It also handles the
2051 "exit" syscall notifying other kernel modules the SP program is
2052 exiting. You probably want to say yes here.
2053
2054config MIPS_CMP 2045config MIPS_CMP
2055 bool "MIPS CMP framework support" 2046 bool "MIPS CMP framework support"
2056 depends on SYS_SUPPORTS_MIPS_CMP 2047 depends on SYS_SUPPORTS_MIPS_CMP
@@ -2280,6 +2271,9 @@ config NR_CPUS
2280 performance should round up your number of processors to the next 2271 performance should round up your number of processors to the next
2281 power of two. 2272 power of two.
2282 2273
2274config MIPS_PERF_SHARED_TC_COUNTERS
2275 bool
2276
2283# 2277#
2284# Timer Interrupt Frequency Configuration 2278# Timer Interrupt Frequency Configuration
2285# 2279#
diff --git a/arch/mips/alchemy/Kconfig b/arch/mips/alchemy/Kconfig
index 0faaab24376e..c8862bdc2ff2 100644
--- a/arch/mips/alchemy/Kconfig
+++ b/arch/mips/alchemy/Kconfig
@@ -27,7 +27,7 @@ config MIPS_MTX1
27 select SYS_HAS_EARLY_PRINTK 27 select SYS_HAS_EARLY_PRINTK
28 28
29config MIPS_DB1000 29config MIPS_DB1000
30 bool "Alchemy DB1000/DB1500/DB1100 boards" 30 bool "Alchemy DB1000/DB1500/DB1100 PB1500/1100 boards"
31 select ALCHEMY_GPIOINT_AU1000 31 select ALCHEMY_GPIOINT_AU1000
32 select DMA_NONCOHERENT 32 select DMA_NONCOHERENT
33 select HW_HAS_PCI 33 select HW_HAS_PCI
@@ -36,57 +36,15 @@ config MIPS_DB1000
36 select SYS_SUPPORTS_LITTLE_ENDIAN 36 select SYS_SUPPORTS_LITTLE_ENDIAN
37 select SYS_HAS_EARLY_PRINTK 37 select SYS_HAS_EARLY_PRINTK
38 38
39config MIPS_DB1200 39config MIPS_DB1235
40 bool "Alchemy DB1200/PB1200 board" 40 bool "Alchemy DB1200/PB1200/DB1300/DB1550/PB1550 boards"
41 select ALCHEMY_GPIOINT_AU1000 41 select ARCH_REQUIRE_GPIOLIB
42 select DMA_COHERENT
43 select MIPS_DISABLE_OBSOLETE_IDE
44 select SYS_SUPPORTS_LITTLE_ENDIAN
45 select SYS_HAS_EARLY_PRINTK
46
47config MIPS_DB1300
48 bool "NetLogic DB1300 board"
49 select ALCHEMY_GPIOINT_AU1300
50 select DMA_COHERENT
51 select MIPS_DISABLE_OBSOLETE_IDE
52 select SYS_SUPPORTS_LITTLE_ENDIAN
53 select SYS_HAS_EARLY_PRINTK
54
55config MIPS_DB1550
56 bool "Alchemy DB1550 board"
57 select ALCHEMY_GPIOINT_AU1000
58 select HW_HAS_PCI 42 select HW_HAS_PCI
59 select DMA_COHERENT 43 select DMA_COHERENT
60 select MIPS_DISABLE_OBSOLETE_IDE 44 select MIPS_DISABLE_OBSOLETE_IDE
61 select SYS_SUPPORTS_LITTLE_ENDIAN 45 select SYS_SUPPORTS_LITTLE_ENDIAN
62 select SYS_HAS_EARLY_PRINTK 46 select SYS_HAS_EARLY_PRINTK
63 47
64config MIPS_PB1100
65 bool "Alchemy PB1100 board"
66 select ALCHEMY_GPIOINT_AU1000
67 select DMA_NONCOHERENT
68 select HW_HAS_PCI
69 select SWAP_IO_SPACE
70 select SYS_SUPPORTS_LITTLE_ENDIAN
71 select SYS_HAS_EARLY_PRINTK
72
73config MIPS_PB1500
74 bool "Alchemy PB1500 board"
75 select ALCHEMY_GPIOINT_AU1000
76 select DMA_NONCOHERENT
77 select HW_HAS_PCI
78 select SYS_SUPPORTS_LITTLE_ENDIAN
79 select SYS_HAS_EARLY_PRINTK
80
81config MIPS_PB1550
82 bool "Alchemy PB1550 board"
83 select ALCHEMY_GPIOINT_AU1000
84 select DMA_NONCOHERENT
85 select HW_HAS_PCI
86 select MIPS_DISABLE_OBSOLETE_IDE
87 select SYS_SUPPORTS_LITTLE_ENDIAN
88 select SYS_HAS_EARLY_PRINTK
89
90config MIPS_XXS1500 48config MIPS_XXS1500
91 bool "MyCable XXS1500 board" 49 bool "MyCable XXS1500 board"
92 select DMA_NONCOHERENT 50 select DMA_NONCOHERENT
diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform
index 7956274de15f..942c5800a684 100644
--- a/arch/mips/alchemy/Platform
+++ b/arch/mips/alchemy/Platform
@@ -30,25 +30,11 @@ cflags-$(CONFIG_MIPS_DB1000) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
30load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000 30load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
31 31
32# 32#
33# AMD Alchemy Db1550 eval board 33# AMD Alchemy Db1200/Pb1200/Db1550/Db1300 eval boards
34# 34#
35platform-$(CONFIG_MIPS_DB1550) += alchemy/devboards/ 35platform-$(CONFIG_MIPS_DB1235) += alchemy/devboards/
36cflags-$(CONFIG_MIPS_DB1550) += -I$(srctree)/arch/mips/include/asm/mach-db1x00 36cflags-$(CONFIG_MIPS_DB1235) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
37load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000 37load-$(CONFIG_MIPS_DB1235) += 0xffffffff80100000
38
39#
40# AMD Alchemy Db1200/Pb1200 eval boards
41#
42platform-$(CONFIG_MIPS_DB1200) += alchemy/devboards/
43cflags-$(CONFIG_MIPS_DB1200) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
44load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
45
46#
47# NetLogic DBAu1300 development platform
48#
49platform-$(CONFIG_MIPS_DB1300) += alchemy/devboards/
50cflags-$(CONFIG_MIPS_DB1300) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
51load-$(CONFIG_MIPS_DB1300) += 0xffffffff80100000
52 38
53# 39#
54# 4G-Systems MTX-1 "MeshCube" wireless router 40# 4G-Systems MTX-1 "MeshCube" wireless router
diff --git a/arch/mips/alchemy/devboards/Makefile b/arch/mips/alchemy/devboards/Makefile
index c9e747dd9fc2..15bf7306648b 100644
--- a/arch/mips/alchemy/devboards/Makefile
+++ b/arch/mips/alchemy/devboards/Makefile
@@ -4,10 +4,5 @@
4 4
5obj-y += bcsr.o platform.o 5obj-y += bcsr.o platform.o
6obj-$(CONFIG_PM) += pm.o 6obj-$(CONFIG_PM) += pm.o
7obj-$(CONFIG_MIPS_PB1100) += pb1100.o
8obj-$(CONFIG_MIPS_PB1500) += pb1500.o
9obj-$(CONFIG_MIPS_PB1550) += pb1550.o
10obj-$(CONFIG_MIPS_DB1000) += db1000.o 7obj-$(CONFIG_MIPS_DB1000) += db1000.o
11obj-$(CONFIG_MIPS_DB1200) += db1200.o 8obj-$(CONFIG_MIPS_DB1235) += db1235.o db1200.o db1300.o db1550.o
12obj-$(CONFIG_MIPS_DB1300) += db1300.o
13obj-$(CONFIG_MIPS_DB1550) += db1550.o
diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
index 1b81dbf6b804..8187845650f7 100644
--- a/arch/mips/alchemy/devboards/db1000.c
+++ b/arch/mips/alchemy/devboards/db1000.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * DBAu1000/1500/1100 board support 2 * DBAu1000/1500/1100 PBAu1100/1500 board support
3 * 3 *
4 * Copyright 2000, 2008 MontaVista Software Inc. 4 * Copyright 2000, 2008 MontaVista Software Inc.
5 * Author: MontaVista Software, Inc. <source@mvista.com> 5 * Author: MontaVista Software, Inc. <source@mvista.com>
@@ -52,6 +52,11 @@ static const char *board_type_str(void)
52 return "DB1500"; 52 return "DB1500";
53 case BCSR_WHOAMI_DB1100: 53 case BCSR_WHOAMI_DB1100:
54 return "DB1100"; 54 return "DB1100";
55 case BCSR_WHOAMI_PB1500:
56 case BCSR_WHOAMI_PB1500R2:
57 return "PB1500";
58 case BCSR_WHOAMI_PB1100:
59 return "PB1100";
55 default: 60 default:
56 return "(unknown)"; 61 return "(unknown)";
57 } 62 }
@@ -111,7 +116,9 @@ static struct platform_device db1500_pci_host_dev = {
111 116
112static int __init db1500_pci_init(void) 117static int __init db1500_pci_init(void)
113{ 118{
114 if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1500) 119 int id = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
120 if ((id == BCSR_WHOAMI_DB1500) || (id == BCSR_WHOAMI_PB1500) ||
121 (id == BCSR_WHOAMI_PB1500R2))
115 return platform_device_register(&db1500_pci_host_dev); 122 return platform_device_register(&db1500_pci_host_dev);
116 return 0; 123 return 0;
117} 124}
@@ -199,27 +206,37 @@ static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
199 206
200static int db1100_mmc_cd_setup(void *mmc_host, int en) 207static int db1100_mmc_cd_setup(void *mmc_host, int en)
201{ 208{
202 int ret = 0; 209 int ret = 0, irq;
210
211 if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
212 irq = AU1100_GPIO19_INT;
213 else
214 irq = AU1100_GPIO14_INT; /* PB1100 SD0 CD# */
203 215
204 if (en) { 216 if (en) {
205 irq_set_irq_type(AU1100_GPIO19_INT, IRQ_TYPE_EDGE_BOTH); 217 irq_set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
206 ret = request_irq(AU1100_GPIO19_INT, db1100_mmc_cd, 0, 218 ret = request_irq(irq, db1100_mmc_cd, 0,
207 "sd0_cd", mmc_host); 219 "sd0_cd", mmc_host);
208 } else 220 } else
209 free_irq(AU1100_GPIO19_INT, mmc_host); 221 free_irq(irq, mmc_host);
210 return ret; 222 return ret;
211} 223}
212 224
213static int db1100_mmc1_cd_setup(void *mmc_host, int en) 225static int db1100_mmc1_cd_setup(void *mmc_host, int en)
214{ 226{
215 int ret = 0; 227 int ret = 0, irq;
228
229 if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
230 irq = AU1100_GPIO20_INT;
231 else
232 irq = AU1100_GPIO15_INT; /* PB1100 SD1 CD# */
216 233
217 if (en) { 234 if (en) {
218 irq_set_irq_type(AU1100_GPIO20_INT, IRQ_TYPE_EDGE_BOTH); 235 irq_set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
219 ret = request_irq(AU1100_GPIO20_INT, db1100_mmc_cd, 0, 236 ret = request_irq(irq, db1100_mmc_cd, 0,
220 "sd1_cd", mmc_host); 237 "sd1_cd", mmc_host);
221 } else 238 } else
222 free_irq(AU1100_GPIO20_INT, mmc_host); 239 free_irq(irq, mmc_host);
223 return ret; 240 return ret;
224} 241}
225 242
@@ -236,11 +253,18 @@ static int db1100_mmc_card_inserted(void *mmc_host)
236 253
237static void db1100_mmc_set_power(void *mmc_host, int state) 254static void db1100_mmc_set_power(void *mmc_host, int state)
238{ 255{
256 int bit;
257
258 if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
259 bit = BCSR_BOARD_SD0PWR;
260 else
261 bit = BCSR_BOARD_PB1100_SD0PWR;
262
239 if (state) { 263 if (state) {
240 bcsr_mod(BCSR_BOARD, 0, BCSR_BOARD_SD0PWR); 264 bcsr_mod(BCSR_BOARD, 0, bit);
241 msleep(400); /* stabilization time */ 265 msleep(400); /* stabilization time */
242 } else 266 } else
243 bcsr_mod(BCSR_BOARD, BCSR_BOARD_SD0PWR, 0); 267 bcsr_mod(BCSR_BOARD, bit, 0);
244} 268}
245 269
246static void db1100_mmcled_set(struct led_classdev *led, enum led_brightness b) 270static void db1100_mmcled_set(struct led_classdev *led, enum led_brightness b)
@@ -267,11 +291,18 @@ static int db1100_mmc1_card_inserted(void *mmc_host)
267 291
268static void db1100_mmc1_set_power(void *mmc_host, int state) 292static void db1100_mmc1_set_power(void *mmc_host, int state)
269{ 293{
294 int bit;
295
296 if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
297 bit = BCSR_BOARD_SD1PWR;
298 else
299 bit = BCSR_BOARD_PB1100_SD1PWR;
300
270 if (state) { 301 if (state) {
271 bcsr_mod(BCSR_BOARD, 0, BCSR_BOARD_SD1PWR); 302 bcsr_mod(BCSR_BOARD, 0, bit);
272 msleep(400); /* stabilization time */ 303 msleep(400); /* stabilization time */
273 } else 304 } else
274 bcsr_mod(BCSR_BOARD, BCSR_BOARD_SD1PWR, 0); 305 bcsr_mod(BCSR_BOARD, bit, 0);
275} 306}
276 307
277static void db1100_mmc1led_set(struct led_classdev *led, enum led_brightness b) 308static void db1100_mmc1led_set(struct led_classdev *led, enum led_brightness b)
@@ -480,13 +511,12 @@ static struct platform_device *db1100_devs[] = {
480 &db1100_mmc0_dev, 511 &db1100_mmc0_dev,
481 &db1100_mmc1_dev, 512 &db1100_mmc1_dev,
482 &db1000_irda_dev, 513 &db1000_irda_dev,
483 &db1100_spi_dev,
484}; 514};
485 515
486static int __init db1000_dev_init(void) 516static int __init db1000_dev_init(void)
487{ 517{
488 int board = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)); 518 int board = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
489 int c0, c1, d0, d1, s0, s1; 519 int c0, c1, d0, d1, s0, s1, flashsize = 32, twosocks = 1;
490 unsigned long pfc; 520 unsigned long pfc;
491 521
492 if (board == BCSR_WHOAMI_DB1500) { 522 if (board == BCSR_WHOAMI_DB1500) {
@@ -522,6 +552,7 @@ static int __init db1000_dev_init(void)
522 ARRAY_SIZE(db1100_spi_info)); 552 ARRAY_SIZE(db1100_spi_info));
523 553
524 platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs)); 554 platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs));
555 platform_device_register(&db1100_spi_dev);
525 } else if (board == BCSR_WHOAMI_DB1000) { 556 } else if (board == BCSR_WHOAMI_DB1000) {
526 c0 = AU1000_GPIO2_INT; 557 c0 = AU1000_GPIO2_INT;
527 c1 = AU1000_GPIO5_INT; 558 c1 = AU1000_GPIO5_INT;
@@ -530,15 +561,42 @@ static int __init db1000_dev_init(void)
530 s0 = AU1000_GPIO1_INT; 561 s0 = AU1000_GPIO1_INT;
531 s1 = AU1000_GPIO4_INT; 562 s1 = AU1000_GPIO4_INT;
532 platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs)); 563 platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs));
564 } else if ((board == BCSR_WHOAMI_PB1500) ||
565 (board == BCSR_WHOAMI_PB1500R2)) {
566 c0 = AU1500_GPIO203_INT;
567 d0 = AU1500_GPIO201_INT;
568 s0 = AU1500_GPIO202_INT;
569 twosocks = 0;
570 flashsize = 64;
571 /* RTC and daughtercard irqs */
572 irq_set_irq_type(AU1500_GPIO204_INT, IRQ_TYPE_LEVEL_LOW);
573 irq_set_irq_type(AU1500_GPIO205_INT, IRQ_TYPE_LEVEL_LOW);
574 /* EPSON S1D13806 0x1b000000
575 * SRAM 1MB/2MB 0x1a000000
576 * DS1693 RTC 0x0c000000
577 */
578 } else if (board == BCSR_WHOAMI_PB1100) {
579 c0 = AU1100_GPIO11_INT;
580 d0 = AU1100_GPIO9_INT;
581 s0 = AU1100_GPIO10_INT;
582 twosocks = 0;
583 flashsize = 64;
584 /* pendown, rtc, daughtercard irqs */
585 irq_set_irq_type(AU1100_GPIO8_INT, IRQ_TYPE_LEVEL_LOW);
586 irq_set_irq_type(AU1100_GPIO12_INT, IRQ_TYPE_LEVEL_LOW);
587 irq_set_irq_type(AU1100_GPIO13_INT, IRQ_TYPE_LEVEL_LOW);
588 /* EPSON S1D13806 0x1b000000
589 * SRAM 1MB/2MB 0x1a000000
590 * DiskOnChip 0x0d000000
591 * DS1693 RTC 0x0c000000
592 */
593 platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs));
533 } else 594 } else
534 return 0; /* unknown board, no further dev setup to do */ 595 return 0; /* unknown board, no further dev setup to do */
535 596
536 irq_set_irq_type(d0, IRQ_TYPE_EDGE_BOTH); 597 irq_set_irq_type(d0, IRQ_TYPE_EDGE_BOTH);
537 irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH);
538 irq_set_irq_type(c0, IRQ_TYPE_LEVEL_LOW); 598 irq_set_irq_type(c0, IRQ_TYPE_LEVEL_LOW);
539 irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW);
540 irq_set_irq_type(s0, IRQ_TYPE_LEVEL_LOW); 599 irq_set_irq_type(s0, IRQ_TYPE_LEVEL_LOW);
541 irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
542 600
543 db1x_register_pcmcia_socket( 601 db1x_register_pcmcia_socket(
544 AU1000_PCMCIA_ATTR_PHYS_ADDR, 602 AU1000_PCMCIA_ATTR_PHYS_ADDR,
@@ -549,17 +607,23 @@ static int __init db1000_dev_init(void)
549 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, 607 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
550 c0, d0, /*s0*/0, 0, 0); 608 c0, d0, /*s0*/0, 0, 0);
551 609
552 db1x_register_pcmcia_socket( 610 if (twosocks) {
553 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000, 611 irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH);
554 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1, 612 irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW);
555 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000, 613 irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
556 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1, 614
557 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000, 615 db1x_register_pcmcia_socket(
558 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1, 616 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
559 c1, d1, /*s1*/0, 0, 1); 617 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
618 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000,
619 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
620 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
621 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
622 c1, d1, /*s1*/0, 0, 1);
623 }
560 624
561 platform_add_devices(db1x00_devs, ARRAY_SIZE(db1x00_devs)); 625 platform_add_devices(db1x00_devs, ARRAY_SIZE(db1x00_devs));
562 db1x_register_norflash(32 << 20, 4 /* 32bit */, F_SWAPPED); 626 db1x_register_norflash(flashsize << 20, 4 /* 32bit */, F_SWAPPED);
563 return 0; 627 return 0;
564} 628}
565device_initcall(db1000_dev_init); 629device_initcall(db1000_dev_init);
diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c
index bf2248474fa8..299b7d202bea 100644
--- a/arch/mips/alchemy/devboards/db1200.c
+++ b/arch/mips/alchemy/devboards/db1200.c
@@ -45,25 +45,9 @@
45 45
46#include "platform.h" 46#include "platform.h"
47 47
48static const char *board_type_str(void) 48const char *get_system_type(void);
49{
50 switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
51 case BCSR_WHOAMI_PB1200_DDR1:
52 case BCSR_WHOAMI_PB1200_DDR2:
53 return "PB1200";
54 case BCSR_WHOAMI_DB1200:
55 return "DB1200";
56 default:
57 return "(unknown)";
58 }
59}
60 49
61const char *get_system_type(void) 50static int __init db1200_detect_board(void)
62{
63 return board_type_str();
64}
65
66static int __init detect_board(void)
67{ 51{
68 int bid; 52 int bid;
69 53
@@ -96,19 +80,17 @@ static int __init detect_board(void)
96 return 1; /* it's neither */ 80 return 1; /* it's neither */
97} 81}
98 82
99void __init board_setup(void) 83int __init db1200_board_setup(void)
100{ 84{
101 unsigned long freq0, clksrc, div, pfc; 85 unsigned long freq0, clksrc, div, pfc;
102 unsigned short whoami; 86 unsigned short whoami;
103 87
104 if (detect_board()) { 88 if (db1200_detect_board())
105 printk(KERN_ERR "NOT running on a DB1200/PB1200 board!\n"); 89 return -ENODEV;
106 return;
107 }
108 90
109 whoami = bcsr_read(BCSR_WHOAMI); 91 whoami = bcsr_read(BCSR_WHOAMI);
110 printk(KERN_INFO "Alchemy/AMD/RMI %s Board, CPLD Rev %d" 92 printk(KERN_INFO "Alchemy/AMD/RMI %s Board, CPLD Rev %d"
111 " Board-ID %d Daughtercard ID %d\n", board_type_str(), 93 " Board-ID %d Daughtercard ID %d\n", get_system_type(),
112 (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); 94 (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf);
113 95
114 /* SMBus/SPI on PSC0, Audio on PSC1 */ 96 /* SMBus/SPI on PSC0, Audio on PSC1 */
@@ -138,6 +120,8 @@ void __init board_setup(void)
138 clksrc = SYS_CS_MUX_FQ0 << SYS_CS_ME0_BIT; 120 clksrc = SYS_CS_MUX_FQ0 << SYS_CS_ME0_BIT;
139 __raw_writel(clksrc, (void __iomem *)SYS_CLKSRC); 121 __raw_writel(clksrc, (void __iomem *)SYS_CLKSRC);
140 wmb(); 122 wmb();
123
124 return 0;
141} 125}
142 126
143/******************************************************************************/ 127/******************************************************************************/
@@ -796,7 +780,7 @@ static int __init pb1200_res_fixup(void)
796 return 0; 780 return 0;
797} 781}
798 782
799static int __init db1200_dev_init(void) 783int __init db1200_dev_setup(void)
800{ 784{
801 unsigned long pfc; 785 unsigned long pfc;
802 unsigned short sw; 786 unsigned short sw;
@@ -846,7 +830,7 @@ static int __init db1200_dev_init(void)
846 gpio_request(215, "otg-vbus"); 830 gpio_request(215, "otg-vbus");
847 gpio_direction_output(215, 1); 831 gpio_direction_output(215, 1);
848 832
849 printk(KERN_INFO "%s device configuration:\n", board_type_str()); 833 printk(KERN_INFO "%s device configuration:\n", get_system_type());
850 834
851 sw = bcsr_read(BCSR_SWITCHES); 835 sw = bcsr_read(BCSR_SWITCHES);
852 if (sw & BCSR_SWITCHES_DIP_8) { 836 if (sw & BCSR_SWITCHES_DIP_8) {
@@ -922,4 +906,3 @@ static int __init db1200_dev_init(void)
922 906
923 return 0; 907 return 0;
924} 908}
925device_initcall(db1200_dev_init);
diff --git a/arch/mips/alchemy/devboards/db1235.c b/arch/mips/alchemy/devboards/db1235.c
new file mode 100644
index 000000000000..c76a90f78664
--- /dev/null
+++ b/arch/mips/alchemy/devboards/db1235.c
@@ -0,0 +1,94 @@
1/*
2 * DB1200/PB1200 / DB1550 / DB1300 board support.
3 *
4 * These 4 boards can reliably be supported in a single kernel image.
5 */
6
7#include <asm/mach-au1x00/au1000.h>
8#include <asm/mach-db1x00/bcsr.h>
9
10int __init db1200_board_setup(void);
11int __init db1200_dev_setup(void);
12int __init db1300_board_setup(void);
13int __init db1300_dev_setup(void);
14int __init db1550_board_setup(void);
15int __init db1550_dev_setup(void);
16int __init db1550_pci_setup(int);
17
18static const char *board_type_str(void)
19{
20 switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
21 case BCSR_WHOAMI_PB1200_DDR1:
22 case BCSR_WHOAMI_PB1200_DDR2:
23 return "PB1200";
24 case BCSR_WHOAMI_DB1200:
25 return "DB1200";
26 case BCSR_WHOAMI_DB1300:
27 return "DB1300";
28 case BCSR_WHOAMI_DB1550:
29 return "DB1550";
30 case BCSR_WHOAMI_PB1550_SDR:
31 case BCSR_WHOAMI_PB1550_DDR:
32 return "PB1550";
33 default:
34 return "(unknown)";
35 }
36}
37
38const char *get_system_type(void)
39{
40 return board_type_str();
41}
42
43void __init board_setup(void)
44{
45 int ret;
46
47 switch (alchemy_get_cputype()) {
48 case ALCHEMY_CPU_AU1550:
49 ret = db1550_board_setup();
50 break;
51 case ALCHEMY_CPU_AU1200:
52 ret = db1200_board_setup();
53 break;
54 case ALCHEMY_CPU_AU1300:
55 ret = db1300_board_setup();
56 break;
57 default:
58 pr_err("unsupported CPU on board\n");
59 ret = -ENODEV;
60 }
61 if (ret)
62 panic("cannot initialize board support\n");
63}
64
65int __init db1235_arch_init(void)
66{
67 int id = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
68 if (id == BCSR_WHOAMI_DB1550)
69 return db1550_pci_setup(0);
70 else if ((id == BCSR_WHOAMI_PB1550_SDR) ||
71 (id == BCSR_WHOAMI_PB1550_DDR))
72 return db1550_pci_setup(1);
73
74 return 0;
75}
76arch_initcall(db1235_arch_init);
77
78int __init db1235_dev_init(void)
79{
80 switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
81 case BCSR_WHOAMI_PB1200_DDR1:
82 case BCSR_WHOAMI_PB1200_DDR2:
83 case BCSR_WHOAMI_DB1200:
84 return db1200_dev_setup();
85 case BCSR_WHOAMI_DB1300:
86 return db1300_dev_setup();
87 case BCSR_WHOAMI_DB1550:
88 case BCSR_WHOAMI_PB1550_SDR:
89 case BCSR_WHOAMI_PB1550_DDR:
90 return db1550_dev_setup();
91 }
92 return 0;
93}
94device_initcall(db1235_dev_init);
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c
index c56e0246694e..cdf37cbd3d1f 100644
--- a/arch/mips/alchemy/devboards/db1300.c
+++ b/arch/mips/alchemy/devboards/db1300.c
@@ -110,11 +110,6 @@ static void __init db1300_gpio_config(void)
110 au1300_set_dbdma_gpio(1, AU1300_PIN_FG3AUX); 110 au1300_set_dbdma_gpio(1, AU1300_PIN_FG3AUX);
111} 111}
112 112
113char *get_system_type(void)
114{
115 return "DB1300";
116}
117
118/**********************************************************************/ 113/**********************************************************************/
119 114
120static void au1300_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, 115static void au1300_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
@@ -701,7 +696,7 @@ static struct platform_device *db1300_dev[] __initdata = {
701 &db1300_sndi2s_dev, 696 &db1300_sndi2s_dev,
702}; 697};
703 698
704static int __init db1300_device_init(void) 699int __init db1300_dev_setup(void)
705{ 700{
706 int swapped, cpldirq; 701 int swapped, cpldirq;
707 702
@@ -758,10 +753,9 @@ static int __init db1300_device_init(void)
758 753
759 return platform_add_devices(db1300_dev, ARRAY_SIZE(db1300_dev)); 754 return platform_add_devices(db1300_dev, ARRAY_SIZE(db1300_dev));
760} 755}
761device_initcall(db1300_device_init);
762 756
763 757
764void __init board_setup(void) 758int __init db1300_board_setup(void)
765{ 759{
766 unsigned short whoami; 760 unsigned short whoami;
767 761
@@ -779,4 +773,6 @@ void __init board_setup(void)
779 alchemy_uart_enable(AU1300_UART0_PHYS_ADDR); 773 alchemy_uart_enable(AU1300_UART0_PHYS_ADDR);
780 alchemy_uart_enable(AU1300_UART1_PHYS_ADDR); 774 alchemy_uart_enable(AU1300_UART1_PHYS_ADDR);
781 alchemy_uart_enable(AU1300_UART3_PHYS_ADDR); 775 alchemy_uart_enable(AU1300_UART3_PHYS_ADDR);
776
777 return 0;
782} 778}
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
index 9eb79062f46e..5a9ae6095428 100644
--- a/arch/mips/alchemy/devboards/db1550.c
+++ b/arch/mips/alchemy/devboards/db1550.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Alchemy Db1550 board support 2 * Alchemy Db1550/Pb1550 board support
3 * 3 *
4 * (c) 2011 Manuel Lauss <manuel.lauss@googlemail.com> 4 * (c) 2011 Manuel Lauss <manuel.lauss@googlemail.com>
5 */ 5 */
@@ -17,34 +17,29 @@
17#include <linux/pm.h> 17#include <linux/pm.h>
18#include <linux/spi/spi.h> 18#include <linux/spi/spi.h>
19#include <linux/spi/flash.h> 19#include <linux/spi/flash.h>
20#include <asm/bootinfo.h>
20#include <asm/mach-au1x00/au1000.h> 21#include <asm/mach-au1x00/au1000.h>
21#include <asm/mach-au1x00/au1xxx_eth.h> 22#include <asm/mach-au1x00/au1xxx_eth.h>
22#include <asm/mach-au1x00/au1xxx_dbdma.h> 23#include <asm/mach-au1x00/au1xxx_dbdma.h>
23#include <asm/mach-au1x00/au1xxx_psc.h> 24#include <asm/mach-au1x00/au1xxx_psc.h>
24#include <asm/mach-au1x00/au1550_spi.h> 25#include <asm/mach-au1x00/au1550_spi.h>
26#include <asm/mach-au1x00/au1550nd.h>
25#include <asm/mach-db1x00/bcsr.h> 27#include <asm/mach-db1x00/bcsr.h>
26#include <prom.h> 28#include <prom.h>
27#include "platform.h" 29#include "platform.h"
28 30
29
30const char *get_system_type(void)
31{
32 return "DB1550";
33}
34
35static void __init db1550_hw_setup(void) 31static void __init db1550_hw_setup(void)
36{ 32{
37 void __iomem *base; 33 void __iomem *base;
38 34
39 alchemy_gpio_direction_output(203, 0); /* red led on */
40
41 /* complete SPI setup: link psc0_intclk to a 48MHz source, 35 /* complete SPI setup: link psc0_intclk to a 48MHz source,
42 * and assign GPIO16 to PSC0_SYNC1 (SPI cs# line) 36 * and assign GPIO16 to PSC0_SYNC1 (SPI cs# line) as well as PSC1_SYNC
37 * for AC97 on PB1550.
43 */ 38 */
44 base = (void __iomem *)SYS_CLKSRC; 39 base = (void __iomem *)SYS_CLKSRC;
45 __raw_writel(__raw_readl(base) | 0x000001e0, base); 40 __raw_writel(__raw_readl(base) | 0x000001e0, base);
46 base = (void __iomem *)SYS_PINFUNC; 41 base = (void __iomem *)SYS_PINFUNC;
47 __raw_writel(__raw_readl(base) | 1, base); 42 __raw_writel(__raw_readl(base) | 1 | SYS_PF_PSC1_S1, base);
48 wmb(); 43 wmb();
49 44
50 /* reset the AC97 codec now, the reset time in the psc-ac97 driver 45 /* reset the AC97 codec now, the reset time in the psc-ac97 driver
@@ -57,23 +52,27 @@ static void __init db1550_hw_setup(void)
57 wmb(); 52 wmb();
58 __raw_writel(PSC_AC97RST_RST, base + PSC_AC97RST_OFFSET); 53 __raw_writel(PSC_AC97RST_RST, base + PSC_AC97RST_OFFSET);
59 wmb(); 54 wmb();
60
61 alchemy_gpio_direction_output(202, 0); /* green led on */
62} 55}
63 56
64void __init board_setup(void) 57int __init db1550_board_setup(void)
65{ 58{
66 unsigned short whoami; 59 unsigned short whoami;
67 60
68 bcsr_init(DB1550_BCSR_PHYS_ADDR, 61 bcsr_init(DB1550_BCSR_PHYS_ADDR,
69 DB1550_BCSR_PHYS_ADDR + DB1550_BCSR_HEXLED_OFS); 62 DB1550_BCSR_PHYS_ADDR + DB1550_BCSR_HEXLED_OFS);
70 63
71 whoami = bcsr_read(BCSR_WHOAMI); 64 whoami = bcsr_read(BCSR_WHOAMI); /* PB1550 hexled offset differs */
72 printk(KERN_INFO "Alchemy/AMD DB1550 Board, CPLD Rev %d" 65 if ((BCSR_WHOAMI_BOARD(whoami) == BCSR_WHOAMI_PB1550_SDR) ||
73 " Board-ID %d Daughtercard ID %d\n", 66 (BCSR_WHOAMI_BOARD(whoami) == BCSR_WHOAMI_PB1550_DDR))
67 bcsr_init(PB1550_BCSR_PHYS_ADDR,
68 PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS);
69
70 pr_info("Alchemy/AMD %s Board, CPLD Rev %d Board-ID %d " \
71 "Daughtercard ID %d\n", get_system_type(),
74 (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); 72 (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf);
75 73
76 db1550_hw_setup(); 74 db1550_hw_setup();
75 return 0;
77} 76}
78 77
79/*****************************************************************************/ 78/*****************************************************************************/
@@ -194,6 +193,39 @@ static struct platform_device db1550_nand_dev = {
194 } 193 }
195}; 194};
196 195
196static struct au1550nd_platdata pb1550_nand_pd = {
197 .parts = db1550_nand_parts,
198 .num_parts = ARRAY_SIZE(db1550_nand_parts),
199 .devwidth = 0, /* x8 NAND default, needs fixing up */
200};
201
202static struct platform_device pb1550_nand_dev = {
203 .name = "au1550-nand",
204 .id = -1,
205 .resource = db1550_nand_res,
206 .num_resources = ARRAY_SIZE(db1550_nand_res),
207 .dev = {
208 .platform_data = &pb1550_nand_pd,
209 },
210};
211
212static void __init pb1550_nand_setup(void)
213{
214 int boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) |
215 ((bcsr_read(BCSR_STATUS) >> 6) & 0x1);
216
217 gpio_direction_input(206); /* de-assert NAND CS# */
218 switch (boot_swapboot) {
219 case 0: case 2: case 8: case 0xC: case 0xD:
220 /* x16 NAND Flash */
221 pb1550_nand_pd.devwidth = 1;
222 /* fallthrough */
223 case 1: case 3: case 9: case 0xE: case 0xF:
224 /* x8 NAND, already set up */
225 platform_device_register(&pb1550_nand_dev);
226 }
227}
228
197/**********************************************************************/ 229/**********************************************************************/
198 230
199static struct resource au1550_psc0_res[] = { 231static struct resource au1550_psc0_res[] = {
@@ -394,6 +426,29 @@ static int db1550_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin)
394 return -1; 426 return -1;
395} 427}
396 428
429static int pb1550_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin)
430{
431 if ((slot < 12) || (slot > 13) || pin == 0)
432 return -1;
433 if (slot == 12) {
434 switch (pin) {
435 case 1: return AU1500_PCI_INTB;
436 case 2: return AU1500_PCI_INTC;
437 case 3: return AU1500_PCI_INTD;
438 case 4: return AU1500_PCI_INTA;
439 }
440 }
441 if (slot == 13) {
442 switch (pin) {
443 case 1: return AU1500_PCI_INTA;
444 case 2: return AU1500_PCI_INTB;
445 case 3: return AU1500_PCI_INTC;
446 case 4: return AU1500_PCI_INTD;
447 }
448 }
449 return -1;
450}
451
397static struct resource alchemy_pci_host_res[] = { 452static struct resource alchemy_pci_host_res[] = {
398 [0] = { 453 [0] = {
399 .start = AU1500_PCI_PHYS_ADDR, 454 .start = AU1500_PCI_PHYS_ADDR,
@@ -417,7 +472,6 @@ static struct platform_device db1550_pci_host_dev = {
417/**********************************************************************/ 472/**********************************************************************/
418 473
419static struct platform_device *db1550_devs[] __initdata = { 474static struct platform_device *db1550_devs[] __initdata = {
420 &db1550_nand_dev,
421 &db1550_i2c_dev, 475 &db1550_i2c_dev,
422 &db1550_ac97_dev, 476 &db1550_ac97_dev,
423 &db1550_spi_dev, 477 &db1550_spi_dev,
@@ -430,15 +484,16 @@ static struct platform_device *db1550_devs[] __initdata = {
430}; 484};
431 485
432/* must be arch_initcall; MIPS PCI scans busses in a subsys_initcall */ 486/* must be arch_initcall; MIPS PCI scans busses in a subsys_initcall */
433static int __init db1550_pci_init(void) 487int __init db1550_pci_setup(int id)
434{ 488{
489 if (id)
490 db1550_pci_pd.board_map_irq = pb1550_map_pci_irq;
435 return platform_device_register(&db1550_pci_host_dev); 491 return platform_device_register(&db1550_pci_host_dev);
436} 492}
437arch_initcall(db1550_pci_init);
438 493
439static int __init db1550_dev_init(void) 494static void __init db1550_devices(void)
440{ 495{
441 int swapped; 496 alchemy_gpio_direction_output(203, 0); /* red led on */
442 497
443 irq_set_irq_type(AU1550_GPIO0_INT, IRQ_TYPE_EDGE_BOTH); /* CD0# */ 498 irq_set_irq_type(AU1550_GPIO0_INT, IRQ_TYPE_EDGE_BOTH); /* CD0# */
444 irq_set_irq_type(AU1550_GPIO1_INT, IRQ_TYPE_EDGE_BOTH); /* CD1# */ 499 irq_set_irq_type(AU1550_GPIO1_INT, IRQ_TYPE_EDGE_BOTH); /* CD1# */
@@ -447,6 +502,75 @@ static int __init db1550_dev_init(void)
447 irq_set_irq_type(AU1550_GPIO21_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG0# */ 502 irq_set_irq_type(AU1550_GPIO21_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG0# */
448 irq_set_irq_type(AU1550_GPIO22_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG1# */ 503 irq_set_irq_type(AU1550_GPIO22_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG1# */
449 504
505 db1x_register_pcmcia_socket(
506 AU1000_PCMCIA_ATTR_PHYS_ADDR,
507 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
508 AU1000_PCMCIA_MEM_PHYS_ADDR,
509 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
510 AU1000_PCMCIA_IO_PHYS_ADDR,
511 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
512 AU1550_GPIO3_INT, AU1550_GPIO0_INT,
513 /*AU1550_GPIO21_INT*/0, 0, 0);
514
515 db1x_register_pcmcia_socket(
516 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
517 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
518 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000,
519 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
520 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
521 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
522 AU1550_GPIO5_INT, AU1550_GPIO1_INT,
523 /*AU1550_GPIO22_INT*/0, 0, 1);
524
525 platform_device_register(&db1550_nand_dev);
526
527 alchemy_gpio_direction_output(202, 0); /* green led on */
528}
529
530static void __init pb1550_devices(void)
531{
532 irq_set_irq_type(AU1550_GPIO0_INT, IRQ_TYPE_LEVEL_LOW);
533 irq_set_irq_type(AU1550_GPIO1_INT, IRQ_TYPE_LEVEL_LOW);
534 irq_set_irq_type(AU1550_GPIO201_205_INT, IRQ_TYPE_LEVEL_HIGH);
535
536 /* enable both PCMCIA card irqs in the shared line */
537 alchemy_gpio2_enable_int(201); /* socket 0 card irq */
538 alchemy_gpio2_enable_int(202); /* socket 1 card irq */
539
540 /* Pb1550, like all others, also has statuschange irqs; however they're
541 * wired up on one of the Au1550's shared GPIO201_205 line, which also
542 * services the PCMCIA card interrupts. So we ignore statuschange and
543 * use the GPIO201_205 exclusively for card interrupts, since a) pcmcia
544 * drivers are used to shared irqs and b) statuschange isn't really use-
545 * ful anyway.
546 */
547 db1x_register_pcmcia_socket(
548 AU1000_PCMCIA_ATTR_PHYS_ADDR,
549 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
550 AU1000_PCMCIA_MEM_PHYS_ADDR,
551 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
552 AU1000_PCMCIA_IO_PHYS_ADDR,
553 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
554 AU1550_GPIO201_205_INT, AU1550_GPIO0_INT, 0, 0, 0);
555
556 db1x_register_pcmcia_socket(
557 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008000000,
558 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1,
559 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008000000,
560 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1,
561 AU1000_PCMCIA_IO_PHYS_ADDR + 0x008000000,
562 AU1000_PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1,
563 AU1550_GPIO201_205_INT, AU1550_GPIO1_INT, 0, 0, 1);
564
565 pb1550_nand_setup();
566}
567
568int __init db1550_dev_setup(void)
569{
570 int swapped, id;
571
572 id = (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) != BCSR_WHOAMI_DB1550);
573
450 i2c_register_board_info(0, db1550_i2c_devs, 574 i2c_register_board_info(0, db1550_i2c_devs,
451 ARRAY_SIZE(db1550_i2c_devs)); 575 ARRAY_SIZE(db1550_i2c_devs));
452 spi_register_board_info(db1550_spi_devs, 576 spi_register_board_info(db1550_spi_devs,
@@ -467,29 +591,11 @@ static int __init db1550_dev_init(void)
467 (void __iomem *)KSEG1ADDR(AU1550_PSC2_PHYS_ADDR) + PSC_SEL_OFFSET); 591 (void __iomem *)KSEG1ADDR(AU1550_PSC2_PHYS_ADDR) + PSC_SEL_OFFSET);
468 wmb(); 592 wmb();
469 593
470 db1x_register_pcmcia_socket( 594 id ? pb1550_devices() : db1550_devices();
471 AU1000_PCMCIA_ATTR_PHYS_ADDR,
472 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
473 AU1000_PCMCIA_MEM_PHYS_ADDR,
474 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
475 AU1000_PCMCIA_IO_PHYS_ADDR,
476 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
477 AU1550_GPIO3_INT, AU1550_GPIO0_INT,
478 /*AU1550_GPIO21_INT*/0, 0, 0);
479
480 db1x_register_pcmcia_socket(
481 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
482 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
483 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000,
484 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
485 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
486 AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
487 AU1550_GPIO5_INT, AU1550_GPIO1_INT,
488 /*AU1550_GPIO22_INT*/0, 0, 1);
489 595
490 swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT; 596 swapped = bcsr_read(BCSR_STATUS) &
597 (id ? BCSR_STATUS_PB1550_SWAPBOOT : BCSR_STATUS_DB1000_SWAPBOOT);
491 db1x_register_norflash(128 << 20, 4, swapped); 598 db1x_register_norflash(128 << 20, 4, swapped);
492 599
493 return platform_add_devices(db1550_devs, ARRAY_SIZE(db1550_devs)); 600 return platform_add_devices(db1550_devs, ARRAY_SIZE(db1550_devs));
494} 601}
495device_initcall(db1550_dev_init);
diff --git a/arch/mips/alchemy/devboards/pb1100.c b/arch/mips/alchemy/devboards/pb1100.c
deleted file mode 100644
index 78c77a44a317..000000000000
--- a/arch/mips/alchemy/devboards/pb1100.c
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Pb1100 board platform device registration
3 *
4 * Copyright (C) 2009 Manuel Lauss
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <linux/delay.h>
22#include <linux/gpio.h>
23#include <linux/init.h>
24#include <linux/interrupt.h>
25#include <linux/dma-mapping.h>
26#include <linux/platform_device.h>
27#include <asm/mach-au1x00/au1000.h>
28#include <asm/mach-db1x00/bcsr.h>
29#include <prom.h>
30#include "platform.h"
31
32const char *get_system_type(void)
33{
34 return "PB1100";
35}
36
37void __init board_setup(void)
38{
39 volatile void __iomem *base = (volatile void __iomem *)0xac000000UL;
40
41 bcsr_init(DB1000_BCSR_PHYS_ADDR,
42 DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS);
43
44 /* Set AUX clock to 12 MHz * 8 = 96 MHz */
45 au_writel(8, SYS_AUXPLL);
46 alchemy_gpio1_input_enable();
47 udelay(100);
48
49#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
50 {
51 u32 pin_func, sys_freqctrl, sys_clksrc;
52
53 /* Configure pins GPIO[14:9] as GPIO */
54 pin_func = au_readl(SYS_PINFUNC) & ~SYS_PF_UR3;
55
56 /* Zero and disable FREQ2 */
57 sys_freqctrl = au_readl(SYS_FREQCTRL0);
58 sys_freqctrl &= ~0xFFF00000;
59 au_writel(sys_freqctrl, SYS_FREQCTRL0);
60
61 /* Zero and disable USBH/USBD/IrDA clock */
62 sys_clksrc = au_readl(SYS_CLKSRC);
63 sys_clksrc &= ~(SYS_CS_CIR | SYS_CS_DIR | SYS_CS_MIR_MASK);
64 au_writel(sys_clksrc, SYS_CLKSRC);
65
66 sys_freqctrl = au_readl(SYS_FREQCTRL0);
67 sys_freqctrl &= ~0xFFF00000;
68
69 sys_clksrc = au_readl(SYS_CLKSRC);
70 sys_clksrc &= ~(SYS_CS_CIR | SYS_CS_DIR | SYS_CS_MIR_MASK);
71
72 /* FREQ2 = aux / 2 = 48 MHz */
73 sys_freqctrl |= (0 << SYS_FC_FRDIV2_BIT) |
74 SYS_FC_FE2 | SYS_FC_FS2;
75 au_writel(sys_freqctrl, SYS_FREQCTRL0);
76
77 /*
78 * Route 48 MHz FREQ2 into USBH/USBD/IrDA
79 */
80 sys_clksrc |= SYS_CS_MUX_FQ2 << SYS_CS_MIR_BIT;
81 au_writel(sys_clksrc, SYS_CLKSRC);
82
83 /* Setup the static bus controller */
84 au_writel(0x00000002, MEM_STCFG3); /* type = PCMCIA */
85 au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */
86 au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */
87
88 /*
89 * Get USB Functionality pin state (device vs host drive pins).
90 */
91 pin_func = au_readl(SYS_PINFUNC) & ~SYS_PF_USB;
92 /* 2nd USB port is USB host. */
93 pin_func |= SYS_PF_USB;
94 au_writel(pin_func, SYS_PINFUNC);
95 }
96#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
97
98 /* Enable sys bus clock divider when IDLE state or no bus activity. */
99 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
100
101 /* Enable the RTC if not already enabled. */
102 if (!(readb(base + 0x28) & 0x20)) {
103 writeb(readb(base + 0x28) | 0x20, base + 0x28);
104 au_sync();
105 }
106 /* Put the clock in BCD mode. */
107 if (readb(base + 0x2C) & 0x4) { /* reg B */
108 writeb(readb(base + 0x2c) & ~0x4, base + 0x2c);
109 au_sync();
110 }
111}
112
113/******************************************************************************/
114
115static struct resource au1100_lcd_resources[] = {
116 [0] = {
117 .start = AU1100_LCD_PHYS_ADDR,
118 .end = AU1100_LCD_PHYS_ADDR + 0x800 - 1,
119 .flags = IORESOURCE_MEM,
120 },
121 [1] = {
122 .start = AU1100_LCD_INT,
123 .end = AU1100_LCD_INT,
124 .flags = IORESOURCE_IRQ,
125 }
126};
127
128static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
129
130static struct platform_device au1100_lcd_device = {
131 .name = "au1100-lcd",
132 .id = 0,
133 .dev = {
134 .dma_mask = &au1100_lcd_dmamask,
135 .coherent_dma_mask = DMA_BIT_MASK(32),
136 },
137 .num_resources = ARRAY_SIZE(au1100_lcd_resources),
138 .resource = au1100_lcd_resources,
139};
140
141static int __init pb1100_dev_init(void)
142{
143 int swapped;
144
145 irq_set_irq_type(AU1100_GPIO9_INT, IRQF_TRIGGER_LOW); /* PCCD# */
146 irq_set_irq_type(AU1100_GPIO10_INT, IRQF_TRIGGER_LOW); /* PCSTSCHG# */
147 irq_set_irq_type(AU1100_GPIO11_INT, IRQF_TRIGGER_LOW); /* PCCard# */
148 irq_set_irq_type(AU1100_GPIO13_INT, IRQF_TRIGGER_LOW); /* DC_IRQ# */
149
150 /* PCMCIA. single socket, identical to Pb1500 */
151 db1x_register_pcmcia_socket(
152 AU1000_PCMCIA_ATTR_PHYS_ADDR,
153 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
154 AU1000_PCMCIA_MEM_PHYS_ADDR,
155 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
156 AU1000_PCMCIA_IO_PHYS_ADDR,
157 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
158 AU1100_GPIO11_INT, AU1100_GPIO9_INT, /* card / insert */
159 /*AU1100_GPIO10_INT*/0, 0, 0); /* stschg / eject / id */
160
161 swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT;
162 db1x_register_norflash(64 * 1024 * 1024, 4, swapped);
163 platform_device_register(&au1100_lcd_device);
164
165 return 0;
166}
167device_initcall(pb1100_dev_init);
diff --git a/arch/mips/alchemy/devboards/pb1500.c b/arch/mips/alchemy/devboards/pb1500.c
deleted file mode 100644
index 232fee942000..000000000000
--- a/arch/mips/alchemy/devboards/pb1500.c
+++ /dev/null
@@ -1,198 +0,0 @@
1/*
2 * Pb1500 board support.
3 *
4 * Copyright (C) 2009 Manuel Lauss
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <linux/delay.h>
22#include <linux/dma-mapping.h>
23#include <linux/gpio.h>
24#include <linux/init.h>
25#include <linux/interrupt.h>
26#include <linux/platform_device.h>
27#include <asm/mach-au1x00/au1000.h>
28#include <asm/mach-db1x00/bcsr.h>
29#include <prom.h>
30#include "platform.h"
31
32const char *get_system_type(void)
33{
34 return "PB1500";
35}
36
37void __init board_setup(void)
38{
39 u32 pin_func;
40 u32 sys_freqctrl, sys_clksrc;
41
42 bcsr_init(DB1000_BCSR_PHYS_ADDR,
43 DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS);
44
45 sys_clksrc = sys_freqctrl = pin_func = 0;
46 /* Set AUX clock to 12 MHz * 8 = 96 MHz */
47 au_writel(8, SYS_AUXPLL);
48 alchemy_gpio1_input_enable();
49 udelay(100);
50
51 /* GPIO201 is input for PCMCIA card detect */
52 /* GPIO203 is input for PCMCIA interrupt request */
53 alchemy_gpio_direction_input(201);
54 alchemy_gpio_direction_input(203);
55
56#if IS_ENABLED(CONFIG_USB_OHCI_HCD)
57
58 /* Zero and disable FREQ2 */
59 sys_freqctrl = au_readl(SYS_FREQCTRL0);
60 sys_freqctrl &= ~0xFFF00000;
61 au_writel(sys_freqctrl, SYS_FREQCTRL0);
62
63 /* zero and disable USBH/USBD clocks */
64 sys_clksrc = au_readl(SYS_CLKSRC);
65 sys_clksrc &= ~(SYS_CS_CUD | SYS_CS_DUD | SYS_CS_MUD_MASK |
66 SYS_CS_CUH | SYS_CS_DUH | SYS_CS_MUH_MASK);
67 au_writel(sys_clksrc, SYS_CLKSRC);
68
69 sys_freqctrl = au_readl(SYS_FREQCTRL0);
70 sys_freqctrl &= ~0xFFF00000;
71
72 sys_clksrc = au_readl(SYS_CLKSRC);
73 sys_clksrc &= ~(SYS_CS_CUD | SYS_CS_DUD | SYS_CS_MUD_MASK |
74 SYS_CS_CUH | SYS_CS_DUH | SYS_CS_MUH_MASK);
75
76 /* FREQ2 = aux/2 = 48 MHz */
77 sys_freqctrl |= (0 << SYS_FC_FRDIV2_BIT) | SYS_FC_FE2 | SYS_FC_FS2;
78 au_writel(sys_freqctrl, SYS_FREQCTRL0);
79
80 /*
81 * Route 48MHz FREQ2 into USB Host and/or Device
82 */
83 sys_clksrc |= SYS_CS_MUX_FQ2 << SYS_CS_MUH_BIT;
84 au_writel(sys_clksrc, SYS_CLKSRC);
85
86 pin_func = au_readl(SYS_PINFUNC) & ~SYS_PF_USB;
87 /* 2nd USB port is USB host */
88 pin_func |= SYS_PF_USB;
89 au_writel(pin_func, SYS_PINFUNC);
90#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
91
92#ifdef CONFIG_PCI
93 {
94 void __iomem *base =
95 (void __iomem *)KSEG1ADDR(AU1500_PCI_PHYS_ADDR);
96 /* Setup PCI bus controller */
97 __raw_writel(0x00003fff, base + PCI_REG_CMEM);
98 __raw_writel(0xf0000000, base + PCI_REG_MWMASK_DEV);
99 __raw_writel(0, base + PCI_REG_MWBASE_REV_CCL);
100 __raw_writel(0x02a00356, base + PCI_REG_STATCMD);
101 __raw_writel(0x00003c04, base + PCI_REG_PARAM);
102 __raw_writel(0x00000008, base + PCI_REG_MBAR);
103 wmb();
104 }
105#endif
106
107 /* Enable sys bus clock divider when IDLE state or no bus activity. */
108 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
109
110 /* Enable the RTC if not already enabled */
111 if (!(au_readl(0xac000028) & 0x20)) {
112 printk(KERN_INFO "enabling clock ...\n");
113 au_writel((au_readl(0xac000028) | 0x20), 0xac000028);
114 }
115 /* Put the clock in BCD mode */
116 if (au_readl(0xac00002c) & 0x4) { /* reg B */
117 au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c);
118 au_sync();
119 }
120}
121
122/******************************************************************************/
123
124static int pb1500_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin)
125{
126 if ((slot < 12) || (slot > 13) || pin == 0)
127 return -1;
128 if (slot == 12)
129 return (pin == 1) ? AU1500_PCI_INTA : 0xff;
130 if (slot == 13) {
131 switch (pin) {
132 case 1: return AU1500_PCI_INTA;
133 case 2: return AU1500_PCI_INTB;
134 case 3: return AU1500_PCI_INTC;
135 case 4: return AU1500_PCI_INTD;
136 }
137 }
138 return -1;
139}
140
141static struct resource alchemy_pci_host_res[] = {
142 [0] = {
143 .start = AU1500_PCI_PHYS_ADDR,
144 .end = AU1500_PCI_PHYS_ADDR + 0xfff,
145 .flags = IORESOURCE_MEM,
146 },
147};
148
149static struct alchemy_pci_platdata pb1500_pci_pd = {
150 .board_map_irq = pb1500_map_pci_irq,
151 .pci_cfg_set = PCI_CONFIG_AEN | PCI_CONFIG_R2H | PCI_CONFIG_R1H |
152 PCI_CONFIG_CH |
153#if defined(__MIPSEB__)
154 PCI_CONFIG_SIC_HWA_DAT | PCI_CONFIG_SM,
155#else
156 0,
157#endif
158};
159
160static struct platform_device pb1500_pci_host = {
161 .dev.platform_data = &pb1500_pci_pd,
162 .name = "alchemy-pci",
163 .id = 0,
164 .num_resources = ARRAY_SIZE(alchemy_pci_host_res),
165 .resource = alchemy_pci_host_res,
166};
167
168static int __init pb1500_dev_init(void)
169{
170 int swapped;
171
172 irq_set_irq_type(AU1500_GPIO9_INT, IRQF_TRIGGER_LOW); /* CD0# */
173 irq_set_irq_type(AU1500_GPIO10_INT, IRQF_TRIGGER_LOW); /* CARD0 */
174 irq_set_irq_type(AU1500_GPIO11_INT, IRQF_TRIGGER_LOW); /* STSCHG0# */
175 irq_set_irq_type(AU1500_GPIO204_INT, IRQF_TRIGGER_HIGH);
176 irq_set_irq_type(AU1500_GPIO201_INT, IRQF_TRIGGER_LOW);
177 irq_set_irq_type(AU1500_GPIO202_INT, IRQF_TRIGGER_LOW);
178 irq_set_irq_type(AU1500_GPIO203_INT, IRQF_TRIGGER_LOW);
179 irq_set_irq_type(AU1500_GPIO205_INT, IRQF_TRIGGER_LOW);
180
181 /* PCMCIA. single socket, identical to Pb1100 */
182 db1x_register_pcmcia_socket(
183 AU1000_PCMCIA_ATTR_PHYS_ADDR,
184 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
185 AU1000_PCMCIA_MEM_PHYS_ADDR,
186 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
187 AU1000_PCMCIA_IO_PHYS_ADDR,
188 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
189 AU1500_GPIO11_INT, AU1500_GPIO9_INT, /* card / insert */
190 /*AU1500_GPIO10_INT*/0, 0, 0); /* stschg / eject / id */
191
192 swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT;
193 db1x_register_norflash(64 * 1024 * 1024, 4, swapped);
194 platform_device_register(&pb1500_pci_host);
195
196 return 0;
197}
198arch_initcall(pb1500_dev_init);
diff --git a/arch/mips/alchemy/devboards/pb1550.c b/arch/mips/alchemy/devboards/pb1550.c
deleted file mode 100644
index b37e7de8d920..000000000000
--- a/arch/mips/alchemy/devboards/pb1550.c
+++ /dev/null
@@ -1,244 +0,0 @@
1/*
2 * Pb1550 board support.
3 *
4 * Copyright (C) 2009-2011 Manuel Lauss
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <linux/dma-mapping.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/platform_device.h>
25#include <asm/mach-au1x00/au1000.h>
26#include <asm/mach-au1x00/au1xxx_dbdma.h>
27#include <asm/mach-au1x00/au1550nd.h>
28#include <asm/mach-au1x00/gpio.h>
29#include <asm/mach-db1x00/bcsr.h>
30#include "platform.h"
31
32const char *get_system_type(void)
33{
34 return "PB1550";
35}
36
37void __init board_setup(void)
38{
39 u32 pin_func;
40
41 bcsr_init(PB1550_BCSR_PHYS_ADDR,
42 PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS);
43
44 alchemy_gpio2_enable();
45
46 /*
47 * Enable PSC1 SYNC for AC'97. Normaly done in audio driver,
48 * but it is board specific code, so put it here.
49 */
50 pin_func = au_readl(SYS_PINFUNC);
51 au_sync();
52 pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
53 au_writel(pin_func, SYS_PINFUNC);
54
55 bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */
56
57 printk(KERN_INFO "AMD Alchemy Pb1550 Board\n");
58}
59
60/******************************************************************************/
61
62static int pb1550_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin)
63{
64 if ((slot < 12) || (slot > 13) || pin == 0)
65 return -1;
66 if (slot == 12) {
67 switch (pin) {
68 case 1: return AU1500_PCI_INTB;
69 case 2: return AU1500_PCI_INTC;
70 case 3: return AU1500_PCI_INTD;
71 case 4: return AU1500_PCI_INTA;
72 }
73 }
74 if (slot == 13) {
75 switch (pin) {
76 case 1: return AU1500_PCI_INTA;
77 case 2: return AU1500_PCI_INTB;
78 case 3: return AU1500_PCI_INTC;
79 case 4: return AU1500_PCI_INTD;
80 }
81 }
82 return -1;
83}
84
85static struct resource alchemy_pci_host_res[] = {
86 [0] = {
87 .start = AU1500_PCI_PHYS_ADDR,
88 .end = AU1500_PCI_PHYS_ADDR + 0xfff,
89 .flags = IORESOURCE_MEM,
90 },
91};
92
93static struct alchemy_pci_platdata pb1550_pci_pd = {
94 .board_map_irq = pb1550_map_pci_irq,
95};
96
97static struct platform_device pb1550_pci_host = {
98 .dev.platform_data = &pb1550_pci_pd,
99 .name = "alchemy-pci",
100 .id = 0,
101 .num_resources = ARRAY_SIZE(alchemy_pci_host_res),
102 .resource = alchemy_pci_host_res,
103};
104
105static struct resource au1550_psc2_res[] = {
106 [0] = {
107 .start = AU1550_PSC2_PHYS_ADDR,
108 .end = AU1550_PSC2_PHYS_ADDR + 0xfff,
109 .flags = IORESOURCE_MEM,
110 },
111 [1] = {
112 .start = AU1550_PSC2_INT,
113 .end = AU1550_PSC2_INT,
114 .flags = IORESOURCE_IRQ,
115 },
116 [2] = {
117 .start = AU1550_DSCR_CMD0_PSC2_TX,
118 .end = AU1550_DSCR_CMD0_PSC2_TX,
119 .flags = IORESOURCE_DMA,
120 },
121 [3] = {
122 .start = AU1550_DSCR_CMD0_PSC2_RX,
123 .end = AU1550_DSCR_CMD0_PSC2_RX,
124 .flags = IORESOURCE_DMA,
125 },
126};
127
128static struct platform_device pb1550_i2c_dev = {
129 .name = "au1xpsc_smbus",
130 .id = 0, /* bus number */
131 .num_resources = ARRAY_SIZE(au1550_psc2_res),
132 .resource = au1550_psc2_res,
133};
134
135static struct mtd_partition pb1550_nand_parts[] = {
136 [0] = {
137 .name = "NAND FS 0",
138 .offset = 0,
139 .size = 8 * 1024 * 1024,
140 },
141 [1] = {
142 .name = "NAND FS 1",
143 .offset = MTDPART_OFS_APPEND,
144 .size = MTDPART_SIZ_FULL,
145 },
146};
147
148static struct au1550nd_platdata pb1550_nand_pd = {
149 .parts = pb1550_nand_parts,
150 .num_parts = ARRAY_SIZE(pb1550_nand_parts),
151 .devwidth = 0, /* x8 NAND default, needs fixing up */
152};
153
154static struct resource pb1550_nand_res[] = {
155 [0] = {
156 .start = 0x20000000,
157 .end = 0x20000fff,
158 .flags = IORESOURCE_MEM,
159 },
160};
161
162static struct platform_device pb1550_nand_dev = {
163 .name = "au1550-nand",
164 .id = -1,
165 .resource = pb1550_nand_res,
166 .num_resources = ARRAY_SIZE(pb1550_nand_res),
167 .dev = {
168 .platform_data = &pb1550_nand_pd,
169 },
170};
171
172static void __init pb1550_nand_setup(void)
173{
174 int boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) |
175 ((bcsr_read(BCSR_STATUS) >> 6) & 0x1);
176
177 switch (boot_swapboot) {
178 case 0:
179 case 2:
180 case 8:
181 case 0xC:
182 case 0xD:
183 /* x16 NAND Flash */
184 pb1550_nand_pd.devwidth = 1;
185 /* fallthrough */
186 case 1:
187 case 9:
188 case 3:
189 case 0xE:
190 case 0xF:
191 /* x8 NAND, already set up */
192 platform_device_register(&pb1550_nand_dev);
193 }
194}
195
196static int __init pb1550_dev_init(void)
197{
198 int swapped;
199
200 irq_set_irq_type(AU1550_GPIO0_INT, IRQF_TRIGGER_LOW);
201 irq_set_irq_type(AU1550_GPIO1_INT, IRQF_TRIGGER_LOW);
202 irq_set_irq_type(AU1550_GPIO201_205_INT, IRQF_TRIGGER_HIGH);
203
204 /* enable both PCMCIA card irqs in the shared line */
205 alchemy_gpio2_enable_int(201);
206 alchemy_gpio2_enable_int(202);
207
208 /* Pb1550, like all others, also has statuschange irqs; however they're
209 * wired up on one of the Au1550's shared GPIO201_205 line, which also
210 * services the PCMCIA card interrupts. So we ignore statuschange and
211 * use the GPIO201_205 exclusively for card interrupts, since a) pcmcia
212 * drivers are used to shared irqs and b) statuschange isn't really use-
213 * ful anyway.
214 */
215 db1x_register_pcmcia_socket(
216 AU1000_PCMCIA_ATTR_PHYS_ADDR,
217 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
218 AU1000_PCMCIA_MEM_PHYS_ADDR,
219 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
220 AU1000_PCMCIA_IO_PHYS_ADDR,
221 AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
222 AU1550_GPIO201_205_INT, AU1550_GPIO0_INT, 0, 0, 0);
223
224 db1x_register_pcmcia_socket(
225 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008000000,
226 AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1,
227 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008000000,
228 AU1000_PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1,
229 AU1000_PCMCIA_IO_PHYS_ADDR + 0x008000000,
230 AU1000_PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1,
231 AU1550_GPIO201_205_INT, AU1550_GPIO1_INT, 0, 0, 1);
232
233 /* NAND setup */
234 gpio_direction_input(206); /* GPIO206 high */
235 pb1550_nand_setup();
236
237 swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_PB1550_SWAPBOOT;
238 db1x_register_norflash(128 * 1024 * 1024, 4, swapped);
239 platform_device_register(&pb1550_pci_host);
240 platform_device_register(&pb1550_i2c_dev);
241
242 return 0;
243}
244arch_initcall(pb1550_dev_init);
diff --git a/arch/mips/alchemy/devboards/platform.c b/arch/mips/alchemy/devboards/platform.c
index f39042e99d0d..8df86eb94972 100644
--- a/arch/mips/alchemy/devboards/platform.c
+++ b/arch/mips/alchemy/devboards/platform.c
@@ -36,11 +36,10 @@ void __init prom_init(void)
36 36
37void prom_putchar(unsigned char c) 37void prom_putchar(unsigned char c)
38{ 38{
39#ifdef CONFIG_MIPS_DB1300 39 if (alchemy_get_cputype() == ALCHEMY_CPU_AU1300)
40 alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c); 40 alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c);
41#else 41 else
42 alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c); 42 alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
43#endif
44} 43}
45 44
46 45
diff --git a/arch/mips/boot/compressed/uart-alchemy.c b/arch/mips/boot/compressed/uart-alchemy.c
index 3112df8f90db..4bee55b93f6a 100644
--- a/arch/mips/boot/compressed/uart-alchemy.c
+++ b/arch/mips/boot/compressed/uart-alchemy.c
@@ -2,9 +2,5 @@
2 2
3void putc(char c) 3void putc(char c)
4{ 4{
5#ifdef CONFIG_MIPS_DB1300
6 alchemy_uart_putchar(AU1300_UART2_PHYS_ADDR, c);
7#else
8 alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c); 5 alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
9#endif
10} 6}
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
deleted file mode 100644
index 1f69249b839a..000000000000
--- a/arch/mips/configs/db1200_defconfig
+++ /dev/null
@@ -1,170 +0,0 @@
1CONFIG_MIPS_ALCHEMY=y
2CONFIG_MIPS_DB1200=y
3CONFIG_KSM=y
4CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y
6CONFIG_HZ_100=y
7# CONFIG_SECCOMP is not set
8CONFIG_EXPERIMENTAL=y
9CONFIG_LOCALVERSION="-db1200"
10CONFIG_KERNEL_LZMA=y
11CONFIG_SYSVIPC=y
12CONFIG_POSIX_MQUEUE=y
13CONFIG_TINY_RCU=y
14CONFIG_LOG_BUF_SHIFT=14
15CONFIG_EXPERT=y
16# CONFIG_SYSCTL_SYSCALL is not set
17# CONFIG_KALLSYMS is not set
18# CONFIG_PCSPKR_PLATFORM is not set
19# CONFIG_VM_EVENT_COUNTERS is not set
20# CONFIG_COMPAT_BRK is not set
21CONFIG_SLAB=y
22CONFIG_MODULES=y
23CONFIG_MODULE_UNLOAD=y
24# CONFIG_LBDAF is not set
25# CONFIG_BLK_DEV_BSG is not set
26# CONFIG_IOSCHED_DEADLINE is not set
27# CONFIG_IOSCHED_CFQ is not set
28CONFIG_PCCARD=y
29CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
30CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
31CONFIG_BINFMT_MISC=y
32CONFIG_NET=y
33CONFIG_PACKET=y
34CONFIG_UNIX=y
35CONFIG_INET=y
36CONFIG_IP_MULTICAST=y
37CONFIG_IP_PNP=y
38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
39# CONFIG_INET_XFRM_MODE_TUNNEL is not set
40# CONFIG_INET_XFRM_MODE_BEET is not set
41# CONFIG_INET_DIAG is not set
42# CONFIG_IPV6 is not set
43# CONFIG_WIRELESS is not set
44CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
45CONFIG_MTD=y
46CONFIG_MTD_PARTITIONS=y
47CONFIG_MTD_CMDLINE_PARTS=y
48CONFIG_MTD_CHAR=y
49CONFIG_MTD_BLOCK=y
50CONFIG_MTD_CFI=y
51CONFIG_MTD_CFI_AMDSTD=y
52CONFIG_MTD_PHYSMAP=y
53CONFIG_MTD_NAND=y
54CONFIG_MTD_NAND_PLATFORM=y
55CONFIG_BLK_DEV_LOOP=y
56CONFIG_BLK_DEV_UB=y
57# CONFIG_MISC_DEVICES is not set
58CONFIG_IDE=y
59CONFIG_BLK_DEV_IDECS=y
60CONFIG_BLK_DEV_IDECD=y
61CONFIG_IDE_TASK_IOCTL=y
62# CONFIG_IDE_PROC_FS is not set
63CONFIG_BLK_DEV_IDE_AU1XXX=y
64CONFIG_NETDEVICES=y
65CONFIG_NET_ETHERNET=y
66CONFIG_SMC91X=y
67# CONFIG_NETDEV_1000 is not set
68# CONFIG_NETDEV_10000 is not set
69# CONFIG_WLAN is not set
70# CONFIG_INPUT_MOUSEDEV is not set
71CONFIG_INPUT_EVDEV=y
72# CONFIG_INPUT_KEYBOARD is not set
73# CONFIG_INPUT_MOUSE is not set
74# CONFIG_SERIO is not set
75CONFIG_VT_HW_CONSOLE_BINDING=y
76CONFIG_SERIAL_8250=y
77CONFIG_SERIAL_8250_CONSOLE=y
78CONFIG_SERIAL_8250_NR_UARTS=2
79CONFIG_SERIAL_8250_RUNTIME_UARTS=2
80# CONFIG_LEGACY_PTYS is not set
81# CONFIG_HW_RANDOM is not set
82CONFIG_I2C=y
83# CONFIG_I2C_COMPAT is not set
84CONFIG_I2C_CHARDEV=y
85# CONFIG_I2C_HELPER_AUTO is not set
86CONFIG_I2C_AU1550=y
87CONFIG_SPI=y
88CONFIG_SPI_AU1550=y
89CONFIG_GPIOLIB=y
90CONFIG_GPIO_SYSFS=y
91CONFIG_SENSORS_ADM1025=y
92CONFIG_SENSORS_LM70=y
93CONFIG_FB=y
94CONFIG_FB_AU1200=y
95# CONFIG_VGA_CONSOLE is not set
96CONFIG_FRAMEBUFFER_CONSOLE=y
97CONFIG_FONTS=y
98CONFIG_FONT_8x16=y
99CONFIG_SOUND=y
100CONFIG_SND=y
101CONFIG_SND_DYNAMIC_MINORS=y
102# CONFIG_SND_SUPPORT_OLD_API is not set
103# CONFIG_SND_VERBOSE_PROCFS is not set
104# CONFIG_SND_DRIVERS is not set
105# CONFIG_SND_SPI is not set
106# CONFIG_SND_MIPS is not set
107# CONFIG_SND_USB is not set
108# CONFIG_SND_PCMCIA is not set
109CONFIG_SND_SOC=y
110CONFIG_SND_SOC_AU1XPSC=y
111CONFIG_SND_SOC_DB1200=y
112CONFIG_HIDRAW=y
113CONFIG_USB_HIDDEV=y
114CONFIG_USB=y
115CONFIG_USB_DEBUG=y
116CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
117# CONFIG_USB_DEVICE_CLASS is not set
118CONFIG_USB_DYNAMIC_MINORS=y
119CONFIG_USB_EHCI_HCD=y
120CONFIG_USB_EHCI_ROOT_HUB_TT=y
121CONFIG_USB_OHCI_HCD=y
122CONFIG_MMC=y
123# CONFIG_MMC_BLOCK_BOUNCE is not set
124CONFIG_MMC_AU1X=y
125CONFIG_NEW_LEDS=y
126CONFIG_LEDS_CLASS=y
127CONFIG_LEDS_TRIGGERS=y
128CONFIG_RTC_CLASS=y
129CONFIG_RTC_DRV_AU1XXX=y
130CONFIG_EXT2_FS=y
131CONFIG_ISO9660_FS=y
132CONFIG_JOLIET=y
133CONFIG_ZISOFS=y
134CONFIG_UDF_FS=y
135CONFIG_VFAT_FS=y
136# CONFIG_PROC_PAGE_MONITOR is not set
137CONFIG_TMPFS=y
138CONFIG_JFFS2_FS=y
139CONFIG_JFFS2_SUMMARY=y
140CONFIG_JFFS2_COMPRESSION_OPTIONS=y
141CONFIG_JFFS2_LZO=y
142CONFIG_JFFS2_RUBIN=y
143CONFIG_SQUASHFS=y
144CONFIG_NFS_FS=y
145CONFIG_NFS_V3=y
146CONFIG_ROOT_NFS=y
147CONFIG_PARTITION_ADVANCED=y
148CONFIG_EFI_PARTITION=y
149CONFIG_NLS_CODEPAGE_437=y
150CONFIG_NLS_CODEPAGE_850=y
151CONFIG_NLS_CODEPAGE_852=y
152CONFIG_NLS_CODEPAGE_1250=y
153CONFIG_NLS_ASCII=y
154CONFIG_NLS_ISO8859_1=y
155CONFIG_NLS_ISO8859_2=y
156CONFIG_NLS_ISO8859_15=y
157CONFIG_NLS_UTF8=y
158# CONFIG_ENABLE_WARN_DEPRECATED is not set
159# CONFIG_ENABLE_MUST_CHECK is not set
160CONFIG_MAGIC_SYSRQ=y
161CONFIG_STRIP_ASM_SYMS=y
162CONFIG_DEBUG_KERNEL=y
163# CONFIG_SCHED_DEBUG is not set
164# CONFIG_FTRACE is not set
165CONFIG_CMDLINE_BOOL=y
166CONFIG_CMDLINE="console=ttyS0,115200"
167CONFIG_DEBUG_ZBOOT=y
168CONFIG_KEYS=y
169CONFIG_KEYS_DEBUG_PROC_KEYS=y
170CONFIG_SECURITYFS=y
diff --git a/arch/mips/configs/db1235_defconfig b/arch/mips/configs/db1235_defconfig
new file mode 100644
index 000000000000..c48998ffd198
--- /dev/null
+++ b/arch/mips/configs/db1235_defconfig
@@ -0,0 +1,434 @@
1CONFIG_MIPS_ALCHEMY=y
2CONFIG_MIPS_DB1235=y
3CONFIG_COMPACTION=y
4CONFIG_KSM=y
5CONFIG_HZ_100=y
6CONFIG_EXPERIMENTAL=y
7CONFIG_LOCALVERSION="-db1235"
8CONFIG_KERNEL_LZMA=y
9CONFIG_DEFAULT_HOSTNAME="db1235"
10CONFIG_SYSVIPC=y
11CONFIG_POSIX_MQUEUE=y
12CONFIG_BSD_PROCESS_ACCT=y
13CONFIG_BSD_PROCESS_ACCT_V3=y
14CONFIG_FHANDLE=y
15CONFIG_TASKSTATS=y
16CONFIG_TASK_DELAY_ACCT=y
17CONFIG_AUDIT=y
18CONFIG_AUDIT_LOGINUID_IMMUTABLE=y
19CONFIG_NO_HZ=y
20CONFIG_HIGH_RES_TIMERS=y
21CONFIG_LOG_BUF_SHIFT=16
22CONFIG_NAMESPACES=y
23CONFIG_EMBEDDED=y
24CONFIG_SLAB=y
25CONFIG_JUMP_LABEL=y
26CONFIG_PARTITION_ADVANCED=y
27CONFIG_LDM_PARTITION=y
28CONFIG_EFI_PARTITION=y
29CONFIG_PCI=y
30CONFIG_PCCARD=y
31CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
32CONFIG_PM_RUNTIME=y
33CONFIG_NET=y
34CONFIG_PACKET=y
35CONFIG_UNIX=y
36CONFIG_UNIX_DIAG=y
37CONFIG_XFRM_USER=y
38CONFIG_INET=y
39CONFIG_IP_MULTICAST=y
40CONFIG_IP_ADVANCED_ROUTER=y
41CONFIG_IP_MULTIPLE_TABLES=y
42CONFIG_IP_ROUTE_MULTIPATH=y
43CONFIG_IP_ROUTE_VERBOSE=y
44CONFIG_IP_PNP=y
45CONFIG_IP_PNP_DHCP=y
46CONFIG_IP_PNP_BOOTP=y
47CONFIG_IP_PNP_RARP=y
48CONFIG_NET_IPIP=y
49CONFIG_NET_IPGRE_DEMUX=y
50CONFIG_NET_IPGRE=y
51CONFIG_NET_IPGRE_BROADCAST=y
52CONFIG_IP_MROUTE=y
53CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
54CONFIG_IP_PIMSM_V1=y
55CONFIG_IP_PIMSM_V2=y
56CONFIG_ARPD=y
57CONFIG_SYN_COOKIES=y
58CONFIG_NET_IPVTI=y
59CONFIG_INET_AH=y
60CONFIG_INET_ESP=y
61CONFIG_INET_IPCOMP=y
62CONFIG_INET_UDP_DIAG=y
63CONFIG_TCP_CONG_ADVANCED=y
64CONFIG_TCP_CONG_HSTCP=y
65CONFIG_TCP_CONG_HYBLA=y
66CONFIG_TCP_CONG_SCALABLE=y
67CONFIG_TCP_CONG_LP=y
68CONFIG_TCP_CONG_VENO=y
69CONFIG_TCP_CONG_YEAH=y
70CONFIG_TCP_CONG_ILLINOIS=y
71CONFIG_DEFAULT_HYBLA=y
72CONFIG_TCP_MD5SIG=y
73CONFIG_IPV6_PRIVACY=y
74CONFIG_IPV6_ROUTER_PREF=y
75CONFIG_IPV6_ROUTE_INFO=y
76CONFIG_IPV6_OPTIMISTIC_DAD=y
77CONFIG_INET6_AH=y
78CONFIG_INET6_ESP=y
79CONFIG_INET6_IPCOMP=y
80CONFIG_IPV6_MIP6=y
81CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y
82CONFIG_IPV6_SIT_6RD=y
83CONFIG_IPV6_TUNNEL=y
84CONFIG_IPV6_MULTIPLE_TABLES=y
85CONFIG_IPV6_SUBTREES=y
86CONFIG_IPV6_MROUTE=y
87CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
88CONFIG_IPV6_PIMSM_V2=y
89CONFIG_NETFILTER=y
90CONFIG_NF_CONNTRACK=y
91CONFIG_NF_CONNTRACK_EVENTS=y
92CONFIG_NF_CONNTRACK_TIMEOUT=y
93CONFIG_NF_CONNTRACK_TIMESTAMP=y
94CONFIG_NF_CT_PROTO_DCCP=y
95CONFIG_NF_CT_PROTO_SCTP=y
96CONFIG_NF_CT_PROTO_UDPLITE=y
97CONFIG_NF_CONNTRACK_AMANDA=y
98CONFIG_NF_CONNTRACK_FTP=y
99CONFIG_NF_CONNTRACK_H323=y
100CONFIG_NF_CONNTRACK_IRC=y
101CONFIG_NF_CONNTRACK_NETBIOS_NS=y
102CONFIG_NF_CONNTRACK_SNMP=y
103CONFIG_NF_CONNTRACK_PPTP=y
104CONFIG_NF_CONNTRACK_SANE=y
105CONFIG_NF_CONNTRACK_SIP=y
106CONFIG_NF_CONNTRACK_TFTP=y
107CONFIG_NF_CT_NETLINK=y
108CONFIG_NF_CT_NETLINK_TIMEOUT=y
109CONFIG_NF_CT_NETLINK_HELPER=y
110CONFIG_NETFILTER_NETLINK_QUEUE_CT=y
111CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
112CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
113CONFIG_NETFILTER_XT_TARGET_HMARK=y
114CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
115CONFIG_NETFILTER_XT_TARGET_LED=y
116CONFIG_NETFILTER_XT_TARGET_LOG=y
117CONFIG_NETFILTER_XT_TARGET_MARK=y
118CONFIG_NETFILTER_XT_TARGET_NFLOG=y
119CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
120CONFIG_NETFILTER_XT_TARGET_TEE=y
121CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
122CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
123CONFIG_NETFILTER_XT_MATCH_CLUSTER=y
124CONFIG_NETFILTER_XT_MATCH_COMMENT=y
125CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
126CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
127CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
128CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
129CONFIG_NETFILTER_XT_MATCH_CPU=y
130CONFIG_NETFILTER_XT_MATCH_DCCP=y
131CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y
132CONFIG_NETFILTER_XT_MATCH_DSCP=y
133CONFIG_NETFILTER_XT_MATCH_ESP=y
134CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
135CONFIG_NETFILTER_XT_MATCH_HELPER=y
136CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
137CONFIG_NETFILTER_XT_MATCH_LENGTH=y
138CONFIG_NETFILTER_XT_MATCH_LIMIT=y
139CONFIG_NETFILTER_XT_MATCH_MAC=y
140CONFIG_NETFILTER_XT_MATCH_MARK=y
141CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
142CONFIG_NETFILTER_XT_MATCH_NFACCT=y
143CONFIG_NETFILTER_XT_MATCH_OSF=y
144CONFIG_NETFILTER_XT_MATCH_OWNER=y
145CONFIG_NETFILTER_XT_MATCH_POLICY=y
146CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
147CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
148CONFIG_NETFILTER_XT_MATCH_QUOTA=y
149CONFIG_NETFILTER_XT_MATCH_RATEEST=y
150CONFIG_NETFILTER_XT_MATCH_REALM=y
151CONFIG_NETFILTER_XT_MATCH_RECENT=y
152CONFIG_NETFILTER_XT_MATCH_SCTP=y
153CONFIG_NETFILTER_XT_MATCH_STATE=y
154CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
155CONFIG_NETFILTER_XT_MATCH_STRING=y
156CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
157CONFIG_NETFILTER_XT_MATCH_TIME=y
158CONFIG_NETFILTER_XT_MATCH_U32=y
159CONFIG_NF_CONNTRACK_IPV4=y
160CONFIG_IP_NF_IPTABLES=y
161CONFIG_IP_NF_MATCH_AH=y
162CONFIG_IP_NF_MATCH_ECN=y
163CONFIG_IP_NF_MATCH_RPFILTER=y
164CONFIG_IP_NF_MATCH_TTL=y
165CONFIG_IP_NF_FILTER=y
166CONFIG_IP_NF_TARGET_REJECT=y
167CONFIG_IP_NF_TARGET_ULOG=y
168CONFIG_NF_NAT=y
169CONFIG_IP_NF_TARGET_MASQUERADE=y
170CONFIG_IP_NF_TARGET_NETMAP=y
171CONFIG_IP_NF_TARGET_REDIRECT=y
172CONFIG_IP_NF_MANGLE=y
173CONFIG_IP_NF_TARGET_CLUSTERIP=y
174CONFIG_IP_NF_TARGET_ECN=y
175CONFIG_IP_NF_TARGET_TTL=y
176CONFIG_IP_NF_RAW=y
177CONFIG_IP_NF_ARPTABLES=y
178CONFIG_IP_NF_ARPFILTER=y
179CONFIG_IP_NF_ARP_MANGLE=y
180CONFIG_NF_CONNTRACK_IPV6=y
181CONFIG_IP6_NF_IPTABLES=y
182CONFIG_IP6_NF_MATCH_AH=y
183CONFIG_IP6_NF_MATCH_EUI64=y
184CONFIG_IP6_NF_MATCH_FRAG=y
185CONFIG_IP6_NF_MATCH_OPTS=y
186CONFIG_IP6_NF_MATCH_HL=y
187CONFIG_IP6_NF_MATCH_IPV6HEADER=y
188CONFIG_IP6_NF_MATCH_MH=y
189CONFIG_IP6_NF_MATCH_RPFILTER=y
190CONFIG_IP6_NF_MATCH_RT=y
191CONFIG_IP6_NF_TARGET_HL=y
192CONFIG_IP6_NF_FILTER=y
193CONFIG_IP6_NF_TARGET_REJECT=y
194CONFIG_IP6_NF_MANGLE=y
195CONFIG_IP6_NF_RAW=y
196CONFIG_BRIDGE_NF_EBTABLES=y
197CONFIG_BRIDGE_EBT_BROUTE=y
198CONFIG_BRIDGE_EBT_T_FILTER=y
199CONFIG_BRIDGE_EBT_T_NAT=y
200CONFIG_BRIDGE_EBT_802_3=y
201CONFIG_BRIDGE_EBT_AMONG=y
202CONFIG_BRIDGE_EBT_ARP=y
203CONFIG_BRIDGE_EBT_IP=y
204CONFIG_BRIDGE_EBT_IP6=y
205CONFIG_BRIDGE_EBT_LIMIT=y
206CONFIG_BRIDGE_EBT_MARK=y
207CONFIG_BRIDGE_EBT_PKTTYPE=y
208CONFIG_BRIDGE_EBT_STP=y
209CONFIG_BRIDGE_EBT_VLAN=y
210CONFIG_BRIDGE_EBT_ARPREPLY=y
211CONFIG_BRIDGE_EBT_DNAT=y
212CONFIG_BRIDGE_EBT_MARK_T=y
213CONFIG_BRIDGE_EBT_REDIRECT=y
214CONFIG_BRIDGE_EBT_SNAT=y
215CONFIG_BRIDGE_EBT_LOG=y
216CONFIG_BRIDGE_EBT_NFLOG=y
217CONFIG_L2TP=y
218CONFIG_L2TP_V3=y
219CONFIG_L2TP_IP=y
220CONFIG_L2TP_ETH=y
221CONFIG_BRIDGE=y
222CONFIG_VLAN_8021Q=y
223CONFIG_VLAN_8021Q_GVRP=y
224CONFIG_LLC2=y
225CONFIG_NET_SCHED=y
226CONFIG_NET_SCH_CBQ=y
227CONFIG_NET_SCH_HTB=y
228CONFIG_NET_SCH_HFSC=y
229CONFIG_NET_SCH_PRIO=y
230CONFIG_NET_SCH_MULTIQ=y
231CONFIG_NET_SCH_RED=y
232CONFIG_NET_SCH_SFB=y
233CONFIG_NET_SCH_SFQ=y
234CONFIG_NET_SCH_TEQL=y
235CONFIG_NET_SCH_TBF=y
236CONFIG_NET_SCH_GRED=y
237CONFIG_NET_SCH_DSMARK=y
238CONFIG_NET_SCH_NETEM=y
239CONFIG_NET_SCH_DRR=y
240CONFIG_NET_SCH_MQPRIO=y
241CONFIG_NET_SCH_CHOKE=y
242CONFIG_NET_SCH_QFQ=y
243CONFIG_NET_SCH_CODEL=y
244CONFIG_NET_SCH_FQ_CODEL=y
245CONFIG_NET_SCH_INGRESS=y
246CONFIG_NET_SCH_PLUG=y
247CONFIG_NET_CLS_BASIC=y
248CONFIG_NET_CLS_TCINDEX=y
249CONFIG_NET_CLS_ROUTE4=y
250CONFIG_NET_CLS_FW=y
251CONFIG_NET_CLS_U32=y
252CONFIG_CLS_U32_PERF=y
253CONFIG_CLS_U32_MARK=y
254CONFIG_NET_CLS_RSVP=y
255CONFIG_NET_CLS_RSVP6=y
256CONFIG_NET_CLS_FLOW=y
257CONFIG_NET_EMATCH=y
258CONFIG_NET_EMATCH_CMP=y
259CONFIG_NET_EMATCH_NBYTE=y
260CONFIG_NET_EMATCH_U32=y
261CONFIG_NET_EMATCH_META=y
262CONFIG_NET_EMATCH_TEXT=y
263CONFIG_NET_CLS_ACT=y
264CONFIG_NET_ACT_POLICE=y
265CONFIG_NET_ACT_GACT=y
266CONFIG_GACT_PROB=y
267CONFIG_NET_ACT_MIRRED=y
268CONFIG_NET_ACT_NAT=y
269CONFIG_NET_ACT_PEDIT=y
270CONFIG_NET_ACT_SIMP=y
271CONFIG_NET_ACT_SKBEDIT=y
272CONFIG_NET_ACT_CSUM=y
273CONFIG_NET_CLS_IND=y
274CONFIG_BT=y
275CONFIG_BT_RFCOMM=y
276CONFIG_BT_RFCOMM_TTY=y
277CONFIG_BT_BNEP=y
278CONFIG_BT_BNEP_MC_FILTER=y
279CONFIG_BT_BNEP_PROTO_FILTER=y
280CONFIG_BT_HIDP=y
281CONFIG_BT_HCIBTUSB=y
282CONFIG_CFG80211=y
283CONFIG_CFG80211_CERTIFICATION_ONUS=y
284CONFIG_CFG80211_WEXT=y
285CONFIG_MAC80211=y
286CONFIG_MAC80211_LEDS=y
287CONFIG_RFKILL=y
288CONFIG_RFKILL_INPUT=y
289CONFIG_DEVTMPFS=y
290CONFIG_DEVTMPFS_MOUNT=y
291CONFIG_MTD=y
292CONFIG_MTD_CHAR=y
293CONFIG_MTD_BLOCK=y
294CONFIG_MTD_CFI=y
295CONFIG_MTD_CFI_AMDSTD=y
296CONFIG_MTD_PHYSMAP=y
297CONFIG_MTD_M25P80=y
298CONFIG_MTD_NAND=y
299CONFIG_MTD_NAND_PLATFORM=y
300CONFIG_EEPROM_AT24=y
301CONFIG_EEPROM_AT25=y
302CONFIG_IDE=y
303CONFIG_BLK_DEV_IDE_AU1XXX=y
304CONFIG_BLK_DEV_SD=y
305CONFIG_CHR_DEV_SG=y
306CONFIG_SCSI_MULTI_LUN=y
307CONFIG_ATA=y
308CONFIG_PATA_HPT37X=y
309CONFIG_PATA_PCMCIA=y
310CONFIG_PATA_PLATFORM=y
311CONFIG_NETDEVICES=y
312CONFIG_MIPS_AU1X00_ENET=y
313CONFIG_SMC91X=y
314CONFIG_SMSC911X=y
315CONFIG_AMD_PHY=y
316CONFIG_SMSC_PHY=y
317CONFIG_RT2X00=y
318CONFIG_RT73USB=y
319CONFIG_INPUT_EVDEV=y
320CONFIG_INPUT_TOUCHSCREEN=y
321CONFIG_TOUCHSCREEN_WM97XX=y
322CONFIG_INPUT_MISC=y
323CONFIG_INPUT_UINPUT=y
324CONFIG_SERIAL_8250=y
325CONFIG_SERIAL_8250_CONSOLE=y
326CONFIG_TTY_PRINTK=y
327CONFIG_I2C=y
328CONFIG_I2C_CHARDEV=y
329CONFIG_I2C_AU1550=y
330CONFIG_SPI=y
331CONFIG_SPI_AU1550=y
332CONFIG_GPIO_SYSFS=y
333CONFIG_SENSORS_ADM1025=y
334CONFIG_SENSORS_LM70=y
335CONFIG_SOUND=y
336CONFIG_SND=y
337CONFIG_SND_HRTIMER=y
338CONFIG_SND_DYNAMIC_MINORS=y
339CONFIG_SND_SOC=y
340CONFIG_SND_SOC_AU1XPSC=y
341CONFIG_SND_SOC_DB1200=y
342CONFIG_HIDRAW=y
343CONFIG_UHID=y
344CONFIG_USB_HIDDEV=y
345CONFIG_USB=y
346CONFIG_USB_DYNAMIC_MINORS=y
347CONFIG_USB_SUSPEND=y
348CONFIG_USB_EHCI_HCD=y
349CONFIG_USB_EHCI_ROOT_HUB_TT=y
350CONFIG_USB_OHCI_HCD=y
351CONFIG_USB_STORAGE=y
352CONFIG_MMC=y
353CONFIG_MMC_CLKGATE=y
354CONFIG_MMC_AU1X=y
355CONFIG_NEW_LEDS=y
356CONFIG_LEDS_CLASS=y
357CONFIG_RTC_CLASS=y
358CONFIG_RTC_DRV_AU1XXX=y
359CONFIG_EXT4_FS=y
360CONFIG_EXT4_FS_POSIX_ACL=y
361CONFIG_EXT4_FS_SECURITY=y
362CONFIG_XFS_FS=y
363CONFIG_XFS_POSIX_ACL=y
364CONFIG_VFAT_FS=y
365CONFIG_TMPFS=y
366CONFIG_TMPFS_POSIX_ACL=y
367CONFIG_CONFIGFS_FS=y
368CONFIG_JFFS2_FS=y
369CONFIG_JFFS2_SUMMARY=y
370CONFIG_JFFS2_FS_XATTR=y
371CONFIG_JFFS2_COMPRESSION_OPTIONS=y
372CONFIG_JFFS2_LZO=y
373CONFIG_JFFS2_CMODE_FAVOURLZO=y
374CONFIG_SQUASHFS=y
375CONFIG_SQUASHFS_LZO=y
376CONFIG_SQUASHFS_XZ=y
377CONFIG_NFS_FS=y
378CONFIG_NFS_V3_ACL=y
379CONFIG_NFS_V4=y
380CONFIG_NFS_V4_1=y
381CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
382CONFIG_ROOT_NFS=y
383CONFIG_NFSD=y
384CONFIG_NFSD_V3_ACL=y
385CONFIG_NFSD_V4=y
386CONFIG_NLS_CODEPAGE_437=y
387CONFIG_NLS_CODEPAGE_850=y
388CONFIG_NLS_CODEPAGE_852=y
389CONFIG_NLS_CODEPAGE_1250=y
390CONFIG_NLS_ASCII=y
391CONFIG_NLS_ISO8859_1=y
392CONFIG_NLS_ISO8859_2=y
393CONFIG_NLS_ISO8859_15=y
394CONFIG_NLS_UTF8=y
395CONFIG_MAGIC_SYSRQ=y
396CONFIG_STRIP_ASM_SYMS=y
397CONFIG_SECURITYFS=y
398CONFIG_CRYPTO_USER=y
399CONFIG_CRYPTO_NULL=y
400CONFIG_CRYPTO_CRYPTD=y
401CONFIG_CRYPTO_CCM=y
402CONFIG_CRYPTO_GCM=y
403CONFIG_CRYPTO_CTS=y
404CONFIG_CRYPTO_LRW=y
405CONFIG_CRYPTO_PCBC=y
406CONFIG_CRYPTO_XTS=y
407CONFIG_CRYPTO_XCBC=y
408CONFIG_CRYPTO_VMAC=y
409CONFIG_CRYPTO_MD4=y
410CONFIG_CRYPTO_MICHAEL_MIC=y
411CONFIG_CRYPTO_RMD128=y
412CONFIG_CRYPTO_RMD160=y
413CONFIG_CRYPTO_RMD256=y
414CONFIG_CRYPTO_RMD320=y
415CONFIG_CRYPTO_SHA256=y
416CONFIG_CRYPTO_SHA512=y
417CONFIG_CRYPTO_TGR192=y
418CONFIG_CRYPTO_WP512=y
419CONFIG_CRYPTO_ANUBIS=y
420CONFIG_CRYPTO_BLOWFISH=y
421CONFIG_CRYPTO_CAMELLIA=y
422CONFIG_CRYPTO_CAST5=y
423CONFIG_CRYPTO_CAST6=y
424CONFIG_CRYPTO_FCRYPT=y
425CONFIG_CRYPTO_KHAZAD=y
426CONFIG_CRYPTO_SALSA20=y
427CONFIG_CRYPTO_SEED=y
428CONFIG_CRYPTO_SERPENT=y
429CONFIG_CRYPTO_TEA=y
430CONFIG_CRYPTO_TWOFISH=y
431CONFIG_CRYPTO_ZLIB=y
432CONFIG_CRYPTO_LZO=y
433CONFIG_CRYPTO_USER_API_HASH=y
434CONFIG_CRYPTO_USER_API_SKCIPHER=y
diff --git a/arch/mips/configs/db1300_defconfig b/arch/mips/configs/db1300_defconfig
deleted file mode 100644
index 3590ab5d9791..000000000000
--- a/arch/mips/configs/db1300_defconfig
+++ /dev/null
@@ -1,391 +0,0 @@
1CONFIG_MIPS=y
2CONFIG_MIPS_ALCHEMY=y
3CONFIG_ALCHEMY_GPIOINT_AU1300=y
4CONFIG_MIPS_DB1300=y
5CONFIG_SOC_AU1300=y
6CONFIG_RWSEM_GENERIC_SPINLOCK=y
7CONFIG_ARCH_SUPPORTS_OPROFILE=y
8CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_GENERIC_CMOS_UPDATE=y
12CONFIG_SCHED_OMIT_FRAME_POINTER=y
13CONFIG_CEVT_R4K_LIB=y
14CONFIG_CSRC_R4K_LIB=y
15CONFIG_DMA_COHERENT=y
16CONFIG_SYS_HAS_EARLY_PRINTK=y
17CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
18CONFIG_GENERIC_GPIO=y
19CONFIG_CPU_LITTLE_ENDIAN=y
20CONFIG_SYS_SUPPORTS_APM_EMULATION=y
21CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
22CONFIG_IRQ_CPU=y
23CONFIG_MIPS_L1_CACHE_SHIFT=5
24CONFIG_CPU_MIPS32_R1=y
25CONFIG_SYS_SUPPORTS_ZBOOT=y
26CONFIG_SYS_HAS_CPU_MIPS32_R1=y
27CONFIG_CPU_MIPS32=y
28CONFIG_CPU_MIPSR1=y
29CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
30CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
31CONFIG_HARDWARE_WATCHPOINTS=y
32CONFIG_32BIT=y
33CONFIG_PAGE_SIZE_4KB=y
34CONFIG_FORCE_MAX_ZONEORDER=11
35CONFIG_CPU_HAS_PREFETCH=y
36CONFIG_MIPS_MT_DISABLED=y
37CONFIG_64BIT_PHYS_ADDR=y
38CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
39CONFIG_CPU_HAS_SYNC=y
40CONFIG_CPU_SUPPORTS_HIGHMEM=y
41CONFIG_ARCH_FLATMEM_ENABLE=y
42CONFIG_ARCH_POPULATES_NODE_MAP=y
43CONFIG_SELECT_MEMORY_MODEL=y
44CONFIG_FLATMEM_MANUAL=y
45CONFIG_FLATMEM=y
46CONFIG_FLAT_NODE_MEM_MAP=y
47CONFIG_PAGEFLAGS_EXTENDED=y
48CONFIG_SPLIT_PTLOCK_CPUS=4
49CONFIG_COMPACTION=y
50CONFIG_MIGRATION=y
51CONFIG_PHYS_ADDR_T_64BIT=y
52CONFIG_ZONE_DMA_FLAG=0
53CONFIG_VIRT_TO_BUS=y
54CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
55CONFIG_NEED_PER_CPU_KM=y
56CONFIG_TICK_ONESHOT=y
57CONFIG_NO_HZ=y
58CONFIG_HIGH_RES_TIMERS=y
59CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
60CONFIG_HZ_100=y
61CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
62CONFIG_HZ=100
63CONFIG_PREEMPT_NONE=y
64CONFIG_LOCKDEP_SUPPORT=y
65CONFIG_STACKTRACE_SUPPORT=y
66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
68CONFIG_HAVE_IRQ_WORK=y
69CONFIG_EXPERIMENTAL=y
70CONFIG_BROKEN_ON_SMP=y
71CONFIG_INIT_ENV_ARG_LIMIT=32
72CONFIG_CROSS_COMPILE=""
73CONFIG_LOCALVERSION="-db1300"
74CONFIG_LOCALVERSION_AUTO=y
75CONFIG_HAVE_KERNEL_GZIP=y
76CONFIG_HAVE_KERNEL_BZIP2=y
77CONFIG_HAVE_KERNEL_LZMA=y
78CONFIG_HAVE_KERNEL_LZO=y
79CONFIG_KERNEL_LZMA=y
80CONFIG_SWAP=y
81CONFIG_SYSVIPC=y
82CONFIG_SYSVIPC_SYSCTL=y
83CONFIG_POSIX_MQUEUE=y
84CONFIG_POSIX_MQUEUE_SYSCTL=y
85CONFIG_FHANDLE=y
86CONFIG_HAVE_GENERIC_HARDIRQS=y
87CONFIG_GENERIC_HARDIRQS=y
88CONFIG_GENERIC_IRQ_PROBE=y
89CONFIG_GENERIC_IRQ_SHOW=y
90CONFIG_TINY_RCU=y
91CONFIG_LOG_BUF_SHIFT=19
92CONFIG_NAMESPACES=y
93CONFIG_UTS_NS=y
94CONFIG_IPC_NS=y
95CONFIG_USER_NS=y
96CONFIG_PID_NS=y
97CONFIG_NET_NS=y
98CONFIG_SYSCTL=y
99CONFIG_ANON_INODES=y
100CONFIG_EXPERT=y
101CONFIG_SYSCTL_SYSCALL=y
102CONFIG_KALLSYMS=y
103CONFIG_KALLSYMS_ALL=y
104CONFIG_HOTPLUG=y
105CONFIG_PRINTK=y
106CONFIG_BUG=y
107CONFIG_ELF_CORE=y
108CONFIG_BASE_FULL=y
109CONFIG_FUTEX=y
110CONFIG_EPOLL=y
111CONFIG_SIGNALFD=y
112CONFIG_TIMERFD=y
113CONFIG_EVENTFD=y
114CONFIG_SHMEM=y
115CONFIG_AIO=y
116CONFIG_EMBEDDED=y
117CONFIG_HAVE_PERF_EVENTS=y
118CONFIG_PERF_USE_VMALLOC=y
119CONFIG_SLAB=y
120CONFIG_HAVE_OPROFILE=y
121CONFIG_HAVE_KPROBES=y
122CONFIG_HAVE_KRETPROBES=y
123CONFIG_HAVE_DMA_ATTRS=y
124CONFIG_HAVE_DMA_API_DEBUG=y
125CONFIG_HAVE_ARCH_JUMP_LABEL=y
126CONFIG_HAVE_GENERIC_DMA_COHERENT=y
127CONFIG_SLABINFO=y
128CONFIG_RT_MUTEXES=y
129CONFIG_BASE_SMALL=0
130CONFIG_BLOCK=y
131CONFIG_LBDAF=y
132CONFIG_BLK_DEV_BSG=y
133CONFIG_IOSCHED_NOOP=y
134CONFIG_DEFAULT_NOOP=y
135CONFIG_DEFAULT_IOSCHED="noop"
136# CONFIG_UNINLINE_SPIN_UNLOCK is not set
137CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
138CONFIG_INLINE_READ_UNLOCK=y
139CONFIG_INLINE_READ_UNLOCK_IRQ=y
140CONFIG_INLINE_WRITE_UNLOCK=y
141CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
142CONFIG_MMU=y
143CONFIG_PCCARD=y
144CONFIG_PCMCIA=y
145CONFIG_PCMCIA_LOAD_CIS=y
146CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
147CONFIG_BINFMT_ELF=y
148CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
149CONFIG_TRAD_SIGNALS=y
150CONFIG_ARCH_HIBERNATION_POSSIBLE=y
151CONFIG_ARCH_SUSPEND_POSSIBLE=y
152CONFIG_NET=y
153CONFIG_PACKET=y
154CONFIG_UNIX=y
155CONFIG_XFRM=y
156CONFIG_INET=y
157CONFIG_IP_MULTICAST=y
158CONFIG_IP_PNP=y
159CONFIG_IP_PNP_DHCP=y
160CONFIG_IP_PNP_BOOTP=y
161CONFIG_IP_PNP_RARP=y
162CONFIG_INET_TUNNEL=y
163CONFIG_TCP_CONG_CUBIC=y
164CONFIG_DEFAULT_TCP_CONG="cubic"
165CONFIG_IPV6=y
166CONFIG_INET6_XFRM_MODE_TRANSPORT=y
167CONFIG_INET6_XFRM_MODE_TUNNEL=y
168CONFIG_INET6_XFRM_MODE_BEET=y
169CONFIG_IPV6_SIT=y
170CONFIG_IPV6_NDISC_NODETYPE=y
171CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
172CONFIG_STANDALONE=y
173CONFIG_PREVENT_FIRMWARE_BUILD=y
174CONFIG_FW_LOADER=y
175CONFIG_FIRMWARE_IN_KERNEL=y
176CONFIG_EXTRA_FIRMWARE=""
177CONFIG_MTD=y
178CONFIG_MTD_CMDLINE_PARTS=y
179CONFIG_MTD_CHAR=y
180CONFIG_MTD_BLKDEVS=y
181CONFIG_MTD_BLOCK=y
182CONFIG_MTD_CFI=y
183CONFIG_MTD_GEN_PROBE=y
184CONFIG_MTD_MAP_BANK_WIDTH_1=y
185CONFIG_MTD_MAP_BANK_WIDTH_2=y
186CONFIG_MTD_MAP_BANK_WIDTH_4=y
187CONFIG_MTD_CFI_I1=y
188CONFIG_MTD_CFI_I2=y
189CONFIG_MTD_CFI_AMDSTD=y
190CONFIG_MTD_CFI_UTIL=y
191CONFIG_MTD_PHYSMAP=y
192CONFIG_MTD_NAND_ECC=y
193CONFIG_MTD_NAND=y
194CONFIG_MTD_NAND_IDS=y
195CONFIG_MTD_NAND_PLATFORM=y
196CONFIG_BLK_DEV=y
197CONFIG_BLK_DEV_LOOP=y
198CONFIG_BLK_DEV_UB=y
199CONFIG_HAVE_IDE=y
200CONFIG_IDE=y
201CONFIG_IDE_GD=y
202CONFIG_IDE_GD_ATA=y
203CONFIG_BLK_DEV_IDECS=y
204CONFIG_IDE_TASK_IOCTL=y
205CONFIG_IDE_PROC_FS=y
206CONFIG_BLK_DEV_PLATFORM=y
207CONFIG_SCSI_MOD=y
208CONFIG_NETDEVICES=y
209CONFIG_MII=y
210CONFIG_PHYLIB=y
211CONFIG_SMSC_PHY=y
212CONFIG_NET_ETHERNET=y
213CONFIG_SMSC911X=y
214CONFIG_INPUT=y
215CONFIG_INPUT_EVDEV=y
216CONFIG_INPUT_KEYBOARD=y
217CONFIG_KEYBOARD_GPIO=y
218CONFIG_INPUT_TOUCHSCREEN=y
219CONFIG_TOUCHSCREEN_WM97XX=y
220CONFIG_TOUCHSCREEN_WM9712=y
221CONFIG_TOUCHSCREEN_WM9713=y
222CONFIG_INPUT_MISC=y
223CONFIG_INPUT_UINPUT=y
224CONFIG_VT=y
225CONFIG_CONSOLE_TRANSLATIONS=y
226CONFIG_VT_CONSOLE=y
227CONFIG_HW_CONSOLE=y
228CONFIG_VT_HW_CONSOLE_BINDING=y
229CONFIG_UNIX98_PTYS=y
230CONFIG_SERIAL_8250=y
231CONFIG_SERIAL_8250_CONSOLE=y
232CONFIG_SERIAL_8250_NR_UARTS=4
233CONFIG_SERIAL_8250_RUNTIME_UARTS=4
234CONFIG_SERIAL_CORE=y
235CONFIG_SERIAL_CORE_CONSOLE=y
236CONFIG_I2C=y
237CONFIG_I2C_BOARDINFO=y
238CONFIG_I2C_CHARDEV=y
239CONFIG_I2C_SMBUS=y
240CONFIG_I2C_AU1550=y
241CONFIG_SPI=y
242CONFIG_SPI_MASTER=y
243CONFIG_SPI_AU1550=y
244CONFIG_SPI_BITBANG=y
245CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
246CONFIG_HWMON=y
247CONFIG_HWMON_VID=y
248CONFIG_SENSORS_ADM1025=y
249CONFIG_FB=y
250CONFIG_FB_AU1200=y
251CONFIG_DUMMY_CONSOLE=y
252CONFIG_FRAMEBUFFER_CONSOLE=y
253CONFIG_FONTS=y
254CONFIG_FONT_ACORN_8x8=y
255CONFIG_LOGO=y
256CONFIG_LOGO_LINUX_CLUT224=y
257CONFIG_SOUND=y
258CONFIG_SND=y
259CONFIG_SND_TIMER=y
260CONFIG_SND_PCM=y
261CONFIG_SND_JACK=y
262CONFIG_SND_HRTIMER=y
263CONFIG_SND_DYNAMIC_MINORS=y
264CONFIG_SND_VERBOSE_PROCFS=y
265CONFIG_SND_VERBOSE_PRINTK=y
266CONFIG_SND_VMASTER=y
267CONFIG_SND_AC97_CODEC=y
268CONFIG_SND_SOC=y
269CONFIG_SND_SOC_CACHE_LZO=y
270CONFIG_SND_SOC_AC97_BUS=y
271CONFIG_SND_SOC_AU1XPSC=y
272CONFIG_SND_SOC_AU1XPSC_I2S=y
273CONFIG_SND_SOC_AU1XPSC_AC97=y
274CONFIG_SND_SOC_DB1300=y
275CONFIG_SND_SOC_I2C_AND_SPI=y
276CONFIG_SND_SOC_WM8731=y
277CONFIG_SND_SOC_WM9712=y
278CONFIG_AC97_BUS=y
279CONFIG_HID_SUPPORT=y
280CONFIG_HID=y
281CONFIG_HIDRAW=y
282CONFIG_USB_HID=y
283CONFIG_USB_HIDDEV=y
284CONFIG_USB_SUPPORT=y
285CONFIG_USB_ARCH_HAS_HCD=y
286CONFIG_USB_ARCH_HAS_OHCI=y
287CONFIG_USB_ARCH_HAS_EHCI=y
288CONFIG_USB=y
289CONFIG_USB_DYNAMIC_MINORS=y
290CONFIG_USB_EHCI_HCD=y
291CONFIG_USB_EHCI_ROOT_HUB_TT=y
292CONFIG_USB_EHCI_TT_NEWSCHED=y
293CONFIG_USB_OHCI_HCD=y
294CONFIG_USB_OHCI_LITTLE_ENDIAN=y
295CONFIG_RTC_LIB=y
296CONFIG_RTC_CLASS=y
297CONFIG_RTC_HCTOSYS=y
298CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
299CONFIG_RTC_INTF_SYSFS=y
300CONFIG_RTC_INTF_PROC=y
301CONFIG_RTC_INTF_DEV=y
302CONFIG_RTC_INTF_DEV_UIE_EMUL=y
303CONFIG_RTC_DRV_AU1XXX=y
304CONFIG_EXT2_FS=y
305CONFIG_FS_POSIX_ACL=y
306CONFIG_EXPORTFS=y
307CONFIG_FILE_LOCKING=y
308CONFIG_FSNOTIFY=y
309CONFIG_DNOTIFY=y
310CONFIG_INOTIFY_USER=y
311CONFIG_GENERIC_ACL=y
312CONFIG_FAT_FS=y
313CONFIG_VFAT_FS=y
314CONFIG_FAT_DEFAULT_CODEPAGE=437
315CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
316CONFIG_PROC_FS=y
317CONFIG_PROC_SYSCTL=y
318CONFIG_PROC_PAGE_MONITOR=y
319CONFIG_SYSFS=y
320CONFIG_TMPFS=y
321CONFIG_TMPFS_POSIX_ACL=y
322CONFIG_TMPFS_XATTR=y
323CONFIG_MISC_FILESYSTEMS=y
324CONFIG_JFFS2_FS=y
325CONFIG_JFFS2_FS_DEBUG=0
326CONFIG_JFFS2_FS_WRITEBUFFER=y
327CONFIG_JFFS2_SUMMARY=y
328CONFIG_JFFS2_FS_XATTR=y
329CONFIG_JFFS2_FS_POSIX_ACL=y
330CONFIG_JFFS2_FS_SECURITY=y
331CONFIG_JFFS2_COMPRESSION_OPTIONS=y
332CONFIG_JFFS2_ZLIB=y
333CONFIG_JFFS2_LZO=y
334CONFIG_JFFS2_RTIME=y
335CONFIG_JFFS2_RUBIN=y
336CONFIG_JFFS2_CMODE_PRIORITY=y
337CONFIG_SQUASHFS=y
338CONFIG_SQUASHFS_XZ=y
339CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
340CONFIG_NETWORK_FILESYSTEMS=y
341CONFIG_NFS_FS=y
342CONFIG_NFS_V3=y
343CONFIG_ROOT_NFS=y
344CONFIG_LOCKD=y
345CONFIG_LOCKD_V4=y
346CONFIG_NFS_COMMON=y
347CONFIG_SUNRPC=y
348CONFIG_MSDOS_PARTITION=y
349CONFIG_NLS=y
350CONFIG_NLS_DEFAULT="iso8859-1"
351CONFIG_NLS_CODEPAGE_437=y
352CONFIG_NLS_CODEPAGE_850=y
353CONFIG_NLS_ASCII=y
354CONFIG_NLS_ISO8859_1=y
355CONFIG_NLS_ISO8859_15=y
356CONFIG_NLS_UTF8=y
357CONFIG_TRACE_IRQFLAGS_SUPPORT=y
358CONFIG_PRINTK_TIME=y
359CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
360CONFIG_ENABLE_WARN_DEPRECATED=y
361CONFIG_ENABLE_MUST_CHECK=y
362CONFIG_FRAME_WARN=1024
363CONFIG_MAGIC_SYSRQ=y
364CONFIG_STRIP_ASM_SYMS=y
365CONFIG_HAVE_FUNCTION_TRACER=y
366CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
367CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
368CONFIG_HAVE_DYNAMIC_FTRACE=y
369CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
370CONFIG_HAVE_C_RECORDMCOUNT=y
371CONFIG_TRACING_SUPPORT=y
372CONFIG_HAVE_ARCH_KGDB=y
373CONFIG_EARLY_PRINTK=y
374CONFIG_CMDLINE_BOOL=y
375CONFIG_CMDLINE="video=au1200fb:panel:bs console=tty console=ttyS2,115200"
376CONFIG_DEBUG_ZBOOT=y
377CONFIG_DEFAULT_SECURITY_DAC=y
378CONFIG_DEFAULT_SECURITY=""
379CONFIG_CRYPTO=y
380CONFIG_BITREVERSE=y
381CONFIG_CRC32=y
382CONFIG_ZLIB_INFLATE=y
383CONFIG_ZLIB_DEFLATE=y
384CONFIG_LZO_COMPRESS=y
385CONFIG_LZO_DECOMPRESS=y
386CONFIG_XZ_DEC=y
387CONFIG_HAS_IOMEM=y
388CONFIG_HAS_IOPORT=y
389CONFIG_HAS_DMA=y
390CONFIG_NLATTR=y
391CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
deleted file mode 100644
index 36cda27725e7..000000000000
--- a/arch/mips/configs/db1550_defconfig
+++ /dev/null
@@ -1,285 +0,0 @@
1CONFIG_MIPS=y
2CONFIG_MIPS_ALCHEMY=y
3CONFIG_MIPS_DB1550=y
4CONFIG_SCHED_OMIT_FRAME_POINTER=y
5CONFIG_GENERIC_GPIO=y
6CONFIG_TICK_ONESHOT=y
7CONFIG_NO_HZ=y
8CONFIG_HIGH_RES_TIMERS=y
9CONFIG_HZ_100=y
10CONFIG_HZ=100
11CONFIG_EXPERIMENTAL=y
12CONFIG_BROKEN_ON_SMP=y
13CONFIG_INIT_ENV_ARG_LIMIT=32
14CONFIG_LOCALVERSION="-db1550"
15CONFIG_LOCALVERSION_AUTO=y
16CONFIG_KERNEL_LZMA=y
17CONFIG_DEFAULT_HOSTNAME="db1550"
18CONFIG_SWAP=y
19CONFIG_SYSVIPC=y
20CONFIG_SYSVIPC_SYSCTL=y
21CONFIG_POSIX_MQUEUE=y
22CONFIG_POSIX_MQUEUE_SYSCTL=y
23CONFIG_FHANDLE=y
24CONFIG_AUDIT=y
25CONFIG_TINY_RCU=y
26CONFIG_LOG_BUF_SHIFT=18
27CONFIG_NAMESPACES=y
28CONFIG_UTS_NS=y
29CONFIG_IPC_NS=y
30CONFIG_USER_NS=y
31CONFIG_PID_NS=y
32CONFIG_NET_NS=y
33CONFIG_EXPERT=y
34CONFIG_HOTPLUG=y
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_ELF_CORE=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41CONFIG_SIGNALFD=y
42CONFIG_TIMERFD=y
43CONFIG_EVENTFD=y
44CONFIG_SHMEM=y
45CONFIG_AIO=y
46CONFIG_EMBEDDED=y
47CONFIG_PCI_QUIRKS=y
48CONFIG_SLAB=y
49CONFIG_BLOCK=y
50CONFIG_LBDAF=y
51CONFIG_BLK_DEV_BSG=y
52CONFIG_BLK_DEV_BSGLIB=y
53CONFIG_IOSCHED_NOOP=y
54CONFIG_DEFAULT_NOOP=y
55CONFIG_DEFAULT_IOSCHED="noop"
56CONFIG_PCI=y
57CONFIG_PCCARD=y
58CONFIG_PCMCIA=y
59CONFIG_PCMCIA_LOAD_CIS=y
60CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
61CONFIG_BINFMT_ELF=y
62CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
63CONFIG_BINFMT_MISC=y
64CONFIG_SUSPEND=y
65CONFIG_SUSPEND_FREEZER=y
66CONFIG_PM_SLEEP=y
67CONFIG_PM_RUNTIME=y
68CONFIG_PM=y
69CONFIG_NET=y
70CONFIG_PACKET=y
71CONFIG_UNIX=y
72CONFIG_XFRM=y
73CONFIG_INET=y
74CONFIG_IP_MULTICAST=y
75CONFIG_IP_PNP=y
76CONFIG_IP_PNP_DHCP=y
77CONFIG_IP_PNP_BOOTP=y
78CONFIG_IP_PNP_RARP=y
79CONFIG_INET_TUNNEL=y
80CONFIG_INET_LRO=y
81CONFIG_TCP_CONG_CUBIC=y
82CONFIG_DEFAULT_TCP_CONG="cubic"
83CONFIG_IPV6=y
84CONFIG_INET6_XFRM_MODE_TRANSPORT=y
85CONFIG_INET6_XFRM_MODE_TUNNEL=y
86CONFIG_INET6_XFRM_MODE_BEET=y
87CONFIG_IPV6_SIT=y
88CONFIG_IPV6_NDISC_NODETYPE=y
89CONFIG_DNS_RESOLVER=y
90CONFIG_UEVENT_HELPER_PATH=""
91CONFIG_STANDALONE=y
92CONFIG_PREVENT_FIRMWARE_BUILD=y
93CONFIG_FW_LOADER=y
94CONFIG_FIRMWARE_IN_KERNEL=y
95CONFIG_MTD=y
96CONFIG_MTD_CHAR=y
97CONFIG_MTD_BLKDEVS=y
98CONFIG_MTD_BLOCK=y
99CONFIG_MTD_CFI=y
100CONFIG_MTD_GEN_PROBE=y
101CONFIG_MTD_MAP_BANK_WIDTH_1=y
102CONFIG_MTD_MAP_BANK_WIDTH_2=y
103CONFIG_MTD_MAP_BANK_WIDTH_4=y
104CONFIG_MTD_CFI_I1=y
105CONFIG_MTD_CFI_I2=y
106CONFIG_MTD_CFI_AMDSTD=y
107CONFIG_MTD_CFI_UTIL=y
108CONFIG_MTD_PHYSMAP=y
109CONFIG_MTD_M25P80=y
110CONFIG_MTD_NAND_ECC=y
111CONFIG_MTD_NAND=y
112CONFIG_MTD_NAND_IDS=y
113CONFIG_MTD_NAND_PLATFORM=y
114CONFIG_MISC_DEVICES=y
115CONFIG_EEPROM_AT24=y
116CONFIG_SCSI_MOD=y
117CONFIG_SCSI=y
118CONFIG_SCSI_DMA=y
119CONFIG_BLK_DEV_SD=y
120CONFIG_CHR_DEV_SG=y
121CONFIG_SCSI_MULTI_LUN=y
122CONFIG_SCSI_SCAN_ASYNC=y
123CONFIG_ATA=y
124CONFIG_ATA_SFF=y
125CONFIG_ATA_BMDMA=y
126CONFIG_PATA_HPT37X=y
127CONFIG_PATA_PCMCIA=y
128CONFIG_MD=y
129CONFIG_BLK_DEV_DM=y
130CONFIG_NETDEVICES=y
131CONFIG_MII=y
132CONFIG_PHYLIB=y
133CONFIG_NET_ETHERNET=y
134CONFIG_MIPS_AU1X00_ENET=y
135CONFIG_NET_PCMCIA=y
136CONFIG_PCMCIA_3C589=y
137CONFIG_PCMCIA_PCNET=y
138CONFIG_INPUT=y
139CONFIG_INPUT_EVDEV=y
140CONFIG_VT=y
141CONFIG_CONSOLE_TRANSLATIONS=y
142CONFIG_VT_CONSOLE=y
143CONFIG_HW_CONSOLE=y
144CONFIG_UNIX98_PTYS=y
145CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
146CONFIG_DEVKMEM=y
147CONFIG_SERIAL_8250=y
148CONFIG_SERIAL_8250_CONSOLE=y
149CONFIG_SERIAL_8250_NR_UARTS=4
150CONFIG_SERIAL_8250_RUNTIME_UARTS=4
151CONFIG_SERIAL_CORE=y
152CONFIG_SERIAL_CORE_CONSOLE=y
153CONFIG_DEVPORT=y
154CONFIG_I2C=y
155CONFIG_I2C_BOARDINFO=y
156CONFIG_I2C_CHARDEV=y
157CONFIG_I2C_AU1550=y
158CONFIG_SPI=y
159CONFIG_SPI_MASTER=y
160CONFIG_SPI_AU1550=y
161CONFIG_SPI_BITBANG=y
162CONFIG_HWMON=y
163CONFIG_SENSORS_ADM1025=y
164CONFIG_SENSORS_LM70=y
165CONFIG_DUMMY_CONSOLE=y
166CONFIG_SOUND=y
167CONFIG_SND=y
168CONFIG_SND_TIMER=y
169CONFIG_SND_PCM=y
170CONFIG_SND_JACK=y
171CONFIG_SND_VMASTER=y
172CONFIG_SND_AC97_CODEC=y
173CONFIG_SND_SOC=y
174CONFIG_SND_SOC_AC97_BUS=y
175CONFIG_SND_SOC_AU1XPSC=y
176CONFIG_SND_SOC_AU1XPSC_I2S=y
177CONFIG_SND_SOC_AU1XPSC_AC97=y
178CONFIG_SND_SOC_DB1200=y
179CONFIG_SND_SOC_I2C_AND_SPI=y
180CONFIG_SND_SOC_AC97_CODEC=y
181CONFIG_SND_SOC_WM8731=y
182CONFIG_SND_SOC_WM9712=y
183CONFIG_AC97_BUS=y
184CONFIG_USB=y
185CONFIG_USB_DYNAMIC_MINORS=y
186CONFIG_USB_EHCI_HCD=y
187CONFIG_USB_EHCI_ROOT_HUB_TT=y
188CONFIG_USB_EHCI_TT_NEWSCHED=y
189CONFIG_USB_OHCI_HCD=y
190CONFIG_USB_OHCI_LITTLE_ENDIAN=y
191CONFIG_USB_UHCI_HCD=y
192CONFIG_USB_STORAGE=y
193CONFIG_RTC_LIB=y
194CONFIG_RTC_CLASS=y
195CONFIG_RTC_HCTOSYS=y
196CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
197CONFIG_RTC_INTF_SYSFS=y
198CONFIG_RTC_INTF_PROC=y
199CONFIG_RTC_INTF_DEV=y
200CONFIG_RTC_DRV_AU1XXX=y
201CONFIG_EXT4_FS=y
202CONFIG_EXT4_USE_FOR_EXT23=y
203CONFIG_EXT4_FS_XATTR=y
204CONFIG_EXT4_FS_POSIX_ACL=y
205CONFIG_EXT4_FS_SECURITY=y
206CONFIG_JBD2=y
207CONFIG_FS_MBCACHE=y
208CONFIG_FS_POSIX_ACL=y
209CONFIG_EXPORTFS=y
210CONFIG_FILE_LOCKING=y
211CONFIG_FSNOTIFY=y
212CONFIG_DNOTIFY=y
213CONFIG_INOTIFY_USER=y
214CONFIG_PROC_FS=y
215CONFIG_PROC_SYSCTL=y
216CONFIG_SYSFS=y
217CONFIG_TMPFS=y
218CONFIG_CONFIGFS_FS=y
219CONFIG_MISC_FILESYSTEMS=y
220CONFIG_JFFS2_FS=y
221CONFIG_JFFS2_FS_DEBUG=0
222CONFIG_JFFS2_FS_WRITEBUFFER=y
223CONFIG_JFFS2_SUMMARY=y
224CONFIG_JFFS2_FS_XATTR=y
225CONFIG_JFFS2_COMPRESSION_OPTIONS=y
226CONFIG_JFFS2_ZLIB=y
227CONFIG_JFFS2_LZO=y
228CONFIG_JFFS2_RTIME=y
229CONFIG_JFFS2_RUBIN=y
230CONFIG_JFFS2_CMODE_PRIORITY=y
231CONFIG_SQUASHFS=y
232CONFIG_SQUASHFS_ZLIB=y
233CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
234CONFIG_NETWORK_FILESYSTEMS=y
235CONFIG_NFS_FS=y
236CONFIG_NFS_V3=y
237CONFIG_NFS_V3_ACL=y
238CONFIG_NFS_V4=y
239CONFIG_NFS_V4_1=y
240CONFIG_PNFS_FILE_LAYOUT=y
241CONFIG_PNFS_BLOCK=y
242CONFIG_ROOT_NFS=y
243CONFIG_NFS_USE_KERNEL_DNS=y
244CONFIG_NFS_USE_NEW_IDMAPPER=y
245CONFIG_NFSD=y
246CONFIG_NFSD_V2_ACL=y
247CONFIG_NFSD_V3=y
248CONFIG_NFSD_V3_ACL=y
249CONFIG_NFSD_V4=y
250CONFIG_LOCKD=y
251CONFIG_LOCKD_V4=y
252CONFIG_NFS_ACL_SUPPORT=y
253CONFIG_NFS_COMMON=y
254CONFIG_SUNRPC=y
255CONFIG_SUNRPC_GSS=y
256CONFIG_SUNRPC_BACKCHANNEL=y
257CONFIG_MSDOS_PARTITION=y
258CONFIG_NLS=y
259CONFIG_NLS_DEFAULT="iso8859-1"
260CONFIG_NLS_CODEPAGE_437=y
261CONFIG_NLS_CODEPAGE_850=y
262CONFIG_NLS_CODEPAGE_852=y
263CONFIG_NLS_CODEPAGE_1250=y
264CONFIG_NLS_ASCII=y
265CONFIG_NLS_ISO8859_1=y
266CONFIG_NLS_ISO8859_15=y
267CONFIG_NLS_UTF8=y
268CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
269CONFIG_FRAME_WARN=1024
270CONFIG_CMDLINE_BOOL=y
271CONFIG_CMDLINE="noirqdebug console=ttyS0,115200 root=/dev/sda1 rootfstype=ext4"
272CONFIG_KEYS=y
273CONFIG_SECURITYFS=y
274CONFIG_DEFAULT_SECURITY_DAC=y
275CONFIG_BITREVERSE=y
276CONFIG_CRC16=y
277CONFIG_CRC_ITU_T=y
278CONFIG_CRC32=y
279CONFIG_AUDIT_GENERIC=y
280CONFIG_ZLIB_INFLATE=y
281CONFIG_ZLIB_DEFLATE=y
282CONFIG_LZO_COMPRESS=y
283CONFIG_LZO_DECOMPRESS=y
284CONFIG_BCH=y
285CONFIG_NLATTR=y
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
deleted file mode 100644
index 75eb1b1f316c..000000000000
--- a/arch/mips/configs/pb1100_defconfig
+++ /dev/null
@@ -1,124 +0,0 @@
1CONFIG_MIPS_ALCHEMY=y
2CONFIG_MIPS_PB1100=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
5CONFIG_HZ_100=y
6# CONFIG_SECCOMP is not set
7CONFIG_EXPERIMENTAL=y
8CONFIG_LOCALVERSION="-pb1100"
9CONFIG_KERNEL_LZMA=y
10CONFIG_SYSVIPC=y
11CONFIG_POSIX_MQUEUE=y
12CONFIG_TINY_RCU=y
13CONFIG_LOG_BUF_SHIFT=14
14CONFIG_EXPERT=y
15# CONFIG_SYSCTL_SYSCALL is not set
16# CONFIG_KALLSYMS is not set
17# CONFIG_PCSPKR_PLATFORM is not set
18# CONFIG_VM_EVENT_COUNTERS is not set
19# CONFIG_COMPAT_BRK is not set
20CONFIG_SLAB=y
21CONFIG_MODULES=y
22CONFIG_MODULE_UNLOAD=y
23# CONFIG_LBDAF is not set
24# CONFIG_BLK_DEV_BSG is not set
25# CONFIG_IOSCHED_DEADLINE is not set
26# CONFIG_IOSCHED_CFQ is not set
27CONFIG_PCCARD=y
28CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
29CONFIG_PM=y
30CONFIG_PM_RUNTIME=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_INET=y
35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38CONFIG_IP_PNP_BOOTP=y
39CONFIG_IP_PNP_RARP=y
40# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
41# CONFIG_INET_XFRM_MODE_TUNNEL is not set
42# CONFIG_INET_XFRM_MODE_BEET is not set
43# CONFIG_INET_DIAG is not set
44# CONFIG_IPV6 is not set
45# CONFIG_WIRELESS is not set
46CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
47CONFIG_MTD=y
48CONFIG_MTD_PARTITIONS=y
49CONFIG_MTD_CHAR=y
50CONFIG_MTD_BLOCK=y
51CONFIG_MTD_CFI=y
52CONFIG_MTD_CFI_AMDSTD=y
53CONFIG_MTD_PHYSMAP=y
54CONFIG_BLK_DEV_LOOP=y
55CONFIG_BLK_DEV_UB=y
56# CONFIG_MISC_DEVICES is not set
57CONFIG_IDE=y
58CONFIG_BLK_DEV_IDECS=y
59CONFIG_IDE_TASK_IOCTL=y
60# CONFIG_IDE_PROC_FS is not set
61CONFIG_NETDEVICES=y
62CONFIG_MARVELL_PHY=y
63CONFIG_DAVICOM_PHY=y
64CONFIG_QSEMI_PHY=y
65CONFIG_LXT_PHY=y
66CONFIG_CICADA_PHY=y
67CONFIG_VITESSE_PHY=y
68CONFIG_SMSC_PHY=y
69CONFIG_BROADCOM_PHY=y
70CONFIG_ICPLUS_PHY=y
71CONFIG_REALTEK_PHY=y
72CONFIG_NATIONAL_PHY=y
73CONFIG_STE10XP=y
74CONFIG_LSI_ET1011C_PHY=y
75CONFIG_NET_ETHERNET=y
76CONFIG_MII=y
77CONFIG_MIPS_AU1X00_ENET=y
78# CONFIG_NETDEV_1000 is not set
79# CONFIG_NETDEV_10000 is not set
80# CONFIG_WLAN is not set
81# CONFIG_INPUT_MOUSEDEV is not set
82CONFIG_INPUT_EVDEV=y
83# CONFIG_INPUT_KEYBOARD is not set
84# CONFIG_INPUT_MOUSE is not set
85# CONFIG_SERIO is not set
86CONFIG_VT_HW_CONSOLE_BINDING=y
87CONFIG_SERIAL_8250=y
88CONFIG_SERIAL_8250_CONSOLE=y
89# CONFIG_LEGACY_PTYS is not set
90# CONFIG_HW_RANDOM is not set
91# CONFIG_HWMON is not set
92# CONFIG_VGA_CONSOLE is not set
93CONFIG_HIDRAW=y
94CONFIG_USB_HIDDEV=y
95CONFIG_USB=y
96# CONFIG_USB_DEVICE_CLASS is not set
97CONFIG_USB_DYNAMIC_MINORS=y
98CONFIG_USB_SUSPEND=y
99CONFIG_USB_OHCI_HCD=y
100CONFIG_RTC_CLASS=y
101CONFIG_RTC_DRV_AU1XXX=y
102CONFIG_EXT2_FS=y
103# CONFIG_PROC_PAGE_MONITOR is not set
104CONFIG_TMPFS=y
105CONFIG_JFFS2_FS=y
106CONFIG_JFFS2_SUMMARY=y
107CONFIG_JFFS2_FS_XATTR=y
108# CONFIG_JFFS2_FS_POSIX_ACL is not set
109# CONFIG_JFFS2_FS_SECURITY is not set
110CONFIG_JFFS2_COMPRESSION_OPTIONS=y
111CONFIG_JFFS2_LZO=y
112CONFIG_JFFS2_RUBIN=y
113CONFIG_SQUASHFS=y
114CONFIG_NFS_FS=y
115CONFIG_NFS_V3=y
116CONFIG_ROOT_NFS=y
117CONFIG_STRIP_ASM_SYMS=y
118CONFIG_DEBUG_KERNEL=y
119# CONFIG_SCHED_DEBUG is not set
120# CONFIG_FTRACE is not set
121CONFIG_DEBUG_ZBOOT=y
122CONFIG_KEYS=y
123CONFIG_KEYS_DEBUG_PROC_KEYS=y
124CONFIG_SECURITYFS=y
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
deleted file mode 100644
index fa00487146f8..000000000000
--- a/arch/mips/configs/pb1500_defconfig
+++ /dev/null
@@ -1,141 +0,0 @@
1CONFIG_MIPS_ALCHEMY=y
2CONFIG_MIPS_PB1500=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
5CONFIG_HZ_100=y
6# CONFIG_SECCOMP is not set
7CONFIG_EXPERIMENTAL=y
8CONFIG_LOCALVERSION="-pb1500"
9CONFIG_KERNEL_LZMA=y
10CONFIG_SYSVIPC=y
11CONFIG_POSIX_MQUEUE=y
12CONFIG_TINY_RCU=y
13CONFIG_LOG_BUF_SHIFT=14
14CONFIG_EXPERT=y
15# CONFIG_SYSCTL_SYSCALL is not set
16# CONFIG_KALLSYMS is not set
17# CONFIG_PCSPKR_PLATFORM is not set
18# CONFIG_VM_EVENT_COUNTERS is not set
19# CONFIG_COMPAT_BRK is not set
20CONFIG_SLAB=y
21CONFIG_MODULES=y
22CONFIG_MODULE_UNLOAD=y
23# CONFIG_IOSCHED_DEADLINE is not set
24# CONFIG_IOSCHED_CFQ is not set
25CONFIG_PCI=y
26CONFIG_PCCARD=y
27# CONFIG_CARDBUS is not set
28CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
29CONFIG_PM=y
30CONFIG_PM_RUNTIME=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_INET=y
35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38CONFIG_IP_PNP_BOOTP=y
39CONFIG_IP_PNP_RARP=y
40# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
41# CONFIG_INET_XFRM_MODE_TUNNEL is not set
42# CONFIG_INET_XFRM_MODE_BEET is not set
43# CONFIG_INET_DIAG is not set
44# CONFIG_IPV6 is not set
45# CONFIG_WIRELESS is not set
46CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
47CONFIG_MTD=y
48CONFIG_MTD_PARTITIONS=y
49CONFIG_MTD_CHAR=y
50CONFIG_MTD_BLOCK=y
51CONFIG_MTD_CFI=y
52CONFIG_MTD_CFI_AMDSTD=y
53CONFIG_MTD_PHYSMAP=y
54CONFIG_BLK_DEV_LOOP=y
55CONFIG_BLK_DEV_UB=y
56# CONFIG_MISC_DEVICES is not set
57CONFIG_IDE=y
58CONFIG_BLK_DEV_IDECS=y
59CONFIG_BLK_DEV_IDECD=y
60CONFIG_IDE_TASK_IOCTL=y
61# CONFIG_IDEPCI_PCIBUS_ORDER is not set
62CONFIG_BLK_DEV_HPT366=y
63CONFIG_NETDEVICES=y
64CONFIG_MARVELL_PHY=y
65CONFIG_DAVICOM_PHY=y
66CONFIG_QSEMI_PHY=y
67CONFIG_LXT_PHY=y
68CONFIG_CICADA_PHY=y
69CONFIG_VITESSE_PHY=y
70CONFIG_SMSC_PHY=y
71CONFIG_BROADCOM_PHY=y
72CONFIG_ICPLUS_PHY=y
73CONFIG_REALTEK_PHY=y
74CONFIG_NATIONAL_PHY=y
75CONFIG_STE10XP=y
76CONFIG_LSI_ET1011C_PHY=y
77CONFIG_NET_ETHERNET=y
78CONFIG_MII=y
79CONFIG_MIPS_AU1X00_ENET=y
80# CONFIG_NETDEV_1000 is not set
81# CONFIG_NETDEV_10000 is not set
82# CONFIG_WLAN is not set
83# CONFIG_INPUT_MOUSEDEV is not set
84CONFIG_INPUT_EVDEV=y
85# CONFIG_INPUT_KEYBOARD is not set
86# CONFIG_INPUT_MOUSE is not set
87# CONFIG_SERIO is not set
88CONFIG_VT_HW_CONSOLE_BINDING=y
89CONFIG_SERIAL_8250=y
90CONFIG_SERIAL_8250_CONSOLE=y
91# CONFIG_SERIAL_8250_PCI is not set
92# CONFIG_LEGACY_PTYS is not set
93# CONFIG_HW_RANDOM is not set
94# CONFIG_HWMON is not set
95# CONFIG_VGA_ARB is not set
96CONFIG_FB=y
97CONFIG_FIRMWARE_EDID=y
98CONFIG_FB_MODE_HELPERS=y
99CONFIG_FB_TILEBLITTING=y
100CONFIG_FB_S1D13XXX=y
101CONFIG_USB_HIDDEV=y
102CONFIG_USB=y
103# CONFIG_USB_DEVICE_CLASS is not set
104CONFIG_USB_DYNAMIC_MINORS=y
105CONFIG_USB_OTG_WHITELIST=y
106CONFIG_USB_OHCI_HCD=y
107CONFIG_RTC_CLASS=y
108CONFIG_RTC_DRV_AU1XXX=y
109CONFIG_EXT2_FS=y
110CONFIG_ISO9660_FS=y
111CONFIG_JOLIET=y
112CONFIG_ZISOFS=y
113CONFIG_UDF_FS=y
114CONFIG_VFAT_FS=y
115# CONFIG_PROC_PAGE_MONITOR is not set
116CONFIG_TMPFS=y
117CONFIG_JFFS2_FS=y
118CONFIG_JFFS2_SUMMARY=y
119CONFIG_JFFS2_COMPRESSION_OPTIONS=y
120CONFIG_JFFS2_LZO=y
121CONFIG_JFFS2_RUBIN=y
122CONFIG_SQUASHFS=y
123CONFIG_NFS_FS=y
124CONFIG_NFS_V3=y
125CONFIG_ROOT_NFS=y
126CONFIG_NLS_CODEPAGE_437=y
127CONFIG_NLS_CODEPAGE_850=y
128CONFIG_NLS_CODEPAGE_852=y
129CONFIG_NLS_CODEPAGE_1250=y
130CONFIG_NLS_ASCII=y
131CONFIG_NLS_ISO8859_1=y
132CONFIG_NLS_ISO8859_15=y
133CONFIG_NLS_UTF8=y
134CONFIG_STRIP_ASM_SYMS=y
135CONFIG_DEBUG_KERNEL=y
136# CONFIG_SCHED_DEBUG is not set
137# CONFIG_FTRACE is not set
138CONFIG_DEBUG_ZBOOT=y
139CONFIG_KEYS=y
140CONFIG_KEYS_DEBUG_PROC_KEYS=y
141CONFIG_SECURITYFS=y
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
deleted file mode 100644
index e83d6497e8b4..000000000000
--- a/arch/mips/configs/pb1550_defconfig
+++ /dev/null
@@ -1,145 +0,0 @@
1CONFIG_MIPS_ALCHEMY=y
2CONFIG_MIPS_PB1550=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
5CONFIG_HZ_100=y
6# CONFIG_SECCOMP is not set
7CONFIG_EXPERIMENTAL=y
8CONFIG_LOCALVERSION="-pb1550"
9CONFIG_KERNEL_LZMA=y
10CONFIG_SYSVIPC=y
11CONFIG_POSIX_MQUEUE=y
12CONFIG_TINY_RCU=y
13CONFIG_LOG_BUF_SHIFT=14
14CONFIG_EXPERT=y
15# CONFIG_SYSCTL_SYSCALL is not set
16# CONFIG_KALLSYMS is not set
17# CONFIG_PCSPKR_PLATFORM is not set
18# CONFIG_VM_EVENT_COUNTERS is not set
19# CONFIG_COMPAT_BRK is not set
20CONFIG_SLAB=y
21CONFIG_MODULES=y
22CONFIG_MODULE_UNLOAD=y
23# CONFIG_IOSCHED_DEADLINE is not set
24# CONFIG_IOSCHED_CFQ is not set
25CONFIG_PCI=y
26CONFIG_PCCARD=y
27# CONFIG_CARDBUS is not set
28CONFIG_PCMCIA_ALCHEMY_DEVBOARD=y
29CONFIG_PM=y
30CONFIG_PM_RUNTIME=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_INET=y
35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38CONFIG_IP_PNP_BOOTP=y
39CONFIG_IP_PNP_RARP=y
40# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
41# CONFIG_INET_XFRM_MODE_TUNNEL is not set
42# CONFIG_INET_XFRM_MODE_BEET is not set
43# CONFIG_INET_DIAG is not set
44# CONFIG_IPV6 is not set
45CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
46CONFIG_MTD=y
47CONFIG_MTD_PARTITIONS=y
48CONFIG_MTD_CHAR=y
49CONFIG_MTD_BLOCK=y
50CONFIG_MTD_CFI=y
51CONFIG_MTD_CFI_AMDSTD=y
52CONFIG_MTD_PHYSMAP=y
53CONFIG_MTD_NAND=y
54CONFIG_MTD_NAND_AU1550=y
55CONFIG_BLK_DEV_LOOP=y
56CONFIG_BLK_DEV_UB=y
57# CONFIG_MISC_DEVICES is not set
58CONFIG_IDE=y
59CONFIG_BLK_DEV_IDECS=y
60CONFIG_BLK_DEV_IDECD=y
61# CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS is not set
62# CONFIG_IDEPCI_PCIBUS_ORDER is not set
63CONFIG_BLK_DEV_HPT366=y
64CONFIG_NETDEVICES=y
65CONFIG_MARVELL_PHY=y
66CONFIG_DAVICOM_PHY=y
67CONFIG_QSEMI_PHY=y
68CONFIG_LXT_PHY=y
69CONFIG_CICADA_PHY=y
70CONFIG_VITESSE_PHY=y
71CONFIG_SMSC_PHY=y
72CONFIG_BROADCOM_PHY=y
73CONFIG_ICPLUS_PHY=y
74CONFIG_REALTEK_PHY=y
75CONFIG_NATIONAL_PHY=y
76CONFIG_STE10XP=y
77CONFIG_LSI_ET1011C_PHY=y
78CONFIG_NET_ETHERNET=y
79CONFIG_MII=y
80CONFIG_MIPS_AU1X00_ENET=y
81# CONFIG_NETDEV_1000 is not set
82# CONFIG_NETDEV_10000 is not set
83# CONFIG_WLAN is not set
84# CONFIG_INPUT_MOUSEDEV is not set
85CONFIG_INPUT_EVDEV=y
86# CONFIG_INPUT_KEYBOARD is not set
87# CONFIG_INPUT_MOUSE is not set
88# CONFIG_SERIO is not set
89CONFIG_VT_HW_CONSOLE_BINDING=y
90CONFIG_SERIAL_8250=y
91CONFIG_SERIAL_8250_CONSOLE=y
92# CONFIG_SERIAL_8250_PCI is not set
93# CONFIG_LEGACY_PTYS is not set
94# CONFIG_HW_RANDOM is not set
95CONFIG_I2C=y
96# CONFIG_I2C_COMPAT is not set
97CONFIG_I2C_CHARDEV=y
98# CONFIG_I2C_HELPER_AUTO is not set
99CONFIG_I2C_AU1550=y
100# CONFIG_HWMON is not set
101# CONFIG_VGA_ARB is not set
102CONFIG_HIDRAW=y
103CONFIG_USB_HIDDEV=y
104CONFIG_USB=y
105CONFIG_USB_DEVICEFS=y
106CONFIG_USB_DYNAMIC_MINORS=y
107CONFIG_USB_SUSPEND=y
108CONFIG_USB_EHCI_HCD=y
109CONFIG_USB_EHCI_ROOT_HUB_TT=y
110CONFIG_USB_OHCI_HCD=y
111CONFIG_RTC_CLASS=y
112CONFIG_RTC_DRV_AU1XXX=y
113CONFIG_EXT2_FS=y
114CONFIG_ISO9660_FS=y
115CONFIG_JOLIET=y
116CONFIG_ZISOFS=y
117CONFIG_UDF_FS=y
118CONFIG_VFAT_FS=y
119# CONFIG_PROC_PAGE_MONITOR is not set
120CONFIG_TMPFS=y
121CONFIG_JFFS2_FS=y
122CONFIG_JFFS2_SUMMARY=y
123CONFIG_JFFS2_COMPRESSION_OPTIONS=y
124CONFIG_JFFS2_LZO=y
125CONFIG_JFFS2_RUBIN=y
126CONFIG_SQUASHFS=y
127CONFIG_NFS_FS=y
128CONFIG_NFS_V3=y
129CONFIG_ROOT_NFS=y
130CONFIG_NLS_CODEPAGE_437=y
131CONFIG_NLS_CODEPAGE_850=y
132CONFIG_NLS_CODEPAGE_852=y
133CONFIG_NLS_CODEPAGE_1250=y
134CONFIG_NLS_ASCII=y
135CONFIG_NLS_ISO8859_1=y
136CONFIG_NLS_ISO8859_15=y
137CONFIG_NLS_UTF8=y
138CONFIG_STRIP_ASM_SYMS=y
139CONFIG_DEBUG_KERNEL=y
140# CONFIG_SCHED_DEBUG is not set
141# CONFIG_FTRACE is not set
142CONFIG_DEBUG_ZBOOT=y
143CONFIG_KEYS=y
144CONFIG_KEYS_DEBUG_PROC_KEYS=y
145CONFIG_SECURITYFS=y
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index f53f9ca73996..e69de29bb2d1 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -1,5 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3header-y += cachectl.h
4header-y += sgidefs.h
5header-y += sysmips.h
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index 3f4c5cb6433e..01cc6ba64831 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -59,8 +59,8 @@ static __inline__ void atomic_add(int i, atomic_t * v)
59 " sc %0, %1 \n" 59 " sc %0, %1 \n"
60 " beqzl %0, 1b \n" 60 " beqzl %0, 1b \n"
61 " .set mips0 \n" 61 " .set mips0 \n"
62 : "=&r" (temp), "=m" (v->counter) 62 : "=&r" (temp), "+m" (v->counter)
63 : "Ir" (i), "m" (v->counter)); 63 : "Ir" (i));
64 } else if (kernel_uses_llsc) { 64 } else if (kernel_uses_llsc) {
65 int temp; 65 int temp;
66 66
@@ -71,8 +71,8 @@ static __inline__ void atomic_add(int i, atomic_t * v)
71 " addu %0, %2 \n" 71 " addu %0, %2 \n"
72 " sc %0, %1 \n" 72 " sc %0, %1 \n"
73 " .set mips0 \n" 73 " .set mips0 \n"
74 : "=&r" (temp), "=m" (v->counter) 74 : "=&r" (temp), "+m" (v->counter)
75 : "Ir" (i), "m" (v->counter)); 75 : "Ir" (i));
76 } while (unlikely(!temp)); 76 } while (unlikely(!temp));
77 } else { 77 } else {
78 unsigned long flags; 78 unsigned long flags;
@@ -102,8 +102,8 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
102 " sc %0, %1 \n" 102 " sc %0, %1 \n"
103 " beqzl %0, 1b \n" 103 " beqzl %0, 1b \n"
104 " .set mips0 \n" 104 " .set mips0 \n"
105 : "=&r" (temp), "=m" (v->counter) 105 : "=&r" (temp), "+m" (v->counter)
106 : "Ir" (i), "m" (v->counter)); 106 : "Ir" (i));
107 } else if (kernel_uses_llsc) { 107 } else if (kernel_uses_llsc) {
108 int temp; 108 int temp;
109 109
@@ -114,8 +114,8 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
114 " subu %0, %2 \n" 114 " subu %0, %2 \n"
115 " sc %0, %1 \n" 115 " sc %0, %1 \n"
116 " .set mips0 \n" 116 " .set mips0 \n"
117 : "=&r" (temp), "=m" (v->counter) 117 : "=&r" (temp), "+m" (v->counter)
118 : "Ir" (i), "m" (v->counter)); 118 : "Ir" (i));
119 } while (unlikely(!temp)); 119 } while (unlikely(!temp));
120 } else { 120 } else {
121 unsigned long flags; 121 unsigned long flags;
@@ -146,9 +146,8 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
146 " beqzl %0, 1b \n" 146 " beqzl %0, 1b \n"
147 " addu %0, %1, %3 \n" 147 " addu %0, %1, %3 \n"
148 " .set mips0 \n" 148 " .set mips0 \n"
149 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 149 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
150 : "Ir" (i), "m" (v->counter) 150 : "Ir" (i));
151 : "memory");
152 } else if (kernel_uses_llsc) { 151 } else if (kernel_uses_llsc) {
153 int temp; 152 int temp;
154 153
@@ -159,9 +158,8 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
159 " addu %0, %1, %3 \n" 158 " addu %0, %1, %3 \n"
160 " sc %0, %2 \n" 159 " sc %0, %2 \n"
161 " .set mips0 \n" 160 " .set mips0 \n"
162 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 161 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
163 : "Ir" (i), "m" (v->counter) 162 : "Ir" (i));
164 : "memory");
165 } while (unlikely(!result)); 163 } while (unlikely(!result));
166 164
167 result = temp + i; 165 result = temp + i;
@@ -212,9 +210,8 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
212 " subu %0, %1, %3 \n" 210 " subu %0, %1, %3 \n"
213 " sc %0, %2 \n" 211 " sc %0, %2 \n"
214 " .set mips0 \n" 212 " .set mips0 \n"
215 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 213 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
216 : "Ir" (i), "m" (v->counter) 214 : "Ir" (i));
217 : "memory");
218 } while (unlikely(!result)); 215 } while (unlikely(!result));
219 216
220 result = temp - i; 217 result = temp - i;
@@ -262,7 +259,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
262 " .set reorder \n" 259 " .set reorder \n"
263 "1: \n" 260 "1: \n"
264 " .set mips0 \n" 261 " .set mips0 \n"
265 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 262 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
266 : "Ir" (i), "m" (v->counter) 263 : "Ir" (i), "m" (v->counter)
267 : "memory"); 264 : "memory");
268 } else if (kernel_uses_llsc) { 265 } else if (kernel_uses_llsc) {
@@ -280,9 +277,8 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
280 " .set reorder \n" 277 " .set reorder \n"
281 "1: \n" 278 "1: \n"
282 " .set mips0 \n" 279 " .set mips0 \n"
283 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 280 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
284 : "Ir" (i), "m" (v->counter) 281 : "Ir" (i));
285 : "memory");
286 } else { 282 } else {
287 unsigned long flags; 283 unsigned long flags;
288 284
@@ -430,8 +426,8 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
430 " scd %0, %1 \n" 426 " scd %0, %1 \n"
431 " beqzl %0, 1b \n" 427 " beqzl %0, 1b \n"
432 " .set mips0 \n" 428 " .set mips0 \n"
433 : "=&r" (temp), "=m" (v->counter) 429 : "=&r" (temp), "+m" (v->counter)
434 : "Ir" (i), "m" (v->counter)); 430 : "Ir" (i));
435 } else if (kernel_uses_llsc) { 431 } else if (kernel_uses_llsc) {
436 long temp; 432 long temp;
437 433
@@ -442,8 +438,8 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
442 " daddu %0, %2 \n" 438 " daddu %0, %2 \n"
443 " scd %0, %1 \n" 439 " scd %0, %1 \n"
444 " .set mips0 \n" 440 " .set mips0 \n"
445 : "=&r" (temp), "=m" (v->counter) 441 : "=&r" (temp), "+m" (v->counter)
446 : "Ir" (i), "m" (v->counter)); 442 : "Ir" (i));
447 } while (unlikely(!temp)); 443 } while (unlikely(!temp));
448 } else { 444 } else {
449 unsigned long flags; 445 unsigned long flags;
@@ -473,8 +469,8 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
473 " scd %0, %1 \n" 469 " scd %0, %1 \n"
474 " beqzl %0, 1b \n" 470 " beqzl %0, 1b \n"
475 " .set mips0 \n" 471 " .set mips0 \n"
476 : "=&r" (temp), "=m" (v->counter) 472 : "=&r" (temp), "+m" (v->counter)
477 : "Ir" (i), "m" (v->counter)); 473 : "Ir" (i));
478 } else if (kernel_uses_llsc) { 474 } else if (kernel_uses_llsc) {
479 long temp; 475 long temp;
480 476
@@ -485,8 +481,8 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
485 " dsubu %0, %2 \n" 481 " dsubu %0, %2 \n"
486 " scd %0, %1 \n" 482 " scd %0, %1 \n"
487 " .set mips0 \n" 483 " .set mips0 \n"
488 : "=&r" (temp), "=m" (v->counter) 484 : "=&r" (temp), "+m" (v->counter)
489 : "Ir" (i), "m" (v->counter)); 485 : "Ir" (i));
490 } while (unlikely(!temp)); 486 } while (unlikely(!temp));
491 } else { 487 } else {
492 unsigned long flags; 488 unsigned long flags;
@@ -517,9 +513,8 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
517 " beqzl %0, 1b \n" 513 " beqzl %0, 1b \n"
518 " daddu %0, %1, %3 \n" 514 " daddu %0, %1, %3 \n"
519 " .set mips0 \n" 515 " .set mips0 \n"
520 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 516 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
521 : "Ir" (i), "m" (v->counter) 517 : "Ir" (i));
522 : "memory");
523 } else if (kernel_uses_llsc) { 518 } else if (kernel_uses_llsc) {
524 long temp; 519 long temp;
525 520
@@ -649,9 +644,8 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
649 " .set reorder \n" 644 " .set reorder \n"
650 "1: \n" 645 "1: \n"
651 " .set mips0 \n" 646 " .set mips0 \n"
652 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 647 : "=&r" (result), "=&r" (temp), "+m" (v->counter)
653 : "Ir" (i), "m" (v->counter) 648 : "Ir" (i));
654 : "memory");
655 } else { 649 } else {
656 unsigned long flags; 650 unsigned long flags;
657 651
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 63002a240c73..c507b931b484 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -171,6 +171,10 @@
171#define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP) 171#define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP)
172#endif 172#endif
173 173
174#ifndef cpu_has_dsp2
175#define cpu_has_dsp2 (cpu_data[0].ases & MIPS_ASE_DSP2P)
176#endif
177
174#ifndef cpu_has_mipsmt 178#ifndef cpu_has_mipsmt
175#define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) 179#define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT)
176#endif 180#endif
@@ -252,4 +256,8 @@
252#define cpu_hwrena_impl_bits 0 256#define cpu_hwrena_impl_bits 0
253#endif 257#endif
254 258
259#ifndef cpu_has_perf_cntr_intr_bit
260#define cpu_has_perf_cntr_intr_bit (cpu_data[0].options & MIPS_CPU_PCI)
261#endif
262
255#endif /* __ASM_CPU_FEATURES_H */ 263#endif /* __ASM_CPU_FEATURES_H */
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 554e2d29965d..52c4e914f95a 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -320,7 +320,8 @@ enum cpu_type_enum {
320#define MIPS_CPU_VINT 0x00080000 /* CPU supports MIPSR2 vectored interrupts */ 320#define MIPS_CPU_VINT 0x00080000 /* CPU supports MIPSR2 vectored interrupts */
321#define MIPS_CPU_VEIC 0x00100000 /* CPU supports MIPSR2 external interrupt controller mode */ 321#define MIPS_CPU_VEIC 0x00100000 /* CPU supports MIPSR2 external interrupt controller mode */
322#define MIPS_CPU_ULRI 0x00200000 /* CPU has ULRI feature */ 322#define MIPS_CPU_ULRI 0x00200000 /* CPU has ULRI feature */
323#define MIPS_CPU_RIXI 0x00400000 /* CPU has TLB Read/eXec Inhibit */ 323#define MIPS_CPU_PCI 0x00400000 /* CPU has Perf Ctr Int indicator */
324#define MIPS_CPU_RIXI 0x00800000 /* CPU has TLB Read/eXec Inhibit */
324 325
325/* 326/*
326 * CPU ASE encodings 327 * CPU ASE encodings
@@ -331,6 +332,7 @@ enum cpu_type_enum {
331#define MIPS_ASE_SMARTMIPS 0x00000008 /* SmartMIPS */ 332#define MIPS_ASE_SMARTMIPS 0x00000008 /* SmartMIPS */
332#define MIPS_ASE_DSP 0x00000010 /* Signal Processing ASE */ 333#define MIPS_ASE_DSP 0x00000010 /* Signal Processing ASE */
333#define MIPS_ASE_MIPSMT 0x00000020 /* CPU supports MIPS MT */ 334#define MIPS_ASE_MIPSMT 0x00000020 /* CPU supports MIPS MT */
335#define MIPS_ASE_DSP2P 0x00000040 /* Signal Processing ASE Rev 2 */
334 336
335 337
336#endif /* _ASM_CPU_H */ 338#endif /* _ASM_CPU_H */
diff --git a/arch/mips/include/asm/errno.h b/arch/mips/include/asm/errno.h
index 6dcd3583ed04..21d91cdfe3c9 100644
--- a/arch/mips/include/asm/errno.h
+++ b/arch/mips/include/asm/errno.h
@@ -8,128 +8,10 @@
8#ifndef _ASM_ERRNO_H 8#ifndef _ASM_ERRNO_H
9#define _ASM_ERRNO_H 9#define _ASM_ERRNO_H
10 10
11/* 11#include <uapi/asm/errno.h>
12 * These error numbers are intended to be MIPS ABI compatible
13 */
14
15#include <asm-generic/errno-base.h>
16
17#define ENOMSG 35 /* No message of desired type */
18#define EIDRM 36 /* Identifier removed */
19#define ECHRNG 37 /* Channel number out of range */
20#define EL2NSYNC 38 /* Level 2 not synchronized */
21#define EL3HLT 39 /* Level 3 halted */
22#define EL3RST 40 /* Level 3 reset */
23#define ELNRNG 41 /* Link number out of range */
24#define EUNATCH 42 /* Protocol driver not attached */
25#define ENOCSI 43 /* No CSI structure available */
26#define EL2HLT 44 /* Level 2 halted */
27#define EDEADLK 45 /* Resource deadlock would occur */
28#define ENOLCK 46 /* No record locks available */
29#define EBADE 50 /* Invalid exchange */
30#define EBADR 51 /* Invalid request descriptor */
31#define EXFULL 52 /* Exchange full */
32#define ENOANO 53 /* No anode */
33#define EBADRQC 54 /* Invalid request code */
34#define EBADSLT 55 /* Invalid slot */
35#define EDEADLOCK 56 /* File locking deadlock error */
36#define EBFONT 59 /* Bad font file format */
37#define ENOSTR 60 /* Device not a stream */
38#define ENODATA 61 /* No data available */
39#define ETIME 62 /* Timer expired */
40#define ENOSR 63 /* Out of streams resources */
41#define ENONET 64 /* Machine is not on the network */
42#define ENOPKG 65 /* Package not installed */
43#define EREMOTE 66 /* Object is remote */
44#define ENOLINK 67 /* Link has been severed */
45#define EADV 68 /* Advertise error */
46#define ESRMNT 69 /* Srmount error */
47#define ECOMM 70 /* Communication error on send */
48#define EPROTO 71 /* Protocol error */
49#define EDOTDOT 73 /* RFS specific error */
50#define EMULTIHOP 74 /* Multihop attempted */
51#define EBADMSG 77 /* Not a data message */
52#define ENAMETOOLONG 78 /* File name too long */
53#define EOVERFLOW 79 /* Value too large for defined data type */
54#define ENOTUNIQ 80 /* Name not unique on network */
55#define EBADFD 81 /* File descriptor in bad state */
56#define EREMCHG 82 /* Remote address changed */
57#define ELIBACC 83 /* Can not access a needed shared library */
58#define ELIBBAD 84 /* Accessing a corrupted shared library */
59#define ELIBSCN 85 /* .lib section in a.out corrupted */
60#define ELIBMAX 86 /* Attempting to link in too many shared libraries */
61#define ELIBEXEC 87 /* Cannot exec a shared library directly */
62#define EILSEQ 88 /* Illegal byte sequence */
63#define ENOSYS 89 /* Function not implemented */
64#define ELOOP 90 /* Too many symbolic links encountered */
65#define ERESTART 91 /* Interrupted system call should be restarted */
66#define ESTRPIPE 92 /* Streams pipe error */
67#define ENOTEMPTY 93 /* Directory not empty */
68#define EUSERS 94 /* Too many users */
69#define ENOTSOCK 95 /* Socket operation on non-socket */
70#define EDESTADDRREQ 96 /* Destination address required */
71#define EMSGSIZE 97 /* Message too long */
72#define EPROTOTYPE 98 /* Protocol wrong type for socket */
73#define ENOPROTOOPT 99 /* Protocol not available */
74#define EPROTONOSUPPORT 120 /* Protocol not supported */
75#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
76#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */
77#define EPFNOSUPPORT 123 /* Protocol family not supported */
78#define EAFNOSUPPORT 124 /* Address family not supported by protocol */
79#define EADDRINUSE 125 /* Address already in use */
80#define EADDRNOTAVAIL 126 /* Cannot assign requested address */
81#define ENETDOWN 127 /* Network is down */
82#define ENETUNREACH 128 /* Network is unreachable */
83#define ENETRESET 129 /* Network dropped connection because of reset */
84#define ECONNABORTED 130 /* Software caused connection abort */
85#define ECONNRESET 131 /* Connection reset by peer */
86#define ENOBUFS 132 /* No buffer space available */
87#define EISCONN 133 /* Transport endpoint is already connected */
88#define ENOTCONN 134 /* Transport endpoint is not connected */
89#define EUCLEAN 135 /* Structure needs cleaning */
90#define ENOTNAM 137 /* Not a XENIX named type file */
91#define ENAVAIL 138 /* No XENIX semaphores available */
92#define EISNAM 139 /* Is a named type file */
93#define EREMOTEIO 140 /* Remote I/O error */
94#define EINIT 141 /* Reserved */
95#define EREMDEV 142 /* Error 142 */
96#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */
97#define ETOOMANYREFS 144 /* Too many references: cannot splice */
98#define ETIMEDOUT 145 /* Connection timed out */
99#define ECONNREFUSED 146 /* Connection refused */
100#define EHOSTDOWN 147 /* Host is down */
101#define EHOSTUNREACH 148 /* No route to host */
102#define EWOULDBLOCK EAGAIN /* Operation would block */
103#define EALREADY 149 /* Operation already in progress */
104#define EINPROGRESS 150 /* Operation now in progress */
105#define ESTALE 151 /* Stale NFS file handle */
106#define ECANCELED 158 /* AIO operation canceled */
107
108/*
109 * These error are Linux extensions.
110 */
111#define ENOMEDIUM 159 /* No medium found */
112#define EMEDIUMTYPE 160 /* Wrong medium type */
113#define ENOKEY 161 /* Required key not available */
114#define EKEYEXPIRED 162 /* Key has expired */
115#define EKEYREVOKED 163 /* Key has been revoked */
116#define EKEYREJECTED 164 /* Key was rejected by service */
117
118/* for robust mutexes */
119#define EOWNERDEAD 165 /* Owner died */
120#define ENOTRECOVERABLE 166 /* State not recoverable */
121
122#define ERFKILL 167 /* Operation not possible due to RF-kill */
123 12
124#define EHWPOISON 168 /* Memory page has hardware error */
125
126#define EDQUOT 1133 /* Quota exceeded */
127
128#ifdef __KERNEL__
129 13
130/* The biggest error number defined here or in <linux/errno.h>. */ 14/* The biggest error number defined here or in <linux/errno.h>. */
131#define EMAXERRNO 1133 15#define EMAXERRNO 1133
132 16
133#endif /* __KERNEL__ */
134
135#endif /* _ASM_ERRNO_H */ 17#endif /* _ASM_ERRNO_H */
diff --git a/arch/mips/include/asm/kspd.h b/arch/mips/include/asm/kspd.h
index 4e9e724c8935..ec6832950ace 100644
--- a/arch/mips/include/asm/kspd.h
+++ b/arch/mips/include/asm/kspd.h
@@ -25,12 +25,8 @@ struct kspd_notifications {
25 struct list_head list; 25 struct list_head list;
26}; 26};
27 27
28#ifdef CONFIG_MIPS_APSP_KSPD
29extern void kspd_notify(struct kspd_notifications *notify);
30#else
31static inline void kspd_notify(struct kspd_notifications *notify) 28static inline void kspd_notify(struct kspd_notifications *notify)
32{ 29{
33} 30}
34#endif
35 31
36#endif 32#endif
diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
index 6ddae926bf79..ea4b66dccf6e 100644
--- a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
@@ -42,6 +42,8 @@
42#define cpu_has_mips64r1 0 42#define cpu_has_mips64r1 0
43#define cpu_has_mips64r2 0 43#define cpu_has_mips64r2 0
44 44
45#define cpu_has_dsp 0
46#define cpu_has_dsp2 0
45#define cpu_has_mipsmt 0 47#define cpu_has_mipsmt 0
46 48
47#define cpu_has_64bits 0 49#define cpu_has_64bits 0
diff --git a/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
index 3f741af37d47..09f45e6afade 100644
--- a/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
@@ -37,6 +37,7 @@
37#define cpu_has_mips64r1 0 37#define cpu_has_mips64r1 0
38#define cpu_has_mips64r2 0 38#define cpu_has_mips64r2 0
39#define cpu_has_dsp 0 39#define cpu_has_dsp 0
40#define cpu_has_dsp2 0
40#define cpu_has_mipsmt 0 41#define cpu_has_mipsmt 0
41#define cpu_has_userlocal 0 42#define cpu_has_userlocal 0
42#define cpu_has_nofpuex 0 43#define cpu_has_nofpuex 0
diff --git a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
index f453c01d0672..e9c408e8ff4c 100644
--- a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
@@ -37,6 +37,7 @@
37#define cpu_has_mips64r2 0 37#define cpu_has_mips64r2 0
38 38
39#define cpu_has_dsp 0 39#define cpu_has_dsp 0
40#define cpu_has_dsp2 0
40#define cpu_has_mipsmt 0 41#define cpu_has_mipsmt 0
41#define cpu_has_userlocal 0 42#define cpu_has_userlocal 0
42 43
diff --git a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
index 375ad0c815fe..94ed063eec92 100644
--- a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
@@ -53,6 +53,7 @@
53#define cpu_has_mips64r2 1 53#define cpu_has_mips64r2 1
54#define cpu_has_mips_r2_exec_hazard 0 54#define cpu_has_mips_r2_exec_hazard 0
55#define cpu_has_dsp 0 55#define cpu_has_dsp 0
56#define cpu_has_dsp2 0
56#define cpu_has_mipsmt 0 57#define cpu_has_mipsmt 0
57#define cpu_has_vint 0 58#define cpu_has_vint 0
58#define cpu_has_veic 0 59#define cpu_has_veic 0
diff --git a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h
index b3314cf53194..babc8374e378 100644
--- a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h
@@ -45,6 +45,7 @@
45#define cpu_has_ic_fills_f_dc 0 45#define cpu_has_ic_fills_f_dc 0
46#define cpu_icache_snoops_remote_store 0 46#define cpu_icache_snoops_remote_store 0
47#define cpu_has_dsp 0 47#define cpu_has_dsp 0
48#define cpu_has_dsp2 0
48#define cpu_has_mipsmt 0 49#define cpu_has_mipsmt 0
49#define cpu_has_userlocal 0 50#define cpu_has_userlocal 0
50 51
diff --git a/arch/mips/include/asm/mach-db1x00/bcsr.h b/arch/mips/include/asm/mach-db1x00/bcsr.h
index bb9fc23d853a..16f1cf5982b9 100644
--- a/arch/mips/include/asm/mach-db1x00/bcsr.h
+++ b/arch/mips/include/asm/mach-db1x00/bcsr.h
@@ -162,6 +162,8 @@ enum bcsr_whoami_boards {
162#define BCSR_BOARD_PCIEXTARB 0x0200 162#define BCSR_BOARD_PCIEXTARB 0x0200
163#define BCSR_BOARD_GPIO200RST 0x0400 163#define BCSR_BOARD_GPIO200RST 0x0400
164#define BCSR_BOARD_PCICLKOUT 0x0800 164#define BCSR_BOARD_PCICLKOUT 0x0800
165#define BCSR_BOARD_PB1100_SD0PWR 0x0400
166#define BCSR_BOARD_PB1100_SD1PWR 0x0800
165#define BCSR_BOARD_PCICFG 0x1000 167#define BCSR_BOARD_PCICFG 0x1000
166#define BCSR_BOARD_SPISEL 0x2000 /* PB/DB1550 */ 168#define BCSR_BOARD_SPISEL 0x2000 /* PB/DB1550 */
167#define BCSR_BOARD_SD0WP 0x4000 /* DB1100 */ 169#define BCSR_BOARD_SD0WP 0x4000 /* DB1100 */
diff --git a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h
index 9c8735158da1..f4caacd25552 100644
--- a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h
@@ -30,6 +30,7 @@
30#define cpu_has_ic_fills_f_dc 0 30#define cpu_has_ic_fills_f_dc 0
31 31
32#define cpu_has_dsp 0 32#define cpu_has_dsp 0
33#define cpu_has_dsp2 0
33#define cpu_has_mipsmt 0 34#define cpu_has_mipsmt 0
34#define cpu_has_userlocal 0 35#define cpu_has_userlocal 0
35 36
diff --git a/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
index 7d3112b148d9..1d2b6ff60d33 100644
--- a/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
@@ -26,6 +26,7 @@
26#define cpu_has_dc_aliases 0 26#define cpu_has_dc_aliases 0
27#define cpu_has_ic_fills_f_dc 0 27#define cpu_has_ic_fills_f_dc 0
28#define cpu_has_dsp 0 28#define cpu_has_dsp 0
29#define cpu_has_dsp2 0
29#define cpu_icache_snoops_remote_store 1 30#define cpu_icache_snoops_remote_store 1
30#define cpu_has_mipsmt 0 31#define cpu_has_mipsmt 0
31#define cpu_has_userlocal 0 32#define cpu_has_userlocal 0
diff --git a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h
index 9a53b326f848..50d344ca60a8 100644
--- a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h
@@ -27,6 +27,7 @@
27#define cpu_has_dc_aliases 0 /* see probe_pcache() */ 27#define cpu_has_dc_aliases 0 /* see probe_pcache() */
28#define cpu_has_ic_fills_f_dc 0 28#define cpu_has_ic_fills_f_dc 0
29#define cpu_has_dsp 0 29#define cpu_has_dsp 0
30#define cpu_has_dsp2 0
30#define cpu_icache_snoops_remote_store 1 31#define cpu_icache_snoops_remote_store 1
31#define cpu_has_mipsmt 0 32#define cpu_has_mipsmt 0
32#define cpu_has_userlocal 0 33#define cpu_has_userlocal 0
diff --git a/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h
index 6782fccebe8d..2e1ec6cfedd5 100644
--- a/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h
@@ -37,6 +37,7 @@
37#define cpu_has_vtag_icache 0 37#define cpu_has_vtag_icache 0
38#define cpu_has_ic_fills_f_dc 0 38#define cpu_has_ic_fills_f_dc 0
39#define cpu_has_dsp 0 39#define cpu_has_dsp 0
40#define cpu_has_dsp2 0
40#define cpu_has_4k_cache 1 41#define cpu_has_4k_cache 1
41#define cpu_has_mipsmt 0 42#define cpu_has_mipsmt 0
42#define cpu_has_userlocal 0 43#define cpu_has_userlocal 0
diff --git a/arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h b/arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
index d12e5c6477b9..a225baaa215d 100644
--- a/arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
@@ -38,6 +38,7 @@
38#define cpu_has_mips64r1 0 38#define cpu_has_mips64r1 0
39#define cpu_has_mips64r2 0 39#define cpu_has_mips64r2 0
40#define cpu_has_dsp 0 40#define cpu_has_dsp 0
41#define cpu_has_dsp2 0
41#define cpu_has_mipsmt 0 42#define cpu_has_mipsmt 0
42#define cpu_has_userlocal 0 43#define cpu_has_userlocal 0
43#define cpu_has_nofpuex 0 44#define cpu_has_nofpuex 0
diff --git a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
index 675bd8641d5a..1a05d854e34c 100644
--- a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
@@ -32,6 +32,7 @@
32#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000) 32#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000)
33#define cpu_has_divec 0 33#define cpu_has_divec 0
34#define cpu_has_dsp 0 34#define cpu_has_dsp 0
35#define cpu_has_dsp2 0
35#define cpu_has_ejtag 0 36#define cpu_has_ejtag 0
36#define cpu_has_fpu 1 37#define cpu_has_fpu 1
37#define cpu_has_ic_fills_f_dc 0 38#define cpu_has_ic_fills_f_dc 0
diff --git a/arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h b/arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h
index 966db4be377c..091deb1700e5 100644
--- a/arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h
@@ -26,6 +26,7 @@
26#define cpu_has_vtag_icache 0 26#define cpu_has_vtag_icache 0
27#define cpu_has_ic_fills_f_dc 1 27#define cpu_has_ic_fills_f_dc 1
28#define cpu_has_dsp 0 28#define cpu_has_dsp 0
29#define cpu_has_dsp2 0
29#define cpu_has_mipsmt 0 30#define cpu_has_mipsmt 0
30#define cpu_icache_snoops_remote_store 1 31#define cpu_icache_snoops_remote_store 1
31 32
diff --git a/arch/mips/include/asm/mach-powertv/cpu-feature-overrides.h b/arch/mips/include/asm/mach-powertv/cpu-feature-overrides.h
index f751e3ec56fb..58c76ec32a19 100644
--- a/arch/mips/include/asm/mach-powertv/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-powertv/cpu-feature-overrides.h
@@ -45,6 +45,7 @@
45#define cpu_has_mips64r1 0 45#define cpu_has_mips64r1 0
46#define cpu_has_mips64r2 0 46#define cpu_has_mips64r2 0
47#define cpu_has_dsp 0 47#define cpu_has_dsp 0
48#define cpu_has_dsp2 0
48#define cpu_has_mipsmt 0 49#define cpu_has_mipsmt 0
49#define cpu_has_userlocal 0 50#define cpu_has_userlocal 0
50#define cpu_has_nofpuex 0 51#define cpu_has_nofpuex 0
diff --git a/arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h b/arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h
index c3e4d3a4c95d..b15307597ee3 100644
--- a/arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h
@@ -60,6 +60,7 @@
60#define cpu_has_mips64r2 0 60#define cpu_has_mips64r2 0
61 61
62#define cpu_has_dsp 0 62#define cpu_has_dsp 0
63#define cpu_has_dsp2 0
63#define cpu_has_mipsmt 0 64#define cpu_has_mipsmt 0
64 65
65/* #define cpu_has_nofpuex ? */ 66/* #define cpu_has_nofpuex ? */
diff --git a/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h b/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h
index ccf543363537..f095c529c48c 100644
--- a/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h
@@ -30,6 +30,7 @@
30#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000) 30#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000)
31#define cpu_has_ic_fills_f_dc 0 31#define cpu_has_ic_fills_f_dc 0
32#define cpu_has_dsp 0 32#define cpu_has_dsp 0
33#define cpu_has_dsp2 0
33#define cpu_has_nofpuex 0 34#define cpu_has_nofpuex 0
34#define cpu_has_64bits 1 35#define cpu_has_64bits 1
35#define cpu_has_mipsmt 0 36#define cpu_has_mipsmt 0
diff --git a/arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h
index 1c1f92415b9a..92927b62b5a0 100644
--- a/arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-sibyte/cpu-feature-overrides.h
@@ -26,6 +26,7 @@
26#define cpu_has_dc_aliases 0 26#define cpu_has_dc_aliases 0
27#define cpu_has_ic_fills_f_dc 0 27#define cpu_has_ic_fills_f_dc 0
28#define cpu_has_dsp 0 28#define cpu_has_dsp 0
29#define cpu_has_dsp2 0
29#define cpu_has_mipsmt 0 30#define cpu_has_mipsmt 0
30#define cpu_has_userlocal 0 31#define cpu_has_userlocal 0
31#define cpu_icache_snoops_remote_store 0 32#define cpu_icache_snoops_remote_store 0
diff --git a/arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h b/arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h
index 275eaf92c748..7f5144c6ce2d 100644
--- a/arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h
@@ -12,6 +12,7 @@
12#define cpu_has_vtag_icache 0 12#define cpu_has_vtag_icache 0
13#define cpu_has_ic_fills_f_dc 0 13#define cpu_has_ic_fills_f_dc 0
14#define cpu_has_dsp 0 14#define cpu_has_dsp 0
15#define cpu_has_dsp2 0
15#define cpu_has_mipsmt 0 16#define cpu_has_mipsmt 0
16#define cpu_has_userlocal 0 17#define cpu_has_userlocal 0
17 18
diff --git a/arch/mips/include/asm/mach-yosemite/cpu-feature-overrides.h b/arch/mips/include/asm/mach-yosemite/cpu-feature-overrides.h
index 470e5e9e10d6..56bdd3298600 100644
--- a/arch/mips/include/asm/mach-yosemite/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-yosemite/cpu-feature-overrides.h
@@ -26,6 +26,7 @@
26#define cpu_has_dc_aliases 0 26#define cpu_has_dc_aliases 0
27#define cpu_has_ic_fills_f_dc 0 27#define cpu_has_ic_fills_f_dc 0
28#define cpu_has_dsp 0 28#define cpu_has_dsp 0
29#define cpu_has_dsp2 0
29#define cpu_has_mipsmt 0 30#define cpu_has_mipsmt 0
30#define cpu_has_userlocal 0 31#define cpu_has_userlocal 0
31#define cpu_icache_snoops_remote_store 0 32#define cpu_icache_snoops_remote_store 0
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 528fda1e957c..eb742895dcbe 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -458,6 +458,8 @@
458#define CAUSEF_IP7 (_ULCAST_(1) << 15) 458#define CAUSEF_IP7 (_ULCAST_(1) << 15)
459#define CAUSEB_IV 23 459#define CAUSEB_IV 23
460#define CAUSEF_IV (_ULCAST_(1) << 23) 460#define CAUSEF_IV (_ULCAST_(1) << 23)
461#define CAUSEB_PCI 26
462#define CAUSEF_PCI (_ULCAST_(1) << 26)
461#define CAUSEB_CE 28 463#define CAUSEB_CE 28
462#define CAUSEF_CE (_ULCAST_(3) << 28) 464#define CAUSEF_CE (_ULCAST_(3) << 28)
463#define CAUSEB_TI 30 465#define CAUSEB_TI 30
@@ -590,6 +592,7 @@
590#define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) 592#define MIPS_CONF3_VEIC (_ULCAST_(1) << 6)
591#define MIPS_CONF3_LPA (_ULCAST_(1) << 7) 593#define MIPS_CONF3_LPA (_ULCAST_(1) << 7)
592#define MIPS_CONF3_DSP (_ULCAST_(1) << 10) 594#define MIPS_CONF3_DSP (_ULCAST_(1) << 10)
595#define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11)
593#define MIPS_CONF3_RXI (_ULCAST_(1) << 12) 596#define MIPS_CONF3_RXI (_ULCAST_(1) << 12)
594#define MIPS_CONF3_ULRI (_ULCAST_(1) << 13) 597#define MIPS_CONF3_ULRI (_ULCAST_(1) << 13)
595 598
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 55908fd56b1f..c26e18250079 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -162,7 +162,6 @@ typedef struct { unsigned long pmd; } pmd_t;
162 162
163 163
164extern pmd_t invalid_pmd_table[PTRS_PER_PMD]; 164extern pmd_t invalid_pmd_table[PTRS_PER_PMD];
165extern pmd_t empty_bad_pmd_table[PTRS_PER_PMD];
166#endif 165#endif
167 166
168/* 167/*
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/cpu-feature-overrides.h b/arch/mips/include/asm/pmc-sierra/msp71xx/cpu-feature-overrides.h
index a80801b094bd..016fa9446ba9 100644
--- a/arch/mips/include/asm/pmc-sierra/msp71xx/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/pmc-sierra/msp71xx/cpu-feature-overrides.h
@@ -10,6 +10,7 @@
10 10
11#define cpu_has_mips16 1 11#define cpu_has_mips16 1
12#define cpu_has_dsp 1 12#define cpu_has_dsp 1
13/* #define cpu_has_dsp2 ??? - do runtime detection */
13#define cpu_has_mipsmt 1 14#define cpu_has_mipsmt 1
14#define cpu_has_fpu 0 15#define cpu_has_fpu 0
15 16
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 4b7f5252d2fd..4f5da948a777 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -9,115 +9,12 @@
9#ifndef _ASM_PTRACE_H 9#ifndef _ASM_PTRACE_H
10#define _ASM_PTRACE_H 10#define _ASM_PTRACE_H
11 11
12/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
13#define FPR_BASE 32
14#define PC 64
15#define CAUSE 65
16#define BADVADDR 66
17#define MMHI 67
18#define MMLO 68
19#define FPC_CSR 69
20#define FPC_EIR 70
21#define DSP_BASE 71 /* 3 more hi / lo register pairs */
22#define DSP_CONTROL 77
23#define ACX 78
24
25/*
26 * This struct defines the way the registers are stored on the stack during a
27 * system call/exception. As usual the registers k0/k1 aren't being saved.
28 */
29struct pt_regs {
30#ifdef CONFIG_32BIT
31 /* Pad bytes for argument save space on the stack. */
32 unsigned long pad0[6];
33#endif
34
35 /* Saved main processor registers. */
36 unsigned long regs[32];
37
38 /* Saved special registers. */
39 unsigned long cp0_status;
40 unsigned long hi;
41 unsigned long lo;
42#ifdef CONFIG_CPU_HAS_SMARTMIPS
43 unsigned long acx;
44#endif
45 unsigned long cp0_badvaddr;
46 unsigned long cp0_cause;
47 unsigned long cp0_epc;
48#ifdef CONFIG_MIPS_MT_SMTC
49 unsigned long cp0_tcstatus;
50#endif /* CONFIG_MIPS_MT_SMTC */
51#ifdef CONFIG_CPU_CAVIUM_OCTEON
52 unsigned long long mpl[3]; /* MTM{0,1,2} */
53 unsigned long long mtp[3]; /* MTP{0,1,2} */
54#endif
55} __attribute__ ((aligned (8)));
56
57/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
58#define PTRACE_GETREGS 12
59#define PTRACE_SETREGS 13
60#define PTRACE_GETFPREGS 14
61#define PTRACE_SETFPREGS 15
62/* #define PTRACE_GETFPXREGS 18 */
63/* #define PTRACE_SETFPXREGS 19 */
64
65#define PTRACE_OLDSETOPTIONS 21
66
67#define PTRACE_GET_THREAD_AREA 25
68#define PTRACE_SET_THREAD_AREA 26
69
70/* Calls to trace a 64bit program from a 32bit program. */
71#define PTRACE_PEEKTEXT_3264 0xc0
72#define PTRACE_PEEKDATA_3264 0xc1
73#define PTRACE_POKETEXT_3264 0xc2
74#define PTRACE_POKEDATA_3264 0xc3
75#define PTRACE_GET_THREAD_AREA_3264 0xc4
76
77/* Read and write watchpoint registers. */
78enum pt_watch_style {
79 pt_watch_style_mips32,
80 pt_watch_style_mips64
81};
82struct mips32_watch_regs {
83 unsigned int watchlo[8];
84 /* Lower 16 bits of watchhi. */
85 unsigned short watchhi[8];
86 /* Valid mask and I R W bits.
87 * bit 0 -- 1 if W bit is usable.
88 * bit 1 -- 1 if R bit is usable.
89 * bit 2 -- 1 if I bit is usable.
90 * bits 3 - 11 -- Valid watchhi mask bits.
91 */
92 unsigned short watch_masks[8];
93 /* The number of valid watch register pairs. */
94 unsigned int num_valid;
95} __attribute__((aligned(8)));
96
97struct mips64_watch_regs {
98 unsigned long long watchlo[8];
99 unsigned short watchhi[8];
100 unsigned short watch_masks[8];
101 unsigned int num_valid;
102} __attribute__((aligned(8)));
103
104struct pt_watch_regs {
105 enum pt_watch_style style;
106 union {
107 struct mips32_watch_regs mips32;
108 struct mips64_watch_regs mips64;
109 };
110};
111
112#define PTRACE_GET_WATCH_REGS 0xd0
113#define PTRACE_SET_WATCH_REGS 0xd1
114
115#ifdef __KERNEL__
116 12
117#include <linux/compiler.h> 13#include <linux/compiler.h>
118#include <linux/linkage.h> 14#include <linux/linkage.h>
119#include <linux/types.h> 15#include <linux/types.h>
120#include <asm/isadep.h> 16#include <asm/isadep.h>
17#include <uapi/asm/ptrace.h>
121 18
122struct task_struct; 19struct task_struct;
123 20
@@ -164,6 +61,4 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs)
164 die(str, regs); 61 die(str, regs);
165} 62}
166 63
167#endif
168
169#endif /* _ASM_PTRACE_H */ 64#endif /* _ASM_PTRACE_H */
diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h
index 2560b6b6a7d8..e26589ef36ee 100644
--- a/arch/mips/include/asm/setup.h
+++ b/arch/mips/include/asm/setup.h
@@ -1,9 +1,8 @@
1#ifndef _MIPS_SETUP_H 1#ifndef _MIPS_SETUP_H
2#define _MIPS_SETUP_H 2#define _MIPS_SETUP_H
3 3
4#define COMMAND_LINE_SIZE 4096 4#include <uapi/asm/setup.h>
5 5
6#ifdef __KERNEL__
7extern void setup_early_printk(void); 6extern void setup_early_printk(void);
8 7
9extern void set_handler(unsigned long offset, void *addr, unsigned long len); 8extern void set_handler(unsigned long offset, void *addr, unsigned long len);
@@ -17,6 +16,4 @@ extern unsigned long ebase;
17extern void per_cpu_trap_init(bool); 16extern void per_cpu_trap_init(bool);
18extern void cpu_cache_init(void); 17extern void cpu_cache_init(void);
19 18
20#endif /* __KERNEL__ */
21
22#endif /* __SETUP_H */ 19#endif /* __SETUP_H */
diff --git a/arch/mips/include/asm/sigcontext.h b/arch/mips/include/asm/sigcontext.h
index 9e89cf99d4e4..eeeb0f48c767 100644
--- a/arch/mips/include/asm/sigcontext.h
+++ b/arch/mips/include/asm/sigcontext.h
@@ -9,71 +9,10 @@
9#ifndef _ASM_SIGCONTEXT_H 9#ifndef _ASM_SIGCONTEXT_H
10#define _ASM_SIGCONTEXT_H 10#define _ASM_SIGCONTEXT_H
11 11
12#include <linux/types.h> 12#include <uapi/asm/sigcontext.h>
13#include <asm/sgidefs.h>
14
15#if _MIPS_SIM == _MIPS_SIM_ABI32
16
17/*
18 * Keep this struct definition in sync with the sigcontext fragment
19 * in arch/mips/tools/offset.c
20 */
21struct sigcontext {
22 unsigned int sc_regmask; /* Unused */
23 unsigned int sc_status; /* Unused */
24 unsigned long long sc_pc;
25 unsigned long long sc_regs[32];
26 unsigned long long sc_fpregs[32];
27 unsigned int sc_acx; /* Was sc_ownedfp */
28 unsigned int sc_fpc_csr;
29 unsigned int sc_fpc_eir; /* Unused */
30 unsigned int sc_used_math;
31 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
32 unsigned long long sc_mdhi;
33 unsigned long long sc_mdlo;
34 unsigned long sc_hi1; /* Was sc_cause */
35 unsigned long sc_lo1; /* Was sc_badvaddr */
36 unsigned long sc_hi2; /* Was sc_sigset[4] */
37 unsigned long sc_lo2;
38 unsigned long sc_hi3;
39 unsigned long sc_lo3;
40};
41
42#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
43 13
44#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 14#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
45 15
46#include <linux/posix_types.h>
47/*
48 * Keep this struct definition in sync with the sigcontext fragment
49 * in arch/mips/tools/offset.c
50 *
51 * Warning: this structure illdefined with sc_badvaddr being just an unsigned
52 * int so it was changed to unsigned long in 2.6.0-test1. This may break
53 * binary compatibility - no prisoners.
54 * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
55 * entries, add sc_dsp and sc_reserved for padding. No prisoners.
56 */
57struct sigcontext {
58 __u64 sc_regs[32];
59 __u64 sc_fpregs[32];
60 __u64 sc_mdhi;
61 __u64 sc_hi1;
62 __u64 sc_hi2;
63 __u64 sc_hi3;
64 __u64 sc_mdlo;
65 __u64 sc_lo1;
66 __u64 sc_lo2;
67 __u64 sc_lo3;
68 __u64 sc_pc;
69 __u32 sc_fpc_csr;
70 __u32 sc_used_math;
71 __u32 sc_dsp;
72 __u32 sc_reserved;
73};
74
75#ifdef __KERNEL__
76
77struct sigcontext32 { 16struct sigcontext32 {
78 __u32 sc_regmask; /* Unused */ 17 __u32 sc_regmask; /* Unused */
79 __u32 sc_status; /* Unused */ 18 __u32 sc_status; /* Unused */
@@ -94,8 +33,5 @@ struct sigcontext32 {
94 __u32 sc_hi3; 33 __u32 sc_hi3;
95 __u32 sc_lo3; 34 __u32 sc_lo3;
96}; 35};
97#endif /* __KERNEL__ */
98
99#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */ 36#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
100
101#endif /* _ASM_SIGCONTEXT_H */ 37#endif /* _ASM_SIGCONTEXT_H */
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h
index 20ebeb875ee6..dd9a762646fc 100644
--- a/arch/mips/include/asm/siginfo.h
+++ b/arch/mips/include/asm/siginfo.h
@@ -9,108 +9,8 @@
9#ifndef _ASM_SIGINFO_H 9#ifndef _ASM_SIGINFO_H
10#define _ASM_SIGINFO_H 10#define _ASM_SIGINFO_H
11 11
12#include <uapi/asm/siginfo.h>
12 13
13#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int))
14#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
15
16#define HAVE_ARCH_SIGINFO_T
17
18/*
19 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
20 * by design ...
21 */
22#define HAVE_ARCH_COPY_SIGINFO
23struct siginfo;
24
25/*
26 * Careful to keep union _sifields from shifting ...
27 */
28#ifdef CONFIG_32BIT
29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
30#endif
31#ifdef CONFIG_64BIT
32#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
33#endif
34
35#include <asm-generic/siginfo.h>
36
37typedef struct siginfo {
38 int si_signo;
39 int si_code;
40 int si_errno;
41 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
42
43 union {
44 int _pad[SI_PAD_SIZE];
45
46 /* kill() */
47 struct {
48 pid_t _pid; /* sender's pid */
49 __ARCH_SI_UID_T _uid; /* sender's uid */
50 } _kill;
51
52 /* POSIX.1b timers */
53 struct {
54 timer_t _tid; /* timer id */
55 int _overrun; /* overrun count */
56 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
57 sigval_t _sigval; /* same as below */
58 int _sys_private; /* not to be passed to user */
59 } _timer;
60
61 /* POSIX.1b signals */
62 struct {
63 pid_t _pid; /* sender's pid */
64 __ARCH_SI_UID_T _uid; /* sender's uid */
65 sigval_t _sigval;
66 } _rt;
67
68 /* SIGCHLD */
69 struct {
70 pid_t _pid; /* which child */
71 __ARCH_SI_UID_T _uid; /* sender's uid */
72 int _status; /* exit code */
73 clock_t _utime;
74 clock_t _stime;
75 } _sigchld;
76
77 /* IRIX SIGCHLD */
78 struct {
79 pid_t _pid; /* which child */
80 clock_t _utime;
81 int _status; /* exit code */
82 clock_t _stime;
83 } _irix_sigchld;
84
85 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
86 struct {
87 void __user *_addr; /* faulting insn/memory ref. */
88#ifdef __ARCH_SI_TRAPNO
89 int _trapno; /* TRAP # which caused the signal */
90#endif
91 short _addr_lsb;
92 } _sigfault;
93
94 /* SIGPOLL, SIGXFSZ (To do ...) */
95 struct {
96 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
97 int _fd;
98 } _sigpoll;
99 } _sifields;
100} siginfo_t;
101
102/*
103 * si_code values
104 * Again these have been chosen to be IRIX compatible.
105 */
106#undef SI_ASYNCIO
107#undef SI_TIMER
108#undef SI_MESGQ
109#define SI_ASYNCIO -2 /* sent by AIO completion */
110#define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
111#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
112
113#ifdef __KERNEL__
114 14
115/* 15/*
116 * Duplicated here because of <asm-generic/siginfo.h> braindamage ... 16 * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
@@ -126,6 +26,4 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
126 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); 26 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
127} 27}
128 28
129#endif
130
131#endif /* _ASM_SIGINFO_H */ 29#endif /* _ASM_SIGINFO_H */
diff --git a/arch/mips/include/asm/signal.h b/arch/mips/include/asm/signal.h
index c783f364938c..880240dff8b7 100644
--- a/arch/mips/include/asm/signal.h
+++ b/arch/mips/include/asm/signal.h
@@ -9,93 +9,8 @@
9#ifndef _ASM_SIGNAL_H 9#ifndef _ASM_SIGNAL_H
10#define _ASM_SIGNAL_H 10#define _ASM_SIGNAL_H
11 11
12#include <linux/types.h> 12#include <uapi/asm/signal.h>
13 13
14#define _NSIG 128
15#define _NSIG_BPW (sizeof(unsigned long) * 8)
16#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
17
18typedef struct {
19 unsigned long sig[_NSIG_WORDS];
20} sigset_t;
21
22typedef unsigned long old_sigset_t; /* at least 32 bits */
23
24#define SIGHUP 1 /* Hangup (POSIX). */
25#define SIGINT 2 /* Interrupt (ANSI). */
26#define SIGQUIT 3 /* Quit (POSIX). */
27#define SIGILL 4 /* Illegal instruction (ANSI). */
28#define SIGTRAP 5 /* Trace trap (POSIX). */
29#define SIGIOT 6 /* IOT trap (4.2 BSD). */
30#define SIGABRT SIGIOT /* Abort (ANSI). */
31#define SIGEMT 7
32#define SIGFPE 8 /* Floating-point exception (ANSI). */
33#define SIGKILL 9 /* Kill, unblockable (POSIX). */
34#define SIGBUS 10 /* BUS error (4.2 BSD). */
35#define SIGSEGV 11 /* Segmentation violation (ANSI). */
36#define SIGSYS 12
37#define SIGPIPE 13 /* Broken pipe (POSIX). */
38#define SIGALRM 14 /* Alarm clock (POSIX). */
39#define SIGTERM 15 /* Termination (ANSI). */
40#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
41#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
42#define SIGCHLD 18 /* Child status has changed (POSIX). */
43#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
44#define SIGPWR 19 /* Power failure restart (System V). */
45#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
46#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
47#define SIGIO 22 /* I/O now possible (4.2 BSD). */
48#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
49#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
50#define SIGTSTP 24 /* Keyboard stop (POSIX). */
51#define SIGCONT 25 /* Continue (POSIX). */
52#define SIGTTIN 26 /* Background read from tty (POSIX). */
53#define SIGTTOU 27 /* Background write to tty (POSIX). */
54#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
55#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
56#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
57#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
58
59/* These should not be considered constants from userland. */
60#define SIGRTMIN 32
61#define SIGRTMAX _NSIG
62
63/*
64 * SA_FLAGS values:
65 *
66 * SA_ONSTACK indicates that a registered stack_t will be used.
67 * SA_RESTART flag to get restarting signals (which were the default long ago)
68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69 * SA_RESETHAND clears the handler when the signal is delivered.
70 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
71 * SA_NODEFER prevents the current signal from being masked in the handler.
72 *
73 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
74 * Unix names RESETHAND and NODEFER respectively.
75 */
76#define SA_ONSTACK 0x08000000
77#define SA_RESETHAND 0x80000000
78#define SA_RESTART 0x10000000
79#define SA_SIGINFO 0x00000008
80#define SA_NODEFER 0x40000000
81#define SA_NOCLDWAIT 0x00010000
82#define SA_NOCLDSTOP 0x00000001
83
84#define SA_NOMASK SA_NODEFER
85#define SA_ONESHOT SA_RESETHAND
86
87#define SA_RESTORER 0x04000000 /* Only for o32 */
88
89/*
90 * sigaltstack controls
91 */
92#define SS_ONSTACK 1
93#define SS_DISABLE 2
94
95#define MINSIGSTKSZ 2048
96#define SIGSTKSZ 8192
97
98#ifdef __KERNEL__
99 14
100#ifdef CONFIG_TRAD_SIGNALS 15#ifdef CONFIG_TRAD_SIGNALS
101#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) 16#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO)
@@ -103,37 +18,9 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
103#define sig_uses_siginfo(ka) (1) 18#define sig_uses_siginfo(ka) (1)
104#endif 19#endif
105 20
106#endif /* __KERNEL__ */
107
108#define SIG_BLOCK 1 /* for blocking signals */
109#define SIG_UNBLOCK 2 /* for unblocking signals */
110#define SIG_SETMASK 3 /* for setting the signal mask */
111
112#include <asm-generic/signal-defs.h>
113
114struct sigaction {
115 unsigned int sa_flags;
116 __sighandler_t sa_handler;
117 sigset_t sa_mask;
118};
119
120struct k_sigaction {
121 struct sigaction sa;
122};
123
124/* IRIX compatible stack_t */
125typedef struct sigaltstack {
126 void __user *ss_sp;
127 size_t ss_size;
128 int ss_flags;
129} stack_t;
130
131#ifdef __KERNEL__
132#include <asm/sigcontext.h> 21#include <asm/sigcontext.h>
133#include <asm/siginfo.h> 22#include <asm/siginfo.h>
134 23
135#define ptrace_signal_deliver(regs, cookie) do { } while (0) 24#define ptrace_signal_deliver(regs, cookie) do { } while (0)
136 25
137#endif /* __KERNEL__ */
138
139#endif /* _ASM_SIGNAL_H */ 26#endif /* _ASM_SIGNAL_H */
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index a2ed6fdad4e0..4724a563c5bf 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -9,87 +9,8 @@
9#ifndef _ASM_SOCKET_H 9#ifndef _ASM_SOCKET_H
10#define _ASM_SOCKET_H 10#define _ASM_SOCKET_H
11 11
12#include <asm/sockios.h> 12#include <uapi/asm/socket.h>
13 13
14/*
15 * For setsockopt(2)
16 *
17 * This defines are ABI conformant as far as Linux supports these ...
18 */
19#define SOL_SOCKET 0xffff
20
21#define SO_DEBUG 0x0001 /* Record debugging information. */
22#define SO_REUSEADDR 0x0004 /* Allow reuse of local addresses. */
23#define SO_KEEPALIVE 0x0008 /* Keep connections alive and send
24 SIGPIPE when they die. */
25#define SO_DONTROUTE 0x0010 /* Don't do local routing. */
26#define SO_BROADCAST 0x0020 /* Allow transmission of
27 broadcast messages. */
28#define SO_LINGER 0x0080 /* Block on close of a reliable
29 socket to transmit pending data. */
30#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */
31#if 0
32To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
33#endif
34
35#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */
36#define SO_STYLE SO_TYPE /* Synonym */
37#define SO_ERROR 0x1007 /* get error status and clear */
38#define SO_SNDBUF 0x1001 /* Send buffer size. */
39#define SO_RCVBUF 0x1002 /* Receive buffer. */
40#define SO_SNDLOWAT 0x1003 /* send low-water mark */
41#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
42#define SO_SNDTIMEO 0x1005 /* send timeout */
43#define SO_RCVTIMEO 0x1006 /* receive timeout */
44#define SO_ACCEPTCONN 0x1009
45#define SO_PROTOCOL 0x1028 /* protocol type */
46#define SO_DOMAIN 0x1029 /* domain/socket family */
47
48/* linux-specific, might as well be the same as on i386 */
49#define SO_NO_CHECK 11
50#define SO_PRIORITY 12
51#define SO_BSDCOMPAT 14
52
53#define SO_PASSCRED 17
54#define SO_PEERCRED 18
55
56/* Security levels - as per NRL IPv6 - don't actually do anything */
57#define SO_SECURITY_AUTHENTICATION 22
58#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
59#define SO_SECURITY_ENCRYPTION_NETWORK 24
60
61#define SO_BINDTODEVICE 25
62
63/* Socket filtering */
64#define SO_ATTACH_FILTER 26
65#define SO_DETACH_FILTER 27
66
67#define SO_PEERNAME 28
68#define SO_TIMESTAMP 29
69#define SCM_TIMESTAMP SO_TIMESTAMP
70
71#define SO_PEERSEC 30
72#define SO_SNDBUFFORCE 31
73#define SO_RCVBUFFORCE 33
74#define SO_PASSSEC 34
75#define SO_TIMESTAMPNS 35
76#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
77
78#define SO_MARK 36
79
80#define SO_TIMESTAMPING 37
81#define SCM_TIMESTAMPING SO_TIMESTAMPING
82
83#define SO_RXQ_OVFL 40
84
85#define SO_WIFI_STATUS 41
86#define SCM_WIFI_STATUS SO_WIFI_STATUS
87#define SO_PEEK_OFF 42
88
89/* Instruct lower device to use last 4-bytes of skb data as FCS */
90#define SO_NOFCS 43
91
92#ifdef __KERNEL__
93 14
94/** sock_type - Socket types 15/** sock_type - Socket types
95 * 16 *
@@ -126,6 +47,4 @@ enum sock_type {
126 47
127#define ARCH_HAS_SOCKET_TYPES 1 48#define ARCH_HAS_SOCKET_TYPES 1
128 49
129#endif /* __KERNEL__ */
130
131#endif /* _ASM_SOCKET_H */ 50#endif /* _ASM_SOCKET_H */
diff --git a/arch/mips/include/asm/termios.h b/arch/mips/include/asm/termios.h
index abdd87aaf609..6245b68a69a8 100644
--- a/arch/mips/include/asm/termios.h
+++ b/arch/mips/include/asm/termios.h
@@ -9,58 +9,8 @@
9#ifndef _ASM_TERMIOS_H 9#ifndef _ASM_TERMIOS_H
10#define _ASM_TERMIOS_H 10#define _ASM_TERMIOS_H
11 11
12#include <linux/errno.h>
13#include <asm/termbits.h>
14#include <asm/ioctls.h>
15
16struct sgttyb {
17 char sg_ispeed;
18 char sg_ospeed;
19 char sg_erase;
20 char sg_kill;
21 int sg_flags; /* SGI special - int, not short */
22};
23
24struct tchars {
25 char t_intrc;
26 char t_quitc;
27 char t_startc;
28 char t_stopc;
29 char t_eofc;
30 char t_brkc;
31};
32
33struct ltchars {
34 char t_suspc; /* stop process signal */
35 char t_dsuspc; /* delayed stop process signal */
36 char t_rprntc; /* reprint line */
37 char t_flushc; /* flush output (toggles) */
38 char t_werasc; /* word erase */
39 char t_lnextc; /* literal next character */
40};
41
42/* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source
43 compatibility anyway ... */
44
45struct winsize {
46 unsigned short ws_row;
47 unsigned short ws_col;
48 unsigned short ws_xpixel;
49 unsigned short ws_ypixel;
50};
51
52#define NCC 8
53struct termio {
54 unsigned short c_iflag; /* input mode flags */
55 unsigned short c_oflag; /* output mode flags */
56 unsigned short c_cflag; /* control mode flags */
57 unsigned short c_lflag; /* local mode flags */
58 char c_line; /* line discipline */
59 unsigned char c_cc[NCCS]; /* control characters */
60};
61
62#ifdef __KERNEL__
63#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <uapi/asm/termios.h>
64 14
65/* 15/*
66 * intr=^C quit=^\ erase=del kill=^U 16 * intr=^C quit=^\ erase=del kill=^U
@@ -70,25 +20,6 @@ struct termio {
70 * eof=^D eol=\0 20 * eof=^D eol=\0
71 */ 21 */
72#define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0" 22#define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0"
73#endif
74
75/* modem lines */
76#define TIOCM_LE 0x001 /* line enable */
77#define TIOCM_DTR 0x002 /* data terminal ready */
78#define TIOCM_RTS 0x004 /* request to send */
79#define TIOCM_ST 0x010 /* secondary transmit */
80#define TIOCM_SR 0x020 /* secondary receive */
81#define TIOCM_CTS 0x040 /* clear to send */
82#define TIOCM_CAR 0x100 /* carrier detect */
83#define TIOCM_CD TIOCM_CAR
84#define TIOCM_RNG 0x200 /* ring */
85#define TIOCM_RI TIOCM_RNG
86#define TIOCM_DSR 0x400 /* data set ready */
87#define TIOCM_OUT1 0x2000
88#define TIOCM_OUT2 0x4000
89#define TIOCM_LOOP 0x8000
90
91#ifdef __KERNEL__
92 23
93#include <linux/string.h> 24#include <linux/string.h>
94 25
@@ -171,6 +102,4 @@ static inline int kernel_termios_to_user_termios_1(struct termios __user *u,
171 return copy_to_user(u, k, sizeof(struct termios)) ? -EFAULT : 0; 102 return copy_to_user(u, k, sizeof(struct termios)) ? -EFAULT : 0;
172} 103}
173 104
174#endif /* defined(__KERNEL__) */
175
176#endif /* _ASM_TERMIOS_H */ 105#endif /* _ASM_TERMIOS_H */
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index 1228b25b290a..a845aafedee4 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -11,24 +11,12 @@
11#ifndef _ASM_TYPES_H 11#ifndef _ASM_TYPES_H
12#define _ASM_TYPES_H 12#define _ASM_TYPES_H
13 13
14/*
15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes.
17 */
18#ifdef __KERNEL__
19# include <asm-generic/int-ll64.h> 14# include <asm-generic/int-ll64.h>
20#else 15#include <uapi/asm/types.h>
21# if _MIPS_SZLONG == 64
22# include <asm-generic/int-l64.h>
23# else
24# include <asm-generic/int-ll64.h>
25# endif
26#endif
27 16
28/* 17/*
29 * These aren't exported outside the kernel to avoid name space clashes 18 * These aren't exported outside the kernel to avoid name space clashes
30 */ 19 */
31#ifdef __KERNEL__
32#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
33 21
34/* 22/*
@@ -42,6 +30,4 @@ typedef unsigned long phys_t;
42 30
43#endif /* __ASSEMBLY__ */ 31#endif /* __ASSEMBLY__ */
44 32
45#endif /* __KERNEL__ */
46
47#endif /* _ASM_TYPES_H */ 33#endif /* _ASM_TYPES_H */
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index 161fc4d976e4..9e47cc11aa26 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -12,1027 +12,8 @@
12#ifndef _ASM_UNISTD_H 12#ifndef _ASM_UNISTD_H
13#define _ASM_UNISTD_H 13#define _ASM_UNISTD_H
14 14
15#include <asm/sgidefs.h> 15#include <uapi/asm/unistd.h>
16 16
17#if _MIPS_SIM == _MIPS_SIM_ABI32
18
19/*
20 * Linux o32 style syscalls are in the range from 4000 to 4999.
21 */
22#define __NR_Linux 4000
23#define __NR_syscall (__NR_Linux + 0)
24#define __NR_exit (__NR_Linux + 1)
25#define __NR_fork (__NR_Linux + 2)
26#define __NR_read (__NR_Linux + 3)
27#define __NR_write (__NR_Linux + 4)
28#define __NR_open (__NR_Linux + 5)
29#define __NR_close (__NR_Linux + 6)
30#define __NR_waitpid (__NR_Linux + 7)
31#define __NR_creat (__NR_Linux + 8)
32#define __NR_link (__NR_Linux + 9)
33#define __NR_unlink (__NR_Linux + 10)
34#define __NR_execve (__NR_Linux + 11)
35#define __NR_chdir (__NR_Linux + 12)
36#define __NR_time (__NR_Linux + 13)
37#define __NR_mknod (__NR_Linux + 14)
38#define __NR_chmod (__NR_Linux + 15)
39#define __NR_lchown (__NR_Linux + 16)
40#define __NR_break (__NR_Linux + 17)
41#define __NR_unused18 (__NR_Linux + 18)
42#define __NR_lseek (__NR_Linux + 19)
43#define __NR_getpid (__NR_Linux + 20)
44#define __NR_mount (__NR_Linux + 21)
45#define __NR_umount (__NR_Linux + 22)
46#define __NR_setuid (__NR_Linux + 23)
47#define __NR_getuid (__NR_Linux + 24)
48#define __NR_stime (__NR_Linux + 25)
49#define __NR_ptrace (__NR_Linux + 26)
50#define __NR_alarm (__NR_Linux + 27)
51#define __NR_unused28 (__NR_Linux + 28)
52#define __NR_pause (__NR_Linux + 29)
53#define __NR_utime (__NR_Linux + 30)
54#define __NR_stty (__NR_Linux + 31)
55#define __NR_gtty (__NR_Linux + 32)
56#define __NR_access (__NR_Linux + 33)
57#define __NR_nice (__NR_Linux + 34)
58#define __NR_ftime (__NR_Linux + 35)
59#define __NR_sync (__NR_Linux + 36)
60#define __NR_kill (__NR_Linux + 37)
61#define __NR_rename (__NR_Linux + 38)
62#define __NR_mkdir (__NR_Linux + 39)
63#define __NR_rmdir (__NR_Linux + 40)
64#define __NR_dup (__NR_Linux + 41)
65#define __NR_pipe (__NR_Linux + 42)
66#define __NR_times (__NR_Linux + 43)
67#define __NR_prof (__NR_Linux + 44)
68#define __NR_brk (__NR_Linux + 45)
69#define __NR_setgid (__NR_Linux + 46)
70#define __NR_getgid (__NR_Linux + 47)
71#define __NR_signal (__NR_Linux + 48)
72#define __NR_geteuid (__NR_Linux + 49)
73#define __NR_getegid (__NR_Linux + 50)
74#define __NR_acct (__NR_Linux + 51)
75#define __NR_umount2 (__NR_Linux + 52)
76#define __NR_lock (__NR_Linux + 53)
77#define __NR_ioctl (__NR_Linux + 54)
78#define __NR_fcntl (__NR_Linux + 55)
79#define __NR_mpx (__NR_Linux + 56)
80#define __NR_setpgid (__NR_Linux + 57)
81#define __NR_ulimit (__NR_Linux + 58)
82#define __NR_unused59 (__NR_Linux + 59)
83#define __NR_umask (__NR_Linux + 60)
84#define __NR_chroot (__NR_Linux + 61)
85#define __NR_ustat (__NR_Linux + 62)
86#define __NR_dup2 (__NR_Linux + 63)
87#define __NR_getppid (__NR_Linux + 64)
88#define __NR_getpgrp (__NR_Linux + 65)
89#define __NR_setsid (__NR_Linux + 66)
90#define __NR_sigaction (__NR_Linux + 67)
91#define __NR_sgetmask (__NR_Linux + 68)
92#define __NR_ssetmask (__NR_Linux + 69)
93#define __NR_setreuid (__NR_Linux + 70)
94#define __NR_setregid (__NR_Linux + 71)
95#define __NR_sigsuspend (__NR_Linux + 72)
96#define __NR_sigpending (__NR_Linux + 73)
97#define __NR_sethostname (__NR_Linux + 74)
98#define __NR_setrlimit (__NR_Linux + 75)
99#define __NR_getrlimit (__NR_Linux + 76)
100#define __NR_getrusage (__NR_Linux + 77)
101#define __NR_gettimeofday (__NR_Linux + 78)
102#define __NR_settimeofday (__NR_Linux + 79)
103#define __NR_getgroups (__NR_Linux + 80)
104#define __NR_setgroups (__NR_Linux + 81)
105#define __NR_reserved82 (__NR_Linux + 82)
106#define __NR_symlink (__NR_Linux + 83)
107#define __NR_unused84 (__NR_Linux + 84)
108#define __NR_readlink (__NR_Linux + 85)
109#define __NR_uselib (__NR_Linux + 86)
110#define __NR_swapon (__NR_Linux + 87)
111#define __NR_reboot (__NR_Linux + 88)
112#define __NR_readdir (__NR_Linux + 89)
113#define __NR_mmap (__NR_Linux + 90)
114#define __NR_munmap (__NR_Linux + 91)
115#define __NR_truncate (__NR_Linux + 92)
116#define __NR_ftruncate (__NR_Linux + 93)
117#define __NR_fchmod (__NR_Linux + 94)
118#define __NR_fchown (__NR_Linux + 95)
119#define __NR_getpriority (__NR_Linux + 96)
120#define __NR_setpriority (__NR_Linux + 97)
121#define __NR_profil (__NR_Linux + 98)
122#define __NR_statfs (__NR_Linux + 99)
123#define __NR_fstatfs (__NR_Linux + 100)
124#define __NR_ioperm (__NR_Linux + 101)
125#define __NR_socketcall (__NR_Linux + 102)
126#define __NR_syslog (__NR_Linux + 103)
127#define __NR_setitimer (__NR_Linux + 104)
128#define __NR_getitimer (__NR_Linux + 105)
129#define __NR_stat (__NR_Linux + 106)
130#define __NR_lstat (__NR_Linux + 107)
131#define __NR_fstat (__NR_Linux + 108)
132#define __NR_unused109 (__NR_Linux + 109)
133#define __NR_iopl (__NR_Linux + 110)
134#define __NR_vhangup (__NR_Linux + 111)
135#define __NR_idle (__NR_Linux + 112)
136#define __NR_vm86 (__NR_Linux + 113)
137#define __NR_wait4 (__NR_Linux + 114)
138#define __NR_swapoff (__NR_Linux + 115)
139#define __NR_sysinfo (__NR_Linux + 116)
140#define __NR_ipc (__NR_Linux + 117)
141#define __NR_fsync (__NR_Linux + 118)
142#define __NR_sigreturn (__NR_Linux + 119)
143#define __NR_clone (__NR_Linux + 120)
144#define __NR_setdomainname (__NR_Linux + 121)
145#define __NR_uname (__NR_Linux + 122)
146#define __NR_modify_ldt (__NR_Linux + 123)
147#define __NR_adjtimex (__NR_Linux + 124)
148#define __NR_mprotect (__NR_Linux + 125)
149#define __NR_sigprocmask (__NR_Linux + 126)
150#define __NR_create_module (__NR_Linux + 127)
151#define __NR_init_module (__NR_Linux + 128)
152#define __NR_delete_module (__NR_Linux + 129)
153#define __NR_get_kernel_syms (__NR_Linux + 130)
154#define __NR_quotactl (__NR_Linux + 131)
155#define __NR_getpgid (__NR_Linux + 132)
156#define __NR_fchdir (__NR_Linux + 133)
157#define __NR_bdflush (__NR_Linux + 134)
158#define __NR_sysfs (__NR_Linux + 135)
159#define __NR_personality (__NR_Linux + 136)
160#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
161#define __NR_setfsuid (__NR_Linux + 138)
162#define __NR_setfsgid (__NR_Linux + 139)
163#define __NR__llseek (__NR_Linux + 140)
164#define __NR_getdents (__NR_Linux + 141)
165#define __NR__newselect (__NR_Linux + 142)
166#define __NR_flock (__NR_Linux + 143)
167#define __NR_msync (__NR_Linux + 144)
168#define __NR_readv (__NR_Linux + 145)
169#define __NR_writev (__NR_Linux + 146)
170#define __NR_cacheflush (__NR_Linux + 147)
171#define __NR_cachectl (__NR_Linux + 148)
172#define __NR_sysmips (__NR_Linux + 149)
173#define __NR_unused150 (__NR_Linux + 150)
174#define __NR_getsid (__NR_Linux + 151)
175#define __NR_fdatasync (__NR_Linux + 152)
176#define __NR__sysctl (__NR_Linux + 153)
177#define __NR_mlock (__NR_Linux + 154)
178#define __NR_munlock (__NR_Linux + 155)
179#define __NR_mlockall (__NR_Linux + 156)
180#define __NR_munlockall (__NR_Linux + 157)
181#define __NR_sched_setparam (__NR_Linux + 158)
182#define __NR_sched_getparam (__NR_Linux + 159)
183#define __NR_sched_setscheduler (__NR_Linux + 160)
184#define __NR_sched_getscheduler (__NR_Linux + 161)
185#define __NR_sched_yield (__NR_Linux + 162)
186#define __NR_sched_get_priority_max (__NR_Linux + 163)
187#define __NR_sched_get_priority_min (__NR_Linux + 164)
188#define __NR_sched_rr_get_interval (__NR_Linux + 165)
189#define __NR_nanosleep (__NR_Linux + 166)
190#define __NR_mremap (__NR_Linux + 167)
191#define __NR_accept (__NR_Linux + 168)
192#define __NR_bind (__NR_Linux + 169)
193#define __NR_connect (__NR_Linux + 170)
194#define __NR_getpeername (__NR_Linux + 171)
195#define __NR_getsockname (__NR_Linux + 172)
196#define __NR_getsockopt (__NR_Linux + 173)
197#define __NR_listen (__NR_Linux + 174)
198#define __NR_recv (__NR_Linux + 175)
199#define __NR_recvfrom (__NR_Linux + 176)
200#define __NR_recvmsg (__NR_Linux + 177)
201#define __NR_send (__NR_Linux + 178)
202#define __NR_sendmsg (__NR_Linux + 179)
203#define __NR_sendto (__NR_Linux + 180)
204#define __NR_setsockopt (__NR_Linux + 181)
205#define __NR_shutdown (__NR_Linux + 182)
206#define __NR_socket (__NR_Linux + 183)
207#define __NR_socketpair (__NR_Linux + 184)
208#define __NR_setresuid (__NR_Linux + 185)
209#define __NR_getresuid (__NR_Linux + 186)
210#define __NR_query_module (__NR_Linux + 187)
211#define __NR_poll (__NR_Linux + 188)
212#define __NR_nfsservctl (__NR_Linux + 189)
213#define __NR_setresgid (__NR_Linux + 190)
214#define __NR_getresgid (__NR_Linux + 191)
215#define __NR_prctl (__NR_Linux + 192)
216#define __NR_rt_sigreturn (__NR_Linux + 193)
217#define __NR_rt_sigaction (__NR_Linux + 194)
218#define __NR_rt_sigprocmask (__NR_Linux + 195)
219#define __NR_rt_sigpending (__NR_Linux + 196)
220#define __NR_rt_sigtimedwait (__NR_Linux + 197)
221#define __NR_rt_sigqueueinfo (__NR_Linux + 198)
222#define __NR_rt_sigsuspend (__NR_Linux + 199)
223#define __NR_pread64 (__NR_Linux + 200)
224#define __NR_pwrite64 (__NR_Linux + 201)
225#define __NR_chown (__NR_Linux + 202)
226#define __NR_getcwd (__NR_Linux + 203)
227#define __NR_capget (__NR_Linux + 204)
228#define __NR_capset (__NR_Linux + 205)
229#define __NR_sigaltstack (__NR_Linux + 206)
230#define __NR_sendfile (__NR_Linux + 207)
231#define __NR_getpmsg (__NR_Linux + 208)
232#define __NR_putpmsg (__NR_Linux + 209)
233#define __NR_mmap2 (__NR_Linux + 210)
234#define __NR_truncate64 (__NR_Linux + 211)
235#define __NR_ftruncate64 (__NR_Linux + 212)
236#define __NR_stat64 (__NR_Linux + 213)
237#define __NR_lstat64 (__NR_Linux + 214)
238#define __NR_fstat64 (__NR_Linux + 215)
239#define __NR_pivot_root (__NR_Linux + 216)
240#define __NR_mincore (__NR_Linux + 217)
241#define __NR_madvise (__NR_Linux + 218)
242#define __NR_getdents64 (__NR_Linux + 219)
243#define __NR_fcntl64 (__NR_Linux + 220)
244#define __NR_reserved221 (__NR_Linux + 221)
245#define __NR_gettid (__NR_Linux + 222)
246#define __NR_readahead (__NR_Linux + 223)
247#define __NR_setxattr (__NR_Linux + 224)
248#define __NR_lsetxattr (__NR_Linux + 225)
249#define __NR_fsetxattr (__NR_Linux + 226)
250#define __NR_getxattr (__NR_Linux + 227)
251#define __NR_lgetxattr (__NR_Linux + 228)
252#define __NR_fgetxattr (__NR_Linux + 229)
253#define __NR_listxattr (__NR_Linux + 230)
254#define __NR_llistxattr (__NR_Linux + 231)
255#define __NR_flistxattr (__NR_Linux + 232)
256#define __NR_removexattr (__NR_Linux + 233)
257#define __NR_lremovexattr (__NR_Linux + 234)
258#define __NR_fremovexattr (__NR_Linux + 235)
259#define __NR_tkill (__NR_Linux + 236)
260#define __NR_sendfile64 (__NR_Linux + 237)
261#define __NR_futex (__NR_Linux + 238)
262#define __NR_sched_setaffinity (__NR_Linux + 239)
263#define __NR_sched_getaffinity (__NR_Linux + 240)
264#define __NR_io_setup (__NR_Linux + 241)
265#define __NR_io_destroy (__NR_Linux + 242)
266#define __NR_io_getevents (__NR_Linux + 243)
267#define __NR_io_submit (__NR_Linux + 244)
268#define __NR_io_cancel (__NR_Linux + 245)
269#define __NR_exit_group (__NR_Linux + 246)
270#define __NR_lookup_dcookie (__NR_Linux + 247)
271#define __NR_epoll_create (__NR_Linux + 248)
272#define __NR_epoll_ctl (__NR_Linux + 249)
273#define __NR_epoll_wait (__NR_Linux + 250)
274#define __NR_remap_file_pages (__NR_Linux + 251)
275#define __NR_set_tid_address (__NR_Linux + 252)
276#define __NR_restart_syscall (__NR_Linux + 253)
277#define __NR_fadvise64 (__NR_Linux + 254)
278#define __NR_statfs64 (__NR_Linux + 255)
279#define __NR_fstatfs64 (__NR_Linux + 256)
280#define __NR_timer_create (__NR_Linux + 257)
281#define __NR_timer_settime (__NR_Linux + 258)
282#define __NR_timer_gettime (__NR_Linux + 259)
283#define __NR_timer_getoverrun (__NR_Linux + 260)
284#define __NR_timer_delete (__NR_Linux + 261)
285#define __NR_clock_settime (__NR_Linux + 262)
286#define __NR_clock_gettime (__NR_Linux + 263)
287#define __NR_clock_getres (__NR_Linux + 264)
288#define __NR_clock_nanosleep (__NR_Linux + 265)
289#define __NR_tgkill (__NR_Linux + 266)
290#define __NR_utimes (__NR_Linux + 267)
291#define __NR_mbind (__NR_Linux + 268)
292#define __NR_get_mempolicy (__NR_Linux + 269)
293#define __NR_set_mempolicy (__NR_Linux + 270)
294#define __NR_mq_open (__NR_Linux + 271)
295#define __NR_mq_unlink (__NR_Linux + 272)
296#define __NR_mq_timedsend (__NR_Linux + 273)
297#define __NR_mq_timedreceive (__NR_Linux + 274)
298#define __NR_mq_notify (__NR_Linux + 275)
299#define __NR_mq_getsetattr (__NR_Linux + 276)
300#define __NR_vserver (__NR_Linux + 277)
301#define __NR_waitid (__NR_Linux + 278)
302/* #define __NR_sys_setaltroot (__NR_Linux + 279) */
303#define __NR_add_key (__NR_Linux + 280)
304#define __NR_request_key (__NR_Linux + 281)
305#define __NR_keyctl (__NR_Linux + 282)
306#define __NR_set_thread_area (__NR_Linux + 283)
307#define __NR_inotify_init (__NR_Linux + 284)
308#define __NR_inotify_add_watch (__NR_Linux + 285)
309#define __NR_inotify_rm_watch (__NR_Linux + 286)
310#define __NR_migrate_pages (__NR_Linux + 287)
311#define __NR_openat (__NR_Linux + 288)
312#define __NR_mkdirat (__NR_Linux + 289)
313#define __NR_mknodat (__NR_Linux + 290)
314#define __NR_fchownat (__NR_Linux + 291)
315#define __NR_futimesat (__NR_Linux + 292)
316#define __NR_fstatat64 (__NR_Linux + 293)
317#define __NR_unlinkat (__NR_Linux + 294)
318#define __NR_renameat (__NR_Linux + 295)
319#define __NR_linkat (__NR_Linux + 296)
320#define __NR_symlinkat (__NR_Linux + 297)
321#define __NR_readlinkat (__NR_Linux + 298)
322#define __NR_fchmodat (__NR_Linux + 299)
323#define __NR_faccessat (__NR_Linux + 300)
324#define __NR_pselect6 (__NR_Linux + 301)
325#define __NR_ppoll (__NR_Linux + 302)
326#define __NR_unshare (__NR_Linux + 303)
327#define __NR_splice (__NR_Linux + 304)
328#define __NR_sync_file_range (__NR_Linux + 305)
329#define __NR_tee (__NR_Linux + 306)
330#define __NR_vmsplice (__NR_Linux + 307)
331#define __NR_move_pages (__NR_Linux + 308)
332#define __NR_set_robust_list (__NR_Linux + 309)
333#define __NR_get_robust_list (__NR_Linux + 310)
334#define __NR_kexec_load (__NR_Linux + 311)
335#define __NR_getcpu (__NR_Linux + 312)
336#define __NR_epoll_pwait (__NR_Linux + 313)
337#define __NR_ioprio_set (__NR_Linux + 314)
338#define __NR_ioprio_get (__NR_Linux + 315)
339#define __NR_utimensat (__NR_Linux + 316)
340#define __NR_signalfd (__NR_Linux + 317)
341#define __NR_timerfd (__NR_Linux + 318)
342#define __NR_eventfd (__NR_Linux + 319)
343#define __NR_fallocate (__NR_Linux + 320)
344#define __NR_timerfd_create (__NR_Linux + 321)
345#define __NR_timerfd_gettime (__NR_Linux + 322)
346#define __NR_timerfd_settime (__NR_Linux + 323)
347#define __NR_signalfd4 (__NR_Linux + 324)
348#define __NR_eventfd2 (__NR_Linux + 325)
349#define __NR_epoll_create1 (__NR_Linux + 326)
350#define __NR_dup3 (__NR_Linux + 327)
351#define __NR_pipe2 (__NR_Linux + 328)
352#define __NR_inotify_init1 (__NR_Linux + 329)
353#define __NR_preadv (__NR_Linux + 330)
354#define __NR_pwritev (__NR_Linux + 331)
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
356#define __NR_perf_event_open (__NR_Linux + 333)
357#define __NR_accept4 (__NR_Linux + 334)
358#define __NR_recvmmsg (__NR_Linux + 335)
359#define __NR_fanotify_init (__NR_Linux + 336)
360#define __NR_fanotify_mark (__NR_Linux + 337)
361#define __NR_prlimit64 (__NR_Linux + 338)
362#define __NR_name_to_handle_at (__NR_Linux + 339)
363#define __NR_open_by_handle_at (__NR_Linux + 340)
364#define __NR_clock_adjtime (__NR_Linux + 341)
365#define __NR_syncfs (__NR_Linux + 342)
366#define __NR_sendmmsg (__NR_Linux + 343)
367#define __NR_setns (__NR_Linux + 344)
368#define __NR_process_vm_readv (__NR_Linux + 345)
369#define __NR_process_vm_writev (__NR_Linux + 346)
370#define __NR_kcmp (__NR_Linux + 347)
371
372/*
373 * Offset of the last Linux o32 flavoured syscall
374 */
375#define __NR_Linux_syscalls 347
376
377#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
378
379#define __NR_O32_Linux 4000
380#define __NR_O32_Linux_syscalls 347
381
382#if _MIPS_SIM == _MIPS_SIM_ABI64
383
384/*
385 * Linux 64-bit syscalls are in the range from 5000 to 5999.
386 */
387#define __NR_Linux 5000
388#define __NR_read (__NR_Linux + 0)
389#define __NR_write (__NR_Linux + 1)
390#define __NR_open (__NR_Linux + 2)
391#define __NR_close (__NR_Linux + 3)
392#define __NR_stat (__NR_Linux + 4)
393#define __NR_fstat (__NR_Linux + 5)
394#define __NR_lstat (__NR_Linux + 6)
395#define __NR_poll (__NR_Linux + 7)
396#define __NR_lseek (__NR_Linux + 8)
397#define __NR_mmap (__NR_Linux + 9)
398#define __NR_mprotect (__NR_Linux + 10)
399#define __NR_munmap (__NR_Linux + 11)
400#define __NR_brk (__NR_Linux + 12)
401#define __NR_rt_sigaction (__NR_Linux + 13)
402#define __NR_rt_sigprocmask (__NR_Linux + 14)
403#define __NR_ioctl (__NR_Linux + 15)
404#define __NR_pread64 (__NR_Linux + 16)
405#define __NR_pwrite64 (__NR_Linux + 17)
406#define __NR_readv (__NR_Linux + 18)
407#define __NR_writev (__NR_Linux + 19)
408#define __NR_access (__NR_Linux + 20)
409#define __NR_pipe (__NR_Linux + 21)
410#define __NR__newselect (__NR_Linux + 22)
411#define __NR_sched_yield (__NR_Linux + 23)
412#define __NR_mremap (__NR_Linux + 24)
413#define __NR_msync (__NR_Linux + 25)
414#define __NR_mincore (__NR_Linux + 26)
415#define __NR_madvise (__NR_Linux + 27)
416#define __NR_shmget (__NR_Linux + 28)
417#define __NR_shmat (__NR_Linux + 29)
418#define __NR_shmctl (__NR_Linux + 30)
419#define __NR_dup (__NR_Linux + 31)
420#define __NR_dup2 (__NR_Linux + 32)
421#define __NR_pause (__NR_Linux + 33)
422#define __NR_nanosleep (__NR_Linux + 34)
423#define __NR_getitimer (__NR_Linux + 35)
424#define __NR_setitimer (__NR_Linux + 36)
425#define __NR_alarm (__NR_Linux + 37)
426#define __NR_getpid (__NR_Linux + 38)
427#define __NR_sendfile (__NR_Linux + 39)
428#define __NR_socket (__NR_Linux + 40)
429#define __NR_connect (__NR_Linux + 41)
430#define __NR_accept (__NR_Linux + 42)
431#define __NR_sendto (__NR_Linux + 43)
432#define __NR_recvfrom (__NR_Linux + 44)
433#define __NR_sendmsg (__NR_Linux + 45)
434#define __NR_recvmsg (__NR_Linux + 46)
435#define __NR_shutdown (__NR_Linux + 47)
436#define __NR_bind (__NR_Linux + 48)
437#define __NR_listen (__NR_Linux + 49)
438#define __NR_getsockname (__NR_Linux + 50)
439#define __NR_getpeername (__NR_Linux + 51)
440#define __NR_socketpair (__NR_Linux + 52)
441#define __NR_setsockopt (__NR_Linux + 53)
442#define __NR_getsockopt (__NR_Linux + 54)
443#define __NR_clone (__NR_Linux + 55)
444#define __NR_fork (__NR_Linux + 56)
445#define __NR_execve (__NR_Linux + 57)
446#define __NR_exit (__NR_Linux + 58)
447#define __NR_wait4 (__NR_Linux + 59)
448#define __NR_kill (__NR_Linux + 60)
449#define __NR_uname (__NR_Linux + 61)
450#define __NR_semget (__NR_Linux + 62)
451#define __NR_semop (__NR_Linux + 63)
452#define __NR_semctl (__NR_Linux + 64)
453#define __NR_shmdt (__NR_Linux + 65)
454#define __NR_msgget (__NR_Linux + 66)
455#define __NR_msgsnd (__NR_Linux + 67)
456#define __NR_msgrcv (__NR_Linux + 68)
457#define __NR_msgctl (__NR_Linux + 69)
458#define __NR_fcntl (__NR_Linux + 70)
459#define __NR_flock (__NR_Linux + 71)
460#define __NR_fsync (__NR_Linux + 72)
461#define __NR_fdatasync (__NR_Linux + 73)
462#define __NR_truncate (__NR_Linux + 74)
463#define __NR_ftruncate (__NR_Linux + 75)
464#define __NR_getdents (__NR_Linux + 76)
465#define __NR_getcwd (__NR_Linux + 77)
466#define __NR_chdir (__NR_Linux + 78)
467#define __NR_fchdir (__NR_Linux + 79)
468#define __NR_rename (__NR_Linux + 80)
469#define __NR_mkdir (__NR_Linux + 81)
470#define __NR_rmdir (__NR_Linux + 82)
471#define __NR_creat (__NR_Linux + 83)
472#define __NR_link (__NR_Linux + 84)
473#define __NR_unlink (__NR_Linux + 85)
474#define __NR_symlink (__NR_Linux + 86)
475#define __NR_readlink (__NR_Linux + 87)
476#define __NR_chmod (__NR_Linux + 88)
477#define __NR_fchmod (__NR_Linux + 89)
478#define __NR_chown (__NR_Linux + 90)
479#define __NR_fchown (__NR_Linux + 91)
480#define __NR_lchown (__NR_Linux + 92)
481#define __NR_umask (__NR_Linux + 93)
482#define __NR_gettimeofday (__NR_Linux + 94)
483#define __NR_getrlimit (__NR_Linux + 95)
484#define __NR_getrusage (__NR_Linux + 96)
485#define __NR_sysinfo (__NR_Linux + 97)
486#define __NR_times (__NR_Linux + 98)
487#define __NR_ptrace (__NR_Linux + 99)
488#define __NR_getuid (__NR_Linux + 100)
489#define __NR_syslog (__NR_Linux + 101)
490#define __NR_getgid (__NR_Linux + 102)
491#define __NR_setuid (__NR_Linux + 103)
492#define __NR_setgid (__NR_Linux + 104)
493#define __NR_geteuid (__NR_Linux + 105)
494#define __NR_getegid (__NR_Linux + 106)
495#define __NR_setpgid (__NR_Linux + 107)
496#define __NR_getppid (__NR_Linux + 108)
497#define __NR_getpgrp (__NR_Linux + 109)
498#define __NR_setsid (__NR_Linux + 110)
499#define __NR_setreuid (__NR_Linux + 111)
500#define __NR_setregid (__NR_Linux + 112)
501#define __NR_getgroups (__NR_Linux + 113)
502#define __NR_setgroups (__NR_Linux + 114)
503#define __NR_setresuid (__NR_Linux + 115)
504#define __NR_getresuid (__NR_Linux + 116)
505#define __NR_setresgid (__NR_Linux + 117)
506#define __NR_getresgid (__NR_Linux + 118)
507#define __NR_getpgid (__NR_Linux + 119)
508#define __NR_setfsuid (__NR_Linux + 120)
509#define __NR_setfsgid (__NR_Linux + 121)
510#define __NR_getsid (__NR_Linux + 122)
511#define __NR_capget (__NR_Linux + 123)
512#define __NR_capset (__NR_Linux + 124)
513#define __NR_rt_sigpending (__NR_Linux + 125)
514#define __NR_rt_sigtimedwait (__NR_Linux + 126)
515#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
516#define __NR_rt_sigsuspend (__NR_Linux + 128)
517#define __NR_sigaltstack (__NR_Linux + 129)
518#define __NR_utime (__NR_Linux + 130)
519#define __NR_mknod (__NR_Linux + 131)
520#define __NR_personality (__NR_Linux + 132)
521#define __NR_ustat (__NR_Linux + 133)
522#define __NR_statfs (__NR_Linux + 134)
523#define __NR_fstatfs (__NR_Linux + 135)
524#define __NR_sysfs (__NR_Linux + 136)
525#define __NR_getpriority (__NR_Linux + 137)
526#define __NR_setpriority (__NR_Linux + 138)
527#define __NR_sched_setparam (__NR_Linux + 139)
528#define __NR_sched_getparam (__NR_Linux + 140)
529#define __NR_sched_setscheduler (__NR_Linux + 141)
530#define __NR_sched_getscheduler (__NR_Linux + 142)
531#define __NR_sched_get_priority_max (__NR_Linux + 143)
532#define __NR_sched_get_priority_min (__NR_Linux + 144)
533#define __NR_sched_rr_get_interval (__NR_Linux + 145)
534#define __NR_mlock (__NR_Linux + 146)
535#define __NR_munlock (__NR_Linux + 147)
536#define __NR_mlockall (__NR_Linux + 148)
537#define __NR_munlockall (__NR_Linux + 149)
538#define __NR_vhangup (__NR_Linux + 150)
539#define __NR_pivot_root (__NR_Linux + 151)
540#define __NR__sysctl (__NR_Linux + 152)
541#define __NR_prctl (__NR_Linux + 153)
542#define __NR_adjtimex (__NR_Linux + 154)
543#define __NR_setrlimit (__NR_Linux + 155)
544#define __NR_chroot (__NR_Linux + 156)
545#define __NR_sync (__NR_Linux + 157)
546#define __NR_acct (__NR_Linux + 158)
547#define __NR_settimeofday (__NR_Linux + 159)
548#define __NR_mount (__NR_Linux + 160)
549#define __NR_umount2 (__NR_Linux + 161)
550#define __NR_swapon (__NR_Linux + 162)
551#define __NR_swapoff (__NR_Linux + 163)
552#define __NR_reboot (__NR_Linux + 164)
553#define __NR_sethostname (__NR_Linux + 165)
554#define __NR_setdomainname (__NR_Linux + 166)
555#define __NR_create_module (__NR_Linux + 167)
556#define __NR_init_module (__NR_Linux + 168)
557#define __NR_delete_module (__NR_Linux + 169)
558#define __NR_get_kernel_syms (__NR_Linux + 170)
559#define __NR_query_module (__NR_Linux + 171)
560#define __NR_quotactl (__NR_Linux + 172)
561#define __NR_nfsservctl (__NR_Linux + 173)
562#define __NR_getpmsg (__NR_Linux + 174)
563#define __NR_putpmsg (__NR_Linux + 175)
564#define __NR_afs_syscall (__NR_Linux + 176)
565#define __NR_reserved177 (__NR_Linux + 177)
566#define __NR_gettid (__NR_Linux + 178)
567#define __NR_readahead (__NR_Linux + 179)
568#define __NR_setxattr (__NR_Linux + 180)
569#define __NR_lsetxattr (__NR_Linux + 181)
570#define __NR_fsetxattr (__NR_Linux + 182)
571#define __NR_getxattr (__NR_Linux + 183)
572#define __NR_lgetxattr (__NR_Linux + 184)
573#define __NR_fgetxattr (__NR_Linux + 185)
574#define __NR_listxattr (__NR_Linux + 186)
575#define __NR_llistxattr (__NR_Linux + 187)
576#define __NR_flistxattr (__NR_Linux + 188)
577#define __NR_removexattr (__NR_Linux + 189)
578#define __NR_lremovexattr (__NR_Linux + 190)
579#define __NR_fremovexattr (__NR_Linux + 191)
580#define __NR_tkill (__NR_Linux + 192)
581#define __NR_reserved193 (__NR_Linux + 193)
582#define __NR_futex (__NR_Linux + 194)
583#define __NR_sched_setaffinity (__NR_Linux + 195)
584#define __NR_sched_getaffinity (__NR_Linux + 196)
585#define __NR_cacheflush (__NR_Linux + 197)
586#define __NR_cachectl (__NR_Linux + 198)
587#define __NR_sysmips (__NR_Linux + 199)
588#define __NR_io_setup (__NR_Linux + 200)
589#define __NR_io_destroy (__NR_Linux + 201)
590#define __NR_io_getevents (__NR_Linux + 202)
591#define __NR_io_submit (__NR_Linux + 203)
592#define __NR_io_cancel (__NR_Linux + 204)
593#define __NR_exit_group (__NR_Linux + 205)
594#define __NR_lookup_dcookie (__NR_Linux + 206)
595#define __NR_epoll_create (__NR_Linux + 207)
596#define __NR_epoll_ctl (__NR_Linux + 208)
597#define __NR_epoll_wait (__NR_Linux + 209)
598#define __NR_remap_file_pages (__NR_Linux + 210)
599#define __NR_rt_sigreturn (__NR_Linux + 211)
600#define __NR_set_tid_address (__NR_Linux + 212)
601#define __NR_restart_syscall (__NR_Linux + 213)
602#define __NR_semtimedop (__NR_Linux + 214)
603#define __NR_fadvise64 (__NR_Linux + 215)
604#define __NR_timer_create (__NR_Linux + 216)
605#define __NR_timer_settime (__NR_Linux + 217)
606#define __NR_timer_gettime (__NR_Linux + 218)
607#define __NR_timer_getoverrun (__NR_Linux + 219)
608#define __NR_timer_delete (__NR_Linux + 220)
609#define __NR_clock_settime (__NR_Linux + 221)
610#define __NR_clock_gettime (__NR_Linux + 222)
611#define __NR_clock_getres (__NR_Linux + 223)
612#define __NR_clock_nanosleep (__NR_Linux + 224)
613#define __NR_tgkill (__NR_Linux + 225)
614#define __NR_utimes (__NR_Linux + 226)
615#define __NR_mbind (__NR_Linux + 227)
616#define __NR_get_mempolicy (__NR_Linux + 228)
617#define __NR_set_mempolicy (__NR_Linux + 229)
618#define __NR_mq_open (__NR_Linux + 230)
619#define __NR_mq_unlink (__NR_Linux + 231)
620#define __NR_mq_timedsend (__NR_Linux + 232)
621#define __NR_mq_timedreceive (__NR_Linux + 233)
622#define __NR_mq_notify (__NR_Linux + 234)
623#define __NR_mq_getsetattr (__NR_Linux + 235)
624#define __NR_vserver (__NR_Linux + 236)
625#define __NR_waitid (__NR_Linux + 237)
626/* #define __NR_sys_setaltroot (__NR_Linux + 238) */
627#define __NR_add_key (__NR_Linux + 239)
628#define __NR_request_key (__NR_Linux + 240)
629#define __NR_keyctl (__NR_Linux + 241)
630#define __NR_set_thread_area (__NR_Linux + 242)
631#define __NR_inotify_init (__NR_Linux + 243)
632#define __NR_inotify_add_watch (__NR_Linux + 244)
633#define __NR_inotify_rm_watch (__NR_Linux + 245)
634#define __NR_migrate_pages (__NR_Linux + 246)
635#define __NR_openat (__NR_Linux + 247)
636#define __NR_mkdirat (__NR_Linux + 248)
637#define __NR_mknodat (__NR_Linux + 249)
638#define __NR_fchownat (__NR_Linux + 250)
639#define __NR_futimesat (__NR_Linux + 251)
640#define __NR_newfstatat (__NR_Linux + 252)
641#define __NR_unlinkat (__NR_Linux + 253)
642#define __NR_renameat (__NR_Linux + 254)
643#define __NR_linkat (__NR_Linux + 255)
644#define __NR_symlinkat (__NR_Linux + 256)
645#define __NR_readlinkat (__NR_Linux + 257)
646#define __NR_fchmodat (__NR_Linux + 258)
647#define __NR_faccessat (__NR_Linux + 259)
648#define __NR_pselect6 (__NR_Linux + 260)
649#define __NR_ppoll (__NR_Linux + 261)
650#define __NR_unshare (__NR_Linux + 262)
651#define __NR_splice (__NR_Linux + 263)
652#define __NR_sync_file_range (__NR_Linux + 264)
653#define __NR_tee (__NR_Linux + 265)
654#define __NR_vmsplice (__NR_Linux + 266)
655#define __NR_move_pages (__NR_Linux + 267)
656#define __NR_set_robust_list (__NR_Linux + 268)
657#define __NR_get_robust_list (__NR_Linux + 269)
658#define __NR_kexec_load (__NR_Linux + 270)
659#define __NR_getcpu (__NR_Linux + 271)
660#define __NR_epoll_pwait (__NR_Linux + 272)
661#define __NR_ioprio_set (__NR_Linux + 273)
662#define __NR_ioprio_get (__NR_Linux + 274)
663#define __NR_utimensat (__NR_Linux + 275)
664#define __NR_signalfd (__NR_Linux + 276)
665#define __NR_timerfd (__NR_Linux + 277)
666#define __NR_eventfd (__NR_Linux + 278)
667#define __NR_fallocate (__NR_Linux + 279)
668#define __NR_timerfd_create (__NR_Linux + 280)
669#define __NR_timerfd_gettime (__NR_Linux + 281)
670#define __NR_timerfd_settime (__NR_Linux + 282)
671#define __NR_signalfd4 (__NR_Linux + 283)
672#define __NR_eventfd2 (__NR_Linux + 284)
673#define __NR_epoll_create1 (__NR_Linux + 285)
674#define __NR_dup3 (__NR_Linux + 286)
675#define __NR_pipe2 (__NR_Linux + 287)
676#define __NR_inotify_init1 (__NR_Linux + 288)
677#define __NR_preadv (__NR_Linux + 289)
678#define __NR_pwritev (__NR_Linux + 290)
679#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
680#define __NR_perf_event_open (__NR_Linux + 292)
681#define __NR_accept4 (__NR_Linux + 293)
682#define __NR_recvmmsg (__NR_Linux + 294)
683#define __NR_fanotify_init (__NR_Linux + 295)
684#define __NR_fanotify_mark (__NR_Linux + 296)
685#define __NR_prlimit64 (__NR_Linux + 297)
686#define __NR_name_to_handle_at (__NR_Linux + 298)
687#define __NR_open_by_handle_at (__NR_Linux + 299)
688#define __NR_clock_adjtime (__NR_Linux + 300)
689#define __NR_syncfs (__NR_Linux + 301)
690#define __NR_sendmmsg (__NR_Linux + 302)
691#define __NR_setns (__NR_Linux + 303)
692#define __NR_process_vm_readv (__NR_Linux + 304)
693#define __NR_process_vm_writev (__NR_Linux + 305)
694#define __NR_kcmp (__NR_Linux + 306)
695
696/*
697 * Offset of the last Linux 64-bit flavoured syscall
698 */
699#define __NR_Linux_syscalls 306
700
701#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
702
703#define __NR_64_Linux 5000
704#define __NR_64_Linux_syscalls 306
705
706#if _MIPS_SIM == _MIPS_SIM_NABI32
707
708/*
709 * Linux N32 syscalls are in the range from 6000 to 6999.
710 */
711#define __NR_Linux 6000
712#define __NR_read (__NR_Linux + 0)
713#define __NR_write (__NR_Linux + 1)
714#define __NR_open (__NR_Linux + 2)
715#define __NR_close (__NR_Linux + 3)
716#define __NR_stat (__NR_Linux + 4)
717#define __NR_fstat (__NR_Linux + 5)
718#define __NR_lstat (__NR_Linux + 6)
719#define __NR_poll (__NR_Linux + 7)
720#define __NR_lseek (__NR_Linux + 8)
721#define __NR_mmap (__NR_Linux + 9)
722#define __NR_mprotect (__NR_Linux + 10)
723#define __NR_munmap (__NR_Linux + 11)
724#define __NR_brk (__NR_Linux + 12)
725#define __NR_rt_sigaction (__NR_Linux + 13)
726#define __NR_rt_sigprocmask (__NR_Linux + 14)
727#define __NR_ioctl (__NR_Linux + 15)
728#define __NR_pread64 (__NR_Linux + 16)
729#define __NR_pwrite64 (__NR_Linux + 17)
730#define __NR_readv (__NR_Linux + 18)
731#define __NR_writev (__NR_Linux + 19)
732#define __NR_access (__NR_Linux + 20)
733#define __NR_pipe (__NR_Linux + 21)
734#define __NR__newselect (__NR_Linux + 22)
735#define __NR_sched_yield (__NR_Linux + 23)
736#define __NR_mremap (__NR_Linux + 24)
737#define __NR_msync (__NR_Linux + 25)
738#define __NR_mincore (__NR_Linux + 26)
739#define __NR_madvise (__NR_Linux + 27)
740#define __NR_shmget (__NR_Linux + 28)
741#define __NR_shmat (__NR_Linux + 29)
742#define __NR_shmctl (__NR_Linux + 30)
743#define __NR_dup (__NR_Linux + 31)
744#define __NR_dup2 (__NR_Linux + 32)
745#define __NR_pause (__NR_Linux + 33)
746#define __NR_nanosleep (__NR_Linux + 34)
747#define __NR_getitimer (__NR_Linux + 35)
748#define __NR_setitimer (__NR_Linux + 36)
749#define __NR_alarm (__NR_Linux + 37)
750#define __NR_getpid (__NR_Linux + 38)
751#define __NR_sendfile (__NR_Linux + 39)
752#define __NR_socket (__NR_Linux + 40)
753#define __NR_connect (__NR_Linux + 41)
754#define __NR_accept (__NR_Linux + 42)
755#define __NR_sendto (__NR_Linux + 43)
756#define __NR_recvfrom (__NR_Linux + 44)
757#define __NR_sendmsg (__NR_Linux + 45)
758#define __NR_recvmsg (__NR_Linux + 46)
759#define __NR_shutdown (__NR_Linux + 47)
760#define __NR_bind (__NR_Linux + 48)
761#define __NR_listen (__NR_Linux + 49)
762#define __NR_getsockname (__NR_Linux + 50)
763#define __NR_getpeername (__NR_Linux + 51)
764#define __NR_socketpair (__NR_Linux + 52)
765#define __NR_setsockopt (__NR_Linux + 53)
766#define __NR_getsockopt (__NR_Linux + 54)
767#define __NR_clone (__NR_Linux + 55)
768#define __NR_fork (__NR_Linux + 56)
769#define __NR_execve (__NR_Linux + 57)
770#define __NR_exit (__NR_Linux + 58)
771#define __NR_wait4 (__NR_Linux + 59)
772#define __NR_kill (__NR_Linux + 60)
773#define __NR_uname (__NR_Linux + 61)
774#define __NR_semget (__NR_Linux + 62)
775#define __NR_semop (__NR_Linux + 63)
776#define __NR_semctl (__NR_Linux + 64)
777#define __NR_shmdt (__NR_Linux + 65)
778#define __NR_msgget (__NR_Linux + 66)
779#define __NR_msgsnd (__NR_Linux + 67)
780#define __NR_msgrcv (__NR_Linux + 68)
781#define __NR_msgctl (__NR_Linux + 69)
782#define __NR_fcntl (__NR_Linux + 70)
783#define __NR_flock (__NR_Linux + 71)
784#define __NR_fsync (__NR_Linux + 72)
785#define __NR_fdatasync (__NR_Linux + 73)
786#define __NR_truncate (__NR_Linux + 74)
787#define __NR_ftruncate (__NR_Linux + 75)
788#define __NR_getdents (__NR_Linux + 76)
789#define __NR_getcwd (__NR_Linux + 77)
790#define __NR_chdir (__NR_Linux + 78)
791#define __NR_fchdir (__NR_Linux + 79)
792#define __NR_rename (__NR_Linux + 80)
793#define __NR_mkdir (__NR_Linux + 81)
794#define __NR_rmdir (__NR_Linux + 82)
795#define __NR_creat (__NR_Linux + 83)
796#define __NR_link (__NR_Linux + 84)
797#define __NR_unlink (__NR_Linux + 85)
798#define __NR_symlink (__NR_Linux + 86)
799#define __NR_readlink (__NR_Linux + 87)
800#define __NR_chmod (__NR_Linux + 88)
801#define __NR_fchmod (__NR_Linux + 89)
802#define __NR_chown (__NR_Linux + 90)
803#define __NR_fchown (__NR_Linux + 91)
804#define __NR_lchown (__NR_Linux + 92)
805#define __NR_umask (__NR_Linux + 93)
806#define __NR_gettimeofday (__NR_Linux + 94)
807#define __NR_getrlimit (__NR_Linux + 95)
808#define __NR_getrusage (__NR_Linux + 96)
809#define __NR_sysinfo (__NR_Linux + 97)
810#define __NR_times (__NR_Linux + 98)
811#define __NR_ptrace (__NR_Linux + 99)
812#define __NR_getuid (__NR_Linux + 100)
813#define __NR_syslog (__NR_Linux + 101)
814#define __NR_getgid (__NR_Linux + 102)
815#define __NR_setuid (__NR_Linux + 103)
816#define __NR_setgid (__NR_Linux + 104)
817#define __NR_geteuid (__NR_Linux + 105)
818#define __NR_getegid (__NR_Linux + 106)
819#define __NR_setpgid (__NR_Linux + 107)
820#define __NR_getppid (__NR_Linux + 108)
821#define __NR_getpgrp (__NR_Linux + 109)
822#define __NR_setsid (__NR_Linux + 110)
823#define __NR_setreuid (__NR_Linux + 111)
824#define __NR_setregid (__NR_Linux + 112)
825#define __NR_getgroups (__NR_Linux + 113)
826#define __NR_setgroups (__NR_Linux + 114)
827#define __NR_setresuid (__NR_Linux + 115)
828#define __NR_getresuid (__NR_Linux + 116)
829#define __NR_setresgid (__NR_Linux + 117)
830#define __NR_getresgid (__NR_Linux + 118)
831#define __NR_getpgid (__NR_Linux + 119)
832#define __NR_setfsuid (__NR_Linux + 120)
833#define __NR_setfsgid (__NR_Linux + 121)
834#define __NR_getsid (__NR_Linux + 122)
835#define __NR_capget (__NR_Linux + 123)
836#define __NR_capset (__NR_Linux + 124)
837#define __NR_rt_sigpending (__NR_Linux + 125)
838#define __NR_rt_sigtimedwait (__NR_Linux + 126)
839#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
840#define __NR_rt_sigsuspend (__NR_Linux + 128)
841#define __NR_sigaltstack (__NR_Linux + 129)
842#define __NR_utime (__NR_Linux + 130)
843#define __NR_mknod (__NR_Linux + 131)
844#define __NR_personality (__NR_Linux + 132)
845#define __NR_ustat (__NR_Linux + 133)
846#define __NR_statfs (__NR_Linux + 134)
847#define __NR_fstatfs (__NR_Linux + 135)
848#define __NR_sysfs (__NR_Linux + 136)
849#define __NR_getpriority (__NR_Linux + 137)
850#define __NR_setpriority (__NR_Linux + 138)
851#define __NR_sched_setparam (__NR_Linux + 139)
852#define __NR_sched_getparam (__NR_Linux + 140)
853#define __NR_sched_setscheduler (__NR_Linux + 141)
854#define __NR_sched_getscheduler (__NR_Linux + 142)
855#define __NR_sched_get_priority_max (__NR_Linux + 143)
856#define __NR_sched_get_priority_min (__NR_Linux + 144)
857#define __NR_sched_rr_get_interval (__NR_Linux + 145)
858#define __NR_mlock (__NR_Linux + 146)
859#define __NR_munlock (__NR_Linux + 147)
860#define __NR_mlockall (__NR_Linux + 148)
861#define __NR_munlockall (__NR_Linux + 149)
862#define __NR_vhangup (__NR_Linux + 150)
863#define __NR_pivot_root (__NR_Linux + 151)
864#define __NR__sysctl (__NR_Linux + 152)
865#define __NR_prctl (__NR_Linux + 153)
866#define __NR_adjtimex (__NR_Linux + 154)
867#define __NR_setrlimit (__NR_Linux + 155)
868#define __NR_chroot (__NR_Linux + 156)
869#define __NR_sync (__NR_Linux + 157)
870#define __NR_acct (__NR_Linux + 158)
871#define __NR_settimeofday (__NR_Linux + 159)
872#define __NR_mount (__NR_Linux + 160)
873#define __NR_umount2 (__NR_Linux + 161)
874#define __NR_swapon (__NR_Linux + 162)
875#define __NR_swapoff (__NR_Linux + 163)
876#define __NR_reboot (__NR_Linux + 164)
877#define __NR_sethostname (__NR_Linux + 165)
878#define __NR_setdomainname (__NR_Linux + 166)
879#define __NR_create_module (__NR_Linux + 167)
880#define __NR_init_module (__NR_Linux + 168)
881#define __NR_delete_module (__NR_Linux + 169)
882#define __NR_get_kernel_syms (__NR_Linux + 170)
883#define __NR_query_module (__NR_Linux + 171)
884#define __NR_quotactl (__NR_Linux + 172)
885#define __NR_nfsservctl (__NR_Linux + 173)
886#define __NR_getpmsg (__NR_Linux + 174)
887#define __NR_putpmsg (__NR_Linux + 175)
888#define __NR_afs_syscall (__NR_Linux + 176)
889#define __NR_reserved177 (__NR_Linux + 177)
890#define __NR_gettid (__NR_Linux + 178)
891#define __NR_readahead (__NR_Linux + 179)
892#define __NR_setxattr (__NR_Linux + 180)
893#define __NR_lsetxattr (__NR_Linux + 181)
894#define __NR_fsetxattr (__NR_Linux + 182)
895#define __NR_getxattr (__NR_Linux + 183)
896#define __NR_lgetxattr (__NR_Linux + 184)
897#define __NR_fgetxattr (__NR_Linux + 185)
898#define __NR_listxattr (__NR_Linux + 186)
899#define __NR_llistxattr (__NR_Linux + 187)
900#define __NR_flistxattr (__NR_Linux + 188)
901#define __NR_removexattr (__NR_Linux + 189)
902#define __NR_lremovexattr (__NR_Linux + 190)
903#define __NR_fremovexattr (__NR_Linux + 191)
904#define __NR_tkill (__NR_Linux + 192)
905#define __NR_reserved193 (__NR_Linux + 193)
906#define __NR_futex (__NR_Linux + 194)
907#define __NR_sched_setaffinity (__NR_Linux + 195)
908#define __NR_sched_getaffinity (__NR_Linux + 196)
909#define __NR_cacheflush (__NR_Linux + 197)
910#define __NR_cachectl (__NR_Linux + 198)
911#define __NR_sysmips (__NR_Linux + 199)
912#define __NR_io_setup (__NR_Linux + 200)
913#define __NR_io_destroy (__NR_Linux + 201)
914#define __NR_io_getevents (__NR_Linux + 202)
915#define __NR_io_submit (__NR_Linux + 203)
916#define __NR_io_cancel (__NR_Linux + 204)
917#define __NR_exit_group (__NR_Linux + 205)
918#define __NR_lookup_dcookie (__NR_Linux + 206)
919#define __NR_epoll_create (__NR_Linux + 207)
920#define __NR_epoll_ctl (__NR_Linux + 208)
921#define __NR_epoll_wait (__NR_Linux + 209)
922#define __NR_remap_file_pages (__NR_Linux + 210)
923#define __NR_rt_sigreturn (__NR_Linux + 211)
924#define __NR_fcntl64 (__NR_Linux + 212)
925#define __NR_set_tid_address (__NR_Linux + 213)
926#define __NR_restart_syscall (__NR_Linux + 214)
927#define __NR_semtimedop (__NR_Linux + 215)
928#define __NR_fadvise64 (__NR_Linux + 216)
929#define __NR_statfs64 (__NR_Linux + 217)
930#define __NR_fstatfs64 (__NR_Linux + 218)
931#define __NR_sendfile64 (__NR_Linux + 219)
932#define __NR_timer_create (__NR_Linux + 220)
933#define __NR_timer_settime (__NR_Linux + 221)
934#define __NR_timer_gettime (__NR_Linux + 222)
935#define __NR_timer_getoverrun (__NR_Linux + 223)
936#define __NR_timer_delete (__NR_Linux + 224)
937#define __NR_clock_settime (__NR_Linux + 225)
938#define __NR_clock_gettime (__NR_Linux + 226)
939#define __NR_clock_getres (__NR_Linux + 227)
940#define __NR_clock_nanosleep (__NR_Linux + 228)
941#define __NR_tgkill (__NR_Linux + 229)
942#define __NR_utimes (__NR_Linux + 230)
943#define __NR_mbind (__NR_Linux + 231)
944#define __NR_get_mempolicy (__NR_Linux + 232)
945#define __NR_set_mempolicy (__NR_Linux + 233)
946#define __NR_mq_open (__NR_Linux + 234)
947#define __NR_mq_unlink (__NR_Linux + 235)
948#define __NR_mq_timedsend (__NR_Linux + 236)
949#define __NR_mq_timedreceive (__NR_Linux + 237)
950#define __NR_mq_notify (__NR_Linux + 238)
951#define __NR_mq_getsetattr (__NR_Linux + 239)
952#define __NR_vserver (__NR_Linux + 240)
953#define __NR_waitid (__NR_Linux + 241)
954/* #define __NR_sys_setaltroot (__NR_Linux + 242) */
955#define __NR_add_key (__NR_Linux + 243)
956#define __NR_request_key (__NR_Linux + 244)
957#define __NR_keyctl (__NR_Linux + 245)
958#define __NR_set_thread_area (__NR_Linux + 246)
959#define __NR_inotify_init (__NR_Linux + 247)
960#define __NR_inotify_add_watch (__NR_Linux + 248)
961#define __NR_inotify_rm_watch (__NR_Linux + 249)
962#define __NR_migrate_pages (__NR_Linux + 250)
963#define __NR_openat (__NR_Linux + 251)
964#define __NR_mkdirat (__NR_Linux + 252)
965#define __NR_mknodat (__NR_Linux + 253)
966#define __NR_fchownat (__NR_Linux + 254)
967#define __NR_futimesat (__NR_Linux + 255)
968#define __NR_newfstatat (__NR_Linux + 256)
969#define __NR_unlinkat (__NR_Linux + 257)
970#define __NR_renameat (__NR_Linux + 258)
971#define __NR_linkat (__NR_Linux + 259)
972#define __NR_symlinkat (__NR_Linux + 260)
973#define __NR_readlinkat (__NR_Linux + 261)
974#define __NR_fchmodat (__NR_Linux + 262)
975#define __NR_faccessat (__NR_Linux + 263)
976#define __NR_pselect6 (__NR_Linux + 264)
977#define __NR_ppoll (__NR_Linux + 265)
978#define __NR_unshare (__NR_Linux + 266)
979#define __NR_splice (__NR_Linux + 267)
980#define __NR_sync_file_range (__NR_Linux + 268)
981#define __NR_tee (__NR_Linux + 269)
982#define __NR_vmsplice (__NR_Linux + 270)
983#define __NR_move_pages (__NR_Linux + 271)
984#define __NR_set_robust_list (__NR_Linux + 272)
985#define __NR_get_robust_list (__NR_Linux + 273)
986#define __NR_kexec_load (__NR_Linux + 274)
987#define __NR_getcpu (__NR_Linux + 275)
988#define __NR_epoll_pwait (__NR_Linux + 276)
989#define __NR_ioprio_set (__NR_Linux + 277)
990#define __NR_ioprio_get (__NR_Linux + 278)
991#define __NR_utimensat (__NR_Linux + 279)
992#define __NR_signalfd (__NR_Linux + 280)
993#define __NR_timerfd (__NR_Linux + 281)
994#define __NR_eventfd (__NR_Linux + 282)
995#define __NR_fallocate (__NR_Linux + 283)
996#define __NR_timerfd_create (__NR_Linux + 284)
997#define __NR_timerfd_gettime (__NR_Linux + 285)
998#define __NR_timerfd_settime (__NR_Linux + 286)
999#define __NR_signalfd4 (__NR_Linux + 287)
1000#define __NR_eventfd2 (__NR_Linux + 288)
1001#define __NR_epoll_create1 (__NR_Linux + 289)
1002#define __NR_dup3 (__NR_Linux + 290)
1003#define __NR_pipe2 (__NR_Linux + 291)
1004#define __NR_inotify_init1 (__NR_Linux + 292)
1005#define __NR_preadv (__NR_Linux + 293)
1006#define __NR_pwritev (__NR_Linux + 294)
1007#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
1008#define __NR_perf_event_open (__NR_Linux + 296)
1009#define __NR_accept4 (__NR_Linux + 297)
1010#define __NR_recvmmsg (__NR_Linux + 298)
1011#define __NR_getdents64 (__NR_Linux + 299)
1012#define __NR_fanotify_init (__NR_Linux + 300)
1013#define __NR_fanotify_mark (__NR_Linux + 301)
1014#define __NR_prlimit64 (__NR_Linux + 302)
1015#define __NR_name_to_handle_at (__NR_Linux + 303)
1016#define __NR_open_by_handle_at (__NR_Linux + 304)
1017#define __NR_clock_adjtime (__NR_Linux + 305)
1018#define __NR_syncfs (__NR_Linux + 306)
1019#define __NR_sendmmsg (__NR_Linux + 307)
1020#define __NR_setns (__NR_Linux + 308)
1021#define __NR_process_vm_readv (__NR_Linux + 309)
1022#define __NR_process_vm_writev (__NR_Linux + 310)
1023#define __NR_kcmp (__NR_Linux + 311)
1024
1025/*
1026 * Offset of the last N32 flavoured syscall
1027 */
1028#define __NR_Linux_syscalls 311
1029
1030#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1031
1032#define __NR_N32_Linux 6000
1033#define __NR_N32_Linux_syscalls 311
1034
1035#ifdef __KERNEL__
1036 17
1037#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
1038 19
@@ -1089,5 +70,4 @@
1089 */ 70 */
1090#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall") 71#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall")
1091 72
1092#endif /* __KERNEL__ */
1093#endif /* _ASM_UNISTD_H */ 73#endif /* _ASM_UNISTD_H */
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
index baebb3da1d44..a1a0452ac185 100644
--- a/arch/mips/include/uapi/asm/Kbuild
+++ b/arch/mips/include/uapi/asm/Kbuild
@@ -1,3 +1,37 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += auxvec.h
5header-y += bitsperlong.h
6header-y += byteorder.h
7header-y += cachectl.h
8header-y += errno.h
9header-y += fcntl.h
10header-y += ioctl.h
11header-y += ioctls.h
12header-y += ipcbuf.h
13header-y += kvm_para.h
14header-y += mman.h
15header-y += msgbuf.h
16header-y += param.h
17header-y += poll.h
18header-y += posix_types.h
19header-y += ptrace.h
20header-y += resource.h
21header-y += sembuf.h
22header-y += setup.h
23header-y += sgidefs.h
24header-y += shmbuf.h
25header-y += sigcontext.h
26header-y += siginfo.h
27header-y += signal.h
28header-y += socket.h
29header-y += sockios.h
30header-y += stat.h
31header-y += statfs.h
32header-y += swab.h
33header-y += sysmips.h
34header-y += termbits.h
35header-y += termios.h
36header-y += types.h
37header-y += unistd.h
diff --git a/arch/mips/include/asm/auxvec.h b/arch/mips/include/uapi/asm/auxvec.h
index 7cf7f2d21943..7cf7f2d21943 100644
--- a/arch/mips/include/asm/auxvec.h
+++ b/arch/mips/include/uapi/asm/auxvec.h
diff --git a/arch/mips/include/asm/bitsperlong.h b/arch/mips/include/uapi/asm/bitsperlong.h
index 3e4c10a8e787..3e4c10a8e787 100644
--- a/arch/mips/include/asm/bitsperlong.h
+++ b/arch/mips/include/uapi/asm/bitsperlong.h
diff --git a/arch/mips/include/asm/byteorder.h b/arch/mips/include/uapi/asm/byteorder.h
index 9579051ff1c7..9579051ff1c7 100644
--- a/arch/mips/include/asm/byteorder.h
+++ b/arch/mips/include/uapi/asm/byteorder.h
diff --git a/arch/mips/include/asm/cachectl.h b/arch/mips/include/uapi/asm/cachectl.h
index f3ce721861d3..f3ce721861d3 100644
--- a/arch/mips/include/asm/cachectl.h
+++ b/arch/mips/include/uapi/asm/cachectl.h
diff --git a/arch/mips/include/uapi/asm/errno.h b/arch/mips/include/uapi/asm/errno.h
new file mode 100644
index 000000000000..bd67b15042ec
--- /dev/null
+++ b/arch/mips/include/uapi/asm/errno.h
@@ -0,0 +1,129 @@
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) 1995, 1999, 2001, 2002 by Ralf Baechle
7 */
8#ifndef _UAPI_ASM_ERRNO_H
9#define _UAPI_ASM_ERRNO_H
10
11/*
12 * These error numbers are intended to be MIPS ABI compatible
13 */
14
15#include <asm-generic/errno-base.h>
16
17#define ENOMSG 35 /* No message of desired type */
18#define EIDRM 36 /* Identifier removed */
19#define ECHRNG 37 /* Channel number out of range */
20#define EL2NSYNC 38 /* Level 2 not synchronized */
21#define EL3HLT 39 /* Level 3 halted */
22#define EL3RST 40 /* Level 3 reset */
23#define ELNRNG 41 /* Link number out of range */
24#define EUNATCH 42 /* Protocol driver not attached */
25#define ENOCSI 43 /* No CSI structure available */
26#define EL2HLT 44 /* Level 2 halted */
27#define EDEADLK 45 /* Resource deadlock would occur */
28#define ENOLCK 46 /* No record locks available */
29#define EBADE 50 /* Invalid exchange */
30#define EBADR 51 /* Invalid request descriptor */
31#define EXFULL 52 /* Exchange full */
32#define ENOANO 53 /* No anode */
33#define EBADRQC 54 /* Invalid request code */
34#define EBADSLT 55 /* Invalid slot */
35#define EDEADLOCK 56 /* File locking deadlock error */
36#define EBFONT 59 /* Bad font file format */
37#define ENOSTR 60 /* Device not a stream */
38#define ENODATA 61 /* No data available */
39#define ETIME 62 /* Timer expired */
40#define ENOSR 63 /* Out of streams resources */
41#define ENONET 64 /* Machine is not on the network */
42#define ENOPKG 65 /* Package not installed */
43#define EREMOTE 66 /* Object is remote */
44#define ENOLINK 67 /* Link has been severed */
45#define EADV 68 /* Advertise error */
46#define ESRMNT 69 /* Srmount error */
47#define ECOMM 70 /* Communication error on send */
48#define EPROTO 71 /* Protocol error */
49#define EDOTDOT 73 /* RFS specific error */
50#define EMULTIHOP 74 /* Multihop attempted */
51#define EBADMSG 77 /* Not a data message */
52#define ENAMETOOLONG 78 /* File name too long */
53#define EOVERFLOW 79 /* Value too large for defined data type */
54#define ENOTUNIQ 80 /* Name not unique on network */
55#define EBADFD 81 /* File descriptor in bad state */
56#define EREMCHG 82 /* Remote address changed */
57#define ELIBACC 83 /* Can not access a needed shared library */
58#define ELIBBAD 84 /* Accessing a corrupted shared library */
59#define ELIBSCN 85 /* .lib section in a.out corrupted */
60#define ELIBMAX 86 /* Attempting to link in too many shared libraries */
61#define ELIBEXEC 87 /* Cannot exec a shared library directly */
62#define EILSEQ 88 /* Illegal byte sequence */
63#define ENOSYS 89 /* Function not implemented */
64#define ELOOP 90 /* Too many symbolic links encountered */
65#define ERESTART 91 /* Interrupted system call should be restarted */
66#define ESTRPIPE 92 /* Streams pipe error */
67#define ENOTEMPTY 93 /* Directory not empty */
68#define EUSERS 94 /* Too many users */
69#define ENOTSOCK 95 /* Socket operation on non-socket */
70#define EDESTADDRREQ 96 /* Destination address required */
71#define EMSGSIZE 97 /* Message too long */
72#define EPROTOTYPE 98 /* Protocol wrong type for socket */
73#define ENOPROTOOPT 99 /* Protocol not available */
74#define EPROTONOSUPPORT 120 /* Protocol not supported */
75#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
76#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */
77#define EPFNOSUPPORT 123 /* Protocol family not supported */
78#define EAFNOSUPPORT 124 /* Address family not supported by protocol */
79#define EADDRINUSE 125 /* Address already in use */
80#define EADDRNOTAVAIL 126 /* Cannot assign requested address */
81#define ENETDOWN 127 /* Network is down */
82#define ENETUNREACH 128 /* Network is unreachable */
83#define ENETRESET 129 /* Network dropped connection because of reset */
84#define ECONNABORTED 130 /* Software caused connection abort */
85#define ECONNRESET 131 /* Connection reset by peer */
86#define ENOBUFS 132 /* No buffer space available */
87#define EISCONN 133 /* Transport endpoint is already connected */
88#define ENOTCONN 134 /* Transport endpoint is not connected */
89#define EUCLEAN 135 /* Structure needs cleaning */
90#define ENOTNAM 137 /* Not a XENIX named type file */
91#define ENAVAIL 138 /* No XENIX semaphores available */
92#define EISNAM 139 /* Is a named type file */
93#define EREMOTEIO 140 /* Remote I/O error */
94#define EINIT 141 /* Reserved */
95#define EREMDEV 142 /* Error 142 */
96#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */
97#define ETOOMANYREFS 144 /* Too many references: cannot splice */
98#define ETIMEDOUT 145 /* Connection timed out */
99#define ECONNREFUSED 146 /* Connection refused */
100#define EHOSTDOWN 147 /* Host is down */
101#define EHOSTUNREACH 148 /* No route to host */
102#define EWOULDBLOCK EAGAIN /* Operation would block */
103#define EALREADY 149 /* Operation already in progress */
104#define EINPROGRESS 150 /* Operation now in progress */
105#define ESTALE 151 /* Stale NFS file handle */
106#define ECANCELED 158 /* AIO operation canceled */
107
108/*
109 * These error are Linux extensions.
110 */
111#define ENOMEDIUM 159 /* No medium found */
112#define EMEDIUMTYPE 160 /* Wrong medium type */
113#define ENOKEY 161 /* Required key not available */
114#define EKEYEXPIRED 162 /* Key has expired */
115#define EKEYREVOKED 163 /* Key has been revoked */
116#define EKEYREJECTED 164 /* Key was rejected by service */
117
118/* for robust mutexes */
119#define EOWNERDEAD 165 /* Owner died */
120#define ENOTRECOVERABLE 166 /* State not recoverable */
121
122#define ERFKILL 167 /* Operation not possible due to RF-kill */
123
124#define EHWPOISON 168 /* Memory page has hardware error */
125
126#define EDQUOT 1133 /* Quota exceeded */
127
128
129#endif /* _UAPI_ASM_ERRNO_H */
diff --git a/arch/mips/include/asm/fcntl.h b/arch/mips/include/uapi/asm/fcntl.h
index 75eddedcfc3e..75eddedcfc3e 100644
--- a/arch/mips/include/asm/fcntl.h
+++ b/arch/mips/include/uapi/asm/fcntl.h
diff --git a/arch/mips/include/asm/ioctl.h b/arch/mips/include/uapi/asm/ioctl.h
index c515a1a4c47c..c515a1a4c47c 100644
--- a/arch/mips/include/asm/ioctl.h
+++ b/arch/mips/include/uapi/asm/ioctl.h
diff --git a/arch/mips/include/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
index 92403c3d6007..92403c3d6007 100644
--- a/arch/mips/include/asm/ioctls.h
+++ b/arch/mips/include/uapi/asm/ioctls.h
diff --git a/arch/mips/include/asm/ipcbuf.h b/arch/mips/include/uapi/asm/ipcbuf.h
index 84c7e51cb6d0..84c7e51cb6d0 100644
--- a/arch/mips/include/asm/ipcbuf.h
+++ b/arch/mips/include/uapi/asm/ipcbuf.h
diff --git a/arch/mips/include/asm/kvm_para.h b/arch/mips/include/uapi/asm/kvm_para.h
index 14fab8f0b957..14fab8f0b957 100644
--- a/arch/mips/include/asm/kvm_para.h
+++ b/arch/mips/include/uapi/asm/kvm_para.h
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/uapi/asm/mman.h
index 46d3da0d4b92..46d3da0d4b92 100644
--- a/arch/mips/include/asm/mman.h
+++ b/arch/mips/include/uapi/asm/mman.h
diff --git a/arch/mips/include/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
index 0d6c7f14de31..0d6c7f14de31 100644
--- a/arch/mips/include/asm/msgbuf.h
+++ b/arch/mips/include/uapi/asm/msgbuf.h
diff --git a/arch/mips/include/asm/param.h b/arch/mips/include/uapi/asm/param.h
index da3920fce9ad..da3920fce9ad 100644
--- a/arch/mips/include/asm/param.h
+++ b/arch/mips/include/uapi/asm/param.h
diff --git a/arch/mips/include/asm/poll.h b/arch/mips/include/uapi/asm/poll.h
index 47b952080431..47b952080431 100644
--- a/arch/mips/include/asm/poll.h
+++ b/arch/mips/include/uapi/asm/poll.h
diff --git a/arch/mips/include/asm/posix_types.h b/arch/mips/include/uapi/asm/posix_types.h
index fa03ec3fbf89..fa03ec3fbf89 100644
--- a/arch/mips/include/asm/posix_types.h
+++ b/arch/mips/include/uapi/asm/posix_types.h
diff --git a/arch/mips/include/uapi/asm/ptrace.h b/arch/mips/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..1bc1f52f40d7
--- /dev/null
+++ b/arch/mips/include/uapi/asm/ptrace.h
@@ -0,0 +1,116 @@
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) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_PTRACE_H
10#define _UAPI_ASM_PTRACE_H
11
12/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
13#define FPR_BASE 32
14#define PC 64
15#define CAUSE 65
16#define BADVADDR 66
17#define MMHI 67
18#define MMLO 68
19#define FPC_CSR 69
20#define FPC_EIR 70
21#define DSP_BASE 71 /* 3 more hi / lo register pairs */
22#define DSP_CONTROL 77
23#define ACX 78
24
25/*
26 * This struct defines the way the registers are stored on the stack during a
27 * system call/exception. As usual the registers k0/k1 aren't being saved.
28 */
29struct pt_regs {
30#ifdef CONFIG_32BIT
31 /* Pad bytes for argument save space on the stack. */
32 unsigned long pad0[6];
33#endif
34
35 /* Saved main processor registers. */
36 unsigned long regs[32];
37
38 /* Saved special registers. */
39 unsigned long cp0_status;
40 unsigned long hi;
41 unsigned long lo;
42#ifdef CONFIG_CPU_HAS_SMARTMIPS
43 unsigned long acx;
44#endif
45 unsigned long cp0_badvaddr;
46 unsigned long cp0_cause;
47 unsigned long cp0_epc;
48#ifdef CONFIG_MIPS_MT_SMTC
49 unsigned long cp0_tcstatus;
50#endif /* CONFIG_MIPS_MT_SMTC */
51#ifdef CONFIG_CPU_CAVIUM_OCTEON
52 unsigned long long mpl[3]; /* MTM{0,1,2} */
53 unsigned long long mtp[3]; /* MTP{0,1,2} */
54#endif
55} __attribute__ ((aligned (8)));
56
57/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
58#define PTRACE_GETREGS 12
59#define PTRACE_SETREGS 13
60#define PTRACE_GETFPREGS 14
61#define PTRACE_SETFPREGS 15
62/* #define PTRACE_GETFPXREGS 18 */
63/* #define PTRACE_SETFPXREGS 19 */
64
65#define PTRACE_OLDSETOPTIONS 21
66
67#define PTRACE_GET_THREAD_AREA 25
68#define PTRACE_SET_THREAD_AREA 26
69
70/* Calls to trace a 64bit program from a 32bit program. */
71#define PTRACE_PEEKTEXT_3264 0xc0
72#define PTRACE_PEEKDATA_3264 0xc1
73#define PTRACE_POKETEXT_3264 0xc2
74#define PTRACE_POKEDATA_3264 0xc3
75#define PTRACE_GET_THREAD_AREA_3264 0xc4
76
77/* Read and write watchpoint registers. */
78enum pt_watch_style {
79 pt_watch_style_mips32,
80 pt_watch_style_mips64
81};
82struct mips32_watch_regs {
83 unsigned int watchlo[8];
84 /* Lower 16 bits of watchhi. */
85 unsigned short watchhi[8];
86 /* Valid mask and I R W bits.
87 * bit 0 -- 1 if W bit is usable.
88 * bit 1 -- 1 if R bit is usable.
89 * bit 2 -- 1 if I bit is usable.
90 * bits 3 - 11 -- Valid watchhi mask bits.
91 */
92 unsigned short watch_masks[8];
93 /* The number of valid watch register pairs. */
94 unsigned int num_valid;
95} __attribute__((aligned(8)));
96
97struct mips64_watch_regs {
98 unsigned long long watchlo[8];
99 unsigned short watchhi[8];
100 unsigned short watch_masks[8];
101 unsigned int num_valid;
102} __attribute__((aligned(8)));
103
104struct pt_watch_regs {
105 enum pt_watch_style style;
106 union {
107 struct mips32_watch_regs mips32;
108 struct mips64_watch_regs mips64;
109 };
110};
111
112#define PTRACE_GET_WATCH_REGS 0xd0
113#define PTRACE_SET_WATCH_REGS 0xd1
114
115
116#endif /* _UAPI_ASM_PTRACE_H */
diff --git a/arch/mips/include/asm/resource.h b/arch/mips/include/uapi/asm/resource.h
index 87cb3085269c..87cb3085269c 100644
--- a/arch/mips/include/asm/resource.h
+++ b/arch/mips/include/uapi/asm/resource.h
diff --git a/arch/mips/include/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
index 7281a4decaa0..7281a4decaa0 100644
--- a/arch/mips/include/asm/sembuf.h
+++ b/arch/mips/include/uapi/asm/sembuf.h
diff --git a/arch/mips/include/uapi/asm/setup.h b/arch/mips/include/uapi/asm/setup.h
new file mode 100644
index 000000000000..93f237bb1353
--- /dev/null
+++ b/arch/mips/include/uapi/asm/setup.h
@@ -0,0 +1,7 @@
1#ifndef _UAPI_MIPS_SETUP_H
2#define _UAPI_MIPS_SETUP_H
3
4#define COMMAND_LINE_SIZE 4096
5
6
7#endif /* _UAPI_MIPS_SETUP_H */
diff --git a/arch/mips/include/asm/sgidefs.h b/arch/mips/include/uapi/asm/sgidefs.h
index 876442fcfb32..876442fcfb32 100644
--- a/arch/mips/include/asm/sgidefs.h
+++ b/arch/mips/include/uapi/asm/sgidefs.h
diff --git a/arch/mips/include/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
index f994438277bf..f994438277bf 100644
--- a/arch/mips/include/asm/shmbuf.h
+++ b/arch/mips/include/uapi/asm/shmbuf.h
diff --git a/arch/mips/include/uapi/asm/sigcontext.h b/arch/mips/include/uapi/asm/sigcontext.h
new file mode 100644
index 000000000000..6c9906f59c6e
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sigcontext.h
@@ -0,0 +1,78 @@
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, 1997, 1999 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGCONTEXT_H
10#define _UAPI_ASM_SIGCONTEXT_H
11
12#include <linux/types.h>
13#include <asm/sgidefs.h>
14
15#if _MIPS_SIM == _MIPS_SIM_ABI32
16
17/*
18 * Keep this struct definition in sync with the sigcontext fragment
19 * in arch/mips/tools/offset.c
20 */
21struct sigcontext {
22 unsigned int sc_regmask; /* Unused */
23 unsigned int sc_status; /* Unused */
24 unsigned long long sc_pc;
25 unsigned long long sc_regs[32];
26 unsigned long long sc_fpregs[32];
27 unsigned int sc_acx; /* Was sc_ownedfp */
28 unsigned int sc_fpc_csr;
29 unsigned int sc_fpc_eir; /* Unused */
30 unsigned int sc_used_math;
31 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
32 unsigned long long sc_mdhi;
33 unsigned long long sc_mdlo;
34 unsigned long sc_hi1; /* Was sc_cause */
35 unsigned long sc_lo1; /* Was sc_badvaddr */
36 unsigned long sc_hi2; /* Was sc_sigset[4] */
37 unsigned long sc_lo2;
38 unsigned long sc_hi3;
39 unsigned long sc_lo3;
40};
41
42#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
43
44#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
45
46#include <linux/posix_types.h>
47/*
48 * Keep this struct definition in sync with the sigcontext fragment
49 * in arch/mips/tools/offset.c
50 *
51 * Warning: this structure illdefined with sc_badvaddr being just an unsigned
52 * int so it was changed to unsigned long in 2.6.0-test1. This may break
53 * binary compatibility - no prisoners.
54 * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
55 * entries, add sc_dsp and sc_reserved for padding. No prisoners.
56 */
57struct sigcontext {
58 __u64 sc_regs[32];
59 __u64 sc_fpregs[32];
60 __u64 sc_mdhi;
61 __u64 sc_hi1;
62 __u64 sc_hi2;
63 __u64 sc_hi3;
64 __u64 sc_mdlo;
65 __u64 sc_lo1;
66 __u64 sc_lo2;
67 __u64 sc_lo3;
68 __u64 sc_pc;
69 __u32 sc_fpc_csr;
70 __u32 sc_used_math;
71 __u32 sc_dsp;
72 __u32 sc_reserved;
73};
74
75
76#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
77
78#endif /* _UAPI_ASM_SIGCONTEXT_H */
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
new file mode 100644
index 000000000000..73446508d846
--- /dev/null
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -0,0 +1,114 @@
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) 1998, 1999, 2001, 2003 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGINFO_H
10#define _UAPI_ASM_SIGINFO_H
11
12
13#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int))
14#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
15
16#define HAVE_ARCH_SIGINFO_T
17
18/*
19 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
20 * by design ...
21 */
22#define HAVE_ARCH_COPY_SIGINFO
23struct siginfo;
24
25/*
26 * Careful to keep union _sifields from shifting ...
27 */
28#ifdef CONFIG_32BIT
29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
30#endif
31#ifdef CONFIG_64BIT
32#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
33#endif
34
35#include <asm-generic/siginfo.h>
36
37typedef struct siginfo {
38 int si_signo;
39 int si_code;
40 int si_errno;
41 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
42
43 union {
44 int _pad[SI_PAD_SIZE];
45
46 /* kill() */
47 struct {
48 pid_t _pid; /* sender's pid */
49 __ARCH_SI_UID_T _uid; /* sender's uid */
50 } _kill;
51
52 /* POSIX.1b timers */
53 struct {
54 timer_t _tid; /* timer id */
55 int _overrun; /* overrun count */
56 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
57 sigval_t _sigval; /* same as below */
58 int _sys_private; /* not to be passed to user */
59 } _timer;
60
61 /* POSIX.1b signals */
62 struct {
63 pid_t _pid; /* sender's pid */
64 __ARCH_SI_UID_T _uid; /* sender's uid */
65 sigval_t _sigval;
66 } _rt;
67
68 /* SIGCHLD */
69 struct {
70 pid_t _pid; /* which child */
71 __ARCH_SI_UID_T _uid; /* sender's uid */
72 int _status; /* exit code */
73 clock_t _utime;
74 clock_t _stime;
75 } _sigchld;
76
77 /* IRIX SIGCHLD */
78 struct {
79 pid_t _pid; /* which child */
80 clock_t _utime;
81 int _status; /* exit code */
82 clock_t _stime;
83 } _irix_sigchld;
84
85 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
86 struct {
87 void __user *_addr; /* faulting insn/memory ref. */
88#ifdef __ARCH_SI_TRAPNO
89 int _trapno; /* TRAP # which caused the signal */
90#endif
91 short _addr_lsb;
92 } _sigfault;
93
94 /* SIGPOLL, SIGXFSZ (To do ...) */
95 struct {
96 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
97 int _fd;
98 } _sigpoll;
99 } _sifields;
100} siginfo_t;
101
102/*
103 * si_code values
104 * Again these have been chosen to be IRIX compatible.
105 */
106#undef SI_ASYNCIO
107#undef SI_TIMER
108#undef SI_MESGQ
109#define SI_ASYNCIO -2 /* sent by AIO completion */
110#define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
111#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
112
113
114#endif /* _UAPI_ASM_SIGINFO_H */
diff --git a/arch/mips/include/uapi/asm/signal.h b/arch/mips/include/uapi/asm/signal.h
new file mode 100644
index 000000000000..3f1237c6c80e
--- /dev/null
+++ b/arch/mips/include/uapi/asm/signal.h
@@ -0,0 +1,123 @@
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) 1995, 96, 97, 98, 99, 2003 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGNAL_H
10#define _UAPI_ASM_SIGNAL_H
11
12#include <linux/types.h>
13
14#define _NSIG 128
15#define _NSIG_BPW (sizeof(unsigned long) * 8)
16#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
17
18typedef struct {
19 unsigned long sig[_NSIG_WORDS];
20} sigset_t;
21
22typedef unsigned long old_sigset_t; /* at least 32 bits */
23
24#define SIGHUP 1 /* Hangup (POSIX). */
25#define SIGINT 2 /* Interrupt (ANSI). */
26#define SIGQUIT 3 /* Quit (POSIX). */
27#define SIGILL 4 /* Illegal instruction (ANSI). */
28#define SIGTRAP 5 /* Trace trap (POSIX). */
29#define SIGIOT 6 /* IOT trap (4.2 BSD). */
30#define SIGABRT SIGIOT /* Abort (ANSI). */
31#define SIGEMT 7
32#define SIGFPE 8 /* Floating-point exception (ANSI). */
33#define SIGKILL 9 /* Kill, unblockable (POSIX). */
34#define SIGBUS 10 /* BUS error (4.2 BSD). */
35#define SIGSEGV 11 /* Segmentation violation (ANSI). */
36#define SIGSYS 12
37#define SIGPIPE 13 /* Broken pipe (POSIX). */
38#define SIGALRM 14 /* Alarm clock (POSIX). */
39#define SIGTERM 15 /* Termination (ANSI). */
40#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
41#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
42#define SIGCHLD 18 /* Child status has changed (POSIX). */
43#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
44#define SIGPWR 19 /* Power failure restart (System V). */
45#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
46#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
47#define SIGIO 22 /* I/O now possible (4.2 BSD). */
48#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
49#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
50#define SIGTSTP 24 /* Keyboard stop (POSIX). */
51#define SIGCONT 25 /* Continue (POSIX). */
52#define SIGTTIN 26 /* Background read from tty (POSIX). */
53#define SIGTTOU 27 /* Background write to tty (POSIX). */
54#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
55#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
56#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
57#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
58
59/* These should not be considered constants from userland. */
60#define SIGRTMIN 32
61#define SIGRTMAX _NSIG
62
63/*
64 * SA_FLAGS values:
65 *
66 * SA_ONSTACK indicates that a registered stack_t will be used.
67 * SA_RESTART flag to get restarting signals (which were the default long ago)
68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69 * SA_RESETHAND clears the handler when the signal is delivered.
70 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
71 * SA_NODEFER prevents the current signal from being masked in the handler.
72 *
73 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
74 * Unix names RESETHAND and NODEFER respectively.
75 */
76#define SA_ONSTACK 0x08000000
77#define SA_RESETHAND 0x80000000
78#define SA_RESTART 0x10000000
79#define SA_SIGINFO 0x00000008
80#define SA_NODEFER 0x40000000
81#define SA_NOCLDWAIT 0x00010000
82#define SA_NOCLDSTOP 0x00000001
83
84#define SA_NOMASK SA_NODEFER
85#define SA_ONESHOT SA_RESETHAND
86
87#define SA_RESTORER 0x04000000 /* Only for o32 */
88
89/*
90 * sigaltstack controls
91 */
92#define SS_ONSTACK 1
93#define SS_DISABLE 2
94
95#define MINSIGSTKSZ 2048
96#define SIGSTKSZ 8192
97
98
99#define SIG_BLOCK 1 /* for blocking signals */
100#define SIG_UNBLOCK 2 /* for unblocking signals */
101#define SIG_SETMASK 3 /* for setting the signal mask */
102
103#include <asm-generic/signal-defs.h>
104
105struct sigaction {
106 unsigned int sa_flags;
107 __sighandler_t sa_handler;
108 sigset_t sa_mask;
109};
110
111struct k_sigaction {
112 struct sigaction sa;
113};
114
115/* IRIX compatible stack_t */
116typedef struct sigaltstack {
117 void __user *ss_sp;
118 size_t ss_size;
119 int ss_flags;
120} stack_t;
121
122
123#endif /* _UAPI_ASM_SIGNAL_H */
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
new file mode 100644
index 000000000000..c5ed59549cb8
--- /dev/null
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -0,0 +1,93 @@
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) 1997, 1999, 2000, 2001 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SOCKET_H
10#define _UAPI_ASM_SOCKET_H
11
12#include <asm/sockios.h>
13
14/*
15 * For setsockopt(2)
16 *
17 * This defines are ABI conformant as far as Linux supports these ...
18 */
19#define SOL_SOCKET 0xffff
20
21#define SO_DEBUG 0x0001 /* Record debugging information. */
22#define SO_REUSEADDR 0x0004 /* Allow reuse of local addresses. */
23#define SO_KEEPALIVE 0x0008 /* Keep connections alive and send
24 SIGPIPE when they die. */
25#define SO_DONTROUTE 0x0010 /* Don't do local routing. */
26#define SO_BROADCAST 0x0020 /* Allow transmission of
27 broadcast messages. */
28#define SO_LINGER 0x0080 /* Block on close of a reliable
29 socket to transmit pending data. */
30#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */
31#if 0
32To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
33#endif
34
35#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */
36#define SO_STYLE SO_TYPE /* Synonym */
37#define SO_ERROR 0x1007 /* get error status and clear */
38#define SO_SNDBUF 0x1001 /* Send buffer size. */
39#define SO_RCVBUF 0x1002 /* Receive buffer. */
40#define SO_SNDLOWAT 0x1003 /* send low-water mark */
41#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
42#define SO_SNDTIMEO 0x1005 /* send timeout */
43#define SO_RCVTIMEO 0x1006 /* receive timeout */
44#define SO_ACCEPTCONN 0x1009
45#define SO_PROTOCOL 0x1028 /* protocol type */
46#define SO_DOMAIN 0x1029 /* domain/socket family */
47
48/* linux-specific, might as well be the same as on i386 */
49#define SO_NO_CHECK 11
50#define SO_PRIORITY 12
51#define SO_BSDCOMPAT 14
52
53#define SO_PASSCRED 17
54#define SO_PEERCRED 18
55
56/* Security levels - as per NRL IPv6 - don't actually do anything */
57#define SO_SECURITY_AUTHENTICATION 22
58#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
59#define SO_SECURITY_ENCRYPTION_NETWORK 24
60
61#define SO_BINDTODEVICE 25
62
63/* Socket filtering */
64#define SO_ATTACH_FILTER 26
65#define SO_DETACH_FILTER 27
66
67#define SO_PEERNAME 28
68#define SO_TIMESTAMP 29
69#define SCM_TIMESTAMP SO_TIMESTAMP
70
71#define SO_PEERSEC 30
72#define SO_SNDBUFFORCE 31
73#define SO_RCVBUFFORCE 33
74#define SO_PASSSEC 34
75#define SO_TIMESTAMPNS 35
76#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
77
78#define SO_MARK 36
79
80#define SO_TIMESTAMPING 37
81#define SCM_TIMESTAMPING SO_TIMESTAMPING
82
83#define SO_RXQ_OVFL 40
84
85#define SO_WIFI_STATUS 41
86#define SCM_WIFI_STATUS SO_WIFI_STATUS
87#define SO_PEEK_OFF 42
88
89/* Instruct lower device to use last 4-bytes of skb data as FCS */
90#define SO_NOFCS 43
91
92
93#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mips/include/asm/sockios.h b/arch/mips/include/uapi/asm/sockios.h
index ed1a5f78d22f..ed1a5f78d22f 100644
--- a/arch/mips/include/asm/sockios.h
+++ b/arch/mips/include/uapi/asm/sockios.h
diff --git a/arch/mips/include/asm/stat.h b/arch/mips/include/uapi/asm/stat.h
index fe9a4c3ec5a1..fe9a4c3ec5a1 100644
--- a/arch/mips/include/asm/stat.h
+++ b/arch/mips/include/uapi/asm/stat.h
diff --git a/arch/mips/include/asm/statfs.h b/arch/mips/include/uapi/asm/statfs.h
index 0f805c7a42a5..0f805c7a42a5 100644
--- a/arch/mips/include/asm/statfs.h
+++ b/arch/mips/include/uapi/asm/statfs.h
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/uapi/asm/swab.h
index 97c2f81b4b43..97c2f81b4b43 100644
--- a/arch/mips/include/asm/swab.h
+++ b/arch/mips/include/uapi/asm/swab.h
diff --git a/arch/mips/include/asm/sysmips.h b/arch/mips/include/uapi/asm/sysmips.h
index 4f47b7d6a5f7..4f47b7d6a5f7 100644
--- a/arch/mips/include/asm/sysmips.h
+++ b/arch/mips/include/uapi/asm/sysmips.h
diff --git a/arch/mips/include/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
index 76630b396fac..76630b396fac 100644
--- a/arch/mips/include/asm/termbits.h
+++ b/arch/mips/include/uapi/asm/termbits.h
diff --git a/arch/mips/include/uapi/asm/termios.h b/arch/mips/include/uapi/asm/termios.h
new file mode 100644
index 000000000000..574fbdfb7202
--- /dev/null
+++ b/arch/mips/include/uapi/asm/termios.h
@@ -0,0 +1,80 @@
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) 1995, 1996, 2000, 2001 by Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_TERMIOS_H
10#define _UAPI_ASM_TERMIOS_H
11
12#include <linux/errno.h>
13#include <asm/termbits.h>
14#include <asm/ioctls.h>
15
16struct sgttyb {
17 char sg_ispeed;
18 char sg_ospeed;
19 char sg_erase;
20 char sg_kill;
21 int sg_flags; /* SGI special - int, not short */
22};
23
24struct tchars {
25 char t_intrc;
26 char t_quitc;
27 char t_startc;
28 char t_stopc;
29 char t_eofc;
30 char t_brkc;
31};
32
33struct ltchars {
34 char t_suspc; /* stop process signal */
35 char t_dsuspc; /* delayed stop process signal */
36 char t_rprntc; /* reprint line */
37 char t_flushc; /* flush output (toggles) */
38 char t_werasc; /* word erase */
39 char t_lnextc; /* literal next character */
40};
41
42/* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source
43 compatibility anyway ... */
44
45struct winsize {
46 unsigned short ws_row;
47 unsigned short ws_col;
48 unsigned short ws_xpixel;
49 unsigned short ws_ypixel;
50};
51
52#define NCC 8
53struct termio {
54 unsigned short c_iflag; /* input mode flags */
55 unsigned short c_oflag; /* output mode flags */
56 unsigned short c_cflag; /* control mode flags */
57 unsigned short c_lflag; /* local mode flags */
58 char c_line; /* line discipline */
59 unsigned char c_cc[NCCS]; /* control characters */
60};
61
62
63/* modem lines */
64#define TIOCM_LE 0x001 /* line enable */
65#define TIOCM_DTR 0x002 /* data terminal ready */
66#define TIOCM_RTS 0x004 /* request to send */
67#define TIOCM_ST 0x010 /* secondary transmit */
68#define TIOCM_SR 0x020 /* secondary receive */
69#define TIOCM_CTS 0x040 /* clear to send */
70#define TIOCM_CAR 0x100 /* carrier detect */
71#define TIOCM_CD TIOCM_CAR
72#define TIOCM_RNG 0x200 /* ring */
73#define TIOCM_RI TIOCM_RNG
74#define TIOCM_DSR 0x400 /* data set ready */
75#define TIOCM_OUT1 0x2000
76#define TIOCM_OUT2 0x4000
77#define TIOCM_LOOP 0x8000
78
79
80#endif /* _UAPI_ASM_TERMIOS_H */
diff --git a/arch/mips/include/uapi/asm/types.h b/arch/mips/include/uapi/asm/types.h
new file mode 100644
index 000000000000..7ac9d0baad84
--- /dev/null
+++ b/arch/mips/include/uapi/asm/types.h
@@ -0,0 +1,27 @@
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) 1994, 1995, 1996, 1999 by Ralf Baechle
7 * Copyright (C) 2008 Wind River Systems,
8 * written by Ralf Baechle
9 * Copyright (C) 1999 Silicon Graphics, Inc.
10 */
11#ifndef _UAPI_ASM_TYPES_H
12#define _UAPI_ASM_TYPES_H
13
14/*
15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes.
17 */
18#ifndef __KERNEL__
19# if _MIPS_SZLONG == 64
20# include <asm-generic/int-l64.h>
21# else
22# include <asm-generic/int-ll64.h>
23# endif
24#endif
25
26
27#endif /* _UAPI_ASM_TYPES_H */
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..cc98a9dcb01b
--- /dev/null
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -0,0 +1,1035 @@
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) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 *
9 * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
10 * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
11 */
12#ifndef _UAPI_ASM_UNISTD_H
13#define _UAPI_ASM_UNISTD_H
14
15#include <asm/sgidefs.h>
16
17#if _MIPS_SIM == _MIPS_SIM_ABI32
18
19/*
20 * Linux o32 style syscalls are in the range from 4000 to 4999.
21 */
22#define __NR_Linux 4000
23#define __NR_syscall (__NR_Linux + 0)
24#define __NR_exit (__NR_Linux + 1)
25#define __NR_fork (__NR_Linux + 2)
26#define __NR_read (__NR_Linux + 3)
27#define __NR_write (__NR_Linux + 4)
28#define __NR_open (__NR_Linux + 5)
29#define __NR_close (__NR_Linux + 6)
30#define __NR_waitpid (__NR_Linux + 7)
31#define __NR_creat (__NR_Linux + 8)
32#define __NR_link (__NR_Linux + 9)
33#define __NR_unlink (__NR_Linux + 10)
34#define __NR_execve (__NR_Linux + 11)
35#define __NR_chdir (__NR_Linux + 12)
36#define __NR_time (__NR_Linux + 13)
37#define __NR_mknod (__NR_Linux + 14)
38#define __NR_chmod (__NR_Linux + 15)
39#define __NR_lchown (__NR_Linux + 16)
40#define __NR_break (__NR_Linux + 17)
41#define __NR_unused18 (__NR_Linux + 18)
42#define __NR_lseek (__NR_Linux + 19)
43#define __NR_getpid (__NR_Linux + 20)
44#define __NR_mount (__NR_Linux + 21)
45#define __NR_umount (__NR_Linux + 22)
46#define __NR_setuid (__NR_Linux + 23)
47#define __NR_getuid (__NR_Linux + 24)
48#define __NR_stime (__NR_Linux + 25)
49#define __NR_ptrace (__NR_Linux + 26)
50#define __NR_alarm (__NR_Linux + 27)
51#define __NR_unused28 (__NR_Linux + 28)
52#define __NR_pause (__NR_Linux + 29)
53#define __NR_utime (__NR_Linux + 30)
54#define __NR_stty (__NR_Linux + 31)
55#define __NR_gtty (__NR_Linux + 32)
56#define __NR_access (__NR_Linux + 33)
57#define __NR_nice (__NR_Linux + 34)
58#define __NR_ftime (__NR_Linux + 35)
59#define __NR_sync (__NR_Linux + 36)
60#define __NR_kill (__NR_Linux + 37)
61#define __NR_rename (__NR_Linux + 38)
62#define __NR_mkdir (__NR_Linux + 39)
63#define __NR_rmdir (__NR_Linux + 40)
64#define __NR_dup (__NR_Linux + 41)
65#define __NR_pipe (__NR_Linux + 42)
66#define __NR_times (__NR_Linux + 43)
67#define __NR_prof (__NR_Linux + 44)
68#define __NR_brk (__NR_Linux + 45)
69#define __NR_setgid (__NR_Linux + 46)
70#define __NR_getgid (__NR_Linux + 47)
71#define __NR_signal (__NR_Linux + 48)
72#define __NR_geteuid (__NR_Linux + 49)
73#define __NR_getegid (__NR_Linux + 50)
74#define __NR_acct (__NR_Linux + 51)
75#define __NR_umount2 (__NR_Linux + 52)
76#define __NR_lock (__NR_Linux + 53)
77#define __NR_ioctl (__NR_Linux + 54)
78#define __NR_fcntl (__NR_Linux + 55)
79#define __NR_mpx (__NR_Linux + 56)
80#define __NR_setpgid (__NR_Linux + 57)
81#define __NR_ulimit (__NR_Linux + 58)
82#define __NR_unused59 (__NR_Linux + 59)
83#define __NR_umask (__NR_Linux + 60)
84#define __NR_chroot (__NR_Linux + 61)
85#define __NR_ustat (__NR_Linux + 62)
86#define __NR_dup2 (__NR_Linux + 63)
87#define __NR_getppid (__NR_Linux + 64)
88#define __NR_getpgrp (__NR_Linux + 65)
89#define __NR_setsid (__NR_Linux + 66)
90#define __NR_sigaction (__NR_Linux + 67)
91#define __NR_sgetmask (__NR_Linux + 68)
92#define __NR_ssetmask (__NR_Linux + 69)
93#define __NR_setreuid (__NR_Linux + 70)
94#define __NR_setregid (__NR_Linux + 71)
95#define __NR_sigsuspend (__NR_Linux + 72)
96#define __NR_sigpending (__NR_Linux + 73)
97#define __NR_sethostname (__NR_Linux + 74)
98#define __NR_setrlimit (__NR_Linux + 75)
99#define __NR_getrlimit (__NR_Linux + 76)
100#define __NR_getrusage (__NR_Linux + 77)
101#define __NR_gettimeofday (__NR_Linux + 78)
102#define __NR_settimeofday (__NR_Linux + 79)
103#define __NR_getgroups (__NR_Linux + 80)
104#define __NR_setgroups (__NR_Linux + 81)
105#define __NR_reserved82 (__NR_Linux + 82)
106#define __NR_symlink (__NR_Linux + 83)
107#define __NR_unused84 (__NR_Linux + 84)
108#define __NR_readlink (__NR_Linux + 85)
109#define __NR_uselib (__NR_Linux + 86)
110#define __NR_swapon (__NR_Linux + 87)
111#define __NR_reboot (__NR_Linux + 88)
112#define __NR_readdir (__NR_Linux + 89)
113#define __NR_mmap (__NR_Linux + 90)
114#define __NR_munmap (__NR_Linux + 91)
115#define __NR_truncate (__NR_Linux + 92)
116#define __NR_ftruncate (__NR_Linux + 93)
117#define __NR_fchmod (__NR_Linux + 94)
118#define __NR_fchown (__NR_Linux + 95)
119#define __NR_getpriority (__NR_Linux + 96)
120#define __NR_setpriority (__NR_Linux + 97)
121#define __NR_profil (__NR_Linux + 98)
122#define __NR_statfs (__NR_Linux + 99)
123#define __NR_fstatfs (__NR_Linux + 100)
124#define __NR_ioperm (__NR_Linux + 101)
125#define __NR_socketcall (__NR_Linux + 102)
126#define __NR_syslog (__NR_Linux + 103)
127#define __NR_setitimer (__NR_Linux + 104)
128#define __NR_getitimer (__NR_Linux + 105)
129#define __NR_stat (__NR_Linux + 106)
130#define __NR_lstat (__NR_Linux + 107)
131#define __NR_fstat (__NR_Linux + 108)
132#define __NR_unused109 (__NR_Linux + 109)
133#define __NR_iopl (__NR_Linux + 110)
134#define __NR_vhangup (__NR_Linux + 111)
135#define __NR_idle (__NR_Linux + 112)
136#define __NR_vm86 (__NR_Linux + 113)
137#define __NR_wait4 (__NR_Linux + 114)
138#define __NR_swapoff (__NR_Linux + 115)
139#define __NR_sysinfo (__NR_Linux + 116)
140#define __NR_ipc (__NR_Linux + 117)
141#define __NR_fsync (__NR_Linux + 118)
142#define __NR_sigreturn (__NR_Linux + 119)
143#define __NR_clone (__NR_Linux + 120)
144#define __NR_setdomainname (__NR_Linux + 121)
145#define __NR_uname (__NR_Linux + 122)
146#define __NR_modify_ldt (__NR_Linux + 123)
147#define __NR_adjtimex (__NR_Linux + 124)
148#define __NR_mprotect (__NR_Linux + 125)
149#define __NR_sigprocmask (__NR_Linux + 126)
150#define __NR_create_module (__NR_Linux + 127)
151#define __NR_init_module (__NR_Linux + 128)
152#define __NR_delete_module (__NR_Linux + 129)
153#define __NR_get_kernel_syms (__NR_Linux + 130)
154#define __NR_quotactl (__NR_Linux + 131)
155#define __NR_getpgid (__NR_Linux + 132)
156#define __NR_fchdir (__NR_Linux + 133)
157#define __NR_bdflush (__NR_Linux + 134)
158#define __NR_sysfs (__NR_Linux + 135)
159#define __NR_personality (__NR_Linux + 136)
160#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
161#define __NR_setfsuid (__NR_Linux + 138)
162#define __NR_setfsgid (__NR_Linux + 139)
163#define __NR__llseek (__NR_Linux + 140)
164#define __NR_getdents (__NR_Linux + 141)
165#define __NR__newselect (__NR_Linux + 142)
166#define __NR_flock (__NR_Linux + 143)
167#define __NR_msync (__NR_Linux + 144)
168#define __NR_readv (__NR_Linux + 145)
169#define __NR_writev (__NR_Linux + 146)
170#define __NR_cacheflush (__NR_Linux + 147)
171#define __NR_cachectl (__NR_Linux + 148)
172#define __NR_sysmips (__NR_Linux + 149)
173#define __NR_unused150 (__NR_Linux + 150)
174#define __NR_getsid (__NR_Linux + 151)
175#define __NR_fdatasync (__NR_Linux + 152)
176#define __NR__sysctl (__NR_Linux + 153)
177#define __NR_mlock (__NR_Linux + 154)
178#define __NR_munlock (__NR_Linux + 155)
179#define __NR_mlockall (__NR_Linux + 156)
180#define __NR_munlockall (__NR_Linux + 157)
181#define __NR_sched_setparam (__NR_Linux + 158)
182#define __NR_sched_getparam (__NR_Linux + 159)
183#define __NR_sched_setscheduler (__NR_Linux + 160)
184#define __NR_sched_getscheduler (__NR_Linux + 161)
185#define __NR_sched_yield (__NR_Linux + 162)
186#define __NR_sched_get_priority_max (__NR_Linux + 163)
187#define __NR_sched_get_priority_min (__NR_Linux + 164)
188#define __NR_sched_rr_get_interval (__NR_Linux + 165)
189#define __NR_nanosleep (__NR_Linux + 166)
190#define __NR_mremap (__NR_Linux + 167)
191#define __NR_accept (__NR_Linux + 168)
192#define __NR_bind (__NR_Linux + 169)
193#define __NR_connect (__NR_Linux + 170)
194#define __NR_getpeername (__NR_Linux + 171)
195#define __NR_getsockname (__NR_Linux + 172)
196#define __NR_getsockopt (__NR_Linux + 173)
197#define __NR_listen (__NR_Linux + 174)
198#define __NR_recv (__NR_Linux + 175)
199#define __NR_recvfrom (__NR_Linux + 176)
200#define __NR_recvmsg (__NR_Linux + 177)
201#define __NR_send (__NR_Linux + 178)
202#define __NR_sendmsg (__NR_Linux + 179)
203#define __NR_sendto (__NR_Linux + 180)
204#define __NR_setsockopt (__NR_Linux + 181)
205#define __NR_shutdown (__NR_Linux + 182)
206#define __NR_socket (__NR_Linux + 183)
207#define __NR_socketpair (__NR_Linux + 184)
208#define __NR_setresuid (__NR_Linux + 185)
209#define __NR_getresuid (__NR_Linux + 186)
210#define __NR_query_module (__NR_Linux + 187)
211#define __NR_poll (__NR_Linux + 188)
212#define __NR_nfsservctl (__NR_Linux + 189)
213#define __NR_setresgid (__NR_Linux + 190)
214#define __NR_getresgid (__NR_Linux + 191)
215#define __NR_prctl (__NR_Linux + 192)
216#define __NR_rt_sigreturn (__NR_Linux + 193)
217#define __NR_rt_sigaction (__NR_Linux + 194)
218#define __NR_rt_sigprocmask (__NR_Linux + 195)
219#define __NR_rt_sigpending (__NR_Linux + 196)
220#define __NR_rt_sigtimedwait (__NR_Linux + 197)
221#define __NR_rt_sigqueueinfo (__NR_Linux + 198)
222#define __NR_rt_sigsuspend (__NR_Linux + 199)
223#define __NR_pread64 (__NR_Linux + 200)
224#define __NR_pwrite64 (__NR_Linux + 201)
225#define __NR_chown (__NR_Linux + 202)
226#define __NR_getcwd (__NR_Linux + 203)
227#define __NR_capget (__NR_Linux + 204)
228#define __NR_capset (__NR_Linux + 205)
229#define __NR_sigaltstack (__NR_Linux + 206)
230#define __NR_sendfile (__NR_Linux + 207)
231#define __NR_getpmsg (__NR_Linux + 208)
232#define __NR_putpmsg (__NR_Linux + 209)
233#define __NR_mmap2 (__NR_Linux + 210)
234#define __NR_truncate64 (__NR_Linux + 211)
235#define __NR_ftruncate64 (__NR_Linux + 212)
236#define __NR_stat64 (__NR_Linux + 213)
237#define __NR_lstat64 (__NR_Linux + 214)
238#define __NR_fstat64 (__NR_Linux + 215)
239#define __NR_pivot_root (__NR_Linux + 216)
240#define __NR_mincore (__NR_Linux + 217)
241#define __NR_madvise (__NR_Linux + 218)
242#define __NR_getdents64 (__NR_Linux + 219)
243#define __NR_fcntl64 (__NR_Linux + 220)
244#define __NR_reserved221 (__NR_Linux + 221)
245#define __NR_gettid (__NR_Linux + 222)
246#define __NR_readahead (__NR_Linux + 223)
247#define __NR_setxattr (__NR_Linux + 224)
248#define __NR_lsetxattr (__NR_Linux + 225)
249#define __NR_fsetxattr (__NR_Linux + 226)
250#define __NR_getxattr (__NR_Linux + 227)
251#define __NR_lgetxattr (__NR_Linux + 228)
252#define __NR_fgetxattr (__NR_Linux + 229)
253#define __NR_listxattr (__NR_Linux + 230)
254#define __NR_llistxattr (__NR_Linux + 231)
255#define __NR_flistxattr (__NR_Linux + 232)
256#define __NR_removexattr (__NR_Linux + 233)
257#define __NR_lremovexattr (__NR_Linux + 234)
258#define __NR_fremovexattr (__NR_Linux + 235)
259#define __NR_tkill (__NR_Linux + 236)
260#define __NR_sendfile64 (__NR_Linux + 237)
261#define __NR_futex (__NR_Linux + 238)
262#define __NR_sched_setaffinity (__NR_Linux + 239)
263#define __NR_sched_getaffinity (__NR_Linux + 240)
264#define __NR_io_setup (__NR_Linux + 241)
265#define __NR_io_destroy (__NR_Linux + 242)
266#define __NR_io_getevents (__NR_Linux + 243)
267#define __NR_io_submit (__NR_Linux + 244)
268#define __NR_io_cancel (__NR_Linux + 245)
269#define __NR_exit_group (__NR_Linux + 246)
270#define __NR_lookup_dcookie (__NR_Linux + 247)
271#define __NR_epoll_create (__NR_Linux + 248)
272#define __NR_epoll_ctl (__NR_Linux + 249)
273#define __NR_epoll_wait (__NR_Linux + 250)
274#define __NR_remap_file_pages (__NR_Linux + 251)
275#define __NR_set_tid_address (__NR_Linux + 252)
276#define __NR_restart_syscall (__NR_Linux + 253)
277#define __NR_fadvise64 (__NR_Linux + 254)
278#define __NR_statfs64 (__NR_Linux + 255)
279#define __NR_fstatfs64 (__NR_Linux + 256)
280#define __NR_timer_create (__NR_Linux + 257)
281#define __NR_timer_settime (__NR_Linux + 258)
282#define __NR_timer_gettime (__NR_Linux + 259)
283#define __NR_timer_getoverrun (__NR_Linux + 260)
284#define __NR_timer_delete (__NR_Linux + 261)
285#define __NR_clock_settime (__NR_Linux + 262)
286#define __NR_clock_gettime (__NR_Linux + 263)
287#define __NR_clock_getres (__NR_Linux + 264)
288#define __NR_clock_nanosleep (__NR_Linux + 265)
289#define __NR_tgkill (__NR_Linux + 266)
290#define __NR_utimes (__NR_Linux + 267)
291#define __NR_mbind (__NR_Linux + 268)
292#define __NR_get_mempolicy (__NR_Linux + 269)
293#define __NR_set_mempolicy (__NR_Linux + 270)
294#define __NR_mq_open (__NR_Linux + 271)
295#define __NR_mq_unlink (__NR_Linux + 272)
296#define __NR_mq_timedsend (__NR_Linux + 273)
297#define __NR_mq_timedreceive (__NR_Linux + 274)
298#define __NR_mq_notify (__NR_Linux + 275)
299#define __NR_mq_getsetattr (__NR_Linux + 276)
300#define __NR_vserver (__NR_Linux + 277)
301#define __NR_waitid (__NR_Linux + 278)
302/* #define __NR_sys_setaltroot (__NR_Linux + 279) */
303#define __NR_add_key (__NR_Linux + 280)
304#define __NR_request_key (__NR_Linux + 281)
305#define __NR_keyctl (__NR_Linux + 282)
306#define __NR_set_thread_area (__NR_Linux + 283)
307#define __NR_inotify_init (__NR_Linux + 284)
308#define __NR_inotify_add_watch (__NR_Linux + 285)
309#define __NR_inotify_rm_watch (__NR_Linux + 286)
310#define __NR_migrate_pages (__NR_Linux + 287)
311#define __NR_openat (__NR_Linux + 288)
312#define __NR_mkdirat (__NR_Linux + 289)
313#define __NR_mknodat (__NR_Linux + 290)
314#define __NR_fchownat (__NR_Linux + 291)
315#define __NR_futimesat (__NR_Linux + 292)
316#define __NR_fstatat64 (__NR_Linux + 293)
317#define __NR_unlinkat (__NR_Linux + 294)
318#define __NR_renameat (__NR_Linux + 295)
319#define __NR_linkat (__NR_Linux + 296)
320#define __NR_symlinkat (__NR_Linux + 297)
321#define __NR_readlinkat (__NR_Linux + 298)
322#define __NR_fchmodat (__NR_Linux + 299)
323#define __NR_faccessat (__NR_Linux + 300)
324#define __NR_pselect6 (__NR_Linux + 301)
325#define __NR_ppoll (__NR_Linux + 302)
326#define __NR_unshare (__NR_Linux + 303)
327#define __NR_splice (__NR_Linux + 304)
328#define __NR_sync_file_range (__NR_Linux + 305)
329#define __NR_tee (__NR_Linux + 306)
330#define __NR_vmsplice (__NR_Linux + 307)
331#define __NR_move_pages (__NR_Linux + 308)
332#define __NR_set_robust_list (__NR_Linux + 309)
333#define __NR_get_robust_list (__NR_Linux + 310)
334#define __NR_kexec_load (__NR_Linux + 311)
335#define __NR_getcpu (__NR_Linux + 312)
336#define __NR_epoll_pwait (__NR_Linux + 313)
337#define __NR_ioprio_set (__NR_Linux + 314)
338#define __NR_ioprio_get (__NR_Linux + 315)
339#define __NR_utimensat (__NR_Linux + 316)
340#define __NR_signalfd (__NR_Linux + 317)
341#define __NR_timerfd (__NR_Linux + 318)
342#define __NR_eventfd (__NR_Linux + 319)
343#define __NR_fallocate (__NR_Linux + 320)
344#define __NR_timerfd_create (__NR_Linux + 321)
345#define __NR_timerfd_gettime (__NR_Linux + 322)
346#define __NR_timerfd_settime (__NR_Linux + 323)
347#define __NR_signalfd4 (__NR_Linux + 324)
348#define __NR_eventfd2 (__NR_Linux + 325)
349#define __NR_epoll_create1 (__NR_Linux + 326)
350#define __NR_dup3 (__NR_Linux + 327)
351#define __NR_pipe2 (__NR_Linux + 328)
352#define __NR_inotify_init1 (__NR_Linux + 329)
353#define __NR_preadv (__NR_Linux + 330)
354#define __NR_pwritev (__NR_Linux + 331)
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
356#define __NR_perf_event_open (__NR_Linux + 333)
357#define __NR_accept4 (__NR_Linux + 334)
358#define __NR_recvmmsg (__NR_Linux + 335)
359#define __NR_fanotify_init (__NR_Linux + 336)
360#define __NR_fanotify_mark (__NR_Linux + 337)
361#define __NR_prlimit64 (__NR_Linux + 338)
362#define __NR_name_to_handle_at (__NR_Linux + 339)
363#define __NR_open_by_handle_at (__NR_Linux + 340)
364#define __NR_clock_adjtime (__NR_Linux + 341)
365#define __NR_syncfs (__NR_Linux + 342)
366#define __NR_sendmmsg (__NR_Linux + 343)
367#define __NR_setns (__NR_Linux + 344)
368#define __NR_process_vm_readv (__NR_Linux + 345)
369#define __NR_process_vm_writev (__NR_Linux + 346)
370#define __NR_kcmp (__NR_Linux + 347)
371
372/*
373 * Offset of the last Linux o32 flavoured syscall
374 */
375#define __NR_Linux_syscalls 347
376
377#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
378
379#define __NR_O32_Linux 4000
380#define __NR_O32_Linux_syscalls 347
381
382#if _MIPS_SIM == _MIPS_SIM_ABI64
383
384/*
385 * Linux 64-bit syscalls are in the range from 5000 to 5999.
386 */
387#define __NR_Linux 5000
388#define __NR_read (__NR_Linux + 0)
389#define __NR_write (__NR_Linux + 1)
390#define __NR_open (__NR_Linux + 2)
391#define __NR_close (__NR_Linux + 3)
392#define __NR_stat (__NR_Linux + 4)
393#define __NR_fstat (__NR_Linux + 5)
394#define __NR_lstat (__NR_Linux + 6)
395#define __NR_poll (__NR_Linux + 7)
396#define __NR_lseek (__NR_Linux + 8)
397#define __NR_mmap (__NR_Linux + 9)
398#define __NR_mprotect (__NR_Linux + 10)
399#define __NR_munmap (__NR_Linux + 11)
400#define __NR_brk (__NR_Linux + 12)
401#define __NR_rt_sigaction (__NR_Linux + 13)
402#define __NR_rt_sigprocmask (__NR_Linux + 14)
403#define __NR_ioctl (__NR_Linux + 15)
404#define __NR_pread64 (__NR_Linux + 16)
405#define __NR_pwrite64 (__NR_Linux + 17)
406#define __NR_readv (__NR_Linux + 18)
407#define __NR_writev (__NR_Linux + 19)
408#define __NR_access (__NR_Linux + 20)
409#define __NR_pipe (__NR_Linux + 21)
410#define __NR__newselect (__NR_Linux + 22)
411#define __NR_sched_yield (__NR_Linux + 23)
412#define __NR_mremap (__NR_Linux + 24)
413#define __NR_msync (__NR_Linux + 25)
414#define __NR_mincore (__NR_Linux + 26)
415#define __NR_madvise (__NR_Linux + 27)
416#define __NR_shmget (__NR_Linux + 28)
417#define __NR_shmat (__NR_Linux + 29)
418#define __NR_shmctl (__NR_Linux + 30)
419#define __NR_dup (__NR_Linux + 31)
420#define __NR_dup2 (__NR_Linux + 32)
421#define __NR_pause (__NR_Linux + 33)
422#define __NR_nanosleep (__NR_Linux + 34)
423#define __NR_getitimer (__NR_Linux + 35)
424#define __NR_setitimer (__NR_Linux + 36)
425#define __NR_alarm (__NR_Linux + 37)
426#define __NR_getpid (__NR_Linux + 38)
427#define __NR_sendfile (__NR_Linux + 39)
428#define __NR_socket (__NR_Linux + 40)
429#define __NR_connect (__NR_Linux + 41)
430#define __NR_accept (__NR_Linux + 42)
431#define __NR_sendto (__NR_Linux + 43)
432#define __NR_recvfrom (__NR_Linux + 44)
433#define __NR_sendmsg (__NR_Linux + 45)
434#define __NR_recvmsg (__NR_Linux + 46)
435#define __NR_shutdown (__NR_Linux + 47)
436#define __NR_bind (__NR_Linux + 48)
437#define __NR_listen (__NR_Linux + 49)
438#define __NR_getsockname (__NR_Linux + 50)
439#define __NR_getpeername (__NR_Linux + 51)
440#define __NR_socketpair (__NR_Linux + 52)
441#define __NR_setsockopt (__NR_Linux + 53)
442#define __NR_getsockopt (__NR_Linux + 54)
443#define __NR_clone (__NR_Linux + 55)
444#define __NR_fork (__NR_Linux + 56)
445#define __NR_execve (__NR_Linux + 57)
446#define __NR_exit (__NR_Linux + 58)
447#define __NR_wait4 (__NR_Linux + 59)
448#define __NR_kill (__NR_Linux + 60)
449#define __NR_uname (__NR_Linux + 61)
450#define __NR_semget (__NR_Linux + 62)
451#define __NR_semop (__NR_Linux + 63)
452#define __NR_semctl (__NR_Linux + 64)
453#define __NR_shmdt (__NR_Linux + 65)
454#define __NR_msgget (__NR_Linux + 66)
455#define __NR_msgsnd (__NR_Linux + 67)
456#define __NR_msgrcv (__NR_Linux + 68)
457#define __NR_msgctl (__NR_Linux + 69)
458#define __NR_fcntl (__NR_Linux + 70)
459#define __NR_flock (__NR_Linux + 71)
460#define __NR_fsync (__NR_Linux + 72)
461#define __NR_fdatasync (__NR_Linux + 73)
462#define __NR_truncate (__NR_Linux + 74)
463#define __NR_ftruncate (__NR_Linux + 75)
464#define __NR_getdents (__NR_Linux + 76)
465#define __NR_getcwd (__NR_Linux + 77)
466#define __NR_chdir (__NR_Linux + 78)
467#define __NR_fchdir (__NR_Linux + 79)
468#define __NR_rename (__NR_Linux + 80)
469#define __NR_mkdir (__NR_Linux + 81)
470#define __NR_rmdir (__NR_Linux + 82)
471#define __NR_creat (__NR_Linux + 83)
472#define __NR_link (__NR_Linux + 84)
473#define __NR_unlink (__NR_Linux + 85)
474#define __NR_symlink (__NR_Linux + 86)
475#define __NR_readlink (__NR_Linux + 87)
476#define __NR_chmod (__NR_Linux + 88)
477#define __NR_fchmod (__NR_Linux + 89)
478#define __NR_chown (__NR_Linux + 90)
479#define __NR_fchown (__NR_Linux + 91)
480#define __NR_lchown (__NR_Linux + 92)
481#define __NR_umask (__NR_Linux + 93)
482#define __NR_gettimeofday (__NR_Linux + 94)
483#define __NR_getrlimit (__NR_Linux + 95)
484#define __NR_getrusage (__NR_Linux + 96)
485#define __NR_sysinfo (__NR_Linux + 97)
486#define __NR_times (__NR_Linux + 98)
487#define __NR_ptrace (__NR_Linux + 99)
488#define __NR_getuid (__NR_Linux + 100)
489#define __NR_syslog (__NR_Linux + 101)
490#define __NR_getgid (__NR_Linux + 102)
491#define __NR_setuid (__NR_Linux + 103)
492#define __NR_setgid (__NR_Linux + 104)
493#define __NR_geteuid (__NR_Linux + 105)
494#define __NR_getegid (__NR_Linux + 106)
495#define __NR_setpgid (__NR_Linux + 107)
496#define __NR_getppid (__NR_Linux + 108)
497#define __NR_getpgrp (__NR_Linux + 109)
498#define __NR_setsid (__NR_Linux + 110)
499#define __NR_setreuid (__NR_Linux + 111)
500#define __NR_setregid (__NR_Linux + 112)
501#define __NR_getgroups (__NR_Linux + 113)
502#define __NR_setgroups (__NR_Linux + 114)
503#define __NR_setresuid (__NR_Linux + 115)
504#define __NR_getresuid (__NR_Linux + 116)
505#define __NR_setresgid (__NR_Linux + 117)
506#define __NR_getresgid (__NR_Linux + 118)
507#define __NR_getpgid (__NR_Linux + 119)
508#define __NR_setfsuid (__NR_Linux + 120)
509#define __NR_setfsgid (__NR_Linux + 121)
510#define __NR_getsid (__NR_Linux + 122)
511#define __NR_capget (__NR_Linux + 123)
512#define __NR_capset (__NR_Linux + 124)
513#define __NR_rt_sigpending (__NR_Linux + 125)
514#define __NR_rt_sigtimedwait (__NR_Linux + 126)
515#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
516#define __NR_rt_sigsuspend (__NR_Linux + 128)
517#define __NR_sigaltstack (__NR_Linux + 129)
518#define __NR_utime (__NR_Linux + 130)
519#define __NR_mknod (__NR_Linux + 131)
520#define __NR_personality (__NR_Linux + 132)
521#define __NR_ustat (__NR_Linux + 133)
522#define __NR_statfs (__NR_Linux + 134)
523#define __NR_fstatfs (__NR_Linux + 135)
524#define __NR_sysfs (__NR_Linux + 136)
525#define __NR_getpriority (__NR_Linux + 137)
526#define __NR_setpriority (__NR_Linux + 138)
527#define __NR_sched_setparam (__NR_Linux + 139)
528#define __NR_sched_getparam (__NR_Linux + 140)
529#define __NR_sched_setscheduler (__NR_Linux + 141)
530#define __NR_sched_getscheduler (__NR_Linux + 142)
531#define __NR_sched_get_priority_max (__NR_Linux + 143)
532#define __NR_sched_get_priority_min (__NR_Linux + 144)
533#define __NR_sched_rr_get_interval (__NR_Linux + 145)
534#define __NR_mlock (__NR_Linux + 146)
535#define __NR_munlock (__NR_Linux + 147)
536#define __NR_mlockall (__NR_Linux + 148)
537#define __NR_munlockall (__NR_Linux + 149)
538#define __NR_vhangup (__NR_Linux + 150)
539#define __NR_pivot_root (__NR_Linux + 151)
540#define __NR__sysctl (__NR_Linux + 152)
541#define __NR_prctl (__NR_Linux + 153)
542#define __NR_adjtimex (__NR_Linux + 154)
543#define __NR_setrlimit (__NR_Linux + 155)
544#define __NR_chroot (__NR_Linux + 156)
545#define __NR_sync (__NR_Linux + 157)
546#define __NR_acct (__NR_Linux + 158)
547#define __NR_settimeofday (__NR_Linux + 159)
548#define __NR_mount (__NR_Linux + 160)
549#define __NR_umount2 (__NR_Linux + 161)
550#define __NR_swapon (__NR_Linux + 162)
551#define __NR_swapoff (__NR_Linux + 163)
552#define __NR_reboot (__NR_Linux + 164)
553#define __NR_sethostname (__NR_Linux + 165)
554#define __NR_setdomainname (__NR_Linux + 166)
555#define __NR_create_module (__NR_Linux + 167)
556#define __NR_init_module (__NR_Linux + 168)
557#define __NR_delete_module (__NR_Linux + 169)
558#define __NR_get_kernel_syms (__NR_Linux + 170)
559#define __NR_query_module (__NR_Linux + 171)
560#define __NR_quotactl (__NR_Linux + 172)
561#define __NR_nfsservctl (__NR_Linux + 173)
562#define __NR_getpmsg (__NR_Linux + 174)
563#define __NR_putpmsg (__NR_Linux + 175)
564#define __NR_afs_syscall (__NR_Linux + 176)
565#define __NR_reserved177 (__NR_Linux + 177)
566#define __NR_gettid (__NR_Linux + 178)
567#define __NR_readahead (__NR_Linux + 179)
568#define __NR_setxattr (__NR_Linux + 180)
569#define __NR_lsetxattr (__NR_Linux + 181)
570#define __NR_fsetxattr (__NR_Linux + 182)
571#define __NR_getxattr (__NR_Linux + 183)
572#define __NR_lgetxattr (__NR_Linux + 184)
573#define __NR_fgetxattr (__NR_Linux + 185)
574#define __NR_listxattr (__NR_Linux + 186)
575#define __NR_llistxattr (__NR_Linux + 187)
576#define __NR_flistxattr (__NR_Linux + 188)
577#define __NR_removexattr (__NR_Linux + 189)
578#define __NR_lremovexattr (__NR_Linux + 190)
579#define __NR_fremovexattr (__NR_Linux + 191)
580#define __NR_tkill (__NR_Linux + 192)
581#define __NR_reserved193 (__NR_Linux + 193)
582#define __NR_futex (__NR_Linux + 194)
583#define __NR_sched_setaffinity (__NR_Linux + 195)
584#define __NR_sched_getaffinity (__NR_Linux + 196)
585#define __NR_cacheflush (__NR_Linux + 197)
586#define __NR_cachectl (__NR_Linux + 198)
587#define __NR_sysmips (__NR_Linux + 199)
588#define __NR_io_setup (__NR_Linux + 200)
589#define __NR_io_destroy (__NR_Linux + 201)
590#define __NR_io_getevents (__NR_Linux + 202)
591#define __NR_io_submit (__NR_Linux + 203)
592#define __NR_io_cancel (__NR_Linux + 204)
593#define __NR_exit_group (__NR_Linux + 205)
594#define __NR_lookup_dcookie (__NR_Linux + 206)
595#define __NR_epoll_create (__NR_Linux + 207)
596#define __NR_epoll_ctl (__NR_Linux + 208)
597#define __NR_epoll_wait (__NR_Linux + 209)
598#define __NR_remap_file_pages (__NR_Linux + 210)
599#define __NR_rt_sigreturn (__NR_Linux + 211)
600#define __NR_set_tid_address (__NR_Linux + 212)
601#define __NR_restart_syscall (__NR_Linux + 213)
602#define __NR_semtimedop (__NR_Linux + 214)
603#define __NR_fadvise64 (__NR_Linux + 215)
604#define __NR_timer_create (__NR_Linux + 216)
605#define __NR_timer_settime (__NR_Linux + 217)
606#define __NR_timer_gettime (__NR_Linux + 218)
607#define __NR_timer_getoverrun (__NR_Linux + 219)
608#define __NR_timer_delete (__NR_Linux + 220)
609#define __NR_clock_settime (__NR_Linux + 221)
610#define __NR_clock_gettime (__NR_Linux + 222)
611#define __NR_clock_getres (__NR_Linux + 223)
612#define __NR_clock_nanosleep (__NR_Linux + 224)
613#define __NR_tgkill (__NR_Linux + 225)
614#define __NR_utimes (__NR_Linux + 226)
615#define __NR_mbind (__NR_Linux + 227)
616#define __NR_get_mempolicy (__NR_Linux + 228)
617#define __NR_set_mempolicy (__NR_Linux + 229)
618#define __NR_mq_open (__NR_Linux + 230)
619#define __NR_mq_unlink (__NR_Linux + 231)
620#define __NR_mq_timedsend (__NR_Linux + 232)
621#define __NR_mq_timedreceive (__NR_Linux + 233)
622#define __NR_mq_notify (__NR_Linux + 234)
623#define __NR_mq_getsetattr (__NR_Linux + 235)
624#define __NR_vserver (__NR_Linux + 236)
625#define __NR_waitid (__NR_Linux + 237)
626/* #define __NR_sys_setaltroot (__NR_Linux + 238) */
627#define __NR_add_key (__NR_Linux + 239)
628#define __NR_request_key (__NR_Linux + 240)
629#define __NR_keyctl (__NR_Linux + 241)
630#define __NR_set_thread_area (__NR_Linux + 242)
631#define __NR_inotify_init (__NR_Linux + 243)
632#define __NR_inotify_add_watch (__NR_Linux + 244)
633#define __NR_inotify_rm_watch (__NR_Linux + 245)
634#define __NR_migrate_pages (__NR_Linux + 246)
635#define __NR_openat (__NR_Linux + 247)
636#define __NR_mkdirat (__NR_Linux + 248)
637#define __NR_mknodat (__NR_Linux + 249)
638#define __NR_fchownat (__NR_Linux + 250)
639#define __NR_futimesat (__NR_Linux + 251)
640#define __NR_newfstatat (__NR_Linux + 252)
641#define __NR_unlinkat (__NR_Linux + 253)
642#define __NR_renameat (__NR_Linux + 254)
643#define __NR_linkat (__NR_Linux + 255)
644#define __NR_symlinkat (__NR_Linux + 256)
645#define __NR_readlinkat (__NR_Linux + 257)
646#define __NR_fchmodat (__NR_Linux + 258)
647#define __NR_faccessat (__NR_Linux + 259)
648#define __NR_pselect6 (__NR_Linux + 260)
649#define __NR_ppoll (__NR_Linux + 261)
650#define __NR_unshare (__NR_Linux + 262)
651#define __NR_splice (__NR_Linux + 263)
652#define __NR_sync_file_range (__NR_Linux + 264)
653#define __NR_tee (__NR_Linux + 265)
654#define __NR_vmsplice (__NR_Linux + 266)
655#define __NR_move_pages (__NR_Linux + 267)
656#define __NR_set_robust_list (__NR_Linux + 268)
657#define __NR_get_robust_list (__NR_Linux + 269)
658#define __NR_kexec_load (__NR_Linux + 270)
659#define __NR_getcpu (__NR_Linux + 271)
660#define __NR_epoll_pwait (__NR_Linux + 272)
661#define __NR_ioprio_set (__NR_Linux + 273)
662#define __NR_ioprio_get (__NR_Linux + 274)
663#define __NR_utimensat (__NR_Linux + 275)
664#define __NR_signalfd (__NR_Linux + 276)
665#define __NR_timerfd (__NR_Linux + 277)
666#define __NR_eventfd (__NR_Linux + 278)
667#define __NR_fallocate (__NR_Linux + 279)
668#define __NR_timerfd_create (__NR_Linux + 280)
669#define __NR_timerfd_gettime (__NR_Linux + 281)
670#define __NR_timerfd_settime (__NR_Linux + 282)
671#define __NR_signalfd4 (__NR_Linux + 283)
672#define __NR_eventfd2 (__NR_Linux + 284)
673#define __NR_epoll_create1 (__NR_Linux + 285)
674#define __NR_dup3 (__NR_Linux + 286)
675#define __NR_pipe2 (__NR_Linux + 287)
676#define __NR_inotify_init1 (__NR_Linux + 288)
677#define __NR_preadv (__NR_Linux + 289)
678#define __NR_pwritev (__NR_Linux + 290)
679#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
680#define __NR_perf_event_open (__NR_Linux + 292)
681#define __NR_accept4 (__NR_Linux + 293)
682#define __NR_recvmmsg (__NR_Linux + 294)
683#define __NR_fanotify_init (__NR_Linux + 295)
684#define __NR_fanotify_mark (__NR_Linux + 296)
685#define __NR_prlimit64 (__NR_Linux + 297)
686#define __NR_name_to_handle_at (__NR_Linux + 298)
687#define __NR_open_by_handle_at (__NR_Linux + 299)
688#define __NR_clock_adjtime (__NR_Linux + 300)
689#define __NR_syncfs (__NR_Linux + 301)
690#define __NR_sendmmsg (__NR_Linux + 302)
691#define __NR_setns (__NR_Linux + 303)
692#define __NR_process_vm_readv (__NR_Linux + 304)
693#define __NR_process_vm_writev (__NR_Linux + 305)
694#define __NR_kcmp (__NR_Linux + 306)
695
696/*
697 * Offset of the last Linux 64-bit flavoured syscall
698 */
699#define __NR_Linux_syscalls 306
700
701#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
702
703#define __NR_64_Linux 5000
704#define __NR_64_Linux_syscalls 306
705
706#if _MIPS_SIM == _MIPS_SIM_NABI32
707
708/*
709 * Linux N32 syscalls are in the range from 6000 to 6999.
710 */
711#define __NR_Linux 6000
712#define __NR_read (__NR_Linux + 0)
713#define __NR_write (__NR_Linux + 1)
714#define __NR_open (__NR_Linux + 2)
715#define __NR_close (__NR_Linux + 3)
716#define __NR_stat (__NR_Linux + 4)
717#define __NR_fstat (__NR_Linux + 5)
718#define __NR_lstat (__NR_Linux + 6)
719#define __NR_poll (__NR_Linux + 7)
720#define __NR_lseek (__NR_Linux + 8)
721#define __NR_mmap (__NR_Linux + 9)
722#define __NR_mprotect (__NR_Linux + 10)
723#define __NR_munmap (__NR_Linux + 11)
724#define __NR_brk (__NR_Linux + 12)
725#define __NR_rt_sigaction (__NR_Linux + 13)
726#define __NR_rt_sigprocmask (__NR_Linux + 14)
727#define __NR_ioctl (__NR_Linux + 15)
728#define __NR_pread64 (__NR_Linux + 16)
729#define __NR_pwrite64 (__NR_Linux + 17)
730#define __NR_readv (__NR_Linux + 18)
731#define __NR_writev (__NR_Linux + 19)
732#define __NR_access (__NR_Linux + 20)
733#define __NR_pipe (__NR_Linux + 21)
734#define __NR__newselect (__NR_Linux + 22)
735#define __NR_sched_yield (__NR_Linux + 23)
736#define __NR_mremap (__NR_Linux + 24)
737#define __NR_msync (__NR_Linux + 25)
738#define __NR_mincore (__NR_Linux + 26)
739#define __NR_madvise (__NR_Linux + 27)
740#define __NR_shmget (__NR_Linux + 28)
741#define __NR_shmat (__NR_Linux + 29)
742#define __NR_shmctl (__NR_Linux + 30)
743#define __NR_dup (__NR_Linux + 31)
744#define __NR_dup2 (__NR_Linux + 32)
745#define __NR_pause (__NR_Linux + 33)
746#define __NR_nanosleep (__NR_Linux + 34)
747#define __NR_getitimer (__NR_Linux + 35)
748#define __NR_setitimer (__NR_Linux + 36)
749#define __NR_alarm (__NR_Linux + 37)
750#define __NR_getpid (__NR_Linux + 38)
751#define __NR_sendfile (__NR_Linux + 39)
752#define __NR_socket (__NR_Linux + 40)
753#define __NR_connect (__NR_Linux + 41)
754#define __NR_accept (__NR_Linux + 42)
755#define __NR_sendto (__NR_Linux + 43)
756#define __NR_recvfrom (__NR_Linux + 44)
757#define __NR_sendmsg (__NR_Linux + 45)
758#define __NR_recvmsg (__NR_Linux + 46)
759#define __NR_shutdown (__NR_Linux + 47)
760#define __NR_bind (__NR_Linux + 48)
761#define __NR_listen (__NR_Linux + 49)
762#define __NR_getsockname (__NR_Linux + 50)
763#define __NR_getpeername (__NR_Linux + 51)
764#define __NR_socketpair (__NR_Linux + 52)
765#define __NR_setsockopt (__NR_Linux + 53)
766#define __NR_getsockopt (__NR_Linux + 54)
767#define __NR_clone (__NR_Linux + 55)
768#define __NR_fork (__NR_Linux + 56)
769#define __NR_execve (__NR_Linux + 57)
770#define __NR_exit (__NR_Linux + 58)
771#define __NR_wait4 (__NR_Linux + 59)
772#define __NR_kill (__NR_Linux + 60)
773#define __NR_uname (__NR_Linux + 61)
774#define __NR_semget (__NR_Linux + 62)
775#define __NR_semop (__NR_Linux + 63)
776#define __NR_semctl (__NR_Linux + 64)
777#define __NR_shmdt (__NR_Linux + 65)
778#define __NR_msgget (__NR_Linux + 66)
779#define __NR_msgsnd (__NR_Linux + 67)
780#define __NR_msgrcv (__NR_Linux + 68)
781#define __NR_msgctl (__NR_Linux + 69)
782#define __NR_fcntl (__NR_Linux + 70)
783#define __NR_flock (__NR_Linux + 71)
784#define __NR_fsync (__NR_Linux + 72)
785#define __NR_fdatasync (__NR_Linux + 73)
786#define __NR_truncate (__NR_Linux + 74)
787#define __NR_ftruncate (__NR_Linux + 75)
788#define __NR_getdents (__NR_Linux + 76)
789#define __NR_getcwd (__NR_Linux + 77)
790#define __NR_chdir (__NR_Linux + 78)
791#define __NR_fchdir (__NR_Linux + 79)
792#define __NR_rename (__NR_Linux + 80)
793#define __NR_mkdir (__NR_Linux + 81)
794#define __NR_rmdir (__NR_Linux + 82)
795#define __NR_creat (__NR_Linux + 83)
796#define __NR_link (__NR_Linux + 84)
797#define __NR_unlink (__NR_Linux + 85)
798#define __NR_symlink (__NR_Linux + 86)
799#define __NR_readlink (__NR_Linux + 87)
800#define __NR_chmod (__NR_Linux + 88)
801#define __NR_fchmod (__NR_Linux + 89)
802#define __NR_chown (__NR_Linux + 90)
803#define __NR_fchown (__NR_Linux + 91)
804#define __NR_lchown (__NR_Linux + 92)
805#define __NR_umask (__NR_Linux + 93)
806#define __NR_gettimeofday (__NR_Linux + 94)
807#define __NR_getrlimit (__NR_Linux + 95)
808#define __NR_getrusage (__NR_Linux + 96)
809#define __NR_sysinfo (__NR_Linux + 97)
810#define __NR_times (__NR_Linux + 98)
811#define __NR_ptrace (__NR_Linux + 99)
812#define __NR_getuid (__NR_Linux + 100)
813#define __NR_syslog (__NR_Linux + 101)
814#define __NR_getgid (__NR_Linux + 102)
815#define __NR_setuid (__NR_Linux + 103)
816#define __NR_setgid (__NR_Linux + 104)
817#define __NR_geteuid (__NR_Linux + 105)
818#define __NR_getegid (__NR_Linux + 106)
819#define __NR_setpgid (__NR_Linux + 107)
820#define __NR_getppid (__NR_Linux + 108)
821#define __NR_getpgrp (__NR_Linux + 109)
822#define __NR_setsid (__NR_Linux + 110)
823#define __NR_setreuid (__NR_Linux + 111)
824#define __NR_setregid (__NR_Linux + 112)
825#define __NR_getgroups (__NR_Linux + 113)
826#define __NR_setgroups (__NR_Linux + 114)
827#define __NR_setresuid (__NR_Linux + 115)
828#define __NR_getresuid (__NR_Linux + 116)
829#define __NR_setresgid (__NR_Linux + 117)
830#define __NR_getresgid (__NR_Linux + 118)
831#define __NR_getpgid (__NR_Linux + 119)
832#define __NR_setfsuid (__NR_Linux + 120)
833#define __NR_setfsgid (__NR_Linux + 121)
834#define __NR_getsid (__NR_Linux + 122)
835#define __NR_capget (__NR_Linux + 123)
836#define __NR_capset (__NR_Linux + 124)
837#define __NR_rt_sigpending (__NR_Linux + 125)
838#define __NR_rt_sigtimedwait (__NR_Linux + 126)
839#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
840#define __NR_rt_sigsuspend (__NR_Linux + 128)
841#define __NR_sigaltstack (__NR_Linux + 129)
842#define __NR_utime (__NR_Linux + 130)
843#define __NR_mknod (__NR_Linux + 131)
844#define __NR_personality (__NR_Linux + 132)
845#define __NR_ustat (__NR_Linux + 133)
846#define __NR_statfs (__NR_Linux + 134)
847#define __NR_fstatfs (__NR_Linux + 135)
848#define __NR_sysfs (__NR_Linux + 136)
849#define __NR_getpriority (__NR_Linux + 137)
850#define __NR_setpriority (__NR_Linux + 138)
851#define __NR_sched_setparam (__NR_Linux + 139)
852#define __NR_sched_getparam (__NR_Linux + 140)
853#define __NR_sched_setscheduler (__NR_Linux + 141)
854#define __NR_sched_getscheduler (__NR_Linux + 142)
855#define __NR_sched_get_priority_max (__NR_Linux + 143)
856#define __NR_sched_get_priority_min (__NR_Linux + 144)
857#define __NR_sched_rr_get_interval (__NR_Linux + 145)
858#define __NR_mlock (__NR_Linux + 146)
859#define __NR_munlock (__NR_Linux + 147)
860#define __NR_mlockall (__NR_Linux + 148)
861#define __NR_munlockall (__NR_Linux + 149)
862#define __NR_vhangup (__NR_Linux + 150)
863#define __NR_pivot_root (__NR_Linux + 151)
864#define __NR__sysctl (__NR_Linux + 152)
865#define __NR_prctl (__NR_Linux + 153)
866#define __NR_adjtimex (__NR_Linux + 154)
867#define __NR_setrlimit (__NR_Linux + 155)
868#define __NR_chroot (__NR_Linux + 156)
869#define __NR_sync (__NR_Linux + 157)
870#define __NR_acct (__NR_Linux + 158)
871#define __NR_settimeofday (__NR_Linux + 159)
872#define __NR_mount (__NR_Linux + 160)
873#define __NR_umount2 (__NR_Linux + 161)
874#define __NR_swapon (__NR_Linux + 162)
875#define __NR_swapoff (__NR_Linux + 163)
876#define __NR_reboot (__NR_Linux + 164)
877#define __NR_sethostname (__NR_Linux + 165)
878#define __NR_setdomainname (__NR_Linux + 166)
879#define __NR_create_module (__NR_Linux + 167)
880#define __NR_init_module (__NR_Linux + 168)
881#define __NR_delete_module (__NR_Linux + 169)
882#define __NR_get_kernel_syms (__NR_Linux + 170)
883#define __NR_query_module (__NR_Linux + 171)
884#define __NR_quotactl (__NR_Linux + 172)
885#define __NR_nfsservctl (__NR_Linux + 173)
886#define __NR_getpmsg (__NR_Linux + 174)
887#define __NR_putpmsg (__NR_Linux + 175)
888#define __NR_afs_syscall (__NR_Linux + 176)
889#define __NR_reserved177 (__NR_Linux + 177)
890#define __NR_gettid (__NR_Linux + 178)
891#define __NR_readahead (__NR_Linux + 179)
892#define __NR_setxattr (__NR_Linux + 180)
893#define __NR_lsetxattr (__NR_Linux + 181)
894#define __NR_fsetxattr (__NR_Linux + 182)
895#define __NR_getxattr (__NR_Linux + 183)
896#define __NR_lgetxattr (__NR_Linux + 184)
897#define __NR_fgetxattr (__NR_Linux + 185)
898#define __NR_listxattr (__NR_Linux + 186)
899#define __NR_llistxattr (__NR_Linux + 187)
900#define __NR_flistxattr (__NR_Linux + 188)
901#define __NR_removexattr (__NR_Linux + 189)
902#define __NR_lremovexattr (__NR_Linux + 190)
903#define __NR_fremovexattr (__NR_Linux + 191)
904#define __NR_tkill (__NR_Linux + 192)
905#define __NR_reserved193 (__NR_Linux + 193)
906#define __NR_futex (__NR_Linux + 194)
907#define __NR_sched_setaffinity (__NR_Linux + 195)
908#define __NR_sched_getaffinity (__NR_Linux + 196)
909#define __NR_cacheflush (__NR_Linux + 197)
910#define __NR_cachectl (__NR_Linux + 198)
911#define __NR_sysmips (__NR_Linux + 199)
912#define __NR_io_setup (__NR_Linux + 200)
913#define __NR_io_destroy (__NR_Linux + 201)
914#define __NR_io_getevents (__NR_Linux + 202)
915#define __NR_io_submit (__NR_Linux + 203)
916#define __NR_io_cancel (__NR_Linux + 204)
917#define __NR_exit_group (__NR_Linux + 205)
918#define __NR_lookup_dcookie (__NR_Linux + 206)
919#define __NR_epoll_create (__NR_Linux + 207)
920#define __NR_epoll_ctl (__NR_Linux + 208)
921#define __NR_epoll_wait (__NR_Linux + 209)
922#define __NR_remap_file_pages (__NR_Linux + 210)
923#define __NR_rt_sigreturn (__NR_Linux + 211)
924#define __NR_fcntl64 (__NR_Linux + 212)
925#define __NR_set_tid_address (__NR_Linux + 213)
926#define __NR_restart_syscall (__NR_Linux + 214)
927#define __NR_semtimedop (__NR_Linux + 215)
928#define __NR_fadvise64 (__NR_Linux + 216)
929#define __NR_statfs64 (__NR_Linux + 217)
930#define __NR_fstatfs64 (__NR_Linux + 218)
931#define __NR_sendfile64 (__NR_Linux + 219)
932#define __NR_timer_create (__NR_Linux + 220)
933#define __NR_timer_settime (__NR_Linux + 221)
934#define __NR_timer_gettime (__NR_Linux + 222)
935#define __NR_timer_getoverrun (__NR_Linux + 223)
936#define __NR_timer_delete (__NR_Linux + 224)
937#define __NR_clock_settime (__NR_Linux + 225)
938#define __NR_clock_gettime (__NR_Linux + 226)
939#define __NR_clock_getres (__NR_Linux + 227)
940#define __NR_clock_nanosleep (__NR_Linux + 228)
941#define __NR_tgkill (__NR_Linux + 229)
942#define __NR_utimes (__NR_Linux + 230)
943#define __NR_mbind (__NR_Linux + 231)
944#define __NR_get_mempolicy (__NR_Linux + 232)
945#define __NR_set_mempolicy (__NR_Linux + 233)
946#define __NR_mq_open (__NR_Linux + 234)
947#define __NR_mq_unlink (__NR_Linux + 235)
948#define __NR_mq_timedsend (__NR_Linux + 236)
949#define __NR_mq_timedreceive (__NR_Linux + 237)
950#define __NR_mq_notify (__NR_Linux + 238)
951#define __NR_mq_getsetattr (__NR_Linux + 239)
952#define __NR_vserver (__NR_Linux + 240)
953#define __NR_waitid (__NR_Linux + 241)
954/* #define __NR_sys_setaltroot (__NR_Linux + 242) */
955#define __NR_add_key (__NR_Linux + 243)
956#define __NR_request_key (__NR_Linux + 244)
957#define __NR_keyctl (__NR_Linux + 245)
958#define __NR_set_thread_area (__NR_Linux + 246)
959#define __NR_inotify_init (__NR_Linux + 247)
960#define __NR_inotify_add_watch (__NR_Linux + 248)
961#define __NR_inotify_rm_watch (__NR_Linux + 249)
962#define __NR_migrate_pages (__NR_Linux + 250)
963#define __NR_openat (__NR_Linux + 251)
964#define __NR_mkdirat (__NR_Linux + 252)
965#define __NR_mknodat (__NR_Linux + 253)
966#define __NR_fchownat (__NR_Linux + 254)
967#define __NR_futimesat (__NR_Linux + 255)
968#define __NR_newfstatat (__NR_Linux + 256)
969#define __NR_unlinkat (__NR_Linux + 257)
970#define __NR_renameat (__NR_Linux + 258)
971#define __NR_linkat (__NR_Linux + 259)
972#define __NR_symlinkat (__NR_Linux + 260)
973#define __NR_readlinkat (__NR_Linux + 261)
974#define __NR_fchmodat (__NR_Linux + 262)
975#define __NR_faccessat (__NR_Linux + 263)
976#define __NR_pselect6 (__NR_Linux + 264)
977#define __NR_ppoll (__NR_Linux + 265)
978#define __NR_unshare (__NR_Linux + 266)
979#define __NR_splice (__NR_Linux + 267)
980#define __NR_sync_file_range (__NR_Linux + 268)
981#define __NR_tee (__NR_Linux + 269)
982#define __NR_vmsplice (__NR_Linux + 270)
983#define __NR_move_pages (__NR_Linux + 271)
984#define __NR_set_robust_list (__NR_Linux + 272)
985#define __NR_get_robust_list (__NR_Linux + 273)
986#define __NR_kexec_load (__NR_Linux + 274)
987#define __NR_getcpu (__NR_Linux + 275)
988#define __NR_epoll_pwait (__NR_Linux + 276)
989#define __NR_ioprio_set (__NR_Linux + 277)
990#define __NR_ioprio_get (__NR_Linux + 278)
991#define __NR_utimensat (__NR_Linux + 279)
992#define __NR_signalfd (__NR_Linux + 280)
993#define __NR_timerfd (__NR_Linux + 281)
994#define __NR_eventfd (__NR_Linux + 282)
995#define __NR_fallocate (__NR_Linux + 283)
996#define __NR_timerfd_create (__NR_Linux + 284)
997#define __NR_timerfd_gettime (__NR_Linux + 285)
998#define __NR_timerfd_settime (__NR_Linux + 286)
999#define __NR_signalfd4 (__NR_Linux + 287)
1000#define __NR_eventfd2 (__NR_Linux + 288)
1001#define __NR_epoll_create1 (__NR_Linux + 289)
1002#define __NR_dup3 (__NR_Linux + 290)
1003#define __NR_pipe2 (__NR_Linux + 291)
1004#define __NR_inotify_init1 (__NR_Linux + 292)
1005#define __NR_preadv (__NR_Linux + 293)
1006#define __NR_pwritev (__NR_Linux + 294)
1007#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
1008#define __NR_perf_event_open (__NR_Linux + 296)
1009#define __NR_accept4 (__NR_Linux + 297)
1010#define __NR_recvmmsg (__NR_Linux + 298)
1011#define __NR_getdents64 (__NR_Linux + 299)
1012#define __NR_fanotify_init (__NR_Linux + 300)
1013#define __NR_fanotify_mark (__NR_Linux + 301)
1014#define __NR_prlimit64 (__NR_Linux + 302)
1015#define __NR_name_to_handle_at (__NR_Linux + 303)
1016#define __NR_open_by_handle_at (__NR_Linux + 304)
1017#define __NR_clock_adjtime (__NR_Linux + 305)
1018#define __NR_syncfs (__NR_Linux + 306)
1019#define __NR_sendmmsg (__NR_Linux + 307)
1020#define __NR_setns (__NR_Linux + 308)
1021#define __NR_process_vm_readv (__NR_Linux + 309)
1022#define __NR_process_vm_writev (__NR_Linux + 310)
1023#define __NR_kcmp (__NR_Linux + 311)
1024
1025/*
1026 * Offset of the last N32 flavoured syscall
1027 */
1028#define __NR_Linux_syscalls 311
1029
1030#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1031
1032#define __NR_N32_Linux 6000
1033#define __NR_N32_Linux_syscalls 311
1034
1035#endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 414c26920df8..8b28bc4e14ea 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -54,7 +54,6 @@ obj-$(CONFIG_CPU_MIPSR2) += spram.o
54 54
55obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o 55obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o
56obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o 56obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o
57obj-$(CONFIG_MIPS_APSP_KSPD) += kspd.o
58 57
59obj-$(CONFIG_I8259) += i8259.o 58obj-$(CONFIG_I8259) += i8259.o
60obj-$(CONFIG_IRQ_CPU) += irq_cpu.o 59obj-$(CONFIG_IRQ_CPU) += irq_cpu.o
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 6b30fb2caa67..0c4bce4882a6 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -12,7 +12,6 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/interrupt.h>
16#include <linux/kbuild.h> 15#include <linux/kbuild.h>
17#include <linux/suspend.h> 16#include <linux/suspend.h>
18#include <asm/ptrace.h> 17#include <asm/ptrace.h>
@@ -292,15 +291,6 @@ void output_signal_defined(void)
292 BLANK(); 291 BLANK();
293} 292}
294 293
295void output_irq_cpustat_t_defines(void)
296{
297 COMMENT("Linux irq_cpustat_t offsets.");
298 DEFINE(IC_SOFTIRQ_PENDING,
299 offsetof(irq_cpustat_t, __softirq_pending));
300 DEFINE(IC_IRQ_CPUSTAT_T, sizeof(irq_cpustat_t));
301 BLANK();
302}
303
304#ifdef CONFIG_CPU_CAVIUM_OCTEON 294#ifdef CONFIG_CPU_CAVIUM_OCTEON
305void output_octeon_cop2_state_defines(void) 295void output_octeon_cop2_state_defines(void)
306{ 296{
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index bc58bd10a607..b1fb7af3c350 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -142,7 +142,7 @@ int __cpuinitdata mips_dsp_disabled;
142 142
143static int __init dsp_disable(char *s) 143static int __init dsp_disable(char *s)
144{ 144{
145 cpu_data[0].ases &= ~MIPS_ASE_DSP; 145 cpu_data[0].ases &= ~(MIPS_ASE_DSP | MIPS_ASE_DSP2P);
146 mips_dsp_disabled = 1; 146 mips_dsp_disabled = 1;
147 147
148 return 1; 148 return 1;
@@ -429,6 +429,8 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
429 c->options |= MIPS_CPU_RIXI; 429 c->options |= MIPS_CPU_RIXI;
430 if (config3 & MIPS_CONF3_DSP) 430 if (config3 & MIPS_CONF3_DSP)
431 c->ases |= MIPS_ASE_DSP; 431 c->ases |= MIPS_ASE_DSP;
432 if (config3 & MIPS_CONF3_DSP2P)
433 c->ases |= MIPS_ASE_DSP2P;
432 if (config3 & MIPS_CONF3_VINT) 434 if (config3 & MIPS_CONF3_VINT)
433 c->options |= MIPS_CPU_VINT; 435 c->options |= MIPS_CPU_VINT;
434 if (config3 & MIPS_CONF3_VEIC) 436 if (config3 & MIPS_CONF3_VEIC)
@@ -1180,7 +1182,7 @@ __cpuinit void cpu_probe(void)
1180 c->options &= ~MIPS_CPU_FPU; 1182 c->options &= ~MIPS_CPU_FPU;
1181 1183
1182 if (mips_dsp_disabled) 1184 if (mips_dsp_disabled)
1183 c->ases &= ~MIPS_ASE_DSP; 1185 c->ases &= ~(MIPS_ASE_DSP | MIPS_ASE_DSP2P);
1184 1186
1185 if (c->options & MIPS_CPU_FPU) { 1187 if (c->options & MIPS_CPU_FPU) {
1186 c->fpu_id = cpu_get_fpu_id(); 1188 c->fpu_id = cpu_get_fpu_id();
@@ -1194,8 +1196,11 @@ __cpuinit void cpu_probe(void)
1194 } 1196 }
1195 } 1197 }
1196 1198
1197 if (cpu_has_mips_r2) 1199 if (cpu_has_mips_r2) {
1198 c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; 1200 c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
1201 /* R2 has Performance Counter Interrupt indicator */
1202 c->options |= MIPS_CPU_PCI;
1203 }
1199 else 1204 else
1200 c->srsets = 1; 1205 c->srsets = 1;
1201 1206
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
deleted file mode 100644
index b77f56bbb477..000000000000
--- a/arch/mips/kernel/kspd.c
+++ /dev/null
@@ -1,423 +0,0 @@
1/*
2 * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 *
17 */
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/sched.h>
21#include <linux/unistd.h>
22#include <linux/file.h>
23#include <linux/fdtable.h>
24#include <linux/fs.h>
25#include <linux/syscalls.h>
26#include <linux/workqueue.h>
27#include <linux/errno.h>
28#include <linux/list.h>
29
30#include <asm/vpe.h>
31#include <asm/rtlx.h>
32#include <asm/kspd.h>
33
34static struct workqueue_struct *workqueue;
35static struct work_struct work;
36
37extern unsigned long cpu_khz;
38
39struct mtsp_syscall {
40 int cmd;
41 unsigned char abi;
42 unsigned char size;
43};
44
45struct mtsp_syscall_ret {
46 int retval;
47 int errno;
48};
49
50struct mtsp_syscall_generic {
51 int arg0;
52 int arg1;
53 int arg2;
54 int arg3;
55 int arg4;
56 int arg5;
57 int arg6;
58};
59
60static struct list_head kspd_notifylist;
61static int sp_stopping;
62
63/* these should match with those in the SDE kit */
64#define MTSP_SYSCALL_BASE 0
65#define MTSP_SYSCALL_EXIT (MTSP_SYSCALL_BASE + 0)
66#define MTSP_SYSCALL_OPEN (MTSP_SYSCALL_BASE + 1)
67#define MTSP_SYSCALL_READ (MTSP_SYSCALL_BASE + 2)
68#define MTSP_SYSCALL_WRITE (MTSP_SYSCALL_BASE + 3)
69#define MTSP_SYSCALL_CLOSE (MTSP_SYSCALL_BASE + 4)
70#define MTSP_SYSCALL_LSEEK32 (MTSP_SYSCALL_BASE + 5)
71#define MTSP_SYSCALL_ISATTY (MTSP_SYSCALL_BASE + 6)
72#define MTSP_SYSCALL_GETTIME (MTSP_SYSCALL_BASE + 7)
73#define MTSP_SYSCALL_PIPEFREQ (MTSP_SYSCALL_BASE + 8)
74#define MTSP_SYSCALL_GETTOD (MTSP_SYSCALL_BASE + 9)
75#define MTSP_SYSCALL_IOCTL (MTSP_SYSCALL_BASE + 10)
76
77#define MTSP_O_RDONLY 0x0000
78#define MTSP_O_WRONLY 0x0001
79#define MTSP_O_RDWR 0x0002
80#define MTSP_O_NONBLOCK 0x0004
81#define MTSP_O_APPEND 0x0008
82#define MTSP_O_SHLOCK 0x0010
83#define MTSP_O_EXLOCK 0x0020
84#define MTSP_O_ASYNC 0x0040
85/* XXX: check which of these is actually O_SYNC vs O_DSYNC */
86#define MTSP_O_FSYNC O_SYNC
87#define MTSP_O_NOFOLLOW 0x0100
88#define MTSP_O_SYNC 0x0080
89#define MTSP_O_CREAT 0x0200
90#define MTSP_O_TRUNC 0x0400
91#define MTSP_O_EXCL 0x0800
92#define MTSP_O_BINARY 0x8000
93
94extern int tclimit;
95
96struct apsp_table {
97 int sp;
98 int ap;
99};
100
101/* we might want to do the mode flags too */
102struct apsp_table open_flags_table[] = {
103 { MTSP_O_RDWR, O_RDWR },
104 { MTSP_O_WRONLY, O_WRONLY },
105 { MTSP_O_CREAT, O_CREAT },
106 { MTSP_O_TRUNC, O_TRUNC },
107 { MTSP_O_NONBLOCK, O_NONBLOCK },
108 { MTSP_O_APPEND, O_APPEND },
109 { MTSP_O_NOFOLLOW, O_NOFOLLOW }
110};
111
112struct apsp_table syscall_command_table[] = {
113 { MTSP_SYSCALL_OPEN, __NR_open },
114 { MTSP_SYSCALL_CLOSE, __NR_close },
115 { MTSP_SYSCALL_READ, __NR_read },
116 { MTSP_SYSCALL_WRITE, __NR_write },
117 { MTSP_SYSCALL_LSEEK32, __NR_lseek },
118 { MTSP_SYSCALL_IOCTL, __NR_ioctl }
119};
120
121static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3)
122{
123 register long int _num __asm__("$2") = num;
124 register long int _arg0 __asm__("$4") = arg0;
125 register long int _arg1 __asm__("$5") = arg1;
126 register long int _arg2 __asm__("$6") = arg2;
127 register long int _arg3 __asm__("$7") = arg3;
128
129 mm_segment_t old_fs;
130
131 old_fs = get_fs();
132 set_fs(KERNEL_DS);
133
134 __asm__ __volatile__ (
135 " syscall \n"
136 : "=r" (_num), "=r" (_arg3)
137 : "r" (_num), "r" (_arg0), "r" (_arg1), "r" (_arg2), "r" (_arg3));
138
139 set_fs(old_fs);
140
141 /* $a3 is error flag */
142 if (_arg3)
143 return -_num;
144
145 return _num;
146}
147
148static int translate_syscall_command(int cmd)
149{
150 int i;
151 int ret = -1;
152
153 for (i = 0; i < ARRAY_SIZE(syscall_command_table); i++) {
154 if ((cmd == syscall_command_table[i].sp))
155 return syscall_command_table[i].ap;
156 }
157
158 return ret;
159}
160
161static unsigned int translate_open_flags(int flags)
162{
163 int i;
164 unsigned int ret = 0;
165
166 for (i = 0; i < ARRAY_SIZE(open_flags_table); i++) {
167 if( (flags & open_flags_table[i].sp) ) {
168 ret |= open_flags_table[i].ap;
169 }
170 }
171
172 return ret;
173}
174
175
176static int sp_setfsuidgid(uid_t uid, gid_t gid)
177{
178 struct cred *new;
179
180 new = prepare_creds();
181 if (!new)
182 return -ENOMEM;
183
184 new->fsuid = uid;
185 new->fsgid = gid;
186
187 commit_creds(new);
188
189 return 0;
190}
191
192/*
193 * Expects a request to be on the sysio channel. Reads it. Decides whether
194 * its a linux syscall and runs it, or whatever. Puts the return code back
195 * into the request and sends the whole thing back.
196 */
197void sp_work_handle_request(void)
198{
199 struct mtsp_syscall sc;
200 struct mtsp_syscall_generic generic;
201 struct mtsp_syscall_ret ret;
202 struct kspd_notifications *n;
203 unsigned long written;
204 mm_segment_t old_fs;
205 struct timeval tv;
206 struct timezone tz;
207 int err, cmd;
208
209 char *vcwd;
210 int size;
211
212 ret.retval = -1;
213
214 old_fs = get_fs();
215 set_fs(KERNEL_DS);
216
217 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &sc, sizeof(struct mtsp_syscall))) {
218 set_fs(old_fs);
219 printk(KERN_ERR "Expected request but nothing to read\n");
220 return;
221 }
222
223 size = sc.size;
224
225 if (size) {
226 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &generic, size)) {
227 set_fs(old_fs);
228 printk(KERN_ERR "Expected request but nothing to read\n");
229 return;
230 }
231 }
232
233 /* Run the syscall at the privilege of the user who loaded the
234 SP program */
235
236 if (vpe_getuid(tclimit)) {
237 err = sp_setfsuidgid(vpe_getuid(tclimit), vpe_getgid(tclimit));
238 if (!err)
239 pr_err("Change of creds failed\n");
240 }
241
242 switch (sc.cmd) {
243 /* needs the flags argument translating from SDE kit to
244 linux */
245 case MTSP_SYSCALL_PIPEFREQ:
246 ret.retval = cpu_khz * 1000;
247 ret.errno = 0;
248 break;
249
250 case MTSP_SYSCALL_GETTOD:
251 memset(&tz, 0, sizeof(tz));
252 if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv,
253 (int)&tz, 0, 0)) == 0)
254 ret.retval = tv.tv_sec;
255 break;
256
257 case MTSP_SYSCALL_EXIT:
258 list_for_each_entry(n, &kspd_notifylist, list)
259 n->kspd_sp_exit(tclimit);
260 sp_stopping = 1;
261
262 printk(KERN_DEBUG "KSPD got exit syscall from SP exitcode %d\n",
263 generic.arg0);
264 break;
265
266 case MTSP_SYSCALL_OPEN:
267 generic.arg1 = translate_open_flags(generic.arg1);
268
269 vcwd = vpe_getcwd(tclimit);
270
271 /* change to cwd of the process that loaded the SP program */
272 old_fs = get_fs();
273 set_fs(KERNEL_DS);
274 sys_chdir(vcwd);
275 set_fs(old_fs);
276
277 sc.cmd = __NR_open;
278
279 /* fall through */
280
281 default:
282 if ((sc.cmd >= __NR_Linux) &&
283 (sc.cmd <= (__NR_Linux + __NR_Linux_syscalls)) )
284 cmd = sc.cmd;
285 else
286 cmd = translate_syscall_command(sc.cmd);
287
288 if (cmd >= 0) {
289 ret.retval = sp_syscall(cmd, generic.arg0, generic.arg1,
290 generic.arg2, generic.arg3);
291 } else
292 printk(KERN_WARNING
293 "KSPD: Unknown SP syscall number %d\n", sc.cmd);
294 break;
295 } /* switch */
296
297 if (vpe_getuid(tclimit)) {
298 err = sp_setfsuidgid(0, 0);
299 if (!err)
300 pr_err("restoring old creds failed\n");
301 }
302
303 old_fs = get_fs();
304 set_fs(KERNEL_DS);
305 written = rtlx_write(RTLX_CHANNEL_SYSIO, &ret, sizeof(ret));
306 set_fs(old_fs);
307 if (written < sizeof(ret))
308 printk("KSPD: sp_work_handle_request failed to send to SP\n");
309}
310
311static void sp_cleanup(void)
312{
313 struct files_struct *files = current->files;
314 int i, j;
315 struct fdtable *fdt;
316
317 j = 0;
318
319 /*
320 * It is safe to dereference the fd table without RCU or
321 * ->file_lock
322 */
323 fdt = files_fdtable(files);
324 for (;;) {
325 unsigned long set;
326 i = j * BITS_PER_LONG;
327 if (i >= fdt->max_fds)
328 break;
329 set = fdt->open_fds[j++];
330 while (set) {
331 if (set & 1) {
332 struct file * file = xchg(&fdt->fd[i], NULL);
333 if (file)
334 filp_close(file, files);
335 }
336 i++;
337 set >>= 1;
338 }
339 }
340
341 /* Put daemon cwd back to root to avoid umount problems */
342 sys_chdir("/");
343}
344
345static int channel_open;
346
347/* the work handler */
348static void sp_work(struct work_struct *unused)
349{
350 if (!channel_open) {
351 if( rtlx_open(RTLX_CHANNEL_SYSIO, 1) != 0) {
352 printk("KSPD: unable to open sp channel\n");
353 sp_stopping = 1;
354 } else {
355 channel_open++;
356 printk(KERN_DEBUG "KSPD: SP channel opened\n");
357 }
358 } else {
359 /* wait for some data, allow it to sleep */
360 rtlx_read_poll(RTLX_CHANNEL_SYSIO, 1);
361
362 /* Check we haven't been woken because we are stopping */
363 if (!sp_stopping)
364 sp_work_handle_request();
365 }
366
367 if (!sp_stopping)
368 queue_work(workqueue, &work);
369 else
370 sp_cleanup();
371}
372
373static void startwork(int vpe)
374{
375 sp_stopping = channel_open = 0;
376
377 if (workqueue == NULL) {
378 if ((workqueue = create_singlethread_workqueue("kspd")) == NULL) {
379 printk(KERN_ERR "unable to start kspd\n");
380 return;
381 }
382
383 INIT_WORK(&work, sp_work);
384 }
385
386 queue_work(workqueue, &work);
387}
388
389static void stopwork(int vpe)
390{
391 sp_stopping = 1;
392
393 printk(KERN_DEBUG "KSPD: SP stopping\n");
394}
395
396void kspd_notify(struct kspd_notifications *notify)
397{
398 list_add(&notify->list, &kspd_notifylist);
399}
400
401static struct vpe_notifications notify;
402static int kspd_module_init(void)
403{
404 INIT_LIST_HEAD(&kspd_notifylist);
405
406 notify.start = startwork;
407 notify.stop = stopwork;
408 vpe_notify(tclimit, &notify);
409
410 return 0;
411}
412
413static void kspd_module_exit(void)
414{
415
416}
417
418module_init(kspd_module_init);
419module_exit(kspd_module_exit);
420
421MODULE_DESCRIPTION("MIPS KSPD");
422MODULE_AUTHOR("Elizabeth Oldham, MIPS Technologies, Inc.");
423MODULE_LICENSE("GPL");
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index 2f28d3b55687..a9b995dcf691 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -28,6 +28,8 @@
28#include <asm/time.h> /* For perf_irq */ 28#include <asm/time.h> /* For perf_irq */
29 29
30#define MIPS_MAX_HWEVENTS 4 30#define MIPS_MAX_HWEVENTS 4
31#define MIPS_TCS_PER_COUNTER 2
32#define MIPS_CPUID_TO_COUNTER_MASK (MIPS_TCS_PER_COUNTER - 1)
31 33
32struct cpu_hw_events { 34struct cpu_hw_events {
33 /* Array of events on this cpu. */ 35 /* Array of events on this cpu. */
@@ -78,7 +80,6 @@ struct mips_perf_event {
78static struct mips_perf_event raw_event; 80static struct mips_perf_event raw_event;
79static DEFINE_MUTEX(raw_event_mutex); 81static DEFINE_MUTEX(raw_event_mutex);
80 82
81#define UNSUPPORTED_PERF_EVENT_ID 0xffffffff
82#define C(x) PERF_COUNT_HW_CACHE_##x 83#define C(x) PERF_COUNT_HW_CACHE_##x
83 84
84struct mips_pmu { 85struct mips_pmu {
@@ -109,13 +110,20 @@ static struct mips_pmu mipspmu;
109#define M_PERFCTL_INTERRUPT_ENABLE (1 << 4) 110#define M_PERFCTL_INTERRUPT_ENABLE (1 << 4)
110#define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5) 111#define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5)
111#define M_PERFCTL_VPEID(vpe) ((vpe) << 16) 112#define M_PERFCTL_VPEID(vpe) ((vpe) << 16)
113
114#ifdef CONFIG_CPU_BMIPS5000
115#define M_PERFCTL_MT_EN(filter) 0
116#else /* !CONFIG_CPU_BMIPS5000 */
112#define M_PERFCTL_MT_EN(filter) ((filter) << 20) 117#define M_PERFCTL_MT_EN(filter) ((filter) << 20)
118#endif /* CONFIG_CPU_BMIPS5000 */
119
113#define M_TC_EN_ALL M_PERFCTL_MT_EN(0) 120#define M_TC_EN_ALL M_PERFCTL_MT_EN(0)
114#define M_TC_EN_VPE M_PERFCTL_MT_EN(1) 121#define M_TC_EN_VPE M_PERFCTL_MT_EN(1)
115#define M_TC_EN_TC M_PERFCTL_MT_EN(2) 122#define M_TC_EN_TC M_PERFCTL_MT_EN(2)
116#define M_PERFCTL_TCID(tcid) ((tcid) << 22) 123#define M_PERFCTL_TCID(tcid) ((tcid) << 22)
117#define M_PERFCTL_WIDE (1 << 30) 124#define M_PERFCTL_WIDE (1 << 30)
118#define M_PERFCTL_MORE (1 << 31) 125#define M_PERFCTL_MORE (1 << 31)
126#define M_PERFCTL_TC (1 << 30)
119 127
120#define M_PERFCTL_COUNT_EVENT_WHENEVER (M_PERFCTL_EXL | \ 128#define M_PERFCTL_COUNT_EVENT_WHENEVER (M_PERFCTL_EXL | \
121 M_PERFCTL_KERNEL | \ 129 M_PERFCTL_KERNEL | \
@@ -131,21 +139,21 @@ static struct mips_pmu mipspmu;
131#define M_PERFCTL_EVENT_MASK 0xfe0 139#define M_PERFCTL_EVENT_MASK 0xfe0
132 140
133 141
134#ifdef CONFIG_MIPS_MT_SMP 142#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
135static int cpu_has_mipsmt_pertccounters; 143static int cpu_has_mipsmt_pertccounters;
136 144
137static DEFINE_RWLOCK(pmuint_rwlock); 145static DEFINE_RWLOCK(pmuint_rwlock);
138 146
147#if defined(CONFIG_CPU_BMIPS5000)
148#define vpe_id() (cpu_has_mipsmt_pertccounters ? \
149 0 : (smp_processor_id() & MIPS_CPUID_TO_COUNTER_MASK))
150#else
139/* 151/*
140 * FIXME: For VSMP, vpe_id() is redefined for Perf-events, because 152 * FIXME: For VSMP, vpe_id() is redefined for Perf-events, because
141 * cpu_data[cpuid].vpe_id reports 0 for _both_ CPUs. 153 * cpu_data[cpuid].vpe_id reports 0 for _both_ CPUs.
142 */ 154 */
143#if defined(CONFIG_HW_PERF_EVENTS)
144#define vpe_id() (cpu_has_mipsmt_pertccounters ? \
145 0 : smp_processor_id())
146#else
147#define vpe_id() (cpu_has_mipsmt_pertccounters ? \ 155#define vpe_id() (cpu_has_mipsmt_pertccounters ? \
148 0 : cpu_data[smp_processor_id()].vpe_id) 156 0 : smp_processor_id())
149#endif 157#endif
150 158
151/* Copied from op_model_mipsxx.c */ 159/* Copied from op_model_mipsxx.c */
@@ -162,10 +170,10 @@ static unsigned int counters_total_to_per_cpu(unsigned int counters)
162 return counters >> vpe_shift(); 170 return counters >> vpe_shift();
163} 171}
164 172
165#else /* !CONFIG_MIPS_MT_SMP */ 173#else /* !CONFIG_MIPS_PERF_SHARED_TC_COUNTERS */
166#define vpe_id() 0 174#define vpe_id() 0
167 175
168#endif /* CONFIG_MIPS_MT_SMP */ 176#endif /* CONFIG_MIPS_PERF_SHARED_TC_COUNTERS */
169 177
170static void resume_local_counters(void); 178static void resume_local_counters(void);
171static void pause_local_counters(void); 179static void pause_local_counters(void);
@@ -340,6 +348,11 @@ static void mipsxx_pmu_enable_event(struct hw_perf_event *evt, int idx)
340 (evt->config_base & M_PERFCTL_CONFIG_MASK) | 348 (evt->config_base & M_PERFCTL_CONFIG_MASK) |
341 /* Make sure interrupt enabled. */ 349 /* Make sure interrupt enabled. */
342 M_PERFCTL_INTERRUPT_ENABLE; 350 M_PERFCTL_INTERRUPT_ENABLE;
351 if (IS_ENABLED(CONFIG_CPU_BMIPS5000))
352 /* enable the counter for the calling thread */
353 cpuc->saved_ctrl[idx] |=
354 (1 << (12 + vpe_id())) | M_PERFCTL_TC;
355
343 /* 356 /*
344 * We do not actually let the counter run. Leave it until start(). 357 * We do not actually let the counter run. Leave it until start().
345 */ 358 */
@@ -509,7 +522,7 @@ static void mipspmu_read(struct perf_event *event)
509 522
510static void mipspmu_enable(struct pmu *pmu) 523static void mipspmu_enable(struct pmu *pmu)
511{ 524{
512#ifdef CONFIG_MIPS_MT_SMP 525#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
513 write_unlock(&pmuint_rwlock); 526 write_unlock(&pmuint_rwlock);
514#endif 527#endif
515 resume_local_counters(); 528 resume_local_counters();
@@ -529,7 +542,7 @@ static void mipspmu_enable(struct pmu *pmu)
529static void mipspmu_disable(struct pmu *pmu) 542static void mipspmu_disable(struct pmu *pmu)
530{ 543{
531 pause_local_counters(); 544 pause_local_counters();
532#ifdef CONFIG_MIPS_MT_SMP 545#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
533 write_lock(&pmuint_rwlock); 546 write_lock(&pmuint_rwlock);
534#endif 547#endif
535} 548}
@@ -664,13 +677,10 @@ static unsigned int mipspmu_perf_event_encode(const struct mips_perf_event *pev)
664 677
665static const struct mips_perf_event *mipspmu_map_general_event(int idx) 678static const struct mips_perf_event *mipspmu_map_general_event(int idx)
666{ 679{
667 const struct mips_perf_event *pev;
668
669 pev = ((*mipspmu.general_event_map)[idx].event_id ==
670 UNSUPPORTED_PERF_EVENT_ID ? ERR_PTR(-EOPNOTSUPP) :
671 &(*mipspmu.general_event_map)[idx]);
672 680
673 return pev; 681 if ((*mipspmu.general_event_map)[idx].cntr_mask == 0)
682 return ERR_PTR(-EOPNOTSUPP);
683 return &(*mipspmu.general_event_map)[idx];
674} 684}
675 685
676static const struct mips_perf_event *mipspmu_map_cache_event(u64 config) 686static const struct mips_perf_event *mipspmu_map_cache_event(u64 config)
@@ -695,7 +705,7 @@ static const struct mips_perf_event *mipspmu_map_cache_event(u64 config)
695 [cache_op] 705 [cache_op]
696 [cache_result]); 706 [cache_result]);
697 707
698 if (pev->event_id == UNSUPPORTED_PERF_EVENT_ID) 708 if (pev->cntr_mask == 0)
699 return ERR_PTR(-EOPNOTSUPP); 709 return ERR_PTR(-EOPNOTSUPP);
700 710
701 return pev; 711 return pev;
@@ -800,11 +810,8 @@ static const struct mips_perf_event mipsxxcore_event_map
800 [PERF_COUNT_HW_MAX] = { 810 [PERF_COUNT_HW_MAX] = {
801 [PERF_COUNT_HW_CPU_CYCLES] = { 0x00, CNTR_EVEN | CNTR_ODD, P }, 811 [PERF_COUNT_HW_CPU_CYCLES] = { 0x00, CNTR_EVEN | CNTR_ODD, P },
802 [PERF_COUNT_HW_INSTRUCTIONS] = { 0x01, CNTR_EVEN | CNTR_ODD, T }, 812 [PERF_COUNT_HW_INSTRUCTIONS] = { 0x01, CNTR_EVEN | CNTR_ODD, T },
803 [PERF_COUNT_HW_CACHE_REFERENCES] = { UNSUPPORTED_PERF_EVENT_ID },
804 [PERF_COUNT_HW_CACHE_MISSES] = { UNSUPPORTED_PERF_EVENT_ID },
805 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x02, CNTR_EVEN, T }, 813 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x02, CNTR_EVEN, T },
806 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x02, CNTR_ODD, T }, 814 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x02, CNTR_ODD, T },
807 [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID },
808}; 815};
809 816
810/* 74K core has different branch event code. */ 817/* 74K core has different branch event code. */
@@ -812,11 +819,8 @@ static const struct mips_perf_event mipsxx74Kcore_event_map
812 [PERF_COUNT_HW_MAX] = { 819 [PERF_COUNT_HW_MAX] = {
813 [PERF_COUNT_HW_CPU_CYCLES] = { 0x00, CNTR_EVEN | CNTR_ODD, P }, 820 [PERF_COUNT_HW_CPU_CYCLES] = { 0x00, CNTR_EVEN | CNTR_ODD, P },
814 [PERF_COUNT_HW_INSTRUCTIONS] = { 0x01, CNTR_EVEN | CNTR_ODD, T }, 821 [PERF_COUNT_HW_INSTRUCTIONS] = { 0x01, CNTR_EVEN | CNTR_ODD, T },
815 [PERF_COUNT_HW_CACHE_REFERENCES] = { UNSUPPORTED_PERF_EVENT_ID },
816 [PERF_COUNT_HW_CACHE_MISSES] = { UNSUPPORTED_PERF_EVENT_ID },
817 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x27, CNTR_EVEN, T }, 822 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x27, CNTR_EVEN, T },
818 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x27, CNTR_ODD, T }, 823 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x27, CNTR_ODD, T },
819 [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID },
820}; 824};
821 825
822static const struct mips_perf_event octeon_event_map[PERF_COUNT_HW_MAX] = { 826static const struct mips_perf_event octeon_event_map[PERF_COUNT_HW_MAX] = {
@@ -829,6 +833,13 @@ static const struct mips_perf_event octeon_event_map[PERF_COUNT_HW_MAX] = {
829 [PERF_COUNT_HW_BUS_CYCLES] = { 0x25, CNTR_ALL }, 833 [PERF_COUNT_HW_BUS_CYCLES] = { 0x25, CNTR_ALL },
830}; 834};
831 835
836static const struct mips_perf_event bmips5000_event_map
837 [PERF_COUNT_HW_MAX] = {
838 [PERF_COUNT_HW_CPU_CYCLES] = { 0x00, CNTR_EVEN | CNTR_ODD, T },
839 [PERF_COUNT_HW_INSTRUCTIONS] = { 0x01, CNTR_EVEN | CNTR_ODD, T },
840 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x02, CNTR_ODD, T },
841};
842
832/* 24K/34K/1004K cores can share the same cache event map. */ 843/* 24K/34K/1004K cores can share the same cache event map. */
833static const struct mips_perf_event mipsxxcore_cache_map 844static const struct mips_perf_event mipsxxcore_cache_map
834 [PERF_COUNT_HW_CACHE_MAX] 845 [PERF_COUNT_HW_CACHE_MAX]
@@ -849,10 +860,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
849 [C(RESULT_ACCESS)] = { 0x0a, CNTR_EVEN, T }, 860 [C(RESULT_ACCESS)] = { 0x0a, CNTR_EVEN, T },
850 [C(RESULT_MISS)] = { 0x0b, CNTR_EVEN | CNTR_ODD, T }, 861 [C(RESULT_MISS)] = { 0x0b, CNTR_EVEN | CNTR_ODD, T },
851 }, 862 },
852 [C(OP_PREFETCH)] = {
853 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
854 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
855 },
856}, 863},
857[C(L1I)] = { 864[C(L1I)] = {
858 [C(OP_READ)] = { 865 [C(OP_READ)] = {
@@ -869,7 +876,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
869 * Note that MIPS has only "hit" events countable for 876 * Note that MIPS has only "hit" events countable for
870 * the prefetch operation. 877 * the prefetch operation.
871 */ 878 */
872 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
873 }, 879 },
874}, 880},
875[C(LL)] = { 881[C(LL)] = {
@@ -881,10 +887,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
881 [C(RESULT_ACCESS)] = { 0x15, CNTR_ODD, P }, 887 [C(RESULT_ACCESS)] = { 0x15, CNTR_ODD, P },
882 [C(RESULT_MISS)] = { 0x16, CNTR_EVEN, P }, 888 [C(RESULT_MISS)] = { 0x16, CNTR_EVEN, P },
883 }, 889 },
884 [C(OP_PREFETCH)] = {
885 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
886 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
887 },
888}, 890},
889[C(DTLB)] = { 891[C(DTLB)] = {
890 [C(OP_READ)] = { 892 [C(OP_READ)] = {
@@ -895,10 +897,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
895 [C(RESULT_ACCESS)] = { 0x06, CNTR_EVEN, T }, 897 [C(RESULT_ACCESS)] = { 0x06, CNTR_EVEN, T },
896 [C(RESULT_MISS)] = { 0x06, CNTR_ODD, T }, 898 [C(RESULT_MISS)] = { 0x06, CNTR_ODD, T },
897 }, 899 },
898 [C(OP_PREFETCH)] = {
899 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
900 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
901 },
902}, 900},
903[C(ITLB)] = { 901[C(ITLB)] = {
904 [C(OP_READ)] = { 902 [C(OP_READ)] = {
@@ -909,10 +907,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
909 [C(RESULT_ACCESS)] = { 0x05, CNTR_EVEN, T }, 907 [C(RESULT_ACCESS)] = { 0x05, CNTR_EVEN, T },
910 [C(RESULT_MISS)] = { 0x05, CNTR_ODD, T }, 908 [C(RESULT_MISS)] = { 0x05, CNTR_ODD, T },
911 }, 909 },
912 [C(OP_PREFETCH)] = {
913 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
914 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
915 },
916}, 910},
917[C(BPU)] = { 911[C(BPU)] = {
918 /* Using the same code for *HW_BRANCH* */ 912 /* Using the same code for *HW_BRANCH* */
@@ -924,24 +918,6 @@ static const struct mips_perf_event mipsxxcore_cache_map
924 [C(RESULT_ACCESS)] = { 0x02, CNTR_EVEN, T }, 918 [C(RESULT_ACCESS)] = { 0x02, CNTR_EVEN, T },
925 [C(RESULT_MISS)] = { 0x02, CNTR_ODD, T }, 919 [C(RESULT_MISS)] = { 0x02, CNTR_ODD, T },
926 }, 920 },
927 [C(OP_PREFETCH)] = {
928 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
929 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
930 },
931},
932[C(NODE)] = {
933 [C(OP_READ)] = {
934 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
935 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
936 },
937 [C(OP_WRITE)] = {
938 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
939 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
940 },
941 [C(OP_PREFETCH)] = {
942 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
943 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
944 },
945}, 921},
946}; 922};
947 923
@@ -965,10 +941,6 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
965 [C(RESULT_ACCESS)] = { 0x17, CNTR_ODD, T }, 941 [C(RESULT_ACCESS)] = { 0x17, CNTR_ODD, T },
966 [C(RESULT_MISS)] = { 0x18, CNTR_ODD, T }, 942 [C(RESULT_MISS)] = { 0x18, CNTR_ODD, T },
967 }, 943 },
968 [C(OP_PREFETCH)] = {
969 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
970 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
971 },
972}, 944},
973[C(L1I)] = { 945[C(L1I)] = {
974 [C(OP_READ)] = { 946 [C(OP_READ)] = {
@@ -985,7 +957,6 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
985 * Note that MIPS has only "hit" events countable for 957 * Note that MIPS has only "hit" events countable for
986 * the prefetch operation. 958 * the prefetch operation.
987 */ 959 */
988 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
989 }, 960 },
990}, 961},
991[C(LL)] = { 962[C(LL)] = {
@@ -997,25 +968,6 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
997 [C(RESULT_ACCESS)] = { 0x1c, CNTR_ODD, P }, 968 [C(RESULT_ACCESS)] = { 0x1c, CNTR_ODD, P },
998 [C(RESULT_MISS)] = { 0x1d, CNTR_EVEN | CNTR_ODD, P }, 969 [C(RESULT_MISS)] = { 0x1d, CNTR_EVEN | CNTR_ODD, P },
999 }, 970 },
1000 [C(OP_PREFETCH)] = {
1001 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1002 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1003 },
1004},
1005[C(DTLB)] = {
1006 /* 74K core does not have specific DTLB events. */
1007 [C(OP_READ)] = {
1008 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1009 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1010 },
1011 [C(OP_WRITE)] = {
1012 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1013 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1014 },
1015 [C(OP_PREFETCH)] = {
1016 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1017 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1018 },
1019}, 971},
1020[C(ITLB)] = { 972[C(ITLB)] = {
1021 [C(OP_READ)] = { 973 [C(OP_READ)] = {
@@ -1026,10 +978,6 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
1026 [C(RESULT_ACCESS)] = { 0x04, CNTR_EVEN, T }, 978 [C(RESULT_ACCESS)] = { 0x04, CNTR_EVEN, T },
1027 [C(RESULT_MISS)] = { 0x04, CNTR_ODD, T }, 979 [C(RESULT_MISS)] = { 0x04, CNTR_ODD, T },
1028 }, 980 },
1029 [C(OP_PREFETCH)] = {
1030 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1031 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1032 },
1033}, 981},
1034[C(BPU)] = { 982[C(BPU)] = {
1035 /* Using the same code for *HW_BRANCH* */ 983 /* Using the same code for *HW_BRANCH* */
@@ -1041,23 +989,64 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
1041 [C(RESULT_ACCESS)] = { 0x27, CNTR_EVEN, T }, 989 [C(RESULT_ACCESS)] = { 0x27, CNTR_EVEN, T },
1042 [C(RESULT_MISS)] = { 0x27, CNTR_ODD, T }, 990 [C(RESULT_MISS)] = { 0x27, CNTR_ODD, T },
1043 }, 991 },
1044 [C(OP_PREFETCH)] = { 992},
1045 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, 993};
1046 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, 994
995/* BMIPS5000 */
996static const struct mips_perf_event bmips5000_cache_map
997 [PERF_COUNT_HW_CACHE_MAX]
998 [PERF_COUNT_HW_CACHE_OP_MAX]
999 [PERF_COUNT_HW_CACHE_RESULT_MAX] = {
1000[C(L1D)] = {
1001 /*
1002 * Like some other architectures (e.g. ARM), the performance
1003 * counters don't differentiate between read and write
1004 * accesses/misses, so this isn't strictly correct, but it's the
1005 * best we can do. Writes and reads get combined.
1006 */
1007 [C(OP_READ)] = {
1008 [C(RESULT_ACCESS)] = { 12, CNTR_EVEN, T },
1009 [C(RESULT_MISS)] = { 12, CNTR_ODD, T },
1010 },
1011 [C(OP_WRITE)] = {
1012 [C(RESULT_ACCESS)] = { 12, CNTR_EVEN, T },
1013 [C(RESULT_MISS)] = { 12, CNTR_ODD, T },
1047 }, 1014 },
1048}, 1015},
1049[C(NODE)] = { 1016[C(L1I)] = {
1050 [C(OP_READ)] = { 1017 [C(OP_READ)] = {
1051 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1018 [C(RESULT_ACCESS)] = { 10, CNTR_EVEN, T },
1052 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1019 [C(RESULT_MISS)] = { 10, CNTR_ODD, T },
1053 }, 1020 },
1054 [C(OP_WRITE)] = { 1021 [C(OP_WRITE)] = {
1055 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1022 [C(RESULT_ACCESS)] = { 10, CNTR_EVEN, T },
1056 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1023 [C(RESULT_MISS)] = { 10, CNTR_ODD, T },
1057 }, 1024 },
1058 [C(OP_PREFETCH)] = { 1025 [C(OP_PREFETCH)] = {
1059 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1026 [C(RESULT_ACCESS)] = { 23, CNTR_EVEN, T },
1060 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, 1027 /*
1028 * Note that MIPS has only "hit" events countable for
1029 * the prefetch operation.
1030 */
1031 },
1032},
1033[C(LL)] = {
1034 [C(OP_READ)] = {
1035 [C(RESULT_ACCESS)] = { 28, CNTR_EVEN, P },
1036 [C(RESULT_MISS)] = { 28, CNTR_ODD, P },
1037 },
1038 [C(OP_WRITE)] = {
1039 [C(RESULT_ACCESS)] = { 28, CNTR_EVEN, P },
1040 [C(RESULT_MISS)] = { 28, CNTR_ODD, P },
1041 },
1042},
1043[C(BPU)] = {
1044 /* Using the same code for *HW_BRANCH* */
1045 [C(OP_READ)] = {
1046 [C(RESULT_MISS)] = { 0x02, CNTR_ODD, T },
1047 },
1048 [C(OP_WRITE)] = {
1049 [C(RESULT_MISS)] = { 0x02, CNTR_ODD, T },
1061 }, 1050 },
1062}, 1051},
1063}; 1052};
@@ -1074,39 +1063,14 @@ static const struct mips_perf_event octeon_cache_map
1074 }, 1063 },
1075 [C(OP_WRITE)] = { 1064 [C(OP_WRITE)] = {
1076 [C(RESULT_ACCESS)] = { 0x30, CNTR_ALL }, 1065 [C(RESULT_ACCESS)] = { 0x30, CNTR_ALL },
1077 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1078 },
1079 [C(OP_PREFETCH)] = {
1080 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1081 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1082 }, 1066 },
1083}, 1067},
1084[C(L1I)] = { 1068[C(L1I)] = {
1085 [C(OP_READ)] = { 1069 [C(OP_READ)] = {
1086 [C(RESULT_ACCESS)] = { 0x18, CNTR_ALL }, 1070 [C(RESULT_ACCESS)] = { 0x18, CNTR_ALL },
1087 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1088 },
1089 [C(OP_WRITE)] = {
1090 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1091 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1092 }, 1071 },
1093 [C(OP_PREFETCH)] = { 1072 [C(OP_PREFETCH)] = {
1094 [C(RESULT_ACCESS)] = { 0x19, CNTR_ALL }, 1073 [C(RESULT_ACCESS)] = { 0x19, CNTR_ALL },
1095 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1096 },
1097},
1098[C(LL)] = {
1099 [C(OP_READ)] = {
1100 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1101 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1102 },
1103 [C(OP_WRITE)] = {
1104 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1105 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1106 },
1107 [C(OP_PREFETCH)] = {
1108 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1109 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1110 }, 1074 },
1111}, 1075},
1112[C(DTLB)] = { 1076[C(DTLB)] = {
@@ -1115,46 +1079,16 @@ static const struct mips_perf_event octeon_cache_map
1115 * read and write. 1079 * read and write.
1116 */ 1080 */
1117 [C(OP_READ)] = { 1081 [C(OP_READ)] = {
1118 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1119 [C(RESULT_MISS)] = { 0x35, CNTR_ALL }, 1082 [C(RESULT_MISS)] = { 0x35, CNTR_ALL },
1120 }, 1083 },
1121 [C(OP_WRITE)] = { 1084 [C(OP_WRITE)] = {
1122 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1123 [C(RESULT_MISS)] = { 0x35, CNTR_ALL }, 1085 [C(RESULT_MISS)] = { 0x35, CNTR_ALL },
1124 }, 1086 },
1125 [C(OP_PREFETCH)] = {
1126 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1127 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1128 },
1129}, 1087},
1130[C(ITLB)] = { 1088[C(ITLB)] = {
1131 [C(OP_READ)] = { 1089 [C(OP_READ)] = {
1132 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1133 [C(RESULT_MISS)] = { 0x37, CNTR_ALL }, 1090 [C(RESULT_MISS)] = { 0x37, CNTR_ALL },
1134 }, 1091 },
1135 [C(OP_WRITE)] = {
1136 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1137 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1138 },
1139 [C(OP_PREFETCH)] = {
1140 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1141 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1142 },
1143},
1144[C(BPU)] = {
1145 /* Using the same code for *HW_BRANCH* */
1146 [C(OP_READ)] = {
1147 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1148 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1149 },
1150 [C(OP_WRITE)] = {
1151 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1152 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1153 },
1154 [C(OP_PREFETCH)] = {
1155 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1156 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1157 },
1158}, 1092},
1159}; 1093};
1160 1094
@@ -1304,7 +1238,7 @@ static int mipsxx_pmu_handle_shared_irq(void)
1304 int handled = IRQ_NONE; 1238 int handled = IRQ_NONE;
1305 struct pt_regs *regs; 1239 struct pt_regs *regs;
1306 1240
1307 if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26))) 1241 if (cpu_has_perf_cntr_intr_bit && !(read_c0_cause() & CAUSEF_PCI))
1308 return handled; 1242 return handled;
1309 /* 1243 /*
1310 * First we pause the local counters, so that when we are locked 1244 * First we pause the local counters, so that when we are locked
@@ -1314,7 +1248,7 @@ static int mipsxx_pmu_handle_shared_irq(void)
1314 * See also mipsxx_pmu_start(). 1248 * See also mipsxx_pmu_start().
1315 */ 1249 */
1316 pause_local_counters(); 1250 pause_local_counters();
1317#ifdef CONFIG_MIPS_MT_SMP 1251#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
1318 read_lock(&pmuint_rwlock); 1252 read_lock(&pmuint_rwlock);
1319#endif 1253#endif
1320 1254
@@ -1346,7 +1280,7 @@ static int mipsxx_pmu_handle_shared_irq(void)
1346 if (handled == IRQ_HANDLED) 1280 if (handled == IRQ_HANDLED)
1347 irq_work_run(); 1281 irq_work_run();
1348 1282
1349#ifdef CONFIG_MIPS_MT_SMP 1283#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
1350 read_unlock(&pmuint_rwlock); 1284 read_unlock(&pmuint_rwlock);
1351#endif 1285#endif
1352 resume_local_counters(); 1286 resume_local_counters();
@@ -1391,6 +1325,11 @@ static irqreturn_t mipsxx_pmu_handle_irq(int irq, void *dev)
1391#define IS_RANGE_V_1004K_EVENT(r) ((r) == 47) 1325#define IS_RANGE_V_1004K_EVENT(r) ((r) == 47)
1392#endif 1326#endif
1393 1327
1328/* BMIPS5000 */
1329#define IS_BOTH_COUNTERS_BMIPS5000_EVENT(b) \
1330 ((b) == 0 || (b) == 1)
1331
1332
1394/* 1333/*
1395 * User can use 0-255 raw events, where 0-127 for the events of even 1334 * User can use 0-255 raw events, where 0-127 for the events of even
1396 * counters, and 128-255 for odd counters. Note that bit 7 is used to 1335 * counters, and 128-255 for odd counters. Note that bit 7 is used to
@@ -1461,6 +1400,12 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
1461 raw_event.range = T; 1400 raw_event.range = T;
1462#endif 1401#endif
1463 break; 1402 break;
1403 case CPU_BMIPS5000:
1404 if (IS_BOTH_COUNTERS_BMIPS5000_EVENT(base_id))
1405 raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
1406 else
1407 raw_event.cntr_mask =
1408 raw_id > 127 ? CNTR_ODD : CNTR_EVEN;
1464 } 1409 }
1465 1410
1466 return &raw_event; 1411 return &raw_event;
@@ -1513,7 +1458,7 @@ init_hw_perf_events(void)
1513 return -ENODEV; 1458 return -ENODEV;
1514 } 1459 }
1515 1460
1516#ifdef CONFIG_MIPS_MT_SMP 1461#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
1517 cpu_has_mipsmt_pertccounters = read_c0_config7() & (1<<19); 1462 cpu_has_mipsmt_pertccounters = read_c0_config7() & (1<<19);
1518 if (!cpu_has_mipsmt_pertccounters) 1463 if (!cpu_has_mipsmt_pertccounters)
1519 counters = counters_total_to_per_cpu(counters); 1464 counters = counters_total_to_per_cpu(counters);
@@ -1572,6 +1517,11 @@ init_hw_perf_events(void)
1572 mipspmu.cache_event_map = &octeon_cache_map; 1517 mipspmu.cache_event_map = &octeon_cache_map;
1573 mipspmu.map_raw_event = octeon_pmu_map_raw_event; 1518 mipspmu.map_raw_event = octeon_pmu_map_raw_event;
1574 break; 1519 break;
1520 case CPU_BMIPS5000:
1521 mipspmu.name = "BMIPS5000";
1522 mipspmu.general_event_map = &bmips5000_event_map;
1523 mipspmu.cache_event_map = &bmips5000_cache_map;
1524 break;
1575 default: 1525 default:
1576 pr_cont("Either hardware does not support performance " 1526 pr_cont("Either hardware does not support performance "
1577 "counters, or not yet implemented.\n"); 1527 "counters, or not yet implemented.\n");
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 5542817c1b49..07dff54f2ce8 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -64,14 +64,17 @@ static int show_cpuinfo(struct seq_file *m, void *v)
64 cpu_data[n].watch_reg_masks[i]); 64 cpu_data[n].watch_reg_masks[i]);
65 seq_printf(m, "]\n"); 65 seq_printf(m, "]\n");
66 } 66 }
67 seq_printf(m, "ASEs implemented\t:%s%s%s%s%s%s\n", 67
68 cpu_has_mips16 ? " mips16" : "", 68 seq_printf(m, "ASEs implemented\t:");
69 cpu_has_mdmx ? " mdmx" : "", 69 if (cpu_has_mips16) seq_printf(m, "%s", " mips16");
70 cpu_has_mips3d ? " mips3d" : "", 70 if (cpu_has_mdmx) seq_printf(m, "%s", " mdmx");
71 cpu_has_smartmips ? " smartmips" : "", 71 if (cpu_has_mips3d) seq_printf(m, "%s", " mips3d");
72 cpu_has_dsp ? " dsp" : "", 72 if (cpu_has_smartmips) seq_printf(m, "%s", " smartmips");
73 cpu_has_mipsmt ? " mt" : "" 73 if (cpu_has_dsp) seq_printf(m, "%s", " dsp");
74 ); 74 if (cpu_has_dsp2) seq_printf(m, "%s", " dsp2");
75 if (cpu_has_mipsmt) seq_printf(m, "%s", " mt");
76 seq_printf(m, "\n");
77
75 seq_printf(m, "shadow register sets\t: %d\n", 78 seq_printf(m, "shadow register sets\t: %d\n",
76 cpu_data[n].srsets); 79 cpu_data[n].srsets);
77 seq_printf(m, "kscratch registers\t: %d\n", 80 seq_printf(m, "kscratch registers\t: %d\n",
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index df243a64f430..007ccbe1e264 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,6 +1,13 @@
1#include <asm/asm-offsets.h> 1#include <asm/asm-offsets.h>
2#include <asm/page.h> 2#include <asm/page.h>
3#include <asm/thread_info.h> 3#include <asm/thread_info.h>
4
5/*
6 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
7 * ensure that it has .bss alignment (64K).
8 */
9#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
10
4#include <asm-generic/vmlinux.lds.h> 11#include <asm-generic/vmlinux.lds.h>
5 12
6#undef mips 13#undef mips
@@ -119,11 +126,21 @@ SECTIONS
119 } 126 }
120 127
121 PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) 128 PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
122 . = ALIGN(PAGE_SIZE); 129 /*
130 * Align to 64K in attempt to eliminate holes before the
131 * .bss..swapper_pg_dir section at the start of .bss. This
132 * also satisfies PAGE_SIZE alignment as the largest page size
133 * allowed is 64K.
134 */
135 . = ALIGN(0x10000);
123 __init_end = .; 136 __init_end = .;
124 /* freed after init ends here */ 137 /* freed after init ends here */
125 138
126 BSS_SECTION(0, 0, 0) 139 /*
140 * Force .bss to 64K alignment so that .bss..swapper_pg_dir
141 * gets that alignment. .sbss should be empty, so there will be
142 * no holes after __init_end. */
143 BSS_SECTION(0, 0x10000, 0)
127 144
128 _end = . ; 145 _end = . ;
129 146
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index f6f91523cb1c..eec690af6581 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -50,7 +50,6 @@
50#include <asm/mips_mt.h> 50#include <asm/mips_mt.h>
51#include <asm/processor.h> 51#include <asm/processor.h>
52#include <asm/vpe.h> 52#include <asm/vpe.h>
53#include <asm/kspd.h>
54 53
55typedef void *vpe_handle; 54typedef void *vpe_handle;
56 55
@@ -69,11 +68,6 @@ static char module_name[] = "vpe";
69static int major; 68static int major;
70static const int minor = 1; /* fixed for now */ 69static const int minor = 1; /* fixed for now */
71 70
72#ifdef CONFIG_MIPS_APSP_KSPD
73static struct kspd_notifications kspd_events;
74static int kspd_events_reqd;
75#endif
76
77/* grab the likely amount of memory we will need. */ 71/* grab the likely amount of memory we will need. */
78#ifdef CONFIG_MIPS_VPE_LOADER_TOM 72#ifdef CONFIG_MIPS_VPE_LOADER_TOM
79#define P_SIZE (2 * 1024 * 1024) 73#define P_SIZE (2 * 1024 * 1024)
@@ -1101,14 +1095,6 @@ static int vpe_open(struct inode *inode, struct file *filp)
1101 v->uid = filp->f_cred->fsuid; 1095 v->uid = filp->f_cred->fsuid;
1102 v->gid = filp->f_cred->fsgid; 1096 v->gid = filp->f_cred->fsgid;
1103 1097
1104#ifdef CONFIG_MIPS_APSP_KSPD
1105 /* get kspd to tell us when a syscall_exit happens */
1106 if (!kspd_events_reqd) {
1107 kspd_notify(&kspd_events);
1108 kspd_events_reqd++;
1109 }
1110#endif
1111
1112 v->cwd[0] = 0; 1098 v->cwd[0] = 0;
1113 ret = getcwd(v->cwd, VPE_PATH_MAX); 1099 ret = getcwd(v->cwd, VPE_PATH_MAX);
1114 if (ret < 0) 1100 if (ret < 0)
@@ -1341,13 +1327,6 @@ char *vpe_getcwd(int index)
1341 1327
1342EXPORT_SYMBOL(vpe_getcwd); 1328EXPORT_SYMBOL(vpe_getcwd);
1343 1329
1344#ifdef CONFIG_MIPS_APSP_KSPD
1345static void kspd_sp_exit( int sp_id)
1346{
1347 cleanup_tc(get_tc(sp_id));
1348}
1349#endif
1350
1351static ssize_t store_kill(struct device *dev, struct device_attribute *attr, 1330static ssize_t store_kill(struct device *dev, struct device_attribute *attr,
1352 const char *buf, size_t len) 1331 const char *buf, size_t len)
1353{ 1332{
@@ -1585,9 +1564,6 @@ out_reenable:
1585 emt(mtflags); 1564 emt(mtflags);
1586 local_irq_restore(flags); 1565 local_irq_restore(flags);
1587 1566
1588#ifdef CONFIG_MIPS_APSP_KSPD
1589 kspd_events.kspd_sp_exit = kspd_sp_exit;
1590#endif
1591 return 0; 1567 return 0;
1592 1568
1593out_class: 1569out_class:
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 1a85ba92eb5c..be9acb2b959d 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -469,19 +469,20 @@ void __init_refok free_initmem(void)
469#ifndef CONFIG_MIPS_PGD_C0_CONTEXT 469#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
470unsigned long pgd_current[NR_CPUS]; 470unsigned long pgd_current[NR_CPUS];
471#endif 471#endif
472/*
473 * On 64-bit we've got three-level pagetables with a slightly
474 * different layout ...
475 */
476#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
477 472
478/* 473/*
479 * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER 474 * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER
480 * are constants. So we use the variants from asm-offset.h until that gcc 475 * are constants. So we use the variants from asm-offset.h until that gcc
481 * will officially be retired. 476 * will officially be retired.
477 *
478 * Align swapper_pg_dir in to 64K, allows its address to be loaded
479 * with a single LUI instruction in the TLB handlers. If we used
480 * __aligned(64K), its size would get rounded up to the alignment
481 * size, and waste space. So we place it in its own section and align
482 * it in the linker script.
482 */ 483 */
483pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); 484pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(.bss..swapper_pg_dir);
484#ifndef __PAGETABLE_PMD_FOLDED 485#ifndef __PAGETABLE_PMD_FOLDED
485pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER); 486pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss;
486#endif 487#endif
487pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); 488pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned_bss;
diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c
index cda4e300eb0a..25407794edb4 100644
--- a/arch/mips/mm/pgtable-64.c
+++ b/arch/mips/mm/pgtable-64.c
@@ -26,17 +26,17 @@ void pgd_init(unsigned long page)
26 p = (unsigned long *) page; 26 p = (unsigned long *) page;
27 end = p + PTRS_PER_PGD; 27 end = p + PTRS_PER_PGD;
28 28
29 while (p < end) { 29 do {
30 p[0] = entry; 30 p[0] = entry;
31 p[1] = entry; 31 p[1] = entry;
32 p[2] = entry; 32 p[2] = entry;
33 p[3] = entry; 33 p[3] = entry;
34 p[4] = entry; 34 p[4] = entry;
35 p[5] = entry;
36 p[6] = entry;
37 p[7] = entry;
38 p += 8; 35 p += 8;
39 } 36 p[-3] = entry;
37 p[-2] = entry;
38 p[-1] = entry;
39 } while (p != end);
40} 40}
41 41
42#ifndef __PAGETABLE_PMD_FOLDED 42#ifndef __PAGETABLE_PMD_FOLDED
@@ -47,17 +47,17 @@ void pmd_init(unsigned long addr, unsigned long pagetable)
47 p = (unsigned long *) addr; 47 p = (unsigned long *) addr;
48 end = p + PTRS_PER_PMD; 48 end = p + PTRS_PER_PMD;
49 49
50 while (p < end) { 50 do {
51 p[0] = pagetable; 51 p[0] = pagetable;
52 p[1] = pagetable; 52 p[1] = pagetable;
53 p[2] = pagetable; 53 p[2] = pagetable;
54 p[3] = pagetable; 54 p[3] = pagetable;
55 p[4] = pagetable; 55 p[4] = pagetable;
56 p[5] = pagetable;
57 p[6] = pagetable;
58 p[7] = pagetable;
59 p += 8; 56 p += 8;
60 } 57 p[-3] = pagetable;
58 p[-2] = pagetable;
59 p[-1] = pagetable;
60 } while (p != end);
61} 61}
62#endif 62#endif
63 63
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e09d49256908..658a520364ce 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -599,8 +599,7 @@ static __cpuinit __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
599 unsigned int reg) 599 unsigned int reg)
600{ 600{
601 if (cpu_has_rixi) { 601 if (cpu_has_rixi) {
602 UASM_i_SRL(p, reg, reg, ilog2(_PAGE_NO_EXEC)); 602 UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
603 UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
604 } else { 603 } else {
605#ifdef CONFIG_64BIT_PHYS_ADDR 604#ifdef CONFIG_64BIT_PHYS_ADDR
606 uasm_i_dsrl_safe(p, reg, reg, ilog2(_PAGE_GLOBAL)); 605 uasm_i_dsrl_safe(p, reg, reg, ilog2(_PAGE_GLOBAL));
@@ -1019,11 +1018,9 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp,
1019 uasm_i_ld(p, tmp, 0, ptep); /* get even pte */ 1018 uasm_i_ld(p, tmp, 0, ptep); /* get even pte */
1020 uasm_i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */ 1019 uasm_i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
1021 if (cpu_has_rixi) { 1020 if (cpu_has_rixi) {
1022 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC)); 1021 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL));
1023 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC));
1024 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
1025 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ 1022 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
1026 UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); 1023 UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL));
1027 } else { 1024 } else {
1028 uasm_i_dsrl_safe(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */ 1025 uasm_i_dsrl_safe(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */
1029 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ 1026 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
@@ -1046,13 +1043,11 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp,
1046 if (r45k_bvahwbug()) 1043 if (r45k_bvahwbug())
1047 build_tlb_probe_entry(p); 1044 build_tlb_probe_entry(p);
1048 if (cpu_has_rixi) { 1045 if (cpu_has_rixi) {
1049 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_NO_EXEC)); 1046 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL));
1050 UASM_i_SRL(p, ptep, ptep, ilog2(_PAGE_NO_EXEC));
1051 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
1052 if (r4k_250MHZhwbug()) 1047 if (r4k_250MHZhwbug())
1053 UASM_i_MTC0(p, 0, C0_ENTRYLO0); 1048 UASM_i_MTC0(p, 0, C0_ENTRYLO0);
1054 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ 1049 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */
1055 UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); 1050 UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL));
1056 } else { 1051 } else {
1057 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */ 1052 UASM_i_SRL(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */
1058 if (r4k_250MHZhwbug()) 1053 if (r4k_250MHZhwbug())
@@ -1212,13 +1207,9 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l,
1212 UASM_i_LW(p, odd, sizeof(pte_t), ptr); /* get odd pte */ 1207 UASM_i_LW(p, odd, sizeof(pte_t), ptr); /* get odd pte */
1213 } 1208 }
1214 if (cpu_has_rixi) { 1209 if (cpu_has_rixi) {
1215 uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_NO_EXEC)); 1210 uasm_i_drotr(p, even, even, ilog2(_PAGE_GLOBAL));
1216 uasm_i_dsrl_safe(p, odd, odd, ilog2(_PAGE_NO_EXEC));
1217 uasm_i_drotr(p, even, even,
1218 ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
1219 UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */ 1211 UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */
1220 uasm_i_drotr(p, odd, odd, 1212 uasm_i_drotr(p, odd, odd, ilog2(_PAGE_GLOBAL));
1221 ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC));
1222 } else { 1213 } else {
1223 uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_GLOBAL)); 1214 uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_GLOBAL));
1224 UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */ 1215 UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index 819622f93e9c..9a1a2244522a 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -8,7 +8,8 @@
8#define PCID 4 8#define PCID 4
9 9
10/* This table is filled in by interrogating the PIIX4 chip */ 10/* This table is filled in by interrogating the PIIX4 chip */
11static char pci_irq[5] __initdata; 11static char pci_irq[5] __devinitdata = {
12};
12 13
13static char irq_tab[][5] __initdata = { 14static char irq_tab[][5] __initdata = {
14 /* INTA INTB INTC INTD */ 15 /* INTA INTB INTC INTD */
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index b2d4f492d782..9cb9d43a3a0e 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -118,26 +118,6 @@ static struct resource sc26xx_rsrc[] = {
118 } 118 }
119}; 119};
120 120
121static unsigned int sc26xx_data[2] = {
122 /* DTR | RTS | DSR | CTS | DCD | RI */
123 (8 << 0) | (4 << 4) | (6 << 8) | (0 << 12) | (6 << 16) | (0 << 20),
124 (3 << 0) | (2 << 4) | (1 << 8) | (2 << 12) | (3 << 16) | (4 << 20)
125};
126
127static struct platform_device sc26xx_pdev = {
128 .name = "SC26xx",
129 .num_resources = ARRAY_SIZE(sc26xx_rsrc),
130 .resource = sc26xx_rsrc,
131 .dev = {
132 .platform_data = sc26xx_data,
133 }
134};
135
136#warning "Please try migrate to use new driver SCCNXP and report the status" \
137 "in the linux-serial mailing list."
138
139/* The code bellow is a replacement of SC26XX to SCCNXP */
140#if 0
141#include <linux/platform_data/sccnxp.h> 121#include <linux/platform_data/sccnxp.h>
142 122
143static struct sccnxp_pdata sccnxp_data = { 123static struct sccnxp_pdata sccnxp_data = {
@@ -155,15 +135,14 @@ static struct sccnxp_pdata sccnxp_data = {
155 MCTRL_SIG(RNG_IP, LINE_IP3), 135 MCTRL_SIG(RNG_IP, LINE_IP3),
156}; 136};
157 137
158static struct platform_device sc2681_pdev = { 138static struct platform_device sc26xx_pdev = {
159 .name = "sc2681", 139 .name = "sc2681",
160 .resource = sc2xxx_rsrc, 140 .resource = sc26xx_rsrc,
161 .num_resources = ARRAY_SIZE(sc2xxx_rsrc), 141 .num_resources = ARRAY_SIZE(sc26xx_rsrc),
162 .dev = { 142 .dev = {
163 .platform_data = &sccnxp_data, 143 .platform_data = &sccnxp_data,
164 }, 144 },
165}; 145};
166#endif
167 146
168static u32 a20r_ack_hwint(void) 147static u32 a20r_ack_hwint(void)
169{ 148{
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4e2e1cc505ab..d1ea7ce0b4cb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -530,9 +530,18 @@
530 *(.scommon) \ 530 *(.scommon) \
531 } 531 }
532 532
533/*
534 * Allow archectures to redefine BSS_FIRST_SECTIONS to add extra
535 * sections to the front of bss.
536 */
537#ifndef BSS_FIRST_SECTIONS
538#define BSS_FIRST_SECTIONS
539#endif
540
533#define BSS(bss_align) \ 541#define BSS(bss_align) \
534 . = ALIGN(bss_align); \ 542 . = ALIGN(bss_align); \
535 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ 543 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
544 BSS_FIRST_SECTIONS \
536 *(.bss..page_aligned) \ 545 *(.bss..page_aligned) \
537 *(.dynbss) \ 546 *(.dynbss) \
538 *(.bss) \ 547 *(.bss) \