diff options
Diffstat (limited to 'arch')
333 files changed, 6406 insertions, 4349 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 7e55ea66c6d4..84caf50725b5 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
25 | bool | 25 | bool |
26 | default y | 26 | default y |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ad6173651995..be133f1f75a4 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -277,7 +277,7 @@ osf_fstatfs(unsigned long fd, struct osf_statfs __user *buffer, unsigned long bu | |||
277 | retval = -EBADF; | 277 | retval = -EBADF; |
278 | file = fget(fd); | 278 | file = fget(fd); |
279 | if (file) { | 279 | if (file) { |
280 | retval = do_osf_statfs(file->f_dentry, buffer, bufsiz); | 280 | retval = do_osf_statfs(file->f_path.dentry, buffer, bufsiz); |
281 | fput(file); | 281 | fput(file); |
282 | } | 282 | } |
283 | return retval; | 283 | return retval; |
@@ -979,7 +979,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
979 | long timeout; | 979 | long timeout; |
980 | int ret = -EINVAL; | 980 | int ret = -EINVAL; |
981 | struct fdtable *fdt; | 981 | struct fdtable *fdt; |
982 | int max_fdset; | 982 | int max_fds; |
983 | 983 | ||
984 | timeout = MAX_SCHEDULE_TIMEOUT; | 984 | timeout = MAX_SCHEDULE_TIMEOUT; |
985 | if (tvp) { | 985 | if (tvp) { |
@@ -1003,9 +1003,9 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
1003 | 1003 | ||
1004 | rcu_read_lock(); | 1004 | rcu_read_lock(); |
1005 | fdt = files_fdtable(current->files); | 1005 | fdt = files_fdtable(current->files); |
1006 | max_fdset = fdt->max_fdset; | 1006 | max_fds = fdt->max_fds; |
1007 | rcu_read_unlock(); | 1007 | rcu_read_unlock(); |
1008 | if (n < 0 || n > max_fdset) | 1008 | if (n < 0 || n > max_fds) |
1009 | goto out_nofds; | 1009 | goto out_nofds; |
1010 | 1010 | ||
1011 | /* | 1011 | /* |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 63e7c0c582df..6783c2e5512d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -74,6 +74,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
74 | config RWSEM_XCHGADD_ALGORITHM | 74 | config RWSEM_XCHGADD_ALGORITHM |
75 | bool | 75 | bool |
76 | 76 | ||
77 | config ARCH_HAS_ILOG2_U32 | ||
78 | bool | ||
79 | default n | ||
80 | |||
81 | config ARCH_HAS_ILOG2_U64 | ||
82 | bool | ||
83 | default n | ||
84 | |||
77 | config GENERIC_HWEIGHT | 85 | config GENERIC_HWEIGHT |
78 | bool | 86 | bool |
79 | default y | 87 | default y |
diff --git a/arch/arm/mach-at91rm9200/at91sam9260_devices.c b/arch/arm/mach-at91rm9200/at91sam9260_devices.c index a6c596dc4516..f42d3a40ec3c 100644 --- a/arch/arm/mach-at91rm9200/at91sam9260_devices.c +++ b/arch/arm/mach-at91rm9200/at91sam9260_devices.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/arch/gpio.h> | 18 | #include <asm/arch/gpio.h> |
19 | #include <asm/arch/at91sam9260.h> | 19 | #include <asm/arch/at91sam9260.h> |
20 | #include <asm/arch/at91sam926x_mc.h> | 20 | #include <asm/arch/at91sam926x_mc.h> |
21 | #include <asm/arch/at91sam9260_matrix.h> | ||
21 | 22 | ||
22 | #include "generic.h" | 23 | #include "generic.h" |
23 | 24 | ||
diff --git a/arch/arm/mach-at91rm9200/board-sam9260ek.c b/arch/arm/mach-at91rm9200/board-sam9260ek.c index ffca9bdec37b..da5d58ac870b 100644 --- a/arch/arm/mach-at91rm9200/board-sam9260ek.c +++ b/arch/arm/mach-at91rm9200/board-sam9260ek.c | |||
@@ -119,6 +119,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
119 | * MACB Ethernet device | 119 | * MACB Ethernet device |
120 | */ | 120 | */ |
121 | static struct __initdata eth_platform_data ek_macb_data = { | 121 | static struct __initdata eth_platform_data ek_macb_data = { |
122 | .phy_irq_pin = AT91_PIN_PA7, | ||
122 | .is_rmii = 1, | 123 | .is_rmii = 1, |
123 | }; | 124 | }; |
124 | 125 | ||
diff --git a/arch/arm/mach-pnx4008/Makefile b/arch/arm/mach-pnx4008/Makefile index b457ca0a431a..777564c90a12 100644 --- a/arch/arm/mach-pnx4008/Makefile +++ b/arch/arm/mach-pnx4008/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := core.o irq.o time.o clock.o gpio.o serial.o dma.o | 5 | obj-y := core.o irq.o time.o clock.o gpio.o serial.o dma.o i2c.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c new file mode 100644 index 000000000000..6f308827c4fe --- /dev/null +++ b/arch/arm/mach-pnx4008/i2c.c | |||
@@ -0,0 +1,167 @@ | |||
1 | /* | ||
2 | * I2C initialization for PNX4008. | ||
3 | * | ||
4 | * Author: Vitaly Wool <vitalywool@gmail.com> | ||
5 | * | ||
6 | * 2005-2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/i2c-pnx.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <asm/arch/platform.h> | ||
18 | #include <asm/arch/i2c.h> | ||
19 | |||
20 | static int set_clock_run(struct platform_device *pdev) | ||
21 | { | ||
22 | struct clk *clk; | ||
23 | char name[10]; | ||
24 | int retval = 0; | ||
25 | |||
26 | snprintf(name, 10, "i2c%d_ck", pdev->id); | ||
27 | clk = clk_get(&pdev->dev, name); | ||
28 | if (!IS_ERR(clk)) { | ||
29 | clk_set_rate(clk, 1); | ||
30 | clk_put(clk); | ||
31 | } else | ||
32 | retval = -ENOENT; | ||
33 | |||
34 | return retval; | ||
35 | } | ||
36 | |||
37 | static int set_clock_stop(struct platform_device *pdev) | ||
38 | { | ||
39 | struct clk *clk; | ||
40 | char name[10]; | ||
41 | int retval = 0; | ||
42 | |||
43 | snprintf(name, 10, "i2c%d_ck", pdev->id); | ||
44 | clk = clk_get(&pdev->dev, name); | ||
45 | if (!IS_ERR(clk)) { | ||
46 | clk_set_rate(clk, 0); | ||
47 | clk_put(clk); | ||
48 | } else | ||
49 | retval = -ENOENT; | ||
50 | |||
51 | return retval; | ||
52 | } | ||
53 | |||
54 | static int i2c_pnx_suspend(struct platform_device *pdev, pm_message_t state) | ||
55 | { | ||
56 | int retval = 0; | ||
57 | #ifdef CONFIG_PM | ||
58 | retval = set_clock_run(pdev); | ||
59 | #endif | ||
60 | return retval; | ||
61 | } | ||
62 | |||
63 | static int i2c_pnx_resume(struct platform_device *pdev) | ||
64 | { | ||
65 | int retval = 0; | ||
66 | #ifdef CONFIG_PM | ||
67 | retval = set_clock_run(pdev); | ||
68 | #endif | ||
69 | return retval; | ||
70 | } | ||
71 | |||
72 | static u32 calculate_input_freq(struct platform_device *pdev) | ||
73 | { | ||
74 | return HCLK_MHZ; | ||
75 | } | ||
76 | |||
77 | |||
78 | static struct i2c_pnx_algo_data pnx_algo_data0 = { | ||
79 | .base = PNX4008_I2C1_BASE, | ||
80 | .irq = I2C_1_INT, | ||
81 | }; | ||
82 | |||
83 | static struct i2c_pnx_algo_data pnx_algo_data1 = { | ||
84 | .base = PNX4008_I2C2_BASE, | ||
85 | .irq = I2C_2_INT, | ||
86 | }; | ||
87 | |||
88 | static struct i2c_pnx_algo_data pnx_algo_data2 = { | ||
89 | .base = (PNX4008_USB_CONFIG_BASE + 0x300), | ||
90 | .irq = USB_I2C_INT, | ||
91 | }; | ||
92 | |||
93 | static struct i2c_adapter pnx_adapter0 = { | ||
94 | .name = I2C_CHIP_NAME "0", | ||
95 | .algo_data = &pnx_algo_data0, | ||
96 | }; | ||
97 | static struct i2c_adapter pnx_adapter1 = { | ||
98 | .name = I2C_CHIP_NAME "1", | ||
99 | .algo_data = &pnx_algo_data1, | ||
100 | }; | ||
101 | |||
102 | static struct i2c_adapter pnx_adapter2 = { | ||
103 | .name = "USB-I2C", | ||
104 | .algo_data = &pnx_algo_data2, | ||
105 | }; | ||
106 | |||
107 | static struct i2c_pnx_data i2c0_data = { | ||
108 | .suspend = i2c_pnx_suspend, | ||
109 | .resume = i2c_pnx_resume, | ||
110 | .calculate_input_freq = calculate_input_freq, | ||
111 | .set_clock_run = set_clock_run, | ||
112 | .set_clock_stop = set_clock_stop, | ||
113 | .adapter = &pnx_adapter0, | ||
114 | }; | ||
115 | |||
116 | static struct i2c_pnx_data i2c1_data = { | ||
117 | .suspend = i2c_pnx_suspend, | ||
118 | .resume = i2c_pnx_resume, | ||
119 | .calculate_input_freq = calculate_input_freq, | ||
120 | .set_clock_run = set_clock_run, | ||
121 | .set_clock_stop = set_clock_stop, | ||
122 | .adapter = &pnx_adapter1, | ||
123 | }; | ||
124 | |||
125 | static struct i2c_pnx_data i2c2_data = { | ||
126 | .suspend = i2c_pnx_suspend, | ||
127 | .resume = i2c_pnx_resume, | ||
128 | .calculate_input_freq = calculate_input_freq, | ||
129 | .set_clock_run = set_clock_run, | ||
130 | .set_clock_stop = set_clock_stop, | ||
131 | .adapter = &pnx_adapter2, | ||
132 | }; | ||
133 | |||
134 | static struct platform_device i2c0_device = { | ||
135 | .name = "pnx-i2c", | ||
136 | .id = 0, | ||
137 | .dev = { | ||
138 | .platform_data = &i2c0_data, | ||
139 | }, | ||
140 | }; | ||
141 | |||
142 | static struct platform_device i2c1_device = { | ||
143 | .name = "pnx-i2c", | ||
144 | .id = 1, | ||
145 | .dev = { | ||
146 | .platform_data = &i2c1_data, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static struct platform_device i2c2_device = { | ||
151 | .name = "pnx-i2c", | ||
152 | .id = 2, | ||
153 | .dev = { | ||
154 | .platform_data = &i2c2_data, | ||
155 | }, | ||
156 | }; | ||
157 | |||
158 | static struct platform_device *devices[] __initdata = { | ||
159 | &i2c0_device, | ||
160 | &i2c1_device, | ||
161 | &i2c2_device, | ||
162 | }; | ||
163 | |||
164 | void __init pnx4008_register_i2c_devices(void) | ||
165 | { | ||
166 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
167 | } | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 68c67053f479..84d3fe76e94e 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -141,6 +141,19 @@ struct platform_device realview_smc91x_device = { | |||
141 | .resource = realview_smc91x_resources, | 141 | .resource = realview_smc91x_resources, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct resource realview_i2c_resource = { | ||
145 | .start = REALVIEW_I2C_BASE, | ||
146 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, | ||
147 | .flags = IORESOURCE_MEM, | ||
148 | }; | ||
149 | |||
150 | struct platform_device realview_i2c_device = { | ||
151 | .name = "versatile-i2c", | ||
152 | .id = -1, | ||
153 | .num_resources = 1, | ||
154 | .resource = &realview_i2c_resource, | ||
155 | }; | ||
156 | |||
144 | #define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET) | 157 | #define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET) |
145 | 158 | ||
146 | static unsigned int realview_mmc_status(struct device *dev) | 159 | static unsigned int realview_mmc_status(struct device *dev) |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 93e86d9f439c..2b53420f9c1b 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -108,6 +108,7 @@ static struct amba_device name##_device = { \ | |||
108 | 108 | ||
109 | extern struct platform_device realview_flash_device; | 109 | extern struct platform_device realview_flash_device; |
110 | extern struct platform_device realview_smc91x_device; | 110 | extern struct platform_device realview_smc91x_device; |
111 | extern struct platform_device realview_i2c_device; | ||
111 | extern struct mmc_platform_data realview_mmc0_plat_data; | 112 | extern struct mmc_platform_data realview_mmc0_plat_data; |
112 | extern struct mmc_platform_data realview_mmc1_plat_data; | 113 | extern struct mmc_platform_data realview_mmc1_plat_data; |
113 | extern struct clk realview_clcd_clk; | 114 | extern struct clk realview_clcd_clk; |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 84a959530fb6..9741b4d3c9cf 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -155,6 +155,7 @@ static void __init realview_eb_init(void) | |||
155 | 155 | ||
156 | platform_device_register(&realview_flash_device); | 156 | platform_device_register(&realview_flash_device); |
157 | platform_device_register(&realview_smc91x_device); | 157 | platform_device_register(&realview_smc91x_device); |
158 | platform_device_register(&realview_i2c_device); | ||
158 | 159 | ||
159 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 160 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
160 | struct amba_device *d = amba_devs[i]; | 161 | struct amba_device *d = amba_devs[i]; |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 57196947559f..bf71507c76fd 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -325,6 +325,19 @@ static struct platform_device smc91x_device = { | |||
325 | .resource = smc91x_resources, | 325 | .resource = smc91x_resources, |
326 | }; | 326 | }; |
327 | 327 | ||
328 | static struct resource versatile_i2c_resource = { | ||
329 | .start = VERSATILE_I2C_BASE, | ||
330 | .end = VERSATILE_I2C_BASE + SZ_4K - 1, | ||
331 | .flags = IORESOURCE_MEM, | ||
332 | }; | ||
333 | |||
334 | static struct platform_device versatile_i2c_device = { | ||
335 | .name = "versatile-i2c", | ||
336 | .id = -1, | ||
337 | .num_resources = 1, | ||
338 | .resource = &versatile_i2c_resource, | ||
339 | }; | ||
340 | |||
328 | #define VERSATILE_SYSMCI (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) | 341 | #define VERSATILE_SYSMCI (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) |
329 | 342 | ||
330 | unsigned int mmc_status(struct device *dev) | 343 | unsigned int mmc_status(struct device *dev) |
@@ -775,6 +788,7 @@ void __init versatile_init(void) | |||
775 | clk_register(&versatile_clcd_clk); | 788 | clk_register(&versatile_clcd_clk); |
776 | 789 | ||
777 | platform_device_register(&versatile_flash_device); | 790 | platform_device_register(&versatile_flash_device); |
791 | platform_device_register(&versatile_i2c_device); | ||
778 | platform_device_register(&smc91x_device); | 792 | platform_device_register(&smc91x_device); |
779 | 793 | ||
780 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 794 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index c14fe918bc4c..74eba8b5a8ca 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig | |||
@@ -41,6 +41,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
41 | config RWSEM_XCHGADD_ALGORITHM | 41 | config RWSEM_XCHGADD_ALGORITHM |
42 | bool | 42 | bool |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default n | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default n | ||
51 | |||
44 | config GENERIC_HWEIGHT | 52 | config GENERIC_HWEIGHT |
45 | bool | 53 | bool |
46 | default y | 54 | default y |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 5f1694eea842..bb059a4e1df9 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -45,6 +45,14 @@ config GENERIC_TIME | |||
45 | config RWSEM_XCHGADD_ALGORITHM | 45 | config RWSEM_XCHGADD_ALGORITHM |
46 | bool | 46 | bool |
47 | 47 | ||
48 | config ARCH_HAS_ILOG2_U32 | ||
49 | bool | ||
50 | default n | ||
51 | |||
52 | config ARCH_HAS_ILOG2_U64 | ||
53 | bool | ||
54 | default n | ||
55 | |||
48 | config GENERIC_BUST_SPINLOCK | 56 | config GENERIC_BUST_SPINLOCK |
49 | bool | 57 | bool |
50 | 58 | ||
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index cced73c58115..32b361f31c2c 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -7,20 +7,83 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/clk.h> | ||
11 | #include <linux/etherdevice.h> | ||
10 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/types.h> | ||
11 | 17 | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/setup.h> | ||
12 | #include <asm/arch/board.h> | 20 | #include <asm/arch/board.h> |
13 | #include <asm/arch/init.h> | 21 | #include <asm/arch/init.h> |
14 | 22 | ||
15 | struct eth_platform_data __initdata eth0_data = { | 23 | struct eth_addr { |
16 | .valid = 1, | 24 | u8 addr[6]; |
17 | .mii_phy_addr = 0x10, | ||
18 | .is_rmii = 0, | ||
19 | .hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb }, | ||
20 | }; | 25 | }; |
21 | 26 | ||
27 | static struct eth_addr __initdata hw_addr[2]; | ||
28 | |||
29 | static struct eth_platform_data __initdata eth_data[2]; | ||
22 | extern struct lcdc_platform_data atstk1000_fb0_data; | 30 | extern struct lcdc_platform_data atstk1000_fb0_data; |
23 | 31 | ||
32 | /* | ||
33 | * The next two functions should go away as the boot loader is | ||
34 | * supposed to initialize the macb address registers with a valid | ||
35 | * ethernet address. But we need to keep it around for a while until | ||
36 | * we can be reasonably sure the boot loader does this. | ||
37 | * | ||
38 | * The phy_id is ignored as the driver will probe for it. | ||
39 | */ | ||
40 | static int __init parse_tag_ethernet(struct tag *tag) | ||
41 | { | ||
42 | int i; | ||
43 | |||
44 | i = tag->u.ethernet.mac_index; | ||
45 | if (i < ARRAY_SIZE(hw_addr)) | ||
46 | memcpy(hw_addr[i].addr, tag->u.ethernet.hw_address, | ||
47 | sizeof(hw_addr[i].addr)); | ||
48 | |||
49 | return 0; | ||
50 | } | ||
51 | __tagtable(ATAG_ETHERNET, parse_tag_ethernet); | ||
52 | |||
53 | static void __init set_hw_addr(struct platform_device *pdev) | ||
54 | { | ||
55 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
56 | const u8 *addr; | ||
57 | void __iomem *regs; | ||
58 | struct clk *pclk; | ||
59 | |||
60 | if (!res) | ||
61 | return; | ||
62 | if (pdev->id >= ARRAY_SIZE(hw_addr)) | ||
63 | return; | ||
64 | |||
65 | addr = hw_addr[pdev->id].addr; | ||
66 | if (!is_valid_ether_addr(addr)) | ||
67 | return; | ||
68 | |||
69 | /* | ||
70 | * Since this is board-specific code, we'll cheat and use the | ||
71 | * physical address directly as we happen to know that it's | ||
72 | * the same as the virtual address. | ||
73 | */ | ||
74 | regs = (void __iomem __force *)res->start; | ||
75 | pclk = clk_get(&pdev->dev, "pclk"); | ||
76 | if (!pclk) | ||
77 | return; | ||
78 | |||
79 | clk_enable(pclk); | ||
80 | __raw_writel((addr[3] << 24) | (addr[2] << 16) | ||
81 | | (addr[1] << 8) | addr[0], regs + 0x98); | ||
82 | __raw_writel((addr[5] << 8) | addr[4], regs + 0x9c); | ||
83 | clk_disable(pclk); | ||
84 | clk_put(pclk); | ||
85 | } | ||
86 | |||
24 | void __init setup_board(void) | 87 | void __init setup_board(void) |
25 | { | 88 | { |
26 | at32_map_usart(1, 0); /* /dev/ttyS0 */ | 89 | at32_map_usart(1, 0); /* /dev/ttyS0 */ |
@@ -38,7 +101,8 @@ static int __init atstk1002_init(void) | |||
38 | at32_add_device_usart(1); | 101 | at32_add_device_usart(1); |
39 | at32_add_device_usart(2); | 102 | at32_add_device_usart(2); |
40 | 103 | ||
41 | at32_add_device_eth(0, ð0_data); | 104 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |
105 | |||
42 | at32_add_device_spi(0); | 106 | at32_add_device_spi(0); |
43 | at32_add_device_lcdc(0, &atstk1000_fb0_data); | 107 | at32_add_device_lcdc(0, &atstk1000_fb0_data); |
44 | 108 | ||
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c index 372e3f8b2417..7c4c76114bba 100644 --- a/arch/avr32/kernel/avr32_ksyms.c +++ b/arch/avr32/kernel/avr32_ksyms.c | |||
@@ -7,12 +7,12 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/delay.h> | ||
10 | #include <linux/io.h> | 11 | #include <linux/io.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | 13 | ||
13 | #include <asm/checksum.h> | 14 | #include <asm/checksum.h> |
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | #include <asm/delay.h> | ||
16 | 16 | ||
17 | /* | 17 | /* |
18 | * GCC functions | 18 | * GCC functions |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 317dc50945f2..0b4325946a41 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -38,6 +38,13 @@ void cpu_idle(void) | |||
38 | 38 | ||
39 | void machine_halt(void) | 39 | void machine_halt(void) |
40 | { | 40 | { |
41 | /* | ||
42 | * Enter Stop mode. The 32 kHz oscillator will keep running so | ||
43 | * the RTC will keep the time properly and the system will | ||
44 | * boot quickly. | ||
45 | */ | ||
46 | asm volatile("sleep 3\n\t" | ||
47 | "sub pc, -2"); | ||
41 | } | 48 | } |
42 | 49 | ||
43 | void machine_power_off(void) | 50 | void machine_power_off(void) |
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index ea2d1ffee478..a34211601008 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -229,30 +229,6 @@ static int __init parse_tag_rsvd_mem(struct tag *tag) | |||
229 | } | 229 | } |
230 | __tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem); | 230 | __tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem); |
231 | 231 | ||
232 | static int __init parse_tag_ethernet(struct tag *tag) | ||
233 | { | ||
234 | #if 0 | ||
235 | const struct platform_device *pdev; | ||
236 | |||
237 | /* | ||
238 | * We really need a bus type that supports "classes"...this | ||
239 | * will do for now (until we must handle other kinds of | ||
240 | * ethernet controllers) | ||
241 | */ | ||
242 | pdev = platform_get_device("macb", tag->u.ethernet.mac_index); | ||
243 | if (pdev && pdev->dev.platform_data) { | ||
244 | struct eth_platform_data *data = pdev->dev.platform_data; | ||
245 | |||
246 | data->valid = 1; | ||
247 | data->mii_phy_addr = tag->u.ethernet.mii_phy_addr; | ||
248 | memcpy(data->hw_addr, tag->u.ethernet.hw_address, | ||
249 | sizeof(data->hw_addr)); | ||
250 | } | ||
251 | #endif | ||
252 | return 0; | ||
253 | } | ||
254 | __tagtable(ATAG_ETHERNET, parse_tag_ethernet); | ||
255 | |||
256 | /* | 232 | /* |
257 | * Scan the tag table for this tag, and call its parse function. The | 233 | * Scan the tag table for this tag, and call its parse function. The |
258 | * tag table is built by the linker from all the __tagtable | 234 | * tag table is built by the linker from all the __tagtable |
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c index 462c8307b680..b3bc0b56e2c6 100644 --- a/arch/avr32/lib/delay.c +++ b/arch/avr32/lib/delay.c | |||
@@ -12,9 +12,9 @@ | |||
12 | 12 | ||
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/param.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | 17 | ||
17 | #include <asm/delay.h> | ||
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
19 | #include <asm/sysreg.h> | 19 | #include <asm/sysreg.h> |
20 | 20 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index 7ff6ad8bab5f..48f4ef38c70e 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | 13 | ||
14 | #include <asm/arch/at32ap7000.h> | ||
14 | #include <asm/arch/board.h> | 15 | #include <asm/arch/board.h> |
15 | #include <asm/arch/portmux.h> | 16 | #include <asm/arch/portmux.h> |
16 | #include <asm/arch/sm.h> | 17 | #include <asm/arch/sm.h> |
@@ -57,6 +58,9 @@ static struct platform_device _name##_id##_device = { \ | |||
57 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ | 58 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ |
58 | } | 59 | } |
59 | 60 | ||
61 | #define select_peripheral(pin, periph, flags) \ | ||
62 | at32_select_periph(GPIO_PIN_##pin, GPIO_##periph, flags) | ||
63 | |||
60 | #define DEV_CLK(_name, devname, bus, _index) \ | 64 | #define DEV_CLK(_name, devname, bus, _index) \ |
61 | static struct clk devname##_##_name = { \ | 65 | static struct clk devname##_##_name = { \ |
62 | .name = #_name, \ | 66 | .name = #_name, \ |
@@ -67,18 +71,6 @@ static struct clk devname##_##_name = { \ | |||
67 | .index = _index, \ | 71 | .index = _index, \ |
68 | } | 72 | } |
69 | 73 | ||
70 | enum { | ||
71 | PIOA, | ||
72 | PIOB, | ||
73 | PIOC, | ||
74 | PIOD, | ||
75 | }; | ||
76 | |||
77 | enum { | ||
78 | FUNC_A, | ||
79 | FUNC_B, | ||
80 | }; | ||
81 | |||
82 | unsigned long at32ap7000_osc_rates[3] = { | 74 | unsigned long at32ap7000_osc_rates[3] = { |
83 | [0] = 32768, | 75 | [0] = 32768, |
84 | /* FIXME: these are ATSTK1002-specific */ | 76 | /* FIXME: these are ATSTK1002-specific */ |
@@ -569,26 +561,26 @@ DEV_CLK(usart, atmel_usart3, pba, 6); | |||
569 | 561 | ||
570 | static inline void configure_usart0_pins(void) | 562 | static inline void configure_usart0_pins(void) |
571 | { | 563 | { |
572 | portmux_set_func(PIOA, 8, FUNC_B); /* RXD */ | 564 | select_peripheral(PA(8), PERIPH_B, 0); /* RXD */ |
573 | portmux_set_func(PIOA, 9, FUNC_B); /* TXD */ | 565 | select_peripheral(PA(9), PERIPH_B, 0); /* TXD */ |
574 | } | 566 | } |
575 | 567 | ||
576 | static inline void configure_usart1_pins(void) | 568 | static inline void configure_usart1_pins(void) |
577 | { | 569 | { |
578 | portmux_set_func(PIOA, 17, FUNC_A); /* RXD */ | 570 | select_peripheral(PA(17), PERIPH_A, 0); /* RXD */ |
579 | portmux_set_func(PIOA, 18, FUNC_A); /* TXD */ | 571 | select_peripheral(PA(18), PERIPH_A, 0); /* TXD */ |
580 | } | 572 | } |
581 | 573 | ||
582 | static inline void configure_usart2_pins(void) | 574 | static inline void configure_usart2_pins(void) |
583 | { | 575 | { |
584 | portmux_set_func(PIOB, 26, FUNC_B); /* RXD */ | 576 | select_peripheral(PB(26), PERIPH_B, 0); /* RXD */ |
585 | portmux_set_func(PIOB, 27, FUNC_B); /* TXD */ | 577 | select_peripheral(PB(27), PERIPH_B, 0); /* TXD */ |
586 | } | 578 | } |
587 | 579 | ||
588 | static inline void configure_usart3_pins(void) | 580 | static inline void configure_usart3_pins(void) |
589 | { | 581 | { |
590 | portmux_set_func(PIOB, 18, FUNC_B); /* RXD */ | 582 | select_peripheral(PB(18), PERIPH_B, 0); /* RXD */ |
591 | portmux_set_func(PIOB, 17, FUNC_B); /* TXD */ | 583 | select_peripheral(PB(17), PERIPH_B, 0); /* TXD */ |
592 | } | 584 | } |
593 | 585 | ||
594 | static struct platform_device *at32_usarts[4]; | 586 | static struct platform_device *at32_usarts[4]; |
@@ -654,6 +646,15 @@ DEFINE_DEV_DATA(macb, 0); | |||
654 | DEV_CLK(hclk, macb0, hsb, 8); | 646 | DEV_CLK(hclk, macb0, hsb, 8); |
655 | DEV_CLK(pclk, macb0, pbb, 6); | 647 | DEV_CLK(pclk, macb0, pbb, 6); |
656 | 648 | ||
649 | static struct eth_platform_data macb1_data; | ||
650 | static struct resource macb1_resource[] = { | ||
651 | PBMEM(0xfff01c00), | ||
652 | IRQ(26), | ||
653 | }; | ||
654 | DEFINE_DEV_DATA(macb, 1); | ||
655 | DEV_CLK(hclk, macb1, hsb, 9); | ||
656 | DEV_CLK(pclk, macb1, pbb, 7); | ||
657 | |||
657 | struct platform_device *__init | 658 | struct platform_device *__init |
658 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | 659 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) |
659 | { | 660 | { |
@@ -663,27 +664,54 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | |||
663 | case 0: | 664 | case 0: |
664 | pdev = &macb0_device; | 665 | pdev = &macb0_device; |
665 | 666 | ||
666 | portmux_set_func(PIOC, 3, FUNC_A); /* TXD0 */ | 667 | select_peripheral(PC(3), PERIPH_A, 0); /* TXD0 */ |
667 | portmux_set_func(PIOC, 4, FUNC_A); /* TXD1 */ | 668 | select_peripheral(PC(4), PERIPH_A, 0); /* TXD1 */ |
668 | portmux_set_func(PIOC, 7, FUNC_A); /* TXEN */ | 669 | select_peripheral(PC(7), PERIPH_A, 0); /* TXEN */ |
669 | portmux_set_func(PIOC, 8, FUNC_A); /* TXCK */ | 670 | select_peripheral(PC(8), PERIPH_A, 0); /* TXCK */ |
670 | portmux_set_func(PIOC, 9, FUNC_A); /* RXD0 */ | 671 | select_peripheral(PC(9), PERIPH_A, 0); /* RXD0 */ |
671 | portmux_set_func(PIOC, 10, FUNC_A); /* RXD1 */ | 672 | select_peripheral(PC(10), PERIPH_A, 0); /* RXD1 */ |
672 | portmux_set_func(PIOC, 13, FUNC_A); /* RXER */ | 673 | select_peripheral(PC(13), PERIPH_A, 0); /* RXER */ |
673 | portmux_set_func(PIOC, 15, FUNC_A); /* RXDV */ | 674 | select_peripheral(PC(15), PERIPH_A, 0); /* RXDV */ |
674 | portmux_set_func(PIOC, 16, FUNC_A); /* MDC */ | 675 | select_peripheral(PC(16), PERIPH_A, 0); /* MDC */ |
675 | portmux_set_func(PIOC, 17, FUNC_A); /* MDIO */ | 676 | select_peripheral(PC(17), PERIPH_A, 0); /* MDIO */ |
677 | |||
678 | if (!data->is_rmii) { | ||
679 | select_peripheral(PC(0), PERIPH_A, 0); /* COL */ | ||
680 | select_peripheral(PC(1), PERIPH_A, 0); /* CRS */ | ||
681 | select_peripheral(PC(2), PERIPH_A, 0); /* TXER */ | ||
682 | select_peripheral(PC(5), PERIPH_A, 0); /* TXD2 */ | ||
683 | select_peripheral(PC(6), PERIPH_A, 0); /* TXD3 */ | ||
684 | select_peripheral(PC(11), PERIPH_A, 0); /* RXD2 */ | ||
685 | select_peripheral(PC(12), PERIPH_A, 0); /* RXD3 */ | ||
686 | select_peripheral(PC(14), PERIPH_A, 0); /* RXCK */ | ||
687 | select_peripheral(PC(18), PERIPH_A, 0); /* SPD */ | ||
688 | } | ||
689 | break; | ||
690 | |||
691 | case 1: | ||
692 | pdev = &macb1_device; | ||
693 | |||
694 | select_peripheral(PD(13), PERIPH_B, 0); /* TXD0 */ | ||
695 | select_peripheral(PD(14), PERIPH_B, 0); /* TXD1 */ | ||
696 | select_peripheral(PD(11), PERIPH_B, 0); /* TXEN */ | ||
697 | select_peripheral(PD(12), PERIPH_B, 0); /* TXCK */ | ||
698 | select_peripheral(PD(10), PERIPH_B, 0); /* RXD0 */ | ||
699 | select_peripheral(PD(6), PERIPH_B, 0); /* RXD1 */ | ||
700 | select_peripheral(PD(5), PERIPH_B, 0); /* RXER */ | ||
701 | select_peripheral(PD(4), PERIPH_B, 0); /* RXDV */ | ||
702 | select_peripheral(PD(3), PERIPH_B, 0); /* MDC */ | ||
703 | select_peripheral(PD(2), PERIPH_B, 0); /* MDIO */ | ||
676 | 704 | ||
677 | if (!data->is_rmii) { | 705 | if (!data->is_rmii) { |
678 | portmux_set_func(PIOC, 0, FUNC_A); /* COL */ | 706 | select_peripheral(PC(19), PERIPH_B, 0); /* COL */ |
679 | portmux_set_func(PIOC, 1, FUNC_A); /* CRS */ | 707 | select_peripheral(PC(23), PERIPH_B, 0); /* CRS */ |
680 | portmux_set_func(PIOC, 2, FUNC_A); /* TXER */ | 708 | select_peripheral(PC(26), PERIPH_B, 0); /* TXER */ |
681 | portmux_set_func(PIOC, 5, FUNC_A); /* TXD2 */ | 709 | select_peripheral(PC(27), PERIPH_B, 0); /* TXD2 */ |
682 | portmux_set_func(PIOC, 6, FUNC_A); /* TXD3 */ | 710 | select_peripheral(PC(28), PERIPH_B, 0); /* TXD3 */ |
683 | portmux_set_func(PIOC, 11, FUNC_A); /* RXD2 */ | 711 | select_peripheral(PC(29), PERIPH_B, 0); /* RXD2 */ |
684 | portmux_set_func(PIOC, 12, FUNC_A); /* RXD3 */ | 712 | select_peripheral(PC(30), PERIPH_B, 0); /* RXD3 */ |
685 | portmux_set_func(PIOC, 14, FUNC_A); /* RXCK */ | 713 | select_peripheral(PC(24), PERIPH_B, 0); /* RXCK */ |
686 | portmux_set_func(PIOC, 18, FUNC_A); /* SPD */ | 714 | select_peripheral(PD(15), PERIPH_B, 0); /* SPD */ |
687 | } | 715 | } |
688 | break; | 716 | break; |
689 | 717 | ||
@@ -714,12 +742,12 @@ struct platform_device *__init at32_add_device_spi(unsigned int id) | |||
714 | switch (id) { | 742 | switch (id) { |
715 | case 0: | 743 | case 0: |
716 | pdev = &spi0_device; | 744 | pdev = &spi0_device; |
717 | portmux_set_func(PIOA, 0, FUNC_A); /* MISO */ | 745 | select_peripheral(PA(0), PERIPH_A, 0); /* MISO */ |
718 | portmux_set_func(PIOA, 1, FUNC_A); /* MOSI */ | 746 | select_peripheral(PA(1), PERIPH_A, 0); /* MOSI */ |
719 | portmux_set_func(PIOA, 2, FUNC_A); /* SCK */ | 747 | select_peripheral(PA(2), PERIPH_A, 0); /* SCK */ |
720 | portmux_set_func(PIOA, 3, FUNC_A); /* NPCS0 */ | 748 | select_peripheral(PA(3), PERIPH_A, 0); /* NPCS0 */ |
721 | portmux_set_func(PIOA, 4, FUNC_A); /* NPCS1 */ | 749 | select_peripheral(PA(4), PERIPH_A, 0); /* NPCS1 */ |
722 | portmux_set_func(PIOA, 5, FUNC_A); /* NPCS2 */ | 750 | select_peripheral(PA(5), PERIPH_A, 0); /* NPCS2 */ |
723 | break; | 751 | break; |
724 | 752 | ||
725 | default: | 753 | default: |
@@ -762,37 +790,37 @@ at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data) | |||
762 | switch (id) { | 790 | switch (id) { |
763 | case 0: | 791 | case 0: |
764 | pdev = &lcdc0_device; | 792 | pdev = &lcdc0_device; |
765 | portmux_set_func(PIOC, 19, FUNC_A); /* CC */ | 793 | select_peripheral(PC(19), PERIPH_A, 0); /* CC */ |
766 | portmux_set_func(PIOC, 20, FUNC_A); /* HSYNC */ | 794 | select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */ |
767 | portmux_set_func(PIOC, 21, FUNC_A); /* PCLK */ | 795 | select_peripheral(PC(21), PERIPH_A, 0); /* PCLK */ |
768 | portmux_set_func(PIOC, 22, FUNC_A); /* VSYNC */ | 796 | select_peripheral(PC(22), PERIPH_A, 0); /* VSYNC */ |
769 | portmux_set_func(PIOC, 23, FUNC_A); /* DVAL */ | 797 | select_peripheral(PC(23), PERIPH_A, 0); /* DVAL */ |
770 | portmux_set_func(PIOC, 24, FUNC_A); /* MODE */ | 798 | select_peripheral(PC(24), PERIPH_A, 0); /* MODE */ |
771 | portmux_set_func(PIOC, 25, FUNC_A); /* PWR */ | 799 | select_peripheral(PC(25), PERIPH_A, 0); /* PWR */ |
772 | portmux_set_func(PIOC, 26, FUNC_A); /* DATA0 */ | 800 | select_peripheral(PC(26), PERIPH_A, 0); /* DATA0 */ |
773 | portmux_set_func(PIOC, 27, FUNC_A); /* DATA1 */ | 801 | select_peripheral(PC(27), PERIPH_A, 0); /* DATA1 */ |
774 | portmux_set_func(PIOC, 28, FUNC_A); /* DATA2 */ | 802 | select_peripheral(PC(28), PERIPH_A, 0); /* DATA2 */ |
775 | portmux_set_func(PIOC, 29, FUNC_A); /* DATA3 */ | 803 | select_peripheral(PC(29), PERIPH_A, 0); /* DATA3 */ |
776 | portmux_set_func(PIOC, 30, FUNC_A); /* DATA4 */ | 804 | select_peripheral(PC(30), PERIPH_A, 0); /* DATA4 */ |
777 | portmux_set_func(PIOC, 31, FUNC_A); /* DATA5 */ | 805 | select_peripheral(PC(31), PERIPH_A, 0); /* DATA5 */ |
778 | portmux_set_func(PIOD, 0, FUNC_A); /* DATA6 */ | 806 | select_peripheral(PD(0), PERIPH_A, 0); /* DATA6 */ |
779 | portmux_set_func(PIOD, 1, FUNC_A); /* DATA7 */ | 807 | select_peripheral(PD(1), PERIPH_A, 0); /* DATA7 */ |
780 | portmux_set_func(PIOD, 2, FUNC_A); /* DATA8 */ | 808 | select_peripheral(PD(2), PERIPH_A, 0); /* DATA8 */ |
781 | portmux_set_func(PIOD, 3, FUNC_A); /* DATA9 */ | 809 | select_peripheral(PD(3), PERIPH_A, 0); /* DATA9 */ |
782 | portmux_set_func(PIOD, 4, FUNC_A); /* DATA10 */ | 810 | select_peripheral(PD(4), PERIPH_A, 0); /* DATA10 */ |
783 | portmux_set_func(PIOD, 5, FUNC_A); /* DATA11 */ | 811 | select_peripheral(PD(5), PERIPH_A, 0); /* DATA11 */ |
784 | portmux_set_func(PIOD, 6, FUNC_A); /* DATA12 */ | 812 | select_peripheral(PD(6), PERIPH_A, 0); /* DATA12 */ |
785 | portmux_set_func(PIOD, 7, FUNC_A); /* DATA13 */ | 813 | select_peripheral(PD(7), PERIPH_A, 0); /* DATA13 */ |
786 | portmux_set_func(PIOD, 8, FUNC_A); /* DATA14 */ | 814 | select_peripheral(PD(8), PERIPH_A, 0); /* DATA14 */ |
787 | portmux_set_func(PIOD, 9, FUNC_A); /* DATA15 */ | 815 | select_peripheral(PD(9), PERIPH_A, 0); /* DATA15 */ |
788 | portmux_set_func(PIOD, 10, FUNC_A); /* DATA16 */ | 816 | select_peripheral(PD(10), PERIPH_A, 0); /* DATA16 */ |
789 | portmux_set_func(PIOD, 11, FUNC_A); /* DATA17 */ | 817 | select_peripheral(PD(11), PERIPH_A, 0); /* DATA17 */ |
790 | portmux_set_func(PIOD, 12, FUNC_A); /* DATA18 */ | 818 | select_peripheral(PD(12), PERIPH_A, 0); /* DATA18 */ |
791 | portmux_set_func(PIOD, 13, FUNC_A); /* DATA19 */ | 819 | select_peripheral(PD(13), PERIPH_A, 0); /* DATA19 */ |
792 | portmux_set_func(PIOD, 14, FUNC_A); /* DATA20 */ | 820 | select_peripheral(PD(14), PERIPH_A, 0); /* DATA20 */ |
793 | portmux_set_func(PIOD, 15, FUNC_A); /* DATA21 */ | 821 | select_peripheral(PD(15), PERIPH_A, 0); /* DATA21 */ |
794 | portmux_set_func(PIOD, 16, FUNC_A); /* DATA22 */ | 822 | select_peripheral(PD(16), PERIPH_A, 0); /* DATA22 */ |
795 | portmux_set_func(PIOD, 17, FUNC_A); /* DATA23 */ | 823 | select_peripheral(PD(17), PERIPH_A, 0); /* DATA23 */ |
796 | 824 | ||
797 | clk_set_parent(&lcdc0_pixclk, &pll0); | 825 | clk_set_parent(&lcdc0_pixclk, &pll0); |
798 | clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0)); | 826 | clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0)); |
@@ -838,6 +866,8 @@ struct clk *at32_clock_list[] = { | |||
838 | &atmel_usart3_usart, | 866 | &atmel_usart3_usart, |
839 | &macb0_hclk, | 867 | &macb0_hclk, |
840 | &macb0_pclk, | 868 | &macb0_pclk, |
869 | &macb1_hclk, | ||
870 | &macb1_pclk, | ||
841 | &spi0_mck, | 871 | &spi0_mck, |
842 | &lcdc0_hclk, | 872 | &lcdc0_hclk, |
843 | &lcdc0_pixclk, | 873 | &lcdc0_pixclk, |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 4dff1f988900..b59272e81b9a 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -49,12 +49,25 @@ static void eim_unmask_irq(unsigned int irq) | |||
49 | static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) | 49 | static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) |
50 | { | 50 | { |
51 | struct at32_sm *sm = get_irq_chip_data(irq); | 51 | struct at32_sm *sm = get_irq_chip_data(irq); |
52 | struct irq_desc *desc; | ||
52 | unsigned int i = irq - sm->eim_first_irq; | 53 | unsigned int i = irq - sm->eim_first_irq; |
53 | u32 mode, edge, level; | 54 | u32 mode, edge, level; |
54 | unsigned long flags; | 55 | unsigned long flags; |
55 | int ret = 0; | 56 | int ret = 0; |
56 | 57 | ||
57 | flow_type &= IRQ_TYPE_SENSE_MASK; | 58 | if (flow_type == IRQ_TYPE_NONE) |
59 | flow_type = IRQ_TYPE_LEVEL_LOW; | ||
60 | |||
61 | desc = &irq_desc[irq]; | ||
62 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | ||
63 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | ||
64 | |||
65 | if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) { | ||
66 | desc->status |= IRQ_LEVEL; | ||
67 | set_irq_handler(irq, handle_level_irq); | ||
68 | } else { | ||
69 | set_irq_handler(irq, handle_edge_irq); | ||
70 | } | ||
58 | 71 | ||
59 | spin_lock_irqsave(&sm->lock, flags); | 72 | spin_lock_irqsave(&sm->lock, flags); |
60 | 73 | ||
@@ -148,10 +161,15 @@ static int __init eim_init(void) | |||
148 | pattern = sm_readl(sm, EIM_MODE); | 161 | pattern = sm_readl(sm, EIM_MODE); |
149 | nr_irqs = fls(pattern); | 162 | nr_irqs = fls(pattern); |
150 | 163 | ||
164 | /* Trigger on falling edge unless overridden by driver */ | ||
165 | sm_writel(sm, EIM_MODE, 0UL); | ||
166 | sm_writel(sm, EIM_EDGE, 0UL); | ||
167 | |||
151 | sm->eim_chip = &eim_chip; | 168 | sm->eim_chip = &eim_chip; |
152 | 169 | ||
153 | for (i = 0; i < nr_irqs; i++) { | 170 | for (i = 0; i < nr_irqs; i++) { |
154 | set_irq_chip(sm->eim_first_irq + i, &eim_chip); | 171 | set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip, |
172 | handle_edge_irq); | ||
155 | set_irq_chip_data(sm->eim_first_irq + i, sm); | 173 | set_irq_chip_data(sm->eim_first_irq + i, sm); |
156 | } | 174 | } |
157 | 175 | ||
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c index eb87a18ad7b2..dd5c009cf224 100644 --- a/arch/avr32/mach-at32ap/intc.c +++ b/arch/avr32/mach-at32ap/intc.c | |||
@@ -136,3 +136,7 @@ fail: | |||
136 | panic("Interrupt controller initialization failed!\n"); | 136 | panic("Interrupt controller initialization failed!\n"); |
137 | } | 137 | } |
138 | 138 | ||
139 | unsigned long intc_get_pending(int group) | ||
140 | { | ||
141 | return intc_readl(&intc0, INTREQ0 + 4 * group); | ||
142 | } | ||
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index d3aabfca8598..f1280ed8ed6d 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -25,27 +25,98 @@ struct pio_device { | |||
25 | void __iomem *regs; | 25 | void __iomem *regs; |
26 | const struct platform_device *pdev; | 26 | const struct platform_device *pdev; |
27 | struct clk *clk; | 27 | struct clk *clk; |
28 | u32 alloc_mask; | 28 | u32 pinmux_mask; |
29 | char name[32]; | 29 | char name[32]; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; | 32 | static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; |
33 | 33 | ||
34 | void portmux_set_func(unsigned int portmux_id, unsigned int pin_id, | 34 | static struct pio_device *gpio_to_pio(unsigned int gpio) |
35 | unsigned int function_id) | ||
36 | { | 35 | { |
37 | struct pio_device *pio; | 36 | struct pio_device *pio; |
38 | u32 mask = 1 << pin_id; | 37 | unsigned int index; |
39 | 38 | ||
40 | BUG_ON(portmux_id >= MAX_NR_PIO_DEVICES); | 39 | index = gpio >> 5; |
40 | if (index >= MAX_NR_PIO_DEVICES) | ||
41 | return NULL; | ||
42 | pio = &pio_dev[index]; | ||
43 | if (!pio->regs) | ||
44 | return NULL; | ||
41 | 45 | ||
42 | pio = &pio_dev[portmux_id]; | 46 | return pio; |
47 | } | ||
48 | |||
49 | /* Pin multiplexing API */ | ||
50 | |||
51 | void __init at32_select_periph(unsigned int pin, unsigned int periph, | ||
52 | unsigned long flags) | ||
53 | { | ||
54 | struct pio_device *pio; | ||
55 | unsigned int pin_index = pin & 0x1f; | ||
56 | u32 mask = 1 << pin_index; | ||
57 | |||
58 | pio = gpio_to_pio(pin); | ||
59 | if (unlikely(!pio)) { | ||
60 | printk("pio: invalid pin %u\n", pin); | ||
61 | goto fail; | ||
62 | } | ||
43 | 63 | ||
44 | if (function_id) | 64 | if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) { |
65 | printk("%s: pin %u is busy\n", pio->name, pin_index); | ||
66 | goto fail; | ||
67 | } | ||
68 | |||
69 | pio_writel(pio, PUER, mask); | ||
70 | if (periph) | ||
45 | pio_writel(pio, BSR, mask); | 71 | pio_writel(pio, BSR, mask); |
46 | else | 72 | else |
47 | pio_writel(pio, ASR, mask); | 73 | pio_writel(pio, ASR, mask); |
74 | |||
48 | pio_writel(pio, PDR, mask); | 75 | pio_writel(pio, PDR, mask); |
76 | if (!(flags & AT32_GPIOF_PULLUP)) | ||
77 | pio_writel(pio, PUDR, mask); | ||
78 | |||
79 | return; | ||
80 | |||
81 | fail: | ||
82 | dump_stack(); | ||
83 | } | ||
84 | |||
85 | void __init at32_select_gpio(unsigned int pin, unsigned long flags) | ||
86 | { | ||
87 | struct pio_device *pio; | ||
88 | unsigned int pin_index = pin & 0x1f; | ||
89 | u32 mask = 1 << pin_index; | ||
90 | |||
91 | pio = gpio_to_pio(pin); | ||
92 | if (unlikely(!pio)) { | ||
93 | printk("pio: invalid pin %u\n", pin); | ||
94 | goto fail; | ||
95 | } | ||
96 | |||
97 | if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) { | ||
98 | printk("%s: pin %u is busy\n", pio->name, pin_index); | ||
99 | goto fail; | ||
100 | } | ||
101 | |||
102 | pio_writel(pio, PUER, mask); | ||
103 | if (flags & AT32_GPIOF_HIGH) | ||
104 | pio_writel(pio, SODR, mask); | ||
105 | else | ||
106 | pio_writel(pio, CODR, mask); | ||
107 | if (flags & AT32_GPIOF_OUTPUT) | ||
108 | pio_writel(pio, OER, mask); | ||
109 | else | ||
110 | pio_writel(pio, ODR, mask); | ||
111 | |||
112 | pio_writel(pio, PER, mask); | ||
113 | if (!(flags & AT32_GPIOF_PULLUP)) | ||
114 | pio_writel(pio, PUDR, mask); | ||
115 | |||
116 | return; | ||
117 | |||
118 | fail: | ||
119 | dump_stack(); | ||
49 | } | 120 | } |
50 | 121 | ||
51 | static int __init pio_probe(struct platform_device *pdev) | 122 | static int __init pio_probe(struct platform_device *pdev) |
diff --git a/arch/avr32/mach-at32ap/sm.c b/arch/avr32/mach-at32ap/sm.c deleted file mode 100644 index 03306eb0345e..000000000000 --- a/arch/avr32/mach-at32ap/sm.c +++ /dev/null | |||
@@ -1,289 +0,0 @@ | |||
1 | /* | ||
2 | * System Manager driver for AT32AP CPUs | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/errno.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/random.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | #include <asm/intc.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/irq.h> | ||
22 | |||
23 | #include <asm/arch/sm.h> | ||
24 | |||
25 | #include "sm.h" | ||
26 | |||
27 | #define SM_EIM_IRQ_RESOURCE 1 | ||
28 | #define SM_PM_IRQ_RESOURCE 2 | ||
29 | #define SM_RTC_IRQ_RESOURCE 3 | ||
30 | |||
31 | #define to_eim(irqc) container_of(irqc, struct at32_sm, irqc) | ||
32 | |||
33 | struct at32_sm system_manager; | ||
34 | |||
35 | int __init at32_sm_init(void) | ||
36 | { | ||
37 | struct resource *regs; | ||
38 | struct at32_sm *sm = &system_manager; | ||
39 | int ret = -ENXIO; | ||
40 | |||
41 | regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0); | ||
42 | if (!regs) | ||
43 | goto fail; | ||
44 | |||
45 | spin_lock_init(&sm->lock); | ||
46 | sm->pdev = &at32_sm_device; | ||
47 | |||
48 | ret = -ENOMEM; | ||
49 | sm->regs = ioremap(regs->start, regs->end - regs->start + 1); | ||
50 | if (!sm->regs) | ||
51 | goto fail; | ||
52 | |||
53 | return 0; | ||
54 | |||
55 | fail: | ||
56 | printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret); | ||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | * External Interrupt Module (EIM). | ||
62 | * | ||
63 | * EIM gets level- or edge-triggered interrupts of either polarity | ||
64 | * from the outside and converts it to active-high level-triggered | ||
65 | * interrupts that the internal interrupt controller can handle. EIM | ||
66 | * also provides masking/unmasking of interrupts, as well as | ||
67 | * acknowledging of edge-triggered interrupts. | ||
68 | */ | ||
69 | |||
70 | static irqreturn_t spurious_eim_interrupt(int irq, void *dev_id, | ||
71 | struct pt_regs *regs) | ||
72 | { | ||
73 | printk(KERN_WARNING "Spurious EIM interrupt %d\n", irq); | ||
74 | disable_irq(irq); | ||
75 | return IRQ_NONE; | ||
76 | } | ||
77 | |||
78 | static struct irqaction eim_spurious_action = { | ||
79 | .handler = spurious_eim_interrupt, | ||
80 | }; | ||
81 | |||
82 | static irqreturn_t eim_handle_irq(int irq, void *dev_id, struct pt_regs *regs) | ||
83 | { | ||
84 | struct irq_controller * irqc = dev_id; | ||
85 | struct at32_sm *sm = to_eim(irqc); | ||
86 | unsigned long pending; | ||
87 | |||
88 | /* | ||
89 | * No need to disable interrupts globally. The interrupt | ||
90 | * level relevant to this group must be masked all the time, | ||
91 | * so we know that this particular EIM instance will not be | ||
92 | * re-entered. | ||
93 | */ | ||
94 | spin_lock(&sm->lock); | ||
95 | |||
96 | pending = intc_get_pending(sm->irqc.irq_group); | ||
97 | if (unlikely(!pending)) { | ||
98 | printk(KERN_ERR "EIM (group %u): No interrupts pending!\n", | ||
99 | sm->irqc.irq_group); | ||
100 | goto unlock; | ||
101 | } | ||
102 | |||
103 | do { | ||
104 | struct irqaction *action; | ||
105 | unsigned int i; | ||
106 | |||
107 | i = fls(pending) - 1; | ||
108 | pending &= ~(1 << i); | ||
109 | action = sm->action[i]; | ||
110 | |||
111 | /* Acknowledge the interrupt */ | ||
112 | sm_writel(sm, EIM_ICR, 1 << i); | ||
113 | |||
114 | spin_unlock(&sm->lock); | ||
115 | |||
116 | if (action->flags & SA_INTERRUPT) | ||
117 | local_irq_disable(); | ||
118 | action->handler(sm->irqc.first_irq + i, action->dev_id, regs); | ||
119 | local_irq_enable(); | ||
120 | spin_lock(&sm->lock); | ||
121 | if (action->flags & SA_SAMPLE_RANDOM) | ||
122 | add_interrupt_randomness(sm->irqc.first_irq + i); | ||
123 | } while (pending); | ||
124 | |||
125 | unlock: | ||
126 | spin_unlock(&sm->lock); | ||
127 | return IRQ_HANDLED; | ||
128 | } | ||
129 | |||
130 | static void eim_mask(struct irq_controller *irqc, unsigned int irq) | ||
131 | { | ||
132 | struct at32_sm *sm = to_eim(irqc); | ||
133 | unsigned int i; | ||
134 | |||
135 | i = irq - sm->irqc.first_irq; | ||
136 | sm_writel(sm, EIM_IDR, 1 << i); | ||
137 | } | ||
138 | |||
139 | static void eim_unmask(struct irq_controller *irqc, unsigned int irq) | ||
140 | { | ||
141 | struct at32_sm *sm = to_eim(irqc); | ||
142 | unsigned int i; | ||
143 | |||
144 | i = irq - sm->irqc.first_irq; | ||
145 | sm_writel(sm, EIM_IER, 1 << i); | ||
146 | } | ||
147 | |||
148 | static int eim_setup(struct irq_controller *irqc, unsigned int irq, | ||
149 | struct irqaction *action) | ||
150 | { | ||
151 | struct at32_sm *sm = to_eim(irqc); | ||
152 | sm->action[irq - sm->irqc.first_irq] = action; | ||
153 | /* Acknowledge earlier interrupts */ | ||
154 | sm_writel(sm, EIM_ICR, (1<<(irq - sm->irqc.first_irq))); | ||
155 | eim_unmask(irqc, irq); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static void eim_free(struct irq_controller *irqc, unsigned int irq, | ||
160 | void *dev) | ||
161 | { | ||
162 | struct at32_sm *sm = to_eim(irqc); | ||
163 | eim_mask(irqc, irq); | ||
164 | sm->action[irq - sm->irqc.first_irq] = &eim_spurious_action; | ||
165 | } | ||
166 | |||
167 | static int eim_set_type(struct irq_controller *irqc, unsigned int irq, | ||
168 | unsigned int type) | ||
169 | { | ||
170 | struct at32_sm *sm = to_eim(irqc); | ||
171 | unsigned long flags; | ||
172 | u32 value, pattern; | ||
173 | |||
174 | spin_lock_irqsave(&sm->lock, flags); | ||
175 | |||
176 | pattern = 1 << (irq - sm->irqc.first_irq); | ||
177 | |||
178 | value = sm_readl(sm, EIM_MODE); | ||
179 | if (type & IRQ_TYPE_LEVEL) | ||
180 | value |= pattern; | ||
181 | else | ||
182 | value &= ~pattern; | ||
183 | sm_writel(sm, EIM_MODE, value); | ||
184 | value = sm_readl(sm, EIM_EDGE); | ||
185 | if (type & IRQ_EDGE_RISING) | ||
186 | value |= pattern; | ||
187 | else | ||
188 | value &= ~pattern; | ||
189 | sm_writel(sm, EIM_EDGE, value); | ||
190 | value = sm_readl(sm, EIM_LEVEL); | ||
191 | if (type & IRQ_LEVEL_HIGH) | ||
192 | value |= pattern; | ||
193 | else | ||
194 | value &= ~pattern; | ||
195 | sm_writel(sm, EIM_LEVEL, value); | ||
196 | |||
197 | spin_unlock_irqrestore(&sm->lock, flags); | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static unsigned int eim_get_type(struct irq_controller *irqc, | ||
203 | unsigned int irq) | ||
204 | { | ||
205 | struct at32_sm *sm = to_eim(irqc); | ||
206 | unsigned long flags; | ||
207 | unsigned int type = 0; | ||
208 | u32 mode, edge, level, pattern; | ||
209 | |||
210 | pattern = 1 << (irq - sm->irqc.first_irq); | ||
211 | |||
212 | spin_lock_irqsave(&sm->lock, flags); | ||
213 | mode = sm_readl(sm, EIM_MODE); | ||
214 | edge = sm_readl(sm, EIM_EDGE); | ||
215 | level = sm_readl(sm, EIM_LEVEL); | ||
216 | spin_unlock_irqrestore(&sm->lock, flags); | ||
217 | |||
218 | if (mode & pattern) | ||
219 | type |= IRQ_TYPE_LEVEL; | ||
220 | if (edge & pattern) | ||
221 | type |= IRQ_EDGE_RISING; | ||
222 | if (level & pattern) | ||
223 | type |= IRQ_LEVEL_HIGH; | ||
224 | |||
225 | return type; | ||
226 | } | ||
227 | |||
228 | static struct irq_controller_class eim_irq_class = { | ||
229 | .typename = "EIM", | ||
230 | .handle = eim_handle_irq, | ||
231 | .setup = eim_setup, | ||
232 | .free = eim_free, | ||
233 | .mask = eim_mask, | ||
234 | .unmask = eim_unmask, | ||
235 | .set_type = eim_set_type, | ||
236 | .get_type = eim_get_type, | ||
237 | }; | ||
238 | |||
239 | static int __init eim_init(void) | ||
240 | { | ||
241 | struct at32_sm *sm = &system_manager; | ||
242 | unsigned int i; | ||
243 | u32 pattern; | ||
244 | int ret; | ||
245 | |||
246 | /* | ||
247 | * The EIM is really the same module as SM, so register | ||
248 | * mapping, etc. has been taken care of already. | ||
249 | */ | ||
250 | |||
251 | /* | ||
252 | * Find out how many interrupt lines that are actually | ||
253 | * implemented in hardware. | ||
254 | */ | ||
255 | sm_writel(sm, EIM_IDR, ~0UL); | ||
256 | sm_writel(sm, EIM_MODE, ~0UL); | ||
257 | pattern = sm_readl(sm, EIM_MODE); | ||
258 | sm->irqc.nr_irqs = fls(pattern); | ||
259 | |||
260 | ret = -ENOMEM; | ||
261 | sm->action = kmalloc(sizeof(*sm->action) * sm->irqc.nr_irqs, | ||
262 | GFP_KERNEL); | ||
263 | if (!sm->action) | ||
264 | goto out; | ||
265 | |||
266 | for (i = 0; i < sm->irqc.nr_irqs; i++) | ||
267 | sm->action[i] = &eim_spurious_action; | ||
268 | |||
269 | spin_lock_init(&sm->lock); | ||
270 | sm->irqc.irq_group = sm->pdev->resource[SM_EIM_IRQ_RESOURCE].start; | ||
271 | sm->irqc.class = &eim_irq_class; | ||
272 | |||
273 | ret = intc_register_controller(&sm->irqc); | ||
274 | if (ret < 0) | ||
275 | goto out_free_actions; | ||
276 | |||
277 | printk("EIM: External Interrupt Module at 0x%p, IRQ group %u\n", | ||
278 | sm->regs, sm->irqc.irq_group); | ||
279 | printk("EIM: Handling %u external IRQs, starting with IRQ%u\n", | ||
280 | sm->irqc.nr_irqs, sm->irqc.first_irq); | ||
281 | |||
282 | return 0; | ||
283 | |||
284 | out_free_actions: | ||
285 | kfree(sm->action); | ||
286 | out: | ||
287 | return ret; | ||
288 | } | ||
289 | arch_initcall(eim_init); | ||
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 6a1238a29d6c..3474309e049c 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -16,6 +16,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
16 | config RWSEM_XCHGADD_ALGORITHM | 16 | config RWSEM_XCHGADD_ALGORITHM |
17 | bool | 17 | bool |
18 | 18 | ||
19 | config ARCH_HAS_ILOG2_U32 | ||
20 | bool | ||
21 | default n | ||
22 | |||
23 | config ARCH_HAS_ILOG2_U64 | ||
24 | bool | ||
25 | default n | ||
26 | |||
19 | config GENERIC_FIND_NEXT_BIT | 27 | config GENERIC_FIND_NEXT_BIT |
20 | bool | 28 | bool |
21 | default y | 29 | default y |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index e067806b2208..424eb0eb1cd5 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -504,7 +504,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) | |||
504 | 504 | ||
505 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) | 505 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) |
506 | { | 506 | { |
507 | int dev = iminor(file->f_dentry->d_inode); | 507 | int dev = iminor(file->f_path.dentry->d_inode); |
508 | unsigned int mask = 0; | 508 | unsigned int mask = 0; |
509 | sync_port* port; | 509 | sync_port* port; |
510 | DEBUGPOLL( static unsigned int prev_mask = 0; ); | 510 | DEBUGPOLL( static unsigned int prev_mask = 0; ); |
@@ -531,7 +531,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, | |||
531 | unsigned int cmd, unsigned long arg) | 531 | unsigned int cmd, unsigned long arg) |
532 | { | 532 | { |
533 | int return_val = 0; | 533 | int return_val = 0; |
534 | int dev = iminor(file->f_dentry->d_inode); | 534 | int dev = iminor(file->f_path.dentry->d_inode); |
535 | sync_port* port; | 535 | sync_port* port; |
536 | reg_sser_rw_tr_cfg tr_cfg; | 536 | reg_sser_rw_tr_cfg tr_cfg; |
537 | reg_sser_rw_rec_cfg rec_cfg; | 537 | reg_sser_rw_rec_cfg rec_cfg; |
@@ -789,7 +789,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, | |||
789 | static ssize_t sync_serial_write(struct file * file, const char * buf, | 789 | static ssize_t sync_serial_write(struct file * file, const char * buf, |
790 | size_t count, loff_t *ppos) | 790 | size_t count, loff_t *ppos) |
791 | { | 791 | { |
792 | int dev = iminor(file->f_dentry->d_inode); | 792 | int dev = iminor(file->f_path.dentry->d_inode); |
793 | DECLARE_WAITQUEUE(wait, current); | 793 | DECLARE_WAITQUEUE(wait, current); |
794 | sync_port *port; | 794 | sync_port *port; |
795 | unsigned long c, c1; | 795 | unsigned long c, c1; |
@@ -919,7 +919,7 @@ static ssize_t sync_serial_write(struct file * file, const char * buf, | |||
919 | static ssize_t sync_serial_read(struct file * file, char * buf, | 919 | static ssize_t sync_serial_read(struct file * file, char * buf, |
920 | size_t count, loff_t *ppos) | 920 | size_t count, loff_t *ppos) |
921 | { | 921 | { |
922 | int dev = iminor(file->f_dentry->d_inode); | 922 | int dev = iminor(file->f_path.dentry->d_inode); |
923 | int avail; | 923 | int avail; |
924 | sync_port *port; | 924 | sync_port *port; |
925 | unsigned char* start; | 925 | unsigned char* start; |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index cf1c446e003a..7561d7b72e75 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -41,6 +41,14 @@ config TIME_LOW_RES | |||
41 | bool | 41 | bool |
42 | default y | 42 | default y |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default y | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default y | ||
51 | |||
44 | mainmenu "Fujitsu FR-V Kernel Configuration" | 52 | mainmenu "Fujitsu FR-V Kernel Configuration" |
45 | 53 | ||
46 | source "init/Kconfig" | 54 | source "init/Kconfig" |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c1d9fc8f1a85..ee677ced7b68 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -223,7 +223,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, | |||
223 | 223 | ||
224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, | 224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, |
225 | void __user *oldval, size_t __user *oldlenp, | 225 | void __user *oldval, size_t __user *oldlenp, |
226 | void __user *newval, size_t newlen, void **context) | 226 | void __user *newval, size_t newlen) |
227 | { | 227 | { |
228 | if (oldval && oldlenp) { | 228 | if (oldval && oldlenp) { |
229 | size_t oldlen; | 229 | size_t oldlen; |
@@ -326,7 +326,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, | |||
326 | 326 | ||
327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, | 327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, |
328 | void __user *oldval, size_t __user *oldlenp, | 328 | void __user *oldval, size_t __user *oldlenp, |
329 | void __user *newval, size_t newlen, void **context) | 329 | void __user *newval, size_t newlen) |
330 | { | 330 | { |
331 | if (oldval && oldlenp) { | 331 | if (oldval && oldlenp) { |
332 | size_t oldlen; | 332 | size_t oldlen; |
@@ -370,7 +370,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, | |||
370 | 370 | ||
371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, | 371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, |
372 | void __user *oldval, size_t __user *oldlenp, | 372 | void __user *oldval, size_t __user *oldlenp, |
373 | void __user *newval, size_t newlen, void **context) | 373 | void __user *newval, size_t newlen) |
374 | { | 374 | { |
375 | if (oldval && oldlenp) { | 375 | if (oldval && oldlenp) { |
376 | size_t oldlen; | 376 | size_t oldlen; |
diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c index f5a653033fe0..9477ccce070e 100644 --- a/arch/frv/mm/elf-fdpic.c +++ b/arch/frv/mm/elf-fdpic.c | |||
@@ -110,14 +110,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi | |||
110 | 110 | ||
111 | #if 0 | 111 | #if 0 |
112 | printk("[area] l=%lx (ENOMEM) f='%s'\n", | 112 | printk("[area] l=%lx (ENOMEM) f='%s'\n", |
113 | len, filp ? filp->f_dentry->d_name.name : ""); | 113 | len, filp ? filp->f_path.dentry->d_name.name : ""); |
114 | #endif | 114 | #endif |
115 | return -ENOMEM; | 115 | return -ENOMEM; |
116 | 116 | ||
117 | success: | 117 | success: |
118 | #if 0 | 118 | #if 0 |
119 | printk("[area] l=%lx ad=%lx f='%s'\n", | 119 | printk("[area] l=%lx ad=%lx f='%s'\n", |
120 | len, addr, filp ? filp->f_dentry->d_name.name : ""); | 120 | len, addr, filp ? filp->f_path.dentry->d_name.name : ""); |
121 | #endif | 121 | #endif |
122 | return addr; | 122 | return addr; |
123 | } /* end arch_get_unmapped_area() */ | 123 | } /* end arch_get_unmapped_area() */ |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index cabf0bfffc53..34a84bc4baf5 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -29,6 +29,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
29 | bool | 29 | bool |
30 | default n | 30 | default n |
31 | 31 | ||
32 | config ARCH_HAS_ILOG2_U32 | ||
33 | bool | ||
34 | default n | ||
35 | |||
36 | config ARCH_HAS_ILOG2_U64 | ||
37 | bool | ||
38 | default n | ||
39 | |||
32 | config GENERIC_FIND_NEXT_BIT | 40 | config GENERIC_FIND_NEXT_BIT |
33 | bool | 41 | bool |
34 | default y | 42 | default y |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index ea70359b02d0..0d67a0a1151e 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -49,6 +49,11 @@ config GENERIC_IOMAP | |||
49 | bool | 49 | bool |
50 | default y | 50 | default y |
51 | 51 | ||
52 | config GENERIC_BUG | ||
53 | bool | ||
54 | default y | ||
55 | depends on BUG | ||
56 | |||
52 | config GENERIC_HWEIGHT | 57 | config GENERIC_HWEIGHT |
53 | bool | 58 | bool |
54 | default y | 59 | default y |
@@ -185,6 +190,7 @@ endchoice | |||
185 | config PARAVIRT | 190 | config PARAVIRT |
186 | bool "Paravirtualization support (EXPERIMENTAL)" | 191 | bool "Paravirtualization support (EXPERIMENTAL)" |
187 | depends on EXPERIMENTAL | 192 | depends on EXPERIMENTAL |
193 | depends on !(X86_VISWS || X86_VOYAGER) | ||
188 | help | 194 | help |
189 | Paravirtualization is a way of running multiple instances of | 195 | Paravirtualization is a way of running multiple instances of |
190 | Linux on the same machine, under a hypervisor. This option | 196 | Linux on the same machine, under a hypervisor. This option |
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index 821fd269ca58..2aecfba4ac4f 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu | |||
@@ -248,6 +248,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
248 | depends on !M386 | 248 | depends on !M386 |
249 | default y | 249 | default y |
250 | 250 | ||
251 | config ARCH_HAS_ILOG2_U32 | ||
252 | bool | ||
253 | default n | ||
254 | |||
255 | config ARCH_HAS_ILOG2_U64 | ||
256 | bool | ||
257 | default n | ||
258 | |||
251 | config GENERIC_CALIBRATE_DELAY | 259 | config GENERIC_CALIBRATE_DELAY |
252 | bool | 260 | bool |
253 | default y | 261 | default y |
diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 65891f11aced..3265208e5899 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-git7 | 3 | # Linux kernel version: 2.6.19-git14 |
4 | # Wed Dec 6 23:50:49 2006 | 4 | # Sat Dec 9 21:23:14 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_32=y | 6 | CONFIG_X86_32=y |
7 | CONFIG_GENERIC_TIME=y | 7 | CONFIG_GENERIC_TIME=y |
@@ -12,6 +12,7 @@ CONFIG_X86=y | |||
12 | CONFIG_MMU=y | 12 | CONFIG_MMU=y |
13 | CONFIG_GENERIC_ISA_DMA=y | 13 | CONFIG_GENERIC_ISA_DMA=y |
14 | CONFIG_GENERIC_IOMAP=y | 14 | CONFIG_GENERIC_IOMAP=y |
15 | CONFIG_GENERIC_BUG=y | ||
15 | CONFIG_GENERIC_HWEIGHT=y | 16 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 17 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
17 | CONFIG_DMI=y | 18 | CONFIG_DMI=y |
@@ -141,6 +142,8 @@ CONFIG_X86_CMPXCHG=y | |||
141 | CONFIG_X86_XADD=y | 142 | CONFIG_X86_XADD=y |
142 | CONFIG_X86_L1_CACHE_SHIFT=7 | 143 | CONFIG_X86_L1_CACHE_SHIFT=7 |
143 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 144 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
145 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
146 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
144 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 147 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
145 | CONFIG_X86_WP_WORKS_OK=y | 148 | CONFIG_X86_WP_WORKS_OK=y |
146 | CONFIG_X86_INVLPG=y | 149 | CONFIG_X86_INVLPG=y |
@@ -203,6 +206,7 @@ CONFIG_MTRR=y | |||
203 | CONFIG_SECCOMP=y | 206 | CONFIG_SECCOMP=y |
204 | # CONFIG_HZ_100 is not set | 207 | # CONFIG_HZ_100 is not set |
205 | CONFIG_HZ_250=y | 208 | CONFIG_HZ_250=y |
209 | # CONFIG_HZ_300 is not set | ||
206 | # CONFIG_HZ_1000 is not set | 210 | # CONFIG_HZ_1000 is not set |
207 | CONFIG_HZ=250 | 211 | CONFIG_HZ=250 |
208 | # CONFIG_KEXEC is not set | 212 | # CONFIG_KEXEC is not set |
@@ -563,6 +567,7 @@ CONFIG_IDEDMA_AUTO=y | |||
563 | # | 567 | # |
564 | # CONFIG_RAID_ATTRS is not set | 568 | # CONFIG_RAID_ATTRS is not set |
565 | CONFIG_SCSI=y | 569 | CONFIG_SCSI=y |
570 | # CONFIG_SCSI_TGT is not set | ||
566 | CONFIG_SCSI_NETLINK=y | 571 | CONFIG_SCSI_NETLINK=y |
567 | # CONFIG_SCSI_PROC_FS is not set | 572 | # CONFIG_SCSI_PROC_FS is not set |
568 | 573 | ||
@@ -583,6 +588,7 @@ CONFIG_CHR_DEV_SG=y | |||
583 | # CONFIG_SCSI_MULTI_LUN is not set | 588 | # CONFIG_SCSI_MULTI_LUN is not set |
584 | # CONFIG_SCSI_CONSTANTS is not set | 589 | # CONFIG_SCSI_CONSTANTS is not set |
585 | # CONFIG_SCSI_LOGGING is not set | 590 | # CONFIG_SCSI_LOGGING is not set |
591 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
586 | 592 | ||
587 | # | 593 | # |
588 | # SCSI Transports | 594 | # SCSI Transports |
@@ -642,6 +648,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0 | |||
642 | # CONFIG_SCSI_DC390T is not set | 648 | # CONFIG_SCSI_DC390T is not set |
643 | # CONFIG_SCSI_NSP32 is not set | 649 | # CONFIG_SCSI_NSP32 is not set |
644 | # CONFIG_SCSI_DEBUG is not set | 650 | # CONFIG_SCSI_DEBUG is not set |
651 | # CONFIG_SCSI_SRP is not set | ||
645 | 652 | ||
646 | # | 653 | # |
647 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 654 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -1082,10 +1089,7 @@ CONFIG_SOUND=y | |||
1082 | # Open Sound System | 1089 | # Open Sound System |
1083 | # | 1090 | # |
1084 | CONFIG_SOUND_PRIME=y | 1091 | CONFIG_SOUND_PRIME=y |
1085 | CONFIG_OSS_OBSOLETE_DRIVER=y | ||
1086 | # CONFIG_SOUND_BT878 is not set | 1092 | # CONFIG_SOUND_BT878 is not set |
1087 | # CONFIG_SOUND_EMU10K1 is not set | ||
1088 | # CONFIG_SOUND_FUSION is not set | ||
1089 | # CONFIG_SOUND_ES1371 is not set | 1093 | # CONFIG_SOUND_ES1371 is not set |
1090 | CONFIG_SOUND_ICH=y | 1094 | CONFIG_SOUND_ICH=y |
1091 | # CONFIG_SOUND_TRIDENT is not set | 1095 | # CONFIG_SOUND_TRIDENT is not set |
@@ -1095,6 +1099,11 @@ CONFIG_SOUND_ICH=y | |||
1095 | # CONFIG_SOUND_OSS is not set | 1099 | # CONFIG_SOUND_OSS is not set |
1096 | 1100 | ||
1097 | # | 1101 | # |
1102 | # HID Devices | ||
1103 | # | ||
1104 | CONFIG_HID=y | ||
1105 | |||
1106 | # | ||
1098 | # USB support | 1107 | # USB support |
1099 | # | 1108 | # |
1100 | CONFIG_USB_ARCH_HAS_HCD=y | 1109 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1158,8 +1167,7 @@ CONFIG_USB_STORAGE=y | |||
1158 | # USB Input Devices | 1167 | # USB Input Devices |
1159 | # | 1168 | # |
1160 | CONFIG_USB_HID=y | 1169 | CONFIG_USB_HID=y |
1161 | CONFIG_USB_HIDINPUT=y | 1170 | # CONFIG_USB_HID_POWERBOOK is not set |
1162 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1163 | # CONFIG_HID_FF is not set | 1171 | # CONFIG_HID_FF is not set |
1164 | # CONFIG_USB_HIDDEV is not set | 1172 | # CONFIG_USB_HIDDEV is not set |
1165 | # CONFIG_USB_AIPTEK is not set | 1173 | # CONFIG_USB_AIPTEK is not set |
@@ -1444,6 +1452,11 @@ CONFIG_NLS_ISO8859_15=y | |||
1444 | CONFIG_NLS_UTF8=y | 1452 | CONFIG_NLS_UTF8=y |
1445 | 1453 | ||
1446 | # | 1454 | # |
1455 | # Distributed Lock Manager | ||
1456 | # | ||
1457 | # CONFIG_DLM is not set | ||
1458 | |||
1459 | # | ||
1447 | # Instrumentation Support | 1460 | # Instrumentation Support |
1448 | # | 1461 | # |
1449 | CONFIG_PROFILING=y | 1462 | CONFIG_PROFILING=y |
@@ -1509,6 +1522,7 @@ CONFIG_DOUBLEFAULT=y | |||
1509 | # | 1522 | # |
1510 | # Library routines | 1523 | # Library routines |
1511 | # | 1524 | # |
1525 | CONFIG_BITREVERSE=y | ||
1512 | # CONFIG_CRC_CCITT is not set | 1526 | # CONFIG_CRC_CCITT is not set |
1513 | # CONFIG_CRC16 is not set | 1527 | # CONFIG_CRC16 is not set |
1514 | CONFIG_CRC32=y | 1528 | CONFIG_CRC32=y |
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index db6dd20c3589..51130b39cd2e 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -116,7 +116,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
116 | char __user *tmp = buf; | 116 | char __user *tmp = buf; |
117 | u32 data[4]; | 117 | u32 data[4]; |
118 | u32 reg = *ppos; | 118 | u32 reg = *ppos; |
119 | int cpu = iminor(file->f_dentry->d_inode); | 119 | int cpu = iminor(file->f_path.dentry->d_inode); |
120 | 120 | ||
121 | if (count % 16) | 121 | if (count % 16) |
122 | return -EINVAL; /* Invalid chunk size */ | 122 | return -EINVAL; /* Invalid chunk size */ |
@@ -134,7 +134,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
134 | 134 | ||
135 | static int cpuid_open(struct inode *inode, struct file *file) | 135 | static int cpuid_open(struct inode *inode, struct file *file) |
136 | { | 136 | { |
137 | unsigned int cpu = iminor(file->f_dentry->d_inode); | 137 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
138 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 138 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; |
139 | 139 | ||
140 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 140 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index e21dcde0790e..2424cc9c7b3d 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2485,7 +2485,7 @@ device_initcall(ioapic_init_sysfs); | |||
2485 | int create_irq(void) | 2485 | int create_irq(void) |
2486 | { | 2486 | { |
2487 | /* Allocate an unused irq */ | 2487 | /* Allocate an unused irq */ |
2488 | int irq, new, vector; | 2488 | int irq, new, vector = 0; |
2489 | unsigned long flags; | 2489 | unsigned long flags; |
2490 | 2490 | ||
2491 | irq = -ENOSPC; | 2491 | irq = -ENOSPC; |
diff --git a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c index d7d9c8b23f72..3db0a5442eb1 100644 --- a/arch/i386/kernel/module.c +++ b/arch/i386/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/bug.h> | ||
24 | 25 | ||
25 | #if 0 | 26 | #if 0 |
26 | #define DEBUGP printk | 27 | #define DEBUGP printk |
@@ -141,10 +142,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
141 | apply_paravirt(pseg, pseg + para->sh_size); | 142 | apply_paravirt(pseg, pseg + para->sh_size); |
142 | } | 143 | } |
143 | 144 | ||
144 | return 0; | 145 | return module_bug_finalize(hdr, sechdrs, me); |
145 | } | 146 | } |
146 | 147 | ||
147 | void module_arch_cleanup(struct module *mod) | 148 | void module_arch_cleanup(struct module *mod) |
148 | { | 149 | { |
149 | alternatives_smp_module_del(mod); | 150 | alternatives_smp_module_del(mod); |
151 | module_bug_cleanup(mod); | ||
150 | } | 152 | } |
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 1d1a56cae340..4a472a17d1c6 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -172,7 +172,7 @@ static ssize_t msr_read(struct file *file, char __user * buf, | |||
172 | u32 __user *tmp = (u32 __user *) buf; | 172 | u32 __user *tmp = (u32 __user *) buf; |
173 | u32 data[2]; | 173 | u32 data[2]; |
174 | u32 reg = *ppos; | 174 | u32 reg = *ppos; |
175 | int cpu = iminor(file->f_dentry->d_inode); | 175 | int cpu = iminor(file->f_path.dentry->d_inode); |
176 | int err; | 176 | int err; |
177 | 177 | ||
178 | if (count % 8) | 178 | if (count % 8) |
@@ -196,7 +196,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
196 | const u32 __user *tmp = (const u32 __user *)buf; | 196 | const u32 __user *tmp = (const u32 __user *)buf; |
197 | u32 data[2]; | 197 | u32 data[2]; |
198 | u32 reg = *ppos; | 198 | u32 reg = *ppos; |
199 | int cpu = iminor(file->f_dentry->d_inode); | 199 | int cpu = iminor(file->f_path.dentry->d_inode); |
200 | int err; | 200 | int err; |
201 | 201 | ||
202 | if (count % 8) | 202 | if (count % 8) |
@@ -216,7 +216,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
216 | 216 | ||
217 | static int msr_open(struct inode *inode, struct file *file) | 217 | static int msr_open(struct inode *inode, struct file *file) |
218 | { | 218 | { |
219 | unsigned int cpu = iminor(file->f_dentry->d_inode); | 219 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
220 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 220 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; |
221 | 221 | ||
222 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 222 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index f5bc7e1be801..a5e34d655965 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -195,6 +195,8 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | static int endflag __initdata = 0; | ||
199 | |||
198 | #ifdef CONFIG_SMP | 200 | #ifdef CONFIG_SMP |
199 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when | 201 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when |
200 | * the CPU is idle. To make sure the NMI watchdog really ticks on all | 202 | * the CPU is idle. To make sure the NMI watchdog really ticks on all |
@@ -202,7 +204,6 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
202 | */ | 204 | */ |
203 | static __init void nmi_cpu_busy(void *data) | 205 | static __init void nmi_cpu_busy(void *data) |
204 | { | 206 | { |
205 | volatile int *endflag = data; | ||
206 | local_irq_enable_in_hardirq(); | 207 | local_irq_enable_in_hardirq(); |
207 | /* Intentionally don't use cpu_relax here. This is | 208 | /* Intentionally don't use cpu_relax here. This is |
208 | to make sure that the performance counter really ticks, | 209 | to make sure that the performance counter really ticks, |
@@ -210,14 +211,13 @@ static __init void nmi_cpu_busy(void *data) | |||
210 | pause instruction. On a real HT machine this is fine because | 211 | pause instruction. On a real HT machine this is fine because |
211 | all other CPUs are busy with "useless" delay loops and don't | 212 | all other CPUs are busy with "useless" delay loops and don't |
212 | care if they get somewhat less cycles. */ | 213 | care if they get somewhat less cycles. */ |
213 | while (*endflag == 0) | 214 | while (endflag == 0) |
214 | barrier(); | 215 | mb(); |
215 | } | 216 | } |
216 | #endif | 217 | #endif |
217 | 218 | ||
218 | static int __init check_nmi_watchdog(void) | 219 | static int __init check_nmi_watchdog(void) |
219 | { | 220 | { |
220 | volatile int endflag = 0; | ||
221 | unsigned int *prev_nmi_count; | 221 | unsigned int *prev_nmi_count; |
222 | int cpu; | 222 | int cpu; |
223 | 223 | ||
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index a01320a7b636..34874c398b44 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c | |||
@@ -10,13 +10,38 @@ | |||
10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) | 10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) |
11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) |
12 | { | 12 | { |
13 | u8 config, rev; | ||
14 | u32 word; | ||
15 | |||
16 | /* BIOS may enable hardware IRQ balancing for | ||
17 | * E7520/E7320/E7525(revision ID 0x9 and below) | ||
18 | * based platforms. | ||
19 | * For those platforms, make sure that the genapic is set to 'flat' | ||
20 | */ | ||
21 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); | ||
22 | if (rev > 0x9) | ||
23 | return; | ||
24 | |||
25 | /* enable access to config space*/ | ||
26 | pci_read_config_byte(dev, 0xf4, &config); | ||
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | ||
28 | |||
29 | /* read xTPR register */ | ||
30 | raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); | ||
31 | |||
32 | if (!(word & (1 << 13))) { | ||
13 | #ifdef CONFIG_X86_64 | 33 | #ifdef CONFIG_X86_64 |
14 | if (genapic != &apic_flat) | 34 | if (genapic != &apic_flat) |
15 | panic("APIC mode must be flat on this system\n"); | 35 | panic("APIC mode must be flat on this system\n"); |
16 | #elif defined(CONFIG_X86_GENERICARCH) | 36 | #elif defined(CONFIG_X86_GENERICARCH) |
17 | if (genapic != &apic_default) | 37 | if (genapic != &apic_default) |
18 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); | 38 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); |
19 | #endif | 39 | #endif |
40 | } | ||
41 | |||
42 | /* put back the original value for config space*/ | ||
43 | if (!(config & 0x2)) | ||
44 | pci_write_config_byte(dev, 0xf4, config); | ||
20 | } | 45 | } |
21 | 46 | ||
22 | void __init quirk_intel_irqbalance(void) | 47 | void __init quirk_intel_irqbalance(void) |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bf0e3c83b8b..b0f84e5778ad 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -69,7 +69,7 @@ static int __devinitdata smp_b_stepping; | |||
69 | 69 | ||
70 | /* Number of siblings per CPU package */ | 70 | /* Number of siblings per CPU package */ |
71 | int smp_num_siblings = 1; | 71 | int smp_num_siblings = 1; |
72 | #ifdef CONFIG_X86_HT | 72 | #ifdef CONFIG_SMP |
73 | EXPORT_SYMBOL(smp_num_siblings); | 73 | EXPORT_SYMBOL(smp_num_siblings); |
74 | #endif | 74 | #endif |
75 | 75 | ||
@@ -1118,7 +1118,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
1118 | 1118 | ||
1119 | /* init low mem mapping */ | 1119 | /* init low mem mapping */ |
1120 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, | 1120 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, |
1121 | KERNEL_PGD_PTRS); | 1121 | min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); |
1122 | flush_tlb_all(); | 1122 | flush_tlb_all(); |
1123 | schedule_work(&info.task); | 1123 | schedule_work(&info.task); |
1124 | wait_for_completion(&done); | 1124 | wait_for_completion(&done); |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 68de48e498ca..2b30dbf8d117 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/unwind.h> | 30 | #include <linux/unwind.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/nmi.h> | 32 | #include <linux/nmi.h> |
33 | #include <linux/bug.h> | ||
33 | 34 | ||
34 | #ifdef CONFIG_EISA | 35 | #ifdef CONFIG_EISA |
35 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
@@ -420,43 +421,22 @@ void show_registers(struct pt_regs *regs) | |||
420 | printk("\n"); | 421 | printk("\n"); |
421 | } | 422 | } |
422 | 423 | ||
423 | static void handle_BUG(struct pt_regs *regs) | 424 | int is_valid_bugaddr(unsigned long eip) |
424 | { | 425 | { |
425 | unsigned long eip = regs->eip; | ||
426 | unsigned short ud2; | 426 | unsigned short ud2; |
427 | 427 | ||
428 | if (eip < PAGE_OFFSET) | 428 | if (eip < PAGE_OFFSET) |
429 | return; | 429 | return 0; |
430 | if (probe_kernel_address((unsigned short *)eip, ud2)) | 430 | if (probe_kernel_address((unsigned short *)eip, ud2)) |
431 | return; | 431 | return 0; |
432 | if (ud2 != 0x0b0f) | ||
433 | return; | ||
434 | |||
435 | printk(KERN_EMERG "------------[ cut here ]------------\n"); | ||
436 | |||
437 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
438 | do { | ||
439 | unsigned short line; | ||
440 | char *file; | ||
441 | char c; | ||
442 | |||
443 | if (probe_kernel_address((unsigned short *)(eip + 2), line)) | ||
444 | break; | ||
445 | if (probe_kernel_address((char **)(eip + 4), file) || | ||
446 | (unsigned long)file < PAGE_OFFSET || | ||
447 | probe_kernel_address(file, c)) | ||
448 | file = "<bad filename>"; | ||
449 | 432 | ||
450 | printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line); | 433 | return ud2 == 0x0b0f; |
451 | return; | ||
452 | } while (0); | ||
453 | #endif | ||
454 | printk(KERN_EMERG "Kernel BUG at [verbose debug info unavailable]\n"); | ||
455 | } | 434 | } |
456 | 435 | ||
457 | /* This is gone through when something in the kernel | 436 | /* |
458 | * has done something bad and is about to be terminated. | 437 | * This is gone through when something in the kernel has done something bad and |
459 | */ | 438 | * is about to be terminated. |
439 | */ | ||
460 | void die(const char * str, struct pt_regs * regs, long err) | 440 | void die(const char * str, struct pt_regs * regs, long err) |
461 | { | 441 | { |
462 | static struct { | 442 | static struct { |
@@ -488,7 +468,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
488 | unsigned long esp; | 468 | unsigned long esp; |
489 | unsigned short ss; | 469 | unsigned short ss; |
490 | 470 | ||
491 | handle_BUG(regs); | 471 | report_bug(regs->eip); |
472 | |||
492 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 473 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); |
493 | #ifdef CONFIG_PREEMPT | 474 | #ifdef CONFIG_PREEMPT |
494 | printk(KERN_EMERG "PREEMPT "); | 475 | printk(KERN_EMERG "PREEMPT "); |
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 56e6ad5cb045..a53c8b1854b5 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -26,6 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") | |||
26 | OUTPUT_ARCH(i386) | 26 | OUTPUT_ARCH(i386) |
27 | ENTRY(phys_startup_32) | 27 | ENTRY(phys_startup_32) |
28 | jiffies = jiffies_64; | 28 | jiffies = jiffies_64; |
29 | _proxy_pda = 0; | ||
29 | 30 | ||
30 | PHDRS { | 31 | PHDRS { |
31 | text PT_LOAD FLAGS(5); /* R_E */ | 32 | text PT_LOAD FLAGS(5); /* R_E */ |
@@ -57,6 +58,8 @@ SECTIONS | |||
57 | 58 | ||
58 | RODATA | 59 | RODATA |
59 | 60 | ||
61 | BUG_TABLE | ||
62 | |||
60 | . = ALIGN(4); | 63 | . = ALIGN(4); |
61 | .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { | 64 | .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { |
62 | __tracedata_start = .; | 65 | __tracedata_start = .; |
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c index 885c7cbfd478..233ee20907b9 100644 --- a/arch/i386/mach-visws/setup.c +++ b/arch/i386/mach-visws/setup.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | #include <linux/module.h> | ||
9 | 10 | ||
10 | #include <asm/fixmap.h> | 11 | #include <asm/fixmap.h> |
11 | #include <asm/arch_hooks.h> | 12 | #include <asm/arch_hooks.h> |
@@ -142,6 +143,8 @@ void __init time_init_hook(void) | |||
142 | 143 | ||
143 | unsigned long sgivwfb_mem_phys; | 144 | unsigned long sgivwfb_mem_phys; |
144 | unsigned long sgivwfb_mem_size; | 145 | unsigned long sgivwfb_mem_size; |
146 | EXPORT_SYMBOL(sgivwfb_mem_phys); | ||
147 | EXPORT_SYMBOL(sgivwfb_mem_size); | ||
145 | 148 | ||
146 | long long mem_size __initdata = 0; | 149 | long long mem_size __initdata = 0; |
147 | 150 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 75d839715b2f..fcacfe291b9b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -34,6 +34,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
34 | bool | 34 | bool |
35 | default y | 35 | default y |
36 | 36 | ||
37 | config ARCH_HAS_ILOG2_U32 | ||
38 | bool | ||
39 | default n | ||
40 | |||
41 | config ARCH_HAS_ILOG2_U64 | ||
42 | bool | ||
43 | default n | ||
44 | |||
37 | config GENERIC_FIND_NEXT_BIT | 45 | config GENERIC_FIND_NEXT_BIT |
38 | bool | 46 | bool |
39 | default y | 47 | default y |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index a4a6e1463af8..957681c39ad9 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -235,7 +235,7 @@ mmap_subpage (struct file *file, unsigned long start, unsigned long end, int pro | |||
235 | 235 | ||
236 | if (!(flags & MAP_ANONYMOUS)) { | 236 | if (!(flags & MAP_ANONYMOUS)) { |
237 | /* read the file contents */ | 237 | /* read the file contents */ |
238 | inode = file->f_dentry->d_inode; | 238 | inode = file->f_path.dentry->d_inode; |
239 | if (!inode->i_fop || !file->f_op->read | 239 | if (!inode->i_fop || !file->f_op->read |
240 | || ((*file->f_op->read)(file, (char __user *) start, end - start, &off) < 0)) | 240 | || ((*file->f_op->read)(file, (char __user *) start, end - start, &off) < 0)) |
241 | { | 241 | { |
@@ -837,7 +837,7 @@ emulate_mmap (struct file *file, unsigned long start, unsigned long len, int pro | |||
837 | 837 | ||
838 | if (!is_congruent) { | 838 | if (!is_congruent) { |
839 | /* read the file contents */ | 839 | /* read the file contents */ |
840 | inode = file->f_dentry->d_inode; | 840 | inode = file->f_path.dentry->d_inode; |
841 | if (!inode->i_fop || !file->f_op->read | 841 | if (!inode->i_fop || !file->f_op->read |
842 | || ((*file->f_op->read)(file, (char __user *) pstart, pend - pstart, &poff) | 842 | || ((*file->f_op->read)(file, (char __user *) pstart, pend - pstart, &poff) |
843 | < 0)) | 843 | < 0)) |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index dbb28164b19b..aa94f60fa8e7 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2188,13 +2188,13 @@ pfm_alloc_fd(struct file **cfile) | |||
2188 | /* | 2188 | /* |
2189 | * allocate a new dcache entry | 2189 | * allocate a new dcache entry |
2190 | */ | 2190 | */ |
2191 | file->f_dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2191 | file->f_path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2192 | if (!file->f_dentry) goto out; | 2192 | if (!file->f_path.dentry) goto out; |
2193 | 2193 | ||
2194 | file->f_dentry->d_op = &pfmfs_dentry_operations; | 2194 | file->f_path.dentry->d_op = &pfmfs_dentry_operations; |
2195 | 2195 | ||
2196 | d_add(file->f_dentry, inode); | 2196 | d_add(file->f_path.dentry, inode); |
2197 | file->f_vfsmnt = mntget(pfmfs_mnt); | 2197 | file->f_path.mnt = mntget(pfmfs_mnt); |
2198 | file->f_mapping = inode->i_mapping; | 2198 | file->f_mapping = inode->i_mapping; |
2199 | 2199 | ||
2200 | file->f_op = &pfm_file_ops; | 2200 | file->f_op = &pfm_file_ops; |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index fd607ca51a8d..e375a2f0f2c3 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -302,7 +302,7 @@ salinfo_event_open(struct inode *inode, struct file *file) | |||
302 | static ssize_t | 302 | static ssize_t |
303 | salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) | 303 | salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
304 | { | 304 | { |
305 | struct inode *inode = file->f_dentry->d_inode; | 305 | struct inode *inode = file->f_path.dentry->d_inode; |
306 | struct proc_dir_entry *entry = PDE(inode); | 306 | struct proc_dir_entry *entry = PDE(inode); |
307 | struct salinfo_data *data = entry->data; | 307 | struct salinfo_data *data = entry->data; |
308 | char cmd[32]; | 308 | char cmd[32]; |
@@ -464,7 +464,7 @@ retry: | |||
464 | static ssize_t | 464 | static ssize_t |
465 | salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) | 465 | salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
466 | { | 466 | { |
467 | struct inode *inode = file->f_dentry->d_inode; | 467 | struct inode *inode = file->f_path.dentry->d_inode; |
468 | struct proc_dir_entry *entry = PDE(inode); | 468 | struct proc_dir_entry *entry = PDE(inode); |
469 | struct salinfo_data *data = entry->data; | 469 | struct salinfo_data *data = entry->data; |
470 | u8 *buf; | 470 | u8 *buf; |
@@ -525,7 +525,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu) | |||
525 | static ssize_t | 525 | static ssize_t |
526 | salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) | 526 | salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) |
527 | { | 527 | { |
528 | struct inode *inode = file->f_dentry->d_inode; | 528 | struct inode *inode = file->f_path.dentry->d_inode; |
529 | struct proc_dir_entry *entry = PDE(inode); | 529 | struct proc_dir_entry *entry = PDE(inode); |
530 | struct salinfo_data *data = entry->data; | 530 | struct salinfo_data *data = entry->data; |
531 | char cmd[32]; | 531 | char cmd[32]; |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 41fd490af3b4..f383dab973f5 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -214,6 +214,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
214 | bool | 214 | bool |
215 | default n | 215 | default n |
216 | 216 | ||
217 | config ARCH_HAS_ILOG2_U32 | ||
218 | bool | ||
219 | default n | ||
220 | |||
221 | config ARCH_HAS_ILOG2_U64 | ||
222 | bool | ||
223 | default n | ||
224 | |||
217 | config GENERIC_FIND_NEXT_BIT | 225 | config GENERIC_FIND_NEXT_BIT |
218 | bool | 226 | bool |
219 | default y | 227 | default y |
diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5e3bb2..ee3c8be12fa0 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * arch/m32r/boot/compressed/m32r_sio.c | 2 | * arch/m32r/boot/compressed/m32r_sio.c |
3 | * | 3 | * |
4 | * 2003-02-12: Takeo Takahashi | 4 | * 2003-02-12: Takeo Takahashi |
5 | * 2006-11-30: OPSPUT support by Kazuhiro Inaoka | ||
5 | * | 6 | * |
6 | */ | 7 | */ |
7 | 8 | ||
@@ -16,7 +17,7 @@ static int puts(const char *s) | |||
16 | return 0; | 17 | return 0; |
17 | } | 18 | } |
18 | 19 | ||
19 | #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) | 20 | #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) |
20 | #include <asm/m32r.h> | 21 | #include <asm/m32r.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
@@ -31,7 +32,11 @@ static int puts(const char *s) | |||
31 | #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c00000 + 0x2000c) | 32 | #define BOOT_SIO0TXB (volatile unsigned short *)(0x02c00000 + 0x2000c) |
32 | #else | 33 | #else |
33 | #undef PLD_BASE | 34 | #undef PLD_BASE |
35 | #if defined(CONFIG_PLAT_OPSPUT) | ||
36 | #define PLD_BASE 0x1cc00000 | ||
37 | #else | ||
34 | #define PLD_BASE 0xa4c00000 | 38 | #define PLD_BASE 0xa4c00000 |
39 | #endif | ||
35 | #define BOOT_SIO0STS PLD_ESIO0STS | 40 | #define BOOT_SIO0STS PLD_ESIO0STS |
36 | #define BOOT_SIO0TXB PLD_ESIO0TXB | 41 | #define BOOT_SIO0TXB PLD_ESIO0TXB |
37 | #endif | 42 | #endif |
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index ac6d840b382b..a2c472c0549f 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -23,35 +23,35 @@ | |||
23 | * updated in fork.c:copy_thread, signal.c:do_signal, | 23 | * updated in fork.c:copy_thread, signal.c:do_signal, |
24 | * ptrace.c and ptrace.h | 24 | * ptrace.c and ptrace.h |
25 | * | 25 | * |
26 | * M32Rx/M32R2 M32R | 26 | * M32R/M32Rx/M32R2 |
27 | * @(sp) - r4 ditto | 27 | * @(sp) - r4 |
28 | * @(0x04,sp) - r5 ditto | 28 | * @(0x04,sp) - r5 |
29 | * @(0x08,sp) - r6 ditto | 29 | * @(0x08,sp) - r6 |
30 | * @(0x0c,sp) - *pt_regs ditto | 30 | * @(0x0c,sp) - *pt_regs |
31 | * @(0x10,sp) - r0 ditto | 31 | * @(0x10,sp) - r0 |
32 | * @(0x14,sp) - r1 ditto | 32 | * @(0x14,sp) - r1 |
33 | * @(0x18,sp) - r2 ditto | 33 | * @(0x18,sp) - r2 |
34 | * @(0x1c,sp) - r3 ditto | 34 | * @(0x1c,sp) - r3 |
35 | * @(0x20,sp) - r7 ditto | 35 | * @(0x20,sp) - r7 |
36 | * @(0x24,sp) - r8 ditto | 36 | * @(0x24,sp) - r8 |
37 | * @(0x28,sp) - r9 ditto | 37 | * @(0x28,sp) - r9 |
38 | * @(0x2c,sp) - r10 ditto | 38 | * @(0x2c,sp) - r10 |
39 | * @(0x30,sp) - r11 ditto | 39 | * @(0x30,sp) - r11 |
40 | * @(0x34,sp) - r12 ditto | 40 | * @(0x34,sp) - r12 |
41 | * @(0x38,sp) - syscall_nr ditto | 41 | * @(0x38,sp) - syscall_nr |
42 | * @(0x3c,sp) - acc0h @(0x3c,sp) - acch | 42 | * @(0x3c,sp) - acc0h |
43 | * @(0x40,sp) - acc0l @(0x40,sp) - accl | 43 | * @(0x40,sp) - acc0l |
44 | * @(0x44,sp) - acc1h @(0x44,sp) - dummy_acc1h | 44 | * @(0x44,sp) - acc1h ; ISA_DSP_LEVEL2 only |
45 | * @(0x48,sp) - acc1l @(0x48,sp) - dummy_acc1l | 45 | * @(0x48,sp) - acc1l ; ISA_DSP_LEVEL2 only |
46 | * @(0x4c,sp) - psw ditto | 46 | * @(0x4c,sp) - psw |
47 | * @(0x50,sp) - bpc ditto | 47 | * @(0x50,sp) - bpc |
48 | * @(0x54,sp) - bbpsw ditto | 48 | * @(0x54,sp) - bbpsw |
49 | * @(0x58,sp) - bbpc ditto | 49 | * @(0x58,sp) - bbpc |
50 | * @(0x5c,sp) - spu (cr3) ditto | 50 | * @(0x5c,sp) - spu (cr3) |
51 | * @(0x60,sp) - fp (r13) ditto | 51 | * @(0x60,sp) - fp (r13) |
52 | * @(0x64,sp) - lr (r14) ditto | 52 | * @(0x64,sp) - lr (r14) |
53 | * @(0x68,sp) - spi (cr2) ditto | 53 | * @(0x68,sp) - spi (cr2) |
54 | * @(0x6c,sp) - orig_r0 ditto | 54 | * @(0x6c,sp) - orig_r0 |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/linkage.h> | 57 | #include <linux/linkage.h> |
@@ -95,17 +95,10 @@ | |||
95 | #define R11(reg) @(0x30,reg) | 95 | #define R11(reg) @(0x30,reg) |
96 | #define R12(reg) @(0x34,reg) | 96 | #define R12(reg) @(0x34,reg) |
97 | #define SYSCALL_NR(reg) @(0x38,reg) | 97 | #define SYSCALL_NR(reg) @(0x38,reg) |
98 | #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) | ||
99 | #define ACC0H(reg) @(0x3C,reg) | 98 | #define ACC0H(reg) @(0x3C,reg) |
100 | #define ACC0L(reg) @(0x40,reg) | 99 | #define ACC0L(reg) @(0x40,reg) |
101 | #define ACC1H(reg) @(0x44,reg) | 100 | #define ACC1H(reg) @(0x44,reg) |
102 | #define ACC1L(reg) @(0x48,reg) | 101 | #define ACC1L(reg) @(0x48,reg) |
103 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) | ||
104 | #define ACCH(reg) @(0x3C,reg) | ||
105 | #define ACCL(reg) @(0x40,reg) | ||
106 | #else | ||
107 | #error unknown isa configuration | ||
108 | #endif | ||
109 | #define PSW(reg) @(0x4C,reg) | 102 | #define PSW(reg) @(0x4C,reg) |
110 | #define BPC(reg) @(0x50,reg) | 103 | #define BPC(reg) @(0x50,reg) |
111 | #define BBPSW(reg) @(0x54,reg) | 104 | #define BBPSW(reg) @(0x54,reg) |
@@ -603,8 +596,6 @@ ENTRY(ace_handler) | |||
603 | beqz r1, inst | 596 | beqz r1, inst |
604 | oprand: | 597 | oprand: |
605 | ld r2, @(low(MDEVA_offset),r2) ; set address | 598 | ld r2, @(low(MDEVA_offset),r2) ; set address |
606 | srli r2, #12 | ||
607 | slli r2, #12 | ||
608 | srli r1, #1 | 599 | srli r1, #1 |
609 | bra 1f | 600 | bra 1f |
610 | inst: | 601 | inst: |
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index da6c5f5c1f82..3cbb1f717e50 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c | |||
@@ -30,14 +30,34 @@ extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | |||
30 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | 30 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); |
31 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ | 31 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ |
32 | 32 | ||
33 | #define PORT2ADDR(port) _port2addr(port) | 33 | #define PORT2ADDR(port) _port2addr(port) |
34 | #define PORT2ADDR_USB(port) _port2addr_usb(port) | 34 | #define PORT2ADDR_USB(port) _port2addr_usb(port) |
35 | 35 | ||
36 | static inline void *_port2addr(unsigned long port) | 36 | static inline void *_port2addr(unsigned long port) |
37 | { | 37 | { |
38 | return (void *)(port | NONCACHE_OFFSET); | 38 | return (void *)(port | NONCACHE_OFFSET); |
39 | } | 39 | } |
40 | 40 | ||
41 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
42 | static inline void *__port2addr_ata(unsigned long port) | ||
43 | { | ||
44 | static int dummy_reg; | ||
45 | |||
46 | switch (port) { | ||
47 | case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); | ||
48 | case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); | ||
49 | case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); | ||
50 | case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); | ||
51 | case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); | ||
52 | case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); | ||
53 | case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); | ||
54 | case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); | ||
55 | case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); | ||
56 | default: return (void *)&dummy_reg; | ||
57 | } | ||
58 | } | ||
59 | #endif | ||
60 | |||
41 | /* | 61 | /* |
42 | * OPSPUT-LAN is located in the extended bus space | 62 | * OPSPUT-LAN is located in the extended bus space |
43 | * from 0x10000000 to 0x13ffffff on physical address. | 63 | * from 0x10000000 to 0x13ffffff on physical address. |
@@ -97,6 +117,12 @@ unsigned char _inb(unsigned long port) | |||
97 | { | 117 | { |
98 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 118 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
99 | return _ne_inb(PORT2ADDR_NE(port)); | 119 | return _ne_inb(PORT2ADDR_NE(port)); |
120 | |||
121 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
122 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
123 | return *(volatile unsigned char *)__port2addr_ata(port); | ||
124 | } | ||
125 | #endif | ||
100 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 126 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
101 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 127 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
102 | unsigned char b; | 128 | unsigned char b; |
@@ -112,6 +138,11 @@ unsigned short _inw(unsigned long port) | |||
112 | { | 138 | { |
113 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 139 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
114 | return _ne_inw(PORT2ADDR_NE(port)); | 140 | return _ne_inw(PORT2ADDR_NE(port)); |
141 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
142 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
143 | return *(volatile unsigned short *)__port2addr_ata(port); | ||
144 | } | ||
145 | #endif | ||
115 | #if defined(CONFIG_USB) | 146 | #if defined(CONFIG_USB) |
116 | else if(port >= 0x340 && port < 0x3a0) | 147 | else if(port >= 0x340 && port < 0x3a0) |
117 | return *(volatile unsigned short *)PORT2ADDR_USB(port); | 148 | return *(volatile unsigned short *)PORT2ADDR_USB(port); |
@@ -164,6 +195,11 @@ void _outb(unsigned char b, unsigned long port) | |||
164 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 195 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
165 | _ne_outb(b, PORT2ADDR_NE(port)); | 196 | _ne_outb(b, PORT2ADDR_NE(port)); |
166 | else | 197 | else |
198 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
199 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
200 | *(volatile unsigned char *)__port2addr_ata(port) = b; | ||
201 | } else | ||
202 | #endif | ||
167 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 203 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
168 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 204 | if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
169 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); | 205 | pcc_iowrite_byte(0, port, &b, sizeof(b), 1, 0); |
@@ -177,6 +213,11 @@ void _outw(unsigned short w, unsigned long port) | |||
177 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 213 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
178 | _ne_outw(w, PORT2ADDR_NE(port)); | 214 | _ne_outw(w, PORT2ADDR_NE(port)); |
179 | else | 215 | else |
216 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
217 | if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
218 | *(volatile unsigned short *)__port2addr_ata(port) = w; | ||
219 | } else | ||
220 | #endif | ||
180 | #if defined(CONFIG_USB) | 221 | #if defined(CONFIG_USB) |
181 | if(port >= 0x340 && port < 0x3a0) | 222 | if(port >= 0x340 && port < 0x3a0) |
182 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; | 223 | *(volatile unsigned short *)PORT2ADDR_USB(port) = w; |
@@ -222,6 +263,14 @@ void _insb(unsigned int port, void *addr, unsigned long count) | |||
222 | { | 263 | { |
223 | if (port >= LAN_IOSTART && port < LAN_IOEND) | 264 | if (port >= LAN_IOSTART && port < LAN_IOEND) |
224 | _ne_insb(PORT2ADDR_NE(port), addr, count); | 265 | _ne_insb(PORT2ADDR_NE(port), addr, count); |
266 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
267 | else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
268 | unsigned char *buf = addr; | ||
269 | unsigned char *portp = __port2addr_ata(port); | ||
270 | while (count--) | ||
271 | *buf++ = *(volatile unsigned char *)portp; | ||
272 | } | ||
273 | #endif | ||
225 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 274 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
226 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 275 | else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
227 | pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), | 276 | pcc_ioread_byte(0, port, (void *)addr, sizeof(unsigned char), |
@@ -254,6 +303,12 @@ void _insw(unsigned int port, void *addr, unsigned long count) | |||
254 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), | 303 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), |
255 | count, 1); | 304 | count, 1); |
256 | #endif | 305 | #endif |
306 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
307 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
308 | portp = __port2addr_ata(port); | ||
309 | while (count--) | ||
310 | *buf++ = *(volatile unsigned short *)portp; | ||
311 | #endif | ||
257 | } else { | 312 | } else { |
258 | portp = PORT2ADDR(port); | 313 | portp = PORT2ADDR(port); |
259 | while (count--) | 314 | while (count--) |
@@ -280,6 +335,12 @@ void _outsb(unsigned int port, const void *addr, unsigned long count) | |||
280 | portp = PORT2ADDR_NE(port); | 335 | portp = PORT2ADDR_NE(port); |
281 | while (count--) | 336 | while (count--) |
282 | _ne_outb(*buf++, portp); | 337 | _ne_outb(*buf++, portp); |
338 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
339 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
340 | portp = __port2addr_ata(port); | ||
341 | while (count--) | ||
342 | *(volatile unsigned char *)portp = *buf++; | ||
343 | #endif | ||
283 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 344 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
284 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 345 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
285 | pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), | 346 | pcc_iowrite_byte(0, port, (void *)addr, sizeof(unsigned char), |
@@ -305,6 +366,12 @@ void _outsw(unsigned int port, const void *addr, unsigned long count) | |||
305 | portp = PORT2ADDR_NE(port); | 366 | portp = PORT2ADDR_NE(port); |
306 | while (count--) | 367 | while (count--) |
307 | *(volatile unsigned short *)portp = *buf++; | 368 | *(volatile unsigned short *)portp = *buf++; |
369 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
370 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
371 | portp = __port2addr_ata(port); | ||
372 | while (count--) | ||
373 | *(volatile unsigned short *)portp = *buf++; | ||
374 | #endif | ||
308 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | 375 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) |
309 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | 376 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { |
310 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), | 377 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), |
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index 61d3b01cbe07..62d6b71de45f 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c | |||
@@ -218,13 +218,13 @@ static void shutdown_opsput_lanpld_irq(unsigned int irq) | |||
218 | 218 | ||
219 | static struct hw_interrupt_type opsput_lanpld_irq_type = | 219 | static struct hw_interrupt_type opsput_lanpld_irq_type = |
220 | { | 220 | { |
221 | "OPSPUT-PLD-LAN-IRQ", | 221 | .typename = "OPSPUT-PLD-LAN-IRQ", |
222 | startup_opsput_lanpld_irq, | 222 | .startup = startup_opsput_lanpld_irq, |
223 | shutdown_opsput_lanpld_irq, | 223 | .shutdown = shutdown_opsput_lanpld_irq, |
224 | enable_opsput_lanpld_irq, | 224 | .enable = enable_opsput_lanpld_irq, |
225 | disable_opsput_lanpld_irq, | 225 | .disable = disable_opsput_lanpld_irq, |
226 | mask_and_ack_opsput_lanpld, | 226 | .ack = mask_and_ack_opsput_lanpld, |
227 | end_opsput_lanpld_irq | 227 | .end = end_opsput_lanpld_irq |
228 | }; | 228 | }; |
229 | 229 | ||
230 | /* | 230 | /* |
@@ -374,7 +374,6 @@ void __init init_IRQ(void) | |||
374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); |
375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
376 | 376 | ||
377 | #if defined(CONFIG_M32R_CFC) | ||
378 | /* INT#1: CFC IREQ on PLD */ | 377 | /* INT#1: CFC IREQ on PLD */ |
379 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 378 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; |
380 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; | 379 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; |
@@ -398,8 +397,6 @@ void __init init_IRQ(void) | |||
398 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | 397 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ |
399 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 398 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
400 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | 399 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); |
401 | #endif /* CONFIG_M32R_CFC */ | ||
402 | |||
403 | 400 | ||
404 | /* | 401 | /* |
405 | * INT0# is used for LAN, DIO | 402 | * INT0# is used for LAN, DIO |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 8d5f551b5754..9b9feb0f1610 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
173 | goto good_area; | 173 | goto good_area; |
174 | if (!(vma->vm_flags & VM_GROWSDOWN)) | 174 | if (!(vma->vm_flags & VM_GROWSDOWN)) |
175 | goto bad_area; | 175 | goto bad_area; |
176 | #if 0 | 176 | |
177 | if (error_code & ACE_USERMODE) { | 177 | if (error_code & ACE_USERMODE) { |
178 | /* | 178 | /* |
179 | * accessing the stack below "spu" is always a bug. | 179 | * accessing the stack below "spu" is always a bug. |
@@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
184 | if (address + 4 < regs->spu) | 184 | if (address + 4 < regs->spu) |
185 | goto bad_area; | 185 | goto bad_area; |
186 | } | 186 | } |
187 | #endif | 187 | |
188 | if (expand_stack(vma, address)) | 188 | if (expand_stack(vma, address)) |
189 | goto bad_area; | 189 | goto bad_area; |
190 | /* | 190 | /* |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 7bc14461a6ac..70a577c89c7c 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -17,6 +17,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
17 | config RWSEM_XCHGADD_ALGORITHM | 17 | config RWSEM_XCHGADD_ALGORITHM |
18 | bool | 18 | bool |
19 | 19 | ||
20 | config ARCH_HAS_ILOG2_U32 | ||
21 | bool | ||
22 | default n | ||
23 | |||
24 | config ARCH_HAS_ILOG2_U64 | ||
25 | bool | ||
26 | default n | ||
27 | |||
20 | config GENERIC_HWEIGHT | 28 | config GENERIC_HWEIGHT |
21 | bool | 29 | bool |
22 | default y | 30 | default y |
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c index d64b5804e980..d01deb46ebbc 100644 --- a/arch/m68k/atari/stdma.c +++ b/arch/m68k/atari/stdma.c | |||
@@ -174,7 +174,7 @@ int stdma_islocked(void) | |||
174 | void __init stdma_init(void) | 174 | void __init stdma_init(void) |
175 | { | 175 | { |
176 | stdma_isr = NULL; | 176 | stdma_isr = NULL; |
177 | request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW, | 177 | request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | SA_SHIRQ, |
178 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); | 178 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/arch/m68k/kernel/sun3-head.S b/arch/m68k/kernel/sun3-head.S index bffd69a4a1ab..4b5f050204e8 100644 --- a/arch/m68k/kernel/sun3-head.S +++ b/arch/m68k/kernel/sun3-head.S | |||
@@ -67,16 +67,6 @@ ENTRY(_start) | |||
67 | 1: lea init_task,%curptr | get initial thread... | 67 | 1: lea init_task,%curptr | get initial thread... |
68 | lea init_thread_union+THREAD_SIZE,%sp | ...and its stack. | 68 | lea init_thread_union+THREAD_SIZE,%sp | ...and its stack. |
69 | 69 | ||
70 | /* copy bootinfo records from the loader to _end */ | ||
71 | lea _end, %a1 | ||
72 | lea BI_START, %a0 | ||
73 | /* number of longs to copy */ | ||
74 | movel %a0@, %d0 | ||
75 | 1: addl #4, %a0 | ||
76 | movel %a0@, %a1@ | ||
77 | addl #4, %a1 | ||
78 | dbf %d0, 1b | ||
79 | |||
80 | /* Point MSP at an invalid page to trap if it's used. --m */ | 70 | /* Point MSP at an invalid page to trap if it's used. --m */ |
81 | movl #(PAGESIZE),%d0 | 71 | movl #(PAGESIZE),%d0 |
82 | movc %d0,%msp | 72 | movc %d0,%msp |
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 2550b4ae2732..8c7eccbfc982 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -8,7 +8,7 @@ ENTRY(_start) | |||
8 | jiffies = jiffies_64 + 4; | 8 | jiffies = jiffies_64 + 4; |
9 | SECTIONS | 9 | SECTIONS |
10 | { | 10 | { |
11 | . = 0xE004000; | 11 | . = 0xE002000; |
12 | _text = .; /* Text and read-only data */ | 12 | _text = .; /* Text and read-only data */ |
13 | .text : { | 13 | .text : { |
14 | *(.head) | 14 | *(.head) |
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index 0f88812822b1..13c0b4ad01eb 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -299,7 +299,7 @@ void cache_clear (unsigned long paddr, int len) | |||
299 | mach_l2_flush(0); | 299 | mach_l2_flush(0); |
300 | #endif | 300 | #endif |
301 | } | 301 | } |
302 | EXPORT_SYMBOL(cache_clear); /* probably can be unexported */ | 302 | EXPORT_SYMBOL(cache_clear); |
303 | 303 | ||
304 | 304 | ||
305 | /* | 305 | /* |
@@ -352,7 +352,7 @@ void cache_push (unsigned long paddr, int len) | |||
352 | mach_l2_flush(1); | 352 | mach_l2_flush(1); |
353 | #endif | 353 | #endif |
354 | } | 354 | } |
355 | EXPORT_SYMBOL(cache_push); /* probably can be unexported */ | 355 | EXPORT_SYMBOL(cache_push); |
356 | 356 | ||
357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | 357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK |
358 | int mm_end_of_chunk (unsigned long addr, int len) | 358 | int mm_end_of_chunk (unsigned long addr, int len) |
diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index ac6640ade0b1..6a6513aa1ce8 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c | |||
@@ -49,7 +49,6 @@ void __init paging_init(void) | |||
49 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 49 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; |
50 | unsigned long size; | 50 | unsigned long size; |
51 | 51 | ||
52 | |||
53 | #ifdef TEST_VERIFY_AREA | 52 | #ifdef TEST_VERIFY_AREA |
54 | wp_works_ok = 0; | 53 | wp_works_ok = 0; |
55 | #endif | 54 | #endif |
@@ -94,7 +93,11 @@ void __init paging_init(void) | |||
94 | /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ | 93 | /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ |
95 | zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; | 94 | zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; |
96 | 95 | ||
97 | free_area_init(zones_size); | 96 | /* I really wish I knew why the following change made things better... -- Sam */ |
97 | /* free_area_init(zones_size); */ | ||
98 | free_area_init_node(0, NODE_DATA(0), zones_size, | ||
99 | (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL); | ||
100 | |||
98 | 101 | ||
99 | } | 102 | } |
100 | 103 | ||
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index aa70dde54228..25993c2a8fbb 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
25 | bool | 25 | bool |
26 | default n | 26 | default n |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index d8af858fe3f5..fd2ff0698a85 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -165,6 +165,7 @@ config MIPS_COBALT | |||
165 | select SYS_SUPPORTS_32BIT_KERNEL | 165 | select SYS_SUPPORTS_32BIT_KERNEL |
166 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 166 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
167 | select SYS_SUPPORTS_LITTLE_ENDIAN | 167 | select SYS_SUPPORTS_LITTLE_ENDIAN |
168 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
168 | 169 | ||
169 | config MACH_DECSTATION | 170 | config MACH_DECSTATION |
170 | bool "DECstations" | 171 | bool "DECstations" |
@@ -225,6 +226,7 @@ config MACH_JAZZ | |||
225 | select SYS_SUPPORTS_32BIT_KERNEL | 226 | select SYS_SUPPORTS_32BIT_KERNEL |
226 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 227 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
227 | select SYS_SUPPORTS_100HZ | 228 | select SYS_SUPPORTS_100HZ |
229 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
228 | help | 230 | help |
229 | This a family of machines based on the MIPS R4030 chipset which was | 231 | This a family of machines based on the MIPS R4030 chipset which was |
230 | used by several vendors to build RISC/os and Windows NT workstations. | 232 | used by several vendors to build RISC/os and Windows NT workstations. |
@@ -459,6 +461,11 @@ config PNX8550_JBS | |||
459 | select PNX8550 | 461 | select PNX8550 |
460 | select SYS_SUPPORTS_LITTLE_ENDIAN | 462 | select SYS_SUPPORTS_LITTLE_ENDIAN |
461 | 463 | ||
464 | config PNX8550_STB810 | ||
465 | bool "Support for Philips PNX8550 based STB810 board" | ||
466 | select PNX8550 | ||
467 | select SYS_SUPPORTS_LITTLE_ENDIAN | ||
468 | |||
462 | config DDB5477 | 469 | config DDB5477 |
463 | bool "NEC DDB Vrc-5477" | 470 | bool "NEC DDB Vrc-5477" |
464 | select DDB5XXX_COMMON | 471 | select DDB5XXX_COMMON |
@@ -482,6 +489,7 @@ config MACH_VR41XX | |||
482 | select SYS_HAS_CPU_VR41XX | 489 | select SYS_HAS_CPU_VR41XX |
483 | select SYS_SUPPORTS_32BIT_KERNEL | 490 | select SYS_SUPPORTS_32BIT_KERNEL |
484 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 491 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
492 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
485 | 493 | ||
486 | config PMC_YOSEMITE | 494 | config PMC_YOSEMITE |
487 | bool "PMC-Sierra Yosemite eval board" | 495 | bool "PMC-Sierra Yosemite eval board" |
@@ -515,6 +523,7 @@ config QEMU | |||
515 | select SYS_SUPPORTS_BIG_ENDIAN | 523 | select SYS_SUPPORTS_BIG_ENDIAN |
516 | select SYS_SUPPORTS_LITTLE_ENDIAN | 524 | select SYS_SUPPORTS_LITTLE_ENDIAN |
517 | select ARCH_SPARSEMEM_ENABLE | 525 | select ARCH_SPARSEMEM_ENABLE |
526 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
518 | help | 527 | help |
519 | Qemu is a software emulator which among other architectures also | 528 | Qemu is a software emulator which among other architectures also |
520 | can simulate a MIPS32 4Kc system. This patch adds support for the | 529 | can simulate a MIPS32 4Kc system. This patch adds support for the |
@@ -701,8 +710,8 @@ config SIBYTE_CRHONE | |||
701 | select SYS_SUPPORTS_HIGHMEM | 710 | select SYS_SUPPORTS_HIGHMEM |
702 | select SYS_SUPPORTS_LITTLE_ENDIAN | 711 | select SYS_SUPPORTS_LITTLE_ENDIAN |
703 | 712 | ||
704 | config SNI_RM200_PCI | 713 | config SNI_RM |
705 | bool "SNI RM200 PCI" | 714 | bool "SNI RM200/300/400" |
706 | select ARC if CPU_LITTLE_ENDIAN | 715 | select ARC if CPU_LITTLE_ENDIAN |
707 | select ARC32 if CPU_LITTLE_ENDIAN | 716 | select ARC32 if CPU_LITTLE_ENDIAN |
708 | select ARCH_MAY_HAVE_PC_FDC | 717 | select ARCH_MAY_HAVE_PC_FDC |
@@ -725,8 +734,8 @@ config SNI_RM200_PCI | |||
725 | select SYS_SUPPORTS_HIGHMEM | 734 | select SYS_SUPPORTS_HIGHMEM |
726 | select SYS_SUPPORTS_LITTLE_ENDIAN | 735 | select SYS_SUPPORTS_LITTLE_ENDIAN |
727 | help | 736 | help |
728 | The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens | 737 | The SNI RM200/300/400 are MIPS-based machines manufactured by |
729 | Nixdorf Informationssysteme (SNI), parent company of Pyramid | 738 | Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid |
730 | Technology and now in turn merged with Fujitsu. Say Y here to | 739 | Technology and now in turn merged with Fujitsu. Say Y here to |
731 | support this machine type. | 740 | support this machine type. |
732 | 741 | ||
@@ -754,6 +763,7 @@ config TOSHIBA_RBTX4927 | |||
754 | select SYS_SUPPORTS_64BIT_KERNEL | 763 | select SYS_SUPPORTS_64BIT_KERNEL |
755 | select SYS_SUPPORTS_BIG_ENDIAN | 764 | select SYS_SUPPORTS_BIG_ENDIAN |
756 | select TOSHIBA_BOARDS | 765 | select TOSHIBA_BOARDS |
766 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
757 | help | 767 | help |
758 | This Toshiba board is based on the TX4927 processor. Say Y here to | 768 | This Toshiba board is based on the TX4927 processor. Say Y here to |
759 | support this machine type | 769 | support this machine type |
@@ -773,6 +783,7 @@ config TOSHIBA_RBTX4938 | |||
773 | select SYS_SUPPORTS_LITTLE_ENDIAN | 783 | select SYS_SUPPORTS_LITTLE_ENDIAN |
774 | select SYS_SUPPORTS_BIG_ENDIAN | 784 | select SYS_SUPPORTS_BIG_ENDIAN |
775 | select TOSHIBA_BOARDS | 785 | select TOSHIBA_BOARDS |
786 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
776 | help | 787 | help |
777 | This Toshiba board is based on the TX4938 processor. Say Y here to | 788 | This Toshiba board is based on the TX4938 processor. Say Y here to |
778 | support this machine type | 789 | support this machine type |
@@ -819,6 +830,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
819 | config RWSEM_XCHGADD_ALGORITHM | 830 | config RWSEM_XCHGADD_ALGORITHM |
820 | bool | 831 | bool |
821 | 832 | ||
833 | config ARCH_HAS_ILOG2_U32 | ||
834 | bool | ||
835 | default n | ||
836 | |||
837 | config ARCH_HAS_ILOG2_U64 | ||
838 | bool | ||
839 | default n | ||
840 | |||
822 | config GENERIC_FIND_NEXT_BIT | 841 | config GENERIC_FIND_NEXT_BIT |
823 | bool | 842 | bool |
824 | default y | 843 | default y |
@@ -1062,16 +1081,16 @@ config HAVE_STD_PC_SERIAL_PORT | |||
1062 | 1081 | ||
1063 | config ARC_CONSOLE | 1082 | config ARC_CONSOLE |
1064 | bool "ARC console support" | 1083 | bool "ARC console support" |
1065 | depends on SGI_IP22 || SNI_RM200_PCI | 1084 | depends on SGI_IP22 || SNI_RM |
1066 | 1085 | ||
1067 | config ARC_MEMORY | 1086 | config ARC_MEMORY |
1068 | bool | 1087 | bool |
1069 | depends on MACH_JAZZ || SNI_RM200_PCI || SGI_IP32 | 1088 | depends on MACH_JAZZ || SNI_RM || SGI_IP32 |
1070 | default y | 1089 | default y |
1071 | 1090 | ||
1072 | config ARC_PROMLIB | 1091 | config ARC_PROMLIB |
1073 | bool | 1092 | bool |
1074 | depends on MACH_JAZZ || SNI_RM200_PCI || SGI_IP22 || SGI_IP32 | 1093 | depends on MACH_JAZZ || SNI_RM || SGI_IP22 || SGI_IP32 |
1075 | default y | 1094 | default y |
1076 | 1095 | ||
1077 | config ARC64 | 1096 | config ARC64 |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 641aa30b3638..d1b026a0337d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -463,6 +463,11 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/ | |||
463 | #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 | 463 | #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 |
464 | load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 | 464 | load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 |
465 | 465 | ||
466 | # Philips PNX8550 STB810 board | ||
467 | # | ||
468 | libs-$(CONFIG_PNX8550_STB810) += arch/mips/philips/pnx8550/stb810/ | ||
469 | load-$(CONFIG_PNX8550_STB810) += 0xffffffff80060000 | ||
470 | |||
466 | # NEC EMMA2RH boards | 471 | # NEC EMMA2RH boards |
467 | # | 472 | # |
468 | core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ | 473 | core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ |
@@ -569,11 +574,11 @@ libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ | |||
569 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 | 574 | load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 |
570 | 575 | ||
571 | # | 576 | # |
572 | # SNI RM200 PCI | 577 | # SNI RM |
573 | # | 578 | # |
574 | core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/ | 579 | core-$(CONFIG_SNI_RM) += arch/mips/sni/ |
575 | cflags-$(CONFIG_SNI_RM200_PCI) += -Iinclude/asm-mips/mach-rm200 | 580 | cflags-$(CONFIG_SNI_RM) += -Iinclude/asm-mips/mach-rm |
576 | load-$(CONFIG_SNI_RM200_PCI) += 0xffffffff80600000 | 581 | load-$(CONFIG_SNI_RM) += 0xffffffff80600000 |
577 | 582 | ||
578 | # | 583 | # |
579 | # Toshiba JMR-TX3927 board | 584 | # Toshiba JMR-TX3927 board |
@@ -695,7 +700,7 @@ ifdef CONFIG_QEMU | |||
695 | all: vmlinux.bin | 700 | all: vmlinux.bin |
696 | endif | 701 | endif |
697 | 702 | ||
698 | ifdef CONFIG_SNI_RM200_PCI | 703 | ifdef CONFIG_SNI_RM |
699 | all: vmlinux.ecoff | 704 | all: vmlinux.ecoff |
700 | endif | 705 | endif |
701 | 706 | ||
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig index 35931bedc3df..ac1891687520 100644 --- a/arch/mips/configs/atlas_defconfig +++ b/arch/mips/configs/atlas_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_ATLAS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index ba3bf733d27d..9554257c6f3a 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_SIBYTE_BIGSUR=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index e5358121d2da..49590d443712 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index adf1e8c98c65..0607fc239087 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_COBALT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index 4fd29ffdfb8d..1a57b3375483 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1000=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index 025b960ba990..0055ec41f207 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1100=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig index 80c9dd98f897..c41823b81be0 100644 --- a/arch/mips/configs/db1200_defconfig +++ b/arch/mips/configs/db1200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1200=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index 6caa90b0e176..7d6d92187880 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1500=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig index c6cae86c6ab7..c681c91763aa 100644 --- a/arch/mips/configs/db1550_defconfig +++ b/arch/mips/configs/db1550_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_DB1550=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig index 72f24001c99e..dd4bb0080211 100644 --- a/arch/mips/configs/ddb5477_defconfig +++ b/arch/mips/configs/ddb5477_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_DDB5477=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index fe1387eb83c9..8a31ce4be12c 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_DECSTATION=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index 6133c28beb8c..6fa4f914f6e4 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig index a484b7d396fc..4c9d0405a5df 100644 --- a/arch/mips/configs/emma2rh_defconfig +++ b/arch/mips/configs/emma2rh_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MARKEINS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig index 21bfcdebf8f5..d5b49735683b 100644 --- a/arch/mips/configs/ev64120_defconfig +++ b/arch/mips/configs/ev64120_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_EV64120=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig index 1a5b06cfb4d6..697140c6562f 100644 --- a/arch/mips/configs/excite_defconfig +++ b/arch/mips/configs/excite_defconfig | |||
@@ -60,7 +60,7 @@ CONFIG_BASLER_EXCITE=y | |||
60 | # CONFIG_SIBYTE_LITTLESUR is not set | 60 | # CONFIG_SIBYTE_LITTLESUR is not set |
61 | # CONFIG_SIBYTE_CRHINE is not set | 61 | # CONFIG_SIBYTE_CRHINE is not set |
62 | # CONFIG_SIBYTE_CRHONE is not set | 62 | # CONFIG_SIBYTE_CRHONE is not set |
63 | # CONFIG_SNI_RM200_PCI is not set | 63 | # CONFIG_SNI_RM is not set |
64 | # CONFIG_TOSHIBA_JMR3927 is not set | 64 | # CONFIG_TOSHIBA_JMR3927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4927 is not set | 65 | # CONFIG_TOSHIBA_RBTX4927 is not set |
66 | # CONFIG_TOSHIBA_RBTX4938 is not set | 66 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index 21d53e0c9ee8..f9812d1e4579 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP22=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index e3e94c7e5ee1..96090f28373b 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP27=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index b4ab2bea9723..61e069a0f1aa 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP32=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig index 9d4d17ace123..88966666f4c6 100644 --- a/arch/mips/configs/jaguar-atx_defconfig +++ b/arch/mips/configs/jaguar-atx_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_JAGUAR_ATX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig index 382083ebea0a..835764d834f7 100644 --- a/arch/mips/configs/jazz_defconfig +++ b/arch/mips/configs/jazz_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MACH_JAZZ=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index d03746667a96..50fd9557e646 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | CONFIG_TOSHIBA_JMR3927=y | 63 | CONFIG_TOSHIBA_JMR3927=y |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig index 1db8249b4c0f..05f539f84f58 100644 --- a/arch/mips/configs/lasat200_defconfig +++ b/arch/mips/configs/lasat200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_LASAT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index 101e80347dce..96e941084c04 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MIPS_MALTA=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
@@ -644,7 +644,85 @@ CONFIG_CONNECTOR=m | |||
644 | # | 644 | # |
645 | # Memory Technology Devices (MTD) | 645 | # Memory Technology Devices (MTD) |
646 | # | 646 | # |
647 | # CONFIG_MTD is not set | 647 | CONFIG_MTD=y |
648 | # CONFIG_MTD_DEBUG is not set | ||
649 | # CONFIG_MTD_CONCAT is not set | ||
650 | CONFIG_MTD_PARTITIONS=y | ||
651 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
652 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
653 | |||
654 | # | ||
655 | # User Modules And Translation Layers | ||
656 | # | ||
657 | CONFIG_MTD_CHAR=y | ||
658 | CONFIG_MTD_BLOCK=y | ||
659 | # CONFIG_FTL is not set | ||
660 | # CONFIG_NFTL is not set | ||
661 | # CONFIG_INFTL is not set | ||
662 | # CONFIG_RFD_FTL is not set | ||
663 | # CONFIG_SSFDC is not set | ||
664 | |||
665 | # | ||
666 | # RAM/ROM/Flash chip drivers | ||
667 | # | ||
668 | CONFIG_MTD_CFI=y | ||
669 | # CONFIG_MTD_JEDECPROBE is not set | ||
670 | CONFIG_MTD_GEN_PROBE=y | ||
671 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
672 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
673 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
674 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
675 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
676 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
677 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
678 | CONFIG_MTD_CFI_I1=y | ||
679 | CONFIG_MTD_CFI_I2=y | ||
680 | # CONFIG_MTD_CFI_I4 is not set | ||
681 | # CONFIG_MTD_CFI_I8 is not set | ||
682 | CONFIG_MTD_CFI_INTELEXT=y | ||
683 | CONFIG_MTD_CFI_AMDSTD=y | ||
684 | CONFIG_MTD_CFI_STAA=y | ||
685 | CONFIG_MTD_CFI_UTIL=y | ||
686 | # CONFIG_MTD_RAM is not set | ||
687 | # CONFIG_MTD_ROM is not set | ||
688 | # CONFIG_MTD_ABSENT is not set | ||
689 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
690 | |||
691 | # | ||
692 | # Mapping drivers for chip access | ||
693 | # | ||
694 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
695 | CONFIG_MTD_PHYSMAP=y | ||
696 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
697 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
698 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 | ||
699 | # CONFIG_MTD_PLATRAM is not set | ||
700 | |||
701 | # | ||
702 | # Self-contained MTD device drivers | ||
703 | # | ||
704 | # CONFIG_MTD_PMC551 is not set | ||
705 | # CONFIG_MTD_SLRAM is not set | ||
706 | # CONFIG_MTD_PHRAM is not set | ||
707 | # CONFIG_MTD_MTDRAM is not set | ||
708 | # CONFIG_MTD_BLOCK2MTD is not set | ||
709 | |||
710 | # | ||
711 | # Disk-On-Chip Device Drivers | ||
712 | # | ||
713 | # CONFIG_MTD_DOC2000 is not set | ||
714 | # CONFIG_MTD_DOC2001 is not set | ||
715 | # CONFIG_MTD_DOC2001PLUS is not set | ||
716 | |||
717 | # | ||
718 | # NAND Flash Device Drivers | ||
719 | # | ||
720 | # CONFIG_MTD_NAND is not set | ||
721 | |||
722 | # | ||
723 | # OneNAND Flash Device Drivers | ||
724 | # | ||
725 | # CONFIG_MTD_ONENAND is not set | ||
648 | 726 | ||
649 | # | 727 | # |
650 | # Parallel port support | 728 | # Parallel port support |
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig index a3cbd23bf217..03efcfd0503b 100644 --- a/arch/mips/configs/mipssim_defconfig +++ b/arch/mips/configs/mipssim_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_SIM=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index 6570b47426ce..e4221aafbc4c 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig index 440d65f93a94..32b1afdd1c20 100644 --- a/arch/mips/configs/ocelot_3_defconfig +++ b/arch/mips/configs/ocelot_3_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_3=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig index c2c7ae77da3e..ebe75c1c71af 100644 --- a/arch/mips/configs/ocelot_c_defconfig +++ b/arch/mips/configs/ocelot_c_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_C=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig index 67efe270e0cc..5a9603c12902 100644 --- a/arch/mips/configs/ocelot_defconfig +++ b/arch/mips/configs/ocelot_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig index a10f34de5f7e..46a942c253cf 100644 --- a/arch/mips/configs/ocelot_g_defconfig +++ b/arch/mips/configs/ocelot_g_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MOMENCO_OCELOT_G=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 9e672f63a0aa..7d3c688181d5 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1100=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index d0c0f4af1bff..a77805af0819 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1500=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 3db7427d1b55..8318d74d6adb 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_PB1550=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig index 280a8001eacf..fcb8fea3052c 100644 --- a/arch/mips/configs/pnx8550-jbs_defconfig +++ b/arch/mips/configs/pnx8550-jbs_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_PNX8550_JBS=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig new file mode 100644 index 000000000000..f38a2c123037 --- /dev/null +++ b/arch/mips/configs/pnx8550-stb810_defconfig | |||
@@ -0,0 +1,1229 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Thu Dec 7 16:35:12 2006 | ||
5 | # | ||
6 | CONFIG_MIPS=y | ||
7 | |||
8 | # | ||
9 | # Machine selection | ||
10 | # | ||
11 | # CONFIG_MIPS_MTX1 is not set | ||
12 | # CONFIG_MIPS_BOSPORUS is not set | ||
13 | # CONFIG_MIPS_PB1000 is not set | ||
14 | # CONFIG_MIPS_PB1100 is not set | ||
15 | # CONFIG_MIPS_PB1500 is not set | ||
16 | # CONFIG_MIPS_PB1550 is not set | ||
17 | # CONFIG_MIPS_PB1200 is not set | ||
18 | # CONFIG_MIPS_DB1000 is not set | ||
19 | # CONFIG_MIPS_DB1100 is not set | ||
20 | # CONFIG_MIPS_DB1500 is not set | ||
21 | # CONFIG_MIPS_DB1550 is not set | ||
22 | # CONFIG_MIPS_DB1200 is not set | ||
23 | # CONFIG_MIPS_MIRAGE is not set | ||
24 | # CONFIG_BASLER_EXCITE is not set | ||
25 | # CONFIG_MIPS_COBALT is not set | ||
26 | # CONFIG_MACH_DECSTATION is not set | ||
27 | # CONFIG_MIPS_EV64120 is not set | ||
28 | # CONFIG_MACH_JAZZ is not set | ||
29 | # CONFIG_LASAT is not set | ||
30 | # CONFIG_MIPS_ATLAS is not set | ||
31 | # CONFIG_MIPS_MALTA is not set | ||
32 | # CONFIG_MIPS_SEAD is not set | ||
33 | # CONFIG_WR_PPMC is not set | ||
34 | # CONFIG_MIPS_SIM is not set | ||
35 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | ||
36 | # CONFIG_MOMENCO_OCELOT is not set | ||
37 | # CONFIG_MOMENCO_OCELOT_3 is not set | ||
38 | # CONFIG_MOMENCO_OCELOT_C is not set | ||
39 | # CONFIG_MOMENCO_OCELOT_G is not set | ||
40 | # CONFIG_MIPS_XXS1500 is not set | ||
41 | # CONFIG_PNX8550_V2PCI is not set | ||
42 | # CONFIG_PNX8550_JBS is not set | ||
43 | CONFIG_PNX8550_STB810=y | ||
44 | # CONFIG_DDB5477 is not set | ||
45 | # CONFIG_MACH_VR41XX is not set | ||
46 | # CONFIG_PMC_YOSEMITE is not set | ||
47 | # CONFIG_QEMU is not set | ||
48 | # CONFIG_MARKEINS is not set | ||
49 | # CONFIG_SGI_IP22 is not set | ||
50 | # CONFIG_SGI_IP27 is not set | ||
51 | # CONFIG_SGI_IP32 is not set | ||
52 | # CONFIG_SIBYTE_BIGSUR is not set | ||
53 | # CONFIG_SIBYTE_SWARM is not set | ||
54 | # CONFIG_SIBYTE_SENTOSA is not set | ||
55 | # CONFIG_SIBYTE_RHONE is not set | ||
56 | # CONFIG_SIBYTE_CARMEL is not set | ||
57 | # CONFIG_SIBYTE_PTSWARM is not set | ||
58 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
59 | # CONFIG_SIBYTE_CRHINE is not set | ||
60 | # CONFIG_SIBYTE_CRHONE is not set | ||
61 | # CONFIG_SNI_RM200_PCI is not set | ||
62 | # CONFIG_TOSHIBA_JMR3927 is not set | ||
63 | # CONFIG_TOSHIBA_RBTX4927 is not set | ||
64 | # CONFIG_TOSHIBA_RBTX4938 is not set | ||
65 | # CONFIG_KEXEC is not set | ||
66 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
67 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
68 | CONFIG_GENERIC_HWEIGHT=y | ||
69 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
70 | CONFIG_GENERIC_TIME=y | ||
71 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
72 | CONFIG_DMA_NONCOHERENT=y | ||
73 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
74 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
75 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
76 | CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y | ||
77 | CONFIG_PNX8550=y | ||
78 | CONFIG_SOC_PNX8550=y | ||
79 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | ||
80 | |||
81 | # | ||
82 | # CPU selection | ||
83 | # | ||
84 | CONFIG_CPU_MIPS32_R1=y | ||
85 | # CONFIG_CPU_MIPS32_R2 is not set | ||
86 | # CONFIG_CPU_MIPS64_R1 is not set | ||
87 | # CONFIG_CPU_MIPS64_R2 is not set | ||
88 | # CONFIG_CPU_R3000 is not set | ||
89 | # CONFIG_CPU_TX39XX is not set | ||
90 | # CONFIG_CPU_VR41XX is not set | ||
91 | # CONFIG_CPU_R4300 is not set | ||
92 | # CONFIG_CPU_R4X00 is not set | ||
93 | # CONFIG_CPU_TX49XX is not set | ||
94 | # CONFIG_CPU_R5000 is not set | ||
95 | # CONFIG_CPU_R5432 is not set | ||
96 | # CONFIG_CPU_R6000 is not set | ||
97 | # CONFIG_CPU_NEVADA is not set | ||
98 | # CONFIG_CPU_R8000 is not set | ||
99 | # CONFIG_CPU_R10000 is not set | ||
100 | # CONFIG_CPU_RM7000 is not set | ||
101 | # CONFIG_CPU_RM9000 is not set | ||
102 | # CONFIG_CPU_SB1 is not set | ||
103 | CONFIG_SYS_HAS_CPU_MIPS32_R1=y | ||
104 | CONFIG_CPU_MIPS32=y | ||
105 | CONFIG_CPU_MIPSR1=y | ||
106 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
107 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
108 | |||
109 | # | ||
110 | # Kernel type | ||
111 | # | ||
112 | CONFIG_32BIT=y | ||
113 | # CONFIG_64BIT is not set | ||
114 | CONFIG_PAGE_SIZE_4KB=y | ||
115 | # CONFIG_PAGE_SIZE_8KB is not set | ||
116 | # CONFIG_PAGE_SIZE_16KB is not set | ||
117 | # CONFIG_PAGE_SIZE_64KB is not set | ||
118 | CONFIG_CPU_HAS_PREFETCH=y | ||
119 | CONFIG_MIPS_MT_DISABLED=y | ||
120 | # CONFIG_MIPS_MT_SMP is not set | ||
121 | # CONFIG_MIPS_MT_SMTC is not set | ||
122 | # CONFIG_MIPS_VPE_LOADER is not set | ||
123 | # CONFIG_64BIT_PHYS_ADDR is not set | ||
124 | CONFIG_CPU_HAS_LLSC=y | ||
125 | CONFIG_CPU_HAS_SYNC=y | ||
126 | CONFIG_GENERIC_HARDIRQS=y | ||
127 | CONFIG_GENERIC_IRQ_PROBE=y | ||
128 | CONFIG_CPU_SUPPORTS_HIGHMEM=y | ||
129 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
130 | CONFIG_SELECT_MEMORY_MODEL=y | ||
131 | CONFIG_FLATMEM_MANUAL=y | ||
132 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
133 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
134 | CONFIG_FLATMEM=y | ||
135 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
136 | # CONFIG_SPARSEMEM_STATIC is not set | ||
137 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
138 | # CONFIG_RESOURCES_64BIT is not set | ||
139 | # CONFIG_HZ_48 is not set | ||
140 | # CONFIG_HZ_100 is not set | ||
141 | # CONFIG_HZ_128 is not set | ||
142 | CONFIG_HZ_250=y | ||
143 | # CONFIG_HZ_256 is not set | ||
144 | # CONFIG_HZ_1000 is not set | ||
145 | # CONFIG_HZ_1024 is not set | ||
146 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y | ||
147 | CONFIG_HZ=250 | ||
148 | CONFIG_PREEMPT_NONE=y | ||
149 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
150 | # CONFIG_PREEMPT is not set | ||
151 | CONFIG_LOCKDEP_SUPPORT=y | ||
152 | CONFIG_STACKTRACE_SUPPORT=y | ||
153 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
154 | |||
155 | # | ||
156 | # Code maturity level options | ||
157 | # | ||
158 | CONFIG_EXPERIMENTAL=y | ||
159 | CONFIG_BROKEN_ON_SMP=y | ||
160 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
161 | |||
162 | # | ||
163 | # General setup | ||
164 | # | ||
165 | CONFIG_LOCALVERSION="" | ||
166 | CONFIG_LOCALVERSION_AUTO=y | ||
167 | CONFIG_SWAP=y | ||
168 | CONFIG_SYSVIPC=y | ||
169 | # CONFIG_IPC_NS is not set | ||
170 | # CONFIG_POSIX_MQUEUE is not set | ||
171 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
172 | # CONFIG_TASKSTATS is not set | ||
173 | # CONFIG_UTS_NS is not set | ||
174 | # CONFIG_AUDIT is not set | ||
175 | CONFIG_IKCONFIG=y | ||
176 | CONFIG_IKCONFIG_PROC=y | ||
177 | CONFIG_SYSFS_DEPRECATED=y | ||
178 | # CONFIG_RELAY is not set | ||
179 | CONFIG_INITRAMFS_SOURCE="" | ||
180 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
181 | CONFIG_SYSCTL=y | ||
182 | CONFIG_EMBEDDED=y | ||
183 | # CONFIG_SYSCTL_SYSCALL is not set | ||
184 | CONFIG_KALLSYMS=y | ||
185 | # CONFIG_KALLSYMS_ALL is not set | ||
186 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
187 | # CONFIG_HOTPLUG is not set | ||
188 | CONFIG_PRINTK=y | ||
189 | CONFIG_BUG=y | ||
190 | CONFIG_ELF_CORE=y | ||
191 | CONFIG_BASE_FULL=y | ||
192 | CONFIG_FUTEX=y | ||
193 | CONFIG_EPOLL=y | ||
194 | CONFIG_SHMEM=y | ||
195 | CONFIG_SLAB=y | ||
196 | CONFIG_VM_EVENT_COUNTERS=y | ||
197 | CONFIG_RT_MUTEXES=y | ||
198 | # CONFIG_TINY_SHMEM is not set | ||
199 | CONFIG_BASE_SMALL=0 | ||
200 | # CONFIG_SLOB is not set | ||
201 | |||
202 | # | ||
203 | # Loadable module support | ||
204 | # | ||
205 | CONFIG_MODULES=y | ||
206 | # CONFIG_MODULE_UNLOAD is not set | ||
207 | # CONFIG_MODVERSIONS is not set | ||
208 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
209 | CONFIG_KMOD=y | ||
210 | |||
211 | # | ||
212 | # Block layer | ||
213 | # | ||
214 | CONFIG_BLOCK=y | ||
215 | # CONFIG_LBD is not set | ||
216 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
217 | # CONFIG_LSF is not set | ||
218 | |||
219 | # | ||
220 | # IO Schedulers | ||
221 | # | ||
222 | CONFIG_IOSCHED_NOOP=y | ||
223 | CONFIG_IOSCHED_AS=y | ||
224 | CONFIG_IOSCHED_DEADLINE=y | ||
225 | CONFIG_IOSCHED_CFQ=y | ||
226 | CONFIG_DEFAULT_AS=y | ||
227 | # CONFIG_DEFAULT_DEADLINE is not set | ||
228 | # CONFIG_DEFAULT_CFQ is not set | ||
229 | # CONFIG_DEFAULT_NOOP is not set | ||
230 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
231 | |||
232 | # | ||
233 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | ||
234 | # | ||
235 | CONFIG_HW_HAS_PCI=y | ||
236 | CONFIG_PCI=y | ||
237 | # CONFIG_PCI_MULTITHREAD_PROBE is not set | ||
238 | # CONFIG_PCI_DEBUG is not set | ||
239 | CONFIG_MMU=y | ||
240 | |||
241 | # | ||
242 | # PCCARD (PCMCIA/CardBus) support | ||
243 | # | ||
244 | |||
245 | # | ||
246 | # PCI Hotplug Support | ||
247 | # | ||
248 | |||
249 | # | ||
250 | # Executable file formats | ||
251 | # | ||
252 | CONFIG_BINFMT_ELF=y | ||
253 | # CONFIG_BINFMT_MISC is not set | ||
254 | CONFIG_TRAD_SIGNALS=y | ||
255 | |||
256 | # | ||
257 | # Networking | ||
258 | # | ||
259 | CONFIG_NET=y | ||
260 | |||
261 | # | ||
262 | # Networking options | ||
263 | # | ||
264 | # CONFIG_NETDEBUG is not set | ||
265 | CONFIG_PACKET=y | ||
266 | # CONFIG_PACKET_MMAP is not set | ||
267 | CONFIG_UNIX=y | ||
268 | CONFIG_XFRM=y | ||
269 | # CONFIG_XFRM_USER is not set | ||
270 | # CONFIG_XFRM_SUB_POLICY is not set | ||
271 | # CONFIG_NET_KEY is not set | ||
272 | CONFIG_INET=y | ||
273 | # CONFIG_IP_MULTICAST is not set | ||
274 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
275 | CONFIG_IP_FIB_HASH=y | ||
276 | CONFIG_IP_PNP=y | ||
277 | CONFIG_IP_PNP_DHCP=y | ||
278 | CONFIG_IP_PNP_BOOTP=y | ||
279 | # CONFIG_IP_PNP_RARP is not set | ||
280 | # CONFIG_NET_IPIP is not set | ||
281 | # CONFIG_NET_IPGRE is not set | ||
282 | # CONFIG_ARPD is not set | ||
283 | # CONFIG_SYN_COOKIES is not set | ||
284 | # CONFIG_INET_AH is not set | ||
285 | # CONFIG_INET_ESP is not set | ||
286 | # CONFIG_INET_IPCOMP is not set | ||
287 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
288 | # CONFIG_INET_TUNNEL is not set | ||
289 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
290 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
291 | CONFIG_INET_XFRM_MODE_BEET=y | ||
292 | CONFIG_INET_DIAG=y | ||
293 | CONFIG_INET_TCP_DIAG=y | ||
294 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
295 | CONFIG_TCP_CONG_CUBIC=y | ||
296 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
297 | # CONFIG_TCP_MD5SIG is not set | ||
298 | # CONFIG_IPV6 is not set | ||
299 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
300 | # CONFIG_INET6_TUNNEL is not set | ||
301 | # CONFIG_NETWORK_SECMARK is not set | ||
302 | # CONFIG_NETFILTER is not set | ||
303 | |||
304 | # | ||
305 | # DCCP Configuration (EXPERIMENTAL) | ||
306 | # | ||
307 | # CONFIG_IP_DCCP is not set | ||
308 | |||
309 | # | ||
310 | # SCTP Configuration (EXPERIMENTAL) | ||
311 | # | ||
312 | # CONFIG_IP_SCTP is not set | ||
313 | |||
314 | # | ||
315 | # TIPC Configuration (EXPERIMENTAL) | ||
316 | # | ||
317 | # CONFIG_TIPC is not set | ||
318 | # CONFIG_ATM is not set | ||
319 | # CONFIG_BRIDGE is not set | ||
320 | # CONFIG_VLAN_8021Q is not set | ||
321 | # CONFIG_DECNET is not set | ||
322 | # CONFIG_LLC2 is not set | ||
323 | # CONFIG_IPX is not set | ||
324 | # CONFIG_ATALK is not set | ||
325 | # CONFIG_X25 is not set | ||
326 | # CONFIG_LAPB is not set | ||
327 | # CONFIG_ECONET is not set | ||
328 | # CONFIG_WAN_ROUTER is not set | ||
329 | |||
330 | # | ||
331 | # QoS and/or fair queueing | ||
332 | # | ||
333 | # CONFIG_NET_SCHED is not set | ||
334 | |||
335 | # | ||
336 | # Network testing | ||
337 | # | ||
338 | # CONFIG_NET_PKTGEN is not set | ||
339 | # CONFIG_HAMRADIO is not set | ||
340 | # CONFIG_IRDA is not set | ||
341 | # CONFIG_BT is not set | ||
342 | # CONFIG_IEEE80211 is not set | ||
343 | |||
344 | # | ||
345 | # Device Drivers | ||
346 | # | ||
347 | |||
348 | # | ||
349 | # Generic Driver Options | ||
350 | # | ||
351 | CONFIG_STANDALONE=y | ||
352 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
353 | # CONFIG_DEBUG_DRIVER is not set | ||
354 | # CONFIG_SYS_HYPERVISOR is not set | ||
355 | |||
356 | # | ||
357 | # Connector - unified userspace <-> kernelspace linker | ||
358 | # | ||
359 | # CONFIG_CONNECTOR is not set | ||
360 | |||
361 | # | ||
362 | # Memory Technology Devices (MTD) | ||
363 | # | ||
364 | # CONFIG_MTD is not set | ||
365 | |||
366 | # | ||
367 | # Parallel port support | ||
368 | # | ||
369 | # CONFIG_PARPORT is not set | ||
370 | |||
371 | # | ||
372 | # Plug and Play support | ||
373 | # | ||
374 | |||
375 | # | ||
376 | # Block devices | ||
377 | # | ||
378 | # CONFIG_BLK_CPQ_DA is not set | ||
379 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
380 | # CONFIG_BLK_DEV_DAC960 is not set | ||
381 | # CONFIG_BLK_DEV_UMEM is not set | ||
382 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
383 | CONFIG_BLK_DEV_LOOP=y | ||
384 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
385 | # CONFIG_BLK_DEV_NBD is not set | ||
386 | # CONFIG_BLK_DEV_SX8 is not set | ||
387 | # CONFIG_BLK_DEV_UB is not set | ||
388 | CONFIG_BLK_DEV_RAM=y | ||
389 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
390 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
391 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
392 | CONFIG_BLK_DEV_INITRD=y | ||
393 | # CONFIG_CDROM_PKTCDVD is not set | ||
394 | # CONFIG_ATA_OVER_ETH is not set | ||
395 | |||
396 | # | ||
397 | # Misc devices | ||
398 | # | ||
399 | # CONFIG_SGI_IOC4 is not set | ||
400 | # CONFIG_TIFM_CORE is not set | ||
401 | |||
402 | # | ||
403 | # ATA/ATAPI/MFM/RLL support | ||
404 | # | ||
405 | CONFIG_IDE=y | ||
406 | CONFIG_IDE_MAX_HWIFS=4 | ||
407 | CONFIG_BLK_DEV_IDE=y | ||
408 | |||
409 | # | ||
410 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
411 | # | ||
412 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
413 | CONFIG_BLK_DEV_IDEDISK=y | ||
414 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
415 | CONFIG_BLK_DEV_IDECD=m | ||
416 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
417 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
418 | CONFIG_BLK_DEV_IDESCSI=y | ||
419 | # CONFIG_IDE_TASK_IOCTL is not set | ||
420 | |||
421 | # | ||
422 | # IDE chipset support/bugfixes | ||
423 | # | ||
424 | CONFIG_IDE_GENERIC=y | ||
425 | CONFIG_BLK_DEV_IDEPCI=y | ||
426 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
427 | CONFIG_BLK_DEV_OFFBOARD=y | ||
428 | CONFIG_BLK_DEV_GENERIC=y | ||
429 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
430 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
431 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
432 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
433 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
434 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
435 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
436 | # CONFIG_BLK_DEV_CMD64X is not set | ||
437 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
438 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
439 | # CONFIG_BLK_DEV_CS5520 is not set | ||
440 | # CONFIG_BLK_DEV_CS5530 is not set | ||
441 | # CONFIG_BLK_DEV_HPT34X is not set | ||
442 | CONFIG_BLK_DEV_HPT366=y | ||
443 | # CONFIG_BLK_DEV_JMICRON is not set | ||
444 | # CONFIG_BLK_DEV_SC1200 is not set | ||
445 | # CONFIG_BLK_DEV_PIIX is not set | ||
446 | # CONFIG_BLK_DEV_IT821X is not set | ||
447 | # CONFIG_BLK_DEV_NS87415 is not set | ||
448 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
449 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
450 | # CONFIG_BLK_DEV_SVWKS is not set | ||
451 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
452 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
453 | # CONFIG_BLK_DEV_TRM290 is not set | ||
454 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
455 | # CONFIG_IDE_ARM is not set | ||
456 | CONFIG_BLK_DEV_IDEDMA=y | ||
457 | # CONFIG_IDEDMA_IVB is not set | ||
458 | # CONFIG_IDEDMA_AUTO is not set | ||
459 | # CONFIG_BLK_DEV_HD is not set | ||
460 | |||
461 | # | ||
462 | # SCSI device support | ||
463 | # | ||
464 | # CONFIG_RAID_ATTRS is not set | ||
465 | CONFIG_SCSI=y | ||
466 | # CONFIG_SCSI_NETLINK is not set | ||
467 | CONFIG_SCSI_PROC_FS=y | ||
468 | |||
469 | # | ||
470 | # SCSI support type (disk, tape, CD-ROM) | ||
471 | # | ||
472 | CONFIG_BLK_DEV_SD=y | ||
473 | # CONFIG_CHR_DEV_ST is not set | ||
474 | # CONFIG_CHR_DEV_OSST is not set | ||
475 | # CONFIG_BLK_DEV_SR is not set | ||
476 | # CONFIG_CHR_DEV_SG is not set | ||
477 | # CONFIG_CHR_DEV_SCH is not set | ||
478 | |||
479 | # | ||
480 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
481 | # | ||
482 | # CONFIG_SCSI_MULTI_LUN is not set | ||
483 | CONFIG_SCSI_CONSTANTS=y | ||
484 | # CONFIG_SCSI_LOGGING is not set | ||
485 | |||
486 | # | ||
487 | # SCSI Transports | ||
488 | # | ||
489 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
490 | # CONFIG_SCSI_FC_ATTRS is not set | ||
491 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
492 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
493 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
494 | |||
495 | # | ||
496 | # SCSI low-level drivers | ||
497 | # | ||
498 | CONFIG_ISCSI_TCP=m | ||
499 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
500 | # CONFIG_SCSI_3W_9XXX is not set | ||
501 | # CONFIG_SCSI_ACARD is not set | ||
502 | # CONFIG_SCSI_AACRAID is not set | ||
503 | # CONFIG_SCSI_AIC7XXX is not set | ||
504 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
505 | # CONFIG_SCSI_AIC79XX is not set | ||
506 | # CONFIG_SCSI_AIC94XX is not set | ||
507 | # CONFIG_SCSI_DPT_I2O is not set | ||
508 | # CONFIG_SCSI_ARCMSR is not set | ||
509 | # CONFIG_MEGARAID_NEWGEN is not set | ||
510 | # CONFIG_MEGARAID_LEGACY is not set | ||
511 | # CONFIG_MEGARAID_SAS is not set | ||
512 | # CONFIG_SCSI_HPTIOP is not set | ||
513 | # CONFIG_SCSI_DMX3191D is not set | ||
514 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
515 | # CONFIG_SCSI_IPS is not set | ||
516 | # CONFIG_SCSI_INITIO is not set | ||
517 | # CONFIG_SCSI_INIA100 is not set | ||
518 | # CONFIG_SCSI_STEX is not set | ||
519 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
520 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
521 | # CONFIG_SCSI_QLA_FC is not set | ||
522 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
523 | # CONFIG_SCSI_LPFC is not set | ||
524 | # CONFIG_SCSI_DC395x is not set | ||
525 | # CONFIG_SCSI_DC390T is not set | ||
526 | # CONFIG_SCSI_NSP32 is not set | ||
527 | # CONFIG_SCSI_DEBUG is not set | ||
528 | |||
529 | # | ||
530 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
531 | # | ||
532 | # CONFIG_ATA is not set | ||
533 | |||
534 | # | ||
535 | # Multi-device support (RAID and LVM) | ||
536 | # | ||
537 | # CONFIG_MD is not set | ||
538 | |||
539 | # | ||
540 | # Fusion MPT device support | ||
541 | # | ||
542 | # CONFIG_FUSION is not set | ||
543 | # CONFIG_FUSION_SPI is not set | ||
544 | # CONFIG_FUSION_FC is not set | ||
545 | # CONFIG_FUSION_SAS is not set | ||
546 | |||
547 | # | ||
548 | # IEEE 1394 (FireWire) support | ||
549 | # | ||
550 | # CONFIG_IEEE1394 is not set | ||
551 | |||
552 | # | ||
553 | # I2O device support | ||
554 | # | ||
555 | # CONFIG_I2O is not set | ||
556 | |||
557 | # | ||
558 | # Network device support | ||
559 | # | ||
560 | CONFIG_NETDEVICES=y | ||
561 | # CONFIG_DUMMY is not set | ||
562 | # CONFIG_BONDING is not set | ||
563 | # CONFIG_EQUALIZER is not set | ||
564 | # CONFIG_TUN is not set | ||
565 | |||
566 | # | ||
567 | # ARCnet devices | ||
568 | # | ||
569 | # CONFIG_ARCNET is not set | ||
570 | |||
571 | # | ||
572 | # PHY device support | ||
573 | # | ||
574 | # CONFIG_PHYLIB is not set | ||
575 | |||
576 | # | ||
577 | # Ethernet (10 or 100Mbit) | ||
578 | # | ||
579 | CONFIG_NET_ETHERNET=y | ||
580 | CONFIG_MII=y | ||
581 | # CONFIG_HAPPYMEAL is not set | ||
582 | # CONFIG_SUNGEM is not set | ||
583 | # CONFIG_CASSINI is not set | ||
584 | # CONFIG_NET_VENDOR_3COM is not set | ||
585 | # CONFIG_DM9000 is not set | ||
586 | |||
587 | # | ||
588 | # Tulip family network device support | ||
589 | # | ||
590 | # CONFIG_NET_TULIP is not set | ||
591 | # CONFIG_HP100 is not set | ||
592 | CONFIG_NET_PCI=y | ||
593 | # CONFIG_PCNET32 is not set | ||
594 | # CONFIG_AMD8111_ETH is not set | ||
595 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
596 | # CONFIG_B44 is not set | ||
597 | # CONFIG_FORCEDETH is not set | ||
598 | # CONFIG_DGRS is not set | ||
599 | # CONFIG_EEPRO100 is not set | ||
600 | # CONFIG_E100 is not set | ||
601 | # CONFIG_FEALNX is not set | ||
602 | CONFIG_NATSEMI=y | ||
603 | # CONFIG_NE2K_PCI is not set | ||
604 | # CONFIG_8139CP is not set | ||
605 | # CONFIG_8139TOO is not set | ||
606 | # CONFIG_SIS900 is not set | ||
607 | # CONFIG_EPIC100 is not set | ||
608 | # CONFIG_SUNDANCE is not set | ||
609 | # CONFIG_TLAN is not set | ||
610 | # CONFIG_VIA_RHINE is not set | ||
611 | |||
612 | # | ||
613 | # Ethernet (1000 Mbit) | ||
614 | # | ||
615 | # CONFIG_ACENIC is not set | ||
616 | # CONFIG_DL2K is not set | ||
617 | # CONFIG_E1000 is not set | ||
618 | # CONFIG_NS83820 is not set | ||
619 | # CONFIG_HAMACHI is not set | ||
620 | # CONFIG_YELLOWFIN is not set | ||
621 | # CONFIG_R8169 is not set | ||
622 | # CONFIG_SIS190 is not set | ||
623 | # CONFIG_SKGE is not set | ||
624 | # CONFIG_SKY2 is not set | ||
625 | # CONFIG_SK98LIN is not set | ||
626 | # CONFIG_VIA_VELOCITY is not set | ||
627 | # CONFIG_TIGON3 is not set | ||
628 | # CONFIG_BNX2 is not set | ||
629 | # CONFIG_QLA3XXX is not set | ||
630 | |||
631 | # | ||
632 | # Ethernet (10000 Mbit) | ||
633 | # | ||
634 | # CONFIG_CHELSIO_T1 is not set | ||
635 | # CONFIG_IXGB is not set | ||
636 | # CONFIG_S2IO is not set | ||
637 | # CONFIG_MYRI10GE is not set | ||
638 | # CONFIG_NETXEN_NIC is not set | ||
639 | |||
640 | # | ||
641 | # Token Ring devices | ||
642 | # | ||
643 | # CONFIG_TR is not set | ||
644 | |||
645 | # | ||
646 | # Wireless LAN (non-hamradio) | ||
647 | # | ||
648 | # CONFIG_NET_RADIO is not set | ||
649 | |||
650 | # | ||
651 | # Wan interfaces | ||
652 | # | ||
653 | # CONFIG_WAN is not set | ||
654 | # CONFIG_FDDI is not set | ||
655 | # CONFIG_HIPPI is not set | ||
656 | # CONFIG_PPP is not set | ||
657 | # CONFIG_SLIP is not set | ||
658 | # CONFIG_NET_FC is not set | ||
659 | # CONFIG_SHAPER is not set | ||
660 | # CONFIG_NETCONSOLE is not set | ||
661 | # CONFIG_NETPOLL is not set | ||
662 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
663 | |||
664 | # | ||
665 | # ISDN subsystem | ||
666 | # | ||
667 | # CONFIG_ISDN is not set | ||
668 | |||
669 | # | ||
670 | # Telephony Support | ||
671 | # | ||
672 | # CONFIG_PHONE is not set | ||
673 | |||
674 | # | ||
675 | # Input device support | ||
676 | # | ||
677 | CONFIG_INPUT=y | ||
678 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
679 | |||
680 | # | ||
681 | # Userland interfaces | ||
682 | # | ||
683 | # CONFIG_INPUT_MOUSEDEV is not set | ||
684 | # CONFIG_INPUT_JOYDEV is not set | ||
685 | # CONFIG_INPUT_TSDEV is not set | ||
686 | # CONFIG_INPUT_EVDEV is not set | ||
687 | # CONFIG_INPUT_EVBUG is not set | ||
688 | |||
689 | # | ||
690 | # Input Device Drivers | ||
691 | # | ||
692 | # CONFIG_INPUT_KEYBOARD is not set | ||
693 | # CONFIG_INPUT_MOUSE is not set | ||
694 | # CONFIG_INPUT_JOYSTICK is not set | ||
695 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
696 | # CONFIG_INPUT_MISC is not set | ||
697 | |||
698 | # | ||
699 | # Hardware I/O ports | ||
700 | # | ||
701 | CONFIG_SERIO=y | ||
702 | # CONFIG_SERIO_I8042 is not set | ||
703 | # CONFIG_SERIO_SERPORT is not set | ||
704 | # CONFIG_SERIO_PCIPS2 is not set | ||
705 | CONFIG_SERIO_LIBPS2=y | ||
706 | # CONFIG_SERIO_RAW is not set | ||
707 | # CONFIG_GAMEPORT is not set | ||
708 | |||
709 | # | ||
710 | # Character devices | ||
711 | # | ||
712 | CONFIG_VT=y | ||
713 | CONFIG_VT_CONSOLE=y | ||
714 | CONFIG_HW_CONSOLE=y | ||
715 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
716 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
717 | |||
718 | # | ||
719 | # Serial drivers | ||
720 | # | ||
721 | # CONFIG_SERIAL_8250 is not set | ||
722 | |||
723 | # | ||
724 | # Non-8250 serial port support | ||
725 | # | ||
726 | # CONFIG_SERIAL_PNX8XXX is not set | ||
727 | # CONFIG_SERIAL_JSM is not set | ||
728 | CONFIG_UNIX98_PTYS=y | ||
729 | CONFIG_LEGACY_PTYS=y | ||
730 | CONFIG_LEGACY_PTY_COUNT=256 | ||
731 | |||
732 | # | ||
733 | # IPMI | ||
734 | # | ||
735 | # CONFIG_IPMI_HANDLER is not set | ||
736 | |||
737 | # | ||
738 | # Watchdog Cards | ||
739 | # | ||
740 | # CONFIG_WATCHDOG is not set | ||
741 | CONFIG_HW_RANDOM=y | ||
742 | # CONFIG_RTC is not set | ||
743 | # CONFIG_GEN_RTC is not set | ||
744 | # CONFIG_DTLK is not set | ||
745 | # CONFIG_R3964 is not set | ||
746 | # CONFIG_APPLICOM is not set | ||
747 | # CONFIG_DRM is not set | ||
748 | # CONFIG_RAW_DRIVER is not set | ||
749 | |||
750 | # | ||
751 | # TPM devices | ||
752 | # | ||
753 | # CONFIG_TCG_TPM is not set | ||
754 | |||
755 | # | ||
756 | # I2C support | ||
757 | # | ||
758 | # CONFIG_I2C is not set | ||
759 | |||
760 | # | ||
761 | # SPI support | ||
762 | # | ||
763 | # CONFIG_SPI is not set | ||
764 | # CONFIG_SPI_MASTER is not set | ||
765 | |||
766 | # | ||
767 | # Dallas's 1-wire bus | ||
768 | # | ||
769 | # CONFIG_W1 is not set | ||
770 | |||
771 | # | ||
772 | # Hardware Monitoring support | ||
773 | # | ||
774 | CONFIG_HWMON=y | ||
775 | # CONFIG_HWMON_VID is not set | ||
776 | # CONFIG_SENSORS_ABITUGURU is not set | ||
777 | # CONFIG_SENSORS_F71805F is not set | ||
778 | # CONFIG_SENSORS_VT1211 is not set | ||
779 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
780 | |||
781 | # | ||
782 | # Multimedia devices | ||
783 | # | ||
784 | # CONFIG_VIDEO_DEV is not set | ||
785 | |||
786 | # | ||
787 | # Digital Video Broadcasting Devices | ||
788 | # | ||
789 | # CONFIG_DVB is not set | ||
790 | # CONFIG_USB_DABUSB is not set | ||
791 | |||
792 | # | ||
793 | # Graphics support | ||
794 | # | ||
795 | CONFIG_FIRMWARE_EDID=y | ||
796 | # CONFIG_FB is not set | ||
797 | |||
798 | # | ||
799 | # Console display driver support | ||
800 | # | ||
801 | # CONFIG_VGA_CONSOLE is not set | ||
802 | CONFIG_DUMMY_CONSOLE=y | ||
803 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
804 | |||
805 | # | ||
806 | # Sound | ||
807 | # | ||
808 | # CONFIG_SOUND is not set | ||
809 | |||
810 | # | ||
811 | # USB support | ||
812 | # | ||
813 | CONFIG_USB_ARCH_HAS_HCD=y | ||
814 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
815 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
816 | CONFIG_USB=y | ||
817 | # CONFIG_USB_DEBUG is not set | ||
818 | |||
819 | # | ||
820 | # Miscellaneous USB options | ||
821 | # | ||
822 | # CONFIG_USB_DEVICEFS is not set | ||
823 | # CONFIG_USB_BANDWIDTH is not set | ||
824 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
825 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
826 | # CONFIG_USB_OTG is not set | ||
827 | |||
828 | # | ||
829 | # USB Host Controller Drivers | ||
830 | # | ||
831 | # CONFIG_USB_EHCI_HCD is not set | ||
832 | # CONFIG_USB_ISP116X_HCD is not set | ||
833 | CONFIG_USB_OHCI_HCD=y | ||
834 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
835 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
836 | # CONFIG_USB_UHCI_HCD is not set | ||
837 | # CONFIG_USB_SL811_HCD is not set | ||
838 | |||
839 | # | ||
840 | # USB Device Class drivers | ||
841 | # | ||
842 | # CONFIG_USB_ACM is not set | ||
843 | # CONFIG_USB_PRINTER is not set | ||
844 | |||
845 | # | ||
846 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
847 | # | ||
848 | |||
849 | # | ||
850 | # may also be needed; see USB_STORAGE Help for more information | ||
851 | # | ||
852 | CONFIG_USB_STORAGE=y | ||
853 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
854 | CONFIG_USB_STORAGE_DATAFAB=y | ||
855 | CONFIG_USB_STORAGE_FREECOM=y | ||
856 | CONFIG_USB_STORAGE_ISD200=y | ||
857 | CONFIG_USB_STORAGE_DPCM=y | ||
858 | CONFIG_USB_STORAGE_USBAT=y | ||
859 | CONFIG_USB_STORAGE_SDDR09=y | ||
860 | CONFIG_USB_STORAGE_SDDR55=y | ||
861 | CONFIG_USB_STORAGE_JUMPSHOT=y | ||
862 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
863 | # CONFIG_USB_STORAGE_KARMA is not set | ||
864 | # CONFIG_USB_LIBUSUAL is not set | ||
865 | |||
866 | # | ||
867 | # USB Input Devices | ||
868 | # | ||
869 | # CONFIG_USB_HID is not set | ||
870 | |||
871 | # | ||
872 | # USB HID Boot Protocol drivers | ||
873 | # | ||
874 | # CONFIG_USB_KBD is not set | ||
875 | # CONFIG_USB_MOUSE is not set | ||
876 | # CONFIG_USB_AIPTEK is not set | ||
877 | # CONFIG_USB_WACOM is not set | ||
878 | # CONFIG_USB_ACECAD is not set | ||
879 | # CONFIG_USB_KBTAB is not set | ||
880 | # CONFIG_USB_POWERMATE is not set | ||
881 | # CONFIG_USB_TOUCHSCREEN is not set | ||
882 | # CONFIG_USB_YEALINK is not set | ||
883 | # CONFIG_USB_XPAD is not set | ||
884 | # CONFIG_USB_ATI_REMOTE is not set | ||
885 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
886 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
887 | # CONFIG_USB_APPLETOUCH is not set | ||
888 | |||
889 | # | ||
890 | # USB Imaging devices | ||
891 | # | ||
892 | # CONFIG_USB_MDC800 is not set | ||
893 | # CONFIG_USB_MICROTEK is not set | ||
894 | |||
895 | # | ||
896 | # USB Network Adapters | ||
897 | # | ||
898 | # CONFIG_USB_CATC is not set | ||
899 | # CONFIG_USB_KAWETH is not set | ||
900 | # CONFIG_USB_PEGASUS is not set | ||
901 | # CONFIG_USB_RTL8150 is not set | ||
902 | # CONFIG_USB_USBNET_MII is not set | ||
903 | # CONFIG_USB_USBNET is not set | ||
904 | CONFIG_USB_MON=y | ||
905 | |||
906 | # | ||
907 | # USB port drivers | ||
908 | # | ||
909 | |||
910 | # | ||
911 | # USB Serial Converter support | ||
912 | # | ||
913 | # CONFIG_USB_SERIAL is not set | ||
914 | |||
915 | # | ||
916 | # USB Miscellaneous drivers | ||
917 | # | ||
918 | # CONFIG_USB_EMI62 is not set | ||
919 | # CONFIG_USB_EMI26 is not set | ||
920 | # CONFIG_USB_ADUTUX is not set | ||
921 | # CONFIG_USB_AUERSWALD is not set | ||
922 | # CONFIG_USB_RIO500 is not set | ||
923 | # CONFIG_USB_LEGOTOWER is not set | ||
924 | # CONFIG_USB_LCD is not set | ||
925 | # CONFIG_USB_LED is not set | ||
926 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
927 | # CONFIG_USB_CYTHERM is not set | ||
928 | # CONFIG_USB_PHIDGET is not set | ||
929 | # CONFIG_USB_IDMOUSE is not set | ||
930 | # CONFIG_USB_FTDI_ELAN is not set | ||
931 | # CONFIG_USB_APPLEDISPLAY is not set | ||
932 | # CONFIG_USB_LD is not set | ||
933 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
934 | |||
935 | # | ||
936 | # USB DSL modem support | ||
937 | # | ||
938 | |||
939 | # | ||
940 | # USB Gadget Support | ||
941 | # | ||
942 | # CONFIG_USB_GADGET is not set | ||
943 | |||
944 | # | ||
945 | # MMC/SD Card support | ||
946 | # | ||
947 | # CONFIG_MMC is not set | ||
948 | |||
949 | # | ||
950 | # LED devices | ||
951 | # | ||
952 | # CONFIG_NEW_LEDS is not set | ||
953 | |||
954 | # | ||
955 | # LED drivers | ||
956 | # | ||
957 | |||
958 | # | ||
959 | # LED Triggers | ||
960 | # | ||
961 | |||
962 | # | ||
963 | # InfiniBand support | ||
964 | # | ||
965 | # CONFIG_INFINIBAND is not set | ||
966 | |||
967 | # | ||
968 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
969 | # | ||
970 | |||
971 | # | ||
972 | # Real Time Clock | ||
973 | # | ||
974 | # CONFIG_RTC_CLASS is not set | ||
975 | |||
976 | # | ||
977 | # DMA Engine support | ||
978 | # | ||
979 | # CONFIG_DMA_ENGINE is not set | ||
980 | |||
981 | # | ||
982 | # DMA Clients | ||
983 | # | ||
984 | |||
985 | # | ||
986 | # DMA Devices | ||
987 | # | ||
988 | |||
989 | # | ||
990 | # File systems | ||
991 | # | ||
992 | CONFIG_EXT2_FS=y | ||
993 | # CONFIG_EXT2_FS_XATTR is not set | ||
994 | # CONFIG_EXT2_FS_XIP is not set | ||
995 | # CONFIG_EXT3_FS is not set | ||
996 | # CONFIG_EXT4DEV_FS is not set | ||
997 | # CONFIG_REISERFS_FS is not set | ||
998 | # CONFIG_JFS_FS is not set | ||
999 | # CONFIG_FS_POSIX_ACL is not set | ||
1000 | # CONFIG_XFS_FS is not set | ||
1001 | # CONFIG_GFS2_FS is not set | ||
1002 | # CONFIG_OCFS2_FS is not set | ||
1003 | # CONFIG_MINIX_FS is not set | ||
1004 | # CONFIG_ROMFS_FS is not set | ||
1005 | CONFIG_INOTIFY=y | ||
1006 | CONFIG_INOTIFY_USER=y | ||
1007 | # CONFIG_QUOTA is not set | ||
1008 | # CONFIG_DNOTIFY is not set | ||
1009 | # CONFIG_AUTOFS_FS is not set | ||
1010 | # CONFIG_AUTOFS4_FS is not set | ||
1011 | # CONFIG_FUSE_FS is not set | ||
1012 | |||
1013 | # | ||
1014 | # CD-ROM/DVD Filesystems | ||
1015 | # | ||
1016 | # CONFIG_ISO9660_FS is not set | ||
1017 | # CONFIG_UDF_FS is not set | ||
1018 | |||
1019 | # | ||
1020 | # DOS/FAT/NT Filesystems | ||
1021 | # | ||
1022 | CONFIG_FAT_FS=y | ||
1023 | CONFIG_MSDOS_FS=y | ||
1024 | CONFIG_VFAT_FS=y | ||
1025 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1026 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1027 | # CONFIG_NTFS_FS is not set | ||
1028 | |||
1029 | # | ||
1030 | # Pseudo filesystems | ||
1031 | # | ||
1032 | CONFIG_PROC_FS=y | ||
1033 | # CONFIG_PROC_KCORE is not set | ||
1034 | CONFIG_PROC_SYSCTL=y | ||
1035 | CONFIG_SYSFS=y | ||
1036 | CONFIG_TMPFS=y | ||
1037 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1038 | # CONFIG_HUGETLB_PAGE is not set | ||
1039 | CONFIG_RAMFS=y | ||
1040 | # CONFIG_CONFIGFS_FS is not set | ||
1041 | |||
1042 | # | ||
1043 | # Miscellaneous filesystems | ||
1044 | # | ||
1045 | # CONFIG_ADFS_FS is not set | ||
1046 | # CONFIG_AFFS_FS is not set | ||
1047 | # CONFIG_HFS_FS is not set | ||
1048 | # CONFIG_HFSPLUS_FS is not set | ||
1049 | # CONFIG_BEFS_FS is not set | ||
1050 | # CONFIG_BFS_FS is not set | ||
1051 | # CONFIG_EFS_FS is not set | ||
1052 | # CONFIG_CRAMFS is not set | ||
1053 | # CONFIG_VXFS_FS is not set | ||
1054 | # CONFIG_HPFS_FS is not set | ||
1055 | # CONFIG_QNX4FS_FS is not set | ||
1056 | # CONFIG_SYSV_FS is not set | ||
1057 | # CONFIG_UFS_FS is not set | ||
1058 | |||
1059 | # | ||
1060 | # Network File Systems | ||
1061 | # | ||
1062 | CONFIG_NFS_FS=y | ||
1063 | CONFIG_NFS_V3=y | ||
1064 | # CONFIG_NFS_V3_ACL is not set | ||
1065 | # CONFIG_NFS_V4 is not set | ||
1066 | # CONFIG_NFS_DIRECTIO is not set | ||
1067 | CONFIG_NFSD=m | ||
1068 | # CONFIG_NFSD_V3 is not set | ||
1069 | # CONFIG_NFSD_TCP is not set | ||
1070 | CONFIG_ROOT_NFS=y | ||
1071 | CONFIG_LOCKD=y | ||
1072 | CONFIG_LOCKD_V4=y | ||
1073 | CONFIG_EXPORTFS=m | ||
1074 | CONFIG_NFS_COMMON=y | ||
1075 | CONFIG_SUNRPC=y | ||
1076 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1077 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1078 | # CONFIG_SMB_FS is not set | ||
1079 | # CONFIG_CIFS is not set | ||
1080 | # CONFIG_NCP_FS is not set | ||
1081 | # CONFIG_CODA_FS is not set | ||
1082 | # CONFIG_AFS_FS is not set | ||
1083 | # CONFIG_9P_FS is not set | ||
1084 | |||
1085 | # | ||
1086 | # Partition Types | ||
1087 | # | ||
1088 | # CONFIG_PARTITION_ADVANCED is not set | ||
1089 | CONFIG_MSDOS_PARTITION=y | ||
1090 | |||
1091 | # | ||
1092 | # Native Language Support | ||
1093 | # | ||
1094 | CONFIG_NLS=y | ||
1095 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1096 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1097 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1098 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1099 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1100 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1101 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1102 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1103 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1104 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1105 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1106 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1107 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1108 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1109 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1110 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1111 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1112 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1113 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1114 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1115 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1116 | # CONFIG_NLS_ISO8859_8 is not set | ||
1117 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1118 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1119 | # CONFIG_NLS_ASCII is not set | ||
1120 | # CONFIG_NLS_ISO8859_1 is not set | ||
1121 | # CONFIG_NLS_ISO8859_2 is not set | ||
1122 | # CONFIG_NLS_ISO8859_3 is not set | ||
1123 | # CONFIG_NLS_ISO8859_4 is not set | ||
1124 | # CONFIG_NLS_ISO8859_5 is not set | ||
1125 | # CONFIG_NLS_ISO8859_6 is not set | ||
1126 | # CONFIG_NLS_ISO8859_7 is not set | ||
1127 | # CONFIG_NLS_ISO8859_9 is not set | ||
1128 | # CONFIG_NLS_ISO8859_13 is not set | ||
1129 | # CONFIG_NLS_ISO8859_14 is not set | ||
1130 | # CONFIG_NLS_ISO8859_15 is not set | ||
1131 | # CONFIG_NLS_KOI8_R is not set | ||
1132 | # CONFIG_NLS_KOI8_U is not set | ||
1133 | # CONFIG_NLS_UTF8 is not set | ||
1134 | |||
1135 | # | ||
1136 | # Profiling support | ||
1137 | # | ||
1138 | # CONFIG_PROFILING is not set | ||
1139 | |||
1140 | # | ||
1141 | # Kernel hacking | ||
1142 | # | ||
1143 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1144 | # CONFIG_PRINTK_TIME is not set | ||
1145 | CONFIG_ENABLE_MUST_CHECK=y | ||
1146 | CONFIG_MAGIC_SYSRQ=y | ||
1147 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1148 | CONFIG_DEBUG_KERNEL=y | ||
1149 | CONFIG_LOG_BUF_SHIFT=14 | ||
1150 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1151 | # CONFIG_SCHEDSTATS is not set | ||
1152 | CONFIG_DEBUG_SLAB=y | ||
1153 | # CONFIG_DEBUG_SLAB_LEAK is not set | ||
1154 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1155 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1156 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1157 | # CONFIG_DEBUG_MUTEXES is not set | ||
1158 | # CONFIG_DEBUG_RWSEMS is not set | ||
1159 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1160 | # CONFIG_PROVE_LOCKING is not set | ||
1161 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1162 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1163 | # CONFIG_DEBUG_KOBJECT is not set | ||
1164 | # CONFIG_DEBUG_INFO is not set | ||
1165 | # CONFIG_DEBUG_FS is not set | ||
1166 | # CONFIG_DEBUG_VM is not set | ||
1167 | # CONFIG_DEBUG_LIST is not set | ||
1168 | CONFIG_FORCED_INLINING=y | ||
1169 | CONFIG_HEADERS_CHECK=y | ||
1170 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1171 | CONFIG_CROSSCOMPILE=y | ||
1172 | CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" | ||
1173 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1174 | # CONFIG_KGDB is not set | ||
1175 | # CONFIG_RUNTIME_DEBUG is not set | ||
1176 | # CONFIG_MIPS_UNCACHED is not set | ||
1177 | |||
1178 | # | ||
1179 | # Security options | ||
1180 | # | ||
1181 | # CONFIG_KEYS is not set | ||
1182 | # CONFIG_SECURITY is not set | ||
1183 | |||
1184 | # | ||
1185 | # Cryptographic options | ||
1186 | # | ||
1187 | CONFIG_CRYPTO=y | ||
1188 | CONFIG_CRYPTO_ALGAPI=m | ||
1189 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1190 | CONFIG_CRYPTO_MANAGER=m | ||
1191 | # CONFIG_CRYPTO_HMAC is not set | ||
1192 | # CONFIG_CRYPTO_NULL is not set | ||
1193 | # CONFIG_CRYPTO_MD4 is not set | ||
1194 | CONFIG_CRYPTO_MD5=m | ||
1195 | # CONFIG_CRYPTO_SHA1 is not set | ||
1196 | # CONFIG_CRYPTO_SHA256 is not set | ||
1197 | # CONFIG_CRYPTO_SHA512 is not set | ||
1198 | # CONFIG_CRYPTO_WP512 is not set | ||
1199 | # CONFIG_CRYPTO_TGR192 is not set | ||
1200 | CONFIG_CRYPTO_ECB=m | ||
1201 | CONFIG_CRYPTO_CBC=m | ||
1202 | # CONFIG_CRYPTO_DES is not set | ||
1203 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1204 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1205 | # CONFIG_CRYPTO_SERPENT is not set | ||
1206 | # CONFIG_CRYPTO_AES is not set | ||
1207 | # CONFIG_CRYPTO_CAST5 is not set | ||
1208 | # CONFIG_CRYPTO_CAST6 is not set | ||
1209 | # CONFIG_CRYPTO_TEA is not set | ||
1210 | # CONFIG_CRYPTO_ARC4 is not set | ||
1211 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1212 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1213 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1214 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1215 | CONFIG_CRYPTO_CRC32C=m | ||
1216 | # CONFIG_CRYPTO_TEST is not set | ||
1217 | |||
1218 | # | ||
1219 | # Hardware crypto devices | ||
1220 | # | ||
1221 | |||
1222 | # | ||
1223 | # Library routines | ||
1224 | # | ||
1225 | CONFIG_CRC_CCITT=m | ||
1226 | # CONFIG_CRC16 is not set | ||
1227 | CONFIG_CRC32=y | ||
1228 | CONFIG_LIBCRC32C=m | ||
1229 | CONFIG_PLIST=y | ||
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig index 64b9fbf44a64..5bc3248e50e4 100644 --- a/arch/mips/configs/pnx8550-v2pci_defconfig +++ b/arch/mips/configs/pnx8550-v2pci_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_PNX8550_V2PCI=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig index 9b0dab822bd0..aa61f0f030a5 100644 --- a/arch/mips/configs/qemu_defconfig +++ b/arch/mips/configs/qemu_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_QEMU=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig index dd0296036026..f9e8f41d17f2 100644 --- a/arch/mips/configs/rbhma4500_defconfig +++ b/arch/mips/configs/rbhma4500_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | CONFIG_TOSHIBA_RBTX4938=y | 65 | CONFIG_TOSHIBA_RBTX4938=y |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index d8a498d64d62..496aa67b9f82 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | CONFIG_SNI_RM200_PCI=y | 62 | CONFIG_SNI_RM=y |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 805a4fe450f5..e33c17200b39 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SIBYTE_SWARM=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig index 6fcb656d8d87..83fb932f9d4b 100644 --- a/arch/mips/configs/sead_defconfig +++ b/arch/mips/configs/sead_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MIPS_SEAD=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index dc312f19ada7..e9d4eae45bfa 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig index 85615d99b01a..c19597fb0c32 100644 --- a/arch/mips/configs/tb0229_defconfig +++ b/arch/mips/configs/tb0229_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig index f7e8194809a1..97d94f96990f 100644 --- a/arch/mips/configs/tb0287_defconfig +++ b/arch/mips/configs/tb0287_defconfig | |||
@@ -57,7 +57,7 @@ CONFIG_MACH_VR41XX=y | |||
57 | # CONFIG_SIBYTE_LITTLESUR is not set | 57 | # CONFIG_SIBYTE_LITTLESUR is not set |
58 | # CONFIG_SIBYTE_CRHINE is not set | 58 | # CONFIG_SIBYTE_CRHINE is not set |
59 | # CONFIG_SIBYTE_CRHONE is not set | 59 | # CONFIG_SIBYTE_CRHONE is not set |
60 | # CONFIG_SNI_RM200_PCI is not set | 60 | # CONFIG_SNI_RM is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 61 | # CONFIG_TOSHIBA_JMR3927 is not set |
62 | # CONFIG_TOSHIBA_RBTX4927 is not set | 62 | # CONFIG_TOSHIBA_RBTX4927 is not set |
63 | # CONFIG_TOSHIBA_RBTX4938 is not set | 63 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index 863f6a7cadfd..553734a47b62 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_MACH_VR41XX=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig index c10267d61cc9..d3dfb702bb7c 100644 --- a/arch/mips/configs/wrppmc_defconfig +++ b/arch/mips/configs/wrppmc_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_WR_PPMC=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index 4d3c1329f3cf..b9f74d6745ee 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_PMC_YOSEMITE=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 21d53e0c9ee8..f9812d1e4579 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig | |||
@@ -59,7 +59,7 @@ CONFIG_SGI_IP22=y | |||
59 | # CONFIG_SIBYTE_LITTLESUR is not set | 59 | # CONFIG_SIBYTE_LITTLESUR is not set |
60 | # CONFIG_SIBYTE_CRHINE is not set | 60 | # CONFIG_SIBYTE_CRHINE is not set |
61 | # CONFIG_SIBYTE_CRHONE is not set | 61 | # CONFIG_SIBYTE_CRHONE is not set |
62 | # CONFIG_SNI_RM200_PCI is not set | 62 | # CONFIG_SNI_RM is not set |
63 | # CONFIG_TOSHIBA_JMR3927 is not set | 63 | # CONFIG_TOSHIBA_JMR3927 is not set |
64 | # CONFIG_TOSHIBA_RBTX4927 is not set | 64 | # CONFIG_TOSHIBA_RBTX4927 is not set |
65 | # CONFIG_TOSHIBA_RBTX4938 is not set | 65 | # CONFIG_TOSHIBA_RBTX4938 is not set |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index a2e095adaa3f..9a7811d13db2 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -138,7 +138,7 @@ | |||
138 | EXPORT(stext) # used for profiling | 138 | EXPORT(stext) # used for profiling |
139 | EXPORT(_stext) | 139 | EXPORT(_stext) |
140 | 140 | ||
141 | #if defined(CONFIG_QEMU) || defined(CONFIG_MIPS_SIM) | 141 | #ifdef CONFIG_MIPS_SIM |
142 | /* | 142 | /* |
143 | * Give us a fighting chance of running if execution beings at the | 143 | * Give us a fighting chance of running if execution beings at the |
144 | * kernel load address. This is needed because this platform does | 144 | * kernel load address. This is needed because this platform does |
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 1bbefbf43373..37cad5de515c 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -1145,7 +1145,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1145 | psinfo.pr_pid = prstatus.pr_pid = current->pid; | 1145 | psinfo.pr_pid = prstatus.pr_pid = current->pid; |
1146 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; | 1146 | psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid; |
1147 | psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current); | 1147 | psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current); |
1148 | psinfo.pr_sid = prstatus.pr_sid = current->signal->session; | 1148 | psinfo.pr_sid = prstatus.pr_sid = process_session(current); |
1149 | if (current->pid == current->tgid) { | 1149 | if (current->pid == current->tgid) { |
1150 | /* | 1150 | /* |
1151 | * This is the record for the group leader. Add in the | 1151 | * This is the record for the group leader. Add in the |
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 2c82412b9efe..5929f883e46b 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -301,7 +301,7 @@ static void sp_cleanup(void) | |||
301 | for (;;) { | 301 | for (;;) { |
302 | unsigned long set; | 302 | unsigned long set; |
303 | i = j * __NFDBITS; | 303 | i = j * __NFDBITS; |
304 | if (i >= fdt->max_fdset || i >= fdt->max_fds) | 304 | if (i >= fdt->max_fds) |
305 | break; | 305 | break; |
306 | set = fdt->open_fds->fds_bits[j++]; | 306 | set = fdt->open_fds->fds_bits[j++]; |
307 | while (set) { | 307 | while (set) { |
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c index 621037db2290..060563a712b6 100644 --- a/arch/mips/kernel/reset.c +++ b/arch/mips/kernel/reset.c | |||
@@ -23,6 +23,8 @@ void (*_machine_restart)(char *command); | |||
23 | void (*_machine_halt)(void); | 23 | void (*_machine_halt)(void); |
24 | void (*pm_power_off)(void); | 24 | void (*pm_power_off)(void); |
25 | 25 | ||
26 | EXPORT_SYMBOL(pm_power_off); | ||
27 | |||
26 | void machine_restart(char *command) | 28 | void machine_restart(char *command) |
27 | { | 29 | { |
28 | if (_machine_restart) | 30 | if (_machine_restart) |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index 8c8c8324f775..5a99e3e0c96d 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -415,7 +415,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait) | |||
415 | int minor; | 415 | int minor; |
416 | unsigned int mask = 0; | 416 | unsigned int mask = 0; |
417 | 417 | ||
418 | minor = iminor(file->f_dentry->d_inode); | 418 | minor = iminor(file->f_path.dentry->d_inode); |
419 | 419 | ||
420 | poll_wait(file, &channel_wqs[minor].rt_queue, wait); | 420 | poll_wait(file, &channel_wqs[minor].rt_queue, wait); |
421 | poll_wait(file, &channel_wqs[minor].lx_queue, wait); | 421 | poll_wait(file, &channel_wqs[minor].lx_queue, wait); |
@@ -437,7 +437,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait) | |||
437 | static ssize_t file_read(struct file *file, char __user * buffer, size_t count, | 437 | static ssize_t file_read(struct file *file, char __user * buffer, size_t count, |
438 | loff_t * ppos) | 438 | loff_t * ppos) |
439 | { | 439 | { |
440 | int minor = iminor(file->f_dentry->d_inode); | 440 | int minor = iminor(file->f_path.dentry->d_inode); |
441 | 441 | ||
442 | /* data available? */ | 442 | /* data available? */ |
443 | if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { | 443 | if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { |
@@ -454,7 +454,7 @@ static ssize_t file_write(struct file *file, const char __user * buffer, | |||
454 | struct rtlx_channel *rt; | 454 | struct rtlx_channel *rt; |
455 | DECLARE_WAITQUEUE(wait, current); | 455 | DECLARE_WAITQUEUE(wait, current); |
456 | 456 | ||
457 | minor = iminor(file->f_dentry->d_inode); | 457 | minor = iminor(file->f_path.dentry->d_inode); |
458 | rt = &rtlx->channel[minor]; | 458 | rt = &rtlx->channel[minor]; |
459 | 459 | ||
460 | /* any space left... */ | 460 | /* any space left... */ |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 93c74fefff76..6c2406a93f2b 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -732,7 +732,7 @@ asmlinkage int irix_fstatfs(unsigned int fd, struct irix_statfs __user *buf) | |||
732 | goto out; | 732 | goto out; |
733 | } | 733 | } |
734 | 734 | ||
735 | error = vfs_statfs(file->f_dentry, &kbuf); | 735 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
736 | if (error) | 736 | if (error) |
737 | goto out_f; | 737 | goto out_f; |
738 | 738 | ||
@@ -1041,7 +1041,7 @@ asmlinkage unsigned long irix_mmap32(unsigned long addr, size_t len, int prot, | |||
1041 | unsigned long old_pos; | 1041 | unsigned long old_pos; |
1042 | long max_size = offset + len; | 1042 | long max_size = offset + len; |
1043 | 1043 | ||
1044 | if (max_size > file->f_dentry->d_inode->i_size) { | 1044 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1045 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1045 | old_pos = sys_lseek (fd, max_size - 1, 0); |
1046 | sys_write (fd, (void __user *) "", 1); | 1046 | sys_write (fd, (void __user *) "", 1); |
1047 | sys_lseek (fd, old_pos, 0); | 1047 | sys_lseek (fd, old_pos, 0); |
@@ -1406,7 +1406,7 @@ asmlinkage int irix_fstatvfs(int fd, struct irix_statvfs __user *buf) | |||
1406 | error = -EBADF; | 1406 | error = -EBADF; |
1407 | goto out; | 1407 | goto out; |
1408 | } | 1408 | } |
1409 | error = vfs_statfs(file->f_dentry, &kbuf); | 1409 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
1410 | if (error) | 1410 | if (error) |
1411 | goto out_f; | 1411 | goto out_f; |
1412 | 1412 | ||
@@ -1526,7 +1526,7 @@ asmlinkage int irix_mmap64(struct pt_regs *regs) | |||
1526 | unsigned long old_pos; | 1526 | unsigned long old_pos; |
1527 | long max_size = off2 + len; | 1527 | long max_size = off2 + len; |
1528 | 1528 | ||
1529 | if (max_size > file->f_dentry->d_inode->i_size) { | 1529 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1530 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1530 | old_pos = sys_lseek (fd, max_size - 1, 0); |
1531 | sys_write (fd, (void __user *) "", 1); | 1531 | sys_write (fd, (void __user *) "", 1); |
1532 | sys_lseek (fd, old_pos, 0); | 1532 | sys_lseek (fd, old_pos, 0); |
@@ -1658,7 +1658,7 @@ asmlinkage int irix_fstatvfs64(int fd, struct irix_statvfs __user *buf) | |||
1658 | error = -EBADF; | 1658 | error = -EBADF; |
1659 | goto out; | 1659 | goto out; |
1660 | } | 1660 | } |
1661 | error = vfs_statfs(file->f_dentry, &kbuf); | 1661 | error = vfs_statfs(file->f_path.dentry, &kbuf); |
1662 | if (error) | 1662 | if (error) |
1663 | goto out_f; | 1663 | goto out_f; |
1664 | 1664 | ||
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 79f0317d84ac..cecff24cc972 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -112,6 +112,7 @@ SECTIONS | |||
112 | /* .exit.text is discarded at runtime, not link time, to deal with | 112 | /* .exit.text is discarded at runtime, not link time, to deal with |
113 | references from .rodata */ | 113 | references from .rodata */ |
114 | .exit.text : { *(.exit.text) } | 114 | .exit.text : { *(.exit.text) } |
115 | .exit.data : { *(.exit.data) } | ||
115 | . = ALIGN(_PAGE_SIZE); | 116 | . = ALIGN(_PAGE_SIZE); |
116 | __initramfs_start = .; | 117 | __initramfs_start = .; |
117 | .init.ramfs : { *(.init.ramfs) } | 118 | .init.ramfs : { *(.init.ramfs) } |
@@ -139,7 +140,6 @@ SECTIONS | |||
139 | 140 | ||
140 | /* Sections to be discarded */ | 141 | /* Sections to be discarded */ |
141 | /DISCARD/ : { | 142 | /DISCARD/ : { |
142 | *(.exit.data) | ||
143 | *(.exitcall.exit) | 143 | *(.exitcall.exit) |
144 | 144 | ||
145 | /* ABI crap starts here */ | 145 | /* ABI crap starts here */ |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 51ddd2166898..666bef484dcb 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -1179,7 +1179,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer, | |||
1179 | size_t ret = count; | 1179 | size_t ret = count; |
1180 | struct vpe *v; | 1180 | struct vpe *v; |
1181 | 1181 | ||
1182 | minor = iminor(file->f_dentry->d_inode); | 1182 | minor = iminor(file->f_path.dentry->d_inode); |
1183 | if ((v = get_vpe(minor)) == NULL) | 1183 | if ((v = get_vpe(minor)) == NULL) |
1184 | return -ENODEV; | 1184 | return -ENODEV; |
1185 | 1185 | ||
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 6dd7ae1b7c25..12878359f2c8 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -40,12 +40,12 @@ static DEFINE_MUTEX(lasat_info_mutex); | |||
40 | /* Strategy function to write EEPROM after changing string entry */ | 40 | /* Strategy function to write EEPROM after changing string entry */ |
41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, | 41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, |
42 | void *oldval, size_t *oldlenp, | 42 | void *oldval, size_t *oldlenp, |
43 | void *newval, size_t newlen, void **context) | 43 | void *newval, size_t newlen) |
44 | { | 44 | { |
45 | int r; | 45 | int r; |
46 | mutex_lock(&lasat_info_mutex); | 46 | mutex_lock(&lasat_info_mutex); |
47 | r = sysctl_string(table, name, | 47 | r = sysctl_string(table, name, |
48 | nlen, oldval, oldlenp, newval, newlen, context); | 48 | nlen, oldval, oldlenp, newval, newlen); |
49 | if (r < 0) { | 49 | if (r < 0) { |
50 | mutex_unlock(&lasat_info_mutex); | 50 | mutex_unlock(&lasat_info_mutex); |
51 | return r; | 51 | return r; |
@@ -119,11 +119,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | |||
119 | /* Sysctl for setting the IP addresses */ | 119 | /* Sysctl for setting the IP addresses */ |
120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | 120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, |
121 | void *oldval, size_t *oldlenp, | 121 | void *oldval, size_t *oldlenp, |
122 | void *newval, size_t newlen, void **context) | 122 | void *newval, size_t newlen) |
123 | { | 123 | { |
124 | int r; | 124 | int r; |
125 | mutex_lock(&lasat_info_mutex); | 125 | mutex_lock(&lasat_info_mutex); |
126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
127 | if (r < 0) { | 127 | if (r < 0) { |
128 | mutex_unlock(&lasat_info_mutex); | 128 | mutex_unlock(&lasat_info_mutex); |
129 | return r; | 129 | return r; |
@@ -139,14 +139,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | |||
139 | /* Same for RTC */ | 139 | /* Same for RTC */ |
140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | 140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, |
141 | void *oldval, size_t *oldlenp, | 141 | void *oldval, size_t *oldlenp, |
142 | void *newval, size_t newlen, void **context) | 142 | void *newval, size_t newlen) |
143 | { | 143 | { |
144 | int r; | 144 | int r; |
145 | mutex_lock(&lasat_info_mutex); | 145 | mutex_lock(&lasat_info_mutex); |
146 | rtctmp = ds1603_read(); | 146 | rtctmp = ds1603_read(); |
147 | if (rtctmp < 0) | 147 | if (rtctmp < 0) |
148 | rtctmp = 0; | 148 | rtctmp = 0; |
149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
150 | if (r < 0) { | 150 | if (r < 0) { |
151 | mutex_unlock(&lasat_info_mutex); | 151 | mutex_unlock(&lasat_info_mutex); |
152 | return r; | 152 | return r; |
@@ -251,13 +251,12 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
251 | 251 | ||
252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, | 252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, |
253 | void *oldval, size_t *oldlenp, | 253 | void *oldval, size_t *oldlenp, |
254 | void *newval, size_t newlen, | 254 | void *newval, size_t newlen) |
255 | void **context) | ||
256 | { | 255 | { |
257 | int r; | 256 | int r; |
258 | 257 | ||
259 | mutex_lock(&lasat_info_mutex); | 258 | mutex_lock(&lasat_info_mutex); |
260 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 259 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
261 | if (r < 0) { | 260 | if (r < 0) { |
262 | mutex_unlock(&lasat_info_mutex); | 261 | mutex_unlock(&lasat_info_mutex); |
263 | return r; | 262 | return r; |
@@ -286,11 +285,11 @@ int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp, | |||
286 | mutex_unlock(&lasat_info_mutex); | 285 | mutex_unlock(&lasat_info_mutex); |
287 | return r; | 286 | return r; |
288 | } | 287 | } |
289 | if (filp && filp->f_dentry) | 288 | if (filp && filp->f_path.dentry) |
290 | { | 289 | { |
291 | if (!strcmp(filp->f_dentry->d_name.name, "prid")) | 290 | if (!strcmp(filp->f_path.dentry->d_name.name, "prid")) |
292 | lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid; | 291 | lasat_board_info.li_eeprom_info.prid = lasat_board_info.li_prid; |
293 | if (!strcmp(filp->f_dentry->d_name.name, "debugaccess")) | 292 | if (!strcmp(filp->f_path.dentry->d_name.name, "debugaccess")) |
294 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; | 293 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; |
295 | } | 294 | } |
296 | lasat_write_eeprom_info(); | 295 | lasat_write_eeprom_info(); |
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S index 15611d9df7ac..9db357294be1 100644 --- a/arch/mips/lib/csum_partial.S +++ b/arch/mips/lib/csum_partial.S | |||
@@ -12,43 +12,66 @@ | |||
12 | #include <asm/regdef.h> | 12 | #include <asm/regdef.h> |
13 | 13 | ||
14 | #ifdef CONFIG_64BIT | 14 | #ifdef CONFIG_64BIT |
15 | #define T0 ta0 | 15 | /* |
16 | #define T1 ta1 | 16 | * As we are sharing code base with the mips32 tree (which use the o32 ABI |
17 | #define T2 ta2 | 17 | * register definitions). We need to redefine the register definitions from |
18 | #define T3 ta3 | 18 | * the n64 ABI register naming to the o32 ABI register naming. |
19 | #define T4 t0 | 19 | */ |
20 | #define T7 t3 | 20 | #undef t0 |
21 | #else | 21 | #undef t1 |
22 | #define T0 t0 | 22 | #undef t2 |
23 | #define T1 t1 | 23 | #undef t3 |
24 | #define T2 t2 | 24 | #define t0 $8 |
25 | #define T3 t3 | 25 | #define t1 $9 |
26 | #define T4 t4 | 26 | #define t2 $10 |
27 | #define T7 t7 | 27 | #define t3 $11 |
28 | #define t4 $12 | ||
29 | #define t5 $13 | ||
30 | #define t6 $14 | ||
31 | #define t7 $15 | ||
32 | |||
33 | #define USE_DOUBLE | ||
28 | #endif | 34 | #endif |
29 | 35 | ||
36 | #ifdef USE_DOUBLE | ||
37 | |||
38 | #define LOAD ld | ||
39 | #define ADD daddu | ||
40 | #define NBYTES 8 | ||
41 | |||
42 | #else | ||
43 | |||
44 | #define LOAD lw | ||
45 | #define ADD addu | ||
46 | #define NBYTES 4 | ||
47 | |||
48 | #endif /* USE_DOUBLE */ | ||
49 | |||
50 | #define UNIT(unit) ((unit)*NBYTES) | ||
51 | |||
30 | #define ADDC(sum,reg) \ | 52 | #define ADDC(sum,reg) \ |
31 | addu sum, reg; \ | 53 | ADD sum, reg; \ |
32 | sltu v1, sum, reg; \ | 54 | sltu v1, sum, reg; \ |
33 | addu sum, v1 | 55 | ADD sum, v1 |
34 | 56 | ||
35 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | 57 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ |
36 | lw _t0, (offset + 0x00)(src); \ | 58 | LOAD _t0, (offset + UNIT(0))(src); \ |
37 | lw _t1, (offset + 0x04)(src); \ | 59 | LOAD _t1, (offset + UNIT(1))(src); \ |
38 | lw _t2, (offset + 0x08)(src); \ | 60 | LOAD _t2, (offset + UNIT(2))(src); \ |
39 | lw _t3, (offset + 0x0c)(src); \ | 61 | LOAD _t3, (offset + UNIT(3))(src); \ |
40 | ADDC(sum, _t0); \ | ||
41 | ADDC(sum, _t1); \ | ||
42 | ADDC(sum, _t2); \ | ||
43 | ADDC(sum, _t3); \ | ||
44 | lw _t0, (offset + 0x10)(src); \ | ||
45 | lw _t1, (offset + 0x14)(src); \ | ||
46 | lw _t2, (offset + 0x18)(src); \ | ||
47 | lw _t3, (offset + 0x1c)(src); \ | ||
48 | ADDC(sum, _t0); \ | 62 | ADDC(sum, _t0); \ |
49 | ADDC(sum, _t1); \ | 63 | ADDC(sum, _t1); \ |
50 | ADDC(sum, _t2); \ | 64 | ADDC(sum, _t2); \ |
51 | ADDC(sum, _t3); \ | 65 | ADDC(sum, _t3) |
66 | |||
67 | #ifdef USE_DOUBLE | ||
68 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | ||
69 | CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) | ||
70 | #else | ||
71 | #define CSUM_BIGCHUNK(src, offset, sum, _t0, _t1, _t2, _t3) \ | ||
72 | CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3); \ | ||
73 | CSUM_BIGCHUNK1(src, offset + 0x10, sum, _t0, _t1, _t2, _t3) | ||
74 | #endif | ||
52 | 75 | ||
53 | /* | 76 | /* |
54 | * a0: source address | 77 | * a0: source address |
@@ -61,86 +84,27 @@ | |||
61 | 84 | ||
62 | .text | 85 | .text |
63 | .set noreorder | 86 | .set noreorder |
64 | |||
65 | /* unknown src alignment and < 8 bytes to go */ | ||
66 | small_csumcpy: | ||
67 | move a1, T2 | ||
68 | |||
69 | andi T0, a1, 4 | ||
70 | beqz T0, 1f | ||
71 | andi T0, a1, 2 | ||
72 | |||
73 | /* Still a full word to go */ | ||
74 | ulw T1, (src) | ||
75 | PTR_ADDIU src, 4 | ||
76 | ADDC(sum, T1) | ||
77 | |||
78 | 1: move T1, zero | ||
79 | beqz T0, 1f | ||
80 | andi T0, a1, 1 | ||
81 | |||
82 | /* Still a halfword to go */ | ||
83 | ulhu T1, (src) | ||
84 | PTR_ADDIU src, 2 | ||
85 | |||
86 | 1: beqz T0, 1f | ||
87 | sll T1, T1, 16 | ||
88 | |||
89 | lbu T2, (src) | ||
90 | nop | ||
91 | |||
92 | #ifdef __MIPSEB__ | ||
93 | sll T2, T2, 8 | ||
94 | #endif | ||
95 | or T1, T2 | ||
96 | |||
97 | 1: ADDC(sum, T1) | ||
98 | |||
99 | /* fold checksum */ | ||
100 | sll v1, sum, 16 | ||
101 | addu sum, v1 | ||
102 | sltu v1, sum, v1 | ||
103 | srl sum, sum, 16 | ||
104 | addu sum, v1 | ||
105 | |||
106 | /* odd buffer alignment? */ | ||
107 | beqz T7, 1f | ||
108 | nop | ||
109 | sll v1, sum, 8 | ||
110 | srl sum, sum, 8 | ||
111 | or sum, v1 | ||
112 | andi sum, 0xffff | ||
113 | 1: | ||
114 | .set reorder | ||
115 | /* Add the passed partial csum. */ | ||
116 | ADDC(sum, a2) | ||
117 | jr ra | ||
118 | .set noreorder | ||
119 | |||
120 | /* ------------------------------------------------------------------------- */ | ||
121 | |||
122 | .align 5 | 87 | .align 5 |
123 | LEAF(csum_partial) | 88 | LEAF(csum_partial) |
124 | move sum, zero | 89 | move sum, zero |
125 | move T7, zero | 90 | move t7, zero |
126 | 91 | ||
127 | sltiu t8, a1, 0x8 | 92 | sltiu t8, a1, 0x8 |
128 | bnez t8, small_csumcpy /* < 8 bytes to copy */ | 93 | bnez t8, small_csumcpy /* < 8 bytes to copy */ |
129 | move T2, a1 | 94 | move t2, a1 |
130 | 95 | ||
131 | beqz a1, out | 96 | andi t7, src, 0x1 /* odd buffer? */ |
132 | andi T7, src, 0x1 /* odd buffer? */ | ||
133 | 97 | ||
134 | hword_align: | 98 | hword_align: |
135 | beqz T7, word_align | 99 | beqz t7, word_align |
136 | andi t8, src, 0x2 | 100 | andi t8, src, 0x2 |
137 | 101 | ||
138 | lbu T0, (src) | 102 | lbu t0, (src) |
139 | LONG_SUBU a1, a1, 0x1 | 103 | LONG_SUBU a1, a1, 0x1 |
140 | #ifdef __MIPSEL__ | 104 | #ifdef __MIPSEL__ |
141 | sll T0, T0, 8 | 105 | sll t0, t0, 8 |
142 | #endif | 106 | #endif |
143 | ADDC(sum, T0) | 107 | ADDC(sum, t0) |
144 | PTR_ADDU src, src, 0x1 | 108 | PTR_ADDU src, src, 0x1 |
145 | andi t8, src, 0x2 | 109 | andi t8, src, 0x2 |
146 | 110 | ||
@@ -148,9 +112,9 @@ word_align: | |||
148 | beqz t8, dword_align | 112 | beqz t8, dword_align |
149 | sltiu t8, a1, 56 | 113 | sltiu t8, a1, 56 |
150 | 114 | ||
151 | lhu T0, (src) | 115 | lhu t0, (src) |
152 | LONG_SUBU a1, a1, 0x2 | 116 | LONG_SUBU a1, a1, 0x2 |
153 | ADDC(sum, T0) | 117 | ADDC(sum, t0) |
154 | sltiu t8, a1, 56 | 118 | sltiu t8, a1, 56 |
155 | PTR_ADDU src, src, 0x2 | 119 | PTR_ADDU src, src, 0x2 |
156 | 120 | ||
@@ -162,9 +126,9 @@ dword_align: | |||
162 | beqz t8, qword_align | 126 | beqz t8, qword_align |
163 | andi t8, src, 0x8 | 127 | andi t8, src, 0x8 |
164 | 128 | ||
165 | lw T0, 0x00(src) | 129 | lw t0, 0x00(src) |
166 | LONG_SUBU a1, a1, 0x4 | 130 | LONG_SUBU a1, a1, 0x4 |
167 | ADDC(sum, T0) | 131 | ADDC(sum, t0) |
168 | PTR_ADDU src, src, 0x4 | 132 | PTR_ADDU src, src, 0x4 |
169 | andi t8, src, 0x8 | 133 | andi t8, src, 0x8 |
170 | 134 | ||
@@ -172,11 +136,17 @@ qword_align: | |||
172 | beqz t8, oword_align | 136 | beqz t8, oword_align |
173 | andi t8, src, 0x10 | 137 | andi t8, src, 0x10 |
174 | 138 | ||
175 | lw T0, 0x00(src) | 139 | #ifdef USE_DOUBLE |
176 | lw T1, 0x04(src) | 140 | ld t0, 0x00(src) |
141 | LONG_SUBU a1, a1, 0x8 | ||
142 | ADDC(sum, t0) | ||
143 | #else | ||
144 | lw t0, 0x00(src) | ||
145 | lw t1, 0x04(src) | ||
177 | LONG_SUBU a1, a1, 0x8 | 146 | LONG_SUBU a1, a1, 0x8 |
178 | ADDC(sum, T0) | 147 | ADDC(sum, t0) |
179 | ADDC(sum, T1) | 148 | ADDC(sum, t1) |
149 | #endif | ||
180 | PTR_ADDU src, src, 0x8 | 150 | PTR_ADDU src, src, 0x8 |
181 | andi t8, src, 0x10 | 151 | andi t8, src, 0x10 |
182 | 152 | ||
@@ -184,75 +154,120 @@ oword_align: | |||
184 | beqz t8, begin_movement | 154 | beqz t8, begin_movement |
185 | LONG_SRL t8, a1, 0x7 | 155 | LONG_SRL t8, a1, 0x7 |
186 | 156 | ||
187 | lw T3, 0x08(src) | 157 | #ifdef USE_DOUBLE |
188 | lw T4, 0x0c(src) | 158 | ld t0, 0x00(src) |
189 | lw T0, 0x00(src) | 159 | ld t1, 0x08(src) |
190 | lw T1, 0x04(src) | 160 | ADDC(sum, t0) |
191 | ADDC(sum, T3) | 161 | ADDC(sum, t1) |
192 | ADDC(sum, T4) | 162 | #else |
193 | ADDC(sum, T0) | 163 | CSUM_BIGCHUNK1(src, 0x00, sum, t0, t1, t3, t4) |
194 | ADDC(sum, T1) | 164 | #endif |
195 | LONG_SUBU a1, a1, 0x10 | 165 | LONG_SUBU a1, a1, 0x10 |
196 | PTR_ADDU src, src, 0x10 | 166 | PTR_ADDU src, src, 0x10 |
197 | LONG_SRL t8, a1, 0x7 | 167 | LONG_SRL t8, a1, 0x7 |
198 | 168 | ||
199 | begin_movement: | 169 | begin_movement: |
200 | beqz t8, 1f | 170 | beqz t8, 1f |
201 | andi T2, a1, 0x40 | 171 | andi t2, a1, 0x40 |
202 | 172 | ||
203 | move_128bytes: | 173 | move_128bytes: |
204 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 174 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
205 | CSUM_BIGCHUNK(src, 0x20, sum, T0, T1, T3, T4) | 175 | CSUM_BIGCHUNK(src, 0x20, sum, t0, t1, t3, t4) |
206 | CSUM_BIGCHUNK(src, 0x40, sum, T0, T1, T3, T4) | 176 | CSUM_BIGCHUNK(src, 0x40, sum, t0, t1, t3, t4) |
207 | CSUM_BIGCHUNK(src, 0x60, sum, T0, T1, T3, T4) | 177 | CSUM_BIGCHUNK(src, 0x60, sum, t0, t1, t3, t4) |
208 | LONG_SUBU t8, t8, 0x01 | 178 | LONG_SUBU t8, t8, 0x01 |
209 | bnez t8, move_128bytes | 179 | bnez t8, move_128bytes |
210 | PTR_ADDU src, src, 0x80 | 180 | PTR_ADDU src, src, 0x80 |
211 | 181 | ||
212 | 1: | 182 | 1: |
213 | beqz T2, 1f | 183 | beqz t2, 1f |
214 | andi T2, a1, 0x20 | 184 | andi t2, a1, 0x20 |
215 | 185 | ||
216 | move_64bytes: | 186 | move_64bytes: |
217 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 187 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
218 | CSUM_BIGCHUNK(src, 0x20, sum, T0, T1, T3, T4) | 188 | CSUM_BIGCHUNK(src, 0x20, sum, t0, t1, t3, t4) |
219 | PTR_ADDU src, src, 0x40 | 189 | PTR_ADDU src, src, 0x40 |
220 | 190 | ||
221 | 1: | 191 | 1: |
222 | beqz T2, do_end_words | 192 | beqz t2, do_end_words |
223 | andi t8, a1, 0x1c | 193 | andi t8, a1, 0x1c |
224 | 194 | ||
225 | move_32bytes: | 195 | move_32bytes: |
226 | CSUM_BIGCHUNK(src, 0x00, sum, T0, T1, T3, T4) | 196 | CSUM_BIGCHUNK(src, 0x00, sum, t0, t1, t3, t4) |
227 | andi t8, a1, 0x1c | 197 | andi t8, a1, 0x1c |
228 | PTR_ADDU src, src, 0x20 | 198 | PTR_ADDU src, src, 0x20 |
229 | 199 | ||
230 | do_end_words: | 200 | do_end_words: |
231 | beqz t8, maybe_end_cruft | 201 | beqz t8, small_csumcpy |
232 | LONG_SRL t8, t8, 0x2 | 202 | andi t2, a1, 0x3 |
203 | LONG_SRL t8, t8, 0x2 | ||
233 | 204 | ||
234 | end_words: | 205 | end_words: |
235 | lw T0, (src) | 206 | lw t0, (src) |
236 | LONG_SUBU t8, t8, 0x1 | 207 | LONG_SUBU t8, t8, 0x1 |
237 | ADDC(sum, T0) | 208 | ADDC(sum, t0) |
238 | bnez t8, end_words | 209 | bnez t8, end_words |
239 | PTR_ADDU src, src, 0x4 | 210 | PTR_ADDU src, src, 0x4 |
240 | 211 | ||
241 | maybe_end_cruft: | 212 | /* unknown src alignment and < 8 bytes to go */ |
242 | andi T2, a1, 0x3 | 213 | small_csumcpy: |
214 | move a1, t2 | ||
243 | 215 | ||
244 | small_memcpy: | 216 | andi t0, a1, 4 |
245 | j small_csumcpy; move a1, T2 /* XXX ??? */ | 217 | beqz t0, 1f |
246 | beqz t2, out | 218 | andi t0, a1, 2 |
247 | move a1, T2 | ||
248 | 219 | ||
249 | end_bytes: | 220 | /* Still a full word to go */ |
250 | lb T0, (src) | 221 | ulw t1, (src) |
251 | LONG_SUBU a1, a1, 0x1 | 222 | PTR_ADDIU src, 4 |
252 | bnez a2, end_bytes | 223 | ADDC(sum, t1) |
253 | PTR_ADDU src, src, 0x1 | 224 | |
225 | 1: move t1, zero | ||
226 | beqz t0, 1f | ||
227 | andi t0, a1, 1 | ||
228 | |||
229 | /* Still a halfword to go */ | ||
230 | ulhu t1, (src) | ||
231 | PTR_ADDIU src, 2 | ||
232 | |||
233 | 1: beqz t0, 1f | ||
234 | sll t1, t1, 16 | ||
235 | |||
236 | lbu t2, (src) | ||
237 | nop | ||
254 | 238 | ||
255 | out: | 239 | #ifdef __MIPSEB__ |
240 | sll t2, t2, 8 | ||
241 | #endif | ||
242 | or t1, t2 | ||
243 | |||
244 | 1: ADDC(sum, t1) | ||
245 | |||
246 | /* fold checksum */ | ||
247 | #ifdef USE_DOUBLE | ||
248 | dsll32 v1, sum, 0 | ||
249 | daddu sum, v1 | ||
250 | sltu v1, sum, v1 | ||
251 | dsra32 sum, sum, 0 | ||
252 | addu sum, v1 | ||
253 | #endif | ||
254 | sll v1, sum, 16 | ||
255 | addu sum, v1 | ||
256 | sltu v1, sum, v1 | ||
257 | srl sum, sum, 16 | ||
258 | addu sum, v1 | ||
259 | |||
260 | /* odd buffer alignment? */ | ||
261 | beqz t7, 1f | ||
262 | nop | ||
263 | sll v1, sum, 8 | ||
264 | srl sum, sum, 8 | ||
265 | or sum, v1 | ||
266 | andi sum, 0xffff | ||
267 | 1: | ||
268 | .set reorder | ||
269 | /* Add the passed partial csum. */ | ||
270 | ADDC(sum, a2) | ||
256 | jr ra | 271 | jr ra |
257 | move v0, sum | 272 | .set noreorder |
258 | END(csum_partial) | 273 | END(csum_partial) |
diff --git a/arch/mips/lib/csum_partial_copy.c b/arch/mips/lib/csum_partial_copy.c index 1720f2ceeeae..06771040a267 100644 --- a/arch/mips/lib/csum_partial_copy.c +++ b/arch/mips/lib/csum_partial_copy.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 1998, 1999 Ralf Baechle | 7 | * Copyright (C) 1998, 1999 Ralf Baechle |
8 | */ | 8 | */ |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | ||
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <asm/byteorder.h> | 12 | #include <asm/byteorder.h> |
12 | #include <asm/string.h> | 13 | #include <asm/string.h> |
@@ -29,6 +30,8 @@ __wsum csum_partial_copy_nocheck(const void *src, | |||
29 | return sum; | 30 | return sum; |
30 | } | 31 | } |
31 | 32 | ||
33 | EXPORT_SYMBOL(csum_partial_copy_nocheck); | ||
34 | |||
32 | /* | 35 | /* |
33 | * Copy from userspace and compute checksum. If we catch an exception | 36 | * Copy from userspace and compute checksum. If we catch an exception |
34 | * then zero the rest of the buffer. | 37 | * then zero the rest of the buffer. |
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile index 77ee5c6d33c1..b662c75fb28e 100644 --- a/arch/mips/mips-boards/malta/Makefile +++ b/arch/mips/mips-boards/malta/Makefile | |||
@@ -19,5 +19,5 @@ | |||
19 | # under Linux. | 19 | # under Linux. |
20 | # | 20 | # |
21 | 21 | ||
22 | obj-y := malta_int.o malta_setup.o | 22 | obj-y := malta_int.o malta_mtd.o malta_setup.o |
23 | obj-$(CONFIG_SMP) += malta_smp.o | 23 | obj-$(CONFIG_SMP) += malta_smp.o |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 282f3e52eea3..56ea76679cd4 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -21,13 +21,6 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/screen_info.h> | 22 | #include <linux/screen_info.h> |
23 | 23 | ||
24 | #ifdef CONFIG_MTD | ||
25 | #include <linux/mtd/partitions.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <linux/mtd/mtd.h> | ||
28 | #include <linux/mtd/map.h> | ||
29 | #endif | ||
30 | |||
31 | #include <asm/cpu.h> | 24 | #include <asm/cpu.h> |
32 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
33 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
@@ -58,30 +51,6 @@ struct resource standard_io_resources[] = { | |||
58 | { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, | 51 | { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, |
59 | }; | 52 | }; |
60 | 53 | ||
61 | #ifdef CONFIG_MTD | ||
62 | static struct mtd_partition malta_mtd_partitions[] = { | ||
63 | { | ||
64 | .name = "YAMON", | ||
65 | .offset = 0x0, | ||
66 | .size = 0x100000, | ||
67 | .mask_flags = MTD_WRITEABLE | ||
68 | }, | ||
69 | { | ||
70 | .name = "User FS", | ||
71 | .offset = 0x100000, | ||
72 | .size = 0x2e0000 | ||
73 | }, | ||
74 | { | ||
75 | .name = "Board Config", | ||
76 | .offset = 0x3e0000, | ||
77 | .size = 0x020000, | ||
78 | .mask_flags = MTD_WRITEABLE | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | #define number_partitions (sizeof(malta_mtd_partitions)/sizeof(struct mtd_partition)) | ||
83 | #endif | ||
84 | |||
85 | const char *get_system_type(void) | 54 | const char *get_system_type(void) |
86 | { | 55 | { |
87 | return "MIPS Malta"; | 56 | return "MIPS Malta"; |
@@ -211,14 +180,6 @@ void __init plat_mem_setup(void) | |||
211 | #endif | 180 | #endif |
212 | #endif | 181 | #endif |
213 | 182 | ||
214 | #ifdef CONFIG_MTD | ||
215 | /* | ||
216 | * Support for MTD on Malta. Use the generic physmap driver | ||
217 | */ | ||
218 | physmap_configure(0x1e000000, 0x400000, 4, NULL); | ||
219 | physmap_set_partitions(malta_mtd_partitions, number_partitions); | ||
220 | #endif | ||
221 | |||
222 | mips_reboot_setup(); | 183 | mips_reboot_setup(); |
223 | 184 | ||
224 | board_time_init = mips_time_init; | 185 | board_time_init = mips_time_init; |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index caf807ded514..1f954a238a63 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -32,6 +32,7 @@ void (*local_flush_data_cache_page)(void * addr); | |||
32 | void (*flush_data_cache_page)(unsigned long addr); | 32 | void (*flush_data_cache_page)(unsigned long addr); |
33 | void (*flush_icache_all)(void); | 33 | void (*flush_icache_all)(void); |
34 | 34 | ||
35 | EXPORT_SYMBOL_GPL(local_flush_data_cache_page); | ||
35 | EXPORT_SYMBOL(flush_data_cache_page); | 36 | EXPORT_SYMBOL(flush_data_cache_page); |
36 | 37 | ||
37 | #ifdef CONFIG_DMA_NONCOHERENT | 38 | #ifdef CONFIG_DMA_NONCOHERENT |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 9e29ba9205f0..ea2d15370bb7 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -316,7 +316,7 @@ static int __init page_is_ram(unsigned long pagenr) | |||
316 | void __init paging_init(void) | 316 | void __init paging_init(void) |
317 | { | 317 | { |
318 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 318 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; |
319 | unsigned long max_dma, high, low; | 319 | unsigned long max_dma, low; |
320 | #ifndef CONFIG_FLATMEM | 320 | #ifndef CONFIG_FLATMEM |
321 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; | 321 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; |
322 | unsigned long i, j, pfn; | 322 | unsigned long i, j, pfn; |
@@ -331,7 +331,6 @@ void __init paging_init(void) | |||
331 | 331 | ||
332 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 332 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
333 | low = max_low_pfn; | 333 | low = max_low_pfn; |
334 | high = highend_pfn; | ||
335 | 334 | ||
336 | #ifdef CONFIG_ISA | 335 | #ifdef CONFIG_ISA |
337 | if (low < max_dma) | 336 | if (low < max_dma) |
@@ -344,13 +343,13 @@ void __init paging_init(void) | |||
344 | zones_size[ZONE_DMA] = low; | 343 | zones_size[ZONE_DMA] = low; |
345 | #endif | 344 | #endif |
346 | #ifdef CONFIG_HIGHMEM | 345 | #ifdef CONFIG_HIGHMEM |
347 | if (cpu_has_dc_aliases) { | 346 | zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; |
348 | printk(KERN_WARNING "This processor doesn't support highmem."); | 347 | |
349 | if (high - low) | 348 | if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) { |
350 | printk(" %ldk highmem ignored", high - low); | 349 | printk(KERN_WARNING "This processor doesn't support highmem." |
351 | printk("\n"); | 350 | " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]); |
352 | } else | 351 | zones_size[ZONE_HIGHMEM] = 0; |
353 | zones_size[ZONE_HIGHMEM] = high - low; | 352 | } |
354 | #endif | 353 | #endif |
355 | 354 | ||
356 | #ifdef CONFIG_FLATMEM | 355 | #ifdef CONFIG_FLATMEM |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cea7d0ea36e4..fc2c96f0a1fd 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -6,98 +6,13 @@ | |||
6 | * (C) Copyright 1995 1996 Linus Torvalds | 6 | * (C) Copyright 1995 1996 Linus Torvalds |
7 | * (C) Copyright 2001, 2002 Ralf Baechle | 7 | * (C) Copyright 2001, 2002 Ralf Baechle |
8 | */ | 8 | */ |
9 | #include <linux/mm.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
11 | #include <asm/byteorder.h> | 12 | #include <asm/byteorder.h> |
12 | 13 | ||
13 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
14 | #include <asm/cacheflush.h> | 15 | #include <linux/io.h> |
15 | #include <asm/io.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | |||
18 | static inline void remap_area_pte(pte_t * pte, unsigned long address, | ||
19 | phys_t size, phys_t phys_addr, unsigned long flags) | ||
20 | { | ||
21 | phys_t end; | ||
22 | unsigned long pfn; | ||
23 | pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE | ||
24 | | __WRITEABLE | flags); | ||
25 | |||
26 | address &= ~PMD_MASK; | ||
27 | end = address + size; | ||
28 | if (end > PMD_SIZE) | ||
29 | end = PMD_SIZE; | ||
30 | if (address >= end) | ||
31 | BUG(); | ||
32 | pfn = phys_addr >> PAGE_SHIFT; | ||
33 | do { | ||
34 | if (!pte_none(*pte)) { | ||
35 | printk("remap_area_pte: page already exists\n"); | ||
36 | BUG(); | ||
37 | } | ||
38 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
39 | address += PAGE_SIZE; | ||
40 | pfn++; | ||
41 | pte++; | ||
42 | } while (address && (address < end)); | ||
43 | } | ||
44 | |||
45 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | ||
46 | phys_t size, phys_t phys_addr, unsigned long flags) | ||
47 | { | ||
48 | phys_t end; | ||
49 | |||
50 | address &= ~PGDIR_MASK; | ||
51 | end = address + size; | ||
52 | if (end > PGDIR_SIZE) | ||
53 | end = PGDIR_SIZE; | ||
54 | phys_addr -= address; | ||
55 | if (address >= end) | ||
56 | BUG(); | ||
57 | do { | ||
58 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
59 | if (!pte) | ||
60 | return -ENOMEM; | ||
61 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
62 | address = (address + PMD_SIZE) & PMD_MASK; | ||
63 | pmd++; | ||
64 | } while (address && (address < end)); | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | static int remap_area_pages(unsigned long address, phys_t phys_addr, | ||
69 | phys_t size, unsigned long flags) | ||
70 | { | ||
71 | int error; | ||
72 | pgd_t * dir; | ||
73 | unsigned long end = address + size; | ||
74 | |||
75 | phys_addr -= address; | ||
76 | dir = pgd_offset(&init_mm, address); | ||
77 | flush_cache_all(); | ||
78 | if (address >= end) | ||
79 | BUG(); | ||
80 | do { | ||
81 | pud_t *pud; | ||
82 | pmd_t *pmd; | ||
83 | |||
84 | error = -ENOMEM; | ||
85 | pud = pud_alloc(&init_mm, dir, address); | ||
86 | if (!pud) | ||
87 | break; | ||
88 | pmd = pmd_alloc(&init_mm, pud, address); | ||
89 | if (!pmd) | ||
90 | break; | ||
91 | if (remap_area_pmd(pmd, address, end - address, | ||
92 | phys_addr + address, flags)) | ||
93 | break; | ||
94 | error = 0; | ||
95 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
96 | dir++; | ||
97 | } while (address && (address < end)); | ||
98 | flush_tlb_all(); | ||
99 | return error; | ||
100 | } | ||
101 | 16 | ||
102 | /* | 17 | /* |
103 | * Generic mapping function (not visible outside): | 18 | * Generic mapping function (not visible outside): |
@@ -121,6 +36,7 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
121 | unsigned long offset; | 36 | unsigned long offset; |
122 | phys_t last_addr; | 37 | phys_t last_addr; |
123 | void * addr; | 38 | void * addr; |
39 | pgprot_t pgprot; | ||
124 | 40 | ||
125 | phys_addr = fixup_bigphys_addr(phys_addr, size); | 41 | phys_addr = fixup_bigphys_addr(phys_addr, size); |
126 | 42 | ||
@@ -152,6 +68,9 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
152 | return NULL; | 68 | return NULL; |
153 | } | 69 | } |
154 | 70 | ||
71 | pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE | ||
72 | | __WRITEABLE | flags); | ||
73 | |||
155 | /* | 74 | /* |
156 | * Mappings have to be page-aligned | 75 | * Mappings have to be page-aligned |
157 | */ | 76 | */ |
@@ -166,7 +85,8 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) | |||
166 | if (!area) | 85 | if (!area) |
167 | return NULL; | 86 | return NULL; |
168 | addr = area->addr; | 87 | addr = area->addr; |
169 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 88 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
89 | phys_addr, pgprot)) { | ||
170 | vunmap(addr); | 90 | vunmap(addr); |
171 | return NULL; | 91 | return NULL; |
172 | } | 92 | } |
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 70cb55b89df6..82b20c28bef8 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -43,7 +43,7 @@ obj-$(CONFIG_SGI_IP32) += fixup-ip32.o ops-mace.o pci-ip32.o | |||
43 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o | 43 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o |
44 | obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o | 44 | obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o |
45 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o | 45 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o |
46 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o | 46 | obj-$(CONFIG_SNI_RM) += fixup-sni.o ops-sni.o |
47 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o | 47 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o |
48 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o | 48 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o |
49 | obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o | 49 | obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o |
diff --git a/arch/mips/pci/fixup-pnx8550.c b/arch/mips/pci/fixup-pnx8550.c index 4256b3b30b77..50546dab6689 100644 --- a/arch/mips/pci/fixup-pnx8550.c +++ b/arch/mips/pci/fixup-pnx8550.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #define DBG(x...) | 33 | #define DBG(x...) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | extern char irq_tab_jbs[][5]; | 36 | extern char pnx8550_irq_tab[][5]; |
37 | 37 | ||
38 | void __init pcibios_fixup_resources(struct pci_dev *dev) | 38 | void __init pcibios_fixup_resources(struct pci_dev *dev) |
39 | { | 39 | { |
@@ -47,7 +47,7 @@ void __init pcibios_fixup(void) | |||
47 | 47 | ||
48 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 48 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
49 | { | 49 | { |
50 | return irq_tab_jbs[slot][pin]; | 50 | return pnx8550_irq_tab[slot][pin]; |
51 | } | 51 | } |
52 | 52 | ||
53 | /* Do platform specific device initialization at pci_enable_device() time */ | 53 | /* Do platform specific device initialization at pci_enable_device() time */ |
diff --git a/arch/mips/philips/pnx8550/common/prom.c b/arch/mips/philips/pnx8550/common/prom.c index f8952c1359cd..eb6ec11fef07 100644 --- a/arch/mips/philips/pnx8550/common/prom.c +++ b/arch/mips/philips/pnx8550/common/prom.c | |||
@@ -35,23 +35,15 @@ char * prom_getcmdline(void) | |||
35 | return &(arcs_cmdline[0]); | 35 | return &(arcs_cmdline[0]); |
36 | } | 36 | } |
37 | 37 | ||
38 | void prom_init_cmdline(void) | 38 | void __init prom_init_cmdline(void) |
39 | { | 39 | { |
40 | char *cp; | 40 | int i; |
41 | int actr; | ||
42 | |||
43 | actr = 1; /* Always ignore argv[0] */ | ||
44 | 41 | ||
45 | cp = &(arcs_cmdline[0]); | 42 | arcs_cmdline[0] = '\0'; |
46 | while(actr < prom_argc) { | 43 | for (i = 0; i < prom_argc; i++) { |
47 | strcpy(cp, prom_argv[actr]); | 44 | strcat(arcs_cmdline, prom_argv[i]); |
48 | cp += strlen(prom_argv[actr]); | 45 | strcat(arcs_cmdline, " "); |
49 | *cp++ = ' '; | ||
50 | actr++; | ||
51 | } | 46 | } |
52 | if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */ | ||
53 | --cp; | ||
54 | *cp = '\0'; | ||
55 | } | 47 | } |
56 | 48 | ||
57 | char *prom_getenv(char *envname) | 49 | char *prom_getenv(char *envname) |
diff --git a/arch/mips/philips/pnx8550/jbs/irqmap.c b/arch/mips/philips/pnx8550/jbs/irqmap.c index f78e0423dc98..98c3429e6e50 100644 --- a/arch/mips/philips/pnx8550/jbs/irqmap.c +++ b/arch/mips/philips/pnx8550/jbs/irqmap.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <int.h> | 29 | #include <int.h> |
30 | 30 | ||
31 | char irq_tab_jbs[][5] __initdata = { | 31 | char pnx8550_irq_tab[][5] __initdata = { |
32 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 32 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
33 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 33 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
34 | [17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | 34 | [17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, |
35 | }; | 35 | }; |
36 | 36 | ||
diff --git a/arch/mips/philips/pnx8550/stb810/Makefile b/arch/mips/philips/pnx8550/stb810/Makefile new file mode 100644 index 000000000000..f14b592af398 --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | # Makefile for the Philips STB810 Board. | ||
3 | |||
4 | lib-y := prom_init.o board_setup.o irqmap.o | ||
diff --git a/arch/mips/philips/pnx8550/stb810/board_setup.c b/arch/mips/philips/pnx8550/stb810/board_setup.c new file mode 100644 index 000000000000..345d71e53cf2 --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/board_setup.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * STB810 specific board startup routines. | ||
3 | * | ||
4 | * Based on the arch/mips/philips/pnx8550/jbs/board_setup.c | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * Copyright 2005 MontaVista Software Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/console.h> | ||
22 | #include <linux/mc146818rtc.h> | ||
23 | #include <linux/delay.h> | ||
24 | |||
25 | #include <asm/cpu.h> | ||
26 | #include <asm/bootinfo.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/mipsregs.h> | ||
29 | #include <asm/reboot.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | |||
32 | #include <glb.h> | ||
33 | |||
34 | void __init board_setup(void) | ||
35 | { | ||
36 | unsigned long config0, configpr; | ||
37 | |||
38 | config0 = read_c0_config(); | ||
39 | |||
40 | /* clear all three cache coherency fields */ | ||
41 | config0 &= ~(0x7 | (7<<25) | (7<<28)); | ||
42 | config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) | | ||
43 | (CONF_CM_DEFAULT<<28)); | ||
44 | write_c0_config(config0); | ||
45 | |||
46 | configpr = read_c0_config7(); | ||
47 | configpr |= (1<<19); /* enable tlb */ | ||
48 | write_c0_config7(configpr); | ||
49 | } | ||
diff --git a/arch/mips/philips/pnx8550/stb810/irqmap.c b/arch/mips/philips/pnx8550/stb810/irqmap.c new file mode 100644 index 000000000000..5ee11e19975e --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/irqmap.c | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Philips STB810 board irqmap. | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <int.h> | ||
17 | |||
18 | char pnx8550_irq_tab[][5] __initdata = { | ||
19 | [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
20 | [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
21 | [10] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, | ||
22 | }; | ||
23 | |||
diff --git a/arch/mips/philips/pnx8550/stb810/prom_init.c b/arch/mips/philips/pnx8550/stb810/prom_init.c new file mode 100644 index 000000000000..ea5b4e0fb47d --- /dev/null +++ b/arch/mips/philips/pnx8550/stb810/prom_init.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * STB810 specific prom routines | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/bootmem.h> | ||
19 | #include <asm/addrspace.h> | ||
20 | #include <asm/bootinfo.h> | ||
21 | #include <linux/string.h> | ||
22 | #include <linux/kernel.h> | ||
23 | |||
24 | int prom_argc; | ||
25 | char **prom_argv, **prom_envp; | ||
26 | extern void __init prom_init_cmdline(void); | ||
27 | extern char *prom_getenv(char *envname); | ||
28 | |||
29 | const char *get_system_type(void) | ||
30 | { | ||
31 | return "Philips PNX8550/STB810"; | ||
32 | } | ||
33 | |||
34 | void __init prom_init(void) | ||
35 | { | ||
36 | unsigned long memsize; | ||
37 | |||
38 | prom_argc = (int) fw_arg0; | ||
39 | prom_argv = (char **) fw_arg1; | ||
40 | prom_envp = (char **) fw_arg2; | ||
41 | |||
42 | prom_init_cmdline(); | ||
43 | |||
44 | mips_machgroup = MACH_GROUP_PHILIPS; | ||
45 | mips_machtype = MACH_PHILIPS_STB810; | ||
46 | |||
47 | memsize = 0x08000000; /* Trimedia uses memory above */ | ||
48 | add_memory_region(0, memsize, BOOT_MEM_RAM); | ||
49 | } | ||
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c index 5a5ea6c0b9f6..b54b529a29f9 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c | |||
@@ -158,7 +158,6 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB | |||
158 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENABLE ( 1 << 23 ) | 158 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENABLE ( 1 << 23 ) |
159 | #define TOSHIBA_RBTX4927_IRQ_ISA_DISABLE ( 1 << 24 ) | 159 | #define TOSHIBA_RBTX4927_IRQ_ISA_DISABLE ( 1 << 24 ) |
160 | #define TOSHIBA_RBTX4927_IRQ_ISA_MASK ( 1 << 25 ) | 160 | #define TOSHIBA_RBTX4927_IRQ_ISA_MASK ( 1 << 25 ) |
161 | #define TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ ( 1 << 26 ) | ||
162 | 161 | ||
163 | #define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff | 162 | #define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff |
164 | #endif | 163 | #endif |
@@ -175,7 +174,6 @@ static const u32 toshiba_rbtx4927_irq_debug_flag = | |||
175 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE | 174 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE |
176 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE | 175 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE |
177 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK | 176 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK |
178 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ | ||
179 | ); | 177 | ); |
180 | #endif | 178 | #endif |
181 | 179 | ||
@@ -226,7 +224,6 @@ static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq); | |||
226 | static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq); | 224 | static void toshiba_rbtx4927_irq_isa_enable(unsigned int irq); |
227 | static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq); | 225 | static void toshiba_rbtx4927_irq_isa_disable(unsigned int irq); |
228 | static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq); | 226 | static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq); |
229 | static void toshiba_rbtx4927_irq_isa_end(unsigned int irq); | ||
230 | #endif | 227 | #endif |
231 | 228 | ||
232 | #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" | 229 | #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" |
@@ -249,7 +246,6 @@ static struct irq_chip toshiba_rbtx4927_irq_isa_type = { | |||
249 | .mask = toshiba_rbtx4927_irq_isa_disable, | 246 | .mask = toshiba_rbtx4927_irq_isa_disable, |
250 | .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack, | 247 | .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack, |
251 | .unmask = toshiba_rbtx4927_irq_isa_enable, | 248 | .unmask = toshiba_rbtx4927_irq_isa_enable, |
252 | .end = toshiba_rbtx4927_irq_isa_end, | ||
253 | }; | 249 | }; |
254 | #endif | 250 | #endif |
255 | 251 | ||
@@ -402,7 +398,8 @@ static void __init toshiba_rbtx4927_irq_isa_init(void) | |||
402 | 398 | ||
403 | for (i = TOSHIBA_RBTX4927_IRQ_ISA_BEG; | 399 | for (i = TOSHIBA_RBTX4927_IRQ_ISA_BEG; |
404 | i <= TOSHIBA_RBTX4927_IRQ_ISA_END; i++) | 400 | i <= TOSHIBA_RBTX4927_IRQ_ISA_END; i++) |
405 | set_irq_chip(i, &toshiba_rbtx4927_irq_isa_type); | 401 | set_irq_chip_and_handler(i, &toshiba_rbtx4927_irq_isa_type, |
402 | handle_level_irq); | ||
406 | 403 | ||
407 | setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC, | 404 | setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC, |
408 | &toshiba_rbtx4927_irq_isa_master); | 405 | &toshiba_rbtx4927_irq_isa_master); |
@@ -470,26 +467,6 @@ static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq) | |||
470 | #endif | 467 | #endif |
471 | 468 | ||
472 | 469 | ||
473 | #ifdef CONFIG_TOSHIBA_FPCIB0 | ||
474 | static void toshiba_rbtx4927_irq_isa_end(unsigned int irq) | ||
475 | { | ||
476 | TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ, | ||
477 | "irq=%d\n", irq); | ||
478 | |||
479 | if (irq < TOSHIBA_RBTX4927_IRQ_ISA_BEG | ||
480 | || irq > TOSHIBA_RBTX4927_IRQ_ISA_END) { | ||
481 | TOSHIBA_RBTX4927_IRQ_DPRINTK(TOSHIBA_RBTX4927_IRQ_EROR, | ||
482 | "bad irq=%d\n", irq); | ||
483 | panic("\n"); | ||
484 | } | ||
485 | |||
486 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { | ||
487 | toshiba_rbtx4927_irq_isa_enable(irq); | ||
488 | } | ||
489 | } | ||
490 | #endif | ||
491 | |||
492 | |||
493 | void __init arch_init_irq(void) | 470 | void __init arch_init_irq(void) |
494 | { | 471 | { |
495 | extern void tx4927_irq_init(void); | 472 | extern void tx4927_irq_init(void); |
diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index c8dfd8092cab..92f41f6f934a 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig | |||
@@ -6,7 +6,6 @@ config CASIO_E55 | |||
6 | select ISA | 6 | select ISA |
7 | select SYS_SUPPORTS_32BIT_KERNEL | 7 | select SYS_SUPPORTS_32BIT_KERNEL |
8 | select SYS_SUPPORTS_LITTLE_ENDIAN | 8 | select SYS_SUPPORTS_LITTLE_ENDIAN |
9 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
10 | 9 | ||
11 | config IBM_WORKPAD | 10 | config IBM_WORKPAD |
12 | bool "Support for IBM WorkPad z50" | 11 | bool "Support for IBM WorkPad z50" |
@@ -16,7 +15,6 @@ config IBM_WORKPAD | |||
16 | select ISA | 15 | select ISA |
17 | select SYS_SUPPORTS_32BIT_KERNEL | 16 | select SYS_SUPPORTS_32BIT_KERNEL |
18 | select SYS_SUPPORTS_LITTLE_ENDIAN | 17 | select SYS_SUPPORTS_LITTLE_ENDIAN |
19 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
20 | 18 | ||
21 | config NEC_CMBVR4133 | 19 | config NEC_CMBVR4133 |
22 | bool "Support for NEC CMB-VR4133" | 20 | bool "Support for NEC CMB-VR4133" |
@@ -41,7 +39,6 @@ config TANBAC_TB022X | |||
41 | select IRQ_CPU | 39 | select IRQ_CPU |
42 | select SYS_SUPPORTS_32BIT_KERNEL | 40 | select SYS_SUPPORTS_32BIT_KERNEL |
43 | select SYS_SUPPORTS_LITTLE_ENDIAN | 41 | select SYS_SUPPORTS_LITTLE_ENDIAN |
44 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
45 | help | 42 | help |
46 | The TANBAC VR4131 multichip module(TB0225) and | 43 | The TANBAC VR4131 multichip module(TB0225) and |
47 | the TANBAC VR4131DIMM(TB0229) are MIPS-based platforms | 44 | the TANBAC VR4131DIMM(TB0229) are MIPS-based platforms |
@@ -74,7 +71,6 @@ config VICTOR_MPC30X | |||
74 | select IRQ_CPU | 71 | select IRQ_CPU |
75 | select SYS_SUPPORTS_32BIT_KERNEL | 72 | select SYS_SUPPORTS_32BIT_KERNEL |
76 | select SYS_SUPPORTS_LITTLE_ENDIAN | 73 | select SYS_SUPPORTS_LITTLE_ENDIAN |
77 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
78 | 74 | ||
79 | config ZAO_CAPCELLA | 75 | config ZAO_CAPCELLA |
80 | bool "Support for ZAO Networks Capcella" | 76 | bool "Support for ZAO Networks Capcella" |
@@ -84,7 +80,6 @@ config ZAO_CAPCELLA | |||
84 | select IRQ_CPU | 80 | select IRQ_CPU |
85 | select SYS_SUPPORTS_32BIT_KERNEL | 81 | select SYS_SUPPORTS_32BIT_KERNEL |
86 | select SYS_SUPPORTS_LITTLE_ENDIAN | 82 | select SYS_SUPPORTS_LITTLE_ENDIAN |
87 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
88 | 83 | ||
89 | config PCI_VR41XX | 84 | config PCI_VR41XX |
90 | bool "Add PCI control unit support of NEC VR4100 series" | 85 | bool "Add PCI control unit support of NEC VR4100 series" |
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c index a039bb7251ff..128ed8d6f111 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c | |||
@@ -45,19 +45,12 @@ static void ack_i8259_irq(unsigned int irq) | |||
45 | mask_and_ack_8259A(irq - I8259_IRQ_BASE); | 45 | mask_and_ack_8259A(irq - I8259_IRQ_BASE); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void end_i8259_irq(unsigned int irq) | ||
49 | { | ||
50 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
51 | enable_8259A_irq(irq - I8259_IRQ_BASE); | ||
52 | } | ||
53 | |||
54 | static struct irq_chip i8259_irq_type = { | 48 | static struct irq_chip i8259_irq_type = { |
55 | .typename = "XT-PIC", | 49 | .typename = "XT-PIC", |
56 | .ack = ack_i8259_irq, | 50 | .ack = ack_i8259_irq, |
57 | .mask = disable_i8259_irq, | 51 | .mask = disable_i8259_irq, |
58 | .mask_ack = ack_i8259_irq, | 52 | .mask_ack = ack_i8259_irq, |
59 | .unmask = enable_i8259_irq, | 53 | .unmask = enable_i8259_irq, |
60 | .end = end_i8259_irq, | ||
61 | }; | 54 | }; |
62 | 55 | ||
63 | static int i8259_get_irq_number(int irq) | 56 | static int i8259_get_irq_number(int irq) |
@@ -92,7 +85,7 @@ void __init rockhopper_init_irq(void) | |||
92 | } | 85 | } |
93 | 86 | ||
94 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) | 87 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) |
95 | set_irq_chip(i, &i8259_irq_type); | 88 | set_irq_chip_and_handler(i, &i8259_irq_type, handle_level_irq); |
96 | 89 | ||
97 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); | 90 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); |
98 | 91 | ||
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index d2101237442e..0f9ff618c6d7 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -25,6 +25,14 @@ config RWSEM_GENERIC_SPINLOCK | |||
25 | config RWSEM_XCHGADD_ALGORITHM | 25 | config RWSEM_XCHGADD_ALGORITHM |
26 | bool | 26 | bool |
27 | 27 | ||
28 | config ARCH_HAS_ILOG2_U32 | ||
29 | bool | ||
30 | default n | ||
31 | |||
32 | config ARCH_HAS_ILOG2_U64 | ||
33 | bool | ||
34 | default n | ||
35 | |||
28 | config GENERIC_FIND_NEXT_BIT | 36 | config GENERIC_FIND_NEXT_BIT |
29 | bool | 37 | bool |
30 | default y | 38 | default y |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 2e2dc4f2c853..d88309209f56 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
@@ -237,7 +237,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) | |||
237 | file = fget(fd); | 237 | file = fget(fd); |
238 | if (!file) | 238 | if (!file) |
239 | goto out; | 239 | goto out; |
240 | error = vfs_statfs_hpux(file->f_dentry, &tmp); | 240 | error = vfs_statfs_hpux(file->f_path.dentry, &tmp); |
241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) | 241 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) |
242 | error = -EFAULT; | 242 | error = -EFAULT; |
243 | fput(file); | 243 | fput(file); |
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 47a1d2ac9419..44b42c7f639d 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c | |||
@@ -9,110 +9,8 @@ | |||
9 | #include <linux/vmalloc.h> | 9 | #include <linux/vmalloc.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <asm/io.h> | 12 | #include <linux/io.h> |
13 | #include <asm/pgalloc.h> | 13 | #include <asm/pgalloc.h> |
14 | #include <asm/tlbflush.h> | ||
15 | #include <asm/cacheflush.h> | ||
16 | |||
17 | static inline void | ||
18 | remap_area_pte(pte_t *pte, unsigned long address, unsigned long size, | ||
19 | unsigned long phys_addr, unsigned long flags) | ||
20 | { | ||
21 | unsigned long end, pfn; | ||
22 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | | ||
23 | _PAGE_ACCESSED | flags); | ||
24 | |||
25 | address &= ~PMD_MASK; | ||
26 | |||
27 | end = address + size; | ||
28 | if (end > PMD_SIZE) | ||
29 | end = PMD_SIZE; | ||
30 | |||
31 | BUG_ON(address >= end); | ||
32 | |||
33 | pfn = phys_addr >> PAGE_SHIFT; | ||
34 | do { | ||
35 | BUG_ON(!pte_none(*pte)); | ||
36 | |||
37 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
38 | |||
39 | address += PAGE_SIZE; | ||
40 | pfn++; | ||
41 | pte++; | ||
42 | } while (address && (address < end)); | ||
43 | } | ||
44 | |||
45 | static inline int | ||
46 | remap_area_pmd(pmd_t *pmd, unsigned long address, unsigned long size, | ||
47 | unsigned long phys_addr, unsigned long flags) | ||
48 | { | ||
49 | unsigned long end; | ||
50 | |||
51 | address &= ~PGDIR_MASK; | ||
52 | |||
53 | end = address + size; | ||
54 | if (end > PGDIR_SIZE) | ||
55 | end = PGDIR_SIZE; | ||
56 | |||
57 | BUG_ON(address >= end); | ||
58 | |||
59 | phys_addr -= address; | ||
60 | do { | ||
61 | pte_t *pte = pte_alloc_kernel(pmd, address); | ||
62 | if (!pte) | ||
63 | return -ENOMEM; | ||
64 | |||
65 | remap_area_pte(pte, address, end - address, | ||
66 | address + phys_addr, flags); | ||
67 | |||
68 | address = (address + PMD_SIZE) & PMD_MASK; | ||
69 | pmd++; | ||
70 | } while (address && (address < end)); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static int | ||
76 | remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
77 | unsigned long size, unsigned long flags) | ||
78 | { | ||
79 | pgd_t *dir; | ||
80 | int error = 0; | ||
81 | unsigned long end = address + size; | ||
82 | |||
83 | BUG_ON(address >= end); | ||
84 | |||
85 | phys_addr -= address; | ||
86 | dir = pgd_offset_k(address); | ||
87 | |||
88 | flush_cache_all(); | ||
89 | |||
90 | do { | ||
91 | pud_t *pud; | ||
92 | pmd_t *pmd; | ||
93 | |||
94 | error = -ENOMEM; | ||
95 | pud = pud_alloc(&init_mm, dir, address); | ||
96 | if (!pud) | ||
97 | break; | ||
98 | |||
99 | pmd = pmd_alloc(&init_mm, pud, address); | ||
100 | if (!pmd) | ||
101 | break; | ||
102 | |||
103 | if (remap_area_pmd(pmd, address, end - address, | ||
104 | phys_addr + address, flags)) | ||
105 | break; | ||
106 | |||
107 | error = 0; | ||
108 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
109 | dir++; | ||
110 | } while (address && (address < end)); | ||
111 | |||
112 | flush_tlb_all(); | ||
113 | |||
114 | return error; | ||
115 | } | ||
116 | 14 | ||
117 | /* | 15 | /* |
118 | * Generic mapping function (not visible outside): | 16 | * Generic mapping function (not visible outside): |
@@ -131,6 +29,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
131 | void *addr; | 29 | void *addr; |
132 | struct vm_struct *area; | 30 | struct vm_struct *area; |
133 | unsigned long offset, last_addr; | 31 | unsigned long offset, last_addr; |
32 | pgprot_t pgprot; | ||
134 | 33 | ||
135 | #ifdef CONFIG_EISA | 34 | #ifdef CONFIG_EISA |
136 | unsigned long end = phys_addr + size - 1; | 35 | unsigned long end = phys_addr + size - 1; |
@@ -164,6 +63,9 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
164 | } | 63 | } |
165 | } | 64 | } |
166 | 65 | ||
66 | pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | | ||
67 | _PAGE_ACCESSED | flags); | ||
68 | |||
167 | /* | 69 | /* |
168 | * Mappings have to be page-aligned | 70 | * Mappings have to be page-aligned |
169 | */ | 71 | */ |
@@ -179,7 +81,8 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l | |||
179 | return NULL; | 81 | return NULL; |
180 | 82 | ||
181 | addr = area->addr; | 83 | addr = area->addr; |
182 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 84 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
85 | phys_addr, pgprot)) { | ||
183 | vfree(addr); | 86 | vfree(addr); |
184 | return NULL; | 87 | return NULL; |
185 | } | 88 | } |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 291c95ac4b31..8699dadcd096 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -41,6 +41,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
41 | bool | 41 | bool |
42 | default y | 42 | default y |
43 | 43 | ||
44 | config ARCH_HAS_ILOG2_U32 | ||
45 | bool | ||
46 | default y | ||
47 | |||
48 | config ARCH_HAS_ILOG2_U64 | ||
49 | bool | ||
50 | default y if 64BIT | ||
51 | |||
44 | config GENERIC_HWEIGHT | 52 | config GENERIC_HWEIGHT |
45 | bool | 53 | bool |
46 | default y | 54 | default y |
@@ -99,6 +107,11 @@ config AUDIT_ARCH | |||
99 | bool | 107 | bool |
100 | default y | 108 | default y |
101 | 109 | ||
110 | config GENERIC_BUG | ||
111 | bool | ||
112 | default y | ||
113 | depends on BUG | ||
114 | |||
102 | config DEFAULT_UIMAGE | 115 | config DEFAULT_UIMAGE |
103 | bool | 116 | bool |
104 | help | 117 | help |
@@ -470,6 +483,7 @@ config PPC_MAPLE | |||
470 | select PPC_UDBG_16550 | 483 | select PPC_UDBG_16550 |
471 | select PPC_970_NAP | 484 | select PPC_970_NAP |
472 | select PPC_NATIVE | 485 | select PPC_NATIVE |
486 | select PPC_RTAS | ||
473 | default n | 487 | default n |
474 | help | 488 | help |
475 | This option enables support for the Maple 970FX Evaluation Board. | 489 | This option enables support for the Maple 970FX Evaluation Board. |
@@ -706,7 +720,7 @@ config FORCE_MAX_ZONEORDER | |||
706 | 720 | ||
707 | config MATH_EMULATION | 721 | config MATH_EMULATION |
708 | bool "Math emulation" | 722 | bool "Math emulation" |
709 | depends on 4xx || 8xx || E200 || E500 | 723 | depends on 4xx || 8xx || E200 || PPC_83xx || E500 |
710 | ---help--- | 724 | ---help--- |
711 | Some PowerPC chips designed for embedded applications do not have | 725 | Some PowerPC chips designed for embedded applications do not have |
712 | a floating-point unit and therefore do not implement the | 726 | a floating-point unit and therefore do not implement the |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index f2d888e014a9..70ed61337f5c 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -157,6 +157,7 @@ CONFIG_SPU_BASE=y | |||
157 | CONFIG_PS3_HTAB_SIZE=20 | 157 | CONFIG_PS3_HTAB_SIZE=20 |
158 | CONFIG_PS3_DYNAMIC_DMA=y | 158 | CONFIG_PS3_DYNAMIC_DMA=y |
159 | CONFIG_PS3_USE_LPAR_ADDR=y | 159 | CONFIG_PS3_USE_LPAR_ADDR=y |
160 | CONFIG_PS3_VUART=y | ||
160 | 161 | ||
161 | # | 162 | # |
162 | # Kernel options | 163 | # Kernel options |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 4fe53d08ab81..d2ded19e4064 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -77,6 +77,7 @@ endif | |||
77 | 77 | ||
78 | ifeq ($(CONFIG_PPC_ISERIES),y) | 78 | ifeq ($(CONFIG_PPC_ISERIES),y) |
79 | extra-y += lparmap.s | 79 | extra-y += lparmap.s |
80 | $(obj)/head_64.o: $(obj)/lparmap.s | ||
80 | AFLAGS_head_64.o += -I$(obj) | 81 | AFLAGS_head_64.o += -I$(obj) |
81 | endif | 82 | endif |
82 | 83 | ||
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 9d1614c3ce67..b742013bb9da 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -833,7 +833,7 @@ static struct cpu_spec cpu_specs[] = { | |||
833 | .pvr_mask = 0x7fff0000, | 833 | .pvr_mask = 0x7fff0000, |
834 | .pvr_value = 0x00840000, | 834 | .pvr_value = 0x00840000, |
835 | .cpu_name = "e300c2", | 835 | .cpu_name = "e300c2", |
836 | .cpu_features = CPU_FTRS_E300, | 836 | .cpu_features = CPU_FTRS_E300C2, |
837 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | 837 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, |
838 | .icache_bsize = 32, | 838 | .icache_bsize = 32, |
839 | .dcache_bsize = 32, | 839 | .dcache_bsize = 32, |
@@ -1136,8 +1136,7 @@ static struct cpu_spec cpu_specs[] = { | |||
1136 | .pvr_mask = 0xff000fff, | 1136 | .pvr_mask = 0xff000fff, |
1137 | .pvr_value = 0x53000890, | 1137 | .pvr_value = 0x53000890, |
1138 | .cpu_name = "440SPe Rev. A", | 1138 | .cpu_name = "440SPe Rev. A", |
1139 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | 1139 | .cpu_features = CPU_FTRS_44X, |
1140 | CPU_FTR_USE_TB, | ||
1141 | .cpu_user_features = COMMON_USER_BOOKE, | 1140 | .cpu_user_features = COMMON_USER_BOOKE, |
1142 | .icache_bsize = 32, | 1141 | .icache_bsize = 32, |
1143 | .dcache_bsize = 32, | 1142 | .dcache_bsize = 32, |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index d88e182e40b3..9417cf5b4b7e 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -437,6 +437,13 @@ Alignment: | |||
437 | /* Floating-point unavailable */ | 437 | /* Floating-point unavailable */ |
438 | . = 0x800 | 438 | . = 0x800 |
439 | FPUnavailable: | 439 | FPUnavailable: |
440 | BEGIN_FTR_SECTION | ||
441 | /* | ||
442 | * Certain Freescale cores don't have a FPU and treat fp instructions | ||
443 | * as a FP Unavailable exception. Redirect to illegal/emulation handling. | ||
444 | */ | ||
445 | b ProgramCheck | ||
446 | END_FTR_SECTION_IFSET(CPU_FTR_FPU_UNAVAILABLE) | ||
440 | EXCEPTION_PROLOG | 447 | EXCEPTION_PROLOG |
441 | bne load_up_fpu /* if from user, just load it up */ | 448 | bne load_up_fpu /* if from user, just load it up */ |
442 | addi r3,r1,STACK_FRAME_OVERHEAD | 449 | addi r3,r1,STACK_FRAME_OVERHEAD |
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c index e2c3c6a85f33..8339fd609de0 100644 --- a/arch/powerpc/kernel/module_32.c +++ b/arch/powerpc/kernel/module_32.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/cache.h> | 25 | #include <linux/cache.h> |
26 | #include <linux/bug.h> | ||
26 | 27 | ||
27 | #include "setup.h" | 28 | #include "setup.h" |
28 | 29 | ||
@@ -290,23 +291,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
290 | struct module *me) | 291 | struct module *me) |
291 | { | 292 | { |
292 | const Elf_Shdr *sect; | 293 | const Elf_Shdr *sect; |
294 | int err; | ||
293 | 295 | ||
294 | me->arch.bug_table = NULL; | 296 | err = module_bug_finalize(hdr, sechdrs, me); |
295 | me->arch.num_bugs = 0; | 297 | if (err) /* never true, currently */ |
296 | 298 | return err; | |
297 | /* Find the __bug_table section, if present */ | ||
298 | sect = find_section(hdr, sechdrs, "__bug_table"); | ||
299 | if (sect != NULL) { | ||
300 | me->arch.bug_table = (void *) sect->sh_addr; | ||
301 | me->arch.num_bugs = sect->sh_size / sizeof(struct bug_entry); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * Strictly speaking this should have a spinlock to protect against | ||
306 | * traversals, but since we only traverse on BUG()s, a spinlock | ||
307 | * could potentially lead to deadlock and thus be counter-productive. | ||
308 | */ | ||
309 | list_add(&me->arch.bug_list, &module_bug_list); | ||
310 | 299 | ||
311 | /* Apply feature fixups */ | 300 | /* Apply feature fixups */ |
312 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); | 301 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); |
@@ -320,7 +309,7 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
320 | 309 | ||
321 | void module_arch_cleanup(struct module *mod) | 310 | void module_arch_cleanup(struct module *mod) |
322 | { | 311 | { |
323 | list_del(&mod->arch.bug_list); | 312 | module_bug_cleanup(mod); |
324 | } | 313 | } |
325 | 314 | ||
326 | struct bug_entry *module_find_bug(unsigned long bugaddr) | 315 | struct bug_entry *module_find_bug(unsigned long bugaddr) |
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index 8dd1f0aae5d6..75c7c4f19280 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/moduleloader.h> | 20 | #include <linux/moduleloader.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/bug.h> | ||
23 | #include <asm/module.h> | 24 | #include <asm/module.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/firmware.h> | 26 | #include <asm/firmware.h> |
@@ -439,23 +440,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
439 | const Elf_Shdr *sechdrs, struct module *me) | 440 | const Elf_Shdr *sechdrs, struct module *me) |
440 | { | 441 | { |
441 | const Elf_Shdr *sect; | 442 | const Elf_Shdr *sect; |
443 | int err; | ||
442 | 444 | ||
443 | me->arch.bug_table = NULL; | 445 | err = module_bug_finalize(hdr, sechdrs, me); |
444 | me->arch.num_bugs = 0; | 446 | if (err) |
445 | 447 | return err; | |
446 | /* Find the __bug_table section, if present */ | ||
447 | sect = find_section(hdr, sechdrs, "__bug_table"); | ||
448 | if (sect != NULL) { | ||
449 | me->arch.bug_table = (void *) sect->sh_addr; | ||
450 | me->arch.num_bugs = sect->sh_size / sizeof(struct bug_entry); | ||
451 | } | ||
452 | |||
453 | /* | ||
454 | * Strictly speaking this should have a spinlock to protect against | ||
455 | * traversals, but since we only traverse on BUG()s, a spinlock | ||
456 | * could potentially lead to deadlock and thus be counter-productive. | ||
457 | */ | ||
458 | list_add(&me->arch.bug_list, &module_bug_list); | ||
459 | 448 | ||
460 | /* Apply feature fixups */ | 449 | /* Apply feature fixups */ |
461 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); | 450 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); |
@@ -475,7 +464,7 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
475 | 464 | ||
476 | void module_arch_cleanup(struct module *mod) | 465 | void module_arch_cleanup(struct module *mod) |
477 | { | 466 | { |
478 | list_del(&mod->arch.bug_list); | 467 | module_bug_cleanup(mod); |
479 | } | 468 | } |
480 | 469 | ||
481 | struct bug_entry *module_find_bug(unsigned long bugaddr) | 470 | struct bug_entry *module_find_bug(unsigned long bugaddr) |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 8a06724e029e..e921514e655b 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -109,9 +109,7 @@ int of_device_register(struct of_device *ofdev) | |||
109 | if (rc) | 109 | if (rc) |
110 | return rc; | 110 | return rc; |
111 | 111 | ||
112 | device_create_file(&ofdev->dev, &dev_attr_devspec); | 112 | return device_create_file(&ofdev->dev, &dev_attr_devspec); |
113 | |||
114 | return 0; | ||
115 | } | 113 | } |
116 | 114 | ||
117 | void of_device_unregister(struct of_device *ofdev) | 115 | void of_device_unregister(struct of_device *ofdev) |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index b3189d0161b8..3002ea3a61a2 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -169,7 +169,7 @@ static void of_platform_make_bus_id(struct of_device *dev) | |||
169 | char *name = dev->dev.bus_id; | 169 | char *name = dev->dev.bus_id; |
170 | const u32 *reg; | 170 | const u32 *reg; |
171 | u64 addr; | 171 | u64 addr; |
172 | long magic; | 172 | int magic; |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * If it's a DCR based device, use 'd' for native DCRs | 175 | * If it's a DCR based device, use 'd' for native DCRs |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 2f54cd81dea5..8336deafc624 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -736,25 +736,51 @@ scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void* | |||
736 | return NULL; | 736 | return NULL; |
737 | } | 737 | } |
738 | 738 | ||
739 | static int | 739 | static struct device_node *scan_OF_for_pci_dev(struct device_node *parent, |
740 | scan_OF_pci_childs_iterator(struct device_node* node, void* data) | 740 | unsigned int devfn) |
741 | { | 741 | { |
742 | const unsigned int *reg; | 742 | struct device_node *np = NULL; |
743 | u8* fdata = (u8*)data; | 743 | const u32 *reg; |
744 | 744 | unsigned int psize; | |
745 | reg = get_property(node, "reg", NULL); | 745 | |
746 | if (reg && ((reg[0] >> 8) & 0xff) == fdata[1] | 746 | while ((np = of_get_next_child(parent, np)) != NULL) { |
747 | && ((reg[0] >> 16) & 0xff) == fdata[0]) | 747 | reg = get_property(np, "reg", &psize); |
748 | return 1; | 748 | if (reg == NULL || psize < 4) |
749 | return 0; | 749 | continue; |
750 | if (((reg[0] >> 8) & 0xff) == devfn) | ||
751 | return np; | ||
752 | } | ||
753 | return NULL; | ||
750 | } | 754 | } |
751 | 755 | ||
752 | static struct device_node* | 756 | |
753 | scan_OF_childs_for_device(struct device_node* node, u8 bus, u8 dev_fn) | 757 | static struct device_node *scan_OF_for_pci_bus(struct pci_bus *bus) |
754 | { | 758 | { |
755 | u8 filter_data[2] = {bus, dev_fn}; | 759 | struct device_node *parent, *np; |
760 | |||
761 | /* Are we a root bus ? */ | ||
762 | if (bus->self == NULL || bus->parent == NULL) { | ||
763 | struct pci_controller *hose = pci_bus_to_hose(bus->number); | ||
764 | if (hose == NULL) | ||
765 | return NULL; | ||
766 | return of_node_get(hose->arch_data); | ||
767 | } | ||
768 | |||
769 | /* not a root bus, we need to get our parent */ | ||
770 | parent = scan_OF_for_pci_bus(bus->parent); | ||
771 | if (parent == NULL) | ||
772 | return NULL; | ||
773 | |||
774 | /* now iterate for children for a match */ | ||
775 | np = scan_OF_for_pci_dev(parent, bus->self->devfn); | ||
776 | of_node_put(parent); | ||
756 | 777 | ||
757 | return scan_OF_pci_childs(node, scan_OF_pci_childs_iterator, filter_data); | 778 | /* sanity check */ |
779 | if (strcmp(np->type, "pci") != 0) | ||
780 | printk(KERN_WARNING "pci: wrong type \"%s\" for bridge %s\n", | ||
781 | np->type, np->full_name); | ||
782 | |||
783 | return np; | ||
758 | } | 784 | } |
759 | 785 | ||
760 | /* | 786 | /* |
@@ -763,43 +789,25 @@ scan_OF_childs_for_device(struct device_node* node, u8 bus, u8 dev_fn) | |||
763 | struct device_node * | 789 | struct device_node * |
764 | pci_busdev_to_OF_node(struct pci_bus *bus, int devfn) | 790 | pci_busdev_to_OF_node(struct pci_bus *bus, int devfn) |
765 | { | 791 | { |
766 | struct pci_controller *hose; | 792 | struct device_node *parent, *np; |
767 | struct device_node *node; | ||
768 | int busnr; | ||
769 | 793 | ||
770 | if (!have_of) | 794 | if (!have_of) |
771 | return NULL; | 795 | return NULL; |
772 | |||
773 | /* Lookup the hose */ | ||
774 | busnr = bus->number; | ||
775 | hose = pci_bus_to_hose(busnr); | ||
776 | if (!hose) | ||
777 | return NULL; | ||
778 | 796 | ||
779 | /* Check it has an OF node associated */ | 797 | DBG("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn); |
780 | node = (struct device_node *) hose->arch_data; | 798 | parent = scan_OF_for_pci_bus(bus); |
781 | if (!node) | 799 | if (parent == NULL) |
782 | return NULL; | 800 | return NULL; |
783 | 801 | DBG(" parent is %s\n", parent ? parent->full_name : "<NULL>"); | |
784 | /* Fixup bus number according to what OF think it is. */ | 802 | np = scan_OF_for_pci_dev(parent, devfn); |
785 | #ifdef CONFIG_PPC_PMAC | 803 | of_node_put(parent); |
786 | /* The G5 need a special case here. Basically, we don't remap all | 804 | DBG(" result is %s\n", np ? np->full_name : "<NULL>"); |
787 | * busses on it so we don't create the pci-OF-map. However, we do | 805 | |
788 | * remap the AGP bus and so have to deal with it. A future better | 806 | /* XXX most callers don't release the returned node |
789 | * fix has to be done by making the remapping per-host and always | 807 | * mostly because ppc64 doesn't increase the refcount, |
790 | * filling the pci_to_OF map. --BenH | 808 | * we need to fix that. |
791 | */ | 809 | */ |
792 | if (machine_is(powermac) && busnr >= 0xf0) | 810 | return np; |
793 | busnr -= 0xf0; | ||
794 | else | ||
795 | #endif | ||
796 | if (pci_to_OF_bus_map) | ||
797 | busnr = pci_to_OF_bus_map[busnr]; | ||
798 | if (busnr == 0xff) | ||
799 | return NULL; | ||
800 | |||
801 | /* Now, lookup childs of the hose */ | ||
802 | return scan_OF_childs_for_device(node->child, busnr, devfn); | ||
803 | } | 811 | } |
804 | EXPORT_SYMBOL(pci_busdev_to_OF_node); | 812 | EXPORT_SYMBOL(pci_busdev_to_OF_node); |
805 | 813 | ||
@@ -1544,7 +1552,7 @@ pci_resource_to_bus(struct pci_dev *pdev, struct resource *res) | |||
1544 | 1552 | ||
1545 | 1553 | ||
1546 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | 1554 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, |
1547 | unsigned long *offset, | 1555 | resource_size_t *offset, |
1548 | enum pci_mmap_state mmap_state) | 1556 | enum pci_mmap_state mmap_state) |
1549 | { | 1557 | { |
1550 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 1558 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
@@ -1556,7 +1564,9 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | |||
1556 | 1564 | ||
1557 | /* If memory, add on the PCI bridge address offset */ | 1565 | /* If memory, add on the PCI bridge address offset */ |
1558 | if (mmap_state == pci_mmap_mem) { | 1566 | if (mmap_state == pci_mmap_mem) { |
1567 | #if 0 /* See comment in pci_resource_to_user() for why this is disabled */ | ||
1559 | *offset += hose->pci_mem_offset; | 1568 | *offset += hose->pci_mem_offset; |
1569 | #endif | ||
1560 | res_bit = IORESOURCE_MEM; | 1570 | res_bit = IORESOURCE_MEM; |
1561 | } else { | 1571 | } else { |
1562 | io_offset = hose->io_base_virt - (void __iomem *)_IO_BASE; | 1572 | io_offset = hose->io_base_virt - (void __iomem *)_IO_BASE; |
@@ -1624,9 +1634,6 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, | |||
1624 | else | 1634 | else |
1625 | prot |= _PAGE_GUARDED; | 1635 | prot |= _PAGE_GUARDED; |
1626 | 1636 | ||
1627 | printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev), | ||
1628 | (unsigned long long)rp->start, prot); | ||
1629 | |||
1630 | return __pgprot(prot); | 1637 | return __pgprot(prot); |
1631 | } | 1638 | } |
1632 | 1639 | ||
@@ -1695,7 +1702,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
1695 | enum pci_mmap_state mmap_state, | 1702 | enum pci_mmap_state mmap_state, |
1696 | int write_combine) | 1703 | int write_combine) |
1697 | { | 1704 | { |
1698 | unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; | 1705 | resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT; |
1699 | struct resource *rp; | 1706 | struct resource *rp; |
1700 | int ret; | 1707 | int ret; |
1701 | 1708 | ||
@@ -1808,22 +1815,42 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
1808 | resource_size_t *start, resource_size_t *end) | 1815 | resource_size_t *start, resource_size_t *end) |
1809 | { | 1816 | { |
1810 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 1817 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
1811 | unsigned long offset = 0; | 1818 | resource_size_t offset = 0; |
1812 | 1819 | ||
1813 | if (hose == NULL) | 1820 | if (hose == NULL) |
1814 | return; | 1821 | return; |
1815 | 1822 | ||
1816 | if (rsrc->flags & IORESOURCE_IO) | 1823 | if (rsrc->flags & IORESOURCE_IO) |
1817 | offset = (void __iomem *)_IO_BASE - hose->io_base_virt | 1824 | offset = (unsigned long)hose->io_base_virt - _IO_BASE; |
1818 | + hose->io_base_phys; | 1825 | |
1826 | /* We pass a fully fixed up address to userland for MMIO instead of | ||
1827 | * a BAR value because X is lame and expects to be able to use that | ||
1828 | * to pass to /dev/mem ! | ||
1829 | * | ||
1830 | * That means that we'll have potentially 64 bits values where some | ||
1831 | * userland apps only expect 32 (like X itself since it thinks only | ||
1832 | * Sparc has 64 bits MMIO) but if we don't do that, we break it on | ||
1833 | * 32 bits CHRPs :-( | ||
1834 | * | ||
1835 | * Hopefully, the sysfs insterface is immune to that gunk. Once X | ||
1836 | * has been fixed (and the fix spread enough), we can re-enable the | ||
1837 | * 2 lines below and pass down a BAR value to userland. In that case | ||
1838 | * we'll also have to re-enable the matching code in | ||
1839 | * __pci_mmap_make_offset(). | ||
1840 | * | ||
1841 | * BenH. | ||
1842 | */ | ||
1843 | #if 0 | ||
1844 | else if (rsrc->flags & IORESOURCE_MEM) | ||
1845 | offset = hose->pci_mem_offset; | ||
1846 | #endif | ||
1819 | 1847 | ||
1820 | *start = rsrc->start + offset; | 1848 | *start = rsrc->start - offset; |
1821 | *end = rsrc->end + offset; | 1849 | *end = rsrc->end - offset; |
1822 | } | 1850 | } |
1823 | 1851 | ||
1824 | void __init | 1852 | void __init pci_init_resource(struct resource *res, resource_size_t start, |
1825 | pci_init_resource(struct resource *res, unsigned long start, unsigned long end, | 1853 | resource_size_t end, int flags, char *name) |
1826 | int flags, char *name) | ||
1827 | { | 1854 | { |
1828 | res->start = start; | 1855 | res->start = start; |
1829 | res->end = end; | 1856 | res->end = end; |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 6fa9a0a5c8db..a6b7692c7269 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -682,7 +682,7 @@ int pci_proc_domain(struct pci_bus *bus) | |||
682 | * Returns negative error code on failure, zero on success. | 682 | * Returns negative error code on failure, zero on success. |
683 | */ | 683 | */ |
684 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | 684 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, |
685 | unsigned long *offset, | 685 | resource_size_t *offset, |
686 | enum pci_mmap_state mmap_state) | 686 | enum pci_mmap_state mmap_state) |
687 | { | 687 | { |
688 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 688 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
@@ -694,7 +694,9 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | |||
694 | 694 | ||
695 | /* If memory, add on the PCI bridge address offset */ | 695 | /* If memory, add on the PCI bridge address offset */ |
696 | if (mmap_state == pci_mmap_mem) { | 696 | if (mmap_state == pci_mmap_mem) { |
697 | #if 0 /* See comment in pci_resource_to_user() for why this is disabled */ | ||
697 | *offset += hose->pci_mem_offset; | 698 | *offset += hose->pci_mem_offset; |
699 | #endif | ||
698 | res_bit = IORESOURCE_MEM; | 700 | res_bit = IORESOURCE_MEM; |
699 | } else { | 701 | } else { |
700 | io_offset = (unsigned long)hose->io_base_virt - pci_io_base; | 702 | io_offset = (unsigned long)hose->io_base_virt - pci_io_base; |
@@ -762,9 +764,6 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, | |||
762 | else | 764 | else |
763 | prot |= _PAGE_GUARDED; | 765 | prot |= _PAGE_GUARDED; |
764 | 766 | ||
765 | printk(KERN_DEBUG "PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, | ||
766 | prot); | ||
767 | |||
768 | return __pgprot(prot); | 767 | return __pgprot(prot); |
769 | } | 768 | } |
770 | 769 | ||
@@ -832,7 +831,7 @@ pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
832 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 831 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
833 | enum pci_mmap_state mmap_state, int write_combine) | 832 | enum pci_mmap_state mmap_state, int write_combine) |
834 | { | 833 | { |
835 | unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; | 834 | resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT; |
836 | struct resource *rp; | 835 | struct resource *rp; |
837 | int ret; | 836 | int ret; |
838 | 837 | ||
@@ -1333,20 +1332,41 @@ EXPORT_SYMBOL(pci_read_irq_line); | |||
1333 | 1332 | ||
1334 | void pci_resource_to_user(const struct pci_dev *dev, int bar, | 1333 | void pci_resource_to_user(const struct pci_dev *dev, int bar, |
1335 | const struct resource *rsrc, | 1334 | const struct resource *rsrc, |
1336 | u64 *start, u64 *end) | 1335 | resource_size_t *start, resource_size_t *end) |
1337 | { | 1336 | { |
1338 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 1337 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
1339 | unsigned long offset = 0; | 1338 | resource_size_t offset = 0; |
1340 | 1339 | ||
1341 | if (hose == NULL) | 1340 | if (hose == NULL) |
1342 | return; | 1341 | return; |
1343 | 1342 | ||
1344 | if (rsrc->flags & IORESOURCE_IO) | 1343 | if (rsrc->flags & IORESOURCE_IO) |
1345 | offset = pci_io_base - (unsigned long)hose->io_base_virt + | 1344 | offset = (unsigned long)hose->io_base_virt - pci_io_base; |
1346 | hose->io_base_phys; | 1345 | |
1346 | /* We pass a fully fixed up address to userland for MMIO instead of | ||
1347 | * a BAR value because X is lame and expects to be able to use that | ||
1348 | * to pass to /dev/mem ! | ||
1349 | * | ||
1350 | * That means that we'll have potentially 64 bits values where some | ||
1351 | * userland apps only expect 32 (like X itself since it thinks only | ||
1352 | * Sparc has 64 bits MMIO) but if we don't do that, we break it on | ||
1353 | * 32 bits CHRPs :-( | ||
1354 | * | ||
1355 | * Hopefully, the sysfs insterface is immune to that gunk. Once X | ||
1356 | * has been fixed (and the fix spread enough), we can re-enable the | ||
1357 | * 2 lines below and pass down a BAR value to userland. In that case | ||
1358 | * we'll also have to re-enable the matching code in | ||
1359 | * __pci_mmap_make_offset(). | ||
1360 | * | ||
1361 | * BenH. | ||
1362 | */ | ||
1363 | #if 0 | ||
1364 | else if (rsrc->flags & IORESOURCE_MEM) | ||
1365 | offset = hose->pci_mem_offset; | ||
1366 | #endif | ||
1347 | 1367 | ||
1348 | *start = rsrc->start + offset; | 1368 | *start = rsrc->start - offset; |
1349 | *end = rsrc->end + offset; | 1369 | *end = rsrc->end - offset; |
1350 | } | 1370 | } |
1351 | 1371 | ||
1352 | struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node) | 1372 | struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node) |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 9179f0739ea2..95776b6af4e2 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -208,7 +208,7 @@ EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */ | |||
208 | extern long *intercept_table; | 208 | extern long *intercept_table; |
209 | EXPORT_SYMBOL(intercept_table); | 209 | EXPORT_SYMBOL(intercept_table); |
210 | #endif /* CONFIG_PPC_STD_MMU_32 */ | 210 | #endif /* CONFIG_PPC_STD_MMU_32 */ |
211 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 211 | #ifdef CONFIG_PPC_DCR_NATIVE |
212 | EXPORT_SYMBOL(__mtdcr); | 212 | EXPORT_SYMBOL(__mtdcr); |
213 | EXPORT_SYMBOL(__mfdcr); | 213 | EXPORT_SYMBOL(__mfdcr); |
214 | #endif | 214 | #endif |
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index f598cb519539..dd7001cacf75 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c | |||
@@ -83,7 +83,7 @@ __initcall(proc_ppc64_init); | |||
83 | static loff_t page_map_seek( struct file *file, loff_t off, int whence) | 83 | static loff_t page_map_seek( struct file *file, loff_t off, int whence) |
84 | { | 84 | { |
85 | loff_t new; | 85 | loff_t new; |
86 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 86 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
87 | 87 | ||
88 | switch(whence) { | 88 | switch(whence) { |
89 | case 0: | 89 | case 0: |
@@ -106,13 +106,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence) | |||
106 | static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, | 106 | static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, |
107 | loff_t *ppos) | 107 | loff_t *ppos) |
108 | { | 108 | { |
109 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 109 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
110 | return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); | 110 | return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); |
111 | } | 111 | } |
112 | 112 | ||
113 | static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) | 113 | static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) |
114 | { | 114 | { |
115 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 115 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
116 | 116 | ||
117 | if ((vma->vm_end - vma->vm_start) > dp->size) | 117 | if ((vma->vm_end - vma->vm_start) > dp->size) |
118 | return -EINVAL; | 118 | return -EINVAL; |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index c18dbe77fdc2..1fc732a552db 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -804,6 +804,56 @@ static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp) | |||
804 | return of_read_ulong(p, s); | 804 | return of_read_ulong(p, s); |
805 | } | 805 | } |
806 | 806 | ||
807 | #ifdef CONFIG_PPC_PSERIES | ||
808 | /* | ||
809 | * Interpret the ibm,dynamic-memory property in the | ||
810 | * /ibm,dynamic-reconfiguration-memory node. | ||
811 | * This contains a list of memory blocks along with NUMA affinity | ||
812 | * information. | ||
813 | */ | ||
814 | static int __init early_init_dt_scan_drconf_memory(unsigned long node) | ||
815 | { | ||
816 | cell_t *dm, *ls; | ||
817 | unsigned long l, n; | ||
818 | unsigned long base, size, lmb_size, flags; | ||
819 | |||
820 | ls = (cell_t *)of_get_flat_dt_prop(node, "ibm,lmb-size", &l); | ||
821 | if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t)) | ||
822 | return 0; | ||
823 | lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls); | ||
824 | |||
825 | dm = (cell_t *)of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l); | ||
826 | if (dm == NULL || l < sizeof(cell_t)) | ||
827 | return 0; | ||
828 | |||
829 | n = *dm++; /* number of entries */ | ||
830 | if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(cell_t)) | ||
831 | return 0; | ||
832 | |||
833 | for (; n != 0; --n) { | ||
834 | base = dt_mem_next_cell(dt_root_addr_cells, &dm); | ||
835 | flags = dm[3]; | ||
836 | /* skip DRC index, pad, assoc. list index, flags */ | ||
837 | dm += 4; | ||
838 | /* skip this block if the reserved bit is set in flags (0x80) | ||
839 | or if the block is not assigned to this partition (0x8) */ | ||
840 | if ((flags & 0x80) || !(flags & 0x8)) | ||
841 | continue; | ||
842 | size = lmb_size; | ||
843 | if (iommu_is_off) { | ||
844 | if (base >= 0x80000000ul) | ||
845 | continue; | ||
846 | if ((base + size) > 0x80000000ul) | ||
847 | size = 0x80000000ul - base; | ||
848 | } | ||
849 | lmb_add(base, size); | ||
850 | } | ||
851 | lmb_dump_all(); | ||
852 | return 0; | ||
853 | } | ||
854 | #else | ||
855 | #define early_init_dt_scan_drconf_memory(node) 0 | ||
856 | #endif /* CONFIG_PPC_PSERIES */ | ||
807 | 857 | ||
808 | static int __init early_init_dt_scan_memory(unsigned long node, | 858 | static int __init early_init_dt_scan_memory(unsigned long node, |
809 | const char *uname, int depth, void *data) | 859 | const char *uname, int depth, void *data) |
@@ -812,6 +862,11 @@ static int __init early_init_dt_scan_memory(unsigned long node, | |||
812 | cell_t *reg, *endp; | 862 | cell_t *reg, *endp; |
813 | unsigned long l; | 863 | unsigned long l; |
814 | 864 | ||
865 | /* Look for the ibm,dynamic-reconfiguration-memory node */ | ||
866 | if (depth == 1 && | ||
867 | strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0) | ||
868 | return early_init_dt_scan_drconf_memory(node); | ||
869 | |||
815 | /* We are scanning "memory" nodes only */ | 870 | /* We are scanning "memory" nodes only */ |
816 | if (type == NULL) { | 871 | if (type == NULL) { |
817 | /* | 872 | /* |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 46cf32670ddb..520ef42f642e 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -679,7 +679,7 @@ static unsigned char ibm_architecture_vec[] = { | |||
679 | /* option vector 5: PAPR/OF options */ | 679 | /* option vector 5: PAPR/OF options */ |
680 | 3 - 2, /* length */ | 680 | 3 - 2, /* length */ |
681 | 0, /* don't ignore, don't halt */ | 681 | 0, /* don't ignore, don't halt */ |
682 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, | 682 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY, |
683 | }; | 683 | }; |
684 | 684 | ||
685 | /* Old method - ELF header with PT_NOTE sections */ | 685 | /* Old method - ELF header with PT_NOTE sections */ |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 387ed0d9ad61..76b5d7ebdcc6 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -303,6 +303,12 @@ int rtas_token(const char *service) | |||
303 | } | 303 | } |
304 | EXPORT_SYMBOL(rtas_token); | 304 | EXPORT_SYMBOL(rtas_token); |
305 | 305 | ||
306 | int rtas_service_present(const char *service) | ||
307 | { | ||
308 | return rtas_token(service) != RTAS_UNKNOWN_SERVICE; | ||
309 | } | ||
310 | EXPORT_SYMBOL(rtas_service_present); | ||
311 | |||
306 | #ifdef CONFIG_RTAS_ERROR_LOGGING | 312 | #ifdef CONFIG_RTAS_ERROR_LOGGING |
307 | /* | 313 | /* |
308 | * Return the firmware-specified size of the error log buffer | 314 | * Return the firmware-specified size of the error log buffer |
@@ -810,32 +816,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
810 | return 0; | 816 | return 0; |
811 | } | 817 | } |
812 | 818 | ||
813 | #ifdef CONFIG_HOTPLUG_CPU | ||
814 | /* This version can't take the spinlock, because it never returns */ | ||
815 | static struct rtas_args rtas_stop_self_args = { | ||
816 | /* The token is initialized for real in setup_system() */ | ||
817 | .token = RTAS_UNKNOWN_SERVICE, | ||
818 | .nargs = 0, | ||
819 | .nret = 1, | ||
820 | .rets = &rtas_stop_self_args.args[0], | ||
821 | }; | ||
822 | |||
823 | void rtas_stop_self(void) | ||
824 | { | ||
825 | struct rtas_args *rtas_args = &rtas_stop_self_args; | ||
826 | |||
827 | local_irq_disable(); | ||
828 | |||
829 | BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE); | ||
830 | |||
831 | printk("cpu %u (hwid %u) Ready to die...\n", | ||
832 | smp_processor_id(), hard_smp_processor_id()); | ||
833 | enter_rtas(__pa(rtas_args)); | ||
834 | |||
835 | panic("Alas, I survived.\n"); | ||
836 | } | ||
837 | #endif | ||
838 | |||
839 | /* | 819 | /* |
840 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS | 820 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS |
841 | * informations from the device-tree and allocate the RMO buffer for userland | 821 | * informations from the device-tree and allocate the RMO buffer for userland |
@@ -880,9 +860,6 @@ void __init rtas_initialize(void) | |||
880 | #endif | 860 | #endif |
881 | rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region); | 861 | rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region); |
882 | 862 | ||
883 | #ifdef CONFIG_HOTPLUG_CPU | ||
884 | rtas_stop_self_args.token = rtas_token("stop-self"); | ||
885 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
886 | #ifdef CONFIG_RTAS_ERROR_LOGGING | 863 | #ifdef CONFIG_RTAS_ERROR_LOGGING |
887 | rtas_last_error_token = rtas_token("rtas-last-error"); | 864 | rtas_last_error_token = rtas_token("rtas-last-error"); |
888 | #endif | 865 | #endif |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 7d0f13fecc0e..0c4fcd34bfe5 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -193,7 +193,7 @@ static void free_flash_list(struct flash_block_list *f) | |||
193 | 193 | ||
194 | static int rtas_flash_release(struct inode *inode, struct file *file) | 194 | static int rtas_flash_release(struct inode *inode, struct file *file) |
195 | { | 195 | { |
196 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 196 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
197 | struct rtas_update_flash_t *uf; | 197 | struct rtas_update_flash_t *uf; |
198 | 198 | ||
199 | uf = (struct rtas_update_flash_t *) dp->data; | 199 | uf = (struct rtas_update_flash_t *) dp->data; |
@@ -255,7 +255,7 @@ static void get_flash_status_msg(int status, char *buf) | |||
255 | static ssize_t rtas_flash_read(struct file *file, char __user *buf, | 255 | static ssize_t rtas_flash_read(struct file *file, char __user *buf, |
256 | size_t count, loff_t *ppos) | 256 | size_t count, loff_t *ppos) |
257 | { | 257 | { |
258 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 258 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
259 | struct rtas_update_flash_t *uf; | 259 | struct rtas_update_flash_t *uf; |
260 | char msg[RTAS_MSG_MAXLEN]; | 260 | char msg[RTAS_MSG_MAXLEN]; |
261 | int msglen; | 261 | int msglen; |
@@ -299,7 +299,7 @@ void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags) | |||
299 | static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, | 299 | static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, |
300 | size_t count, loff_t *off) | 300 | size_t count, loff_t *off) |
301 | { | 301 | { |
302 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 302 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
303 | struct rtas_update_flash_t *uf; | 303 | struct rtas_update_flash_t *uf; |
304 | char *p; | 304 | char *p; |
305 | int next_free; | 305 | int next_free; |
@@ -391,7 +391,7 @@ static void manage_flash(struct rtas_manage_flash_t *args_buf) | |||
391 | static ssize_t manage_flash_read(struct file *file, char __user *buf, | 391 | static ssize_t manage_flash_read(struct file *file, char __user *buf, |
392 | size_t count, loff_t *ppos) | 392 | size_t count, loff_t *ppos) |
393 | { | 393 | { |
394 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 394 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
395 | struct rtas_manage_flash_t *args_buf; | 395 | struct rtas_manage_flash_t *args_buf; |
396 | char msg[RTAS_MSG_MAXLEN]; | 396 | char msg[RTAS_MSG_MAXLEN]; |
397 | int msglen; | 397 | int msglen; |
@@ -421,7 +421,7 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf, | |||
421 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, | 421 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, |
422 | size_t count, loff_t *off) | 422 | size_t count, loff_t *off) |
423 | { | 423 | { |
424 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 424 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
425 | struct rtas_manage_flash_t *args_buf; | 425 | struct rtas_manage_flash_t *args_buf; |
426 | const char reject_str[] = "0"; | 426 | const char reject_str[] = "0"; |
427 | const char commit_str[] = "1"; | 427 | const char commit_str[] = "1"; |
@@ -492,7 +492,7 @@ static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, | |||
492 | static ssize_t validate_flash_read(struct file *file, char __user *buf, | 492 | static ssize_t validate_flash_read(struct file *file, char __user *buf, |
493 | size_t count, loff_t *ppos) | 493 | size_t count, loff_t *ppos) |
494 | { | 494 | { |
495 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 495 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
496 | struct rtas_validate_flash_t *args_buf; | 496 | struct rtas_validate_flash_t *args_buf; |
497 | char msg[RTAS_MSG_MAXLEN]; | 497 | char msg[RTAS_MSG_MAXLEN]; |
498 | int msglen; | 498 | int msglen; |
@@ -520,7 +520,7 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf, | |||
520 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, | 520 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, |
521 | size_t count, loff_t *off) | 521 | size_t count, loff_t *off) |
522 | { | 522 | { |
523 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 523 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
524 | struct rtas_validate_flash_t *args_buf; | 524 | struct rtas_validate_flash_t *args_buf; |
525 | int rc; | 525 | int rc; |
526 | 526 | ||
@@ -569,7 +569,7 @@ done: | |||
569 | 569 | ||
570 | static int validate_flash_release(struct inode *inode, struct file *file) | 570 | static int validate_flash_release(struct inode *inode, struct file *file) |
571 | { | 571 | { |
572 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 572 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
573 | struct rtas_validate_flash_t *args_buf; | 573 | struct rtas_validate_flash_t *args_buf; |
574 | 574 | ||
575 | args_buf = (struct rtas_validate_flash_t *) dp->data; | 575 | args_buf = (struct rtas_validate_flash_t *) dp->data; |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 63ed265b7f09..400ab2b946e7 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -181,6 +181,8 @@ SYSFS_PMCSETUP(pmc6, SPRN_PMC6); | |||
181 | SYSFS_PMCSETUP(pmc7, SPRN_PMC7); | 181 | SYSFS_PMCSETUP(pmc7, SPRN_PMC7); |
182 | SYSFS_PMCSETUP(pmc8, SPRN_PMC8); | 182 | SYSFS_PMCSETUP(pmc8, SPRN_PMC8); |
183 | SYSFS_PMCSETUP(purr, SPRN_PURR); | 183 | SYSFS_PMCSETUP(purr, SPRN_PURR); |
184 | SYSFS_PMCSETUP(spurr, SPRN_SPURR); | ||
185 | SYSFS_PMCSETUP(dscr, SPRN_DSCR); | ||
184 | 186 | ||
185 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); | 187 | static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); |
186 | static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); | 188 | static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); |
@@ -194,6 +196,8 @@ static SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6); | |||
194 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); | 196 | static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7); |
195 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); | 197 | static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8); |
196 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); | 198 | static SYSDEV_ATTR(purr, 0600, show_purr, NULL); |
199 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); | ||
200 | static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); | ||
197 | 201 | ||
198 | static void register_cpu_online(unsigned int cpu) | 202 | static void register_cpu_online(unsigned int cpu) |
199 | { | 203 | { |
@@ -231,6 +235,12 @@ static void register_cpu_online(unsigned int cpu) | |||
231 | 235 | ||
232 | if (cpu_has_feature(CPU_FTR_PURR)) | 236 | if (cpu_has_feature(CPU_FTR_PURR)) |
233 | sysdev_create_file(s, &attr_purr); | 237 | sysdev_create_file(s, &attr_purr); |
238 | |||
239 | if (cpu_has_feature(CPU_FTR_SPURR)) | ||
240 | sysdev_create_file(s, &attr_spurr); | ||
241 | |||
242 | if (cpu_has_feature(CPU_FTR_DSCR)) | ||
243 | sysdev_create_file(s, &attr_dscr); | ||
234 | } | 244 | } |
235 | 245 | ||
236 | #ifdef CONFIG_HOTPLUG_CPU | 246 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -272,6 +282,12 @@ static void unregister_cpu_online(unsigned int cpu) | |||
272 | 282 | ||
273 | if (cpu_has_feature(CPU_FTR_PURR)) | 283 | if (cpu_has_feature(CPU_FTR_PURR)) |
274 | sysdev_remove_file(s, &attr_purr); | 284 | sysdev_remove_file(s, &attr_purr); |
285 | |||
286 | if (cpu_has_feature(CPU_FTR_SPURR)) | ||
287 | sysdev_remove_file(s, &attr_spurr); | ||
288 | |||
289 | if (cpu_has_feature(CPU_FTR_DSCR)) | ||
290 | sysdev_remove_file(s, &attr_dscr); | ||
275 | } | 291 | } |
276 | #endif /* CONFIG_HOTPLUG_CPU */ | 292 | #endif /* CONFIG_HOTPLUG_CPU */ |
277 | 293 | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 0d4e203fa7a0..535f50665647 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kprobes.h> | 32 | #include <linux/kprobes.h> |
33 | #include <linux/kexec.h> | 33 | #include <linux/kexec.h> |
34 | #include <linux/backlight.h> | 34 | #include <linux/backlight.h> |
35 | #include <linux/bug.h> | ||
35 | 36 | ||
36 | #include <asm/kdebug.h> | 37 | #include <asm/kdebug.h> |
37 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
@@ -727,54 +728,9 @@ static int emulate_instruction(struct pt_regs *regs) | |||
727 | return -EINVAL; | 728 | return -EINVAL; |
728 | } | 729 | } |
729 | 730 | ||
730 | /* | 731 | int is_valid_bugaddr(unsigned long addr) |
731 | * Look through the list of trap instructions that are used for BUG(), | ||
732 | * BUG_ON() and WARN_ON() and see if we hit one. At this point we know | ||
733 | * that the exception was caused by a trap instruction of some kind. | ||
734 | * Returns 1 if we should continue (i.e. it was a WARN_ON) or 0 | ||
735 | * otherwise. | ||
736 | */ | ||
737 | extern struct bug_entry __start___bug_table[], __stop___bug_table[]; | ||
738 | |||
739 | #ifndef CONFIG_MODULES | ||
740 | #define module_find_bug(x) NULL | ||
741 | #endif | ||
742 | |||
743 | struct bug_entry *find_bug(unsigned long bugaddr) | ||
744 | { | 732 | { |
745 | struct bug_entry *bug; | 733 | return is_kernel_addr(addr); |
746 | |||
747 | for (bug = __start___bug_table; bug < __stop___bug_table; ++bug) | ||
748 | if (bugaddr == bug->bug_addr) | ||
749 | return bug; | ||
750 | return module_find_bug(bugaddr); | ||
751 | } | ||
752 | |||
753 | static int check_bug_trap(struct pt_regs *regs) | ||
754 | { | ||
755 | struct bug_entry *bug; | ||
756 | unsigned long addr; | ||
757 | |||
758 | if (regs->msr & MSR_PR) | ||
759 | return 0; /* not in kernel */ | ||
760 | addr = regs->nip; /* address of trap instruction */ | ||
761 | if (addr < PAGE_OFFSET) | ||
762 | return 0; | ||
763 | bug = find_bug(regs->nip); | ||
764 | if (bug == NULL) | ||
765 | return 0; | ||
766 | if (bug->line & BUG_WARNING_TRAP) { | ||
767 | /* this is a WARN_ON rather than BUG/BUG_ON */ | ||
768 | printk(KERN_ERR "Badness in %s at %s:%ld\n", | ||
769 | bug->function, bug->file, | ||
770 | bug->line & ~BUG_WARNING_TRAP); | ||
771 | dump_stack(); | ||
772 | return 1; | ||
773 | } | ||
774 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
775 | bug->function, bug->file, bug->line); | ||
776 | |||
777 | return 0; | ||
778 | } | 734 | } |
779 | 735 | ||
780 | void __kprobes program_check_exception(struct pt_regs *regs) | 736 | void __kprobes program_check_exception(struct pt_regs *regs) |
@@ -782,6 +738,8 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
782 | unsigned int reason = get_reason(regs); | 738 | unsigned int reason = get_reason(regs); |
783 | extern int do_mathemu(struct pt_regs *regs); | 739 | extern int do_mathemu(struct pt_regs *regs); |
784 | 740 | ||
741 | /* We can now get here via a FP Unavailable exception if the core | ||
742 | * has no FPU, in that case no reason flags will be set */ | ||
785 | #ifdef CONFIG_MATH_EMULATION | 743 | #ifdef CONFIG_MATH_EMULATION |
786 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, | 744 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, |
787 | * but there seems to be a hardware bug on the 405GP (RevD) | 745 | * but there seems to be a hardware bug on the 405GP (RevD) |
@@ -808,7 +766,9 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
808 | return; | 766 | return; |
809 | if (debugger_bpt(regs)) | 767 | if (debugger_bpt(regs)) |
810 | return; | 768 | return; |
811 | if (check_bug_trap(regs)) { | 769 | |
770 | if (!(regs->msr & MSR_PR) && /* not user-mode */ | ||
771 | report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { | ||
812 | regs->nip += 4; | 772 | regs->nip += 4; |
813 | return; | 773 | return; |
814 | } | 774 | } |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 04b98671a060..04b8e71bf5b0 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -62,11 +62,7 @@ SECTIONS | |||
62 | __stop___ex_table = .; | 62 | __stop___ex_table = .; |
63 | } | 63 | } |
64 | 64 | ||
65 | __bug_table : { | 65 | BUG_TABLE |
66 | __start___bug_table = .; | ||
67 | *(__bug_table) | ||
68 | __stop___bug_table = .; | ||
69 | } | ||
70 | 66 | ||
71 | /* | 67 | /* |
72 | * Init sections discarded at runtime | 68 | * Init sections discarded at runtime |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 9da01dc8cfd9..262790910ff2 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -295,6 +295,63 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start, | |||
295 | return lmb_end_of_DRAM() - start; | 295 | return lmb_end_of_DRAM() - start; |
296 | } | 296 | } |
297 | 297 | ||
298 | /* | ||
299 | * Extract NUMA information from the ibm,dynamic-reconfiguration-memory | ||
300 | * node. This assumes n_mem_{addr,size}_cells have been set. | ||
301 | */ | ||
302 | static void __init parse_drconf_memory(struct device_node *memory) | ||
303 | { | ||
304 | const unsigned int *lm, *dm, *aa; | ||
305 | unsigned int ls, ld, la; | ||
306 | unsigned int n, aam, aalen; | ||
307 | unsigned long lmb_size, size; | ||
308 | int nid, default_nid = 0; | ||
309 | unsigned int start, ai, flags; | ||
310 | |||
311 | lm = get_property(memory, "ibm,lmb-size", &ls); | ||
312 | dm = get_property(memory, "ibm,dynamic-memory", &ld); | ||
313 | aa = get_property(memory, "ibm,associativity-lookup-arrays", &la); | ||
314 | if (!lm || !dm || !aa || | ||
315 | ls < sizeof(unsigned int) || ld < sizeof(unsigned int) || | ||
316 | la < 2 * sizeof(unsigned int)) | ||
317 | return; | ||
318 | |||
319 | lmb_size = read_n_cells(n_mem_size_cells, &lm); | ||
320 | n = *dm++; /* number of LMBs */ | ||
321 | aam = *aa++; /* number of associativity lists */ | ||
322 | aalen = *aa++; /* length of each associativity list */ | ||
323 | if (ld < (n * (n_mem_addr_cells + 4) + 1) * sizeof(unsigned int) || | ||
324 | la < (aam * aalen + 2) * sizeof(unsigned int)) | ||
325 | return; | ||
326 | |||
327 | for (; n != 0; --n) { | ||
328 | start = read_n_cells(n_mem_addr_cells, &dm); | ||
329 | ai = dm[2]; | ||
330 | flags = dm[3]; | ||
331 | dm += 4; | ||
332 | /* 0x80 == reserved, 0x8 = assigned to us */ | ||
333 | if ((flags & 0x80) || !(flags & 0x8)) | ||
334 | continue; | ||
335 | nid = default_nid; | ||
336 | /* flags & 0x40 means associativity index is invalid */ | ||
337 | if (min_common_depth > 0 && min_common_depth <= aalen && | ||
338 | (flags & 0x40) == 0 && ai < aam) { | ||
339 | /* this is like of_node_to_nid_single */ | ||
340 | nid = aa[ai * aalen + min_common_depth - 1]; | ||
341 | if (nid == 0xffff || nid >= MAX_NUMNODES) | ||
342 | nid = default_nid; | ||
343 | } | ||
344 | node_set_online(nid); | ||
345 | |||
346 | size = numa_enforce_memory_limit(start, lmb_size); | ||
347 | if (!size) | ||
348 | continue; | ||
349 | |||
350 | add_active_range(nid, start >> PAGE_SHIFT, | ||
351 | (start >> PAGE_SHIFT) + (size >> PAGE_SHIFT)); | ||
352 | } | ||
353 | } | ||
354 | |||
298 | static int __init parse_numa_properties(void) | 355 | static int __init parse_numa_properties(void) |
299 | { | 356 | { |
300 | struct device_node *cpu = NULL; | 357 | struct device_node *cpu = NULL; |
@@ -385,6 +442,14 @@ new_range: | |||
385 | goto new_range; | 442 | goto new_range; |
386 | } | 443 | } |
387 | 444 | ||
445 | /* | ||
446 | * Now do the same thing for each LMB listed in the ibm,dynamic-memory | ||
447 | * property in the ibm,dynamic-reconfiguration-memory node. | ||
448 | */ | ||
449 | memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); | ||
450 | if (memory) | ||
451 | parse_drconf_memory(memory); | ||
452 | |||
388 | return 0; | 453 | return 0; |
389 | } | 454 | } |
390 | 455 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index a375c15b4315..eaff71e74fb0 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -40,8 +40,6 @@ | |||
40 | #include <asm/prom.h> | 40 | #include <asm/prom.h> |
41 | #include <asm/udbg.h> | 41 | #include <asm/udbg.h> |
42 | #include <sysdev/fsl_soc.h> | 42 | #include <sysdev/fsl_soc.h> |
43 | #include <asm/qe.h> | ||
44 | #include <asm/qe_ic.h> | ||
45 | #include <asm/of_platform.h> | 43 | #include <asm/of_platform.h> |
46 | 44 | ||
47 | #include <asm/mpc52xx.h> | 45 | #include <asm/mpc52xx.h> |
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index 616a0a3fd0e2..70e0d968d30f 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c | |||
@@ -115,6 +115,7 @@ static struct sysdev_attribute attr_spu_temperature = { | |||
115 | 115 | ||
116 | static struct attribute *spu_attributes[] = { | 116 | static struct attribute *spu_attributes[] = { |
117 | &attr_spu_temperature.attr, | 117 | &attr_spu_temperature.attr, |
118 | NULL, | ||
118 | }; | 119 | }; |
119 | 120 | ||
120 | static struct attribute_group spu_attribute_group = { | 121 | static struct attribute_group spu_attribute_group = { |
@@ -135,6 +136,7 @@ static struct sysdev_attribute attr_ppe_temperature1 = { | |||
135 | static struct attribute *ppe_attributes[] = { | 136 | static struct attribute *ppe_attributes[] = { |
136 | &attr_ppe_temperature0.attr, | 137 | &attr_ppe_temperature0.attr, |
137 | &attr_ppe_temperature1.attr, | 138 | &attr_ppe_temperature1.attr, |
139 | NULL, | ||
138 | }; | 140 | }; |
139 | 141 | ||
140 | static struct attribute_group ppe_attribute_group = { | 142 | static struct attribute_group ppe_attribute_group = { |
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c index 99c612025e8f..d04ae1671e6c 100644 --- a/arch/powerpc/platforms/cell/pmu.c +++ b/arch/powerpc/platforms/cell/pmu.c | |||
@@ -382,11 +382,14 @@ static irqreturn_t cbe_pm_irq(int irq, void *dev_id) | |||
382 | return IRQ_HANDLED; | 382 | return IRQ_HANDLED; |
383 | } | 383 | } |
384 | 384 | ||
385 | int __init cbe_init_pm_irq(void) | 385 | static int __init cbe_init_pm_irq(void) |
386 | { | 386 | { |
387 | unsigned int irq; | 387 | unsigned int irq; |
388 | int rc, node; | 388 | int rc, node; |
389 | 389 | ||
390 | if (!machine_is(cell)) | ||
391 | return 0; | ||
392 | |||
390 | for_each_node(node) { | 393 | for_each_node(node) { |
391 | irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | | 394 | irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | |
392 | (node << IIC_IRQ_NODE_SHIFT)); | 395 | (node << IIC_IRQ_NODE_SHIFT)); |
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c index 26945c491f6b..725e19561159 100644 --- a/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/arch/powerpc/platforms/cell/spufs/coredump.c | |||
@@ -147,7 +147,7 @@ static int spufs_arch_notes_size(void) | |||
147 | struct fdtable *fdt = files_fdtable(current->files); | 147 | struct fdtable *fdt = files_fdtable(current->files); |
148 | int size = 0, fd; | 148 | int size = 0, fd; |
149 | 149 | ||
150 | for (fd = 0; fd < fdt->max_fdset && fd < fdt->max_fds; fd++) { | 150 | for (fd = 0; fd < fdt->max_fds; fd++) { |
151 | if (FD_ISSET(fd, fdt->open_fds)) { | 151 | if (FD_ISSET(fd, fdt->open_fds)) { |
152 | struct file *file = fcheck(fd); | 152 | struct file *file = fcheck(fd); |
153 | 153 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e3af9112c026..738b9244382f 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -205,7 +205,7 @@ static int spufs_dir_close(struct inode *inode, struct file *file) | |||
205 | struct dentry *dir; | 205 | struct dentry *dir; |
206 | int ret; | 206 | int ret; |
207 | 207 | ||
208 | dir = file->f_dentry; | 208 | dir = file->f_path.dentry; |
209 | parent = dir->d_parent->d_inode; | 209 | parent = dir->d_parent->d_inode; |
210 | ctx = SPUFS_I(dir->d_inode)->i_ctx; | 210 | ctx = SPUFS_I(dir->d_inode)->i_ctx; |
211 | 211 | ||
@@ -363,7 +363,7 @@ static int spufs_gang_close(struct inode *inode, struct file *file) | |||
363 | struct dentry *dir; | 363 | struct dentry *dir; |
364 | int ret; | 364 | int ret; |
365 | 365 | ||
366 | dir = file->f_dentry; | 366 | dir = file->f_path.dentry; |
367 | parent = dir->d_parent->d_inode; | 367 | parent = dir->d_parent->d_inode; |
368 | 368 | ||
369 | ret = spufs_rmgang(parent, dir); | 369 | ret = spufs_rmgang(parent, dir); |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index a6d1ae4dc2a3..8e37bdf4dfda 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -46,7 +46,7 @@ static long do_spu_run(struct file *filp, | |||
46 | if (filp->f_op != &spufs_context_fops) | 46 | if (filp->f_op != &spufs_context_fops) |
47 | goto out; | 47 | goto out; |
48 | 48 | ||
49 | i = SPUFS_I(filp->f_dentry->d_inode); | 49 | i = SPUFS_I(filp->f_path.dentry->d_inode); |
50 | ret = spufs_run_spu(filp, i->i_ctx, &npc, &status); | 50 | ret = spufs_run_spu(filp, i->i_ctx, &npc, &status); |
51 | 51 | ||
52 | if (put_user(npc, unpc)) | 52 | if (put_user(npc, unpc)) |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index b5737d68d6c4..cff15ae24f6b 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -1178,7 +1178,7 @@ static ssize_t proc_mf_change_vmlinux(struct file *file, | |||
1178 | const char __user *buf, | 1178 | const char __user *buf, |
1179 | size_t count, loff_t *ppos) | 1179 | size_t count, loff_t *ppos) |
1180 | { | 1180 | { |
1181 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | 1181 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
1182 | ssize_t rc; | 1182 | ssize_t rc; |
1183 | dma_addr_t dma_addr; | 1183 | dma_addr_t dma_addr; |
1184 | char *page; | 1184 | char *page; |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 3a32deda765d..3f6a69f67195 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -562,7 +562,7 @@ void __init maple_pci_init(void) | |||
562 | for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { | 562 | for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { |
563 | if (np->name == NULL) | 563 | if (np->name == NULL) |
564 | continue; | 564 | continue; |
565 | if (strcmp(np->name, "pci") == 0) { | 565 | if (!strcmp(np->name, "pci") || !strcmp(np->name, "pcie")) { |
566 | if (add_bridge(np) == 0) | 566 | if (add_bridge(np) == 0) |
567 | of_node_get(np); | 567 | of_node_get(np); |
568 | } | 568 | } |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 094989d50bab..f12d5c69e74d 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <asm/of_device.h> | 60 | #include <asm/of_device.h> |
61 | #include <asm/lmb.h> | 61 | #include <asm/lmb.h> |
62 | #include <asm/mpic.h> | 62 | #include <asm/mpic.h> |
63 | #include <asm/rtas.h> | ||
63 | #include <asm/udbg.h> | 64 | #include <asm/udbg.h> |
64 | 65 | ||
65 | #include "maple.h" | 66 | #include "maple.h" |
@@ -166,6 +167,16 @@ struct smp_ops_t maple_smp_ops = { | |||
166 | }; | 167 | }; |
167 | #endif /* CONFIG_SMP */ | 168 | #endif /* CONFIG_SMP */ |
168 | 169 | ||
170 | static void __init maple_use_rtas_reboot_and_halt_if_present(void) | ||
171 | { | ||
172 | if (rtas_service_present("system-reboot") && | ||
173 | rtas_service_present("power-off")) { | ||
174 | ppc_md.restart = rtas_restart; | ||
175 | ppc_md.power_off = rtas_power_off; | ||
176 | ppc_md.halt = rtas_halt; | ||
177 | } | ||
178 | } | ||
179 | |||
169 | void __init maple_setup_arch(void) | 180 | void __init maple_setup_arch(void) |
170 | { | 181 | { |
171 | /* init to some ~sane value until calibrate_delay() runs */ | 182 | /* init to some ~sane value until calibrate_delay() runs */ |
@@ -181,6 +192,7 @@ void __init maple_setup_arch(void) | |||
181 | #ifdef CONFIG_DUMMY_CONSOLE | 192 | #ifdef CONFIG_DUMMY_CONSOLE |
182 | conswitchp = &dummy_con; | 193 | conswitchp = &dummy_con; |
183 | #endif | 194 | #endif |
195 | maple_use_rtas_reboot_and_halt_if_present(); | ||
184 | 196 | ||
185 | printk(KERN_DEBUG "Using native/NAP idle loop\n"); | 197 | printk(KERN_DEBUG "Using native/NAP idle loop\n"); |
186 | } | 198 | } |
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 451bfcd5502e..de52ec4e9e58 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig | |||
@@ -40,4 +40,15 @@ config PS3_USE_LPAR_ADDR | |||
40 | 40 | ||
41 | If you have any doubt, choose the default y. | 41 | If you have any doubt, choose the default y. |
42 | 42 | ||
43 | config PS3_VUART | ||
44 | depends on PPC_PS3 | ||
45 | bool "PS3 Virtual UART support" | ||
46 | default y | ||
47 | help | ||
48 | Include support for the PS3 Virtual UART. | ||
49 | |||
50 | This support is required for several system services | ||
51 | including the System Manager and AV Settings. In | ||
52 | general, all users will say Y. | ||
53 | |||
43 | endmenu | 54 | endmenu |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 997243a91be8..69590fbf83da 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -10,6 +10,8 @@ obj-$(CONFIG_XICS) += xics.o | |||
10 | obj-$(CONFIG_SCANLOG) += scanlog.o | 10 | obj-$(CONFIG_SCANLOG) += scanlog.o |
11 | obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o | 11 | obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o |
12 | 12 | ||
13 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o | ||
14 | |||
13 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o | 15 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o |
14 | obj-$(CONFIG_HVCS) += hvcserver.o | 16 | obj-$(CONFIG_HVCS) += hvcserver.o |
15 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o | 17 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3c2d63ebf787..da6e5362e7cd 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -337,6 +337,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
337 | printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", | 337 | printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", |
338 | pdn->eeh_check_count); | 338 | pdn->eeh_check_count); |
339 | dump_stack(); | 339 | dump_stack(); |
340 | msleep(5000); | ||
340 | 341 | ||
341 | /* re-read the slot reset state */ | 342 | /* re-read the slot reset state */ |
342 | if (read_slot_reset_state(pdn, rets) != 0) | 343 | if (read_slot_reset_state(pdn, rets) != 0) |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index c2bc9904f1cb..cbd6b0711ab4 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -170,14 +170,19 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata) | |||
170 | static void eeh_report_resume(struct pci_dev *dev, void *userdata) | 170 | static void eeh_report_resume(struct pci_dev *dev, void *userdata) |
171 | { | 171 | { |
172 | struct pci_driver *driver = dev->driver; | 172 | struct pci_driver *driver = dev->driver; |
173 | struct device_node *dn = pci_device_to_OF_node(dev); | ||
173 | 174 | ||
174 | dev->error_state = pci_channel_io_normal; | 175 | dev->error_state = pci_channel_io_normal; |
175 | 176 | ||
176 | if (!driver) | 177 | if (!driver) |
177 | return; | 178 | return; |
178 | if (!driver->err_handler) | 179 | |
179 | return; | 180 | if ((PCI_DN(dn)->eeh_mode) & EEH_MODE_IRQ_DISABLED) { |
180 | if (!driver->err_handler->resume) | 181 | PCI_DN(dn)->eeh_mode &= ~EEH_MODE_IRQ_DISABLED; |
182 | enable_irq(dev->irq); | ||
183 | } | ||
184 | if (!driver->err_handler || | ||
185 | !driver->err_handler->resume) | ||
181 | return; | 186 | return; |
182 | 187 | ||
183 | driver->err_handler->resume(dev); | 188 | driver->err_handler->resume(dev); |
@@ -407,6 +412,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
407 | 412 | ||
408 | if (rc) | 413 | if (rc) |
409 | result = PCI_ERS_RESULT_NEED_RESET; | 414 | result = PCI_ERS_RESULT_NEED_RESET; |
415 | else | ||
416 | result = PCI_ERS_RESULT_RECOVERED; | ||
410 | } | 417 | } |
411 | 418 | ||
412 | /* If any device has a hard failure, then shut off everything. */ | 419 | /* If any device has a hard failure, then shut off everything. */ |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c new file mode 100644 index 000000000000..f460b9cbfd46 --- /dev/null +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -0,0 +1,275 @@ | |||
1 | /* | ||
2 | * pseries CPU Hotplug infrastructure. | ||
3 | * | ||
4 | * Split out from arch/powerpc/platforms/pseries/setup.c | ||
5 | * arch/powerpc/kernel/rtas.c, and arch/powerpc/platforms/pseries/smp.c | ||
6 | * | ||
7 | * Peter Bergner, IBM March 2001. | ||
8 | * Copyright (C) 2001 IBM. | ||
9 | * Dave Engebretsen, Peter Bergner, and | ||
10 | * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com | ||
11 | * Plus various changes from other IBM teams... | ||
12 | * | ||
13 | * Copyright (C) 2006 Michael Ellerman, IBM Corporation | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or | ||
16 | * modify it under the terms of the GNU General Public License | ||
17 | * as published by the Free Software Foundation; either version | ||
18 | * 2 of the License, or (at your option) any later version. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/cpu.h> | ||
24 | #include <asm/system.h> | ||
25 | #include <asm/prom.h> | ||
26 | #include <asm/rtas.h> | ||
27 | #include <asm/firmware.h> | ||
28 | #include <asm/machdep.h> | ||
29 | #include <asm/vdso_datapage.h> | ||
30 | #include <asm/pSeries_reconfig.h> | ||
31 | #include "xics.h" | ||
32 | |||
33 | /* This version can't take the spinlock, because it never returns */ | ||
34 | static struct rtas_args rtas_stop_self_args = { | ||
35 | .token = RTAS_UNKNOWN_SERVICE, | ||
36 | .nargs = 0, | ||
37 | .nret = 1, | ||
38 | .rets = &rtas_stop_self_args.args[0], | ||
39 | }; | ||
40 | |||
41 | static void rtas_stop_self(void) | ||
42 | { | ||
43 | struct rtas_args *args = &rtas_stop_self_args; | ||
44 | |||
45 | local_irq_disable(); | ||
46 | |||
47 | BUG_ON(args->token == RTAS_UNKNOWN_SERVICE); | ||
48 | |||
49 | printk("cpu %u (hwid %u) Ready to die...\n", | ||
50 | smp_processor_id(), hard_smp_processor_id()); | ||
51 | enter_rtas(__pa(args)); | ||
52 | |||
53 | panic("Alas, I survived.\n"); | ||
54 | } | ||
55 | |||
56 | static void pseries_mach_cpu_die(void) | ||
57 | { | ||
58 | local_irq_disable(); | ||
59 | idle_task_exit(); | ||
60 | xics_teardown_cpu(0); | ||
61 | rtas_stop_self(); | ||
62 | /* Should never get here... */ | ||
63 | BUG(); | ||
64 | for(;;); | ||
65 | } | ||
66 | |||
67 | static int qcss_tok; /* query-cpu-stopped-state token */ | ||
68 | |||
69 | /* Get state of physical CPU. | ||
70 | * Return codes: | ||
71 | * 0 - The processor is in the RTAS stopped state | ||
72 | * 1 - stop-self is in progress | ||
73 | * 2 - The processor is not in the RTAS stopped state | ||
74 | * -1 - Hardware Error | ||
75 | * -2 - Hardware Busy, Try again later. | ||
76 | */ | ||
77 | static int query_cpu_stopped(unsigned int pcpu) | ||
78 | { | ||
79 | int cpu_status, status; | ||
80 | |||
81 | status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); | ||
82 | if (status != 0) { | ||
83 | printk(KERN_ERR | ||
84 | "RTAS query-cpu-stopped-state failed: %i\n", status); | ||
85 | return status; | ||
86 | } | ||
87 | |||
88 | return cpu_status; | ||
89 | } | ||
90 | |||
91 | static int pseries_cpu_disable(void) | ||
92 | { | ||
93 | int cpu = smp_processor_id(); | ||
94 | |||
95 | cpu_clear(cpu, cpu_online_map); | ||
96 | vdso_data->processorCount--; | ||
97 | |||
98 | /*fix boot_cpuid here*/ | ||
99 | if (cpu == boot_cpuid) | ||
100 | boot_cpuid = any_online_cpu(cpu_online_map); | ||
101 | |||
102 | /* FIXME: abstract this to not be platform specific later on */ | ||
103 | xics_migrate_irqs_away(); | ||
104 | return 0; | ||
105 | } | ||
106 | |||
107 | static void pseries_cpu_die(unsigned int cpu) | ||
108 | { | ||
109 | int tries; | ||
110 | int cpu_status; | ||
111 | unsigned int pcpu = get_hard_smp_processor_id(cpu); | ||
112 | |||
113 | for (tries = 0; tries < 25; tries++) { | ||
114 | cpu_status = query_cpu_stopped(pcpu); | ||
115 | if (cpu_status == 0 || cpu_status == -1) | ||
116 | break; | ||
117 | msleep(200); | ||
118 | } | ||
119 | if (cpu_status != 0) { | ||
120 | printk("Querying DEAD? cpu %i (%i) shows %i\n", | ||
121 | cpu, pcpu, cpu_status); | ||
122 | } | ||
123 | |||
124 | /* Isolation and deallocation are definatly done by | ||
125 | * drslot_chrp_cpu. If they were not they would be | ||
126 | * done here. Change isolate state to Isolate and | ||
127 | * change allocation-state to Unusable. | ||
128 | */ | ||
129 | paca[cpu].cpu_start = 0; | ||
130 | } | ||
131 | |||
132 | /* | ||
133 | * Update cpu_present_map and paca(s) for a new cpu node. The wrinkle | ||
134 | * here is that a cpu device node may represent up to two logical cpus | ||
135 | * in the SMT case. We must honor the assumption in other code that | ||
136 | * the logical ids for sibling SMT threads x and y are adjacent, such | ||
137 | * that x^1 == y and y^1 == x. | ||
138 | */ | ||
139 | static int pseries_add_processor(struct device_node *np) | ||
140 | { | ||
141 | unsigned int cpu; | ||
142 | cpumask_t candidate_map, tmp = CPU_MASK_NONE; | ||
143 | int err = -ENOSPC, len, nthreads, i; | ||
144 | const u32 *intserv; | ||
145 | |||
146 | intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); | ||
147 | if (!intserv) | ||
148 | return 0; | ||
149 | |||
150 | nthreads = len / sizeof(u32); | ||
151 | for (i = 0; i < nthreads; i++) | ||
152 | cpu_set(i, tmp); | ||
153 | |||
154 | lock_cpu_hotplug(); | ||
155 | |||
156 | BUG_ON(!cpus_subset(cpu_present_map, cpu_possible_map)); | ||
157 | |||
158 | /* Get a bitmap of unoccupied slots. */ | ||
159 | cpus_xor(candidate_map, cpu_possible_map, cpu_present_map); | ||
160 | if (cpus_empty(candidate_map)) { | ||
161 | /* If we get here, it most likely means that NR_CPUS is | ||
162 | * less than the partition's max processors setting. | ||
163 | */ | ||
164 | printk(KERN_ERR "Cannot add cpu %s; this system configuration" | ||
165 | " supports %d logical cpus.\n", np->full_name, | ||
166 | cpus_weight(cpu_possible_map)); | ||
167 | goto out_unlock; | ||
168 | } | ||
169 | |||
170 | while (!cpus_empty(tmp)) | ||
171 | if (cpus_subset(tmp, candidate_map)) | ||
172 | /* Found a range where we can insert the new cpu(s) */ | ||
173 | break; | ||
174 | else | ||
175 | cpus_shift_left(tmp, tmp, nthreads); | ||
176 | |||
177 | if (cpus_empty(tmp)) { | ||
178 | printk(KERN_ERR "Unable to find space in cpu_present_map for" | ||
179 | " processor %s with %d thread(s)\n", np->name, | ||
180 | nthreads); | ||
181 | goto out_unlock; | ||
182 | } | ||
183 | |||
184 | for_each_cpu_mask(cpu, tmp) { | ||
185 | BUG_ON(cpu_isset(cpu, cpu_present_map)); | ||
186 | cpu_set(cpu, cpu_present_map); | ||
187 | set_hard_smp_processor_id(cpu, *intserv++); | ||
188 | } | ||
189 | err = 0; | ||
190 | out_unlock: | ||
191 | unlock_cpu_hotplug(); | ||
192 | return err; | ||
193 | } | ||
194 | |||
195 | /* | ||
196 | * Update the present map for a cpu node which is going away, and set | ||
197 | * the hard id in the paca(s) to -1 to be consistent with boot time | ||
198 | * convention for non-present cpus. | ||
199 | */ | ||
200 | static void pseries_remove_processor(struct device_node *np) | ||
201 | { | ||
202 | unsigned int cpu; | ||
203 | int len, nthreads, i; | ||
204 | const u32 *intserv; | ||
205 | |||
206 | intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); | ||
207 | if (!intserv) | ||
208 | return; | ||
209 | |||
210 | nthreads = len / sizeof(u32); | ||
211 | |||
212 | lock_cpu_hotplug(); | ||
213 | for (i = 0; i < nthreads; i++) { | ||
214 | for_each_present_cpu(cpu) { | ||
215 | if (get_hard_smp_processor_id(cpu) != intserv[i]) | ||
216 | continue; | ||
217 | BUG_ON(cpu_online(cpu)); | ||
218 | cpu_clear(cpu, cpu_present_map); | ||
219 | set_hard_smp_processor_id(cpu, -1); | ||
220 | break; | ||
221 | } | ||
222 | if (cpu == NR_CPUS) | ||
223 | printk(KERN_WARNING "Could not find cpu to remove " | ||
224 | "with physical id 0x%x\n", intserv[i]); | ||
225 | } | ||
226 | unlock_cpu_hotplug(); | ||
227 | } | ||
228 | |||
229 | static int pseries_smp_notifier(struct notifier_block *nb, | ||
230 | unsigned long action, void *node) | ||
231 | { | ||
232 | int err = NOTIFY_OK; | ||
233 | |||
234 | switch (action) { | ||
235 | case PSERIES_RECONFIG_ADD: | ||
236 | if (pseries_add_processor(node)) | ||
237 | err = NOTIFY_BAD; | ||
238 | break; | ||
239 | case PSERIES_RECONFIG_REMOVE: | ||
240 | pseries_remove_processor(node); | ||
241 | break; | ||
242 | default: | ||
243 | err = NOTIFY_DONE; | ||
244 | break; | ||
245 | } | ||
246 | return err; | ||
247 | } | ||
248 | |||
249 | static struct notifier_block pseries_smp_nb = { | ||
250 | .notifier_call = pseries_smp_notifier, | ||
251 | }; | ||
252 | |||
253 | static int __init pseries_cpu_hotplug_init(void) | ||
254 | { | ||
255 | rtas_stop_self_args.token = rtas_token("stop-self"); | ||
256 | qcss_tok = rtas_token("query-cpu-stopped-state"); | ||
257 | |||
258 | if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE || | ||
259 | qcss_tok == RTAS_UNKNOWN_SERVICE) { | ||
260 | printk(KERN_INFO "CPU Hotplug not supported by firmware " | ||
261 | "- disabling.\n"); | ||
262 | return 0; | ||
263 | } | ||
264 | |||
265 | ppc_md.cpu_die = pseries_mach_cpu_die; | ||
266 | smp_ops->cpu_disable = pseries_cpu_disable; | ||
267 | smp_ops->cpu_die = pseries_cpu_die; | ||
268 | |||
269 | /* Processors can be added/removed only on LPAR */ | ||
270 | if (firmware_has_feature(FW_FEATURE_LPAR)) | ||
271 | pSeries_reconfig_notifier_register(&pseries_smp_nb); | ||
272 | |||
273 | return 0; | ||
274 | } | ||
275 | arch_initcall(pseries_cpu_hotplug_init); | ||
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c index 446e17d162a5..80181c4c49eb 100644 --- a/arch/powerpc/platforms/pseries/hvCall_inst.c +++ b/arch/powerpc/platforms/pseries/hvCall_inst.c | |||
@@ -85,7 +85,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file) | |||
85 | 85 | ||
86 | rc = seq_open(file, &hcall_inst_seq_ops); | 86 | rc = seq_open(file, &hcall_inst_seq_ops); |
87 | seq = file->private_data; | 87 | seq = file->private_data; |
88 | seq->private = file->f_dentry->d_inode->i_private; | 88 | seq->private = file->f_path.dentry->d_inode->i_private; |
89 | 89 | ||
90 | return rc; | 90 | return rc; |
91 | } | 91 | } |
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 77a5bb1d9c30..45368a57d7dd 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c | |||
@@ -47,7 +47,7 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */ | |||
47 | static ssize_t scanlog_read(struct file *file, char __user *buf, | 47 | static ssize_t scanlog_read(struct file *file, char __user *buf, |
48 | size_t count, loff_t *ppos) | 48 | size_t count, loff_t *ppos) |
49 | { | 49 | { |
50 | struct inode * inode = file->f_dentry->d_inode; | 50 | struct inode * inode = file->f_path.dentry->d_inode; |
51 | struct proc_dir_entry *dp; | 51 | struct proc_dir_entry *dp; |
52 | unsigned int *data; | 52 | unsigned int *data; |
53 | int status; | 53 | int status; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 0dc2548ca9bc..042ecae107ac 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -347,21 +347,6 @@ static int __init pSeries_init_panel(void) | |||
347 | } | 347 | } |
348 | arch_initcall(pSeries_init_panel); | 348 | arch_initcall(pSeries_init_panel); |
349 | 349 | ||
350 | #ifdef CONFIG_HOTPLUG_CPU | ||
351 | static void pSeries_mach_cpu_die(void) | ||
352 | { | ||
353 | local_irq_disable(); | ||
354 | idle_task_exit(); | ||
355 | xics_teardown_cpu(0); | ||
356 | rtas_stop_self(); | ||
357 | /* Should never get here... */ | ||
358 | BUG(); | ||
359 | for(;;); | ||
360 | } | ||
361 | #else | ||
362 | #define pSeries_mach_cpu_die NULL | ||
363 | #endif | ||
364 | |||
365 | static int pseries_set_dabr(unsigned long dabr) | 350 | static int pseries_set_dabr(unsigned long dabr) |
366 | { | 351 | { |
367 | return plpar_hcall_norets(H_SET_DABR, dabr); | 352 | return plpar_hcall_norets(H_SET_DABR, dabr); |
@@ -437,19 +422,14 @@ static int __init pSeries_probe_hypertas(unsigned long node, | |||
437 | if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL) | 422 | if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL) |
438 | powerpc_firmware_features |= FW_FEATURE_LPAR; | 423 | powerpc_firmware_features |= FW_FEATURE_LPAR; |
439 | 424 | ||
440 | if (firmware_has_feature(FW_FEATURE_LPAR)) | ||
441 | hpte_init_lpar(); | ||
442 | else | ||
443 | hpte_init_native(); | ||
444 | |||
445 | return 1; | 425 | return 1; |
446 | } | 426 | } |
447 | 427 | ||
448 | static int __init pSeries_probe(void) | 428 | static int __init pSeries_probe(void) |
449 | { | 429 | { |
450 | unsigned long root = of_get_flat_dt_root(); | 430 | unsigned long root = of_get_flat_dt_root(); |
451 | char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(), | 431 | char *dtype = of_get_flat_dt_prop(root, "device_type", NULL); |
452 | "device_type", NULL); | 432 | |
453 | if (dtype == NULL) | 433 | if (dtype == NULL) |
454 | return 0; | 434 | return 0; |
455 | if (strcmp(dtype, "chrp")) | 435 | if (strcmp(dtype, "chrp")) |
@@ -467,6 +447,11 @@ static int __init pSeries_probe(void) | |||
467 | /* Now try to figure out if we are running on LPAR */ | 447 | /* Now try to figure out if we are running on LPAR */ |
468 | of_scan_flat_dt(pSeries_probe_hypertas, NULL); | 448 | of_scan_flat_dt(pSeries_probe_hypertas, NULL); |
469 | 449 | ||
450 | if (firmware_has_feature(FW_FEATURE_LPAR)) | ||
451 | hpte_init_lpar(); | ||
452 | else | ||
453 | hpte_init_native(); | ||
454 | |||
470 | DBG("Machine is%s LPAR !\n", | 455 | DBG("Machine is%s LPAR !\n", |
471 | (powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not"); | 456 | (powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not"); |
472 | 457 | ||
@@ -561,7 +546,6 @@ define_machine(pseries) { | |||
561 | .power_off = rtas_power_off, | 546 | .power_off = rtas_power_off, |
562 | .halt = rtas_halt, | 547 | .halt = rtas_halt, |
563 | .panic = rtas_os_term, | 548 | .panic = rtas_os_term, |
564 | .cpu_die = pSeries_mach_cpu_die, | ||
565 | .get_boot_time = rtas_get_boot_time, | 549 | .get_boot_time = rtas_get_boot_time, |
566 | .get_rtc_time = rtas_get_rtc_time, | 550 | .get_rtc_time = rtas_get_rtc_time, |
567 | .set_rtc_time = rtas_set_rtc_time, | 551 | .set_rtc_time = rtas_set_rtc_time, |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index c6624b8a0e77..4408518eaebe 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -64,197 +64,6 @@ static cpumask_t of_spin_map; | |||
64 | 64 | ||
65 | extern void generic_secondary_smp_init(unsigned long); | 65 | extern void generic_secondary_smp_init(unsigned long); |
66 | 66 | ||
67 | #ifdef CONFIG_HOTPLUG_CPU | ||
68 | |||
69 | /* Get state of physical CPU. | ||
70 | * Return codes: | ||
71 | * 0 - The processor is in the RTAS stopped state | ||
72 | * 1 - stop-self is in progress | ||
73 | * 2 - The processor is not in the RTAS stopped state | ||
74 | * -1 - Hardware Error | ||
75 | * -2 - Hardware Busy, Try again later. | ||
76 | */ | ||
77 | static int query_cpu_stopped(unsigned int pcpu) | ||
78 | { | ||
79 | int cpu_status; | ||
80 | int status, qcss_tok; | ||
81 | |||
82 | qcss_tok = rtas_token("query-cpu-stopped-state"); | ||
83 | if (qcss_tok == RTAS_UNKNOWN_SERVICE) | ||
84 | return -1; | ||
85 | status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); | ||
86 | if (status != 0) { | ||
87 | printk(KERN_ERR | ||
88 | "RTAS query-cpu-stopped-state failed: %i\n", status); | ||
89 | return status; | ||
90 | } | ||
91 | |||
92 | return cpu_status; | ||
93 | } | ||
94 | |||
95 | static int pSeries_cpu_disable(void) | ||
96 | { | ||
97 | int cpu = smp_processor_id(); | ||
98 | |||
99 | cpu_clear(cpu, cpu_online_map); | ||
100 | vdso_data->processorCount--; | ||
101 | |||
102 | /*fix boot_cpuid here*/ | ||
103 | if (cpu == boot_cpuid) | ||
104 | boot_cpuid = any_online_cpu(cpu_online_map); | ||
105 | |||
106 | /* FIXME: abstract this to not be platform specific later on */ | ||
107 | xics_migrate_irqs_away(); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static void pSeries_cpu_die(unsigned int cpu) | ||
112 | { | ||
113 | int tries; | ||
114 | int cpu_status; | ||
115 | unsigned int pcpu = get_hard_smp_processor_id(cpu); | ||
116 | |||
117 | for (tries = 0; tries < 25; tries++) { | ||
118 | cpu_status = query_cpu_stopped(pcpu); | ||
119 | if (cpu_status == 0 || cpu_status == -1) | ||
120 | break; | ||
121 | msleep(200); | ||
122 | } | ||
123 | if (cpu_status != 0) { | ||
124 | printk("Querying DEAD? cpu %i (%i) shows %i\n", | ||
125 | cpu, pcpu, cpu_status); | ||
126 | } | ||
127 | |||
128 | /* Isolation and deallocation are definatly done by | ||
129 | * drslot_chrp_cpu. If they were not they would be | ||
130 | * done here. Change isolate state to Isolate and | ||
131 | * change allocation-state to Unusable. | ||
132 | */ | ||
133 | paca[cpu].cpu_start = 0; | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Update cpu_present_map and paca(s) for a new cpu node. The wrinkle | ||
138 | * here is that a cpu device node may represent up to two logical cpus | ||
139 | * in the SMT case. We must honor the assumption in other code that | ||
140 | * the logical ids for sibling SMT threads x and y are adjacent, such | ||
141 | * that x^1 == y and y^1 == x. | ||
142 | */ | ||
143 | static int pSeries_add_processor(struct device_node *np) | ||
144 | { | ||
145 | unsigned int cpu; | ||
146 | cpumask_t candidate_map, tmp = CPU_MASK_NONE; | ||
147 | int err = -ENOSPC, len, nthreads, i; | ||
148 | const u32 *intserv; | ||
149 | |||
150 | intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); | ||
151 | if (!intserv) | ||
152 | return 0; | ||
153 | |||
154 | nthreads = len / sizeof(u32); | ||
155 | for (i = 0; i < nthreads; i++) | ||
156 | cpu_set(i, tmp); | ||
157 | |||
158 | lock_cpu_hotplug(); | ||
159 | |||
160 | BUG_ON(!cpus_subset(cpu_present_map, cpu_possible_map)); | ||
161 | |||
162 | /* Get a bitmap of unoccupied slots. */ | ||
163 | cpus_xor(candidate_map, cpu_possible_map, cpu_present_map); | ||
164 | if (cpus_empty(candidate_map)) { | ||
165 | /* If we get here, it most likely means that NR_CPUS is | ||
166 | * less than the partition's max processors setting. | ||
167 | */ | ||
168 | printk(KERN_ERR "Cannot add cpu %s; this system configuration" | ||
169 | " supports %d logical cpus.\n", np->full_name, | ||
170 | cpus_weight(cpu_possible_map)); | ||
171 | goto out_unlock; | ||
172 | } | ||
173 | |||
174 | while (!cpus_empty(tmp)) | ||
175 | if (cpus_subset(tmp, candidate_map)) | ||
176 | /* Found a range where we can insert the new cpu(s) */ | ||
177 | break; | ||
178 | else | ||
179 | cpus_shift_left(tmp, tmp, nthreads); | ||
180 | |||
181 | if (cpus_empty(tmp)) { | ||
182 | printk(KERN_ERR "Unable to find space in cpu_present_map for" | ||
183 | " processor %s with %d thread(s)\n", np->name, | ||
184 | nthreads); | ||
185 | goto out_unlock; | ||
186 | } | ||
187 | |||
188 | for_each_cpu_mask(cpu, tmp) { | ||
189 | BUG_ON(cpu_isset(cpu, cpu_present_map)); | ||
190 | cpu_set(cpu, cpu_present_map); | ||
191 | set_hard_smp_processor_id(cpu, *intserv++); | ||
192 | } | ||
193 | err = 0; | ||
194 | out_unlock: | ||
195 | unlock_cpu_hotplug(); | ||
196 | return err; | ||
197 | } | ||
198 | |||
199 | /* | ||
200 | * Update the present map for a cpu node which is going away, and set | ||
201 | * the hard id in the paca(s) to -1 to be consistent with boot time | ||
202 | * convention for non-present cpus. | ||
203 | */ | ||
204 | static void pSeries_remove_processor(struct device_node *np) | ||
205 | { | ||
206 | unsigned int cpu; | ||
207 | int len, nthreads, i; | ||
208 | const u32 *intserv; | ||
209 | |||
210 | intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len); | ||
211 | if (!intserv) | ||
212 | return; | ||
213 | |||
214 | nthreads = len / sizeof(u32); | ||
215 | |||
216 | lock_cpu_hotplug(); | ||
217 | for (i = 0; i < nthreads; i++) { | ||
218 | for_each_present_cpu(cpu) { | ||
219 | if (get_hard_smp_processor_id(cpu) != intserv[i]) | ||
220 | continue; | ||
221 | BUG_ON(cpu_online(cpu)); | ||
222 | cpu_clear(cpu, cpu_present_map); | ||
223 | set_hard_smp_processor_id(cpu, -1); | ||
224 | break; | ||
225 | } | ||
226 | if (cpu == NR_CPUS) | ||
227 | printk(KERN_WARNING "Could not find cpu to remove " | ||
228 | "with physical id 0x%x\n", intserv[i]); | ||
229 | } | ||
230 | unlock_cpu_hotplug(); | ||
231 | } | ||
232 | |||
233 | static int pSeries_smp_notifier(struct notifier_block *nb, unsigned long action, void *node) | ||
234 | { | ||
235 | int err = NOTIFY_OK; | ||
236 | |||
237 | switch (action) { | ||
238 | case PSERIES_RECONFIG_ADD: | ||
239 | if (pSeries_add_processor(node)) | ||
240 | err = NOTIFY_BAD; | ||
241 | break; | ||
242 | case PSERIES_RECONFIG_REMOVE: | ||
243 | pSeries_remove_processor(node); | ||
244 | break; | ||
245 | default: | ||
246 | err = NOTIFY_DONE; | ||
247 | break; | ||
248 | } | ||
249 | return err; | ||
250 | } | ||
251 | |||
252 | static struct notifier_block pSeries_smp_nb = { | ||
253 | .notifier_call = pSeries_smp_notifier, | ||
254 | }; | ||
255 | |||
256 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
257 | |||
258 | /** | 67 | /** |
259 | * smp_startup_cpu() - start the given cpu | 68 | * smp_startup_cpu() - start the given cpu |
260 | * | 69 | * |
@@ -422,15 +231,6 @@ static void __init smp_init_pseries(void) | |||
422 | 231 | ||
423 | DBG(" -> smp_init_pSeries()\n"); | 232 | DBG(" -> smp_init_pSeries()\n"); |
424 | 233 | ||
425 | #ifdef CONFIG_HOTPLUG_CPU | ||
426 | smp_ops->cpu_disable = pSeries_cpu_disable; | ||
427 | smp_ops->cpu_die = pSeries_cpu_die; | ||
428 | |||
429 | /* Processors can be added/removed only on LPAR */ | ||
430 | if (firmware_has_feature(FW_FEATURE_LPAR)) | ||
431 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); | ||
432 | #endif | ||
433 | |||
434 | /* Mark threads which are still spinning in hold loops. */ | 234 | /* Mark threads which are still spinning in hold loops. */ |
435 | if (cpu_has_feature(CPU_FTR_SMT)) { | 235 | if (cpu_has_feature(CPU_FTR_SMT)) { |
436 | for_each_present_cpu(i) { | 236 | for_each_present_cpu(i) { |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 6cc34597a620..04d4917eb303 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -5,7 +5,8 @@ endif | |||
5 | obj-$(CONFIG_MPIC) += mpic.o | 5 | obj-$(CONFIG_MPIC) += mpic.o |
6 | obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o | 6 | obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o |
7 | obj-$(CONFIG_PPC_MPC106) += grackle.o | 7 | obj-$(CONFIG_PPC_MPC106) += grackle.o |
8 | obj-$(CONFIG_PPC_DCR) += dcr.o dcr-low.o | 8 | obj-$(CONFIG_PPC_DCR) += dcr.o |
9 | obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o | ||
9 | obj-$(CONFIG_U3_DART) += dart_iommu.o | 10 | obj-$(CONFIG_U3_DART) += dart_iommu.o |
10 | obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o | 11 | obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o |
11 | obj-$(CONFIG_FSL_SOC) += fsl_soc.o | 12 | obj-$(CONFIG_FSL_SOC) += fsl_soc.o |
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S deleted file mode 100644 index 2078f39e2f17..000000000000 --- a/arch/powerpc/sysdev/dcr.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * "Indirect" DCR access | ||
3 | * | ||
4 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <asm/ppc_asm.h> | ||
13 | #include <asm/processor.h> | ||
14 | |||
15 | #define DCR_ACCESS_PROLOG(table) \ | ||
16 | rlwinm r3,r3,4,18,27; \ | ||
17 | lis r5,table@h; \ | ||
18 | ori r5,r5,table@l; \ | ||
19 | add r3,r3,r5; \ | ||
20 | mtctr r3; \ | ||
21 | bctr | ||
22 | |||
23 | _GLOBAL(__mfdcr) | ||
24 | DCR_ACCESS_PROLOG(__mfdcr_table) | ||
25 | |||
26 | _GLOBAL(__mtdcr) | ||
27 | DCR_ACCESS_PROLOG(__mtdcr_table) | ||
28 | |||
29 | __mfdcr_table: | ||
30 | mfdcr r3,0; blr | ||
31 | __mtdcr_table: | ||
32 | mtdcr 0,r4; blr | ||
33 | |||
34 | dcr = 1 | ||
35 | .rept 1023 | ||
36 | mfdcr r3,dcr; blr | ||
37 | mtdcr dcr,r4; blr | ||
38 | dcr = dcr + 1 | ||
39 | .endr | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 6995f51b9488..74e48d94f27c 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
@@ -223,23 +223,15 @@ static void qe_ic_mask_irq(unsigned int virq) | |||
223 | qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, | 223 | qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, |
224 | temp & ~qe_ic_info[src].mask); | 224 | temp & ~qe_ic_info[src].mask); |
225 | 225 | ||
226 | spin_unlock_irqrestore(&qe_ic_lock, flags); | 226 | /* Flush the above write before enabling interrupts; otherwise, |
227 | } | 227 | * spurious interrupts will sometimes happen. To be 100% sure |
228 | 228 | * that the write has reached the device before interrupts are | |
229 | static void qe_ic_mask_irq_and_ack(unsigned int virq) | 229 | * enabled, the mask register would have to be read back; however, |
230 | { | 230 | * this is not required for correctness, only to avoid wasting |
231 | struct qe_ic *qe_ic = qe_ic_from_irq(virq); | 231 | * time on a large number of spurious interrupts. In testing, |
232 | unsigned int src = virq_to_hw(virq); | 232 | * a sync reduced the observed spurious interrupts to zero. |
233 | unsigned long flags; | 233 | */ |
234 | u32 temp; | 234 | mb(); |
235 | |||
236 | spin_lock_irqsave(&qe_ic_lock, flags); | ||
237 | |||
238 | temp = qe_ic_read(qe_ic->regs, qe_ic_info[src].mask_reg); | ||
239 | qe_ic_write(qe_ic->regs, qe_ic_info[src].mask_reg, | ||
240 | temp & ~qe_ic_info[src].mask); | ||
241 | |||
242 | /* There is nothing to do for ack here, ack is handled in ISR */ | ||
243 | 235 | ||
244 | spin_unlock_irqrestore(&qe_ic_lock, flags); | 236 | spin_unlock_irqrestore(&qe_ic_lock, flags); |
245 | } | 237 | } |
@@ -248,7 +240,7 @@ static struct irq_chip qe_ic_irq_chip = { | |||
248 | .typename = " QEIC ", | 240 | .typename = " QEIC ", |
249 | .unmask = qe_ic_unmask_irq, | 241 | .unmask = qe_ic_unmask_irq, |
250 | .mask = qe_ic_mask_irq, | 242 | .mask = qe_ic_mask_irq, |
251 | .mask_ack = qe_ic_mask_irq_and_ack, | 243 | .mask_ack = qe_ic_mask_irq, |
252 | }; | 244 | }; |
253 | 245 | ||
254 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) | 246 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) |
@@ -331,34 +323,22 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) | |||
331 | return irq_linear_revmap(qe_ic->irqhost, irq); | 323 | return irq_linear_revmap(qe_ic->irqhost, irq); |
332 | } | 324 | } |
333 | 325 | ||
334 | /* FIXME: We mask all the QE Low interrupts while handling. We should | ||
335 | * let other interrupt come in, but BAD interrupts are generated */ | ||
336 | void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc) | 326 | void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc) |
337 | { | 327 | { |
338 | struct qe_ic *qe_ic = desc->handler_data; | 328 | struct qe_ic *qe_ic = desc->handler_data; |
339 | struct irq_chip *chip = irq_desc[irq].chip; | ||
340 | |||
341 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 329 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
342 | 330 | ||
343 | chip->mask_ack(irq); | ||
344 | if (cascade_irq != NO_IRQ) | 331 | if (cascade_irq != NO_IRQ) |
345 | generic_handle_irq(cascade_irq); | 332 | generic_handle_irq(cascade_irq); |
346 | chip->unmask(irq); | ||
347 | } | 333 | } |
348 | 334 | ||
349 | /* FIXME: We mask all the QE High interrupts while handling. We should | ||
350 | * let other interrupt come in, but BAD interrupts are generated */ | ||
351 | void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc) | 335 | void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc) |
352 | { | 336 | { |
353 | struct qe_ic *qe_ic = desc->handler_data; | 337 | struct qe_ic *qe_ic = desc->handler_data; |
354 | struct irq_chip *chip = irq_desc[irq].chip; | ||
355 | |||
356 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 338 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
357 | 339 | ||
358 | chip->mask_ack(irq); | ||
359 | if (cascade_irq != NO_IRQ) | 340 | if (cascade_irq != NO_IRQ) |
360 | generic_handle_irq(cascade_irq); | 341 | generic_handle_irq(cascade_irq); |
361 | chip->unmask(irq); | ||
362 | } | 342 | } |
363 | 343 | ||
364 | void __init qe_ic_init(struct device_node *node, unsigned int flags) | 344 | void __init qe_ic_init(struct device_node *node, unsigned int flags) |
diff --git a/arch/powerpc/sysdev/rom.c b/arch/powerpc/sysdev/rom.c index bf5b3f10e6c6..c855a3b298a3 100644 --- a/arch/powerpc/sysdev/rom.c +++ b/arch/powerpc/sysdev/rom.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <asm/of_device.h> | 11 | #include <asm/of_device.h> |
12 | #include <asm/of_platform.h> | ||
12 | 13 | ||
13 | static int __init powerpc_flash_init(void) | 14 | static int __init powerpc_flash_init(void) |
14 | { | 15 | { |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index a34ed49e0356..77540a2f7704 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/sysrq.h> | 22 | #include <linux/sysrq.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/bug.h> | ||
25 | 26 | ||
26 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
27 | #include <asm/string.h> | 28 | #include <asm/string.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <asm/cputable.h> | 36 | #include <asm/cputable.h> |
36 | #include <asm/rtas.h> | 37 | #include <asm/rtas.h> |
37 | #include <asm/sstep.h> | 38 | #include <asm/sstep.h> |
38 | #include <asm/bug.h> | ||
39 | #include <asm/irq_regs.h> | 39 | #include <asm/irq_regs.h> |
40 | #include <asm/spu.h> | 40 | #include <asm/spu.h> |
41 | #include <asm/spu_priv1.h> | 41 | #include <asm/spu_priv1.h> |
@@ -1346,7 +1346,7 @@ static void backtrace(struct pt_regs *excp) | |||
1346 | 1346 | ||
1347 | static void print_bug_trap(struct pt_regs *regs) | 1347 | static void print_bug_trap(struct pt_regs *regs) |
1348 | { | 1348 | { |
1349 | struct bug_entry *bug; | 1349 | const struct bug_entry *bug; |
1350 | unsigned long addr; | 1350 | unsigned long addr; |
1351 | 1351 | ||
1352 | if (regs->msr & MSR_PR) | 1352 | if (regs->msr & MSR_PR) |
@@ -1357,11 +1357,11 @@ static void print_bug_trap(struct pt_regs *regs) | |||
1357 | bug = find_bug(regs->nip); | 1357 | bug = find_bug(regs->nip); |
1358 | if (bug == NULL) | 1358 | if (bug == NULL) |
1359 | return; | 1359 | return; |
1360 | if (bug->line & BUG_WARNING_TRAP) | 1360 | if (is_warning_bug(bug)) |
1361 | return; | 1361 | return; |
1362 | 1362 | ||
1363 | printf("kernel BUG in %s at %s:%d!\n", | 1363 | printf("kernel BUG at %s:%u!\n", |
1364 | bug->function, bug->file, (unsigned int)bug->line); | 1364 | bug->file, bug->line); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | void excprint(struct pt_regs *fp) | 1367 | void excprint(struct pt_regs *fp) |
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index 959d31c26cbb..c71ef3c2e7bf 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c | |||
@@ -2165,7 +2165,7 @@ static int sq_release(struct inode *inode, struct file *file) | |||
2165 | int rc = 0; | 2165 | int rc = 0; |
2166 | 2166 | ||
2167 | if (sq.busy) | 2167 | if (sq.busy) |
2168 | rc = sq_fsync(file, file->f_dentry); | 2168 | rc = sq_fsync(file, file->f_path.dentry); |
2169 | sound.soft = sound.dsp; | 2169 | sound.soft = sound.dsp; |
2170 | sound.hard = sound.dsp; | 2170 | sound.hard = sound.dsp; |
2171 | sound_silence(); | 2171 | sound_silence(); |
@@ -2218,25 +2218,25 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
2218 | return 0; | 2218 | return 0; |
2219 | case SNDCTL_DSP_POST: | 2219 | case SNDCTL_DSP_POST: |
2220 | case SNDCTL_DSP_SYNC: | 2220 | case SNDCTL_DSP_SYNC: |
2221 | return sq_fsync(file, file->f_dentry); | 2221 | return sq_fsync(file, file->f_path.dentry); |
2222 | 2222 | ||
2223 | /* ++TeSche: before changing any of these it's | 2223 | /* ++TeSche: before changing any of these it's |
2224 | * probably wise to wait until sound playing has | 2224 | * probably wise to wait until sound playing has |
2225 | * settled down. */ | 2225 | * settled down. */ |
2226 | case SNDCTL_DSP_SPEED: | 2226 | case SNDCTL_DSP_SPEED: |
2227 | sq_fsync(file, file->f_dentry); | 2227 | sq_fsync(file, file->f_path.dentry); |
2228 | IOCTL_IN(arg, data); | 2228 | IOCTL_IN(arg, data); |
2229 | return IOCTL_OUT(arg, sound_set_speed(data)); | 2229 | return IOCTL_OUT(arg, sound_set_speed(data)); |
2230 | case SNDCTL_DSP_STEREO: | 2230 | case SNDCTL_DSP_STEREO: |
2231 | sq_fsync(file, file->f_dentry); | 2231 | sq_fsync(file, file->f_path.dentry); |
2232 | IOCTL_IN(arg, data); | 2232 | IOCTL_IN(arg, data); |
2233 | return IOCTL_OUT(arg, sound_set_stereo(data)); | 2233 | return IOCTL_OUT(arg, sound_set_stereo(data)); |
2234 | case SOUND_PCM_WRITE_CHANNELS: | 2234 | case SOUND_PCM_WRITE_CHANNELS: |
2235 | sq_fsync(file, file->f_dentry); | 2235 | sq_fsync(file, file->f_path.dentry); |
2236 | IOCTL_IN(arg, data); | 2236 | IOCTL_IN(arg, data); |
2237 | return IOCTL_OUT(arg, sound_set_stereo(data-1)+1); | 2237 | return IOCTL_OUT(arg, sound_set_stereo(data-1)+1); |
2238 | case SNDCTL_DSP_SETFMT: | 2238 | case SNDCTL_DSP_SETFMT: |
2239 | sq_fsync(file, file->f_dentry); | 2239 | sq_fsync(file, file->f_path.dentry); |
2240 | IOCTL_IN(arg, data); | 2240 | IOCTL_IN(arg, data); |
2241 | return IOCTL_OUT(arg, sound_set_format(data)); | 2241 | return IOCTL_OUT(arg, sound_set_format(data)); |
2242 | case SNDCTL_DSP_GETFMTS: | 2242 | case SNDCTL_DSP_GETFMTS: |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index edf71a4ecc95..692b5ba53209 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -19,6 +19,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
19 | bool | 19 | bool |
20 | default y | 20 | default y |
21 | 21 | ||
22 | config ARCH_HAS_ILOG2_U32 | ||
23 | bool | ||
24 | default y | ||
25 | |||
26 | config ARCH_HAS_ILOG2_U64 | ||
27 | bool | ||
28 | default n | ||
29 | |||
22 | config GENERIC_HWEIGHT | 30 | config GENERIC_HWEIGHT |
23 | bool | 31 | bool |
24 | default y | 32 | default y |
@@ -52,6 +60,11 @@ config ARCH_MAY_HAVE_PC_FDC | |||
52 | bool | 60 | bool |
53 | default y | 61 | default y |
54 | 62 | ||
63 | config GENERIC_BUG | ||
64 | bool | ||
65 | default y | ||
66 | depends on BUG | ||
67 | |||
55 | source "init/Kconfig" | 68 | source "init/Kconfig" |
56 | 69 | ||
57 | menu "Processor" | 70 | menu "Processor" |
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 63808e01cb0b..5e723c4c2571 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -879,7 +879,7 @@ pci_resource_to_bus(struct pci_dev *pdev, struct resource *res) | |||
879 | 879 | ||
880 | 880 | ||
881 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | 881 | static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, |
882 | unsigned long *offset, | 882 | resource_size_t *offset, |
883 | enum pci_mmap_state mmap_state) | 883 | enum pci_mmap_state mmap_state) |
884 | { | 884 | { |
885 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 885 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
@@ -891,7 +891,9 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | |||
891 | 891 | ||
892 | /* If memory, add on the PCI bridge address offset */ | 892 | /* If memory, add on the PCI bridge address offset */ |
893 | if (mmap_state == pci_mmap_mem) { | 893 | if (mmap_state == pci_mmap_mem) { |
894 | #if 0 /* See comment in pci_resource_to_user() for why this is disabled */ | ||
894 | *offset += hose->pci_mem_offset; | 895 | *offset += hose->pci_mem_offset; |
896 | #endif | ||
895 | res_bit = IORESOURCE_MEM; | 897 | res_bit = IORESOURCE_MEM; |
896 | } else { | 898 | } else { |
897 | io_offset = hose->io_base_virt - ___IO_BASE; | 899 | io_offset = hose->io_base_virt - ___IO_BASE; |
@@ -1030,7 +1032,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
1030 | enum pci_mmap_state mmap_state, | 1032 | enum pci_mmap_state mmap_state, |
1031 | int write_combine) | 1033 | int write_combine) |
1032 | { | 1034 | { |
1033 | unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; | 1035 | resource_size_t offset = vma->vm_pgoff << PAGE_SHIFT; |
1034 | struct resource *rp; | 1036 | struct resource *rp; |
1035 | int ret; | 1037 | int ret; |
1036 | 1038 | ||
@@ -1132,21 +1134,42 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
1132 | resource_size_t *start, resource_size_t *end) | 1134 | resource_size_t *start, resource_size_t *end) |
1133 | { | 1135 | { |
1134 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | 1136 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); |
1135 | unsigned long offset = 0; | 1137 | resource_size_t offset = 0; |
1136 | 1138 | ||
1137 | if (hose == NULL) | 1139 | if (hose == NULL) |
1138 | return; | 1140 | return; |
1139 | 1141 | ||
1140 | if (rsrc->flags & IORESOURCE_IO) | 1142 | if (rsrc->flags & IORESOURCE_IO) |
1141 | offset = ___IO_BASE - hose->io_base_virt + hose->io_base_phys; | 1143 | offset = (unsigned long)hose->io_base_virt - _IO_BASE; |
1144 | |||
1145 | /* We pass a fully fixed up address to userland for MMIO instead of | ||
1146 | * a BAR value because X is lame and expects to be able to use that | ||
1147 | * to pass to /dev/mem ! | ||
1148 | * | ||
1149 | * That means that we'll have potentially 64 bits values where some | ||
1150 | * userland apps only expect 32 (like X itself since it thinks only | ||
1151 | * Sparc has 64 bits MMIO) but if we don't do that, we break it on | ||
1152 | * 32 bits CHRPs :-( | ||
1153 | * | ||
1154 | * Hopefully, the sysfs insterface is immune to that gunk. Once X | ||
1155 | * has been fixed (and the fix spread enough), we can re-enable the | ||
1156 | * 2 lines below and pass down a BAR value to userland. In that case | ||
1157 | * we'll also have to re-enable the matching code in | ||
1158 | * __pci_mmap_make_offset(). | ||
1159 | * | ||
1160 | * BenH. | ||
1161 | */ | ||
1162 | #if 0 | ||
1163 | else if (rsrc->flags & IORESOURCE_MEM) | ||
1164 | offset = hose->pci_mem_offset; | ||
1165 | #endif | ||
1142 | 1166 | ||
1143 | *start = rsrc->start + offset; | 1167 | *start = rsrc->start - offset; |
1144 | *end = rsrc->end + offset; | 1168 | *end = rsrc->end - offset; |
1145 | } | 1169 | } |
1146 | 1170 | ||
1147 | void __init | 1171 | void __init pci_init_resource(struct resource *res, resource_size_t start, |
1148 | pci_init_resource(struct resource *res, unsigned long start, unsigned long end, | 1172 | resource_size_t end, int flags, char *name) |
1149 | int flags, char *name) | ||
1150 | { | 1173 | { |
1151 | res->start = start; | 1174 | res->start = start; |
1152 | res->end = end; | 1175 | res->end = end; |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 2f835b9e95e4..810f7aa72e92 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/prctl.h> | 30 | #include <linux/prctl.h> |
31 | #include <linux/bug.h> | ||
31 | 32 | ||
32 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
@@ -559,64 +560,9 @@ static void emulate_single_step(struct pt_regs *regs) | |||
559 | } | 560 | } |
560 | } | 561 | } |
561 | 562 | ||
562 | /* | 563 | int is_valid_bugaddr(unsigned long addr) |
563 | * Look through the list of trap instructions that are used for BUG(), | ||
564 | * BUG_ON() and WARN_ON() and see if we hit one. At this point we know | ||
565 | * that the exception was caused by a trap instruction of some kind. | ||
566 | * Returns 1 if we should continue (i.e. it was a WARN_ON) or 0 | ||
567 | * otherwise. | ||
568 | */ | ||
569 | extern struct bug_entry __start___bug_table[], __stop___bug_table[]; | ||
570 | |||
571 | #ifndef CONFIG_MODULES | ||
572 | #define module_find_bug(x) NULL | ||
573 | #endif | ||
574 | |||
575 | struct bug_entry *find_bug(unsigned long bugaddr) | ||
576 | { | ||
577 | struct bug_entry *bug; | ||
578 | |||
579 | for (bug = __start___bug_table; bug < __stop___bug_table; ++bug) | ||
580 | if (bugaddr == bug->bug_addr) | ||
581 | return bug; | ||
582 | return module_find_bug(bugaddr); | ||
583 | } | ||
584 | |||
585 | int check_bug_trap(struct pt_regs *regs) | ||
586 | { | 564 | { |
587 | struct bug_entry *bug; | 565 | return addr >= PAGE_OFFSET; |
588 | unsigned long addr; | ||
589 | |||
590 | if (regs->msr & MSR_PR) | ||
591 | return 0; /* not in kernel */ | ||
592 | addr = regs->nip; /* address of trap instruction */ | ||
593 | if (addr < PAGE_OFFSET) | ||
594 | return 0; | ||
595 | bug = find_bug(regs->nip); | ||
596 | if (bug == NULL) | ||
597 | return 0; | ||
598 | if (bug->line & BUG_WARNING_TRAP) { | ||
599 | /* this is a WARN_ON rather than BUG/BUG_ON */ | ||
600 | #ifdef CONFIG_XMON | ||
601 | xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n", | ||
602 | bug->function, bug->file, | ||
603 | bug->line & ~BUG_WARNING_TRAP); | ||
604 | #endif /* CONFIG_XMON */ | ||
605 | printk(KERN_ERR "Badness in %s at %s:%ld\n", | ||
606 | bug->function, bug->file, | ||
607 | bug->line & ~BUG_WARNING_TRAP); | ||
608 | dump_stack(); | ||
609 | return 1; | ||
610 | } | ||
611 | #ifdef CONFIG_XMON | ||
612 | xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
613 | bug->function, bug->file, bug->line); | ||
614 | xmon(regs); | ||
615 | #endif /* CONFIG_XMON */ | ||
616 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", | ||
617 | bug->function, bug->file, bug->line); | ||
618 | |||
619 | return 0; | ||
620 | } | 566 | } |
621 | 567 | ||
622 | void program_check_exception(struct pt_regs *regs) | 568 | void program_check_exception(struct pt_regs *regs) |
@@ -671,7 +617,9 @@ void program_check_exception(struct pt_regs *regs) | |||
671 | /* trap exception */ | 617 | /* trap exception */ |
672 | if (debugger_bpt(regs)) | 618 | if (debugger_bpt(regs)) |
673 | return; | 619 | return; |
674 | if (check_bug_trap(regs)) { | 620 | |
621 | if (!(regs->msr & MSR_PR) && /* not user-mode */ | ||
622 | report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { | ||
675 | regs->nip += 4; | 623 | regs->nip += 4; |
676 | return; | 624 | return; |
677 | } | 625 | } |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 583d9ff0a571..ff690564edbd 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -22,6 +22,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
22 | bool | 22 | bool |
23 | default y | 23 | default y |
24 | 24 | ||
25 | config ARCH_HAS_ILOG2_U32 | ||
26 | bool | ||
27 | default n | ||
28 | |||
29 | config ARCH_HAS_ILOG2_U64 | ||
30 | bool | ||
31 | default n | ||
32 | |||
25 | config GENERIC_HWEIGHT | 33 | config GENERIC_HWEIGHT |
26 | bool | 34 | bool |
27 | default y | 35 | default y |
@@ -233,8 +241,14 @@ config WARN_STACK_SIZE | |||
233 | This allows you to specify the maximum frame size a function may | 241 | This allows you to specify the maximum frame size a function may |
234 | have without the compiler complaining about it. | 242 | have without the compiler complaining about it. |
235 | 243 | ||
244 | config ARCH_POPULATES_NODE_MAP | ||
245 | def_bool y | ||
246 | |||
236 | source "mm/Kconfig" | 247 | source "mm/Kconfig" |
237 | 248 | ||
249 | config HOLES_IN_ZONE | ||
250 | def_bool y | ||
251 | |||
238 | comment "I/O subsystem configuration" | 252 | comment "I/O subsystem configuration" |
239 | 253 | ||
240 | config MACHCHK_WARNING | 254 | config MACHCHK_WARNING |
@@ -258,14 +272,6 @@ config QDIO | |||
258 | 272 | ||
259 | If unsure, say Y. | 273 | If unsure, say Y. |
260 | 274 | ||
261 | config QDIO_PERF_STATS | ||
262 | bool "Performance statistics in /proc" | ||
263 | depends on QDIO | ||
264 | help | ||
265 | Say Y here to get performance statistics in /proc/qdio_perf | ||
266 | |||
267 | If unsure, say N. | ||
268 | |||
269 | config QDIO_DEBUG | 275 | config QDIO_DEBUG |
270 | bool "Extended debugging information" | 276 | bool "Extended debugging information" |
271 | depends on QDIO | 277 | depends on QDIO |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 7cd51e73e274..a6ec919ba83f 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -134,7 +134,6 @@ CONFIG_RESOURCES_64BIT=y | |||
134 | # | 134 | # |
135 | CONFIG_MACHCHK_WARNING=y | 135 | CONFIG_MACHCHK_WARNING=y |
136 | CONFIG_QDIO=y | 136 | CONFIG_QDIO=y |
137 | # CONFIG_QDIO_PERF_STATS is not set | ||
138 | # CONFIG_QDIO_DEBUG is not set | 137 | # CONFIG_QDIO_DEBUG is not set |
139 | 138 | ||
140 | # | 139 | # |
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index cd702ae45d6d..b6716c4b9934 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -109,7 +109,7 @@ static void hypfs_drop_inode(struct inode *inode) | |||
109 | 109 | ||
110 | static int hypfs_open(struct inode *inode, struct file *filp) | 110 | static int hypfs_open(struct inode *inode, struct file *filp) |
111 | { | 111 | { |
112 | char *data = filp->f_dentry->d_inode->i_private; | 112 | char *data = filp->f_path.dentry->d_inode->i_private; |
113 | struct hypfs_sb_info *fs_info; | 113 | struct hypfs_sb_info *fs_info; |
114 | 114 | ||
115 | if (filp->f_mode & FMODE_WRITE) { | 115 | if (filp->f_mode & FMODE_WRITE) { |
@@ -174,7 +174,7 @@ static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
174 | struct hypfs_sb_info *fs_info; | 174 | struct hypfs_sb_info *fs_info; |
175 | size_t count = iov_length(iov, nr_segs); | 175 | size_t count = iov_length(iov, nr_segs); |
176 | 176 | ||
177 | sb = iocb->ki_filp->f_dentry->d_inode->i_sb; | 177 | sb = iocb->ki_filp->f_path.dentry->d_inode->i_sb; |
178 | fs_info = sb->s_fs_info; | 178 | fs_info = sb->s_fs_info; |
179 | /* | 179 | /* |
180 | * Currently we only allow one update per second for two reasons: | 180 | * Currently we only allow one update per second for two reasons: |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 43f3d0c7e132..ef5266fbce62 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -603,13 +603,13 @@ debug_open(struct inode *inode, struct file *file) | |||
603 | debug_info_t *debug_info, *debug_info_snapshot; | 603 | debug_info_t *debug_info, *debug_info_snapshot; |
604 | 604 | ||
605 | down(&debug_lock); | 605 | down(&debug_lock); |
606 | debug_info = file->f_dentry->d_inode->i_private; | 606 | debug_info = file->f_path.dentry->d_inode->i_private; |
607 | /* find debug view */ | 607 | /* find debug view */ |
608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { | 608 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { |
609 | if (!debug_info->views[i]) | 609 | if (!debug_info->views[i]) |
610 | continue; | 610 | continue; |
611 | else if (debug_info->debugfs_entries[i] == | 611 | else if (debug_info->debugfs_entries[i] == |
612 | file->f_dentry) { | 612 | file->f_path.dentry) { |
613 | goto found; /* found view ! */ | 613 | goto found; /* found view ! */ |
614 | } | 614 | } |
615 | } | 615 | } |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b928fecdc743..49ef206ec880 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -64,9 +64,8 @@ unsigned int console_devno = -1; | |||
64 | unsigned int console_irq = -1; | 64 | unsigned int console_irq = -1; |
65 | unsigned long machine_flags = 0; | 65 | unsigned long machine_flags = 0; |
66 | 66 | ||
67 | struct mem_chunk memory_chunk[MEMORY_CHUNKS]; | 67 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; |
68 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ | 68 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ |
69 | unsigned long __initdata zholes_size[MAX_NR_ZONES]; | ||
70 | static unsigned long __initdata memory_end; | 69 | static unsigned long __initdata memory_end; |
71 | 70 | ||
72 | /* | 71 | /* |
@@ -354,21 +353,6 @@ void machine_power_off(void) | |||
354 | */ | 353 | */ |
355 | void (*pm_power_off)(void) = machine_power_off; | 354 | void (*pm_power_off)(void) = machine_power_off; |
356 | 355 | ||
357 | static void __init | ||
358 | add_memory_hole(unsigned long start, unsigned long end) | ||
359 | { | ||
360 | unsigned long dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
361 | |||
362 | if (end <= dma_pfn) | ||
363 | zholes_size[ZONE_DMA] += end - start + 1; | ||
364 | else if (start > dma_pfn) | ||
365 | zholes_size[ZONE_NORMAL] += end - start + 1; | ||
366 | else { | ||
367 | zholes_size[ZONE_DMA] += dma_pfn - start + 1; | ||
368 | zholes_size[ZONE_NORMAL] += end - dma_pfn; | ||
369 | } | ||
370 | } | ||
371 | |||
372 | static int __init early_parse_mem(char *p) | 356 | static int __init early_parse_mem(char *p) |
373 | { | 357 | { |
374 | memory_end = memparse(p, &p); | 358 | memory_end = memparse(p, &p); |
@@ -521,7 +505,6 @@ setup_memory(void) | |||
521 | { | 505 | { |
522 | unsigned long bootmap_size; | 506 | unsigned long bootmap_size; |
523 | unsigned long start_pfn, end_pfn, init_pfn; | 507 | unsigned long start_pfn, end_pfn, init_pfn; |
524 | unsigned long last_rw_end; | ||
525 | int i; | 508 | int i; |
526 | 509 | ||
527 | /* | 510 | /* |
@@ -577,39 +560,27 @@ setup_memory(void) | |||
577 | /* | 560 | /* |
578 | * Register RAM areas with the bootmem allocator. | 561 | * Register RAM areas with the bootmem allocator. |
579 | */ | 562 | */ |
580 | last_rw_end = start_pfn; | ||
581 | 563 | ||
582 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | 564 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { |
583 | unsigned long start_chunk, end_chunk; | 565 | unsigned long start_chunk, end_chunk, pfn; |
584 | 566 | ||
585 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | 567 | if (memory_chunk[i].type != CHUNK_READ_WRITE) |
586 | continue; | 568 | continue; |
587 | start_chunk = (memory_chunk[i].addr + PAGE_SIZE - 1); | 569 | start_chunk = PFN_DOWN(memory_chunk[i].addr); |
588 | start_chunk >>= PAGE_SHIFT; | 570 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; |
589 | end_chunk = (memory_chunk[i].addr + memory_chunk[i].size); | 571 | end_chunk = min(end_chunk, end_pfn); |
590 | end_chunk >>= PAGE_SHIFT; | 572 | if (start_chunk >= end_chunk) |
591 | if (start_chunk < start_pfn) | 573 | continue; |
592 | start_chunk = start_pfn; | 574 | add_active_range(0, start_chunk, end_chunk); |
593 | if (end_chunk > end_pfn) | 575 | pfn = max(start_chunk, start_pfn); |
594 | end_chunk = end_pfn; | 576 | for (; pfn <= end_chunk; pfn++) |
595 | if (start_chunk < end_chunk) { | 577 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); |
596 | /* Initialize storage key for RAM pages */ | ||
597 | for (init_pfn = start_chunk ; init_pfn < end_chunk; | ||
598 | init_pfn++) | ||
599 | page_set_storage_key(init_pfn << PAGE_SHIFT, | ||
600 | PAGE_DEFAULT_KEY); | ||
601 | free_bootmem(start_chunk << PAGE_SHIFT, | ||
602 | (end_chunk - start_chunk) << PAGE_SHIFT); | ||
603 | if (last_rw_end < start_chunk) | ||
604 | add_memory_hole(last_rw_end, start_chunk - 1); | ||
605 | last_rw_end = end_chunk; | ||
606 | } | ||
607 | } | 578 | } |
608 | 579 | ||
609 | psw_set_key(PAGE_DEFAULT_KEY); | 580 | psw_set_key(PAGE_DEFAULT_KEY); |
610 | 581 | ||
611 | if (last_rw_end < end_pfn - 1) | 582 | free_bootmem_with_active_regions(0, max_pfn); |
612 | add_memory_hole(last_rw_end, end_pfn - 1); | 583 | reserve_bootmem(0, PFN_PHYS(start_pfn)); |
613 | 584 | ||
614 | /* | 585 | /* |
615 | * Reserve the bootmem bitmap itself as well. We do this in two | 586 | * Reserve the bootmem bitmap itself as well. We do this in two |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 8741bdc09299..633249c3ba91 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -8,8 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <asm/uaccess.h> | ||
12 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <asm/uaccess.h> | ||
13 | #include <asm/futex.h> | 13 | #include <asm/futex.h> |
14 | 14 | ||
15 | static inline int __handle_fault(struct mm_struct *mm, unsigned long address, | 15 | static inline int __handle_fault(struct mm_struct *mm, unsigned long address, |
@@ -60,8 +60,9 @@ out: | |||
60 | 60 | ||
61 | out_of_memory: | 61 | out_of_memory: |
62 | up_read(&mm->mmap_sem); | 62 | up_read(&mm->mmap_sem); |
63 | if (current->pid == 1) { | 63 | if (is_init(current)) { |
64 | yield(); | 64 | yield(); |
65 | down_read(&mm->mmap_sem); | ||
65 | goto survive; | 66 | goto survive; |
66 | } | 67 | } |
67 | printk("VM: killing process %s\n", current->comm); | 68 | printk("VM: killing process %s\n", current->comm); |
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index aa9a42b6e62d..8e09db1edbb9 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for the linux s390-specific parts of the memory manager. | 2 | # Makefile for the linux s390-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o fault.o ioremap.o extmem.o mmap.o | 5 | obj-y := init.o fault.o ioremap.o extmem.o mmap.o vmem.o |
6 | obj-$(CONFIG_CMM) += cmm.o | 6 | obj-$(CONFIG_CMM) += cmm.o |
7 | 7 | ||
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index 9e9bc48463a5..775bf19e742b 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/pgtable.h> | ||
19 | #include <asm/ebcdic.h> | 20 | #include <asm/ebcdic.h> |
20 | #include <asm/errno.h> | 21 | #include <asm/errno.h> |
21 | #include <asm/extmem.h> | 22 | #include <asm/extmem.h> |
@@ -238,65 +239,6 @@ query_segment_type (struct dcss_segment *seg) | |||
238 | } | 239 | } |
239 | 240 | ||
240 | /* | 241 | /* |
241 | * check if the given segment collides with guest storage. | ||
242 | * returns 1 if this is the case, 0 if no collision was found | ||
243 | */ | ||
244 | static int | ||
245 | segment_overlaps_storage(struct dcss_segment *seg) | ||
246 | { | ||
247 | int i; | ||
248 | |||
249 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
250 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | ||
251 | continue; | ||
252 | if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) | ||
253 | continue; | ||
254 | if (((memory_chunk[i].addr + memory_chunk[i].size - 1) >> 20) | ||
255 | < (seg->start_addr >> 20)) | ||
256 | continue; | ||
257 | return 1; | ||
258 | } | ||
259 | return 0; | ||
260 | } | ||
261 | |||
262 | /* | ||
263 | * check if segment collides with other segments that are currently loaded | ||
264 | * returns 1 if this is the case, 0 if no collision was found | ||
265 | */ | ||
266 | static int | ||
267 | segment_overlaps_others (struct dcss_segment *seg) | ||
268 | { | ||
269 | struct list_head *l; | ||
270 | struct dcss_segment *tmp; | ||
271 | |||
272 | BUG_ON(!mutex_is_locked(&dcss_lock)); | ||
273 | list_for_each(l, &dcss_list) { | ||
274 | tmp = list_entry(l, struct dcss_segment, list); | ||
275 | if ((tmp->start_addr >> 20) > (seg->end >> 20)) | ||
276 | continue; | ||
277 | if ((tmp->end >> 20) < (seg->start_addr >> 20)) | ||
278 | continue; | ||
279 | if (seg == tmp) | ||
280 | continue; | ||
281 | return 1; | ||
282 | } | ||
283 | return 0; | ||
284 | } | ||
285 | |||
286 | /* | ||
287 | * check if segment exceeds the kernel mapping range (detected or set via mem=) | ||
288 | * returns 1 if this is the case, 0 if segment fits into the range | ||
289 | */ | ||
290 | static inline int | ||
291 | segment_exceeds_range (struct dcss_segment *seg) | ||
292 | { | ||
293 | int seg_last_pfn = (seg->end) >> PAGE_SHIFT; | ||
294 | if (seg_last_pfn > max_pfn) | ||
295 | return 1; | ||
296 | return 0; | ||
297 | } | ||
298 | |||
299 | /* | ||
300 | * get info about a segment | 242 | * get info about a segment |
301 | * possible return values: | 243 | * possible return values: |
302 | * -ENOSYS : we are not running on VM | 244 | * -ENOSYS : we are not running on VM |
@@ -341,24 +283,26 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
341 | rc = query_segment_type (seg); | 283 | rc = query_segment_type (seg); |
342 | if (rc < 0) | 284 | if (rc < 0) |
343 | goto out_free; | 285 | goto out_free; |
344 | if (segment_exceeds_range(seg)) { | 286 | |
345 | PRINT_WARN ("segment_load: not loading segment %s - exceeds" | 287 | rc = add_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); |
346 | " kernel mapping range\n",name); | 288 | |
347 | rc = -ERANGE; | 289 | switch (rc) { |
290 | case 0: | ||
291 | break; | ||
292 | case -ENOSPC: | ||
293 | PRINT_WARN("segment_load: not loading segment %s - overlaps " | ||
294 | "storage/segment\n", name); | ||
348 | goto out_free; | 295 | goto out_free; |
349 | } | 296 | case -ERANGE: |
350 | if (segment_overlaps_storage(seg)) { | 297 | PRINT_WARN("segment_load: not loading segment %s - exceeds " |
351 | PRINT_WARN ("segment_load: not loading segment %s - overlaps" | 298 | "kernel mapping range\n", name); |
352 | " storage\n",name); | ||
353 | rc = -ENOSPC; | ||
354 | goto out_free; | 299 | goto out_free; |
355 | } | 300 | default: |
356 | if (segment_overlaps_others(seg)) { | 301 | PRINT_WARN("segment_load: not loading segment %s (rc: %d)\n", |
357 | PRINT_WARN ("segment_load: not loading segment %s - overlaps" | 302 | name, rc); |
358 | " other segments\n",name); | ||
359 | rc = -EBUSY; | ||
360 | goto out_free; | 303 | goto out_free; |
361 | } | 304 | } |
305 | |||
362 | if (do_nonshared) | 306 | if (do_nonshared) |
363 | dcss_command = DCSS_LOADNSR; | 307 | dcss_command = DCSS_LOADNSR; |
364 | else | 308 | else |
@@ -372,7 +316,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
372 | rc = dcss_diag_translate_rc (seg->end); | 316 | rc = dcss_diag_translate_rc (seg->end); |
373 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, | 317 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, |
374 | &seg->start_addr, &seg->end); | 318 | &seg->start_addr, &seg->end); |
375 | goto out_free; | 319 | goto out_shared; |
376 | } | 320 | } |
377 | seg->do_nonshared = do_nonshared; | 321 | seg->do_nonshared = do_nonshared; |
378 | atomic_set(&seg->ref_count, 1); | 322 | atomic_set(&seg->ref_count, 1); |
@@ -391,6 +335,8 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long | |||
391 | (void*)seg->start_addr, (void*)seg->end, | 335 | (void*)seg->start_addr, (void*)seg->end, |
392 | segtype_string[seg->vm_segtype]); | 336 | segtype_string[seg->vm_segtype]); |
393 | goto out; | 337 | goto out; |
338 | out_shared: | ||
339 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); | ||
394 | out_free: | 340 | out_free: |
395 | kfree(seg); | 341 | kfree(seg); |
396 | out: | 342 | out: |
@@ -530,12 +476,12 @@ segment_unload(char *name) | |||
530 | "please report to linux390@de.ibm.com\n",name); | 476 | "please report to linux390@de.ibm.com\n",name); |
531 | goto out_unlock; | 477 | goto out_unlock; |
532 | } | 478 | } |
533 | if (atomic_dec_return(&seg->ref_count) == 0) { | 479 | if (atomic_dec_return(&seg->ref_count) != 0) |
534 | list_del(&seg->list); | 480 | goto out_unlock; |
535 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, | 481 | remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); |
536 | &dummy, &dummy); | 482 | list_del(&seg->list); |
537 | kfree(seg); | 483 | dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); |
538 | } | 484 | kfree(seg); |
539 | out_unlock: | 485 | out_unlock: |
540 | mutex_unlock(&dcss_lock); | 486 | mutex_unlock(&dcss_lock); |
541 | } | 487 | } |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index e1881c31b1cb..4bb21be3b007 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/pfn.h> | 26 | #include <linux/pfn.h> |
27 | #include <linux/poison.h> | ||
27 | 28 | ||
28 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
29 | #include <asm/system.h> | 30 | #include <asm/system.h> |
@@ -69,6 +70,8 @@ void show_mem(void) | |||
69 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 70 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
70 | i = max_mapnr; | 71 | i = max_mapnr; |
71 | while (i-- > 0) { | 72 | while (i-- > 0) { |
73 | if (!pfn_valid(i)) | ||
74 | continue; | ||
72 | page = pfn_to_page(i); | 75 | page = pfn_to_page(i); |
73 | total++; | 76 | total++; |
74 | if (PageReserved(page)) | 77 | if (PageReserved(page)) |
@@ -84,150 +87,52 @@ void show_mem(void) | |||
84 | printk("%d pages swap cached\n",cached); | 87 | printk("%d pages swap cached\n",cached); |
85 | } | 88 | } |
86 | 89 | ||
87 | extern unsigned long __initdata zholes_size[]; | 90 | static void __init setup_ro_region(void) |
88 | /* | ||
89 | * paging_init() sets up the page tables | ||
90 | */ | ||
91 | |||
92 | #ifndef CONFIG_64BIT | ||
93 | void __init paging_init(void) | ||
94 | { | 91 | { |
95 | pgd_t * pg_dir; | 92 | pgd_t *pgd; |
96 | pte_t * pg_table; | 93 | pmd_t *pmd; |
97 | pte_t pte; | 94 | pte_t *pte; |
98 | int i; | 95 | pte_t new_pte; |
99 | unsigned long tmp; | 96 | unsigned long address, end; |
100 | unsigned long pfn = 0; | 97 | |
101 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; | 98 | address = ((unsigned long)&__start_rodata) & PAGE_MASK; |
102 | static const int ssm_mask = 0x04000000L; | 99 | end = PFN_ALIGN((unsigned long)&__end_rodata); |
103 | unsigned long ro_start_pfn, ro_end_pfn; | 100 | |
104 | unsigned long zones_size[MAX_NR_ZONES]; | 101 | for (; address < end; address += PAGE_SIZE) { |
105 | 102 | pgd = pgd_offset_k(address); | |
106 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | 103 | pmd = pmd_offset(pgd, address); |
107 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | 104 | pte = pte_offset_kernel(pmd, address); |
108 | 105 | new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO)); | |
109 | memset(zones_size, 0, sizeof(zones_size)); | 106 | set_pte(pte, new_pte); |
110 | zones_size[ZONE_DMA] = max_low_pfn; | 107 | } |
111 | free_area_init_node(0, &contig_page_data, zones_size, | ||
112 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, | ||
113 | zholes_size); | ||
114 | |||
115 | /* unmap whole virtual address space */ | ||
116 | |||
117 | pg_dir = swapper_pg_dir; | ||
118 | |||
119 | for (i = 0; i < PTRS_PER_PGD; i++) | ||
120 | pmd_clear((pmd_t *) pg_dir++); | ||
121 | |||
122 | /* | ||
123 | * map whole physical memory to virtual memory (identity mapping) | ||
124 | */ | ||
125 | |||
126 | pg_dir = swapper_pg_dir; | ||
127 | |||
128 | while (pfn < max_low_pfn) { | ||
129 | /* | ||
130 | * pg_table is physical at this point | ||
131 | */ | ||
132 | pg_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); | ||
133 | |||
134 | pmd_populate_kernel(&init_mm, (pmd_t *) pg_dir, pg_table); | ||
135 | pg_dir++; | ||
136 | |||
137 | for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { | ||
138 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) | ||
139 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
140 | else | ||
141 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
142 | if (pfn >= max_low_pfn) | ||
143 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
144 | set_pte(pg_table, pte); | ||
145 | pfn++; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | S390_lowcore.kernel_asce = pgdir_k; | ||
150 | |||
151 | /* enable virtual mapping in kernel mode */ | ||
152 | __ctl_load(pgdir_k, 1, 1); | ||
153 | __ctl_load(pgdir_k, 7, 7); | ||
154 | __ctl_load(pgdir_k, 13, 13); | ||
155 | __raw_local_irq_ssm(ssm_mask); | ||
156 | |||
157 | local_flush_tlb(); | ||
158 | } | 108 | } |
159 | 109 | ||
160 | #else /* CONFIG_64BIT */ | 110 | extern void vmem_map_init(void); |
161 | 111 | ||
112 | /* | ||
113 | * paging_init() sets up the page tables | ||
114 | */ | ||
162 | void __init paging_init(void) | 115 | void __init paging_init(void) |
163 | { | 116 | { |
164 | pgd_t * pg_dir; | 117 | pgd_t *pg_dir; |
165 | pmd_t * pm_dir; | 118 | int i; |
166 | pte_t * pt_dir; | 119 | unsigned long pgdir_k; |
167 | pte_t pte; | ||
168 | int i,j,k; | ||
169 | unsigned long pfn = 0; | ||
170 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | | ||
171 | _KERN_REGION_TABLE; | ||
172 | static const int ssm_mask = 0x04000000L; | 120 | static const int ssm_mask = 0x04000000L; |
173 | unsigned long zones_size[MAX_NR_ZONES]; | 121 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
174 | unsigned long dma_pfn, high_pfn; | ||
175 | unsigned long ro_start_pfn, ro_end_pfn; | ||
176 | |||
177 | memset(zones_size, 0, sizeof(zones_size)); | ||
178 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | ||
179 | high_pfn = max_low_pfn; | ||
180 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | ||
181 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | ||
182 | |||
183 | if (dma_pfn > high_pfn) | ||
184 | zones_size[ZONE_DMA] = high_pfn; | ||
185 | else { | ||
186 | zones_size[ZONE_DMA] = dma_pfn; | ||
187 | zones_size[ZONE_NORMAL] = high_pfn - dma_pfn; | ||
188 | } | ||
189 | |||
190 | /* Initialize mem_map[]. */ | ||
191 | free_area_init_node(0, &contig_page_data, zones_size, | ||
192 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); | ||
193 | 122 | ||
194 | /* | 123 | pg_dir = swapper_pg_dir; |
195 | * map whole physical memory to virtual memory (identity mapping) | ||
196 | */ | ||
197 | |||
198 | pg_dir = swapper_pg_dir; | ||
199 | |||
200 | for (i = 0 ; i < PTRS_PER_PGD ; i++,pg_dir++) { | ||
201 | 124 | ||
202 | if (pfn >= max_low_pfn) { | 125 | #ifdef CONFIG_64BIT |
203 | pgd_clear(pg_dir); | 126 | pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE; |
204 | continue; | 127 | for (i = 0; i < PTRS_PER_PGD; i++) |
205 | } | 128 | pgd_clear(pg_dir + i); |
206 | 129 | #else | |
207 | pm_dir = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE * 4); | 130 | pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; |
208 | pgd_populate(&init_mm, pg_dir, pm_dir); | 131 | for (i = 0; i < PTRS_PER_PGD; i++) |
209 | 132 | pmd_clear((pmd_t *)(pg_dir + i)); | |
210 | for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { | 133 | #endif |
211 | if (pfn >= max_low_pfn) { | 134 | vmem_map_init(); |
212 | pmd_clear(pm_dir); | 135 | setup_ro_region(); |
213 | continue; | ||
214 | } | ||
215 | |||
216 | pt_dir = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); | ||
217 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
218 | |||
219 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { | ||
220 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) | ||
221 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
222 | else | ||
223 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
224 | if (pfn >= max_low_pfn) | ||
225 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
226 | set_pte(pt_dir, pte); | ||
227 | pfn++; | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | 136 | ||
232 | S390_lowcore.kernel_asce = pgdir_k; | 137 | S390_lowcore.kernel_asce = pgdir_k; |
233 | 138 | ||
@@ -237,9 +142,11 @@ void __init paging_init(void) | |||
237 | __ctl_load(pgdir_k, 13, 13); | 142 | __ctl_load(pgdir_k, 13, 13); |
238 | __raw_local_irq_ssm(ssm_mask); | 143 | __raw_local_irq_ssm(ssm_mask); |
239 | 144 | ||
240 | local_flush_tlb(); | 145 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
146 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); | ||
147 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
148 | free_area_init_nodes(max_zone_pfns); | ||
241 | } | 149 | } |
242 | #endif /* CONFIG_64BIT */ | ||
243 | 150 | ||
244 | void __init mem_init(void) | 151 | void __init mem_init(void) |
245 | { | 152 | { |
@@ -269,6 +176,8 @@ void __init mem_init(void) | |||
269 | printk("Write protected kernel read-only data: %#lx - %#lx\n", | 176 | printk("Write protected kernel read-only data: %#lx - %#lx\n", |
270 | (unsigned long)&__start_rodata, | 177 | (unsigned long)&__start_rodata, |
271 | PFN_ALIGN((unsigned long)&__end_rodata) - 1); | 178 | PFN_ALIGN((unsigned long)&__end_rodata) - 1); |
179 | printk("Virtual memmap size: %ldk\n", | ||
180 | (max_pfn * sizeof(struct page)) >> 10); | ||
272 | } | 181 | } |
273 | 182 | ||
274 | void free_initmem(void) | 183 | void free_initmem(void) |
@@ -279,6 +188,7 @@ void free_initmem(void) | |||
279 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 188 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
280 | ClearPageReserved(virt_to_page(addr)); | 189 | ClearPageReserved(virt_to_page(addr)); |
281 | init_page_count(virt_to_page(addr)); | 190 | init_page_count(virt_to_page(addr)); |
191 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); | ||
282 | free_page(addr); | 192 | free_page(addr); |
283 | totalram_pages++; | 193 | totalram_pages++; |
284 | } | 194 | } |
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c index 0f6e9ecbefe2..3d2100a4e209 100644 --- a/arch/s390/mm/ioremap.c +++ b/arch/s390/mm/ioremap.c | |||
@@ -15,87 +15,8 @@ | |||
15 | 15 | ||
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <asm/io.h> | 18 | #include <linux/io.h> |
19 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
20 | #include <asm/cacheflush.h> | ||
21 | #include <asm/tlbflush.h> | ||
22 | |||
23 | static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | ||
24 | unsigned long phys_addr, unsigned long flags) | ||
25 | { | ||
26 | unsigned long end; | ||
27 | unsigned long pfn; | ||
28 | |||
29 | address &= ~PMD_MASK; | ||
30 | end = address + size; | ||
31 | if (end > PMD_SIZE) | ||
32 | end = PMD_SIZE; | ||
33 | if (address >= end) | ||
34 | BUG(); | ||
35 | pfn = phys_addr >> PAGE_SHIFT; | ||
36 | do { | ||
37 | if (!pte_none(*pte)) { | ||
38 | printk("remap_area_pte: page already exists\n"); | ||
39 | BUG(); | ||
40 | } | ||
41 | set_pte(pte, pfn_pte(pfn, __pgprot(flags))); | ||
42 | address += PAGE_SIZE; | ||
43 | pfn++; | ||
44 | pte++; | ||
45 | } while (address && (address < end)); | ||
46 | } | ||
47 | |||
48 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | ||
49 | unsigned long phys_addr, unsigned long flags) | ||
50 | { | ||
51 | unsigned long end; | ||
52 | |||
53 | address &= ~PGDIR_MASK; | ||
54 | end = address + size; | ||
55 | if (end > PGDIR_SIZE) | ||
56 | end = PGDIR_SIZE; | ||
57 | phys_addr -= address; | ||
58 | if (address >= end) | ||
59 | BUG(); | ||
60 | do { | ||
61 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
62 | if (!pte) | ||
63 | return -ENOMEM; | ||
64 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
65 | address = (address + PMD_SIZE) & PMD_MASK; | ||
66 | pmd++; | ||
67 | } while (address && (address < end)); | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
72 | unsigned long size, unsigned long flags) | ||
73 | { | ||
74 | int error; | ||
75 | pgd_t * dir; | ||
76 | unsigned long end = address + size; | ||
77 | |||
78 | phys_addr -= address; | ||
79 | dir = pgd_offset(&init_mm, address); | ||
80 | flush_cache_all(); | ||
81 | if (address >= end) | ||
82 | BUG(); | ||
83 | do { | ||
84 | pmd_t *pmd; | ||
85 | pmd = pmd_alloc(&init_mm, dir, address); | ||
86 | error = -ENOMEM; | ||
87 | if (!pmd) | ||
88 | break; | ||
89 | if (remap_area_pmd(pmd, address, end - address, | ||
90 | phys_addr + address, flags)) | ||
91 | break; | ||
92 | error = 0; | ||
93 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
94 | dir++; | ||
95 | } while (address && (address < end)); | ||
96 | flush_tlb_all(); | ||
97 | return 0; | ||
98 | } | ||
99 | 20 | ||
100 | /* | 21 | /* |
101 | * Generic mapping function (not visible outside): | 22 | * Generic mapping function (not visible outside): |
@@ -122,7 +43,8 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
122 | if (!area) | 43 | if (!area) |
123 | return NULL; | 44 | return NULL; |
124 | addr = area->addr; | 45 | addr = area->addr; |
125 | if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { | 46 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
47 | phys_addr, __pgprot(flags))) { | ||
126 | vfree(addr); | 48 | vfree(addr); |
127 | return NULL; | 49 | return NULL; |
128 | } | 50 | } |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c new file mode 100644 index 000000000000..7f2944d3ec2a --- /dev/null +++ b/arch/s390/mm/vmem.c | |||
@@ -0,0 +1,381 @@ | |||
1 | /* | ||
2 | * arch/s390/mm/vmem.c | ||
3 | * | ||
4 | * Copyright IBM Corp. 2006 | ||
5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #include <linux/bootmem.h> | ||
9 | #include <linux/pfn.h> | ||
10 | #include <linux/mm.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/list.h> | ||
13 | #include <asm/pgalloc.h> | ||
14 | #include <asm/pgtable.h> | ||
15 | #include <asm/setup.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | |||
18 | unsigned long vmalloc_end; | ||
19 | EXPORT_SYMBOL(vmalloc_end); | ||
20 | |||
21 | static struct page *vmem_map; | ||
22 | static DEFINE_MUTEX(vmem_mutex); | ||
23 | |||
24 | struct memory_segment { | ||
25 | struct list_head list; | ||
26 | unsigned long start; | ||
27 | unsigned long size; | ||
28 | }; | ||
29 | |||
30 | static LIST_HEAD(mem_segs); | ||
31 | |||
32 | void memmap_init(unsigned long size, int nid, unsigned long zone, | ||
33 | unsigned long start_pfn) | ||
34 | { | ||
35 | struct page *start, *end; | ||
36 | struct page *map_start, *map_end; | ||
37 | int i; | ||
38 | |||
39 | start = pfn_to_page(start_pfn); | ||
40 | end = start + size; | ||
41 | |||
42 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
43 | unsigned long cstart, cend; | ||
44 | |||
45 | cstart = PFN_DOWN(memory_chunk[i].addr); | ||
46 | cend = cstart + PFN_DOWN(memory_chunk[i].size); | ||
47 | |||
48 | map_start = mem_map + cstart; | ||
49 | map_end = mem_map + cend; | ||
50 | |||
51 | if (map_start < start) | ||
52 | map_start = start; | ||
53 | if (map_end > end) | ||
54 | map_end = end; | ||
55 | |||
56 | map_start -= ((unsigned long) map_start & (PAGE_SIZE - 1)) | ||
57 | / sizeof(struct page); | ||
58 | map_end += ((PFN_ALIGN((unsigned long) map_end) | ||
59 | - (unsigned long) map_end) | ||
60 | / sizeof(struct page)); | ||
61 | |||
62 | if (map_start < map_end) | ||
63 | memmap_init_zone((unsigned long)(map_end - map_start), | ||
64 | nid, zone, page_to_pfn(map_start)); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | static inline void *vmem_alloc_pages(unsigned int order) | ||
69 | { | ||
70 | if (slab_is_available()) | ||
71 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
72 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
73 | } | ||
74 | |||
75 | static inline pmd_t *vmem_pmd_alloc(void) | ||
76 | { | ||
77 | pmd_t *pmd; | ||
78 | int i; | ||
79 | |||
80 | pmd = vmem_alloc_pages(PMD_ALLOC_ORDER); | ||
81 | if (!pmd) | ||
82 | return NULL; | ||
83 | for (i = 0; i < PTRS_PER_PMD; i++) | ||
84 | pmd_clear(pmd + i); | ||
85 | return pmd; | ||
86 | } | ||
87 | |||
88 | static inline pte_t *vmem_pte_alloc(void) | ||
89 | { | ||
90 | pte_t *pte; | ||
91 | pte_t empty_pte; | ||
92 | int i; | ||
93 | |||
94 | pte = vmem_alloc_pages(PTE_ALLOC_ORDER); | ||
95 | if (!pte) | ||
96 | return NULL; | ||
97 | pte_val(empty_pte) = _PAGE_TYPE_EMPTY; | ||
98 | for (i = 0; i < PTRS_PER_PTE; i++) | ||
99 | set_pte(pte + i, empty_pte); | ||
100 | return pte; | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * Add a physical memory range to the 1:1 mapping. | ||
105 | */ | ||
106 | static int vmem_add_range(unsigned long start, unsigned long size) | ||
107 | { | ||
108 | unsigned long address; | ||
109 | pgd_t *pg_dir; | ||
110 | pmd_t *pm_dir; | ||
111 | pte_t *pt_dir; | ||
112 | pte_t pte; | ||
113 | int ret = -ENOMEM; | ||
114 | |||
115 | for (address = start; address < start + size; address += PAGE_SIZE) { | ||
116 | pg_dir = pgd_offset_k(address); | ||
117 | if (pgd_none(*pg_dir)) { | ||
118 | pm_dir = vmem_pmd_alloc(); | ||
119 | if (!pm_dir) | ||
120 | goto out; | ||
121 | pgd_populate(&init_mm, pg_dir, pm_dir); | ||
122 | } | ||
123 | |||
124 | pm_dir = pmd_offset(pg_dir, address); | ||
125 | if (pmd_none(*pm_dir)) { | ||
126 | pt_dir = vmem_pte_alloc(); | ||
127 | if (!pt_dir) | ||
128 | goto out; | ||
129 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
130 | } | ||
131 | |||
132 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
133 | pte = pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL); | ||
134 | set_pte(pt_dir, pte); | ||
135 | } | ||
136 | ret = 0; | ||
137 | out: | ||
138 | flush_tlb_kernel_range(start, start + size); | ||
139 | return ret; | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Remove a physical memory range from the 1:1 mapping. | ||
144 | * Currently only invalidates page table entries. | ||
145 | */ | ||
146 | static void vmem_remove_range(unsigned long start, unsigned long size) | ||
147 | { | ||
148 | unsigned long address; | ||
149 | pgd_t *pg_dir; | ||
150 | pmd_t *pm_dir; | ||
151 | pte_t *pt_dir; | ||
152 | pte_t pte; | ||
153 | |||
154 | pte_val(pte) = _PAGE_TYPE_EMPTY; | ||
155 | for (address = start; address < start + size; address += PAGE_SIZE) { | ||
156 | pg_dir = pgd_offset_k(address); | ||
157 | if (pgd_none(*pg_dir)) | ||
158 | continue; | ||
159 | pm_dir = pmd_offset(pg_dir, address); | ||
160 | if (pmd_none(*pm_dir)) | ||
161 | continue; | ||
162 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
163 | set_pte(pt_dir, pte); | ||
164 | } | ||
165 | flush_tlb_kernel_range(start, start + size); | ||
166 | } | ||
167 | |||
168 | /* | ||
169 | * Add a backed mem_map array to the virtual mem_map array. | ||
170 | */ | ||
171 | static int vmem_add_mem_map(unsigned long start, unsigned long size) | ||
172 | { | ||
173 | unsigned long address, start_addr, end_addr; | ||
174 | struct page *map_start, *map_end; | ||
175 | pgd_t *pg_dir; | ||
176 | pmd_t *pm_dir; | ||
177 | pte_t *pt_dir; | ||
178 | pte_t pte; | ||
179 | int ret = -ENOMEM; | ||
180 | |||
181 | map_start = vmem_map + PFN_DOWN(start); | ||
182 | map_end = vmem_map + PFN_DOWN(start + size); | ||
183 | |||
184 | start_addr = (unsigned long) map_start & PAGE_MASK; | ||
185 | end_addr = PFN_ALIGN((unsigned long) map_end); | ||
186 | |||
187 | for (address = start_addr; address < end_addr; address += PAGE_SIZE) { | ||
188 | pg_dir = pgd_offset_k(address); | ||
189 | if (pgd_none(*pg_dir)) { | ||
190 | pm_dir = vmem_pmd_alloc(); | ||
191 | if (!pm_dir) | ||
192 | goto out; | ||
193 | pgd_populate(&init_mm, pg_dir, pm_dir); | ||
194 | } | ||
195 | |||
196 | pm_dir = pmd_offset(pg_dir, address); | ||
197 | if (pmd_none(*pm_dir)) { | ||
198 | pt_dir = vmem_pte_alloc(); | ||
199 | if (!pt_dir) | ||
200 | goto out; | ||
201 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | ||
202 | } | ||
203 | |||
204 | pt_dir = pte_offset_kernel(pm_dir, address); | ||
205 | if (pte_none(*pt_dir)) { | ||
206 | unsigned long new_page; | ||
207 | |||
208 | new_page =__pa(vmem_alloc_pages(0)); | ||
209 | if (!new_page) | ||
210 | goto out; | ||
211 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | ||
212 | set_pte(pt_dir, pte); | ||
213 | } | ||
214 | } | ||
215 | ret = 0; | ||
216 | out: | ||
217 | flush_tlb_kernel_range(start_addr, end_addr); | ||
218 | return ret; | ||
219 | } | ||
220 | |||
221 | static int vmem_add_mem(unsigned long start, unsigned long size) | ||
222 | { | ||
223 | int ret; | ||
224 | |||
225 | ret = vmem_add_range(start, size); | ||
226 | if (ret) | ||
227 | return ret; | ||
228 | return vmem_add_mem_map(start, size); | ||
229 | } | ||
230 | |||
231 | /* | ||
232 | * Add memory segment to the segment list if it doesn't overlap with | ||
233 | * an already present segment. | ||
234 | */ | ||
235 | static int insert_memory_segment(struct memory_segment *seg) | ||
236 | { | ||
237 | struct memory_segment *tmp; | ||
238 | |||
239 | if (PFN_DOWN(seg->start + seg->size) > max_pfn || | ||
240 | seg->start + seg->size < seg->start) | ||
241 | return -ERANGE; | ||
242 | |||
243 | list_for_each_entry(tmp, &mem_segs, list) { | ||
244 | if (seg->start >= tmp->start + tmp->size) | ||
245 | continue; | ||
246 | if (seg->start + seg->size <= tmp->start) | ||
247 | continue; | ||
248 | return -ENOSPC; | ||
249 | } | ||
250 | list_add(&seg->list, &mem_segs); | ||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | /* | ||
255 | * Remove memory segment from the segment list. | ||
256 | */ | ||
257 | static void remove_memory_segment(struct memory_segment *seg) | ||
258 | { | ||
259 | list_del(&seg->list); | ||
260 | } | ||
261 | |||
262 | static void __remove_shared_memory(struct memory_segment *seg) | ||
263 | { | ||
264 | remove_memory_segment(seg); | ||
265 | vmem_remove_range(seg->start, seg->size); | ||
266 | } | ||
267 | |||
268 | int remove_shared_memory(unsigned long start, unsigned long size) | ||
269 | { | ||
270 | struct memory_segment *seg; | ||
271 | int ret; | ||
272 | |||
273 | mutex_lock(&vmem_mutex); | ||
274 | |||
275 | ret = -ENOENT; | ||
276 | list_for_each_entry(seg, &mem_segs, list) { | ||
277 | if (seg->start == start && seg->size == size) | ||
278 | break; | ||
279 | } | ||
280 | |||
281 | if (seg->start != start || seg->size != size) | ||
282 | goto out; | ||
283 | |||
284 | ret = 0; | ||
285 | __remove_shared_memory(seg); | ||
286 | kfree(seg); | ||
287 | out: | ||
288 | mutex_unlock(&vmem_mutex); | ||
289 | return ret; | ||
290 | } | ||
291 | |||
292 | int add_shared_memory(unsigned long start, unsigned long size) | ||
293 | { | ||
294 | struct memory_segment *seg; | ||
295 | struct page *page; | ||
296 | unsigned long pfn, num_pfn, end_pfn; | ||
297 | int ret; | ||
298 | |||
299 | mutex_lock(&vmem_mutex); | ||
300 | ret = -ENOMEM; | ||
301 | seg = kzalloc(sizeof(*seg), GFP_KERNEL); | ||
302 | if (!seg) | ||
303 | goto out; | ||
304 | seg->start = start; | ||
305 | seg->size = size; | ||
306 | |||
307 | ret = insert_memory_segment(seg); | ||
308 | if (ret) | ||
309 | goto out_free; | ||
310 | |||
311 | ret = vmem_add_mem(start, size); | ||
312 | if (ret) | ||
313 | goto out_remove; | ||
314 | |||
315 | pfn = PFN_DOWN(start); | ||
316 | num_pfn = PFN_DOWN(size); | ||
317 | end_pfn = pfn + num_pfn; | ||
318 | |||
319 | page = pfn_to_page(pfn); | ||
320 | memset(page, 0, num_pfn * sizeof(struct page)); | ||
321 | |||
322 | for (; pfn < end_pfn; pfn++) { | ||
323 | page = pfn_to_page(pfn); | ||
324 | init_page_count(page); | ||
325 | reset_page_mapcount(page); | ||
326 | SetPageReserved(page); | ||
327 | INIT_LIST_HEAD(&page->lru); | ||
328 | } | ||
329 | goto out; | ||
330 | |||
331 | out_remove: | ||
332 | __remove_shared_memory(seg); | ||
333 | out_free: | ||
334 | kfree(seg); | ||
335 | out: | ||
336 | mutex_unlock(&vmem_mutex); | ||
337 | return ret; | ||
338 | } | ||
339 | |||
340 | /* | ||
341 | * map whole physical memory to virtual memory (identity mapping) | ||
342 | */ | ||
343 | void __init vmem_map_init(void) | ||
344 | { | ||
345 | unsigned long map_size; | ||
346 | int i; | ||
347 | |||
348 | map_size = ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * sizeof(struct page); | ||
349 | vmalloc_end = PFN_ALIGN(VMALLOC_END_INIT) - PFN_ALIGN(map_size); | ||
350 | vmem_map = (struct page *) vmalloc_end; | ||
351 | NODE_DATA(0)->node_mem_map = vmem_map; | ||
352 | |||
353 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) | ||
354 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); | ||
355 | } | ||
356 | |||
357 | /* | ||
358 | * Convert memory chunk array to a memory segment list so there is a single | ||
359 | * list that contains both r/w memory and shared memory segments. | ||
360 | */ | ||
361 | static int __init vmem_convert_memory_chunk(void) | ||
362 | { | ||
363 | struct memory_segment *seg; | ||
364 | int i; | ||
365 | |||
366 | mutex_lock(&vmem_mutex); | ||
367 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { | ||
368 | if (!memory_chunk[i].size) | ||
369 | continue; | ||
370 | seg = kzalloc(sizeof(*seg), GFP_KERNEL); | ||
371 | if (!seg) | ||
372 | panic("Out of memory...\n"); | ||
373 | seg->start = memory_chunk[i].addr; | ||
374 | seg->size = memory_chunk[i].size; | ||
375 | insert_memory_segment(seg); | ||
376 | } | ||
377 | mutex_unlock(&vmem_mutex); | ||
378 | return 0; | ||
379 | } | ||
380 | |||
381 | core_initcall(vmem_convert_memory_chunk); | ||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d83d64af31f2..3aa3b885ab36 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -59,6 +59,14 @@ config LOCKDEP_SUPPORT | |||
59 | bool | 59 | bool |
60 | default y | 60 | default y |
61 | 61 | ||
62 | config ARCH_HAS_ILOG2_U32 | ||
63 | bool | ||
64 | default n | ||
65 | |||
66 | config ARCH_HAS_ILOG2_U64 | ||
67 | bool | ||
68 | default n | ||
69 | |||
62 | source "init/Kconfig" | 70 | source "init/Kconfig" |
63 | 71 | ||
64 | menu "System type" | 72 | menu "System type" |
@@ -471,7 +479,7 @@ config SH_CLK_MD | |||
471 | int "CPU Mode Pin Setting" | 479 | int "CPU Mode Pin Setting" |
472 | depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 | 480 | depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 |
473 | help | 481 | help |
474 | MD2 - MD0 Setting. | 482 | MD2 - MD0 pin setting. |
475 | 483 | ||
476 | menu "CPU Frequency scaling" | 484 | menu "CPU Frequency scaling" |
477 | 485 | ||
@@ -572,18 +580,6 @@ config NR_CPUS | |||
572 | 580 | ||
573 | source "kernel/Kconfig.preempt" | 581 | source "kernel/Kconfig.preempt" |
574 | 582 | ||
575 | config CPU_HAS_SR_RB | ||
576 | bool "CPU has SR.RB" | ||
577 | depends on CPU_SH3 || CPU_SH4 | ||
578 | default y | ||
579 | help | ||
580 | This will enable the use of SR.RB register bank usage. Processors | ||
581 | that are lacking this bit must have another method in place for | ||
582 | accomplishing what is taken care of by the banked registers. | ||
583 | |||
584 | See <file:Documentation/sh/register-banks.txt> for further | ||
585 | information on SR.RB and register banking in the kernel in general. | ||
586 | |||
587 | config NODES_SHIFT | 583 | config NODES_SHIFT |
588 | int | 584 | int |
589 | default "1" | 585 | default "1" |
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 66a25ef4ef1b..87902e0298e2 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -31,7 +31,8 @@ config EARLY_SCIF_CONSOLE_PORT | |||
31 | hex "SCIF port for early console" | 31 | hex "SCIF port for early console" |
32 | depends on EARLY_SCIF_CONSOLE | 32 | depends on EARLY_SCIF_CONSOLE |
33 | default "0xffe00000" if CPU_SUBTYPE_SH7780 | 33 | default "0xffe00000" if CPU_SUBTYPE_SH7780 |
34 | default "0xfffe9800" if CPU_SUBTYPE_SH72060 | 34 | default "0xfffe9800" if CPU_SUBTYPE_SH7206 |
35 | default "0xf8420000" if CPU_SUBTYPE_SH7619 | ||
35 | default "0xffe80000" if CPU_SH4 | 36 | default "0xffe80000" if CPU_SH4 |
36 | 37 | ||
37 | config EARLY_PRINTK | 38 | config EARLY_PRINTK |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index d10bba5e1074..c1dbef212634 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -179,7 +179,7 @@ maketools: include/linux/version.h FORCE | |||
179 | 179 | ||
180 | all: zImage | 180 | all: zImage |
181 | 181 | ||
182 | zImage: vmlinux | 182 | zImage uImage uImage.srec vmlinux.srec: vmlinux |
183 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 183 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
184 | 184 | ||
185 | compressed: zImage | 185 | compressed: zImage |
@@ -190,5 +190,8 @@ archclean: | |||
190 | CLEAN_FILES += include/asm-sh/machtypes.h | 190 | CLEAN_FILES += include/asm-sh/machtypes.h |
191 | 191 | ||
192 | define archhelp | 192 | define archhelp |
193 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' | 193 | @echo '* zImage - Compressed kernel image' |
194 | @echo ' vmlinux.srec - Create an ELF S-record' | ||
195 | @echo ' uImage - Create a bootable image for U-Boot' | ||
196 | @echo ' uImage.srec - Create an S-record for U-Boot' | ||
194 | endef | 197 | endef |
diff --git a/arch/sh/boards/landisk/irq.c b/arch/sh/boards/landisk/irq.c index 8f2e1c68b90f..3eba6d086d7f 100644 --- a/arch/sh/boards/landisk/irq.c +++ b/arch/sh/boards/landisk/irq.c | |||
@@ -16,8 +16,8 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <asm/io.h> | 19 | #include <linux/interrupt.h> |
20 | #include <asm/irq.h> | 20 | #include <linux/io.h> |
21 | #include <asm/landisk/iodata_landisk.h> | 21 | #include <asm/landisk/iodata_landisk.h> |
22 | 22 | ||
23 | static void enable_landisk_irq(unsigned int irq); | 23 | static void enable_landisk_irq(unsigned int irq); |
diff --git a/arch/sh/boards/se/7206/irq.c b/arch/sh/boards/se/7206/irq.c index 3fb0c5f5b23a..27da88486f73 100644 --- a/arch/sh/boards/se/7206/irq.c +++ b/arch/sh/boards/se/7206/irq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/irq.h> | 10 | #include <linux/irq.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/interrupt.h> | ||
13 | #include <asm/se7206.h> | 14 | #include <asm/se7206.h> |
14 | 15 | ||
15 | #define INTSTS0 0x31800000 | 16 | #define INTSTS0 0x31800000 |
@@ -18,6 +19,13 @@ | |||
18 | #define INTMSK1 0x31800006 | 19 | #define INTMSK1 0x31800006 |
19 | #define INTSEL 0x31800008 | 20 | #define INTSEL 0x31800008 |
20 | 21 | ||
22 | #define IRQ0_IRQ 64 | ||
23 | #define IRQ1_IRQ 65 | ||
24 | #define IRQ3_IRQ 67 | ||
25 | |||
26 | #define INTC_IPR01 0xfffe0818 | ||
27 | #define INTC_ICR1 0xfffe0802 | ||
28 | |||
21 | static void disable_se7206_irq(unsigned int irq) | 29 | static void disable_se7206_irq(unsigned int irq) |
22 | { | 30 | { |
23 | unsigned short val; | 31 | unsigned short val; |
@@ -39,7 +47,7 @@ static void disable_se7206_irq(unsigned int irq) | |||
39 | case IRQ1_IRQ: | 47 | case IRQ1_IRQ: |
40 | msk0 |= 0x000f; | 48 | msk0 |= 0x000f; |
41 | break; | 49 | break; |
42 | case IRQ2_IRQ: | 50 | case IRQ3_IRQ: |
43 | msk0 |= 0x0f00; | 51 | msk0 |= 0x0f00; |
44 | msk1 |= 0x00ff; | 52 | msk1 |= 0x00ff; |
45 | break; | 53 | break; |
@@ -70,7 +78,7 @@ static void enable_se7206_irq(unsigned int irq) | |||
70 | case IRQ1_IRQ: | 78 | case IRQ1_IRQ: |
71 | msk0 &= ~0x000f; | 79 | msk0 &= ~0x000f; |
72 | break; | 80 | break; |
73 | case IRQ2_IRQ: | 81 | case IRQ3_IRQ: |
74 | msk0 &= ~0x0f00; | 82 | msk0 &= ~0x0f00; |
75 | msk1 &= ~0x00ff; | 83 | msk1 &= ~0x00ff; |
76 | break; | 84 | break; |
@@ -96,7 +104,7 @@ static void eoi_se7206_irq(unsigned int irq) | |||
96 | case IRQ1_IRQ: | 104 | case IRQ1_IRQ: |
97 | sts0 &= ~0x000f; | 105 | sts0 &= ~0x000f; |
98 | break; | 106 | break; |
99 | case IRQ2_IRQ: | 107 | case IRQ3_IRQ: |
100 | sts0 &= ~0x0f00; | 108 | sts0 &= ~0x0f00; |
101 | sts1 &= ~0x00ff; | 109 | sts1 &= ~0x00ff; |
102 | break; | 110 | break; |
@@ -106,7 +114,7 @@ static void eoi_se7206_irq(unsigned int irq) | |||
106 | } | 114 | } |
107 | 115 | ||
108 | static struct irq_chip se7206_irq_chip __read_mostly = { | 116 | static struct irq_chip se7206_irq_chip __read_mostly = { |
109 | .name = "SE7206-FPGA-IRQ", | 117 | .name = "SE7206-FPGA", |
110 | .mask = disable_se7206_irq, | 118 | .mask = disable_se7206_irq, |
111 | .unmask = enable_se7206_irq, | 119 | .unmask = enable_se7206_irq, |
112 | .mask_ack = disable_se7206_irq, | 120 | .mask_ack = disable_se7206_irq, |
diff --git a/arch/sh/boards/se/7619/Makefile b/arch/sh/boards/se/7619/Makefile index 3666eca8a658..d21775c28cda 100644 --- a/arch/sh/boards/se/7619/Makefile +++ b/arch/sh/boards/se/7619/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the 7619 SolutionEngine specific parts of the kernel | 2 | # Makefile for the 7619 SolutionEngine specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := setup.o io.o | 5 | obj-y := setup.o |
diff --git a/arch/sh/boards/se/7619/io.c b/arch/sh/boards/se/7619/io.c deleted file mode 100644 index 176f1f39cd9d..000000000000 --- a/arch/sh/boards/se/7619/io.c +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * linux/arch/sh/boards/se/7619/io.c | ||
4 | * | ||
5 | * Copyright (C) 2006 Yoshinori Sato | ||
6 | * | ||
7 | * I/O routine for Hitachi 7619 SolutionEngine. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/se7619.h> | ||
15 | #include <asm/irq.h> | ||
16 | |||
17 | /* FIXME: M3A-ZAB7 Compact Flash Slot support */ | ||
18 | |||
19 | static inline void delay(void) | ||
20 | { | ||
21 | ctrl_inw(0xa0000000); /* Uncached ROM area (P2) */ | ||
22 | } | ||
23 | |||
24 | #define badio(name,port) \ | ||
25 | printk("bad I/O operation (%s) for port 0x%lx at 0x%08x\n", \ | ||
26 | #name, (port), (__u32) __builtin_return_address(0)) | ||
27 | |||
28 | unsigned char se7619___inb(unsigned long port) | ||
29 | { | ||
30 | badio(inb, port); | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | unsigned char se7619___inb_p(unsigned long port) | ||
35 | { | ||
36 | badio(inb_p, port); | ||
37 | delay(); | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | unsigned short se7619___inw(unsigned long port) | ||
42 | { | ||
43 | badio(inw, port); | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | unsigned int se7619___inl(unsigned long port) | ||
48 | { | ||
49 | badio(inl, port); | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | void se7619___outb(unsigned char value, unsigned long port) | ||
54 | { | ||
55 | badio(outb, port); | ||
56 | } | ||
57 | |||
58 | void se7619___outb_p(unsigned char value, unsigned long port) | ||
59 | { | ||
60 | badio(outb_p, port); | ||
61 | delay(); | ||
62 | } | ||
63 | |||
64 | void se7619___outw(unsigned short value, unsigned long port) | ||
65 | { | ||
66 | badio(outw, port); | ||
67 | } | ||
68 | |||
69 | void se7619___outl(unsigned int value, unsigned long port) | ||
70 | { | ||
71 | badio(outl, port); | ||
72 | } | ||
73 | |||
74 | void se7619___insb(unsigned long port, void *addr, unsigned long count) | ||
75 | { | ||
76 | badio(inw, port); | ||
77 | } | ||
78 | |||
79 | void se7619___insw(unsigned long port, void *addr, unsigned long count) | ||
80 | { | ||
81 | badio(inw, port); | ||
82 | } | ||
83 | |||
84 | void se7619___insl(unsigned long port, void *addr, unsigned long count) | ||
85 | { | ||
86 | badio(insl, port); | ||
87 | } | ||
88 | |||
89 | void se7619___outsb(unsigned long port, const void *addr, unsigned long count) | ||
90 | { | ||
91 | badio(insl, port); | ||
92 | } | ||
93 | |||
94 | void se7619___outsw(unsigned long port, const void *addr, unsigned long count) | ||
95 | { | ||
96 | badio(insl, port); | ||
97 | } | ||
98 | |||
99 | void se7619___outsl(unsigned long port, const void *addr, unsigned long count) | ||
100 | { | ||
101 | badio(outsw, port); | ||
102 | } | ||
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c index e627b26de0d0..52d2c4d5d2fa 100644 --- a/arch/sh/boards/se/7619/setup.c +++ b/arch/sh/boards/se/7619/setup.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <asm/io.h> | 11 | #include <asm/io.h> |
12 | #include <asm/se7619.h> | ||
13 | #include <asm/machvec.h> | 12 | #include <asm/machvec.h> |
14 | 13 | ||
15 | /* | 14 | /* |
@@ -19,25 +18,5 @@ | |||
19 | struct sh_machine_vector mv_se __initmv = { | 18 | struct sh_machine_vector mv_se __initmv = { |
20 | .mv_name = "SolutionEngine", | 19 | .mv_name = "SolutionEngine", |
21 | .mv_nr_irqs = 108, | 20 | .mv_nr_irqs = 108, |
22 | .mv_inb = se7619___inb, | ||
23 | .mv_inw = se7619___inw, | ||
24 | .mv_inl = se7619___inl, | ||
25 | .mv_outb = se7619___outb, | ||
26 | .mv_outw = se7619___outw, | ||
27 | .mv_outl = se7619___outl, | ||
28 | |||
29 | .mv_inb_p = se7619___inb_p, | ||
30 | .mv_inw_p = se7619___inw, | ||
31 | .mv_inl_p = se7619___inl, | ||
32 | .mv_outb_p = se7619___outb_p, | ||
33 | .mv_outw_p = se7619___outw, | ||
34 | .mv_outl_p = se7619___outl, | ||
35 | |||
36 | .mv_insb = se7619___insb, | ||
37 | .mv_insw = se7619___insw, | ||
38 | .mv_insl = se7619___insl, | ||
39 | .mv_outsb = se7619___outsb, | ||
40 | .mv_outsw = se7619___outsw, | ||
41 | .mv_outsl = se7619___outsl, | ||
42 | }; | 21 | }; |
43 | ALIAS_MV(se) | 22 | ALIAS_MV(se) |
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 60797b31089c..11dc272c618e 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile | |||
@@ -8,13 +8,49 @@ | |||
8 | # Copyright (C) 1999 Stuart Menefy | 8 | # Copyright (C) 1999 Stuart Menefy |
9 | # | 9 | # |
10 | 10 | ||
11 | targets := zImage | 11 | MKIMAGE := $(srctree)/scripts/mkuboot.sh |
12 | |||
13 | # | ||
14 | # Assign safe dummy values if these variables are not defined, | ||
15 | # in order to suppress error message. | ||
16 | # | ||
17 | CONFIG_PAGE_OFFSET ?= 0x80000000 | ||
18 | CONFIG_MEMORY_START ?= 0x0c000000 | ||
19 | CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 | ||
20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 | ||
21 | |||
22 | export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ | ||
23 | CONFIG_ZERO_PAGE_OFFSET | ||
24 | |||
25 | targets := zImage vmlinux.srec uImage uImage.srec | ||
12 | subdir- := compressed | 26 | subdir- := compressed |
13 | 27 | ||
14 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 28 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
15 | $(call if_changed,objcopy) | 29 | $(call if_changed,objcopy) |
16 | @echo 'Kernel: $@ is ready' | 30 | @echo ' Kernel: $@ is ready' |
17 | 31 | ||
18 | $(obj)/compressed/vmlinux: FORCE | 32 | $(obj)/compressed/vmlinux: FORCE |
19 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 33 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
20 | 34 | ||
35 | KERNEL_LOAD := $(shell printf "0x%8x" $$[$(CONFIG_PAGE_OFFSET) + \ | ||
36 | $(CONFIG_MEMORY_START) + \ | ||
37 | $(CONFIG_ZERO_PAGE_OFFSET)+0x1000]) | ||
38 | |||
39 | quiet_cmd_uimage = UIMAGE $@ | ||
40 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ | ||
41 | -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \ | ||
42 | -n 'Linux-$(KERNELRELEASE)' -d $< $@ | ||
43 | |||
44 | $(obj)/uImage: $(obj)/zImage FORCE | ||
45 | $(call if_changed,uimage) | ||
46 | @echo ' Image $@ is ready' | ||
47 | |||
48 | OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec | ||
49 | $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux | ||
50 | $(call if_changed,objcopy) | ||
51 | |||
52 | OBJCOPYFLAGS_uImage.srec := -I binary -O srec | ||
53 | $(obj)/uImage.srec: $(obj)/uImage | ||
54 | $(call if_changed,objcopy) | ||
55 | |||
56 | clean-files += uImage uImage.srec vmlinux.srec | ||
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index e5f443790079..d9512416f885 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -15,13 +15,7 @@ endif | |||
15 | 15 | ||
16 | # | 16 | # |
17 | # IMAGE_OFFSET is the load offset of the compression loader | 17 | # IMAGE_OFFSET is the load offset of the compression loader |
18 | # Assign dummy values if these 2 variables are not defined, | ||
19 | # in order to suppress error message. | ||
20 | # | 18 | # |
21 | CONFIG_PAGE_OFFSET ?= 0x80000000 | ||
22 | CONFIG_MEMORY_START ?= 0x0c000000 | ||
23 | CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 | ||
24 | |||
25 | IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_PAGE_OFFSET) + \ | 19 | IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_PAGE_OFFSET) + \ |
26 | $(CONFIG_MEMORY_START) + \ | 20 | $(CONFIG_MEMORY_START) + \ |
27 | $(CONFIG_BOOT_LINK_OFFSET)]) | 21 | $(CONFIG_BOOT_LINK_OFFSET)]) |
diff --git a/arch/sh/boot/compressed/head.S b/arch/sh/boot/compressed/head.S index 4c26a192277d..a8399b013729 100644 --- a/arch/sh/boot/compressed/head.S +++ b/arch/sh/boot/compressed/head.S | |||
@@ -8,6 +8,7 @@ | |||
8 | .text | 8 | .text |
9 | 9 | ||
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <asm/page.h> | ||
11 | 12 | ||
12 | .global startup | 13 | .global startup |
13 | startup: | 14 | startup: |
@@ -97,7 +98,7 @@ init_stack_addr: | |||
97 | decompress_kernel_addr: | 98 | decompress_kernel_addr: |
98 | .long decompress_kernel | 99 | .long decompress_kernel |
99 | kernel_start_addr: | 100 | kernel_start_addr: |
100 | .long _text+0x1000 | 101 | .long _text+PAGE_SIZE |
101 | 102 | ||
102 | .align 9 | 103 | .align 9 |
103 | fake_headers_as_bzImage: | 104 | fake_headers_as_bzImage: |
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c index 35452d85b7f7..df65e305acf7 100644 --- a/arch/sh/boot/compressed/misc.c +++ b/arch/sh/boot/compressed/misc.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | #include <asm/page.h> | ||
16 | #ifdef CONFIG_SH_STANDARD_BIOS | 17 | #ifdef CONFIG_SH_STANDARD_BIOS |
17 | #include <asm/sh_bios.h> | 18 | #include <asm/sh_bios.h> |
18 | #endif | 19 | #endif |
@@ -229,7 +230,7 @@ long* stack_start = &user_stack[STACK_SIZE]; | |||
229 | void decompress_kernel(void) | 230 | void decompress_kernel(void) |
230 | { | 231 | { |
231 | output_data = 0; | 232 | output_data = 0; |
232 | output_ptr = P2SEGADDR((unsigned long)&_text+0x1000); | 233 | output_ptr = P2SEGADDR((unsigned long)&_text+PAGE_SIZE); |
233 | free_mem_ptr = (unsigned long)&_end; | 234 | free_mem_ptr = (unsigned long)&_end; |
234 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | 235 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; |
235 | 236 | ||
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig index 238c0f109907..e7f8ddb0ada4 100644 --- a/arch/sh/configs/landisk_defconfig +++ b/arch/sh/configs/landisk_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue Oct 3 11:14:13 2006 | 4 | # Thu Dec 7 17:13:04 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,9 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 17 | ||
15 | # | 18 | # |
@@ -33,6 +36,7 @@ CONFIG_SYSVIPC=y | |||
33 | # CONFIG_UTS_NS is not set | 36 | # CONFIG_UTS_NS is not set |
34 | # CONFIG_AUDIT is not set | 37 | # CONFIG_AUDIT is not set |
35 | # CONFIG_IKCONFIG is not set | 38 | # CONFIG_IKCONFIG is not set |
39 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | 40 | # CONFIG_RELAY is not set |
37 | CONFIG_INITRAMFS_SOURCE="" | 41 | CONFIG_INITRAMFS_SOURCE="" |
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 42 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -114,6 +118,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
114 | CONFIG_SH_LANDISK=y | 118 | CONFIG_SH_LANDISK=y |
115 | # CONFIG_SH_TITAN is not set | 119 | # CONFIG_SH_TITAN is not set |
116 | # CONFIG_SH_SHMIN is not set | 120 | # CONFIG_SH_SHMIN is not set |
121 | # CONFIG_SH_7206_SOLUTION_ENGINE is not set | ||
122 | # CONFIG_SH_7619_SOLUTION_ENGINE is not set | ||
117 | # CONFIG_SH_UNKNOWN is not set | 123 | # CONFIG_SH_UNKNOWN is not set |
118 | 124 | ||
119 | # | 125 | # |
@@ -125,6 +131,12 @@ CONFIG_CPU_SH4=y | |||
125 | # SH-2 Processor Support | 131 | # SH-2 Processor Support |
126 | # | 132 | # |
127 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | 133 | # CONFIG_CPU_SUBTYPE_SH7604 is not set |
134 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | ||
135 | |||
136 | # | ||
137 | # SH-2A Processor Support | ||
138 | # | ||
139 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
128 | 140 | ||
129 | # | 141 | # |
130 | # SH-3 Processor Support | 142 | # SH-3 Processor Support |
@@ -160,6 +172,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y | |||
160 | # | 172 | # |
161 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 173 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
162 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 174 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
175 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
163 | 176 | ||
164 | # | 177 | # |
165 | # SH4AL-DSP Processor Support | 178 | # SH4AL-DSP Processor Support |
@@ -175,6 +188,9 @@ CONFIG_PAGE_OFFSET=0x80000000 | |||
175 | CONFIG_MEMORY_START=0x0c000000 | 188 | CONFIG_MEMORY_START=0x0c000000 |
176 | CONFIG_MEMORY_SIZE=0x04000000 | 189 | CONFIG_MEMORY_SIZE=0x04000000 |
177 | CONFIG_VSYSCALL=y | 190 | CONFIG_VSYSCALL=y |
191 | CONFIG_PAGE_SIZE_4KB=y | ||
192 | # CONFIG_PAGE_SIZE_8KB is not set | ||
193 | # CONFIG_PAGE_SIZE_64KB is not set | ||
178 | CONFIG_SELECT_MEMORY_MODEL=y | 194 | CONFIG_SELECT_MEMORY_MODEL=y |
179 | CONFIG_FLATMEM_MANUAL=y | 195 | CONFIG_FLATMEM_MANUAL=y |
180 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 196 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -196,16 +212,21 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
196 | # Processor features | 212 | # Processor features |
197 | # | 213 | # |
198 | CONFIG_CPU_LITTLE_ENDIAN=y | 214 | CONFIG_CPU_LITTLE_ENDIAN=y |
215 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
199 | CONFIG_SH_FPU=y | 216 | CONFIG_SH_FPU=y |
200 | # CONFIG_SH_DSP is not set | 217 | # CONFIG_SH_DSP is not set |
201 | # CONFIG_SH_STORE_QUEUES is not set | 218 | # CONFIG_SH_STORE_QUEUES is not set |
202 | CONFIG_CPU_HAS_INTEVT=y | 219 | CONFIG_CPU_HAS_INTEVT=y |
220 | CONFIG_CPU_HAS_IPR_IRQ=y | ||
203 | CONFIG_CPU_HAS_SR_RB=y | 221 | CONFIG_CPU_HAS_SR_RB=y |
222 | CONFIG_CPU_HAS_PTEA=y | ||
204 | 223 | ||
205 | # | 224 | # |
206 | # Timer support | 225 | # Timer support |
207 | # | 226 | # |
208 | CONFIG_SH_TMU=y | 227 | CONFIG_SH_TMU=y |
228 | CONFIG_SH_TIMER_IRQ=16 | ||
229 | # CONFIG_NO_IDLE_HZ is not set | ||
209 | CONFIG_SH_PCLK_FREQ=33333333 | 230 | CONFIG_SH_PCLK_FREQ=33333333 |
210 | 231 | ||
211 | # | 232 | # |
@@ -216,9 +237,7 @@ CONFIG_SH_PCLK_FREQ=33333333 | |||
216 | # | 237 | # |
217 | # DMA support | 238 | # DMA support |
218 | # | 239 | # |
219 | CONFIG_SH_DMA=y | 240 | # CONFIG_SH_DMA is not set |
220 | CONFIG_NR_ONCHIP_DMA_CHANNELS=4 | ||
221 | # CONFIG_NR_DMA_CHANNELS_BOOL is not set | ||
222 | 241 | ||
223 | # | 242 | # |
224 | # Companion Chips | 243 | # Companion Chips |
@@ -227,6 +246,11 @@ CONFIG_NR_ONCHIP_DMA_CHANNELS=4 | |||
227 | CONFIG_HEARTBEAT=y | 246 | CONFIG_HEARTBEAT=y |
228 | 247 | ||
229 | # | 248 | # |
249 | # Additional SuperH Device Drivers | ||
250 | # | ||
251 | # CONFIG_PUSH_SWITCH is not set | ||
252 | |||
253 | # | ||
230 | # Kernel features | 254 | # Kernel features |
231 | # | 255 | # |
232 | # CONFIG_HZ_100 is not set | 256 | # CONFIG_HZ_100 is not set |
@@ -340,11 +364,13 @@ CONFIG_IP_PNP=y | |||
340 | # CONFIG_INET_TUNNEL is not set | 364 | # CONFIG_INET_TUNNEL is not set |
341 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 365 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
342 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 366 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
367 | CONFIG_INET_XFRM_MODE_BEET=y | ||
343 | CONFIG_INET_DIAG=y | 368 | CONFIG_INET_DIAG=y |
344 | CONFIG_INET_TCP_DIAG=y | 369 | CONFIG_INET_TCP_DIAG=y |
345 | # CONFIG_TCP_CONG_ADVANCED is not set | 370 | # CONFIG_TCP_CONG_ADVANCED is not set |
346 | CONFIG_TCP_CONG_CUBIC=y | 371 | CONFIG_TCP_CONG_CUBIC=y |
347 | CONFIG_DEFAULT_TCP_CONG="cubic" | 372 | CONFIG_DEFAULT_TCP_CONG="cubic" |
373 | # CONFIG_TCP_MD5SIG is not set | ||
348 | 374 | ||
349 | # | 375 | # |
350 | # IP: Virtual Server Configuration | 376 | # IP: Virtual Server Configuration |
@@ -361,24 +387,12 @@ CONFIG_NETFILTER=y | |||
361 | # Core Netfilter Configuration | 387 | # Core Netfilter Configuration |
362 | # | 388 | # |
363 | # CONFIG_NETFILTER_NETLINK is not set | 389 | # CONFIG_NETFILTER_NETLINK is not set |
390 | # CONFIG_NF_CONNTRACK_ENABLED is not set | ||
364 | # CONFIG_NETFILTER_XTABLES is not set | 391 | # CONFIG_NETFILTER_XTABLES is not set |
365 | 392 | ||
366 | # | 393 | # |
367 | # IP: Netfilter Configuration | 394 | # IP: Netfilter Configuration |
368 | # | 395 | # |
369 | CONFIG_IP_NF_CONNTRACK=m | ||
370 | CONFIG_IP_NF_CT_ACCT=y | ||
371 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
372 | # CONFIG_IP_NF_CONNTRACK_EVENTS is not set | ||
373 | # CONFIG_IP_NF_CT_PROTO_SCTP is not set | ||
374 | CONFIG_IP_NF_FTP=m | ||
375 | CONFIG_IP_NF_IRC=m | ||
376 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
377 | CONFIG_IP_NF_TFTP=m | ||
378 | CONFIG_IP_NF_AMANDA=m | ||
379 | # CONFIG_IP_NF_PPTP is not set | ||
380 | # CONFIG_IP_NF_H323 is not set | ||
381 | # CONFIG_IP_NF_SIP is not set | ||
382 | CONFIG_IP_NF_QUEUE=m | 396 | CONFIG_IP_NF_QUEUE=m |
383 | 397 | ||
384 | # | 398 | # |
@@ -477,6 +491,12 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
477 | # CONFIG_ATA_OVER_ETH is not set | 491 | # CONFIG_ATA_OVER_ETH is not set |
478 | 492 | ||
479 | # | 493 | # |
494 | # Misc devices | ||
495 | # | ||
496 | # CONFIG_SGI_IOC4 is not set | ||
497 | # CONFIG_TIFM_CORE is not set | ||
498 | |||
499 | # | ||
480 | # ATA/ATAPI/MFM/RLL support | 500 | # ATA/ATAPI/MFM/RLL support |
481 | # | 501 | # |
482 | CONFIG_IDE=y | 502 | CONFIG_IDE=y |
@@ -519,6 +539,7 @@ CONFIG_BLK_DEV_AEC62XX=y | |||
519 | # CONFIG_BLK_DEV_CS5530 is not set | 539 | # CONFIG_BLK_DEV_CS5530 is not set |
520 | # CONFIG_BLK_DEV_HPT34X is not set | 540 | # CONFIG_BLK_DEV_HPT34X is not set |
521 | # CONFIG_BLK_DEV_HPT366 is not set | 541 | # CONFIG_BLK_DEV_HPT366 is not set |
542 | # CONFIG_BLK_DEV_JMICRON is not set | ||
522 | # CONFIG_BLK_DEV_SC1200 is not set | 543 | # CONFIG_BLK_DEV_SC1200 is not set |
523 | # CONFIG_BLK_DEV_PIIX is not set | 544 | # CONFIG_BLK_DEV_PIIX is not set |
524 | # CONFIG_BLK_DEV_IT821X is not set | 545 | # CONFIG_BLK_DEV_IT821X is not set |
@@ -542,6 +563,7 @@ CONFIG_IDEDMA_AUTO=y | |||
542 | # | 563 | # |
543 | # CONFIG_RAID_ATTRS is not set | 564 | # CONFIG_RAID_ATTRS is not set |
544 | CONFIG_SCSI=y | 565 | CONFIG_SCSI=y |
566 | # CONFIG_SCSI_TGT is not set | ||
545 | # CONFIG_SCSI_NETLINK is not set | 567 | # CONFIG_SCSI_NETLINK is not set |
546 | CONFIG_SCSI_PROC_FS=y | 568 | CONFIG_SCSI_PROC_FS=y |
547 | 569 | ||
@@ -561,6 +583,7 @@ CONFIG_BLK_DEV_SD=y | |||
561 | CONFIG_SCSI_MULTI_LUN=y | 583 | CONFIG_SCSI_MULTI_LUN=y |
562 | # CONFIG_SCSI_CONSTANTS is not set | 584 | # CONFIG_SCSI_CONSTANTS is not set |
563 | # CONFIG_SCSI_LOGGING is not set | 585 | # CONFIG_SCSI_LOGGING is not set |
586 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
564 | 587 | ||
565 | # | 588 | # |
566 | # SCSI Transports | 589 | # SCSI Transports |
@@ -602,12 +625,12 @@ CONFIG_SCSI_MULTI_LUN=y | |||
602 | # CONFIG_SCSI_NCR53C406A is not set | 625 | # CONFIG_SCSI_NCR53C406A is not set |
603 | # CONFIG_SCSI_STEX is not set | 626 | # CONFIG_SCSI_STEX is not set |
604 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 627 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
605 | # CONFIG_SCSI_IPR is not set | ||
606 | # CONFIG_SCSI_PAS16 is not set | 628 | # CONFIG_SCSI_PAS16 is not set |
607 | # CONFIG_SCSI_PSI240I is not set | 629 | # CONFIG_SCSI_PSI240I is not set |
608 | # CONFIG_SCSI_QLOGIC_FAS is not set | 630 | # CONFIG_SCSI_QLOGIC_FAS is not set |
609 | # CONFIG_SCSI_QLOGIC_1280 is not set | 631 | # CONFIG_SCSI_QLOGIC_1280 is not set |
610 | # CONFIG_SCSI_QLA_FC is not set | 632 | # CONFIG_SCSI_QLA_FC is not set |
633 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
611 | # CONFIG_SCSI_LPFC is not set | 634 | # CONFIG_SCSI_LPFC is not set |
612 | # CONFIG_SCSI_SYM53C416 is not set | 635 | # CONFIG_SCSI_SYM53C416 is not set |
613 | # CONFIG_SCSI_DC395x is not set | 636 | # CONFIG_SCSI_DC395x is not set |
@@ -615,6 +638,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
615 | # CONFIG_SCSI_T128 is not set | 638 | # CONFIG_SCSI_T128 is not set |
616 | # CONFIG_SCSI_NSP32 is not set | 639 | # CONFIG_SCSI_NSP32 is not set |
617 | # CONFIG_SCSI_DEBUG is not set | 640 | # CONFIG_SCSI_DEBUG is not set |
641 | # CONFIG_SCSI_SRP is not set | ||
618 | 642 | ||
619 | # | 643 | # |
620 | # PCMCIA SCSI adapter support | 644 | # PCMCIA SCSI adapter support |
@@ -757,6 +781,7 @@ CONFIG_8139CP=y | |||
757 | # CONFIG_IXGB is not set | 781 | # CONFIG_IXGB is not set |
758 | # CONFIG_S2IO is not set | 782 | # CONFIG_S2IO is not set |
759 | # CONFIG_MYRI10GE is not set | 783 | # CONFIG_MYRI10GE is not set |
784 | # CONFIG_NETXEN_NIC is not set | ||
760 | 785 | ||
761 | # | 786 | # |
762 | # Token Ring devices | 787 | # Token Ring devices |
@@ -871,10 +896,6 @@ CONFIG_HW_RANDOM=y | |||
871 | # CONFIG_DTLK is not set | 896 | # CONFIG_DTLK is not set |
872 | # CONFIG_R3964 is not set | 897 | # CONFIG_R3964 is not set |
873 | # CONFIG_APPLICOM is not set | 898 | # CONFIG_APPLICOM is not set |
874 | |||
875 | # | ||
876 | # Ftape, the floppy tape device driver | ||
877 | # | ||
878 | # CONFIG_DRM is not set | 899 | # CONFIG_DRM is not set |
879 | 900 | ||
880 | # | 901 | # |
@@ -889,7 +910,6 @@ CONFIG_HW_RANDOM=y | |||
889 | # TPM devices | 910 | # TPM devices |
890 | # | 911 | # |
891 | # CONFIG_TCG_TPM is not set | 912 | # CONFIG_TCG_TPM is not set |
892 | # CONFIG_TELCLOCK is not set | ||
893 | 913 | ||
894 | # | 914 | # |
895 | # I2C support | 915 | # I2C support |
@@ -905,6 +925,7 @@ CONFIG_HW_RANDOM=y | |||
905 | # | 925 | # |
906 | # Dallas's 1-wire bus | 926 | # Dallas's 1-wire bus |
907 | # | 927 | # |
928 | # CONFIG_W1 is not set | ||
908 | 929 | ||
909 | # | 930 | # |
910 | # Hardware Monitoring support | 931 | # Hardware Monitoring support |
@@ -917,10 +938,6 @@ CONFIG_HWMON=y | |||
917 | # CONFIG_HWMON_DEBUG_CHIP is not set | 938 | # CONFIG_HWMON_DEBUG_CHIP is not set |
918 | 939 | ||
919 | # | 940 | # |
920 | # Misc devices | ||
921 | # | ||
922 | |||
923 | # | ||
924 | # Multimedia devices | 941 | # Multimedia devices |
925 | # | 942 | # |
926 | CONFIG_VIDEO_DEV=m | 943 | CONFIG_VIDEO_DEV=m |
@@ -1037,6 +1054,7 @@ CONFIG_USB=y | |||
1037 | CONFIG_USB_DEVICEFS=y | 1054 | CONFIG_USB_DEVICEFS=y |
1038 | # CONFIG_USB_BANDWIDTH is not set | 1055 | # CONFIG_USB_BANDWIDTH is not set |
1039 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1056 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1057 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
1040 | # CONFIG_USB_OTG is not set | 1058 | # CONFIG_USB_OTG is not set |
1041 | 1059 | ||
1042 | # | 1060 | # |
@@ -1106,7 +1124,6 @@ CONFIG_USB_HIDINPUT=y | |||
1106 | # CONFIG_USB_ATI_REMOTE2 is not set | 1124 | # CONFIG_USB_ATI_REMOTE2 is not set |
1107 | # CONFIG_USB_KEYSPAN_REMOTE is not set | 1125 | # CONFIG_USB_KEYSPAN_REMOTE is not set |
1108 | # CONFIG_USB_APPLETOUCH is not set | 1126 | # CONFIG_USB_APPLETOUCH is not set |
1109 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1110 | 1127 | ||
1111 | # | 1128 | # |
1112 | # USB Imaging devices | 1129 | # USB Imaging devices |
@@ -1121,6 +1138,7 @@ CONFIG_USB_HIDINPUT=y | |||
1121 | # CONFIG_USB_KAWETH is not set | 1138 | # CONFIG_USB_KAWETH is not set |
1122 | CONFIG_USB_PEGASUS=m | 1139 | CONFIG_USB_PEGASUS=m |
1123 | CONFIG_USB_RTL8150=m | 1140 | CONFIG_USB_RTL8150=m |
1141 | # CONFIG_USB_USBNET_MII is not set | ||
1124 | # CONFIG_USB_USBNET is not set | 1142 | # CONFIG_USB_USBNET is not set |
1125 | CONFIG_USB_MON=y | 1143 | CONFIG_USB_MON=y |
1126 | 1144 | ||
@@ -1156,6 +1174,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m | |||
1156 | # CONFIG_USB_SERIAL_KLSI is not set | 1174 | # CONFIG_USB_SERIAL_KLSI is not set |
1157 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 1175 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
1158 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 1176 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
1177 | # CONFIG_USB_SERIAL_MOS7720 is not set | ||
1159 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1178 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1160 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1179 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1161 | CONFIG_USB_SERIAL_PL2303=m | 1180 | CONFIG_USB_SERIAL_PL2303=m |
@@ -1167,6 +1186,7 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1167 | # CONFIG_USB_SERIAL_XIRCOM is not set | 1186 | # CONFIG_USB_SERIAL_XIRCOM is not set |
1168 | # CONFIG_USB_SERIAL_OPTION is not set | 1187 | # CONFIG_USB_SERIAL_OPTION is not set |
1169 | # CONFIG_USB_SERIAL_OMNINET is not set | 1188 | # CONFIG_USB_SERIAL_OMNINET is not set |
1189 | # CONFIG_USB_SERIAL_DEBUG is not set | ||
1170 | 1190 | ||
1171 | # | 1191 | # |
1172 | # USB Miscellaneous drivers | 1192 | # USB Miscellaneous drivers |
@@ -1188,6 +1208,7 @@ CONFIG_USB_EMI26=m | |||
1188 | CONFIG_USB_SISUSBVGA=m | 1208 | CONFIG_USB_SISUSBVGA=m |
1189 | CONFIG_USB_SISUSBVGA_CON=y | 1209 | CONFIG_USB_SISUSBVGA_CON=y |
1190 | # CONFIG_USB_LD is not set | 1210 | # CONFIG_USB_LD is not set |
1211 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1191 | # CONFIG_USB_TEST is not set | 1212 | # CONFIG_USB_TEST is not set |
1192 | 1213 | ||
1193 | # | 1214 | # |
@@ -1254,6 +1275,7 @@ CONFIG_EXT3_FS=y | |||
1254 | CONFIG_EXT3_FS_XATTR=y | 1275 | CONFIG_EXT3_FS_XATTR=y |
1255 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 1276 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
1256 | # CONFIG_EXT3_FS_SECURITY is not set | 1277 | # CONFIG_EXT3_FS_SECURITY is not set |
1278 | # CONFIG_EXT4DEV_FS is not set | ||
1257 | CONFIG_JBD=y | 1279 | CONFIG_JBD=y |
1258 | # CONFIG_JBD_DEBUG is not set | 1280 | # CONFIG_JBD_DEBUG is not set |
1259 | CONFIG_FS_MBCACHE=y | 1281 | CONFIG_FS_MBCACHE=y |
@@ -1264,6 +1286,7 @@ CONFIG_REISERFS_FS=y | |||
1264 | # CONFIG_JFS_FS is not set | 1286 | # CONFIG_JFS_FS is not set |
1265 | # CONFIG_FS_POSIX_ACL is not set | 1287 | # CONFIG_FS_POSIX_ACL is not set |
1266 | # CONFIG_XFS_FS is not set | 1288 | # CONFIG_XFS_FS is not set |
1289 | # CONFIG_GFS2_FS is not set | ||
1267 | # CONFIG_OCFS2_FS is not set | 1290 | # CONFIG_OCFS2_FS is not set |
1268 | # CONFIG_MINIX_FS is not set | 1291 | # CONFIG_MINIX_FS is not set |
1269 | CONFIG_ROMFS_FS=y | 1292 | CONFIG_ROMFS_FS=y |
@@ -1414,6 +1437,7 @@ CONFIG_NLS_CODEPAGE_932=y | |||
1414 | # | 1437 | # |
1415 | # Kernel hacking | 1438 | # Kernel hacking |
1416 | # | 1439 | # |
1440 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1417 | # CONFIG_PRINTK_TIME is not set | 1441 | # CONFIG_PRINTK_TIME is not set |
1418 | CONFIG_ENABLE_MUST_CHECK=y | 1442 | CONFIG_ENABLE_MUST_CHECK=y |
1419 | # CONFIG_MAGIC_SYSRQ is not set | 1443 | # CONFIG_MAGIC_SYSRQ is not set |
@@ -1422,6 +1446,7 @@ CONFIG_ENABLE_MUST_CHECK=y | |||
1422 | CONFIG_LOG_BUF_SHIFT=14 | 1446 | CONFIG_LOG_BUF_SHIFT=14 |
1423 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1447 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1424 | # CONFIG_DEBUG_FS is not set | 1448 | # CONFIG_DEBUG_FS is not set |
1449 | # CONFIG_HEADERS_CHECK is not set | ||
1425 | CONFIG_SH_STANDARD_BIOS=y | 1450 | CONFIG_SH_STANDARD_BIOS=y |
1426 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 1451 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1427 | # CONFIG_EARLY_PRINTK is not set | 1452 | # CONFIG_EARLY_PRINTK is not set |
@@ -1445,6 +1470,4 @@ CONFIG_SH_STANDARD_BIOS=y | |||
1445 | # CONFIG_CRC16 is not set | 1470 | # CONFIG_CRC16 is not set |
1446 | CONFIG_CRC32=y | 1471 | CONFIG_CRC32=y |
1447 | # CONFIG_LIBCRC32C is not set | 1472 | # CONFIG_LIBCRC32C is not set |
1448 | CONFIG_TEXTSEARCH=y | ||
1449 | CONFIG_TEXTSEARCH_KMP=m | ||
1450 | CONFIG_PLIST=y | 1473 | CONFIG_PLIST=y |
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig index 36cec0b6e7c1..87ab9080fd1d 100644 --- a/arch/sh/configs/se7206_defconfig +++ b/arch/sh/configs/se7206_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc4 | 3 | # Linux kernel version: 2.6.19 |
4 | # Sun Nov 5 16:20:10 2006 | 4 | # Wed Dec 6 14:40:15 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -11,6 +11,8 @@ CONFIG_GENERIC_HARDIRQS=y | |||
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | 13 | # CONFIG_GENERIC_TIME is not set |
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
15 | 17 | ||
16 | # | 18 | # |
@@ -34,24 +36,23 @@ CONFIG_LOCALVERSION="" | |||
34 | # CONFIG_IKCONFIG is not set | 36 | # CONFIG_IKCONFIG is not set |
35 | # CONFIG_RELAY is not set | 37 | # CONFIG_RELAY is not set |
36 | CONFIG_INITRAMFS_SOURCE="" | 38 | CONFIG_INITRAMFS_SOURCE="" |
37 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 39 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
38 | CONFIG_SYSCTL=y | 40 | CONFIG_SYSCTL=y |
39 | CONFIG_EMBEDDED=y | 41 | CONFIG_EMBEDDED=y |
40 | CONFIG_UID16=y | 42 | # CONFIG_UID16 is not set |
41 | # CONFIG_SYSCTL_SYSCALL is not set | 43 | # CONFIG_SYSCTL_SYSCALL is not set |
42 | CONFIG_KALLSYMS=y | 44 | # CONFIG_KALLSYMS is not set |
43 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
44 | # CONFIG_HOTPLUG is not set | 45 | # CONFIG_HOTPLUG is not set |
45 | CONFIG_PRINTK=y | 46 | CONFIG_PRINTK=y |
46 | CONFIG_BUG=y | 47 | CONFIG_BUG=y |
47 | CONFIG_ELF_CORE=y | 48 | # CONFIG_ELF_CORE is not set |
48 | CONFIG_BASE_FULL=y | 49 | # CONFIG_BASE_FULL is not set |
49 | # CONFIG_FUTEX is not set | 50 | # CONFIG_FUTEX is not set |
50 | # CONFIG_EPOLL is not set | 51 | # CONFIG_EPOLL is not set |
51 | CONFIG_SLAB=y | 52 | CONFIG_SLAB=y |
52 | CONFIG_VM_EVENT_COUNTERS=y | 53 | # CONFIG_VM_EVENT_COUNTERS is not set |
53 | CONFIG_TINY_SHMEM=y | 54 | CONFIG_TINY_SHMEM=y |
54 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=1 |
55 | # CONFIG_SLOB is not set | 56 | # CONFIG_SLOB is not set |
56 | 57 | ||
57 | # | 58 | # |
@@ -160,6 +161,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y | |||
160 | # | 161 | # |
161 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 162 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
162 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 163 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
164 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
163 | 165 | ||
164 | # | 166 | # |
165 | # SH4AL-DSP Processor Support | 167 | # SH4AL-DSP Processor Support |
@@ -172,7 +174,10 @@ CONFIG_CPU_SUBTYPE_SH7206=y | |||
172 | # | 174 | # |
173 | CONFIG_PAGE_OFFSET=0x00000000 | 175 | CONFIG_PAGE_OFFSET=0x00000000 |
174 | CONFIG_MEMORY_START=0x0c000000 | 176 | CONFIG_MEMORY_START=0x0c000000 |
175 | CONFIG_MEMORY_SIZE=0x02000000 | 177 | CONFIG_MEMORY_SIZE=0x04000000 |
178 | CONFIG_PAGE_SIZE_4KB=y | ||
179 | # CONFIG_PAGE_SIZE_8KB is not set | ||
180 | # CONFIG_PAGE_SIZE_64KB is not set | ||
176 | CONFIG_SELECT_MEMORY_MODEL=y | 181 | CONFIG_SELECT_MEMORY_MODEL=y |
177 | CONFIG_FLATMEM_MANUAL=y | 182 | CONFIG_FLATMEM_MANUAL=y |
178 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 183 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -194,6 +199,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
194 | # Processor features | 199 | # Processor features |
195 | # | 200 | # |
196 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 201 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
202 | CONFIG_CPU_BIG_ENDIAN=y | ||
197 | # CONFIG_SH_FPU is not set | 203 | # CONFIG_SH_FPU is not set |
198 | # CONFIG_SH_FPU_EMU is not set | 204 | # CONFIG_SH_FPU_EMU is not set |
199 | # CONFIG_SH_DSP is not set | 205 | # CONFIG_SH_DSP is not set |
@@ -203,6 +209,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
203 | # | 209 | # |
204 | CONFIG_SH_CMT=y | 210 | CONFIG_SH_CMT=y |
205 | # CONFIG_SH_MTU2 is not set | 211 | # CONFIG_SH_MTU2 is not set |
212 | CONFIG_SH_TIMER_IRQ=140 | ||
213 | # CONFIG_NO_IDLE_HZ is not set | ||
206 | CONFIG_SH_PCLK_FREQ=33333333 | 214 | CONFIG_SH_PCLK_FREQ=33333333 |
207 | CONFIG_SH_CLK_MD=6 | 215 | CONFIG_SH_CLK_MD=6 |
208 | 216 | ||
@@ -222,6 +230,11 @@ CONFIG_SH_CLK_MD=6 | |||
222 | # CONFIG_HD6446X_SERIES is not set | 230 | # CONFIG_HD6446X_SERIES is not set |
223 | 231 | ||
224 | # | 232 | # |
233 | # Additional SuperH Device Drivers | ||
234 | # | ||
235 | # CONFIG_PUSH_SWITCH is not set | ||
236 | |||
237 | # | ||
225 | # Kernel features | 238 | # Kernel features |
226 | # | 239 | # |
227 | CONFIG_HZ_100=y | 240 | CONFIG_HZ_100=y |
@@ -279,9 +292,6 @@ CONFIG_NET=y | |||
279 | # CONFIG_NETDEBUG is not set | 292 | # CONFIG_NETDEBUG is not set |
280 | # CONFIG_PACKET is not set | 293 | # CONFIG_PACKET is not set |
281 | # CONFIG_UNIX is not set | 294 | # CONFIG_UNIX is not set |
282 | CONFIG_XFRM=y | ||
283 | # CONFIG_XFRM_USER is not set | ||
284 | # CONFIG_XFRM_SUB_POLICY is not set | ||
285 | # CONFIG_NET_KEY is not set | 295 | # CONFIG_NET_KEY is not set |
286 | CONFIG_INET=y | 296 | CONFIG_INET=y |
287 | # CONFIG_IP_MULTICAST is not set | 297 | # CONFIG_IP_MULTICAST is not set |
@@ -297,9 +307,9 @@ CONFIG_IP_FIB_HASH=y | |||
297 | # CONFIG_INET_IPCOMP is not set | 307 | # CONFIG_INET_IPCOMP is not set |
298 | # CONFIG_INET_XFRM_TUNNEL is not set | 308 | # CONFIG_INET_XFRM_TUNNEL is not set |
299 | # CONFIG_INET_TUNNEL is not set | 309 | # CONFIG_INET_TUNNEL is not set |
300 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 310 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
301 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 311 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
302 | CONFIG_INET_XFRM_MODE_BEET=y | 312 | # CONFIG_INET_XFRM_MODE_BEET is not set |
303 | # CONFIG_INET_DIAG is not set | 313 | # CONFIG_INET_DIAG is not set |
304 | # CONFIG_TCP_CONG_ADVANCED is not set | 314 | # CONFIG_TCP_CONG_ADVANCED is not set |
305 | CONFIG_TCP_CONG_CUBIC=y | 315 | CONFIG_TCP_CONG_CUBIC=y |
@@ -371,7 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
371 | # | 381 | # |
372 | CONFIG_MTD=y | 382 | CONFIG_MTD=y |
373 | # CONFIG_MTD_DEBUG is not set | 383 | # CONFIG_MTD_DEBUG is not set |
374 | # CONFIG_MTD_CONCAT is not set | 384 | CONFIG_MTD_CONCAT=y |
375 | CONFIG_MTD_PARTITIONS=y | 385 | CONFIG_MTD_PARTITIONS=y |
376 | CONFIG_MTD_REDBOOT_PARTS=y | 386 | CONFIG_MTD_REDBOOT_PARTS=y |
377 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | 387 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 |
@@ -422,7 +432,7 @@ CONFIG_MTD_CFI_UTIL=y | |||
422 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 432 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
423 | CONFIG_MTD_PHYSMAP=y | 433 | CONFIG_MTD_PHYSMAP=y |
424 | CONFIG_MTD_PHYSMAP_START=0x20000000 | 434 | CONFIG_MTD_PHYSMAP_START=0x20000000 |
425 | CONFIG_MTD_PHYSMAP_LEN=0x1000000 | 435 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 |
426 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | 436 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 |
427 | # CONFIG_MTD_SOLUTIONENGINE is not set | 437 | # CONFIG_MTD_SOLUTIONENGINE is not set |
428 | # CONFIG_MTD_UCLINUX is not set | 438 | # CONFIG_MTD_UCLINUX is not set |
@@ -468,10 +478,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | |||
468 | # CONFIG_BLK_DEV_COW_COMMON is not set | 478 | # CONFIG_BLK_DEV_COW_COMMON is not set |
469 | # CONFIG_BLK_DEV_LOOP is not set | 479 | # CONFIG_BLK_DEV_LOOP is not set |
470 | # CONFIG_BLK_DEV_NBD is not set | 480 | # CONFIG_BLK_DEV_NBD is not set |
471 | CONFIG_BLK_DEV_RAM=y | 481 | # CONFIG_BLK_DEV_RAM is not set |
472 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
473 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
474 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
475 | # CONFIG_BLK_DEV_INITRD is not set | 482 | # CONFIG_BLK_DEV_INITRD is not set |
476 | # CONFIG_CDROM_PKTCDVD is not set | 483 | # CONFIG_CDROM_PKTCDVD is not set |
477 | # CONFIG_ATA_OVER_ETH is not set | 484 | # CONFIG_ATA_OVER_ETH is not set |
@@ -519,7 +526,50 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
519 | # | 526 | # |
520 | # Network device support | 527 | # Network device support |
521 | # | 528 | # |
522 | # CONFIG_NETDEVICES is not set | 529 | CONFIG_NETDEVICES=y |
530 | # CONFIG_DUMMY is not set | ||
531 | # CONFIG_BONDING is not set | ||
532 | # CONFIG_EQUALIZER is not set | ||
533 | # CONFIG_TUN is not set | ||
534 | |||
535 | # | ||
536 | # PHY device support | ||
537 | # | ||
538 | # CONFIG_PHYLIB is not set | ||
539 | |||
540 | # | ||
541 | # Ethernet (10 or 100Mbit) | ||
542 | # | ||
543 | CONFIG_NET_ETHERNET=y | ||
544 | CONFIG_MII=y | ||
545 | # CONFIG_STNIC is not set | ||
546 | CONFIG_SMC91X=y | ||
547 | |||
548 | # | ||
549 | # Ethernet (1000 Mbit) | ||
550 | # | ||
551 | |||
552 | # | ||
553 | # Ethernet (10000 Mbit) | ||
554 | # | ||
555 | |||
556 | # | ||
557 | # Token Ring devices | ||
558 | # | ||
559 | |||
560 | # | ||
561 | # Wireless LAN (non-hamradio) | ||
562 | # | ||
563 | # CONFIG_NET_RADIO is not set | ||
564 | |||
565 | # | ||
566 | # Wan interfaces | ||
567 | # | ||
568 | # CONFIG_WAN is not set | ||
569 | # CONFIG_PPP is not set | ||
570 | # CONFIG_SLIP is not set | ||
571 | # CONFIG_SHAPER is not set | ||
572 | # CONFIG_NETCONSOLE is not set | ||
523 | # CONFIG_NETPOLL is not set | 573 | # CONFIG_NETPOLL is not set |
524 | # CONFIG_NET_POLL_CONTROLLER is not set | 574 | # CONFIG_NET_POLL_CONTROLLER is not set |
525 | 575 | ||
@@ -536,7 +586,26 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
536 | # | 586 | # |
537 | # Input device support | 587 | # Input device support |
538 | # | 588 | # |
539 | # CONFIG_INPUT is not set | 589 | CONFIG_INPUT=y |
590 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
591 | |||
592 | # | ||
593 | # Userland interfaces | ||
594 | # | ||
595 | # CONFIG_INPUT_MOUSEDEV is not set | ||
596 | # CONFIG_INPUT_JOYDEV is not set | ||
597 | # CONFIG_INPUT_TSDEV is not set | ||
598 | # CONFIG_INPUT_EVDEV is not set | ||
599 | # CONFIG_INPUT_EVBUG is not set | ||
600 | |||
601 | # | ||
602 | # Input Device Drivers | ||
603 | # | ||
604 | # CONFIG_INPUT_KEYBOARD is not set | ||
605 | # CONFIG_INPUT_MOUSE is not set | ||
606 | # CONFIG_INPUT_JOYSTICK is not set | ||
607 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
608 | # CONFIG_INPUT_MISC is not set | ||
540 | 609 | ||
541 | # | 610 | # |
542 | # Hardware I/O ports | 611 | # Hardware I/O ports |
@@ -564,8 +633,7 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y | |||
564 | CONFIG_SERIAL_CORE=y | 633 | CONFIG_SERIAL_CORE=y |
565 | CONFIG_SERIAL_CORE_CONSOLE=y | 634 | CONFIG_SERIAL_CORE_CONSOLE=y |
566 | # CONFIG_UNIX98_PTYS is not set | 635 | # CONFIG_UNIX98_PTYS is not set |
567 | CONFIG_LEGACY_PTYS=y | 636 | # CONFIG_LEGACY_PTYS is not set |
568 | CONFIG_LEGACY_PTY_COUNT=256 | ||
569 | 637 | ||
570 | # | 638 | # |
571 | # IPMI | 639 | # IPMI |
@@ -576,7 +644,7 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
576 | # Watchdog Cards | 644 | # Watchdog Cards |
577 | # | 645 | # |
578 | # CONFIG_WATCHDOG is not set | 646 | # CONFIG_WATCHDOG is not set |
579 | CONFIG_HW_RANDOM=y | 647 | # CONFIG_HW_RANDOM is not set |
580 | # CONFIG_GEN_RTC is not set | 648 | # CONFIG_GEN_RTC is not set |
581 | # CONFIG_DTLK is not set | 649 | # CONFIG_DTLK is not set |
582 | # CONFIG_R3964 is not set | 650 | # CONFIG_R3964 is not set |
@@ -610,12 +678,8 @@ CONFIG_HW_RANDOM=y | |||
610 | # | 678 | # |
611 | # Hardware Monitoring support | 679 | # Hardware Monitoring support |
612 | # | 680 | # |
613 | CONFIG_HWMON=y | 681 | # CONFIG_HWMON is not set |
614 | # CONFIG_HWMON_VID is not set | 682 | # CONFIG_HWMON_VID is not set |
615 | # CONFIG_SENSORS_ABITUGURU is not set | ||
616 | # CONFIG_SENSORS_F71805F is not set | ||
617 | # CONFIG_SENSORS_VT1211 is not set | ||
618 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
619 | 683 | ||
620 | # | 684 | # |
621 | # Multimedia devices | 685 | # Multimedia devices |
@@ -630,7 +694,7 @@ CONFIG_HWMON=y | |||
630 | # | 694 | # |
631 | # Graphics support | 695 | # Graphics support |
632 | # | 696 | # |
633 | CONFIG_FIRMWARE_EDID=y | 697 | # CONFIG_FIRMWARE_EDID is not set |
634 | # CONFIG_FB is not set | 698 | # CONFIG_FB is not set |
635 | 699 | ||
636 | # | 700 | # |
@@ -701,8 +765,7 @@ CONFIG_FIRMWARE_EDID=y | |||
701 | # | 765 | # |
702 | # File systems | 766 | # File systems |
703 | # | 767 | # |
704 | CONFIG_EXT2_FS=y | 768 | # CONFIG_EXT2_FS is not set |
705 | # CONFIG_EXT2_FS_XATTR is not set | ||
706 | # CONFIG_EXT3_FS is not set | 769 | # CONFIG_EXT3_FS is not set |
707 | # CONFIG_EXT4DEV_FS is not set | 770 | # CONFIG_EXT4DEV_FS is not set |
708 | # CONFIG_REISERFS_FS is not set | 771 | # CONFIG_REISERFS_FS is not set |
@@ -755,7 +818,7 @@ CONFIG_RAMFS=y | |||
755 | # CONFIG_EFS_FS is not set | 818 | # CONFIG_EFS_FS is not set |
756 | # CONFIG_JFFS_FS is not set | 819 | # CONFIG_JFFS_FS is not set |
757 | # CONFIG_JFFS2_FS is not set | 820 | # CONFIG_JFFS2_FS is not set |
758 | CONFIG_CRAMFS=y | 821 | # CONFIG_CRAMFS is not set |
759 | # CONFIG_VXFS_FS is not set | 822 | # CONFIG_VXFS_FS is not set |
760 | # CONFIG_HPFS_FS is not set | 823 | # CONFIG_HPFS_FS is not set |
761 | # CONFIG_QNX4FS_FS is not set | 824 | # CONFIG_QNX4FS_FS is not set |
@@ -793,8 +856,9 @@ CONFIG_MSDOS_PARTITION=y | |||
793 | # | 856 | # |
794 | # Kernel hacking | 857 | # Kernel hacking |
795 | # | 858 | # |
859 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
796 | # CONFIG_PRINTK_TIME is not set | 860 | # CONFIG_PRINTK_TIME is not set |
797 | CONFIG_ENABLE_MUST_CHECK=y | 861 | # CONFIG_ENABLE_MUST_CHECK is not set |
798 | # CONFIG_MAGIC_SYSRQ is not set | 862 | # CONFIG_MAGIC_SYSRQ is not set |
799 | # CONFIG_UNUSED_SYMBOLS is not set | 863 | # CONFIG_UNUSED_SYMBOLS is not set |
800 | # CONFIG_DEBUG_KERNEL is not set | 864 | # CONFIG_DEBUG_KERNEL is not set |
@@ -819,7 +883,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
819 | # | 883 | # |
820 | # Library routines | 884 | # Library routines |
821 | # | 885 | # |
822 | CONFIG_CRC_CCITT=y | 886 | # CONFIG_CRC_CCITT is not set |
823 | # CONFIG_CRC16 is not set | 887 | # CONFIG_CRC16 is not set |
824 | CONFIG_CRC32=y | 888 | CONFIG_CRC32=y |
825 | # CONFIG_LIBCRC32C is not set | 889 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig new file mode 100644 index 000000000000..20ac7f4c53fb --- /dev/null +++ b/arch/sh/configs/se7619_defconfig | |||
@@ -0,0 +1,744 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Wed Dec 6 16:35:36 2006 | ||
5 | # | ||
6 | CONFIG_SUPERH=y | ||
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
8 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_GENERIC_IRQ_PROBE=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
17 | |||
18 | # | ||
19 | # Code maturity level options | ||
20 | # | ||
21 | CONFIG_EXPERIMENTAL=y | ||
22 | CONFIG_BROKEN_ON_SMP=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | # CONFIG_LOCALVERSION_AUTO is not set | ||
30 | # CONFIG_SYSVIPC is not set | ||
31 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
32 | # CONFIG_UTS_NS is not set | ||
33 | # CONFIG_IKCONFIG is not set | ||
34 | # CONFIG_RELAY is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
37 | CONFIG_SYSCTL=y | ||
38 | CONFIG_EMBEDDED=y | ||
39 | # CONFIG_UID16 is not set | ||
40 | # CONFIG_SYSCTL_SYSCALL is not set | ||
41 | # CONFIG_KALLSYMS is not set | ||
42 | # CONFIG_HOTPLUG is not set | ||
43 | CONFIG_PRINTK=y | ||
44 | CONFIG_BUG=y | ||
45 | # CONFIG_ELF_CORE is not set | ||
46 | # CONFIG_BASE_FULL is not set | ||
47 | # CONFIG_FUTEX is not set | ||
48 | # CONFIG_EPOLL is not set | ||
49 | CONFIG_SLAB=y | ||
50 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
51 | CONFIG_TINY_SHMEM=y | ||
52 | CONFIG_BASE_SMALL=1 | ||
53 | # CONFIG_SLOB is not set | ||
54 | |||
55 | # | ||
56 | # Loadable module support | ||
57 | # | ||
58 | # CONFIG_MODULES is not set | ||
59 | |||
60 | # | ||
61 | # Block layer | ||
62 | # | ||
63 | CONFIG_BLOCK=y | ||
64 | # CONFIG_LBD is not set | ||
65 | # CONFIG_LSF is not set | ||
66 | |||
67 | # | ||
68 | # IO Schedulers | ||
69 | # | ||
70 | CONFIG_IOSCHED_NOOP=y | ||
71 | # CONFIG_IOSCHED_AS is not set | ||
72 | # CONFIG_IOSCHED_DEADLINE is not set | ||
73 | # CONFIG_IOSCHED_CFQ is not set | ||
74 | # CONFIG_DEFAULT_AS is not set | ||
75 | # CONFIG_DEFAULT_DEADLINE is not set | ||
76 | # CONFIG_DEFAULT_CFQ is not set | ||
77 | CONFIG_DEFAULT_NOOP=y | ||
78 | CONFIG_DEFAULT_IOSCHED="noop" | ||
79 | |||
80 | # | ||
81 | # System type | ||
82 | # | ||
83 | # CONFIG_SH_SOLUTION_ENGINE is not set | ||
84 | # CONFIG_SH_7751_SOLUTION_ENGINE is not set | ||
85 | # CONFIG_SH_7300_SOLUTION_ENGINE is not set | ||
86 | # CONFIG_SH_7343_SOLUTION_ENGINE is not set | ||
87 | # CONFIG_SH_73180_SOLUTION_ENGINE is not set | ||
88 | # CONFIG_SH_7751_SYSTEMH is not set | ||
89 | # CONFIG_SH_HP6XX is not set | ||
90 | # CONFIG_SH_EC3104 is not set | ||
91 | # CONFIG_SH_SATURN is not set | ||
92 | # CONFIG_SH_DREAMCAST is not set | ||
93 | # CONFIG_SH_BIGSUR is not set | ||
94 | # CONFIG_SH_MPC1211 is not set | ||
95 | # CONFIG_SH_SH03 is not set | ||
96 | # CONFIG_SH_SECUREEDGE5410 is not set | ||
97 | # CONFIG_SH_HS7751RVOIP is not set | ||
98 | # CONFIG_SH_7710VOIPGW is not set | ||
99 | # CONFIG_SH_RTS7751R2D is not set | ||
100 | # CONFIG_SH_R7780RP is not set | ||
101 | # CONFIG_SH_EDOSK7705 is not set | ||
102 | # CONFIG_SH_SH4202_MICRODEV is not set | ||
103 | # CONFIG_SH_LANDISK is not set | ||
104 | # CONFIG_SH_TITAN is not set | ||
105 | # CONFIG_SH_SHMIN is not set | ||
106 | # CONFIG_SH_7206_SOLUTION_ENGINE is not set | ||
107 | CONFIG_SH_7619_SOLUTION_ENGINE=y | ||
108 | # CONFIG_SH_UNKNOWN is not set | ||
109 | |||
110 | # | ||
111 | # Processor selection | ||
112 | # | ||
113 | CONFIG_CPU_SH2=y | ||
114 | |||
115 | # | ||
116 | # SH-2 Processor Support | ||
117 | # | ||
118 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | ||
119 | CONFIG_CPU_SUBTYPE_SH7619=y | ||
120 | |||
121 | # | ||
122 | # SH-2A Processor Support | ||
123 | # | ||
124 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
125 | |||
126 | # | ||
127 | # SH-3 Processor Support | ||
128 | # | ||
129 | # CONFIG_CPU_SUBTYPE_SH7300 is not set | ||
130 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | ||
131 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | ||
132 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | ||
133 | # CONFIG_CPU_SUBTYPE_SH7708 is not set | ||
134 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | ||
135 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | ||
136 | |||
137 | # | ||
138 | # SH-4 Processor Support | ||
139 | # | ||
140 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | ||
141 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | ||
142 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | ||
143 | # CONFIG_CPU_SUBTYPE_SH7750S is not set | ||
144 | # CONFIG_CPU_SUBTYPE_SH7751 is not set | ||
145 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | ||
146 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | ||
147 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | ||
148 | |||
149 | # | ||
150 | # ST40 Processor Support | ||
151 | # | ||
152 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | ||
153 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | ||
154 | |||
155 | # | ||
156 | # SH-4A Processor Support | ||
157 | # | ||
158 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | ||
159 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | ||
160 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
161 | |||
162 | # | ||
163 | # SH4AL-DSP Processor Support | ||
164 | # | ||
165 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | ||
166 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | ||
167 | |||
168 | # | ||
169 | # Memory management options | ||
170 | # | ||
171 | CONFIG_PAGE_OFFSET=0x00000000 | ||
172 | CONFIG_MEMORY_START=0x0c000000 | ||
173 | CONFIG_MEMORY_SIZE=0x04000000 | ||
174 | CONFIG_PAGE_SIZE_4KB=y | ||
175 | # CONFIG_PAGE_SIZE_8KB is not set | ||
176 | # CONFIG_PAGE_SIZE_64KB is not set | ||
177 | CONFIG_SELECT_MEMORY_MODEL=y | ||
178 | CONFIG_FLATMEM_MANUAL=y | ||
179 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
180 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
181 | CONFIG_FLATMEM=y | ||
182 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
183 | # CONFIG_SPARSEMEM_STATIC is not set | ||
184 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
185 | # CONFIG_RESOURCES_64BIT is not set | ||
186 | |||
187 | # | ||
188 | # Cache configuration | ||
189 | # | ||
190 | # CONFIG_SH_DIRECT_MAPPED is not set | ||
191 | CONFIG_SH_WRITETHROUGH=y | ||
192 | # CONFIG_SH_OCRAM is not set | ||
193 | |||
194 | # | ||
195 | # Processor features | ||
196 | # | ||
197 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
198 | CONFIG_CPU_BIG_ENDIAN=y | ||
199 | # CONFIG_SH_FPU is not set | ||
200 | # CONFIG_SH_FPU_EMU is not set | ||
201 | # CONFIG_SH_DSP is not set | ||
202 | |||
203 | # | ||
204 | # Timer support | ||
205 | # | ||
206 | CONFIG_SH_CMT=y | ||
207 | CONFIG_SH_TIMER_IRQ=86 | ||
208 | # CONFIG_NO_IDLE_HZ is not set | ||
209 | CONFIG_SH_PCLK_FREQ=31250000 | ||
210 | CONFIG_SH_CLK_MD=5 | ||
211 | |||
212 | # | ||
213 | # CPU Frequency scaling | ||
214 | # | ||
215 | # CONFIG_CPU_FREQ is not set | ||
216 | |||
217 | # | ||
218 | # DMA support | ||
219 | # | ||
220 | # CONFIG_SH_DMA is not set | ||
221 | |||
222 | # | ||
223 | # Companion Chips | ||
224 | # | ||
225 | # CONFIG_HD6446X_SERIES is not set | ||
226 | |||
227 | # | ||
228 | # Additional SuperH Device Drivers | ||
229 | # | ||
230 | # CONFIG_PUSH_SWITCH is not set | ||
231 | |||
232 | # | ||
233 | # Kernel features | ||
234 | # | ||
235 | CONFIG_HZ_100=y | ||
236 | # CONFIG_HZ_250 is not set | ||
237 | # CONFIG_HZ_1000 is not set | ||
238 | CONFIG_HZ=100 | ||
239 | # CONFIG_KEXEC is not set | ||
240 | # CONFIG_SMP is not set | ||
241 | CONFIG_PREEMPT_NONE=y | ||
242 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
243 | # CONFIG_PREEMPT is not set | ||
244 | |||
245 | # | ||
246 | # Boot options | ||
247 | # | ||
248 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | ||
249 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
250 | # CONFIG_UBC_WAKEUP is not set | ||
251 | # CONFIG_CMDLINE_BOOL is not set | ||
252 | |||
253 | # | ||
254 | # Bus options | ||
255 | # | ||
256 | # CONFIG_PCI is not set | ||
257 | |||
258 | # | ||
259 | # PCCARD (PCMCIA/CardBus) support | ||
260 | # | ||
261 | |||
262 | # | ||
263 | # PCI Hotplug Support | ||
264 | # | ||
265 | |||
266 | # | ||
267 | # Executable file formats | ||
268 | # | ||
269 | CONFIG_BINFMT_FLAT=y | ||
270 | CONFIG_BINFMT_ZFLAT=y | ||
271 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
272 | # CONFIG_BINFMT_MISC is not set | ||
273 | |||
274 | # | ||
275 | # Power management options (EXPERIMENTAL) | ||
276 | # | ||
277 | # CONFIG_PM is not set | ||
278 | |||
279 | # | ||
280 | # Networking | ||
281 | # | ||
282 | # CONFIG_NET is not set | ||
283 | |||
284 | # | ||
285 | # Device Drivers | ||
286 | # | ||
287 | |||
288 | # | ||
289 | # Generic Driver Options | ||
290 | # | ||
291 | # CONFIG_STANDALONE is not set | ||
292 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
293 | # CONFIG_SYS_HYPERVISOR is not set | ||
294 | |||
295 | # | ||
296 | # Connector - unified userspace <-> kernelspace linker | ||
297 | # | ||
298 | |||
299 | # | ||
300 | # Memory Technology Devices (MTD) | ||
301 | # | ||
302 | CONFIG_MTD=y | ||
303 | # CONFIG_MTD_DEBUG is not set | ||
304 | CONFIG_MTD_CONCAT=y | ||
305 | CONFIG_MTD_PARTITIONS=y | ||
306 | CONFIG_MTD_REDBOOT_PARTS=y | ||
307 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
308 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
309 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
310 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
311 | |||
312 | # | ||
313 | # User Modules And Translation Layers | ||
314 | # | ||
315 | CONFIG_MTD_CHAR=y | ||
316 | CONFIG_MTD_BLOCK=y | ||
317 | # CONFIG_FTL is not set | ||
318 | # CONFIG_NFTL is not set | ||
319 | # CONFIG_INFTL is not set | ||
320 | # CONFIG_RFD_FTL is not set | ||
321 | # CONFIG_SSFDC is not set | ||
322 | |||
323 | # | ||
324 | # RAM/ROM/Flash chip drivers | ||
325 | # | ||
326 | CONFIG_MTD_CFI=y | ||
327 | # CONFIG_MTD_JEDECPROBE is not set | ||
328 | CONFIG_MTD_GEN_PROBE=y | ||
329 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
330 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
331 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
332 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
333 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
334 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
335 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
336 | CONFIG_MTD_CFI_I1=y | ||
337 | CONFIG_MTD_CFI_I2=y | ||
338 | # CONFIG_MTD_CFI_I4 is not set | ||
339 | # CONFIG_MTD_CFI_I8 is not set | ||
340 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
341 | CONFIG_MTD_CFI_AMDSTD=y | ||
342 | # CONFIG_MTD_CFI_STAA is not set | ||
343 | CONFIG_MTD_CFI_UTIL=y | ||
344 | # CONFIG_MTD_RAM is not set | ||
345 | # CONFIG_MTD_ROM is not set | ||
346 | # CONFIG_MTD_ABSENT is not set | ||
347 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
348 | |||
349 | # | ||
350 | # Mapping drivers for chip access | ||
351 | # | ||
352 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
353 | CONFIG_MTD_PHYSMAP=y | ||
354 | CONFIG_MTD_PHYSMAP_START=0xa0000000 | ||
355 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | ||
356 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
357 | # CONFIG_MTD_SOLUTIONENGINE is not set | ||
358 | # CONFIG_MTD_UCLINUX is not set | ||
359 | # CONFIG_MTD_PLATRAM is not set | ||
360 | |||
361 | # | ||
362 | # Self-contained MTD device drivers | ||
363 | # | ||
364 | # CONFIG_MTD_SLRAM is not set | ||
365 | # CONFIG_MTD_PHRAM is not set | ||
366 | # CONFIG_MTD_MTDRAM is not set | ||
367 | # CONFIG_MTD_BLOCK2MTD is not set | ||
368 | |||
369 | # | ||
370 | # Disk-On-Chip Device Drivers | ||
371 | # | ||
372 | # CONFIG_MTD_DOC2000 is not set | ||
373 | # CONFIG_MTD_DOC2001 is not set | ||
374 | # CONFIG_MTD_DOC2001PLUS is not set | ||
375 | |||
376 | # | ||
377 | # NAND Flash Device Drivers | ||
378 | # | ||
379 | # CONFIG_MTD_NAND is not set | ||
380 | |||
381 | # | ||
382 | # OneNAND Flash Device Drivers | ||
383 | # | ||
384 | # CONFIG_MTD_ONENAND is not set | ||
385 | |||
386 | # | ||
387 | # Parallel port support | ||
388 | # | ||
389 | # CONFIG_PARPORT is not set | ||
390 | |||
391 | # | ||
392 | # Plug and Play support | ||
393 | # | ||
394 | |||
395 | # | ||
396 | # Block devices | ||
397 | # | ||
398 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
399 | # CONFIG_BLK_DEV_LOOP is not set | ||
400 | # CONFIG_BLK_DEV_RAM is not set | ||
401 | # CONFIG_BLK_DEV_INITRD is not set | ||
402 | # CONFIG_CDROM_PKTCDVD is not set | ||
403 | |||
404 | # | ||
405 | # Misc devices | ||
406 | # | ||
407 | # CONFIG_TIFM_CORE is not set | ||
408 | |||
409 | # | ||
410 | # ATA/ATAPI/MFM/RLL support | ||
411 | # | ||
412 | # CONFIG_IDE is not set | ||
413 | |||
414 | # | ||
415 | # SCSI device support | ||
416 | # | ||
417 | # CONFIG_RAID_ATTRS is not set | ||
418 | # CONFIG_SCSI is not set | ||
419 | # CONFIG_SCSI_NETLINK is not set | ||
420 | |||
421 | # | ||
422 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
423 | # | ||
424 | # CONFIG_ATA is not set | ||
425 | |||
426 | # | ||
427 | # Multi-device support (RAID and LVM) | ||
428 | # | ||
429 | # CONFIG_MD is not set | ||
430 | |||
431 | # | ||
432 | # Fusion MPT device support | ||
433 | # | ||
434 | # CONFIG_FUSION is not set | ||
435 | |||
436 | # | ||
437 | # IEEE 1394 (FireWire) support | ||
438 | # | ||
439 | |||
440 | # | ||
441 | # I2O device support | ||
442 | # | ||
443 | |||
444 | # | ||
445 | # ISDN subsystem | ||
446 | # | ||
447 | |||
448 | # | ||
449 | # Telephony Support | ||
450 | # | ||
451 | # CONFIG_PHONE is not set | ||
452 | |||
453 | # | ||
454 | # Input device support | ||
455 | # | ||
456 | CONFIG_INPUT=y | ||
457 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
458 | |||
459 | # | ||
460 | # Userland interfaces | ||
461 | # | ||
462 | # CONFIG_INPUT_MOUSEDEV is not set | ||
463 | # CONFIG_INPUT_JOYDEV is not set | ||
464 | # CONFIG_INPUT_TSDEV is not set | ||
465 | # CONFIG_INPUT_EVDEV is not set | ||
466 | # CONFIG_INPUT_EVBUG is not set | ||
467 | |||
468 | # | ||
469 | # Input Device Drivers | ||
470 | # | ||
471 | # CONFIG_INPUT_KEYBOARD is not set | ||
472 | # CONFIG_INPUT_MOUSE is not set | ||
473 | # CONFIG_INPUT_JOYSTICK is not set | ||
474 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
475 | # CONFIG_INPUT_MISC is not set | ||
476 | |||
477 | # | ||
478 | # Hardware I/O ports | ||
479 | # | ||
480 | # CONFIG_SERIO is not set | ||
481 | # CONFIG_GAMEPORT is not set | ||
482 | |||
483 | # | ||
484 | # Character devices | ||
485 | # | ||
486 | # CONFIG_VT is not set | ||
487 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
488 | |||
489 | # | ||
490 | # Serial drivers | ||
491 | # | ||
492 | # CONFIG_SERIAL_8250 is not set | ||
493 | |||
494 | # | ||
495 | # Non-8250 serial port support | ||
496 | # | ||
497 | CONFIG_SERIAL_SH_SCI=y | ||
498 | CONFIG_SERIAL_SH_SCI_NR_UARTS=3 | ||
499 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
500 | CONFIG_SERIAL_CORE=y | ||
501 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
502 | # CONFIG_UNIX98_PTYS is not set | ||
503 | # CONFIG_LEGACY_PTYS is not set | ||
504 | |||
505 | # | ||
506 | # IPMI | ||
507 | # | ||
508 | # CONFIG_IPMI_HANDLER is not set | ||
509 | |||
510 | # | ||
511 | # Watchdog Cards | ||
512 | # | ||
513 | # CONFIG_WATCHDOG is not set | ||
514 | # CONFIG_HW_RANDOM is not set | ||
515 | # CONFIG_GEN_RTC is not set | ||
516 | # CONFIG_DTLK is not set | ||
517 | # CONFIG_R3964 is not set | ||
518 | |||
519 | # | ||
520 | # Ftape, the floppy tape device driver | ||
521 | # | ||
522 | # CONFIG_RAW_DRIVER is not set | ||
523 | |||
524 | # | ||
525 | # TPM devices | ||
526 | # | ||
527 | # CONFIG_TCG_TPM is not set | ||
528 | |||
529 | # | ||
530 | # I2C support | ||
531 | # | ||
532 | # CONFIG_I2C is not set | ||
533 | |||
534 | # | ||
535 | # SPI support | ||
536 | # | ||
537 | # CONFIG_SPI is not set | ||
538 | # CONFIG_SPI_MASTER is not set | ||
539 | |||
540 | # | ||
541 | # Dallas's 1-wire bus | ||
542 | # | ||
543 | # CONFIG_W1 is not set | ||
544 | |||
545 | # | ||
546 | # Hardware Monitoring support | ||
547 | # | ||
548 | # CONFIG_HWMON is not set | ||
549 | # CONFIG_HWMON_VID is not set | ||
550 | |||
551 | # | ||
552 | # Multimedia devices | ||
553 | # | ||
554 | # CONFIG_VIDEO_DEV is not set | ||
555 | |||
556 | # | ||
557 | # Digital Video Broadcasting Devices | ||
558 | # | ||
559 | |||
560 | # | ||
561 | # Graphics support | ||
562 | # | ||
563 | # CONFIG_FIRMWARE_EDID is not set | ||
564 | # CONFIG_FB is not set | ||
565 | |||
566 | # | ||
567 | # Sound | ||
568 | # | ||
569 | # CONFIG_SOUND is not set | ||
570 | |||
571 | # | ||
572 | # USB support | ||
573 | # | ||
574 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
575 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
576 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
577 | |||
578 | # | ||
579 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
580 | # | ||
581 | |||
582 | # | ||
583 | # USB Gadget Support | ||
584 | # | ||
585 | # CONFIG_USB_GADGET is not set | ||
586 | |||
587 | # | ||
588 | # MMC/SD Card support | ||
589 | # | ||
590 | # CONFIG_MMC is not set | ||
591 | |||
592 | # | ||
593 | # LED devices | ||
594 | # | ||
595 | # CONFIG_NEW_LEDS is not set | ||
596 | |||
597 | # | ||
598 | # LED drivers | ||
599 | # | ||
600 | |||
601 | # | ||
602 | # LED Triggers | ||
603 | # | ||
604 | |||
605 | # | ||
606 | # InfiniBand support | ||
607 | # | ||
608 | |||
609 | # | ||
610 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
611 | # | ||
612 | |||
613 | # | ||
614 | # Real Time Clock | ||
615 | # | ||
616 | # CONFIG_RTC_CLASS is not set | ||
617 | |||
618 | # | ||
619 | # DMA Engine support | ||
620 | # | ||
621 | # CONFIG_DMA_ENGINE is not set | ||
622 | |||
623 | # | ||
624 | # DMA Clients | ||
625 | # | ||
626 | |||
627 | # | ||
628 | # DMA Devices | ||
629 | # | ||
630 | |||
631 | # | ||
632 | # File systems | ||
633 | # | ||
634 | # CONFIG_EXT2_FS is not set | ||
635 | # CONFIG_EXT3_FS is not set | ||
636 | # CONFIG_EXT4DEV_FS is not set | ||
637 | # CONFIG_REISERFS_FS is not set | ||
638 | # CONFIG_JFS_FS is not set | ||
639 | # CONFIG_FS_POSIX_ACL is not set | ||
640 | # CONFIG_XFS_FS is not set | ||
641 | # CONFIG_GFS2_FS is not set | ||
642 | # CONFIG_MINIX_FS is not set | ||
643 | CONFIG_ROMFS_FS=y | ||
644 | # CONFIG_INOTIFY is not set | ||
645 | # CONFIG_QUOTA is not set | ||
646 | # CONFIG_DNOTIFY is not set | ||
647 | # CONFIG_AUTOFS_FS is not set | ||
648 | # CONFIG_AUTOFS4_FS is not set | ||
649 | # CONFIG_FUSE_FS is not set | ||
650 | |||
651 | # | ||
652 | # CD-ROM/DVD Filesystems | ||
653 | # | ||
654 | # CONFIG_ISO9660_FS is not set | ||
655 | # CONFIG_UDF_FS is not set | ||
656 | |||
657 | # | ||
658 | # DOS/FAT/NT Filesystems | ||
659 | # | ||
660 | # CONFIG_MSDOS_FS is not set | ||
661 | # CONFIG_VFAT_FS is not set | ||
662 | # CONFIG_NTFS_FS is not set | ||
663 | |||
664 | # | ||
665 | # Pseudo filesystems | ||
666 | # | ||
667 | CONFIG_PROC_FS=y | ||
668 | CONFIG_PROC_SYSCTL=y | ||
669 | # CONFIG_SYSFS is not set | ||
670 | # CONFIG_TMPFS is not set | ||
671 | # CONFIG_HUGETLBFS is not set | ||
672 | # CONFIG_HUGETLB_PAGE is not set | ||
673 | CONFIG_RAMFS=y | ||
674 | |||
675 | # | ||
676 | # Miscellaneous filesystems | ||
677 | # | ||
678 | # CONFIG_ADFS_FS is not set | ||
679 | # CONFIG_AFFS_FS is not set | ||
680 | # CONFIG_HFS_FS is not set | ||
681 | # CONFIG_HFSPLUS_FS is not set | ||
682 | # CONFIG_BEFS_FS is not set | ||
683 | # CONFIG_BFS_FS is not set | ||
684 | # CONFIG_EFS_FS is not set | ||
685 | # CONFIG_JFFS_FS is not set | ||
686 | # CONFIG_JFFS2_FS is not set | ||
687 | # CONFIG_CRAMFS is not set | ||
688 | # CONFIG_VXFS_FS is not set | ||
689 | # CONFIG_HPFS_FS is not set | ||
690 | # CONFIG_QNX4FS_FS is not set | ||
691 | # CONFIG_SYSV_FS is not set | ||
692 | # CONFIG_UFS_FS is not set | ||
693 | |||
694 | # | ||
695 | # Partition Types | ||
696 | # | ||
697 | # CONFIG_PARTITION_ADVANCED is not set | ||
698 | CONFIG_MSDOS_PARTITION=y | ||
699 | |||
700 | # | ||
701 | # Native Language Support | ||
702 | # | ||
703 | # CONFIG_NLS is not set | ||
704 | |||
705 | # | ||
706 | # Profiling support | ||
707 | # | ||
708 | # CONFIG_PROFILING is not set | ||
709 | |||
710 | # | ||
711 | # Kernel hacking | ||
712 | # | ||
713 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
714 | # CONFIG_PRINTK_TIME is not set | ||
715 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
716 | # CONFIG_MAGIC_SYSRQ is not set | ||
717 | # CONFIG_UNUSED_SYMBOLS is not set | ||
718 | # CONFIG_DEBUG_KERNEL is not set | ||
719 | CONFIG_LOG_BUF_SHIFT=14 | ||
720 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
721 | # CONFIG_UNWIND_INFO is not set | ||
722 | # CONFIG_HEADERS_CHECK is not set | ||
723 | # CONFIG_SH_STANDARD_BIOS is not set | ||
724 | # CONFIG_EARLY_SCIF_CONSOLE is not set | ||
725 | # CONFIG_KGDB is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Library routines | ||
739 | # | ||
740 | # CONFIG_CRC_CCITT is not set | ||
741 | # CONFIG_CRC16 is not set | ||
742 | CONFIG_CRC32=y | ||
743 | # CONFIG_LIBCRC32C is not set | ||
744 | CONFIG_ZLIB_INFLATE=y | ||
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index f2b9157c314f..b3d20c0e021f 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/push-switch.h> | 14 | #include <asm/push-switch.h> |
15 | 15 | ||
16 | #define DRV_NAME "push-switch" | 16 | #define DRV_NAME "push-switch" |
17 | #define DRV_VERSION "0.1.0" | 17 | #define DRV_VERSION "0.1.1" |
18 | 18 | ||
19 | static ssize_t switch_show(struct device *dev, | 19 | static ssize_t switch_show(struct device *dev, |
20 | struct device_attribute *attr, | 20 | struct device_attribute *attr, |
@@ -32,10 +32,10 @@ static void switch_timer(unsigned long data) | |||
32 | schedule_work(&psw->work); | 32 | schedule_work(&psw->work); |
33 | } | 33 | } |
34 | 34 | ||
35 | static void switch_work_handler(void *data) | 35 | static void switch_work_handler(struct work_struct *work) |
36 | { | 36 | { |
37 | struct platform_device *pdev = data; | 37 | struct push_switch *psw = container_of(work, struct push_switch, work); |
38 | struct push_switch *psw = platform_get_drvdata(pdev); | 38 | struct platform_device *pdev = psw->pdev; |
39 | 39 | ||
40 | psw->state = 0; | 40 | psw->state = 0; |
41 | 41 | ||
@@ -76,12 +76,15 @@ static int switch_drv_probe(struct platform_device *pdev) | |||
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||
79 | INIT_WORK(&psw->work, switch_work_handler, pdev); | 79 | INIT_WORK(&psw->work, switch_work_handler); |
80 | init_timer(&psw->debounce); | 80 | init_timer(&psw->debounce); |
81 | 81 | ||
82 | psw->debounce.function = switch_timer; | 82 | psw->debounce.function = switch_timer; |
83 | psw->debounce.data = (unsigned long)psw; | 83 | psw->debounce.data = (unsigned long)psw; |
84 | 84 | ||
85 | /* Workqueue API brain-damage */ | ||
86 | psw->pdev = pdev; | ||
87 | |||
85 | platform_set_drvdata(pdev, psw); | 88 | platform_set_drvdata(pdev, psw); |
86 | 89 | ||
87 | return 0; | 90 | return 0; |
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile index 0582e6712b79..d055a3ea6b4b 100644 --- a/arch/sh/kernel/cpu/Makefile +++ b/arch/sh/kernel/cpu/Makefile | |||
@@ -6,6 +6,7 @@ obj-$(CONFIG_CPU_SH2) = sh2/ | |||
6 | obj-$(CONFIG_CPU_SH2A) = sh2a/ | 6 | obj-$(CONFIG_CPU_SH2A) = sh2a/ |
7 | obj-$(CONFIG_CPU_SH3) = sh3/ | 7 | obj-$(CONFIG_CPU_SH3) = sh3/ |
8 | obj-$(CONFIG_CPU_SH4) = sh4/ | 8 | obj-$(CONFIG_CPU_SH4) = sh4/ |
9 | obj-$(CONFIG_CPU_SH4A) += sh4a/ | ||
9 | 10 | ||
10 | obj-$(CONFIG_UBC_WAKEUP) += ubc.o | 11 | obj-$(CONFIG_UBC_WAKEUP) += ubc.o |
11 | obj-$(CONFIG_SH_ADC) += adc.o | 12 | obj-$(CONFIG_SH_ADC) += adc.o |
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S index 34d51b3745ea..d51fa5e9904a 100644 --- a/arch/sh/kernel/cpu/sh2/entry.S +++ b/arch/sh/kernel/cpu/sh2/entry.S | |||
@@ -177,15 +177,21 @@ interrupt_entry: | |||
177 | 7: .long do_IRQ | 177 | 7: .long do_IRQ |
178 | 8: .long do_exception_error | 178 | 8: .long do_exception_error |
179 | 179 | ||
180 | trap_entry: | 180 | trap_entry: |
181 | add #-0x10,r9 | 181 | /* verbose BUG trapa entry check */ |
182 | mov #0x3e,r8 | ||
183 | cmp/ge r8,r9 | ||
184 | bf/s 1f | ||
185 | add #-0x10,r9 | ||
186 | add #0x10,r9 | ||
187 | 1: | ||
182 | shll2 r9 ! TRA | 188 | shll2 r9 ! TRA |
183 | mov #OFF_TRA,r8 | 189 | mov #OFF_TRA,r8 |
184 | add r15,r8 | 190 | add r15,r8 |
185 | mov.l r9,@r8 | 191 | mov.l r9,@r8 |
186 | mov r9,r8 | 192 | mov r9,r8 |
187 | #ifdef CONFIG_TRACE_IRQFLAGS | 193 | #ifdef CONFIG_TRACE_IRQFLAGS |
188 | mov.l 5f, r9 | 194 | mov.l 2f, r9 |
189 | jsr @r9 | 195 | jsr @r9 |
190 | nop | 196 | nop |
191 | #endif | 197 | #endif |
@@ -194,12 +200,8 @@ trap_entry: | |||
194 | nop | 200 | nop |
195 | 201 | ||
196 | .align 2 | 202 | .align 2 |
197 | 1: .long syscall_exit | ||
198 | 2: .long break_point_trap_software | ||
199 | 3: .long NR_syscalls | ||
200 | 4: .long sys_call_table | ||
201 | #ifdef CONFIG_TRACE_IRQFLAGS | 203 | #ifdef CONFIG_TRACE_IRQFLAGS |
202 | 5: .long trace_hardirqs_on | 204 | 2: .long trace_hardirqs_on |
203 | #endif | 205 | #endif |
204 | 206 | ||
205 | #if defined(CONFIG_SH_STANDARD_BIOS) | 207 | #if defined(CONFIG_SH_STANDARD_BIOS) |
@@ -264,7 +266,7 @@ ENTRY(address_error_handler) | |||
264 | restore_all: | 266 | restore_all: |
265 | cli | 267 | cli |
266 | #ifdef CONFIG_TRACE_IRQFLAGS | 268 | #ifdef CONFIG_TRACE_IRQFLAGS |
267 | mov.l 3f, r0 | 269 | mov.l 1f, r0 |
268 | jsr @r0 | 270 | jsr @r0 |
269 | nop | 271 | nop |
270 | #endif | 272 | #endif |
@@ -309,20 +311,14 @@ restore_all: | |||
309 | mov.l @r15,r15 | 311 | mov.l @r15,r15 |
310 | rte | 312 | rte |
311 | nop | 313 | nop |
312 | 2: | ||
313 | mov.l 1f,r8 | ||
314 | mov.l 2f,r9 | ||
315 | jmp @r9 | ||
316 | lds r8,pr | ||
317 | 314 | ||
318 | .align 2 | 315 | #ifdef CONFIG_TRACE_IRQFLAGS |
316 | 1: .long trace_hardirqs_off | ||
317 | #endif | ||
319 | $current_thread_info: | 318 | $current_thread_info: |
320 | .long __current_thread_info | 319 | .long __current_thread_info |
321 | $cpu_mode: | 320 | $cpu_mode: |
322 | .long __cpu_mode | 321 | .long __cpu_mode |
323 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
324 | 3: .long trace_hardirqs_off | ||
325 | #endif | ||
326 | 322 | ||
327 | ! common exception handler | 323 | ! common exception handler |
328 | #include "../../entry-common.S" | 324 | #include "../../entry-common.S" |
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 82c2d905152f..79283e6c1d8f 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
@@ -51,3 +51,44 @@ static int __init sh7619_devices_setup(void) | |||
51 | ARRAY_SIZE(sh7619_devices)); | 51 | ARRAY_SIZE(sh7619_devices)); |
52 | } | 52 | } |
53 | __initcall(sh7619_devices_setup); | 53 | __initcall(sh7619_devices_setup); |
54 | |||
55 | #define INTC_IPRC 0xf8080000UL | ||
56 | #define INTC_IPRD 0xf8080002UL | ||
57 | |||
58 | #define CMI0_IRQ 86 | ||
59 | |||
60 | #define SCIF0_ERI_IRQ 88 | ||
61 | #define SCIF0_RXI_IRQ 89 | ||
62 | #define SCIF0_BRI_IRQ 90 | ||
63 | #define SCIF0_TXI_IRQ 91 | ||
64 | |||
65 | #define SCIF1_ERI_IRQ 92 | ||
66 | #define SCIF1_RXI_IRQ 93 | ||
67 | #define SCIF1_BRI_IRQ 94 | ||
68 | #define SCIF1_TXI_IRQ 95 | ||
69 | |||
70 | #define SCIF2_BRI_IRQ 96 | ||
71 | #define SCIF2_ERI_IRQ 97 | ||
72 | #define SCIF2_RXI_IRQ 98 | ||
73 | #define SCIF2_TXI_IRQ 99 | ||
74 | |||
75 | static struct ipr_data sh7619_ipr_map[] = { | ||
76 | { CMI0_IRQ, INTC_IPRC, 1, 2 }, | ||
77 | { SCIF0_ERI_IRQ, INTC_IPRD, 3, 3 }, | ||
78 | { SCIF0_RXI_IRQ, INTC_IPRD, 3, 3 }, | ||
79 | { SCIF0_BRI_IRQ, INTC_IPRD, 3, 3 }, | ||
80 | { SCIF0_TXI_IRQ, INTC_IPRD, 3, 3 }, | ||
81 | { SCIF1_ERI_IRQ, INTC_IPRD, 2, 3 }, | ||
82 | { SCIF1_RXI_IRQ, INTC_IPRD, 2, 3 }, | ||
83 | { SCIF1_BRI_IRQ, INTC_IPRD, 2, 3 }, | ||
84 | { SCIF1_TXI_IRQ, INTC_IPRD, 2, 3 }, | ||
85 | { SCIF2_ERI_IRQ, INTC_IPRD, 1, 3 }, | ||
86 | { SCIF2_RXI_IRQ, INTC_IPRD, 1, 3 }, | ||
87 | { SCIF2_BRI_IRQ, INTC_IPRD, 1, 3 }, | ||
88 | { SCIF2_TXI_IRQ, INTC_IPRD, 1, 3 }, | ||
89 | }; | ||
90 | |||
91 | void __init init_IRQ_ipr(void) | ||
92 | { | ||
93 | make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); | ||
94 | } | ||
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index cdfeef49e62e..4b60fcc7d667 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c | |||
@@ -17,22 +17,22 @@ static struct plat_sci_port sci_platform_data[] = { | |||
17 | .mapbase = 0xfffe8000, | 17 | .mapbase = 0xfffe8000, |
18 | .flags = UPF_BOOT_AUTOCONF, | 18 | .flags = UPF_BOOT_AUTOCONF, |
19 | .type = PORT_SCIF, | 19 | .type = PORT_SCIF, |
20 | .irqs = { 240, 241, 242, 243}, | 20 | .irqs = { 241, 242, 243, 240}, |
21 | }, { | 21 | }, { |
22 | .mapbase = 0xfffe8800, | 22 | .mapbase = 0xfffe8800, |
23 | .flags = UPF_BOOT_AUTOCONF, | 23 | .flags = UPF_BOOT_AUTOCONF, |
24 | .type = PORT_SCIF, | 24 | .type = PORT_SCIF, |
25 | .irqs = { 244, 245, 246, 247}, | 25 | .irqs = { 247, 244, 245, 246}, |
26 | }, { | 26 | }, { |
27 | .mapbase = 0xfffe9000, | 27 | .mapbase = 0xfffe9000, |
28 | .flags = UPF_BOOT_AUTOCONF, | 28 | .flags = UPF_BOOT_AUTOCONF, |
29 | .type = PORT_SCIF, | 29 | .type = PORT_SCIF, |
30 | .irqs = { 248, 249, 250, 251}, | 30 | .irqs = { 249, 250, 251, 248}, |
31 | }, { | 31 | }, { |
32 | .mapbase = 0xfffe9800, | 32 | .mapbase = 0xfffe9800, |
33 | .flags = UPF_BOOT_AUTOCONF, | 33 | .flags = UPF_BOOT_AUTOCONF, |
34 | .type = PORT_SCIF, | 34 | .type = PORT_SCIF, |
35 | .irqs = { 252, 253, 254, 255}, | 35 | .irqs = { 253, 254, 255, 252}, |
36 | }, { | 36 | }, { |
37 | .flags = 0, | 37 | .flags = 0, |
38 | } | 38 | } |
@@ -56,3 +56,57 @@ static int __init sh7206_devices_setup(void) | |||
56 | ARRAY_SIZE(sh7206_devices)); | 56 | ARRAY_SIZE(sh7206_devices)); |
57 | } | 57 | } |
58 | __initcall(sh7206_devices_setup); | 58 | __initcall(sh7206_devices_setup); |
59 | |||
60 | #define INTC_IPR08 0xfffe0c04UL | ||
61 | #define INTC_IPR09 0xfffe0c06UL | ||
62 | #define INTC_IPR14 0xfffe0c10UL | ||
63 | |||
64 | #define CMI0_IRQ 140 | ||
65 | |||
66 | #define MTU1_TGI1A 164 | ||
67 | |||
68 | #define SCIF0_BRI_IRQ 240 | ||
69 | #define SCIF0_ERI_IRQ 241 | ||
70 | #define SCIF0_RXI_IRQ 242 | ||
71 | #define SCIF0_TXI_IRQ 243 | ||
72 | |||
73 | #define SCIF1_BRI_IRQ 244 | ||
74 | #define SCIF1_ERI_IRQ 245 | ||
75 | #define SCIF1_RXI_IRQ 246 | ||
76 | #define SCIF1_TXI_IRQ 247 | ||
77 | |||
78 | #define SCIF2_BRI_IRQ 248 | ||
79 | #define SCIF2_ERI_IRQ 249 | ||
80 | #define SCIF2_RXI_IRQ 250 | ||
81 | #define SCIF2_TXI_IRQ 251 | ||
82 | |||
83 | #define SCIF3_BRI_IRQ 252 | ||
84 | #define SCIF3_ERI_IRQ 253 | ||
85 | #define SCIF3_RXI_IRQ 254 | ||
86 | #define SCIF3_TXI_IRQ 255 | ||
87 | |||
88 | static struct ipr_data sh7206_ipr_map[] = { | ||
89 | { CMI0_IRQ, INTC_IPR08, 3, 2 }, | ||
90 | { MTU2_TGI1A, INTC_IPR09, 1, 2 }, | ||
91 | { SCIF0_ERI_IRQ, INTC_IPR14, 3, 3 }, | ||
92 | { SCIF0_RXI_IRQ, INTC_IPR14, 3, 3 }, | ||
93 | { SCIF0_BRI_IRQ, INTC_IPR14, 3, 3 }, | ||
94 | { SCIF0_TXI_IRQ, INTC_IPR14, 3, 3 }, | ||
95 | { SCIF1_ERI_IRQ, INTC_IPR14, 2, 3 }, | ||
96 | { SCIF1_RXI_IRQ, INTC_IPR14, 2, 3 }, | ||
97 | { SCIF1_BRI_IRQ, INTC_IPR14, 2, 3 }, | ||
98 | { SCIF1_TXI_IRQ, INTC_IPR14, 2, 3 }, | ||
99 | { SCIF2_ERI_IRQ, INTC_IPR14, 1, 3 }, | ||
100 | { SCIF2_RXI_IRQ, INTC_IPR14, 1, 3 }, | ||
101 | { SCIF2_BRI_IRQ, INTC_IPR14, 1, 3 }, | ||
102 | { SCIF2_TXI_IRQ, INTC_IPR14, 1, 3 }, | ||
103 | { SCIF3_ERI_IRQ, INTC_IPR14, 0, 3 }, | ||
104 | { SCIF3_RXI_IRQ, INTC_IPR14, 0, 3 }, | ||
105 | { SCIF3_BRI_IRQ, INTC_IPR14, 0, 3 }, | ||
106 | { SCIF3_TXI_IRQ, INTC_IPR14, 0, 3 }, | ||
107 | }; | ||
108 | |||
109 | void __init init_IRQ_ipr(void) | ||
110 | { | ||
111 | make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); | ||
112 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile index 6e415baf04b4..19ca68c71884 100644 --- a/arch/sh/kernel/cpu/sh4/Makefile +++ b/arch/sh/kernel/cpu/sh4/Makefile | |||
@@ -12,17 +12,12 @@ obj-$(CONFIG_SH_STORE_QUEUES) += sq.o | |||
12 | obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o | 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o |
13 | obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o |
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o |
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | ||
16 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | ||
17 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
18 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | ||
19 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o | 15 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o |
20 | 16 | ||
21 | # Primary on-chip clocks (common) | 17 | # Primary on-chip clocks (common) |
18 | ifndef CONFIG_CPU_SH4A | ||
22 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o | 19 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o |
23 | clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o | 20 | endif |
24 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o | ||
25 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o | ||
26 | 21 | ||
27 | # Additional clocks by subtype | 22 | # Additional clocks by subtype |
28 | clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o | 23 | clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o |
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index afe0f1b1c030..9031a22a2ce7 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -119,11 +119,20 @@ int __init detect_cpu_and_cache_system(void) | |||
119 | break; | 119 | break; |
120 | case 0x3000: | 120 | case 0x3000: |
121 | case 0x3003: | 121 | case 0x3003: |
122 | case 0x3009: | ||
122 | cpu_data->type = CPU_SH7343; | 123 | cpu_data->type = CPU_SH7343; |
123 | cpu_data->icache.ways = 4; | 124 | cpu_data->icache.ways = 4; |
124 | cpu_data->dcache.ways = 4; | 125 | cpu_data->dcache.ways = 4; |
125 | cpu_data->flags |= CPU_HAS_LLSC; | 126 | cpu_data->flags |= CPU_HAS_LLSC; |
126 | break; | 127 | break; |
128 | case 0x3008: | ||
129 | if (prr == 0xa0) { | ||
130 | cpu_data->type = CPU_SH7722; | ||
131 | cpu_data->icache.ways = 4; | ||
132 | cpu_data->dcache.ways = 4; | ||
133 | cpu_data->flags |= CPU_HAS_LLSC; | ||
134 | } | ||
135 | break; | ||
127 | case 0x8000: | 136 | case 0x8000: |
128 | cpu_data->type = CPU_ST40RA; | 137 | cpu_data->type = CPU_ST40RA; |
129 | cpu_data->flags |= CPU_HAS_FPU; | 138 | cpu_data->flags |= CPU_HAS_FPU; |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index bbcb06f18b04..cbac27634c0b 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
@@ -14,6 +14,36 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/sci.h> | 15 | #include <asm/sci.h> |
16 | 16 | ||
17 | static struct resource rtc_resources[] = { | ||
18 | [0] = { | ||
19 | .start = 0xffc80000, | ||
20 | .end = 0xffc80000 + 0x58 - 1, | ||
21 | .flags = IORESOURCE_IO, | ||
22 | }, | ||
23 | [1] = { | ||
24 | /* Period IRQ */ | ||
25 | .start = 21, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | [2] = { | ||
29 | /* Carry IRQ */ | ||
30 | .start = 22, | ||
31 | .flags = IORESOURCE_IRQ, | ||
32 | }, | ||
33 | [3] = { | ||
34 | /* Alarm IRQ */ | ||
35 | .start = 20, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | |||
40 | static struct platform_device rtc_device = { | ||
41 | .name = "sh-rtc", | ||
42 | .id = -1, | ||
43 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
44 | .resource = rtc_resources, | ||
45 | }; | ||
46 | |||
17 | static struct plat_sci_port sci_platform_data[] = { | 47 | static struct plat_sci_port sci_platform_data[] = { |
18 | { | 48 | { |
19 | .mapbase = 0xffe00000, | 49 | .mapbase = 0xffe00000, |
@@ -39,6 +69,7 @@ static struct platform_device sci_device = { | |||
39 | }; | 69 | }; |
40 | 70 | ||
41 | static struct platform_device *sh7750_devices[] __initdata = { | 71 | static struct platform_device *sh7750_devices[] __initdata = { |
72 | &rtc_device, | ||
42 | &sci_device, | 73 | &sci_device, |
43 | }; | 74 | }; |
44 | 75 | ||
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 0c9ea38d2caa..d7fff752e569 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -111,8 +111,9 @@ static int __sq_remap(struct sq_mapping *map, unsigned long flags) | |||
111 | 111 | ||
112 | vma->phys_addr = map->addr; | 112 | vma->phys_addr = map->addr; |
113 | 113 | ||
114 | if (remap_area_pages((unsigned long)vma->addr, vma->phys_addr, | 114 | if (ioremap_page_range((unsigned long)vma->addr, |
115 | map->size, flags)) { | 115 | (unsigned long)vma->addr + map->size, |
116 | vma->phys_addr, __pgprot(flags))) { | ||
116 | vunmap(vma->addr); | 117 | vunmap(vma->addr); |
117 | return -EAGAIN; | 118 | return -EAGAIN; |
118 | } | 119 | } |
@@ -176,7 +177,7 @@ unsigned long sq_remap(unsigned long phys, unsigned int size, | |||
176 | 177 | ||
177 | map->sq_addr = P4SEG_STORE_QUE + (page << PAGE_SHIFT); | 178 | map->sq_addr = P4SEG_STORE_QUE + (page << PAGE_SHIFT); |
178 | 179 | ||
179 | ret = __sq_remap(map, flags); | 180 | ret = __sq_remap(map, pgprot_val(PAGE_KERNEL_NOCACHE) | flags); |
180 | if (unlikely(ret != 0)) | 181 | if (unlikely(ret != 0)) |
181 | goto out; | 182 | goto out; |
182 | 183 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile new file mode 100644 index 000000000000..a8f493f2f21f --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Makefile for the Linux/SuperH SH-4 backends. | ||
3 | # | ||
4 | |||
5 | # CPU subtype setup | ||
6 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | ||
7 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | ||
8 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
9 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | ||
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o | ||
11 | |||
12 | # Primary on-chip clocks (common) | ||
13 | clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o | ||
14 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o | ||
15 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o | ||
16 | clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o | ||
17 | clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7343.o | ||
18 | |||
19 | obj-y += $(clock-y) | ||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh73180.c b/arch/sh/kernel/cpu/sh4a/clock-sh73180.c index 2fa5cb2ae68d..2fa5cb2ae68d 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh73180.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh73180.c | |||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c new file mode 100644 index 000000000000..1707a213f0cf --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh4/clock-sh7343.c | ||
3 | * | ||
4 | * SH7343/SH7722 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2006 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <asm/clock.h> | ||
16 | #include <asm/freq.h> | ||
17 | |||
18 | /* | ||
19 | * SH7343/SH7722 uses a common set of multipliers and divisors, so this | ||
20 | * is quite simple.. | ||
21 | */ | ||
22 | static int multipliers[] = { 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | ||
23 | static int divisors[] = { 1, 3, 2, 5, 3, 4, 5, 6, 8, 10, 12, 16, 20 }; | ||
24 | |||
25 | #define pll_calc() (((ctrl_inl(FRQCR) >> 24) & 0x1f) + 1) | ||
26 | |||
27 | static void master_clk_init(struct clk *clk) | ||
28 | { | ||
29 | clk->parent = clk_get(NULL, "cpu_clk"); | ||
30 | } | ||
31 | |||
32 | static void master_clk_recalc(struct clk *clk) | ||
33 | { | ||
34 | int idx = (ctrl_inl(FRQCR) & 0x000f); | ||
35 | clk->rate *= clk->parent->rate * multipliers[idx] / divisors[idx]; | ||
36 | } | ||
37 | |||
38 | static struct clk_ops sh7343_master_clk_ops = { | ||
39 | .init = master_clk_init, | ||
40 | .recalc = master_clk_recalc, | ||
41 | }; | ||
42 | |||
43 | static void module_clk_init(struct clk *clk) | ||
44 | { | ||
45 | clk->parent = NULL; | ||
46 | clk->rate = CONFIG_SH_PCLK_FREQ; | ||
47 | } | ||
48 | |||
49 | static struct clk_ops sh7343_module_clk_ops = { | ||
50 | .init = module_clk_init, | ||
51 | }; | ||
52 | |||
53 | static void bus_clk_init(struct clk *clk) | ||
54 | { | ||
55 | clk->parent = clk_get(NULL, "cpu_clk"); | ||
56 | } | ||
57 | |||
58 | static void bus_clk_recalc(struct clk *clk) | ||
59 | { | ||
60 | int idx = (ctrl_inl(FRQCR) >> 8) & 0x000f; | ||
61 | clk->rate = clk->parent->rate * multipliers[idx] / divisors[idx]; | ||
62 | } | ||
63 | |||
64 | static struct clk_ops sh7343_bus_clk_ops = { | ||
65 | .init = bus_clk_init, | ||
66 | .recalc = bus_clk_recalc, | ||
67 | }; | ||
68 | |||
69 | static void cpu_clk_init(struct clk *clk) | ||
70 | { | ||
71 | clk->parent = clk_get(NULL, "module_clk"); | ||
72 | clk->flags |= CLK_RATE_PROPAGATES; | ||
73 | clk_set_rate(clk, clk_get_rate(clk)); | ||
74 | } | ||
75 | |||
76 | static void cpu_clk_recalc(struct clk *clk) | ||
77 | { | ||
78 | int idx = (ctrl_inl(FRQCR) >> 20) & 0x000f; | ||
79 | clk->rate = clk->parent->rate * pll_calc() * | ||
80 | multipliers[idx] / divisors[idx]; | ||
81 | } | ||
82 | |||
83 | static struct clk_ops sh7343_cpu_clk_ops = { | ||
84 | .init = cpu_clk_init, | ||
85 | .recalc = cpu_clk_recalc, | ||
86 | }; | ||
87 | |||
88 | static struct clk_ops *sh7343_clk_ops[] = { | ||
89 | &sh7343_master_clk_ops, | ||
90 | &sh7343_module_clk_ops, | ||
91 | &sh7343_bus_clk_ops, | ||
92 | &sh7343_cpu_clk_ops, | ||
93 | }; | ||
94 | |||
95 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
96 | { | ||
97 | if (idx < ARRAY_SIZE(sh7343_clk_ops)) | ||
98 | *ops = sh7343_clk_ops[idx]; | ||
99 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh7770.c b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c index c8694bac6477..c8694bac6477 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c index 9e6a216750c8..9e6a216750c8 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh73180.c b/arch/sh/kernel/cpu/sh4a/setup-sh73180.c index cc9ea1e2e5df..cc9ea1e2e5df 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh73180.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh73180.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 91d61cf91ba1..91d61cf91ba1 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c new file mode 100644 index 000000000000..1143fbf65faf --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * SH7722 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xffe00000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 80, 81, 83, 82 }, | ||
21 | }, { | ||
22 | .flags = 0, | ||
23 | } | ||
24 | }; | ||
25 | |||
26 | static struct platform_device sci_device = { | ||
27 | .name = "sh-sci", | ||
28 | .id = -1, | ||
29 | .dev = { | ||
30 | .platform_data = sci_platform_data, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device *sh7722_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh7722_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh7722_devices, | ||
41 | ARRAY_SIZE(sh7722_devices)); | ||
42 | } | ||
43 | __initcall(sh7722_devices_setup); | ||
44 | |||
45 | static struct ipr_data sh7722_ipr_map[] = { | ||
46 | /* IRQ, IPR-idx, shift, prio */ | ||
47 | { 16, 0, 12, 2 }, /* TMU0 */ | ||
48 | { 17, 0, 8, 2 }, /* TMU1 */ | ||
49 | { 80, 6, 12, 3 }, /* SCIF ERI */ | ||
50 | { 81, 6, 12, 3 }, /* SCIF RXI */ | ||
51 | { 82, 6, 12, 3 }, /* SCIF BRI */ | ||
52 | { 83, 6, 12, 3 }, /* SCIF TXI */ | ||
53 | }; | ||
54 | |||
55 | static unsigned long ipr_offsets[] = { | ||
56 | 0xa4080000, /* 0: IPRA */ | ||
57 | 0xa4080004, /* 1: IPRB */ | ||
58 | 0xa4080008, /* 2: IPRC */ | ||
59 | 0xa408000c, /* 3: IPRD */ | ||
60 | 0xa4080010, /* 4: IPRE */ | ||
61 | 0xa4080014, /* 5: IPRF */ | ||
62 | 0xa4080018, /* 6: IPRG */ | ||
63 | 0xa408001c, /* 7: IPRH */ | ||
64 | 0xa4080020, /* 8: IPRI */ | ||
65 | 0xa4080024, /* 9: IPRJ */ | ||
66 | 0xa4080028, /* 10: IPRK */ | ||
67 | 0xa408002c, /* 11: IPRL */ | ||
68 | }; | ||
69 | |||
70 | unsigned int map_ipridx_to_addr(int idx) | ||
71 | { | ||
72 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | ||
73 | return 0; | ||
74 | return ipr_offsets[idx]; | ||
75 | } | ||
76 | |||
77 | void __init init_IRQ_ipr(void) | ||
78 | { | ||
79 | make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); | ||
80 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index 6a04cc5f5aca..6a04cc5f5aca 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 9aeaa2ddaa28..9aeaa2ddaa28 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c | |||
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c index 60340823798a..560b91cdd15c 100644 --- a/arch/sh/kernel/early_printk.c +++ b/arch/sh/kernel/early_printk.c | |||
@@ -144,16 +144,16 @@ static struct console *early_console = | |||
144 | ; | 144 | ; |
145 | 145 | ||
146 | static int __initdata keep_early; | 146 | static int __initdata keep_early; |
147 | static int early_console_initialized; | ||
147 | 148 | ||
148 | int __init setup_early_printk(char *opt) | 149 | int __init setup_early_printk(char *buf) |
149 | { | 150 | { |
150 | char *space; | 151 | if (!buf) |
151 | char buf[256]; | 152 | return 0; |
152 | 153 | ||
153 | strlcpy(buf, opt, sizeof(buf)); | 154 | if (early_console_initialized) |
154 | space = strchr(buf, ' '); | 155 | return 0; |
155 | if (space) | 156 | early_console_initialized = 1; |
156 | *space = 0; | ||
157 | 157 | ||
158 | if (strstr(buf, "keep")) | 158 | if (strstr(buf, "keep")) |
159 | keep_early = 1; | 159 | keep_early = 1; |
@@ -175,12 +175,14 @@ int __init setup_early_printk(char *opt) | |||
175 | if (likely(early_console)) | 175 | if (likely(early_console)) |
176 | register_console(early_console); | 176 | register_console(early_console); |
177 | 177 | ||
178 | return 1; | 178 | return 0; |
179 | } | 179 | } |
180 | __setup("earlyprintk=", setup_early_printk); | 180 | early_param("earlyprintk", setup_early_printk); |
181 | 181 | ||
182 | void __init disable_early_printk(void) | 182 | void __init disable_early_printk(void) |
183 | { | 183 | { |
184 | if (!early_console_initialized || !early_console) | ||
185 | return; | ||
184 | if (!keep_early) { | 186 | if (!keep_early) { |
185 | printk("disabling early console\n"); | 187 | printk("disabling early console\n"); |
186 | unregister_console(early_console); | 188 | unregister_console(early_console); |
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 29136a35d7c7..fc279aeb73ab 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S | |||
@@ -79,18 +79,29 @@ debug_kernel_sw: | |||
79 | .align 2 | 79 | .align 2 |
80 | 3: .long kgdb_handle_exception | 80 | 3: .long kgdb_handle_exception |
81 | #endif /* CONFIG_SH_KGDB */ | 81 | #endif /* CONFIG_SH_KGDB */ |
82 | 82 | #ifdef CONFIG_SH_STANDARD_BIOS | |
83 | bra debug_kernel_fw | ||
84 | nop | ||
85 | #endif | ||
83 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ | 86 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ |
84 | 87 | ||
85 | |||
86 | .align 2 | 88 | .align 2 |
87 | debug_trap: | 89 | debug_trap: |
88 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) | 90 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) |
91 | mov r8, r0 | ||
92 | shlr2 r0 | ||
93 | cmp/eq #0x3f, r0 ! sh_bios() trap | ||
94 | bf 1f | ||
95 | #ifdef CONFIG_SH_KGDB | ||
96 | cmp/eq #0xff, r0 ! XXX: KGDB trap, fix for SH-2. | ||
97 | bf 1f | ||
98 | #endif | ||
89 | mov #OFF_SR, r0 | 99 | mov #OFF_SR, r0 |
90 | mov.l @(r0,r15), r0 ! get status register | 100 | mov.l @(r0,r15), r0 ! get status register |
91 | shll r0 | 101 | shll r0 |
92 | shll r0 ! kernel space? | 102 | shll r0 ! kernel space? |
93 | bt/s debug_kernel | 103 | bt/s debug_kernel |
104 | 1: | ||
94 | #endif | 105 | #endif |
95 | mov.l @r15, r0 ! Restore R0 value | 106 | mov.l @r15, r0 ! Restore R0 value |
96 | mov.l 1f, r8 | 107 | mov.l 1f, r8 |
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head.S index 6aca4bc6ec5d..71a3ad7d283e 100644 --- a/arch/sh/kernel/head.S +++ b/arch/sh/kernel/head.S | |||
@@ -33,7 +33,8 @@ ENTRY(empty_zero_page) | |||
33 | .long 0x00360000 /* INITRD_START */ | 33 | .long 0x00360000 /* INITRD_START */ |
34 | .long 0x000a0000 /* INITRD_SIZE */ | 34 | .long 0x000a0000 /* INITRD_SIZE */ |
35 | .long 0 | 35 | .long 0 |
36 | .balign PAGE_SIZE,0,PAGE_SIZE | 36 | 1: |
37 | .skip PAGE_SIZE - empty_zero_page - 1b | ||
37 | 38 | ||
38 | .text | 39 | .text |
39 | /* | 40 | /* |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index f3e2631be144..486c06e18033 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -470,9 +470,10 @@ unsigned long get_wchan(struct task_struct *p) | |||
470 | */ | 470 | */ |
471 | pc = thread_saved_pc(p); | 471 | pc = thread_saved_pc(p); |
472 | if (in_sched_functions(pc)) { | 472 | if (in_sched_functions(pc)) { |
473 | schedule_frame = ((unsigned long *)(long)p->thread.sp)[1]; | 473 | schedule_frame = (unsigned long)p->thread.sp; |
474 | return (unsigned long)((unsigned long *)schedule_frame)[1]; | 474 | return ((unsigned long *)schedule_frame)[21]; |
475 | } | 475 | } |
476 | |||
476 | return pc; | 477 | return pc; |
477 | } | 478 | } |
478 | 479 | ||
@@ -498,6 +499,16 @@ asmlinkage void break_point_trap_software(unsigned long r4, unsigned long r5, | |||
498 | { | 499 | { |
499 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | 500 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
500 | 501 | ||
502 | /* Rewind */ | ||
501 | regs->pc -= 2; | 503 | regs->pc -= 2; |
504 | |||
505 | #ifdef CONFIG_BUG | ||
506 | if (__kernel_text_address(instruction_pointer(regs))) { | ||
507 | u16 insn = *(u16 *)instruction_pointer(regs); | ||
508 | if (insn == TRAPA_BUG_OPCODE) | ||
509 | handle_BUG(regs); | ||
510 | } | ||
511 | #endif | ||
512 | |||
502 | force_sig(SIGTRAP, current); | 513 | force_sig(SIGTRAP, current); |
503 | } | 514 | } |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index f8dd6b7bfab0..225f9ea5cdd7 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -84,8 +84,7 @@ unsigned long memory_start, memory_end; | |||
84 | 84 | ||
85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | 85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], |
86 | struct sh_machine_vector** mvp, | 86 | struct sh_machine_vector** mvp, |
87 | unsigned long *mv_io_base, | 87 | unsigned long *mv_io_base) |
88 | int *mv_mmio_enable) | ||
89 | { | 88 | { |
90 | char c = ' ', *to = command_line, *from = COMMAND_LINE; | 89 | char c = ' ', *to = command_line, *from = COMMAND_LINE; |
91 | int len = 0; | 90 | int len = 0; |
@@ -112,23 +111,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
112 | } | 111 | } |
113 | } | 112 | } |
114 | 113 | ||
115 | #ifdef CONFIG_EARLY_PRINTK | ||
116 | if (c == ' ' && !memcmp(from, "earlyprintk=", 12)) { | ||
117 | char *ep_end; | ||
118 | |||
119 | if (to != command_line) | ||
120 | to--; | ||
121 | |||
122 | from += 12; | ||
123 | ep_end = strchr(from, ' '); | ||
124 | |||
125 | setup_early_printk(from); | ||
126 | printk("early console enabled\n"); | ||
127 | |||
128 | from = ep_end; | ||
129 | } | ||
130 | #endif | ||
131 | |||
132 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { | 114 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { |
133 | char* mv_end; | 115 | char* mv_end; |
134 | char* mv_comma; | 116 | char* mv_comma; |
@@ -145,7 +127,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
145 | int ints[3]; | 127 | int ints[3]; |
146 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); | 128 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); |
147 | *mv_io_base = ints[1]; | 129 | *mv_io_base = ints[1]; |
148 | *mv_mmio_enable = ints[2]; | ||
149 | mv_len = mv_comma - from; | 130 | mv_len = mv_comma - from; |
150 | } else { | 131 | } else { |
151 | mv_len = mv_end - from; | 132 | mv_len = mv_end - from; |
@@ -158,6 +139,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
158 | 139 | ||
159 | *mvp = get_mv_byname(mv_name); | 140 | *mvp = get_mv_byname(mv_name); |
160 | } | 141 | } |
142 | |||
161 | c = *(from++); | 143 | c = *(from++); |
162 | if (!c) | 144 | if (!c) |
163 | break; | 145 | break; |
@@ -177,9 +159,8 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
177 | struct sh_machine_vector *mv = NULL; | 159 | struct sh_machine_vector *mv = NULL; |
178 | char mv_name[MV_NAME_SIZE] = ""; | 160 | char mv_name[MV_NAME_SIZE] = ""; |
179 | unsigned long mv_io_base = 0; | 161 | unsigned long mv_io_base = 0; |
180 | int mv_mmio_enable = 0; | ||
181 | 162 | ||
182 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); | 163 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base); |
183 | 164 | ||
184 | #ifdef CONFIG_SH_UNKNOWN | 165 | #ifdef CONFIG_SH_UNKNOWN |
185 | if (mv == NULL) { | 166 | if (mv == NULL) { |
@@ -258,6 +239,7 @@ void __init setup_arch(char **cmdline_p) | |||
258 | 239 | ||
259 | sh_mv_setup(cmdline_p); | 240 | sh_mv_setup(cmdline_p); |
260 | 241 | ||
242 | |||
261 | /* | 243 | /* |
262 | * Find the highest page frame number we have available | 244 | * Find the highest page frame number we have available |
263 | */ | 245 | */ |
@@ -305,6 +287,7 @@ void __init setup_arch(char **cmdline_p) | |||
305 | PFN_PHYS(pages)); | 287 | PFN_PHYS(pages)); |
306 | } | 288 | } |
307 | 289 | ||
290 | |||
308 | /* | 291 | /* |
309 | * Reserve the kernel text and | 292 | * Reserve the kernel text and |
310 | * Reserve the bootmem bitmap. We do this in two steps (first step | 293 | * Reserve the bootmem bitmap. We do this in two steps (first step |
@@ -325,14 +308,18 @@ void __init setup_arch(char **cmdline_p) | |||
325 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); | 308 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); |
326 | if (&__rd_start != &__rd_end) { | 309 | if (&__rd_start != &__rd_end) { |
327 | LOADER_TYPE = 1; | 310 | LOADER_TYPE = 1; |
328 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START; | 311 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - |
329 | INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start; | 312 | __MEMORY_START; |
313 | INITRD_SIZE = (unsigned long)&__rd_end - | ||
314 | (unsigned long)&__rd_start; | ||
330 | } | 315 | } |
331 | 316 | ||
332 | if (LOADER_TYPE && INITRD_START) { | 317 | if (LOADER_TYPE && INITRD_START) { |
333 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { | 318 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { |
334 | reserve_bootmem_node(NODE_DATA(0), INITRD_START+__MEMORY_START, INITRD_SIZE); | 319 | reserve_bootmem_node(NODE_DATA(0), INITRD_START + |
335 | initrd_start = INITRD_START + PAGE_OFFSET + __MEMORY_START; | 320 | __MEMORY_START, INITRD_SIZE); |
321 | initrd_start = INITRD_START + PAGE_OFFSET + | ||
322 | __MEMORY_START; | ||
336 | initrd_end = initrd_start + INITRD_SIZE; | 323 | initrd_end = initrd_start + INITRD_SIZE; |
337 | } else { | 324 | } else { |
338 | printk("initrd extends beyond end of memory " | 325 | printk("initrd extends beyond end of memory " |
@@ -404,7 +391,7 @@ static const char *cpu_name[] = { | |||
404 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", | 391 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", |
405 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", | 392 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", |
406 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", | 393 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", |
407 | [CPU_SH7785] = "SH7785", | 394 | [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722", |
408 | [CPU_SH_NONE] = "Unknown" | 395 | [CPU_SH_NONE] = "Unknown" |
409 | }; | 396 | }; |
410 | 397 | ||
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index ceee79143401..e6106239a0fe 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -70,13 +70,26 @@ DECLARE_EXPORT(__sdivsi3); | |||
70 | DECLARE_EXPORT(__ashrdi3); | 70 | DECLARE_EXPORT(__ashrdi3); |
71 | DECLARE_EXPORT(__ashldi3); | 71 | DECLARE_EXPORT(__ashldi3); |
72 | DECLARE_EXPORT(__lshrdi3); | 72 | DECLARE_EXPORT(__lshrdi3); |
73 | DECLARE_EXPORT(__movstr); | ||
74 | DECLARE_EXPORT(__movstrSI16); | 73 | DECLARE_EXPORT(__movstrSI16); |
74 | #if __GNUC__ == 4 | ||
75 | DECLARE_EXPORT(__movmem); | ||
76 | #else | ||
77 | DECLARE_EXPORT(__movstr); | ||
78 | #endif | ||
75 | 79 | ||
76 | #ifdef CONFIG_CPU_SH4 | 80 | #ifdef CONFIG_CPU_SH4 |
81 | #if __GNUC__ == 4 | ||
82 | DECLARE_EXPORT(__movmem_i4_even); | ||
83 | DECLARE_EXPORT(__movmem_i4_odd); | ||
84 | DECLARE_EXPORT(__movmemSI12_i4); | ||
85 | DECLARE_EXPORT(__sdivsi3_i4i); | ||
86 | DECLARE_EXPORT(__udiv_qrnnd_16); | ||
87 | DECLARE_EXPORT(__udivsi3_i4i); | ||
88 | #else /* GCC 3.x */ | ||
77 | DECLARE_EXPORT(__movstr_i4_even); | 89 | DECLARE_EXPORT(__movstr_i4_even); |
78 | DECLARE_EXPORT(__movstr_i4_odd); | 90 | DECLARE_EXPORT(__movstr_i4_odd); |
79 | DECLARE_EXPORT(__movstrSI12_i4); | 91 | DECLARE_EXPORT(__movstrSI12_i4); |
92 | #endif /* __GNUC__ == 4 */ | ||
80 | #endif | 93 | #endif |
81 | 94 | ||
82 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | 95 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) |
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index bb1c480a59c7..379c88bf5d9a 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c | |||
@@ -101,7 +101,7 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
101 | */ | 101 | */ |
102 | 102 | ||
103 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ | 103 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ |
104 | #if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A) | 104 | #if defined(CONFIG_CPU_SH2) |
105 | #define TRAP_NOARG 0xc320 /* Syscall w/no args (NR in R3) */ | 105 | #define TRAP_NOARG 0xc320 /* Syscall w/no args (NR in R3) */ |
106 | #else | 106 | #else |
107 | #define TRAP_NOARG 0xc310 /* Syscall w/no args (NR in R3) */ | 107 | #define TRAP_NOARG 0xc310 /* Syscall w/no args (NR in R3) */ |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 5083b6ed4b39..e18f183e1035 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -314,6 +314,12 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, | |||
314 | #endif | 314 | #endif |
315 | } | 315 | } |
316 | 316 | ||
317 | #if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A) | ||
318 | #define SYSCALL_ARG3 "trapa #0x23" | ||
319 | #else | ||
320 | #define SYSCALL_ARG3 "trapa #0x13" | ||
321 | #endif | ||
322 | |||
317 | /* | 323 | /* |
318 | * Do a system call from kernel instead of calling sys_execve so we | 324 | * Do a system call from kernel instead of calling sys_execve so we |
319 | * end up with proper pt_regs. | 325 | * end up with proper pt_regs. |
@@ -324,7 +330,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
324 | register long __sc4 __asm__ ("r4") = (long) filename; | 330 | register long __sc4 __asm__ ("r4") = (long) filename; |
325 | register long __sc5 __asm__ ("r5") = (long) argv; | 331 | register long __sc5 __asm__ ("r5") = (long) argv; |
326 | register long __sc6 __asm__ ("r6") = (long) envp; | 332 | register long __sc6 __asm__ ("r6") = (long) envp; |
327 | __asm__ __volatile__ ("trapa #0x13" : "=z" (__sc0) | 333 | __asm__ __volatile__ (SYSCALL_ARG3 : "=z" (__sc0) |
328 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) | 334 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) |
329 | : "memory"); | 335 | : "memory"); |
330 | return __sc0; | 336 | return __sc0; |
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index 3762d9dc2046..ec110157992d 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/debug_locks.h> | 21 | #include <linux/debug_locks.h> |
22 | #include <linux/limits.h> | ||
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | 25 | ||
@@ -129,6 +130,40 @@ static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) | |||
129 | return -EFAULT; | 130 | return -EFAULT; |
130 | } | 131 | } |
131 | 132 | ||
133 | #ifdef CONFIG_BUG | ||
134 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
135 | static inline void do_bug_verbose(struct pt_regs *regs) | ||
136 | { | ||
137 | struct bug_frame f; | ||
138 | long len; | ||
139 | |||
140 | if (__copy_from_user(&f, (const void __user *)regs->pc, | ||
141 | sizeof(struct bug_frame))) | ||
142 | return; | ||
143 | |||
144 | len = __strnlen_user(f.file, PATH_MAX) - 1; | ||
145 | if (unlikely(len < 0 || len >= PATH_MAX)) | ||
146 | f.file = "<bad filename>"; | ||
147 | len = __strnlen_user(f.func, PATH_MAX) - 1; | ||
148 | if (unlikely(len < 0 || len >= PATH_MAX)) | ||
149 | f.func = "<bad function>"; | ||
150 | |||
151 | printk(KERN_ALERT "kernel BUG in %s() at %s:%d!\n", | ||
152 | f.func, f.file, f.line); | ||
153 | } | ||
154 | #else | ||
155 | static inline void do_bug_verbose(struct pt_regs *regs) | ||
156 | { | ||
157 | } | ||
158 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ | ||
159 | #endif /* CONFIG_BUG */ | ||
160 | |||
161 | void handle_BUG(struct pt_regs *regs) | ||
162 | { | ||
163 | do_bug_verbose(regs); | ||
164 | die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); | ||
165 | } | ||
166 | |||
132 | /* | 167 | /* |
133 | * handle an instruction that does an unaligned memory access by emulating the | 168 | * handle an instruction that does an unaligned memory access by emulating the |
134 | * desired behaviour | 169 | * desired behaviour |
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 77b4026d5688..f34bdcc33a7d 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -51,7 +51,7 @@ SECTIONS | |||
51 | } | 51 | } |
52 | 52 | ||
53 | . = ALIGN(PAGE_SIZE); | 53 | . = ALIGN(PAGE_SIZE); |
54 | .data.page_aligned : { *(.data.idt) } | 54 | .data.page_aligned : { *(.data.page_aligned) } |
55 | 55 | ||
56 | . = ALIGN(32); | 56 | . = ALIGN(32); |
57 | __per_cpu_start = .; | 57 | __per_cpu_start = .; |
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 4e0362f50384..29f4ee35c6dc 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -35,6 +35,9 @@ config CPU_SUBTYPE_ST40 | |||
35 | select CPU_SH4 | 35 | select CPU_SH4 |
36 | select CPU_HAS_INTC2_IRQ | 36 | select CPU_HAS_INTC2_IRQ |
37 | 37 | ||
38 | config CPU_SHX2 | ||
39 | bool | ||
40 | |||
38 | # | 41 | # |
39 | # Processor subtypes | 42 | # Processor subtypes |
40 | # | 43 | # |
@@ -180,6 +183,7 @@ config CPU_SUBTYPE_SH7780 | |||
180 | config CPU_SUBTYPE_SH7785 | 183 | config CPU_SUBTYPE_SH7785 |
181 | bool "Support SH7785 processor" | 184 | bool "Support SH7785 processor" |
182 | select CPU_SH4A | 185 | select CPU_SH4A |
186 | select CPU_SHX2 | ||
183 | select CPU_HAS_INTC2_IRQ | 187 | select CPU_HAS_INTC2_IRQ |
184 | 188 | ||
185 | comment "SH4AL-DSP Processor Support" | 189 | comment "SH4AL-DSP Processor Support" |
@@ -192,6 +196,12 @@ config CPU_SUBTYPE_SH7343 | |||
192 | bool "Support SH7343 processor" | 196 | bool "Support SH7343 processor" |
193 | select CPU_SH4AL_DSP | 197 | select CPU_SH4AL_DSP |
194 | 198 | ||
199 | config CPU_SUBTYPE_SH7722 | ||
200 | bool "Support SH7722 processor" | ||
201 | select CPU_SH4AL_DSP | ||
202 | select CPU_SHX2 | ||
203 | select CPU_HAS_IPR_IRQ | ||
204 | |||
195 | endmenu | 205 | endmenu |
196 | 206 | ||
197 | menu "Memory management options" | 207 | menu "Memory management options" |
@@ -250,7 +260,7 @@ config 32BIT | |||
250 | 260 | ||
251 | config X2TLB | 261 | config X2TLB |
252 | bool "Enable extended TLB mode" | 262 | bool "Enable extended TLB mode" |
253 | depends on CPU_SUBTYPE_SH7785 && MMU && EXPERIMENTAL | 263 | depends on CPU_SHX2 && MMU && EXPERIMENTAL |
254 | help | 264 | help |
255 | Selecting this option will enable the extended mode of the SH-X2 | 265 | Selecting this option will enable the extended mode of the SH-X2 |
256 | TLB. For legacy SH-X behaviour and interoperability, say N. For | 266 | TLB. For legacy SH-X behaviour and interoperability, say N. For |
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index ae531affccbd..c6955157c989 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c | |||
@@ -107,7 +107,7 @@ void __init p3_cache_init(void) | |||
107 | 107 | ||
108 | emit_cache_params(); | 108 | emit_cache_params(); |
109 | 109 | ||
110 | if (remap_area_pages(P3SEG, 0, PAGE_SIZE * 4, _PAGE_CACHABLE)) | 110 | if (ioremap_page_range(P3SEG, P3SEG + (PAGE_SIZE * 4), 0, PAGE_KERNEL)) |
111 | panic("%s failed.", __FUNCTION__); | 111 | panic("%s failed.", __FUNCTION__); |
112 | 112 | ||
113 | for (i = 0; i < cpu_data->dcache.n_aliases; i++) | 113 | for (i = 0; i < cpu_data->dcache.n_aliases; i++) |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 59f4cc18235b..29bd37b1488e 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -77,6 +77,7 @@ void show_mem(void) | |||
77 | printk("%d pages swap cached\n",cached); | 77 | printk("%d pages swap cached\n",cached); |
78 | } | 78 | } |
79 | 79 | ||
80 | #ifdef CONFIG_MMU | ||
80 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) | 81 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) |
81 | { | 82 | { |
82 | pgd_t *pgd; | 83 | pgd_t *pgd; |
@@ -139,6 +140,7 @@ void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | |||
139 | 140 | ||
140 | set_pte_phys(address, phys, prot); | 141 | set_pte_phys(address, phys, prot); |
141 | } | 142 | } |
143 | #endif /* CONFIG_MMU */ | ||
142 | 144 | ||
143 | /* References to section boundaries */ | 145 | /* References to section boundaries */ |
144 | 146 | ||
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 11d54c149821..90b494a0cf45 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -16,97 +16,13 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <asm/io.h> | 19 | #include <linux/io.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/pgalloc.h> | 21 | #include <asm/pgalloc.h> |
22 | #include <asm/addrspace.h> | 22 | #include <asm/addrspace.h> |
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | static inline void remap_area_pte(pte_t * pte, unsigned long address, | ||
27 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
28 | { | ||
29 | unsigned long end; | ||
30 | unsigned long pfn; | ||
31 | pgprot_t pgprot = __pgprot(pgprot_val(PAGE_KERNEL_NOCACHE) | flags); | ||
32 | |||
33 | address &= ~PMD_MASK; | ||
34 | end = address + size; | ||
35 | if (end > PMD_SIZE) | ||
36 | end = PMD_SIZE; | ||
37 | if (address >= end) | ||
38 | BUG(); | ||
39 | pfn = phys_addr >> PAGE_SHIFT; | ||
40 | do { | ||
41 | if (!pte_none(*pte)) { | ||
42 | printk("remap_area_pte: page already exists\n"); | ||
43 | BUG(); | ||
44 | } | ||
45 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
46 | address += PAGE_SIZE; | ||
47 | pfn++; | ||
48 | pte++; | ||
49 | } while (address && (address < end)); | ||
50 | } | ||
51 | |||
52 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | ||
53 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
54 | { | ||
55 | unsigned long end; | ||
56 | |||
57 | address &= ~PGDIR_MASK; | ||
58 | end = address + size; | ||
59 | if (end > PGDIR_SIZE) | ||
60 | end = PGDIR_SIZE; | ||
61 | phys_addr -= address; | ||
62 | if (address >= end) | ||
63 | BUG(); | ||
64 | do { | ||
65 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
66 | if (!pte) | ||
67 | return -ENOMEM; | ||
68 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
69 | address = (address + PMD_SIZE) & PMD_MASK; | ||
70 | pmd++; | ||
71 | } while (address && (address < end)); | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
76 | unsigned long size, unsigned long flags) | ||
77 | { | ||
78 | int error; | ||
79 | pgd_t * dir; | ||
80 | unsigned long end = address + size; | ||
81 | |||
82 | phys_addr -= address; | ||
83 | dir = pgd_offset_k(address); | ||
84 | flush_cache_all(); | ||
85 | if (address >= end) | ||
86 | BUG(); | ||
87 | do { | ||
88 | pud_t *pud; | ||
89 | pmd_t *pmd; | ||
90 | |||
91 | error = -ENOMEM; | ||
92 | |||
93 | pud = pud_alloc(&init_mm, dir, address); | ||
94 | if (!pud) | ||
95 | break; | ||
96 | pmd = pmd_alloc(&init_mm, pud, address); | ||
97 | if (!pmd) | ||
98 | break; | ||
99 | if (remap_area_pmd(pmd, address, end - address, | ||
100 | phys_addr + address, flags)) | ||
101 | break; | ||
102 | error = 0; | ||
103 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
104 | dir++; | ||
105 | } while (address && (address < end)); | ||
106 | flush_tlb_all(); | ||
107 | return error; | ||
108 | } | ||
109 | |||
110 | /* | 26 | /* |
111 | * Remap an arbitrary physical address space into the kernel virtual | 27 | * Remap an arbitrary physical address space into the kernel virtual |
112 | * address space. Needed when the kernel wants to access high addresses | 28 | * address space. Needed when the kernel wants to access high addresses |
@@ -121,6 +37,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
121 | { | 37 | { |
122 | struct vm_struct * area; | 38 | struct vm_struct * area; |
123 | unsigned long offset, last_addr, addr, orig_addr; | 39 | unsigned long offset, last_addr, addr, orig_addr; |
40 | pgprot_t pgprot; | ||
124 | 41 | ||
125 | /* Don't allow wraparound or zero size */ | 42 | /* Don't allow wraparound or zero size */ |
126 | last_addr = phys_addr + size - 1; | 43 | last_addr = phys_addr + size - 1; |
@@ -190,8 +107,9 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
190 | } | 107 | } |
191 | #endif | 108 | #endif |
192 | 109 | ||
110 | pgprot = __pgprot(pgprot_val(PAGE_KERNEL_NOCACHE) | flags); | ||
193 | if (likely(size)) | 111 | if (likely(size)) |
194 | if (remap_area_pages(addr, phys_addr, size, flags)) { | 112 | if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) { |
195 | vunmap((void *)orig_addr); | 113 | vunmap((void *)orig_addr); |
196 | return NULL; | 114 | return NULL; |
197 | } | 115 | } |
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c index c265185b22a7..60402eec4b4d 100644 --- a/arch/sh/oprofile/op_model_sh7750.c +++ b/arch/sh/oprofile/op_model_sh7750.c | |||
@@ -142,7 +142,7 @@ static u64 sh7750_read_counter(int counter) | |||
142 | */ | 142 | */ |
143 | static inline int to_counter(struct file *file) | 143 | static inline int to_counter(struct file *file) |
144 | { | 144 | { |
145 | const unsigned char *name = file->f_dentry->d_parent->d_name.name; | 145 | const unsigned char *name = file->f_path.dentry->d_parent->d_name.name; |
146 | 146 | ||
147 | return (int)simple_strtol(name, NULL, 10); | 147 | return (int)simple_strtol(name, NULL, 10); |
148 | } | 148 | } |
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index 58c678e06667..7bc0744b7ab6 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig | |||
@@ -39,6 +39,14 @@ config RWSEM_XCHGADD_ALGORITHM | |||
39 | config GENERIC_ISA_DMA | 39 | config GENERIC_ISA_DMA |
40 | bool | 40 | bool |
41 | 41 | ||
42 | config ARCH_HAS_ILOG2_U32 | ||
43 | bool | ||
44 | default n | ||
45 | |||
46 | config ARCH_HAS_ILOG2_U64 | ||
47 | bool | ||
48 | default n | ||
49 | |||
42 | source init/Kconfig | 50 | source init/Kconfig |
43 | 51 | ||
44 | menu "System type" | 52 | menu "System type" |
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c index 80c56754f513..ff26c02511aa 100644 --- a/arch/sh64/mm/ioremap.c +++ b/arch/sh64/mm/ioremap.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <asm/io.h> | 21 | #include <linux/io.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
@@ -28,96 +28,6 @@ | |||
28 | static void shmedia_mapioaddr(unsigned long, unsigned long); | 28 | static void shmedia_mapioaddr(unsigned long, unsigned long); |
29 | static unsigned long shmedia_ioremap(struct resource *, u32, int); | 29 | static unsigned long shmedia_ioremap(struct resource *, u32, int); |
30 | 30 | ||
31 | static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | ||
32 | unsigned long phys_addr, unsigned long flags) | ||
33 | { | ||
34 | unsigned long end; | ||
35 | unsigned long pfn; | ||
36 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_READ | | ||
37 | _PAGE_WRITE | _PAGE_DIRTY | | ||
38 | _PAGE_ACCESSED | _PAGE_SHARED | flags); | ||
39 | |||
40 | address &= ~PMD_MASK; | ||
41 | end = address + size; | ||
42 | if (end > PMD_SIZE) | ||
43 | end = PMD_SIZE; | ||
44 | if (address >= end) | ||
45 | BUG(); | ||
46 | |||
47 | pfn = phys_addr >> PAGE_SHIFT; | ||
48 | |||
49 | pr_debug(" %s: pte %p address %lx size %lx phys_addr %lx\n", | ||
50 | __FUNCTION__,pte,address,size,phys_addr); | ||
51 | |||
52 | do { | ||
53 | if (!pte_none(*pte)) { | ||
54 | printk("remap_area_pte: page already exists\n"); | ||
55 | BUG(); | ||
56 | } | ||
57 | |||
58 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
59 | address += PAGE_SIZE; | ||
60 | pfn++; | ||
61 | pte++; | ||
62 | } while (address && (address < end)); | ||
63 | } | ||
64 | |||
65 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | ||
66 | unsigned long phys_addr, unsigned long flags) | ||
67 | { | ||
68 | unsigned long end; | ||
69 | |||
70 | address &= ~PGDIR_MASK; | ||
71 | end = address + size; | ||
72 | |||
73 | if (end > PGDIR_SIZE) | ||
74 | end = PGDIR_SIZE; | ||
75 | |||
76 | phys_addr -= address; | ||
77 | |||
78 | if (address >= end) | ||
79 | BUG(); | ||
80 | |||
81 | do { | ||
82 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
83 | if (!pte) | ||
84 | return -ENOMEM; | ||
85 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
86 | address = (address + PMD_SIZE) & PMD_MASK; | ||
87 | pmd++; | ||
88 | } while (address && (address < end)); | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
93 | unsigned long size, unsigned long flags) | ||
94 | { | ||
95 | int error; | ||
96 | pgd_t * dir; | ||
97 | unsigned long end = address + size; | ||
98 | |||
99 | phys_addr -= address; | ||
100 | dir = pgd_offset_k(address); | ||
101 | flush_cache_all(); | ||
102 | if (address >= end) | ||
103 | BUG(); | ||
104 | do { | ||
105 | pmd_t *pmd = pmd_alloc(&init_mm, dir, address); | ||
106 | error = -ENOMEM; | ||
107 | if (!pmd) | ||
108 | break; | ||
109 | if (remap_area_pmd(pmd, address, end - address, | ||
110 | phys_addr + address, flags)) { | ||
111 | break; | ||
112 | } | ||
113 | error = 0; | ||
114 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
115 | dir++; | ||
116 | } while (address && (address < end)); | ||
117 | flush_tlb_all(); | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | /* | 31 | /* |
122 | * Generic mapping function (not visible outside): | 32 | * Generic mapping function (not visible outside): |
123 | */ | 33 | */ |
@@ -136,12 +46,17 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
136 | void * addr; | 46 | void * addr; |
137 | struct vm_struct * area; | 47 | struct vm_struct * area; |
138 | unsigned long offset, last_addr; | 48 | unsigned long offset, last_addr; |
49 | pgprot_t pgprot; | ||
139 | 50 | ||
140 | /* Don't allow wraparound or zero size */ | 51 | /* Don't allow wraparound or zero size */ |
141 | last_addr = phys_addr + size - 1; | 52 | last_addr = phys_addr + size - 1; |
142 | if (!size || last_addr < phys_addr) | 53 | if (!size || last_addr < phys_addr) |
143 | return NULL; | 54 | return NULL; |
144 | 55 | ||
56 | pgprot = __pgprot(_PAGE_PRESENT | _PAGE_READ | | ||
57 | _PAGE_WRITE | _PAGE_DIRTY | | ||
58 | _PAGE_ACCESSED | _PAGE_SHARED | flags); | ||
59 | |||
145 | /* | 60 | /* |
146 | * Mappings have to be page-aligned | 61 | * Mappings have to be page-aligned |
147 | */ | 62 | */ |
@@ -158,7 +73,8 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag | |||
158 | return NULL; | 73 | return NULL; |
159 | area->phys_addr = phys_addr; | 74 | area->phys_addr = phys_addr; |
160 | addr = area->addr; | 75 | addr = area->addr; |
161 | if (remap_area_pages((unsigned long)addr, phys_addr, size, flags)) { | 76 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, |
77 | phys_addr, pgprot)) { | ||
162 | vunmap(addr); | 78 | vunmap(addr); |
163 | return NULL; | 79 | return NULL; |
164 | } | 80 | } |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 92a7c8a636d3..d0dec1ea2eed 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -166,6 +166,14 @@ config ARCH_MAY_HAVE_PC_FDC | |||
166 | bool | 166 | bool |
167 | default y | 167 | default y |
168 | 168 | ||
169 | config ARCH_HAS_ILOG2_U32 | ||
170 | bool | ||
171 | default n | ||
172 | |||
173 | config ARCH_HAS_ILOG2_U64 | ||
174 | bool | ||
175 | default n | ||
176 | |||
169 | config SUN_PM | 177 | config SUN_PM |
170 | bool | 178 | bool |
171 | default y | 179 | default y |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 54d51b404603..cbbc98846b00 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -317,9 +317,8 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) | |||
317 | if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) | 317 | if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) |
318 | goto err_nopages; | 318 | goto err_nopages; |
319 | 319 | ||
320 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) | 320 | if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) |
321 | goto err_nomem; | 321 | goto err_nomem; |
322 | memset((char*)res, 0, sizeof(struct resource)); | ||
323 | 322 | ||
324 | if (allocate_resource(&_sparc_dvma, res, len_total, | 323 | if (allocate_resource(&_sparc_dvma, res, len_total, |
325 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { | 324 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { |
@@ -589,12 +588,11 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba) | |||
589 | return NULL; | 588 | return NULL; |
590 | } | 589 | } |
591 | 590 | ||
592 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) { | 591 | if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) { |
593 | free_pages(va, order); | 592 | free_pages(va, order); |
594 | printk("pci_alloc_consistent: no core\n"); | 593 | printk("pci_alloc_consistent: no core\n"); |
595 | return NULL; | 594 | return NULL; |
596 | } | 595 | } |
597 | memset((char*)res, 0, sizeof(struct resource)); | ||
598 | 596 | ||
599 | if (allocate_resource(&_sparc_dvma, res, len_total, | 597 | if (allocate_resource(&_sparc_dvma, res, len_total, |
600 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { | 598 | _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) { |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 46200c43ffb1..dab6169e31ca 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -793,10 +793,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
793 | { | 793 | { |
794 | struct of_device *dev; | 794 | struct of_device *dev; |
795 | 795 | ||
796 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 796 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
797 | if (!dev) | 797 | if (!dev) |
798 | return NULL; | 798 | return NULL; |
799 | memset(dev, 0, sizeof(*dev)); | ||
800 | 799 | ||
801 | dev->dev.parent = parent; | 800 | dev->dev.parent = parent; |
802 | dev->dev.bus = bus; | 801 | dev->dev.bus = bus; |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 1baf13ed5c3a..003f8eed32f4 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -289,7 +289,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
289 | 289 | ||
290 | if (request == PTRACE_TRACEME) { | 290 | if (request == PTRACE_TRACEME) { |
291 | ret = ptrace_traceme(); | 291 | ret = ptrace_traceme(); |
292 | pt_succ_return(regs, 0); | 292 | if (ret < 0) |
293 | pt_error_return(regs, -ret); | ||
294 | else | ||
295 | pt_succ_return(regs, 0); | ||
293 | goto out; | 296 | goto out; |
294 | } | 297 | } |
295 | 298 | ||
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index d4f9da8170c5..cf1b8baa57ea 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -545,8 +545,11 @@ void __init sun4d_init_sbi_irq(void) | |||
545 | nsbi = 0; | 545 | nsbi = 0; |
546 | for_each_sbus(sbus) | 546 | for_each_sbus(sbus) |
547 | nsbi++; | 547 | nsbi++; |
548 | sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); | 548 | sbus_actions = kzalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC); |
549 | memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action))); | 549 | if (!sbus_actions) { |
550 | prom_printf("SUN4D: Cannot allocate sbus_actions, halting.\n"); | ||
551 | prom_halt(); | ||
552 | } | ||
550 | for_each_sbus(sbus) { | 553 | for_each_sbus(sbus) { |
551 | #ifdef CONFIG_SMP | 554 | #ifdef CONFIG_SMP |
552 | extern unsigned char boot_cpu_id; | 555 | extern unsigned char boot_cpu_id; |
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 6f3ac548ee66..0bf8c165fc92 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c | |||
@@ -94,8 +94,8 @@ asmlinkage unsigned long sunos_mmap(unsigned long addr, unsigned long len, | |||
94 | * SunOS is so stupid some times... hmph! | 94 | * SunOS is so stupid some times... hmph! |
95 | */ | 95 | */ |
96 | if (file) { | 96 | if (file) { |
97 | if (imajor(file->f_dentry->d_inode) == MEM_MAJOR && | 97 | if (imajor(file->f_path.dentry->d_inode) == MEM_MAJOR && |
98 | iminor(file->f_dentry->d_inode) == 5) { | 98 | iminor(file->f_path.dentry->d_inode) == 5) { |
99 | flags |= MAP_ANONYMOUS; | 99 | flags |= MAP_ANONYMOUS; |
100 | fput(file); | 100 | fput(file); |
101 | file = NULL; | 101 | file = NULL; |
@@ -655,7 +655,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) | |||
655 | if (!file) | 655 | if (!file) |
656 | goto out; | 656 | goto out; |
657 | 657 | ||
658 | inode = file->f_dentry->d_inode; | 658 | inode = file->f_path.dentry->d_inode; |
659 | 659 | ||
660 | socket = SOCKET_I(inode); | 660 | socket = SOCKET_I(inode); |
661 | local.sin_family = AF_INET; | 661 | local.sin_family = AF_INET; |
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 2bb1309003dd..4ccda77d08d6 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
24 | #include <asm/dma.h> | 24 | #include <asm/dma.h> |
25 | #include <asm/oplib.h> | ||
25 | 26 | ||
26 | /* #define IOUNIT_DEBUG */ | 27 | /* #define IOUNIT_DEBUG */ |
27 | #ifdef IOUNIT_DEBUG | 28 | #ifdef IOUNIT_DEBUG |
@@ -41,9 +42,12 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus) | |||
41 | struct linux_prom_registers iommu_promregs[PROMREG_MAX]; | 42 | struct linux_prom_registers iommu_promregs[PROMREG_MAX]; |
42 | struct resource r; | 43 | struct resource r; |
43 | 44 | ||
44 | iounit = kmalloc(sizeof(struct iounit_struct), GFP_ATOMIC); | 45 | iounit = kzalloc(sizeof(struct iounit_struct), GFP_ATOMIC); |
46 | if (!iounit) { | ||
47 | prom_printf("SUN4D: Cannot alloc iounit, halting.\n"); | ||
48 | prom_halt(); | ||
49 | } | ||
45 | 50 | ||
46 | memset(iounit, 0, sizeof(*iounit)); | ||
47 | iounit->limit[0] = IOUNIT_BMAP1_START; | 51 | iounit->limit[0] = IOUNIT_BMAP1_START; |
48 | iounit->limit[1] = IOUNIT_BMAP2_START; | 52 | iounit->limit[1] = IOUNIT_BMAP2_START; |
49 | iounit->limit[2] = IOUNIT_BMAPM_START; | 53 | iounit->limit[2] = IOUNIT_BMAPM_START; |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index b627f8dbcaad..d41f66ac7fff 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -26,6 +26,14 @@ config MMU | |||
26 | bool | 26 | bool |
27 | default y | 27 | default y |
28 | 28 | ||
29 | config STACKTRACE_SUPPORT | ||
30 | bool | ||
31 | default y | ||
32 | |||
33 | config LOCKDEP_SUPPORT | ||
34 | bool | ||
35 | default y | ||
36 | |||
29 | config TIME_INTERPOLATION | 37 | config TIME_INTERPOLATION |
30 | bool | 38 | bool |
31 | default y | 39 | default y |
@@ -34,6 +42,14 @@ config ARCH_MAY_HAVE_PC_FDC | |||
34 | bool | 42 | bool |
35 | default y | 43 | default y |
36 | 44 | ||
45 | config ARCH_HAS_ILOG2_U32 | ||
46 | bool | ||
47 | default n | ||
48 | |||
49 | config ARCH_HAS_ILOG2_U64 | ||
50 | bool | ||
51 | default n | ||
52 | |||
37 | config AUDIT_ARCH | 53 | config AUDIT_ARCH |
38 | bool | 54 | bool |
39 | default y | 55 | default y |
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index afe0a7720a26..1f130f3b6c24 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug | |||
@@ -1,5 +1,9 @@ | |||
1 | menu "Kernel hacking" | 1 | menu "Kernel hacking" |
2 | 2 | ||
3 | config TRACE_IRQFLAGS_SUPPORT | ||
4 | bool | ||
5 | default y | ||
6 | |||
3 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
4 | 8 | ||
5 | config DEBUG_STACK_USAGE | 9 | config DEBUG_STACK_USAGE |
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 2f4612fa81f2..0f0d38f6197c 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,24 +1,29 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc2 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue Oct 17 19:29:20 2006 | 4 | # Sat Dec 9 15:41:30 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | CONFIG_MMU=y | 9 | CONFIG_MMU=y |
10 | CONFIG_STACKTRACE_SUPPORT=y | ||
11 | CONFIG_LOCKDEP_SUPPORT=y | ||
10 | CONFIG_TIME_INTERPOLATION=y | 12 | CONFIG_TIME_INTERPOLATION=y |
11 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 13 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
14 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
15 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
12 | CONFIG_AUDIT_ARCH=y | 16 | CONFIG_AUDIT_ARCH=y |
13 | CONFIG_SPARC64_PAGE_SIZE_8KB=y | 17 | CONFIG_SPARC64_PAGE_SIZE_8KB=y |
14 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set | 18 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set |
15 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set | 19 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set |
16 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set | 20 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set |
17 | CONFIG_SECCOMP=y | 21 | CONFIG_SECCOMP=y |
18 | # CONFIG_HZ_100 is not set | 22 | CONFIG_HZ_100=y |
19 | CONFIG_HZ_250=y | 23 | # CONFIG_HZ_250 is not set |
24 | # CONFIG_HZ_300 is not set | ||
20 | # CONFIG_HZ_1000 is not set | 25 | # CONFIG_HZ_1000 is not set |
21 | CONFIG_HZ=250 | 26 | CONFIG_HZ=100 |
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 28 | ||
24 | # | 29 | # |
@@ -42,13 +47,14 @@ CONFIG_POSIX_MQUEUE=y | |||
42 | # CONFIG_UTS_NS is not set | 47 | # CONFIG_UTS_NS is not set |
43 | # CONFIG_AUDIT is not set | 48 | # CONFIG_AUDIT is not set |
44 | # CONFIG_IKCONFIG is not set | 49 | # CONFIG_IKCONFIG is not set |
50 | CONFIG_SYSFS_DEPRECATED=y | ||
45 | CONFIG_RELAY=y | 51 | CONFIG_RELAY=y |
46 | CONFIG_INITRAMFS_SOURCE="" | 52 | CONFIG_INITRAMFS_SOURCE="" |
47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
48 | CONFIG_SYSCTL=y | 54 | CONFIG_SYSCTL=y |
49 | # CONFIG_EMBEDDED is not set | 55 | # CONFIG_EMBEDDED is not set |
50 | CONFIG_UID16=y | 56 | CONFIG_UID16=y |
51 | # CONFIG_SYSCTL_SYSCALL is not set | 57 | CONFIG_SYSCTL_SYSCALL=y |
52 | CONFIG_KALLSYMS=y | 58 | CONFIG_KALLSYMS=y |
53 | # CONFIG_KALLSYMS_ALL is not set | 59 | # CONFIG_KALLSYMS_ALL is not set |
54 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 60 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -203,6 +209,7 @@ CONFIG_INET_TCP_DIAG=y | |||
203 | # CONFIG_TCP_CONG_ADVANCED is not set | 209 | # CONFIG_TCP_CONG_ADVANCED is not set |
204 | CONFIG_TCP_CONG_CUBIC=y | 210 | CONFIG_TCP_CONG_CUBIC=y |
205 | CONFIG_DEFAULT_TCP_CONG="cubic" | 211 | CONFIG_DEFAULT_TCP_CONG="cubic" |
212 | # CONFIG_TCP_MD5SIG is not set | ||
206 | CONFIG_IPV6=m | 213 | CONFIG_IPV6=m |
207 | CONFIG_IPV6_PRIVACY=y | 214 | CONFIG_IPV6_PRIVACY=y |
208 | CONFIG_IPV6_ROUTER_PREF=y | 215 | CONFIG_IPV6_ROUTER_PREF=y |
@@ -219,7 +226,6 @@ CONFIG_INET6_XFRM_MODE_BEET=m | |||
219 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 226 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
220 | CONFIG_IPV6_SIT=m | 227 | CONFIG_IPV6_SIT=m |
221 | CONFIG_IPV6_TUNNEL=m | 228 | CONFIG_IPV6_TUNNEL=m |
222 | # CONFIG_IPV6_SUBTREES is not set | ||
223 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 229 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
224 | # CONFIG_NETWORK_SECMARK is not set | 230 | # CONFIG_NETWORK_SECMARK is not set |
225 | # CONFIG_NETFILTER is not set | 231 | # CONFIG_NETFILTER is not set |
@@ -238,6 +244,8 @@ CONFIG_IP_DCCP_CCID2=m | |||
238 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set | 244 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set |
239 | CONFIG_IP_DCCP_CCID3=m | 245 | CONFIG_IP_DCCP_CCID3=m |
240 | CONFIG_IP_DCCP_TFRC_LIB=m | 246 | CONFIG_IP_DCCP_TFRC_LIB=m |
247 | # CONFIG_IP_DCCP_CCID3_DEBUG is not set | ||
248 | CONFIG_IP_DCCP_CCID3_RTO=100 | ||
241 | 249 | ||
242 | # | 250 | # |
243 | # DCCP Kernel Hacking | 251 | # DCCP Kernel Hacking |
@@ -405,6 +413,7 @@ CONFIG_IDEDMA_AUTO=y | |||
405 | # | 413 | # |
406 | CONFIG_RAID_ATTRS=m | 414 | CONFIG_RAID_ATTRS=m |
407 | CONFIG_SCSI=y | 415 | CONFIG_SCSI=y |
416 | # CONFIG_SCSI_TGT is not set | ||
408 | CONFIG_SCSI_NETLINK=y | 417 | CONFIG_SCSI_NETLINK=y |
409 | CONFIG_SCSI_PROC_FS=y | 418 | CONFIG_SCSI_PROC_FS=y |
410 | 419 | ||
@@ -425,6 +434,7 @@ CONFIG_CHR_DEV_SG=m | |||
425 | CONFIG_SCSI_MULTI_LUN=y | 434 | CONFIG_SCSI_MULTI_LUN=y |
426 | CONFIG_SCSI_CONSTANTS=y | 435 | CONFIG_SCSI_CONSTANTS=y |
427 | # CONFIG_SCSI_LOGGING is not set | 436 | # CONFIG_SCSI_LOGGING is not set |
437 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
428 | 438 | ||
429 | # | 439 | # |
430 | # SCSI Transports | 440 | # SCSI Transports |
@@ -468,6 +478,7 @@ CONFIG_ISCSI_TCP=m | |||
468 | # CONFIG_SCSI_DC390T is not set | 478 | # CONFIG_SCSI_DC390T is not set |
469 | # CONFIG_SCSI_DEBUG is not set | 479 | # CONFIG_SCSI_DEBUG is not set |
470 | # CONFIG_SCSI_SUNESP is not set | 480 | # CONFIG_SCSI_SUNESP is not set |
481 | # CONFIG_SCSI_SRP is not set | ||
471 | 482 | ||
472 | # | 483 | # |
473 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 484 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -598,6 +609,7 @@ CONFIG_BNX2=m | |||
598 | # CONFIG_IXGB is not set | 609 | # CONFIG_IXGB is not set |
599 | # CONFIG_S2IO is not set | 610 | # CONFIG_S2IO is not set |
600 | # CONFIG_MYRI10GE is not set | 611 | # CONFIG_MYRI10GE is not set |
612 | # CONFIG_NETXEN_NIC is not set | ||
601 | 613 | ||
602 | # | 614 | # |
603 | # Token Ring devices | 615 | # Token Ring devices |
@@ -724,10 +736,6 @@ CONFIG_RTC=y | |||
724 | # CONFIG_DTLK is not set | 736 | # CONFIG_DTLK is not set |
725 | # CONFIG_R3964 is not set | 737 | # CONFIG_R3964 is not set |
726 | # CONFIG_APPLICOM is not set | 738 | # CONFIG_APPLICOM is not set |
727 | |||
728 | # | ||
729 | # Ftape, the floppy tape device driver | ||
730 | # | ||
731 | # CONFIG_DRM is not set | 739 | # CONFIG_DRM is not set |
732 | # CONFIG_RAW_DRIVER is not set | 740 | # CONFIG_RAW_DRIVER is not set |
733 | 741 | ||
@@ -1039,6 +1047,11 @@ CONFIG_SND_SUN_CS4231=m | |||
1039 | # CONFIG_SOUND_PRIME is not set | 1047 | # CONFIG_SOUND_PRIME is not set |
1040 | 1048 | ||
1041 | # | 1049 | # |
1050 | # HID Devices | ||
1051 | # | ||
1052 | CONFIG_HID=y | ||
1053 | |||
1054 | # | ||
1042 | # USB support | 1055 | # USB support |
1043 | # | 1056 | # |
1044 | CONFIG_USB_ARCH_HAS_HCD=y | 1057 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1053,6 +1066,7 @@ CONFIG_USB=y | |||
1053 | CONFIG_USB_DEVICEFS=y | 1066 | CONFIG_USB_DEVICEFS=y |
1054 | # CONFIG_USB_BANDWIDTH is not set | 1067 | # CONFIG_USB_BANDWIDTH is not set |
1055 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1068 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1069 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
1056 | # CONFIG_USB_OTG is not set | 1070 | # CONFIG_USB_OTG is not set |
1057 | 1071 | ||
1058 | # | 1072 | # |
@@ -1089,8 +1103,7 @@ CONFIG_USB_UHCI_HCD=m | |||
1089 | # USB Input Devices | 1103 | # USB Input Devices |
1090 | # | 1104 | # |
1091 | CONFIG_USB_HID=y | 1105 | CONFIG_USB_HID=y |
1092 | CONFIG_USB_HIDINPUT=y | 1106 | # CONFIG_USB_HID_POWERBOOK is not set |
1093 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1094 | # CONFIG_HID_FF is not set | 1107 | # CONFIG_HID_FF is not set |
1095 | CONFIG_USB_HIDDEV=y | 1108 | CONFIG_USB_HIDDEV=y |
1096 | # CONFIG_USB_AIPTEK is not set | 1109 | # CONFIG_USB_AIPTEK is not set |
@@ -1119,6 +1132,7 @@ CONFIG_USB_HIDDEV=y | |||
1119 | # CONFIG_USB_KAWETH is not set | 1132 | # CONFIG_USB_KAWETH is not set |
1120 | # CONFIG_USB_PEGASUS is not set | 1133 | # CONFIG_USB_PEGASUS is not set |
1121 | # CONFIG_USB_RTL8150 is not set | 1134 | # CONFIG_USB_RTL8150 is not set |
1135 | # CONFIG_USB_USBNET_MII is not set | ||
1122 | # CONFIG_USB_USBNET is not set | 1136 | # CONFIG_USB_USBNET is not set |
1123 | # CONFIG_USB_MON is not set | 1137 | # CONFIG_USB_MON is not set |
1124 | 1138 | ||
@@ -1364,6 +1378,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1364 | # CONFIG_NLS_UTF8 is not set | 1378 | # CONFIG_NLS_UTF8 is not set |
1365 | 1379 | ||
1366 | # | 1380 | # |
1381 | # Distributed Lock Manager | ||
1382 | # | ||
1383 | # CONFIG_DLM is not set | ||
1384 | |||
1385 | # | ||
1367 | # Instrumentation Support | 1386 | # Instrumentation Support |
1368 | # | 1387 | # |
1369 | CONFIG_PROFILING=y | 1388 | CONFIG_PROFILING=y |
@@ -1373,6 +1392,7 @@ CONFIG_KPROBES=y | |||
1373 | # | 1392 | # |
1374 | # Kernel hacking | 1393 | # Kernel hacking |
1375 | # | 1394 | # |
1395 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1376 | CONFIG_PRINTK_TIME=y | 1396 | CONFIG_PRINTK_TIME=y |
1377 | CONFIG_ENABLE_MUST_CHECK=y | 1397 | CONFIG_ENABLE_MUST_CHECK=y |
1378 | CONFIG_MAGIC_SYSRQ=y | 1398 | CONFIG_MAGIC_SYSRQ=y |
@@ -1387,6 +1407,8 @@ CONFIG_SCHEDSTATS=y | |||
1387 | # CONFIG_DEBUG_SPINLOCK is not set | 1407 | # CONFIG_DEBUG_SPINLOCK is not set |
1388 | # CONFIG_DEBUG_MUTEXES is not set | 1408 | # CONFIG_DEBUG_MUTEXES is not set |
1389 | # CONFIG_DEBUG_RWSEMS is not set | 1409 | # CONFIG_DEBUG_RWSEMS is not set |
1410 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1411 | # CONFIG_PROVE_LOCKING is not set | ||
1390 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1412 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1391 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1413 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1392 | # CONFIG_DEBUG_KOBJECT is not set | 1414 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1420,8 +1442,9 @@ CONFIG_CRYPTO=y | |||
1420 | CONFIG_CRYPTO_ALGAPI=y | 1442 | CONFIG_CRYPTO_ALGAPI=y |
1421 | CONFIG_CRYPTO_BLKCIPHER=y | 1443 | CONFIG_CRYPTO_BLKCIPHER=y |
1422 | CONFIG_CRYPTO_HASH=y | 1444 | CONFIG_CRYPTO_HASH=y |
1423 | CONFIG_CRYPTO_MANAGER=m | 1445 | CONFIG_CRYPTO_MANAGER=y |
1424 | CONFIG_CRYPTO_HMAC=y | 1446 | CONFIG_CRYPTO_HMAC=y |
1447 | CONFIG_CRYPTO_XCBC=y | ||
1425 | CONFIG_CRYPTO_NULL=m | 1448 | CONFIG_CRYPTO_NULL=m |
1426 | CONFIG_CRYPTO_MD4=y | 1449 | CONFIG_CRYPTO_MD4=y |
1427 | CONFIG_CRYPTO_MD5=y | 1450 | CONFIG_CRYPTO_MD5=y |
@@ -1430,8 +1453,10 @@ CONFIG_CRYPTO_SHA256=m | |||
1430 | CONFIG_CRYPTO_SHA512=m | 1453 | CONFIG_CRYPTO_SHA512=m |
1431 | CONFIG_CRYPTO_WP512=m | 1454 | CONFIG_CRYPTO_WP512=m |
1432 | CONFIG_CRYPTO_TGR192=m | 1455 | CONFIG_CRYPTO_TGR192=m |
1456 | CONFIG_CRYPTO_GF128MUL=m | ||
1433 | CONFIG_CRYPTO_ECB=m | 1457 | CONFIG_CRYPTO_ECB=m |
1434 | CONFIG_CRYPTO_CBC=y | 1458 | CONFIG_CRYPTO_CBC=y |
1459 | CONFIG_CRYPTO_LRW=m | ||
1435 | CONFIG_CRYPTO_DES=y | 1460 | CONFIG_CRYPTO_DES=y |
1436 | CONFIG_CRYPTO_BLOWFISH=m | 1461 | CONFIG_CRYPTO_BLOWFISH=m |
1437 | CONFIG_CRYPTO_TWOFISH=m | 1462 | CONFIG_CRYPTO_TWOFISH=m |
@@ -1456,6 +1481,7 @@ CONFIG_CRYPTO_TEST=m | |||
1456 | # | 1481 | # |
1457 | # Library routines | 1482 | # Library routines |
1458 | # | 1483 | # |
1484 | CONFIG_BITREVERSE=y | ||
1459 | CONFIG_CRC_CCITT=m | 1485 | CONFIG_CRC_CCITT=m |
1460 | CONFIG_CRC16=m | 1486 | CONFIG_CRC16=m |
1461 | CONFIG_CRC32=y | 1487 | CONFIG_CRC32=y |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index e1eabebaed39..eff0c01d3579 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -14,6 +14,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ | |||
14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ | 14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ |
15 | visemul.o prom.o of_device.o | 15 | visemul.o prom.o of_device.o |
16 | 16 | ||
17 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
17 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ | 18 | obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ |
18 | pci_psycho.o pci_sabre.o pci_schizo.o \ | 19 | pci_psycho.o pci_sabre.o pci_schizo.o \ |
19 | pci_sun4v.o pci_sun4v_asm.o | 20 | pci_sun4v.o pci_sun4v_asm.o |
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d7caa60a0074..f205fc7cbcd0 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c | |||
@@ -209,7 +209,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && | 209 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && |
210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || | 210 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || |
211 | N_TRSIZE(ex) || N_DRSIZE(ex) || | 211 | N_TRSIZE(ex) || N_DRSIZE(ex) || |
212 | bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { | 212 | bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
213 | return -ENOEXEC; | 213 | return -ENOEXEC; |
214 | } | 214 | } |
215 | 215 | ||
@@ -349,7 +349,7 @@ static int load_aout32_library(struct file *file) | |||
349 | int retval; | 349 | int retval; |
350 | struct exec ex; | 350 | struct exec ex; |
351 | 351 | ||
352 | inode = file->f_dentry->d_inode; | 352 | inode = file->f_path.dentry->d_inode; |
353 | 353 | ||
354 | retval = -ENOEXEC; | 354 | retval = -ENOEXEC; |
355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); | 355 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); |
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 259f37e516f5..9699abeb9907 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -341,7 +341,7 @@ static void fetch_decode_regs(struct mctrl_info *mp) | |||
341 | 341 | ||
342 | static int init_one_mctrl(struct device_node *dp) | 342 | static int init_one_mctrl(struct device_node *dp) |
343 | { | 343 | { |
344 | struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL); | 344 | struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL); |
345 | int portid = of_getintprop_default(dp, "portid", -1); | 345 | int portid = of_getintprop_default(dp, "portid", -1); |
346 | struct linux_prom64_registers *regs; | 346 | struct linux_prom64_registers *regs; |
347 | void *pval; | 347 | void *pval; |
@@ -349,7 +349,6 @@ static int init_one_mctrl(struct device_node *dp) | |||
349 | 349 | ||
350 | if (!mp) | 350 | if (!mp) |
351 | return -1; | 351 | return -1; |
352 | memset(mp, 0, sizeof(*mp)); | ||
353 | if (portid == -1) | 352 | if (portid == -1) |
354 | goto fail; | 353 | goto fail; |
355 | 354 | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 6f28bec0a9bf..c15a3edcb826 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -597,7 +597,12 @@ __spitfire_cee_trap_continue: | |||
597 | 1: ba,pt %xcc, etrap_irq | 597 | 1: ba,pt %xcc, etrap_irq |
598 | rd %pc, %g7 | 598 | rd %pc, %g7 |
599 | 599 | ||
600 | 2: mov %l4, %o1 | 600 | 2: |
601 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
602 | call trace_hardirqs_off | ||
603 | nop | ||
604 | #endif | ||
605 | mov %l4, %o1 | ||
601 | mov %l5, %o2 | 606 | mov %l5, %o2 |
602 | call spitfire_access_error | 607 | call spitfire_access_error |
603 | add %sp, PTREGS_OFF, %o0 | 608 | add %sp, PTREGS_OFF, %o0 |
@@ -824,6 +829,10 @@ do_cheetah_plus_data_parity: | |||
824 | wrpr %g0, 15, %pil | 829 | wrpr %g0, 15, %pil |
825 | ba,pt %xcc, etrap_irq | 830 | ba,pt %xcc, etrap_irq |
826 | rd %pc, %g7 | 831 | rd %pc, %g7 |
832 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
833 | call trace_hardirqs_off | ||
834 | nop | ||
835 | #endif | ||
827 | mov 0x0, %o0 | 836 | mov 0x0, %o0 |
828 | call cheetah_plus_parity_error | 837 | call cheetah_plus_parity_error |
829 | add %sp, PTREGS_OFF, %o1 | 838 | add %sp, PTREGS_OFF, %o1 |
@@ -855,6 +864,10 @@ do_cheetah_plus_insn_parity: | |||
855 | wrpr %g0, 15, %pil | 864 | wrpr %g0, 15, %pil |
856 | ba,pt %xcc, etrap_irq | 865 | ba,pt %xcc, etrap_irq |
857 | rd %pc, %g7 | 866 | rd %pc, %g7 |
867 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
868 | call trace_hardirqs_off | ||
869 | nop | ||
870 | #endif | ||
858 | mov 0x1, %o0 | 871 | mov 0x1, %o0 |
859 | call cheetah_plus_parity_error | 872 | call cheetah_plus_parity_error |
860 | add %sp, PTREGS_OFF, %o1 | 873 | add %sp, PTREGS_OFF, %o1 |
@@ -1183,6 +1196,10 @@ c_fast_ecc: | |||
1183 | wrpr %g0, 15, %pil | 1196 | wrpr %g0, 15, %pil |
1184 | ba,pt %xcc, etrap_irq | 1197 | ba,pt %xcc, etrap_irq |
1185 | rd %pc, %g7 | 1198 | rd %pc, %g7 |
1199 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1200 | call trace_hardirqs_off | ||
1201 | nop | ||
1202 | #endif | ||
1186 | mov %l4, %o1 | 1203 | mov %l4, %o1 |
1187 | mov %l5, %o2 | 1204 | mov %l5, %o2 |
1188 | call cheetah_fecc_handler | 1205 | call cheetah_fecc_handler |
@@ -1211,6 +1228,10 @@ c_cee: | |||
1211 | wrpr %g0, 15, %pil | 1228 | wrpr %g0, 15, %pil |
1212 | ba,pt %xcc, etrap_irq | 1229 | ba,pt %xcc, etrap_irq |
1213 | rd %pc, %g7 | 1230 | rd %pc, %g7 |
1231 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1232 | call trace_hardirqs_off | ||
1233 | nop | ||
1234 | #endif | ||
1214 | mov %l4, %o1 | 1235 | mov %l4, %o1 |
1215 | mov %l5, %o2 | 1236 | mov %l5, %o2 |
1216 | call cheetah_cee_handler | 1237 | call cheetah_cee_handler |
@@ -1239,6 +1260,10 @@ c_deferred: | |||
1239 | wrpr %g0, 15, %pil | 1260 | wrpr %g0, 15, %pil |
1240 | ba,pt %xcc, etrap_irq | 1261 | ba,pt %xcc, etrap_irq |
1241 | rd %pc, %g7 | 1262 | rd %pc, %g7 |
1263 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
1264 | call trace_hardirqs_off | ||
1265 | nop | ||
1266 | #endif | ||
1242 | mov %l4, %o1 | 1267 | mov %l4, %o1 |
1243 | mov %l5, %o2 | 1268 | mov %l5, %o2 |
1244 | call cheetah_deferred_handler | 1269 | call cheetah_deferred_handler |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index c8e9dc9d68a9..03ffaf895a22 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -489,6 +489,14 @@ tlb_fixup_done: | |||
489 | call __bzero | 489 | call __bzero |
490 | sub %o1, %o0, %o1 | 490 | sub %o1, %o0, %o1 |
491 | 491 | ||
492 | #ifdef CONFIG_LOCKDEP | ||
493 | /* We have this call this super early, as even prom_init can grab | ||
494 | * spinlocks and thus call into the lockdep code. | ||
495 | */ | ||
496 | call lockdep_init | ||
497 | nop | ||
498 | #endif | ||
499 | |||
492 | mov %l6, %o1 ! OpenPROM stack | 500 | mov %l6, %o1 ! OpenPROM stack |
493 | call prom_init | 501 | call prom_init |
494 | mov %l7, %o0 ! OpenPROM cif handler | 502 | mov %l7, %o0 ! OpenPROM cif handler |
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index f028e68b23f2..ad1c4f55420f 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c | |||
@@ -72,14 +72,12 @@ static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) | |||
72 | struct linux_prom_registers *regs; | 72 | struct linux_prom_registers *regs; |
73 | struct sparc_isa_device *isa_dev; | 73 | struct sparc_isa_device *isa_dev; |
74 | 74 | ||
75 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 75 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
76 | if (!isa_dev) { | 76 | if (!isa_dev) { |
77 | fatal_err("cannot allocate child isa_dev"); | 77 | fatal_err("cannot allocate child isa_dev"); |
78 | prom_halt(); | 78 | prom_halt(); |
79 | } | 79 | } |
80 | 80 | ||
81 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
82 | |||
83 | /* Link it in to parent. */ | 81 | /* Link it in to parent. */ |
84 | isa_dev->next = parent_isa_dev->child; | 82 | isa_dev->next = parent_isa_dev->child; |
85 | parent_isa_dev->child = isa_dev; | 83 | parent_isa_dev->child = isa_dev; |
@@ -104,14 +102,12 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | |||
104 | struct linux_prom_registers *regs; | 102 | struct linux_prom_registers *regs; |
105 | struct sparc_isa_device *isa_dev; | 103 | struct sparc_isa_device *isa_dev; |
106 | 104 | ||
107 | isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); | 105 | isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL); |
108 | if (!isa_dev) { | 106 | if (!isa_dev) { |
109 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); | 107 | printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); |
110 | return; | 108 | return; |
111 | } | 109 | } |
112 | 110 | ||
113 | memset(isa_dev, 0, sizeof(*isa_dev)); | ||
114 | |||
115 | isa_dev->ofdev.node = dp; | 111 | isa_dev->ofdev.node = dp; |
116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | 112 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; |
117 | isa_dev->ofdev.dev.bus = &isa_bus_type; | 113 | isa_dev->ofdev.dev.bus = &isa_bus_type; |
@@ -180,14 +176,12 @@ void __init isa_init(void) | |||
180 | pbm = pdev_cookie->pbm; | 176 | pbm = pdev_cookie->pbm; |
181 | dp = pdev_cookie->prom_node; | 177 | dp = pdev_cookie->prom_node; |
182 | 178 | ||
183 | isa_br = kmalloc(sizeof(*isa_br), GFP_KERNEL); | 179 | isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL); |
184 | if (!isa_br) { | 180 | if (!isa_br) { |
185 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); | 181 | printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); |
186 | return; | 182 | return; |
187 | } | 183 | } |
188 | 184 | ||
189 | memset(isa_br, 0, sizeof(*isa_br)); | ||
190 | |||
191 | isa_br->ofdev.node = dp; | 185 | isa_br->ofdev.node = dp; |
192 | isa_br->ofdev.dev.parent = &pdev->dev; | 186 | isa_br->ofdev.dev.parent = &pdev->dev; |
193 | isa_br->ofdev.dev.bus = &isa_bus_type; | 187 | isa_br->ofdev.dev.bus = &isa_bus_type; |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index 8e75ed762fd8..ae221f0d4a6f 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -45,7 +45,11 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | |||
45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 45 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
46 | { | 46 | { |
47 | p->ainsn.insn[0] = *p->addr; | 47 | p->ainsn.insn[0] = *p->addr; |
48 | flushi(&p->ainsn.insn[0]); | ||
49 | |||
48 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; | 50 | p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; |
51 | flushi(&p->ainsn.insn[1]); | ||
52 | |||
49 | p->opcode = *p->addr; | 53 | p->opcode = *p->addr; |
50 | return 0; | 54 | return 0; |
51 | } | 55 | } |
@@ -185,16 +189,19 @@ no_kprobe: | |||
185 | /* If INSN is a relative control transfer instruction, | 189 | /* If INSN is a relative control transfer instruction, |
186 | * return the corrected branch destination value. | 190 | * return the corrected branch destination value. |
187 | * | 191 | * |
188 | * The original INSN location was REAL_PC, it actually | 192 | * regs->tpc and regs->tnpc still hold the values of the |
189 | * executed at PC and produced destination address NPC. | 193 | * program counters at the time of trap due to the execution |
194 | * of the BREAKPOINT_INSTRUCTION_2 at p->ainsn.insn[1] | ||
195 | * | ||
190 | */ | 196 | */ |
191 | static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | 197 | static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p, |
192 | unsigned long pc, | 198 | struct pt_regs *regs) |
193 | unsigned long npc) | ||
194 | { | 199 | { |
200 | unsigned long real_pc = (unsigned long) p->addr; | ||
201 | |||
195 | /* Branch not taken, no mods necessary. */ | 202 | /* Branch not taken, no mods necessary. */ |
196 | if (npc == pc + 0x4UL) | 203 | if (regs->tnpc == regs->tpc + 0x4UL) |
197 | return real_pc + 0x4UL; | 204 | return real_pc + 0x8UL; |
198 | 205 | ||
199 | /* The three cases are call, branch w/prediction, | 206 | /* The three cases are call, branch w/prediction, |
200 | * and traditional branch. | 207 | * and traditional branch. |
@@ -202,14 +209,21 @@ static unsigned long __kprobes relbranch_fixup(u32 insn, unsigned long real_pc, | |||
202 | if ((insn & 0xc0000000) == 0x40000000 || | 209 | if ((insn & 0xc0000000) == 0x40000000 || |
203 | (insn & 0xc1c00000) == 0x00400000 || | 210 | (insn & 0xc1c00000) == 0x00400000 || |
204 | (insn & 0xc1c00000) == 0x00800000) { | 211 | (insn & 0xc1c00000) == 0x00800000) { |
212 | unsigned long ainsn_addr; | ||
213 | |||
214 | ainsn_addr = (unsigned long) &p->ainsn.insn[0]; | ||
215 | |||
205 | /* The instruction did all the work for us | 216 | /* The instruction did all the work for us |
206 | * already, just apply the offset to the correct | 217 | * already, just apply the offset to the correct |
207 | * instruction location. | 218 | * instruction location. |
208 | */ | 219 | */ |
209 | return (real_pc + (npc - pc)); | 220 | return (real_pc + (regs->tnpc - ainsn_addr)); |
210 | } | 221 | } |
211 | 222 | ||
212 | return real_pc + 0x4UL; | 223 | /* It is jmpl or some other absolute PC modification instruction, |
224 | * leave NPC as-is. | ||
225 | */ | ||
226 | return regs->tnpc; | ||
213 | } | 227 | } |
214 | 228 | ||
215 | /* If INSN is an instruction which writes it's PC location | 229 | /* If INSN is an instruction which writes it's PC location |
@@ -220,12 +234,12 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
220 | { | 234 | { |
221 | unsigned long *slot = NULL; | 235 | unsigned long *slot = NULL; |
222 | 236 | ||
223 | /* Simplest cast is call, which always uses %o7 */ | 237 | /* Simplest case is 'call', which always uses %o7 */ |
224 | if ((insn & 0xc0000000) == 0x40000000) { | 238 | if ((insn & 0xc0000000) == 0x40000000) { |
225 | slot = ®s->u_regs[UREG_I7]; | 239 | slot = ®s->u_regs[UREG_I7]; |
226 | } | 240 | } |
227 | 241 | ||
228 | /* Jmpl encodes the register inside of the opcode */ | 242 | /* 'jmpl' encodes the register inside of the opcode */ |
229 | if ((insn & 0xc1f80000) == 0x81c00000) { | 243 | if ((insn & 0xc1f80000) == 0x81c00000) { |
230 | unsigned long rd = ((insn >> 25) & 0x1f); | 244 | unsigned long rd = ((insn >> 25) & 0x1f); |
231 | 245 | ||
@@ -247,11 +261,11 @@ static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, | |||
247 | 261 | ||
248 | /* | 262 | /* |
249 | * Called after single-stepping. p->addr is the address of the | 263 | * Called after single-stepping. p->addr is the address of the |
250 | * instruction whose first byte has been replaced by the breakpoint | 264 | * instruction which has been replaced by the breakpoint |
251 | * instruction. To avoid the SMP problems that can occur when we | 265 | * instruction. To avoid the SMP problems that can occur when we |
252 | * temporarily put back the original opcode to single-step, we | 266 | * temporarily put back the original opcode to single-step, we |
253 | * single-stepped a copy of the instruction. The address of this | 267 | * single-stepped a copy of the instruction. The address of this |
254 | * copy is p->ainsn.insn. | 268 | * copy is &p->ainsn.insn[0]. |
255 | * | 269 | * |
256 | * This function prepares to return from the post-single-step | 270 | * This function prepares to return from the post-single-step |
257 | * breakpoint trap. | 271 | * breakpoint trap. |
@@ -261,11 +275,11 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
261 | { | 275 | { |
262 | u32 insn = p->ainsn.insn[0]; | 276 | u32 insn = p->ainsn.insn[0]; |
263 | 277 | ||
278 | regs->tnpc = relbranch_fixup(insn, p, regs); | ||
279 | |||
280 | /* This assignment must occur after relbranch_fixup() */ | ||
264 | regs->tpc = kcb->kprobe_orig_tnpc; | 281 | regs->tpc = kcb->kprobe_orig_tnpc; |
265 | regs->tnpc = relbranch_fixup(insn, | 282 | |
266 | (unsigned long) p->addr, | ||
267 | (unsigned long) &p->ainsn.insn[0], | ||
268 | regs->tnpc); | ||
269 | retpc_fixup(regs, insn, (unsigned long) p->addr); | 283 | retpc_fixup(regs, insn, (unsigned long) p->addr); |
270 | 284 | ||
271 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | | 285 | regs->tstate = ((regs->tstate & ~TSTATE_PIL) | |
@@ -430,17 +444,8 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
430 | struct jprobe *jp = container_of(p, struct jprobe, kp); | 444 | struct jprobe *jp = container_of(p, struct jprobe, kp); |
431 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 445 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
432 | 446 | ||
433 | kcb->jprobe_saved_regs_location = regs; | ||
434 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); | 447 | memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); |
435 | 448 | ||
436 | /* Save a whole stack frame, this gets arguments | ||
437 | * pushed onto the stack after using up all the | ||
438 | * arg registers. | ||
439 | */ | ||
440 | memcpy(&(kcb->jprobe_saved_stack), | ||
441 | (char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
442 | sizeof(kcb->jprobe_saved_stack)); | ||
443 | |||
444 | regs->tpc = (unsigned long) jp->entry; | 449 | regs->tpc = (unsigned long) jp->entry; |
445 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; | 450 | regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; |
446 | regs->tstate |= TSTATE_PIL; | 451 | regs->tstate |= TSTATE_PIL; |
@@ -450,10 +455,19 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |||
450 | 455 | ||
451 | void __kprobes jprobe_return(void) | 456 | void __kprobes jprobe_return(void) |
452 | { | 457 | { |
453 | __asm__ __volatile__( | 458 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
454 | ".globl jprobe_return_trap_instruction\n" | 459 | register unsigned long orig_fp asm("g1"); |
460 | |||
461 | orig_fp = kcb->jprobe_saved_regs.u_regs[UREG_FP]; | ||
462 | __asm__ __volatile__("\n" | ||
463 | "1: cmp %%sp, %0\n\t" | ||
464 | "blu,a,pt %%xcc, 1b\n\t" | ||
465 | " restore\n\t" | ||
466 | ".globl jprobe_return_trap_instruction\n" | ||
455 | "jprobe_return_trap_instruction:\n\t" | 467 | "jprobe_return_trap_instruction:\n\t" |
456 | "ta 0x70"); | 468 | "ta 0x70" |
469 | : /* no outputs */ | ||
470 | : "r" (orig_fp)); | ||
457 | } | 471 | } |
458 | 472 | ||
459 | extern void jprobe_return_trap_instruction(void); | 473 | extern void jprobe_return_trap_instruction(void); |
@@ -466,26 +480,7 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
466 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 480 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
467 | 481 | ||
468 | if (addr == (u32 *) jprobe_return_trap_instruction) { | 482 | if (addr == (u32 *) jprobe_return_trap_instruction) { |
469 | if (kcb->jprobe_saved_regs_location != regs) { | ||
470 | printk("JPROBE: Current regs (%p) does not match " | ||
471 | "saved regs (%p).\n", | ||
472 | regs, kcb->jprobe_saved_regs_location); | ||
473 | printk("JPROBE: Saved registers\n"); | ||
474 | __show_regs(kcb->jprobe_saved_regs_location); | ||
475 | printk("JPROBE: Current registers\n"); | ||
476 | __show_regs(regs); | ||
477 | BUG(); | ||
478 | } | ||
479 | /* Restore old register state. Do pt_regs | ||
480 | * first so that UREG_FP is the original one for | ||
481 | * the stack frame restore. | ||
482 | */ | ||
483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); | 483 | memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); |
484 | |||
485 | memcpy((char *) (regs->u_regs[UREG_FP] + STACK_BIAS), | ||
486 | &(kcb->jprobe_saved_stack), | ||
487 | sizeof(kcb->jprobe_saved_stack)); | ||
488 | |||
489 | preempt_enable_no_resched(); | 484 | preempt_enable_no_resched(); |
490 | return 1; | 485 | return 1; |
491 | } | 486 | } |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 8cc14fc6b6f1..cec0eceae552 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -1007,10 +1007,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
1007 | { | 1007 | { |
1008 | struct of_device *dev; | 1008 | struct of_device *dev; |
1009 | 1009 | ||
1010 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 1010 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
1011 | if (!dev) | 1011 | if (!dev) |
1012 | return NULL; | 1012 | return NULL; |
1013 | memset(dev, 0, sizeof(*dev)); | ||
1014 | 1013 | ||
1015 | dev->dev.parent = parent; | 1014 | dev->dev.parent = parent; |
1016 | dev->dev.bus = bus; | 1015 | dev->dev.bus = bus; |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 03ad4c06758e..6b04794b7a97 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -798,7 +798,7 @@ static struct pci_ops pci_sun4v_ops = { | |||
798 | static void pbm_scan_bus(struct pci_controller_info *p, | 798 | static void pbm_scan_bus(struct pci_controller_info *p, |
799 | struct pci_pbm_info *pbm) | 799 | struct pci_pbm_info *pbm) |
800 | { | 800 | { |
801 | struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); | 801 | struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); |
802 | 802 | ||
803 | if (!cookie) { | 803 | if (!cookie) { |
804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); | 804 | prom_printf("%s: Critical allocation failure.\n", pbm->name); |
@@ -806,7 +806,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, | |||
806 | } | 806 | } |
807 | 807 | ||
808 | /* All we care about is the PBM. */ | 808 | /* All we care about is the PBM. */ |
809 | memset(cookie, 0, sizeof(*cookie)); | ||
810 | cookie->pbm = pbm; | 809 | cookie->pbm = pbm; |
811 | 810 | ||
812 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); | 811 | pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, p->pci_ops, pbm); |
@@ -1048,12 +1047,11 @@ static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | |||
1048 | /* Allocate and initialize the free area map. */ | 1047 | /* Allocate and initialize the free area map. */ |
1049 | sz = num_tsb_entries / 8; | 1048 | sz = num_tsb_entries / 8; |
1050 | sz = (sz + 7UL) & ~7UL; | 1049 | sz = (sz + 7UL) & ~7UL; |
1051 | iommu->arena.map = kmalloc(sz, GFP_KERNEL); | 1050 | iommu->arena.map = kzalloc(sz, GFP_KERNEL); |
1052 | if (!iommu->arena.map) { | 1051 | if (!iommu->arena.map) { |
1053 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); | 1052 | prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); |
1054 | prom_halt(); | 1053 | prom_halt(); |
1055 | } | 1054 | } |
1056 | memset(iommu->arena.map, 0, sz); | ||
1057 | iommu->arena.limit = num_tsb_entries; | 1055 | iommu->arena.limit = num_tsb_entries; |
1058 | 1056 | ||
1059 | sz = probe_existing_entries(pbm, iommu); | 1057 | sz = probe_existing_entries(pbm, iommu); |
@@ -1164,24 +1162,20 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) | |||
1164 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; | 1162 | per_cpu(pci_iommu_batch, i).pglist = (u64 *) page; |
1165 | } | 1163 | } |
1166 | 1164 | ||
1167 | p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); | 1165 | p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); |
1168 | if (!p) | 1166 | if (!p) |
1169 | goto fatal_memory_error; | 1167 | goto fatal_memory_error; |
1170 | 1168 | ||
1171 | memset(p, 0, sizeof(*p)); | 1169 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1172 | |||
1173 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | ||
1174 | if (!iommu) | 1170 | if (!iommu) |
1175 | goto fatal_memory_error; | 1171 | goto fatal_memory_error; |
1176 | 1172 | ||
1177 | memset(iommu, 0, sizeof(*iommu)); | ||
1178 | p->pbm_A.iommu = iommu; | 1173 | p->pbm_A.iommu = iommu; |
1179 | 1174 | ||
1180 | iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); | 1175 | iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC); |
1181 | if (!iommu) | 1176 | if (!iommu) |
1182 | goto fatal_memory_error; | 1177 | goto fatal_memory_error; |
1183 | 1178 | ||
1184 | memset(iommu, 0, sizeof(*iommu)); | ||
1185 | p->pbm_B.iommu = iommu; | 1179 | p->pbm_B.iommu = iommu; |
1186 | 1180 | ||
1187 | p->next = pci_controller_root; | 1181 | p->next = pci_controller_root; |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index d31975e6d6f6..81111a12f0a8 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -202,7 +202,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
202 | #endif | 202 | #endif |
203 | if (request == PTRACE_TRACEME) { | 203 | if (request == PTRACE_TRACEME) { |
204 | ret = ptrace_traceme(); | 204 | ret = ptrace_traceme(); |
205 | pt_succ_return(regs, 0); | 205 | if (ret < 0) |
206 | pt_error_return(regs, -ret); | ||
207 | else | ||
208 | pt_succ_return(regs, 0); | ||
206 | goto out; | 209 | goto out; |
207 | } | 210 | } |
208 | 211 | ||
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 3522cd66f3bb..079d18a11d24 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -165,14 +165,26 @@ rtrap: | |||
165 | __handle_softirq_continue: | 165 | __handle_softirq_continue: |
166 | rtrap_xcall: | 166 | rtrap_xcall: |
167 | sethi %hi(0xf << 20), %l4 | 167 | sethi %hi(0xf << 20), %l4 |
168 | andcc %l1, TSTATE_PRIV, %l3 | ||
169 | and %l1, %l4, %l4 | 168 | and %l1, %l4, %l4 |
169 | andn %l1, %l4, %l1 | ||
170 | srl %l4, 20, %l4 | ||
171 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
172 | brnz,pn %l4, rtrap_no_irq_enable | ||
173 | nop | ||
174 | call trace_hardirqs_on | ||
175 | nop | ||
176 | wrpr %l4, %pil | ||
177 | rtrap_no_irq_enable: | ||
178 | #endif | ||
179 | andcc %l1, TSTATE_PRIV, %l3 | ||
170 | bne,pn %icc, to_kernel | 180 | bne,pn %icc, to_kernel |
171 | andn %l1, %l4, %l1 | 181 | nop |
172 | 182 | ||
173 | /* We must hold IRQs off and atomically test schedule+signal | 183 | /* We must hold IRQs off and atomically test schedule+signal |
174 | * state, then hold them off all the way back to userspace. | 184 | * state, then hold them off all the way back to userspace. |
175 | * If we are returning to kernel, none of this matters. | 185 | * If we are returning to kernel, none of this matters. Note |
186 | * that we are disabling interrupts via PSTATE_IE, not using | ||
187 | * %pil. | ||
176 | * | 188 | * |
177 | * If we do not do this, there is a window where we would do | 189 | * If we do not do this, there is a window where we would do |
178 | * the tests, later the signal/resched event arrives but we do | 190 | * the tests, later the signal/resched event arrives but we do |
@@ -256,7 +268,6 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
256 | 268 | ||
257 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 | 269 | ld [%sp + PTREGS_OFF + PT_V9_Y], %o3 |
258 | wr %o3, %g0, %y | 270 | wr %o3, %g0, %y |
259 | srl %l4, 20, %l4 | ||
260 | wrpr %l4, 0x0, %pil | 271 | wrpr %l4, 0x0, %pil |
261 | wrpr %g0, 0x1, %tl | 272 | wrpr %g0, 0x1, %tl |
262 | wrpr %l1, %g0, %tstate | 273 | wrpr %l1, %g0, %tstate |
@@ -374,8 +385,8 @@ to_kernel: | |||
374 | ldx [%g6 + TI_FLAGS], %l5 | 385 | ldx [%g6 + TI_FLAGS], %l5 |
375 | andcc %l5, _TIF_NEED_RESCHED, %g0 | 386 | andcc %l5, _TIF_NEED_RESCHED, %g0 |
376 | be,pt %xcc, kern_fpucheck | 387 | be,pt %xcc, kern_fpucheck |
377 | srl %l4, 20, %l5 | 388 | nop |
378 | cmp %l5, 0 | 389 | cmp %l4, 0 |
379 | bne,pn %xcc, kern_fpucheck | 390 | bne,pn %xcc, kern_fpucheck |
380 | sethi %hi(PREEMPT_ACTIVE), %l6 | 391 | sethi %hi(PREEMPT_ACTIVE), %l6 |
381 | stw %l6, [%g6 + TI_PRE_COUNT] | 392 | stw %l6, [%g6 + TI_PRE_COUNT] |
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c new file mode 100644 index 000000000000..c4d15f2762b9 --- /dev/null +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include <linux/sched.h> | ||
2 | #include <linux/stacktrace.h> | ||
3 | #include <linux/thread_info.h> | ||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | ||
7 | { | ||
8 | unsigned long ksp, fp, thread_base; | ||
9 | struct thread_info *tp; | ||
10 | |||
11 | if (!task) | ||
12 | task = current; | ||
13 | tp = task_thread_info(task); | ||
14 | if (task == current) { | ||
15 | flushw_all(); | ||
16 | __asm__ __volatile__( | ||
17 | "mov %%fp, %0" | ||
18 | : "=r" (ksp) | ||
19 | ); | ||
20 | } else | ||
21 | ksp = tp->ksp; | ||
22 | |||
23 | fp = ksp + STACK_BIAS; | ||
24 | thread_base = (unsigned long) tp; | ||
25 | do { | ||
26 | struct reg_window *rw; | ||
27 | |||
28 | /* Bogus frame pointer? */ | ||
29 | if (fp < (thread_base + sizeof(struct thread_info)) || | ||
30 | fp >= (thread_base + THREAD_SIZE)) | ||
31 | break; | ||
32 | |||
33 | rw = (struct reg_window *) fp; | ||
34 | if (trace->skip > 0) | ||
35 | trace->skip--; | ||
36 | else | ||
37 | trace->entries[trace->nr_entries++] = rw->ins[7]; | ||
38 | |||
39 | fp = rw->ins[6] + STACK_BIAS; | ||
40 | } while (trace->nr_entries < trace->max_entries); | ||
41 | } | ||
diff --git a/arch/sparc64/kernel/sun4v_ivec.S b/arch/sparc64/kernel/sun4v_ivec.S index 49703c3c5769..405855dd886b 100644 --- a/arch/sparc64/kernel/sun4v_ivec.S +++ b/arch/sparc64/kernel/sun4v_ivec.S | |||
@@ -190,7 +190,10 @@ sun4v_res_mondo: | |||
190 | mov %g1, %g4 | 190 | mov %g1, %g4 |
191 | ba,pt %xcc, etrap_irq | 191 | ba,pt %xcc, etrap_irq |
192 | rd %pc, %g7 | 192 | rd %pc, %g7 |
193 | 193 | #ifdef CONFIG_TRACE_IRQFLAGS | |
194 | call trace_hardirqs_off | ||
195 | nop | ||
196 | #endif | ||
194 | /* Log the event. */ | 197 | /* Log the event. */ |
195 | add %sp, PTREGS_OFF, %o0 | 198 | add %sp, PTREGS_OFF, %o0 |
196 | call sun4v_resum_error | 199 | call sun4v_resum_error |
@@ -216,7 +219,10 @@ sun4v_res_mondo_queue_full: | |||
216 | wrpr %g0, 15, %pil | 219 | wrpr %g0, 15, %pil |
217 | ba,pt %xcc, etrap_irq | 220 | ba,pt %xcc, etrap_irq |
218 | rd %pc, %g7 | 221 | rd %pc, %g7 |
219 | 222 | #ifdef CONFIG_TRACE_IRQFLAGS | |
223 | call trace_hardirqs_off | ||
224 | nop | ||
225 | #endif | ||
220 | call sun4v_resum_overflow | 226 | call sun4v_resum_overflow |
221 | add %sp, PTREGS_OFF, %o0 | 227 | add %sp, PTREGS_OFF, %o0 |
222 | 228 | ||
@@ -295,7 +301,10 @@ sun4v_nonres_mondo: | |||
295 | mov %g1, %g4 | 301 | mov %g1, %g4 |
296 | ba,pt %xcc, etrap_irq | 302 | ba,pt %xcc, etrap_irq |
297 | rd %pc, %g7 | 303 | rd %pc, %g7 |
298 | 304 | #ifdef CONFIG_TRACE_IRQFLAGS | |
305 | call trace_hardirqs_off | ||
306 | nop | ||
307 | #endif | ||
299 | /* Log the event. */ | 308 | /* Log the event. */ |
300 | add %sp, PTREGS_OFF, %o0 | 309 | add %sp, PTREGS_OFF, %o0 |
301 | call sun4v_nonresum_error | 310 | call sun4v_nonresum_error |
@@ -321,7 +330,10 @@ sun4v_nonres_mondo_queue_full: | |||
321 | wrpr %g0, 15, %pil | 330 | wrpr %g0, 15, %pil |
322 | ba,pt %xcc, etrap_irq | 331 | ba,pt %xcc, etrap_irq |
323 | rd %pc, %g7 | 332 | rd %pc, %g7 |
324 | 333 | #ifdef CONFIG_TRACE_IRQFLAGS | |
334 | call trace_hardirqs_off | ||
335 | nop | ||
336 | #endif | ||
325 | call sun4v_nonresum_overflow | 337 | call sun4v_nonresum_overflow |
326 | add %sp, PTREGS_OFF, %o0 | 338 | add %sp, PTREGS_OFF, %o0 |
327 | 339 | ||
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 7da72d3b322a..4446f66590fa 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c | |||
@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of | |||
83 | file = fget(fd); | 83 | file = fget(fd); |
84 | if (!file) | 84 | if (!file) |
85 | goto out; | 85 | goto out; |
86 | inode = file->f_dentry->d_inode; | 86 | inode = file->f_path.dentry->d_inode; |
87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { | 87 | if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { |
88 | flags |= MAP_ANONYMOUS; | 88 | flags |= MAP_ANONYMOUS; |
89 | fput(file); | 89 | fput(file); |
@@ -615,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) | |||
615 | if (!file) | 615 | if (!file) |
616 | return 0; | 616 | return 0; |
617 | 617 | ||
618 | inode = file->f_dentry->d_inode; | 618 | inode = file->f_path.dentry->d_inode; |
619 | 619 | ||
620 | socket = SOCKET_I(inode); | 620 | socket = SOCKET_I(inode); |
621 | local.sin_family = AF_INET; | 621 | local.sin_family = AF_INET; |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index fe1796c939c3..ad67784292db 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> /* for jiffies */ | 13 | #include <linux/sched.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
@@ -1873,6 +1873,16 @@ void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) | |||
1873 | 1873 | ||
1874 | put_cpu(); | 1874 | put_cpu(); |
1875 | 1875 | ||
1876 | if (ent->err_type == SUN4V_ERR_TYPE_WARNING_RES) { | ||
1877 | /* If err_type is 0x4, it's a powerdown request. Do | ||
1878 | * not do the usual resumable error log because that | ||
1879 | * makes it look like some abnormal error. | ||
1880 | */ | ||
1881 | printk(KERN_INFO "Power down request...\n"); | ||
1882 | kill_cad_pid(SIGINT, 1); | ||
1883 | return; | ||
1884 | } | ||
1885 | |||
1876 | sun4v_log_error(regs, &local_copy, cpu, | 1886 | sun4v_log_error(regs, &local_copy, cpu, |
1877 | KERN_ERR "RESUMABLE ERROR", | 1887 | KERN_ERR "RESUMABLE ERROR", |
1878 | &sun4v_resum_oflow_cnt); | 1888 | &sun4v_resum_oflow_cnt); |
@@ -2261,8 +2271,12 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2261 | do_exit(SIGSEGV); | 2271 | do_exit(SIGSEGV); |
2262 | } | 2272 | } |
2263 | 2273 | ||
2274 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
2275 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
2276 | |||
2264 | extern int handle_popc(u32 insn, struct pt_regs *regs); | 2277 | extern int handle_popc(u32 insn, struct pt_regs *regs); |
2265 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); | 2278 | extern int handle_ldf_stq(u32 insn, struct pt_regs *regs); |
2279 | extern int vis_emul(struct pt_regs *, unsigned int); | ||
2266 | 2280 | ||
2267 | void do_illegal_instruction(struct pt_regs *regs) | 2281 | void do_illegal_instruction(struct pt_regs *regs) |
2268 | { | 2282 | { |
@@ -2287,10 +2301,18 @@ void do_illegal_instruction(struct pt_regs *regs) | |||
2287 | if (handle_ldf_stq(insn, regs)) | 2301 | if (handle_ldf_stq(insn, regs)) |
2288 | return; | 2302 | return; |
2289 | } else if (tlb_type == hypervisor) { | 2303 | } else if (tlb_type == hypervisor) { |
2290 | extern int vis_emul(struct pt_regs *, unsigned int); | 2304 | if ((insn & VIS_OPCODE_MASK) == VIS_OPCODE_VAL) { |
2305 | if (!vis_emul(regs, insn)) | ||
2306 | return; | ||
2307 | } else { | ||
2308 | struct fpustate *f = FPUSTATE; | ||
2291 | 2309 | ||
2292 | if (!vis_emul(regs, insn)) | 2310 | /* XXX maybe verify XFSR bits like |
2293 | return; | 2311 | * XXX do_fpother() does? |
2312 | */ | ||
2313 | if (do_mathemu(regs, f)) | ||
2314 | return; | ||
2315 | } | ||
2294 | } | 2316 | } |
2295 | } | 2317 | } |
2296 | info.si_signo = SIGILL; | 2318 | info.si_signo = SIGILL; |
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index a9b765271b85..bc18d480dd1c 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -243,7 +243,7 @@ static inline int ok_for_kernel(unsigned int insn) | |||
243 | return !floating_point_load_or_store_p(insn); | 243 | return !floating_point_load_or_store_p(insn); |
244 | } | 244 | } |
245 | 245 | ||
246 | static void kernel_mna_trap_fault(void) | 246 | static void kernel_mna_trap_fault(int fixup_tstate_asi) |
247 | { | 247 | { |
248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; | 248 | struct pt_regs *regs = current_thread_info()->kern_una_regs; |
249 | unsigned int insn = current_thread_info()->kern_una_insn; | 249 | unsigned int insn = current_thread_info()->kern_una_insn; |
@@ -274,18 +274,15 @@ static void kernel_mna_trap_fault(void) | |||
274 | regs->tpc = entry->fixup; | 274 | regs->tpc = entry->fixup; |
275 | regs->tnpc = regs->tpc + 4; | 275 | regs->tnpc = regs->tpc + 4; |
276 | 276 | ||
277 | regs->tstate &= ~TSTATE_ASI; | 277 | if (fixup_tstate_asi) { |
278 | regs->tstate |= (ASI_AIUS << 24UL); | 278 | regs->tstate &= ~TSTATE_ASI; |
279 | regs->tstate |= (ASI_AIUS << 24UL); | ||
280 | } | ||
279 | } | 281 | } |
280 | 282 | ||
281 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | 283 | static void log_unaligned(struct pt_regs *regs) |
282 | { | 284 | { |
283 | static unsigned long count, last_time; | 285 | static unsigned long count, last_time; |
284 | enum direction dir = decode_direction(insn); | ||
285 | int size = decode_access_size(insn); | ||
286 | |||
287 | current_thread_info()->kern_una_regs = regs; | ||
288 | current_thread_info()->kern_una_insn = insn; | ||
289 | 286 | ||
290 | if (jiffies - last_time > 5 * HZ) | 287 | if (jiffies - last_time > 5 * HZ) |
291 | count = 0; | 288 | count = 0; |
@@ -295,6 +292,28 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
295 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); | 292 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); |
296 | print_symbol("%s\n", regs->tpc); | 293 | print_symbol("%s\n", regs->tpc); |
297 | } | 294 | } |
295 | } | ||
296 | |||
297 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | ||
298 | { | ||
299 | enum direction dir = decode_direction(insn); | ||
300 | int size = decode_access_size(insn); | ||
301 | int orig_asi, asi; | ||
302 | |||
303 | current_thread_info()->kern_una_regs = regs; | ||
304 | current_thread_info()->kern_una_insn = insn; | ||
305 | |||
306 | orig_asi = asi = decode_asi(insn, regs); | ||
307 | |||
308 | /* If this is a {get,put}_user() on an unaligned userspace pointer, | ||
309 | * just signal a fault and do not log the event. | ||
310 | */ | ||
311 | if (asi == ASI_AIUS) { | ||
312 | kernel_mna_trap_fault(0); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | log_unaligned(regs); | ||
298 | 317 | ||
299 | if (!ok_for_kernel(insn) || dir == both) { | 318 | if (!ok_for_kernel(insn) || dir == both) { |
300 | printk("Unsupported unaligned load/store trap for kernel " | 319 | printk("Unsupported unaligned load/store trap for kernel " |
@@ -302,10 +321,10 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
302 | unaligned_panic("Kernel does fpu/atomic " | 321 | unaligned_panic("Kernel does fpu/atomic " |
303 | "unaligned load/store.", regs); | 322 | "unaligned load/store.", regs); |
304 | 323 | ||
305 | kernel_mna_trap_fault(); | 324 | kernel_mna_trap_fault(0); |
306 | } else { | 325 | } else { |
307 | unsigned long addr, *reg_addr; | 326 | unsigned long addr, *reg_addr; |
308 | int orig_asi, asi, err; | 327 | int err; |
309 | 328 | ||
310 | addr = compute_effective_address(regs, insn, | 329 | addr = compute_effective_address(regs, insn, |
311 | ((insn >> 25) & 0x1f)); | 330 | ((insn >> 25) & 0x1f)); |
@@ -315,7 +334,6 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
315 | regs->tpc, dirstrings[dir], addr, size, | 334 | regs->tpc, dirstrings[dir], addr, size, |
316 | regs->u_regs[UREG_RETPC]); | 335 | regs->u_regs[UREG_RETPC]); |
317 | #endif | 336 | #endif |
318 | orig_asi = asi = decode_asi(insn, regs); | ||
319 | switch (asi) { | 337 | switch (asi) { |
320 | case ASI_NL: | 338 | case ASI_NL: |
321 | case ASI_AIUPL: | 339 | case ASI_AIUPL: |
@@ -365,7 +383,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) | |||
365 | /* Not reached... */ | 383 | /* Not reached... */ |
366 | } | 384 | } |
367 | if (unlikely(err)) | 385 | if (unlikely(err)) |
368 | kernel_mna_trap_fault(); | 386 | kernel_mna_trap_fault(1); |
369 | else | 387 | else |
370 | advance(regs); | 388 | advance(regs); |
371 | } | 389 | } |
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 84fedaa38aae..c3fd64706b53 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/arch/sparc64/kernel/visemul.c | |||
@@ -128,9 +128,6 @@ | |||
128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ | 128 | /* 001001100 - Permute bytes as specified by GSR.MASK */ |
129 | #define BSHUFFLE_OPF 0x04c | 129 | #define BSHUFFLE_OPF 0x04c |
130 | 130 | ||
131 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | ||
132 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | ||
133 | |||
134 | #define VIS_OPF_SHIFT 5 | 131 | #define VIS_OPF_SHIFT 5 |
135 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) | 132 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) |
136 | 133 | ||
@@ -810,9 +807,6 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) | |||
810 | if (get_user(insn, (u32 __user *) pc)) | 807 | if (get_user(insn, (u32 __user *) pc)) |
811 | return -EFAULT; | 808 | return -EFAULT; |
812 | 809 | ||
813 | if ((insn & VIS_OPCODE_MASK) != VIS_OPCODE_VAL) | ||
814 | return -EINVAL; | ||
815 | |||
816 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; | 810 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; |
817 | switch (opf) { | 811 | switch (opf) { |
818 | default: | 812 | default: |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index d70b60a3bbcc..737c26923c09 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -477,6 +477,10 @@ xcall_sync_tick: | |||
477 | sethi %hi(109f), %g7 | 477 | sethi %hi(109f), %g7 |
478 | b,pt %xcc, etrap_irq | 478 | b,pt %xcc, etrap_irq |
479 | 109: or %g7, %lo(109b), %g7 | 479 | 109: or %g7, %lo(109b), %g7 |
480 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
481 | call trace_hardirqs_off | ||
482 | nop | ||
483 | #endif | ||
480 | call smp_synchronize_tick_client | 484 | call smp_synchronize_tick_client |
481 | nop | 485 | nop |
482 | clr %l6 | 486 | clr %l6 |
@@ -508,6 +512,10 @@ xcall_report_regs: | |||
508 | sethi %hi(109f), %g7 | 512 | sethi %hi(109f), %g7 |
509 | b,pt %xcc, etrap_irq | 513 | b,pt %xcc, etrap_irq |
510 | 109: or %g7, %lo(109b), %g7 | 514 | 109: or %g7, %lo(109b), %g7 |
515 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
516 | call trace_hardirqs_off | ||
517 | nop | ||
518 | #endif | ||
511 | call __show_regs | 519 | call __show_regs |
512 | add %sp, PTREGS_OFF, %o0 | 520 | add %sp, PTREGS_OFF, %o0 |
513 | clr %l6 | 521 | clr %l6 |
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index 12a940cc791f..61be597bf430 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c | |||
@@ -449,7 +449,7 @@ asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf) | |||
449 | error = -EBADF; | 449 | error = -EBADF; |
450 | file = fget(fd); | 450 | file = fget(fd); |
451 | if (file) { | 451 | if (file) { |
452 | error = report_statvfs(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 452 | error = report_statvfs(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
453 | fput(file); | 453 | fput(file); |
454 | } | 454 | } |
455 | 455 | ||
@@ -481,7 +481,7 @@ asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf) | |||
481 | file = fget(fd); | 481 | file = fget(fd); |
482 | if (file) { | 482 | if (file) { |
483 | lock_kernel(); | 483 | lock_kernel(); |
484 | error = report_statvfs64(file->f_vfsmnt, file->f_dentry->d_inode, buf); | 484 | error = report_statvfs64(file->f_path.mnt, file->f_path.dentry->d_inode, buf); |
485 | unlock_kernel(); | 485 | unlock_kernel(); |
486 | fput(file); | 486 | fput(file); |
487 | } | 487 | } |
diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index be0a054e3ed6..330743c5b3d8 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c | |||
@@ -299,8 +299,8 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) | |||
299 | rcu_read_lock(); | 299 | rcu_read_lock(); |
300 | fdt = files_fdtable(current->files); | 300 | fdt = files_fdtable(current->files); |
301 | if (! fdt->fd[fd] || | 301 | if (! fdt->fd[fd] || |
302 | ! fdt->fd[fd]->f_dentry || | 302 | ! fdt->fd[fd]->f_path.dentry || |
303 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || | 303 | ! (ino = fdt->fd[fd]->f_path.dentry->d_inode) || |
304 | ! S_ISSOCK(ino->i_mode)) { | 304 | ! S_ISSOCK(ino->i_mode)) { |
305 | rcu_read_unlock(); | 305 | rcu_read_unlock(); |
306 | return TBADF; | 306 | return TBADF; |
@@ -480,7 +480,7 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd | |||
480 | struct sol_socket_struct *sock; | 480 | struct sol_socket_struct *sock; |
481 | struct module_info *mi; | 481 | struct module_info *mi; |
482 | 482 | ||
483 | ino = filp->f_dentry->d_inode; | 483 | ino = filp->f_path.dentry->d_inode; |
484 | if (!S_ISSOCK(ino->i_mode)) | 484 | if (!S_ISSOCK(ino->i_mode)) |
485 | return -EBADF; | 485 | return -EBADF; |
486 | sock = filp->private_data; | 486 | sock = filp->private_data; |
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 9ed997982f8d..bca16e8c95c3 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c | |||
@@ -77,7 +77,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o | |||
77 | if (!file) | 77 | if (!file) |
78 | goto out; | 78 | goto out; |
79 | else { | 79 | else { |
80 | struct inode * inode = file->f_dentry->d_inode; | 80 | struct inode * inode = file->f_path.dentry->d_inode; |
81 | if(imajor(inode) == MEM_MAJOR && | 81 | if(imajor(inode) == MEM_MAJOR && |
82 | iminor(inode) == 5) { | 82 | iminor(inode) == 5) { |
83 | flags |= MAP_ANONYMOUS; | 83 | flags |= MAP_ANONYMOUS; |
@@ -423,9 +423,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) | |||
423 | Solaris setpgrp and setsid? */ | 423 | Solaris setpgrp and setsid? */ |
424 | ret = sys_setpgid(0, 0); | 424 | ret = sys_setpgid(0, 0); |
425 | if (ret) return ret; | 425 | if (ret) return ret; |
426 | mutex_lock(&tty_mutex); | 426 | proc_clear_tty(current); |
427 | current->signal->tty = NULL; | ||
428 | mutex_unlock(&tty_mutex); | ||
429 | return process_group(current); | 427 | return process_group(current); |
430 | } | 428 | } |
431 | case 2: /* getsid */ | 429 | case 2: /* getsid */ |
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index 7c90e41fd3be..89a4757f192f 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c | |||
@@ -96,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp) | |||
96 | * No shit. WTF is it supposed to do, anyway? | 96 | * No shit. WTF is it supposed to do, anyway? |
97 | * | 97 | * |
98 | * Try instead: | 98 | * Try instead: |
99 | * d_delete(filp->f_dentry), then d_instantiate with sock inode | 99 | * d_delete(filp->f_path.dentry), then d_instantiate with sock inode |
100 | */ | 100 | */ |
101 | dentry = filp->f_dentry; | 101 | dentry = filp->f_path.dentry; |
102 | filp->f_dentry = dget(fcheck(fd)->f_dentry); | 102 | filp->f_path.dentry = dget(fcheck(fd)->f_path.dentry); |
103 | filp->f_dentry->d_inode->i_rdev = inode->i_rdev; | 103 | filp->f_path.dentry->d_inode->i_rdev = inode->i_rdev; |
104 | filp->f_dentry->d_inode->i_flock = inode->i_flock; | 104 | filp->f_path.dentry->d_inode->i_flock = inode->i_flock; |
105 | SOCKET_I(filp->f_dentry->d_inode)->file = filp; | 105 | SOCKET_I(filp->f_path.dentry->d_inode)->file = filp; |
106 | filp->f_op = &socksys_file_ops; | 106 | filp->f_op = &socksys_file_ops; |
107 | sock = (struct sol_socket_struct*) | 107 | sock = (struct sol_socket_struct*) |
108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); | 108 | mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); |
@@ -148,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait) | |||
148 | struct inode *ino; | 148 | struct inode *ino; |
149 | unsigned int mask = 0; | 149 | unsigned int mask = 0; |
150 | 150 | ||
151 | ino=filp->f_dentry->d_inode; | 151 | ino=filp->f_path.dentry->d_inode; |
152 | if (ino && S_ISSOCK(ino->i_mode)) { | 152 | if (ino && S_ISSOCK(ino->i_mode)) { |
153 | struct sol_socket_struct *sock; | 153 | struct sol_socket_struct *sock; |
154 | sock = (struct sol_socket_struct*)filp->private_data; | 154 | sock = (struct sol_socket_struct*)filp->private_data; |
diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c index b84e5456b025..a9d32ceabf26 100644 --- a/arch/sparc64/solaris/timod.c +++ b/arch/sparc64/solaris/timod.c | |||
@@ -147,7 +147,7 @@ static void timod_wake_socket(unsigned int fd) | |||
147 | 147 | ||
148 | SOLD("wakeing socket"); | 148 | SOLD("wakeing socket"); |
149 | fdt = files_fdtable(current->files); | 149 | fdt = files_fdtable(current->files); |
150 | sock = SOCKET_I(fdt->fd[fd]->f_dentry->d_inode); | 150 | sock = SOCKET_I(fdt->fd[fd]->f_path.dentry->d_inode); |
151 | wake_up_interruptible(&sock->wait); | 151 | wake_up_interruptible(&sock->wait); |
152 | read_lock(&sock->sk->sk_callback_lock); | 152 | read_lock(&sock->sk->sk_callback_lock); |
153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) | 153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) |
@@ -361,7 +361,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, | |||
361 | 361 | ||
362 | fdt = files_fdtable(current->files); | 362 | fdt = files_fdtable(current->files); |
363 | filp = fdt->fd[fd]; | 363 | filp = fdt->fd[fd]; |
364 | ino = filp->f_dentry->d_inode; | 364 | ino = filp->f_path.dentry->d_inode; |
365 | sock = (struct sol_socket_struct *)filp->private_data; | 365 | sock = (struct sol_socket_struct *)filp->private_data; |
366 | SOLD("entry"); | 366 | SOLD("entry"); |
367 | if (get_user(ret, (int __user *)A(ctl_buf))) | 367 | if (get_user(ret, (int __user *)A(ctl_buf))) |
@@ -644,7 +644,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us | |||
644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); | 644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); |
645 | fdt = files_fdtable(current->files); | 645 | fdt = files_fdtable(current->files); |
646 | filp = fdt->fd[fd]; | 646 | filp = fdt->fd[fd]; |
647 | ino = filp->f_dentry->d_inode; | 647 | ino = filp->f_path.dentry->d_inode; |
648 | sock = (struct sol_socket_struct *)filp->private_data; | 648 | sock = (struct sol_socket_struct *)filp->private_data; |
649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); | 649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); |
650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM | 650 | if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM |
@@ -865,7 +865,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
865 | filp = fdt->fd[fd]; | 865 | filp = fdt->fd[fd]; |
866 | if(!filp) goto out; | 866 | if(!filp) goto out; |
867 | 867 | ||
868 | ino = filp->f_dentry->d_inode; | 868 | ino = filp->f_path.dentry->d_inode; |
869 | if (!ino || !S_ISSOCK(ino->i_mode)) | 869 | if (!ino || !S_ISSOCK(ino->i_mode)) |
870 | goto out; | 870 | goto out; |
871 | 871 | ||
@@ -933,7 +933,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
933 | filp = fdt->fd[fd]; | 933 | filp = fdt->fd[fd]; |
934 | if(!filp) goto out; | 934 | if(!filp) goto out; |
935 | 935 | ||
936 | ino = filp->f_dentry->d_inode; | 936 | ino = filp->f_path.dentry->d_inode; |
937 | if (!ino) goto out; | 937 | if (!ino) goto out; |
938 | 938 | ||
939 | if (!S_ISSOCK(ino->i_mode) && | 939 | if (!S_ISSOCK(ino->i_mode) && |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 5ac1f2963ae3..d32a80e6668c 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -47,6 +47,11 @@ config GENERIC_CALIBRATE_DELAY | |||
47 | bool | 47 | bool |
48 | default y | 48 | default y |
49 | 49 | ||
50 | config GENERIC_BUG | ||
51 | bool | ||
52 | default y | ||
53 | depends on BUG | ||
54 | |||
50 | # Used in kernel/irq/manage.c and include/linux/irq.h | 55 | # Used in kernel/irq/manage.c and include/linux/irq.h |
51 | config IRQ_RELEASE_METHOD | 56 | config IRQ_RELEASE_METHOD |
52 | bool | 57 | bool |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index aa3090d05a8f..83301e1ef67c 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -246,7 +246,7 @@ out_up: | |||
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | 248 | ||
249 | void line_set_termios(struct tty_struct *tty, struct termios * old) | 249 | void line_set_termios(struct tty_struct *tty, struct ktermios * old) |
250 | { | 250 | { |
251 | /* nothing */ | 251 | /* nothing */ |
252 | } | 252 | } |
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 214ee76c40df..5f232ae89fbb 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -76,7 +76,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines, | |||
76 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, | 76 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, |
77 | int len); | 77 | int len); |
78 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); | 78 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); |
79 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); | 79 | extern void line_set_termios(struct tty_struct *tty, struct ktermios * old); |
80 | extern int line_chars_in_buffer(struct tty_struct *tty); | 80 | extern int line_chars_in_buffer(struct tty_struct *tty); |
81 | extern void line_flush_buffer(struct tty_struct *tty); | 81 | extern void line_flush_buffer(struct tty_struct *tty); |
82 | extern void line_flush_chars(struct tty_struct *tty); | 82 | extern void line_flush_chars(struct tty_struct *tty); |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 0561c43b4685..8d56ec6cca79 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -39,12 +39,13 @@ static long execve1(char *file, char __user * __user *argv, | |||
39 | char __user *__user *env) | 39 | char __user *__user *env) |
40 | { | 40 | { |
41 | long error; | 41 | long error; |
42 | struct tty_struct *tty; | ||
42 | 43 | ||
43 | #ifdef CONFIG_TTY_LOG | 44 | #ifdef CONFIG_TTY_LOG |
44 | mutex_lock(&tty_mutex); | 45 | mutex_lock(&tty_mutex); |
45 | task_lock(current); /* FIXME: is this needed ? */ | 46 | tty = get_current_tty(); |
46 | log_exec(argv, current->signal->tty); | 47 | if (tty) |
47 | task_unlock(current); | 48 | log_exec(argv, tty); |
48 | mutex_unlock(&tty_mutex); | 49 | mutex_unlock(&tty_mutex); |
49 | #endif | 50 | #endif |
50 | error = do_execve(file, argv, env, ¤t->thread.regs); | 51 | error = do_execve(file, argv, env, ¤t->thread.regs); |
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 0e32adf03be1..098720be019a 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y = bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | 1 | obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ |
2 | ptrace_user.o setjmp.o signal.o sigcontext.o syscalls.o sysrq.o \ | 2 | ptrace_user.o setjmp.o signal.o sigcontext.o syscalls.o sysrq.o \ |
3 | sys_call_table.o tls.o | 3 | sys_call_table.o tls.o |
4 | 4 | ||
diff --git a/arch/um/sys-i386/bug.c b/arch/um/sys-i386/bug.c new file mode 100644 index 000000000000..200c8ba2879b --- /dev/null +++ b/arch/um/sys-i386/bug.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL V2 | ||
4 | */ | ||
5 | |||
6 | #include <linux/uaccess.h> | ||
7 | |||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
9 | * that's not relevent in skas mode. | ||
10 | */ | ||
11 | |||
12 | int is_valid_bugaddr(unsigned long eip) | ||
13 | { | ||
14 | unsigned short ud2; | ||
15 | |||
16 | if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
17 | return 0; | ||
18 | |||
19 | return ud2 == 0x0b0f; | ||
20 | } | ||
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index f41768b8e25e..4d9e5efa6fb9 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # Licensed under the GPL | 4 | # Licensed under the GPL |
5 | # | 5 | # |
6 | 6 | ||
7 | obj-y = bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \ | 7 | obj-y = bug.o bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \ |
8 | setjmp.o sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o \ | 8 | setjmp.o sigcontext.o signal.o syscalls.o syscall_table.o sysrq.o \ |
9 | ksyms.o tls.o | 9 | ksyms.o tls.o |
10 | 10 | ||
diff --git a/arch/um/sys-x86_64/bug.c b/arch/um/sys-x86_64/bug.c new file mode 100644 index 000000000000..200c8ba2879b --- /dev/null +++ b/arch/um/sys-x86_64/bug.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL V2 | ||
4 | */ | ||
5 | |||
6 | #include <linux/uaccess.h> | ||
7 | |||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | ||
9 | * that's not relevent in skas mode. | ||
10 | */ | ||
11 | |||
12 | int is_valid_bugaddr(unsigned long eip) | ||
13 | { | ||
14 | unsigned short ud2; | ||
15 | |||
16 | if (probe_kernel_address((unsigned short __user *)eip, ud2)) | ||
17 | return 0; | ||
18 | |||
19 | return ud2 == 0x0b0f; | ||
20 | } | ||
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig index 37ec644603ab..bcf825875d17 100644 --- a/arch/v850/Kconfig +++ b/arch/v850/Kconfig | |||
@@ -38,6 +38,14 @@ config TIME_LOW_RES | |||
38 | bool | 38 | bool |
39 | default y | 39 | default y |
40 | 40 | ||
41 | config ARCH_HAS_ILOG2_U32 | ||
42 | bool | ||
43 | default n | ||
44 | |||
45 | config ARCH_HAS_ILOG2_U64 | ||
46 | bool | ||
47 | default n | ||
48 | |||
41 | # Turn off some random 386 crap that can affect device config | 49 | # Turn off some random 386 crap that can affect device config |
42 | config ISA | 50 | config ISA |
43 | bool | 51 | bool |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index bfbb9bcae123..d4275537b25b 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -96,6 +96,19 @@ config AUDIT_ARCH | |||
96 | bool | 96 | bool |
97 | default y | 97 | default y |
98 | 98 | ||
99 | config GENERIC_BUG | ||
100 | bool | ||
101 | default y | ||
102 | depends on BUG | ||
103 | |||
104 | config ARCH_HAS_ILOG2_U32 | ||
105 | bool | ||
106 | default n | ||
107 | |||
108 | config ARCH_HAS_ILOG2_U64 | ||
109 | bool | ||
110 | default n | ||
111 | |||
99 | source "init/Kconfig" | 112 | source "init/Kconfig" |
100 | 113 | ||
101 | 114 | ||
@@ -571,7 +584,7 @@ config SECCOMP | |||
571 | If unsure, say Y. Only embedded should say N here. | 584 | If unsure, say Y. Only embedded should say N here. |
572 | 585 | ||
573 | config CC_STACKPROTECTOR | 586 | config CC_STACKPROTECTOR |
574 | bool "Enable -fstack-protector buffer overflow detection (EXPRIMENTAL)" | 587 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" |
575 | depends on EXPERIMENTAL | 588 | depends on EXPERIMENTAL |
576 | help | 589 | help |
577 | This option turns on the -fstack-protector GCC feature. This | 590 | This option turns on the -fstack-protector GCC feature. This |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 96f226cfb339..1a1c6a1a299b 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-git7 | 3 | # Linux kernel version: 2.6.19-git14 |
4 | # Wed Dec 6 23:50:47 2006 | 4 | # Sat Dec 9 21:23:09 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -22,6 +22,9 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y | |||
22 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 22 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
23 | CONFIG_DMI=y | 23 | CONFIG_DMI=y |
24 | CONFIG_AUDIT_ARCH=y | 24 | CONFIG_AUDIT_ARCH=y |
25 | CONFIG_GENERIC_BUG=y | ||
26 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
27 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
25 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
26 | 29 | ||
27 | # | 30 | # |
@@ -170,6 +173,7 @@ CONFIG_SECCOMP=y | |||
170 | # CONFIG_CC_STACKPROTECTOR is not set | 173 | # CONFIG_CC_STACKPROTECTOR is not set |
171 | # CONFIG_HZ_100 is not set | 174 | # CONFIG_HZ_100 is not set |
172 | CONFIG_HZ_250=y | 175 | CONFIG_HZ_250=y |
176 | # CONFIG_HZ_300 is not set | ||
173 | # CONFIG_HZ_1000 is not set | 177 | # CONFIG_HZ_1000 is not set |
174 | CONFIG_HZ=250 | 178 | CONFIG_HZ=250 |
175 | # CONFIG_REORDER is not set | 179 | # CONFIG_REORDER is not set |
@@ -514,6 +518,7 @@ CONFIG_IDEDMA_AUTO=y | |||
514 | # | 518 | # |
515 | # CONFIG_RAID_ATTRS is not set | 519 | # CONFIG_RAID_ATTRS is not set |
516 | CONFIG_SCSI=y | 520 | CONFIG_SCSI=y |
521 | # CONFIG_SCSI_TGT is not set | ||
517 | CONFIG_SCSI_NETLINK=y | 522 | CONFIG_SCSI_NETLINK=y |
518 | # CONFIG_SCSI_PROC_FS is not set | 523 | # CONFIG_SCSI_PROC_FS is not set |
519 | 524 | ||
@@ -534,6 +539,7 @@ CONFIG_CHR_DEV_SG=y | |||
534 | # CONFIG_SCSI_MULTI_LUN is not set | 539 | # CONFIG_SCSI_MULTI_LUN is not set |
535 | CONFIG_SCSI_CONSTANTS=y | 540 | CONFIG_SCSI_CONSTANTS=y |
536 | # CONFIG_SCSI_LOGGING is not set | 541 | # CONFIG_SCSI_LOGGING is not set |
542 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
537 | 543 | ||
538 | # | 544 | # |
539 | # SCSI Transports | 545 | # SCSI Transports |
@@ -587,6 +593,7 @@ CONFIG_MEGARAID_SAS=y | |||
587 | # CONFIG_SCSI_DC395x is not set | 593 | # CONFIG_SCSI_DC395x is not set |
588 | # CONFIG_SCSI_DC390T is not set | 594 | # CONFIG_SCSI_DC390T is not set |
589 | # CONFIG_SCSI_DEBUG is not set | 595 | # CONFIG_SCSI_DEBUG is not set |
596 | # CONFIG_SCSI_SRP is not set | ||
590 | 597 | ||
591 | # | 598 | # |
592 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 599 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
@@ -1106,10 +1113,7 @@ CONFIG_SOUND=y | |||
1106 | # Open Sound System | 1113 | # Open Sound System |
1107 | # | 1114 | # |
1108 | CONFIG_SOUND_PRIME=y | 1115 | CONFIG_SOUND_PRIME=y |
1109 | CONFIG_OSS_OBSOLETE_DRIVER=y | ||
1110 | # CONFIG_SOUND_BT878 is not set | 1116 | # CONFIG_SOUND_BT878 is not set |
1111 | # CONFIG_SOUND_EMU10K1 is not set | ||
1112 | # CONFIG_SOUND_FUSION is not set | ||
1113 | # CONFIG_SOUND_ES1371 is not set | 1117 | # CONFIG_SOUND_ES1371 is not set |
1114 | CONFIG_SOUND_ICH=y | 1118 | CONFIG_SOUND_ICH=y |
1115 | # CONFIG_SOUND_TRIDENT is not set | 1119 | # CONFIG_SOUND_TRIDENT is not set |
@@ -1119,6 +1123,11 @@ CONFIG_SOUND_ICH=y | |||
1119 | # CONFIG_SOUND_OSS is not set | 1123 | # CONFIG_SOUND_OSS is not set |
1120 | 1124 | ||
1121 | # | 1125 | # |
1126 | # HID Devices | ||
1127 | # | ||
1128 | CONFIG_HID=y | ||
1129 | |||
1130 | # | ||
1122 | # USB support | 1131 | # USB support |
1123 | # | 1132 | # |
1124 | CONFIG_USB_ARCH_HAS_HCD=y | 1133 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -1182,8 +1191,7 @@ CONFIG_USB_STORAGE=y | |||
1182 | # USB Input Devices | 1191 | # USB Input Devices |
1183 | # | 1192 | # |
1184 | CONFIG_USB_HID=y | 1193 | CONFIG_USB_HID=y |
1185 | CONFIG_USB_HIDINPUT=y | 1194 | # CONFIG_USB_HID_POWERBOOK is not set |
1186 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1187 | # CONFIG_HID_FF is not set | 1195 | # CONFIG_HID_FF is not set |
1188 | # CONFIG_USB_HIDDEV is not set | 1196 | # CONFIG_USB_HIDDEV is not set |
1189 | # CONFIG_USB_AIPTEK is not set | 1197 | # CONFIG_USB_AIPTEK is not set |
@@ -1475,6 +1483,11 @@ CONFIG_NLS_ISO8859_15=y | |||
1475 | CONFIG_NLS_UTF8=y | 1483 | CONFIG_NLS_UTF8=y |
1476 | 1484 | ||
1477 | # | 1485 | # |
1486 | # Distributed Lock Manager | ||
1487 | # | ||
1488 | # CONFIG_DLM is not set | ||
1489 | |||
1490 | # | ||
1478 | # Instrumentation Support | 1491 | # Instrumentation Support |
1479 | # | 1492 | # |
1480 | CONFIG_PROFILING=y | 1493 | CONFIG_PROFILING=y |
@@ -1504,6 +1517,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1504 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1517 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1505 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1518 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1506 | # CONFIG_DEBUG_KOBJECT is not set | 1519 | # CONFIG_DEBUG_KOBJECT is not set |
1520 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1507 | # CONFIG_DEBUG_INFO is not set | 1521 | # CONFIG_DEBUG_INFO is not set |
1508 | CONFIG_DEBUG_FS=y | 1522 | CONFIG_DEBUG_FS=y |
1509 | # CONFIG_DEBUG_VM is not set | 1523 | # CONFIG_DEBUG_VM is not set |
@@ -1534,6 +1548,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y | |||
1534 | # | 1548 | # |
1535 | # Library routines | 1549 | # Library routines |
1536 | # | 1550 | # |
1551 | CONFIG_BITREVERSE=y | ||
1537 | # CONFIG_CRC_CCITT is not set | 1552 | # CONFIG_CRC_CCITT is not set |
1538 | # CONFIG_CRC16 is not set | 1553 | # CONFIG_CRC16 is not set |
1539 | CONFIG_CRC32=y | 1554 | CONFIG_CRC32=y |
diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c index 396d3c100011..be87df506f39 100644 --- a/arch/x86_64/ia32/ia32_aout.c +++ b/arch/x86_64/ia32/ia32_aout.c | |||
@@ -272,7 +272,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
272 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && | 272 | if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && |
273 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || | 273 | N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || |
274 | N_TRSIZE(ex) || N_DRSIZE(ex) || | 274 | N_TRSIZE(ex) || N_DRSIZE(ex) || |
275 | i_size_read(bprm->file->f_dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { | 275 | i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
276 | return -ENOEXEC; | 276 | return -ENOEXEC; |
277 | } | 277 | } |
278 | 278 | ||
@@ -357,7 +357,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
357 | { | 357 | { |
358 | printk(KERN_WARNING | 358 | printk(KERN_WARNING |
359 | "fd_offset is not page aligned. Please convert program: %s\n", | 359 | "fd_offset is not page aligned. Please convert program: %s\n", |
360 | bprm->file->f_dentry->d_name.name); | 360 | bprm->file->f_path.dentry->d_name.name); |
361 | error_time = jiffies; | 361 | error_time = jiffies; |
362 | } | 362 | } |
363 | #endif | 363 | #endif |
@@ -440,7 +440,7 @@ static int load_aout_library(struct file *file) | |||
440 | int retval; | 440 | int retval; |
441 | struct exec ex; | 441 | struct exec ex; |
442 | 442 | ||
443 | inode = file->f_dentry->d_inode; | 443 | inode = file->f_path.dentry->d_inode; |
444 | 444 | ||
445 | retval = -ENOEXEC; | 445 | retval = -ENOEXEC; |
446 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); | 446 | error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); |
@@ -471,7 +471,7 @@ static int load_aout_library(struct file *file) | |||
471 | { | 471 | { |
472 | printk(KERN_WARNING | 472 | printk(KERN_WARNING |
473 | "N_TXTOFF is not page aligned. Please convert library: %s\n", | 473 | "N_TXTOFF is not page aligned. Please convert library: %s\n", |
474 | file->f_dentry->d_name.name); | 474 | file->f_path.dentry->d_name.name); |
475 | error_time = jiffies; | 475 | error_time = jiffies; |
476 | } | 476 | } |
477 | #endif | 477 | #endif |
diff --git a/arch/x86_64/kernel/module.c b/arch/x86_64/kernel/module.c index 9d0958ff547f..a888e67f5874 100644 --- a/arch/x86_64/kernel/module.c +++ b/arch/x86_64/kernel/module.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/bug.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
@@ -173,10 +174,12 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
173 | lseg, lseg + locks->sh_size, | 174 | lseg, lseg + locks->sh_size, |
174 | tseg, tseg + text->sh_size); | 175 | tseg, tseg + text->sh_size); |
175 | } | 176 | } |
176 | return 0; | 177 | |
178 | return module_bug_finalize(hdr, sechdrs, me); | ||
177 | } | 179 | } |
178 | 180 | ||
179 | void module_arch_cleanup(struct module *mod) | 181 | void module_arch_cleanup(struct module *mod) |
180 | { | 182 | { |
181 | alternatives_smp_module_del(mod); | 183 | alternatives_smp_module_del(mod); |
184 | module_bug_cleanup(mod); | ||
182 | } | 185 | } |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 27e95e7922c1..186aebbae32d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -193,6 +193,8 @@ void nmi_watchdog_default(void) | |||
193 | nmi_watchdog = NMI_IO_APIC; | 193 | nmi_watchdog = NMI_IO_APIC; |
194 | } | 194 | } |
195 | 195 | ||
196 | static int endflag __initdata = 0; | ||
197 | |||
196 | #ifdef CONFIG_SMP | 198 | #ifdef CONFIG_SMP |
197 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when | 199 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when |
198 | * the CPU is idle. To make sure the NMI watchdog really ticks on all | 200 | * the CPU is idle. To make sure the NMI watchdog really ticks on all |
@@ -200,7 +202,6 @@ void nmi_watchdog_default(void) | |||
200 | */ | 202 | */ |
201 | static __init void nmi_cpu_busy(void *data) | 203 | static __init void nmi_cpu_busy(void *data) |
202 | { | 204 | { |
203 | volatile int *endflag = data; | ||
204 | local_irq_enable_in_hardirq(); | 205 | local_irq_enable_in_hardirq(); |
205 | /* Intentionally don't use cpu_relax here. This is | 206 | /* Intentionally don't use cpu_relax here. This is |
206 | to make sure that the performance counter really ticks, | 207 | to make sure that the performance counter really ticks, |
@@ -208,14 +209,13 @@ static __init void nmi_cpu_busy(void *data) | |||
208 | pause instruction. On a real HT machine this is fine because | 209 | pause instruction. On a real HT machine this is fine because |
209 | all other CPUs are busy with "useless" delay loops and don't | 210 | all other CPUs are busy with "useless" delay loops and don't |
210 | care if they get somewhat less cycles. */ | 211 | care if they get somewhat less cycles. */ |
211 | while (*endflag == 0) | 212 | while (endflag == 0) |
212 | barrier(); | 213 | mb(); |
213 | } | 214 | } |
214 | #endif | 215 | #endif |
215 | 216 | ||
216 | int __init check_nmi_watchdog (void) | 217 | int __init check_nmi_watchdog (void) |
217 | { | 218 | { |
218 | volatile int endflag = 0; | ||
219 | int *counts; | 219 | int *counts; |
220 | int cpu; | 220 | int cpu; |
221 | 221 | ||
@@ -256,6 +256,7 @@ int __init check_nmi_watchdog (void) | |||
256 | if (!atomic_read(&nmi_active)) { | 256 | if (!atomic_read(&nmi_active)) { |
257 | kfree(counts); | 257 | kfree(counts); |
258 | atomic_set(&nmi_active, -1); | 258 | atomic_set(&nmi_active, -1); |
259 | endflag = 1; | ||
259 | return -1; | 260 | return -1; |
260 | } | 261 | } |
261 | endflag = 1; | 262 | endflag = 1; |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index a1641ffdffcf..b54ccc07f379 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/kexec.h> | 31 | #include <linux/kexec.h> |
32 | #include <linux/unwind.h> | 32 | #include <linux/unwind.h> |
33 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
34 | #include <linux/bug.h> | ||
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
@@ -524,30 +525,15 @@ bad: | |||
524 | printk("\n"); | 525 | printk("\n"); |
525 | } | 526 | } |
526 | 527 | ||
527 | void handle_BUG(struct pt_regs *regs) | 528 | int is_valid_bugaddr(unsigned long rip) |
528 | { | 529 | { |
529 | struct bug_frame f; | 530 | unsigned short ud2; |
530 | long len; | ||
531 | const char *prefix = ""; | ||
532 | 531 | ||
533 | if (user_mode(regs)) | 532 | if (__copy_from_user(&ud2, (const void __user *) rip, sizeof(ud2))) |
534 | return; | 533 | return 0; |
535 | if (__copy_from_user(&f, (const void __user *) regs->rip, | 534 | |
536 | sizeof(struct bug_frame))) | 535 | return ud2 == 0x0b0f; |
537 | return; | 536 | } |
538 | if (f.filename >= 0 || | ||
539 | f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) | ||
540 | return; | ||
541 | len = __strnlen_user((char *)(long)f.filename, PATH_MAX) - 1; | ||
542 | if (len < 0 || len >= PATH_MAX) | ||
543 | f.filename = (int)(long)"unmapped filename"; | ||
544 | else if (len > 50) { | ||
545 | f.filename += len - 50; | ||
546 | prefix = "..."; | ||
547 | } | ||
548 | printk("----------- [cut here ] --------- [please bite here ] ---------\n"); | ||
549 | printk(KERN_ALERT "Kernel BUG at %s%.50s:%d\n", prefix, (char *)(long)f.filename, f.line); | ||
550 | } | ||
551 | 537 | ||
552 | #ifdef CONFIG_BUG | 538 | #ifdef CONFIG_BUG |
553 | void out_of_line_bug(void) | 539 | void out_of_line_bug(void) |
@@ -627,7 +613,9 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
627 | { | 613 | { |
628 | unsigned long flags = oops_begin(); | 614 | unsigned long flags = oops_begin(); |
629 | 615 | ||
630 | handle_BUG(regs); | 616 | if (!user_mode(regs)) |
617 | report_bug(regs->rip); | ||
618 | |||
631 | __die(str, regs, err); | 619 | __die(str, regs, err); |
632 | oops_end(flags); | 620 | oops_end(flags); |
633 | do_exit(SIGSEGV); | 621 | do_exit(SIGSEGV); |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 6a1f8f491e5d..514be5dd2303 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -13,6 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") | |||
13 | OUTPUT_ARCH(i386:x86-64) | 13 | OUTPUT_ARCH(i386:x86-64) |
14 | ENTRY(phys_startup_64) | 14 | ENTRY(phys_startup_64) |
15 | jiffies_64 = jiffies; | 15 | jiffies_64 = jiffies; |
16 | _proxy_pda = 0; | ||
16 | PHDRS { | 17 | PHDRS { |
17 | text PT_LOAD FLAGS(5); /* R_E */ | 18 | text PT_LOAD FLAGS(5); /* R_E */ |
18 | data PT_LOAD FLAGS(7); /* RWE */ | 19 | data PT_LOAD FLAGS(7); /* RWE */ |
@@ -51,6 +52,8 @@ SECTIONS | |||
51 | 52 | ||
52 | RODATA | 53 | RODATA |
53 | 54 | ||
55 | BUG_TABLE | ||
56 | |||
54 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ | 57 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ |
55 | /* Data */ | 58 | /* Data */ |
56 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 59 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 4a673f5397a0..2433d6fc68b1 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -225,8 +225,7 @@ out: | |||
225 | 225 | ||
226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, | 226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, |
227 | void __user *oldval, size_t __user *oldlenp, | 227 | void __user *oldval, size_t __user *oldlenp, |
228 | void __user *newval, size_t newlen, | 228 | void __user *newval, size_t newlen) |
229 | void **context) | ||
230 | { | 229 | { |
231 | return -ENOSYS; | 230 | return -ENOSYS; |
232 | } | 231 | } |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index c1e69a1f92a4..2e74cb0b7807 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -34,31 +34,24 @@ config GENERIC_HARDIRQS | |||
34 | bool | 34 | bool |
35 | default y | 35 | default y |
36 | 36 | ||
37 | config ARCH_HAS_ILOG2_U32 | ||
38 | bool | ||
39 | default n | ||
40 | |||
41 | config ARCH_HAS_ILOG2_U64 | ||
42 | bool | ||
43 | default n | ||
44 | |||
37 | source "init/Kconfig" | 45 | source "init/Kconfig" |
38 | 46 | ||
39 | menu "Processor type and features" | 47 | menu "Processor type and features" |
40 | 48 | ||
41 | choice | 49 | choice |
42 | prompt "Xtensa Processor Configuration" | 50 | prompt "Xtensa Processor Configuration" |
43 | default XTENSA_CPU_LINUX_BE | 51 | default XTENSA_VARIANT_FSF |
44 | 52 | ||
45 | config XTENSA_CPU_LINUX_BE | 53 | config XTENSA_VARIANT_FSF |
46 | bool "linux_be" | 54 | bool "fsf" |
47 | ---help--- | ||
48 | The linux_be processor configuration is the baseline Xtensa | ||
49 | configurations included in this kernel and also used by | ||
50 | binutils, gcc, and gdb. It contains no TIE, no coprocessors, | ||
51 | and the following configuration options: | ||
52 | |||
53 | Code Density Option 2 Misc Special Registers | ||
54 | NSA/NSAU Instructions 128-bit Data Bus Width | ||
55 | Processor ID 8K, 2-way I and D Caches | ||
56 | Zero-Overhead Loops 2 Inst Address Break Registers | ||
57 | Big Endian 2 Data Address Break Registers | ||
58 | 64 General-Purpose Registers JTAG Interface and Trace Port | ||
59 | 17 Interrupts MMU w/ TLBs and Autorefill | ||
60 | 3 Interrupt Levels 8 Autorefill Ways (I/D TLBs) | ||
61 | 3 Timers Unaligned Exceptions | ||
62 | endchoice | 55 | endchoice |
63 | 56 | ||
64 | config MMU | 57 | config MMU |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a3a4c66ef87..95f836db38fa 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -11,13 +11,13 @@ | |||
11 | # this architecture | 11 | # this architecture |
12 | 12 | ||
13 | # Core configuration. | 13 | # Core configuration. |
14 | # (Use CPU=<xtensa_config> to use another default compiler.) | 14 | # (Use VAR=<xtensa_config> to use another default compiler.) |
15 | 15 | ||
16 | cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be | 16 | variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf |
17 | cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom | 17 | variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom |
18 | 18 | ||
19 | CPU = $(cpu-y) | 19 | VARIANT = $(variant-y) |
20 | export CPU | 20 | export VARIANT |
21 | 21 | ||
22 | # Platform configuration | 22 | # Platform configuration |
23 | 23 | ||
@@ -27,8 +27,6 @@ platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | |||
27 | PLATFORM = $(platform-y) | 27 | PLATFORM = $(platform-y) |
28 | export PLATFORM | 28 | export PLATFORM |
29 | 29 | ||
30 | CPPFLAGS += $(if $(KBUILD_SRC),-I$(srctree)/include/asm-xtensa/) | ||
31 | CPPFLAGS += -Iinclude/asm | ||
32 | CFLAGS += -pipe -mlongcalls | 30 | CFLAGS += -pipe -mlongcalls |
33 | 31 | ||
34 | KBUILD_DEFCONFIG := iss_defconfig | 32 | KBUILD_DEFCONFIG := iss_defconfig |
@@ -41,12 +39,12 @@ core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | |||
41 | 39 | ||
42 | # Test for cross compiling | 40 | # Test for cross compiling |
43 | 41 | ||
44 | ifneq ($(CPU),) | 42 | ifneq ($(VARIANT),) |
45 | COMPILE_ARCH = $(shell uname -m) | 43 | COMPILE_ARCH = $(shell uname -m) |
46 | 44 | ||
47 | ifneq ($(COMPILE_ARCH), xtensa) | 45 | ifneq ($(COMPILE_ARCH), xtensa) |
48 | ifndef CROSS_COMPILE | 46 | ifndef CROSS_COMPILE |
49 | CROSS_COMPILE = xtensa_$(CPU)- | 47 | CROSS_COMPILE = xtensa_$(VARIANT)- |
50 | endif | 48 | endif |
51 | endif | 49 | endif |
52 | endif | 50 | endif |
@@ -68,14 +66,13 @@ archinc := include/asm-xtensa | |||
68 | 66 | ||
69 | archprepare: $(archinc)/.platform | 67 | archprepare: $(archinc)/.platform |
70 | 68 | ||
71 | # Update machine cpu and platform symlinks if something which affects | 69 | # Update processor variant and platform symlinks if something which affects |
72 | # them changed. | 70 | # them changed. |
73 | 71 | ||
74 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf | 72 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf |
75 | @echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)' | 73 | @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)' |
76 | $(Q)mkdir -p $(archinc) | 74 | $(Q)mkdir -p $(archinc) |
77 | $(Q)mkdir -p $(archinc)/xtensa | 75 | $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant |
78 | $(Q)ln -fsn $(srctree)/$(archinc)/xtensa/config-$(CPU) $(archinc)/xtensa/config | ||
79 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' | 76 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' |
80 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform | 77 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform |
81 | @touch $@ | 78 | @touch $@ |
@@ -89,7 +86,7 @@ zImage zImage.initrd: vmlinux | |||
89 | $(Q)$(MAKE) $(build)=$(boot) $@ | 86 | $(Q)$(MAKE) $(build)=$(boot) $@ |
90 | 87 | ||
91 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ | 88 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ |
92 | $(archinc)/platform $(archinc)/xtensa/config \ | 89 | $(archinc)/platform $(archinc)/variant \ |
93 | $(archinc)/.platform | 90 | $(archinc)/.platform |
94 | 91 | ||
95 | define archhelp | 92 | define archhelp |
diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S index f857fc760aa8..464298bc348b 100644 --- a/arch/xtensa/boot/boot-elf/bootstrap.S +++ b/arch/xtensa/boot/boot-elf/bootstrap.S | |||
@@ -1,7 +1,4 @@ | |||
1 | 1 | ||
2 | #include <xtensa/config/specreg.h> | ||
3 | #include <xtensa/config/core.h> | ||
4 | |||
5 | #include <asm/bootparam.h> | 2 | #include <asm/bootparam.h> |
6 | 3 | ||
7 | 4 | ||
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S index ee636b0da81c..84848123e2a8 100644 --- a/arch/xtensa/boot/boot-redboot/bootstrap.S +++ b/arch/xtensa/boot/boot-redboot/bootstrap.S | |||
@@ -1,9 +1,7 @@ | |||
1 | 1 | #include <asm/variant/core.h> | |
2 | #define _ASMLANGUAGE | 2 | #include <asm/regs.h> |
3 | #include <xtensa/config/specreg.h> | 3 | #include <asm/asmmacro.h> |
4 | #include <xtensa/config/core.h> | 4 | #include <asm/cacheasm.h> |
5 | #include <xtensa/cacheasm.h> | ||
6 | |||
7 | /* | 5 | /* |
8 | * RB-Data: RedBoot data/bss | 6 | * RB-Data: RedBoot data/bss |
9 | * P: Boot-Parameters | 7 | * P: Boot-Parameters |
@@ -77,8 +75,14 @@ _start: | |||
77 | /* Note: The assembler cannot relax "addi a0, a0, ..." to an | 75 | /* Note: The assembler cannot relax "addi a0, a0, ..." to an |
78 | l32r, so we load to a4 first. */ | 76 | l32r, so we load to a4 first. */ |
79 | 77 | ||
80 | addi a4, a0, __start - __start_a0 | 78 | # addi a4, a0, __start - __start_a0 |
81 | mov a0, a4 | 79 | # mov a0, a4 |
80 | |||
81 | movi a4, __start | ||
82 | movi a5, __start_a0 | ||
83 | add a4, a0, a4 | ||
84 | sub a0, a4, a5 | ||
85 | |||
82 | movi a4, __start | 86 | movi a4, __start |
83 | movi a5, __reloc_end | 87 | movi a5, __reloc_end |
84 | 88 | ||
@@ -106,9 +110,13 @@ _start: | |||
106 | /* We have to flush and invalidate the caches here before we jump. */ | 110 | /* We have to flush and invalidate the caches here before we jump. */ |
107 | 111 | ||
108 | #if XCHAL_DCACHE_IS_WRITEBACK | 112 | #if XCHAL_DCACHE_IS_WRITEBACK |
109 | dcache_writeback_all a5, a6 | 113 | |
114 | ___flush_dcache_all a5 a6 | ||
115 | |||
110 | #endif | 116 | #endif |
111 | icache_invalidate_all a5, a6 | 117 | |
118 | ___invalidate_icache_all a5 a6 | ||
119 | isync | ||
112 | 120 | ||
113 | movi a11, _reloc | 121 | movi a11, _reloc |
114 | jx a11 | 122 | jx a11 |
@@ -209,9 +217,14 @@ _reloc: | |||
209 | /* jump to the kernel */ | 217 | /* jump to the kernel */ |
210 | 2: | 218 | 2: |
211 | #if XCHAL_DCACHE_IS_WRITEBACK | 219 | #if XCHAL_DCACHE_IS_WRITEBACK |
212 | dcache_writeback_all a5, a6 | 220 | |
221 | ___flush_dcache_all a5 a6 | ||
222 | |||
213 | #endif | 223 | #endif |
214 | icache_invalidate_all a5, a6 | 224 | |
225 | ___invalidate_icache_all a5 a6 | ||
226 | |||
227 | isync | ||
215 | 228 | ||
216 | movi a5, __start | 229 | movi a5, __start |
217 | movi a3, boot_initrd_start | 230 | movi a3, boot_initrd_start |
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig index 802621dd4867..f19854035e61 100644 --- a/arch/xtensa/configs/iss_defconfig +++ b/arch/xtensa/configs/iss_defconfig | |||
@@ -53,11 +53,7 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
53 | # | 53 | # |
54 | # Processor type and features | 54 | # Processor type and features |
55 | # | 55 | # |
56 | CONFIG_XTENSA_ARCH_LINUX_BE=y | 56 | CONFIG_XTENSA_VARIANT_FSF=y |
57 | # CONFIG_XTENSA_ARCH_LINUX_LE is not set | ||
58 | # CONFIG_XTENSA_ARCH_LINUX_TEST is not set | ||
59 | # CONFIG_XTENSA_ARCH_S5 is not set | ||
60 | # CONFIG_XTENSA_CUSTOM is not set | ||
61 | CONFIG_MMU=y | 57 | CONFIG_MMU=y |
62 | # CONFIG_XTENSA_UNALIGNED_USER is not set | 58 | # CONFIG_XTENSA_UNALIGNED_USER is not set |
63 | # CONFIG_PREEMPT is not set | 59 | # CONFIG_PREEMPT is not set |
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index a4956578a24d..33d6e9d2e83c 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
@@ -16,14 +16,9 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <asm/ptrace.h> | ||
20 | #include <asm/ptrace.h> | ||
21 | #include <asm/current.h> | 19 | #include <asm/current.h> |
22 | #include <asm/asm-offsets.h> | 20 | #include <asm/asm-offsets.h> |
23 | #include <asm/pgtable.h> | ||
24 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
25 | #include <asm/page.h> | ||
26 | #include <asm/thread_info.h> | ||
27 | 22 | ||
28 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 23 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
29 | 24 | ||
@@ -216,7 +211,7 @@ ENTRY(fast_unaligned) | |||
216 | 211 | ||
217 | extui a5, a4, INSN_OP0, 4 # get insn.op0 nibble | 212 | extui a5, a4, INSN_OP0, 4 # get insn.op0 nibble |
218 | 213 | ||
219 | #if XCHAL_HAVE_NARROW | 214 | #if XCHAL_HAVE_DENSITY |
220 | _beqi a5, OP0_L32I_N, .Lload # L32I.N, jump | 215 | _beqi a5, OP0_L32I_N, .Lload # L32I.N, jump |
221 | addi a6, a5, -OP0_S32I_N | 216 | addi a6, a5, -OP0_S32I_N |
222 | _beqz a6, .Lstore # S32I.N, do a store | 217 | _beqz a6, .Lstore # S32I.N, do a store |
@@ -251,7 +246,7 @@ ENTRY(fast_unaligned) | |||
251 | #endif | 246 | #endif |
252 | __src_b a3, a5, a6 # a3 has the data word | 247 | __src_b a3, a5, a6 # a3 has the data word |
253 | 248 | ||
254 | #if XCHAL_HAVE_NARROW | 249 | #if XCHAL_HAVE_DENSITY |
255 | addi a7, a7, 2 # increment PC (assume 16-bit insn) | 250 | addi a7, a7, 2 # increment PC (assume 16-bit insn) |
256 | 251 | ||
257 | extui a5, a4, INSN_OP0, 4 | 252 | extui a5, a4, INSN_OP0, 4 |
@@ -279,14 +274,14 @@ ENTRY(fast_unaligned) | |||
279 | 274 | ||
280 | 1: | 275 | 1: |
281 | 276 | ||
282 | #if XCHAL_HAVE_LOOP | 277 | #if XCHAL_HAVE_LOOPS |
283 | rsr a3, LEND # check if we reached LEND | 278 | rsr a5, LEND # check if we reached LEND |
284 | bne a7, a3, 1f | 279 | bne a7, a5, 1f |
285 | rsr a3, LCOUNT # and LCOUNT != 0 | 280 | rsr a5, LCOUNT # and LCOUNT != 0 |
286 | beqz a3, 1f | 281 | beqz a5, 1f |
287 | addi a3, a3, -1 # decrement LCOUNT and set | 282 | addi a5, a5, -1 # decrement LCOUNT and set |
288 | rsr a7, LBEG # set PC to LBEGIN | 283 | rsr a7, LBEG # set PC to LBEGIN |
289 | wsr a3, LCOUNT | 284 | wsr a5, LCOUNT |
290 | #endif | 285 | #endif |
291 | 286 | ||
292 | 1: wsr a7, EPC_1 # skip load instruction | 287 | 1: wsr a7, EPC_1 # skip load instruction |
@@ -336,7 +331,7 @@ ENTRY(fast_unaligned) | |||
336 | 331 | ||
337 | movi a6, 0 # mask: ffffffff:00000000 | 332 | movi a6, 0 # mask: ffffffff:00000000 |
338 | 333 | ||
339 | #if XCHAL_HAVE_NARROW | 334 | #if XCHAL_HAVE_DENSITY |
340 | addi a7, a7, 2 # incr. PC,assume 16-bit instruction | 335 | addi a7, a7, 2 # incr. PC,assume 16-bit instruction |
341 | 336 | ||
342 | extui a5, a4, INSN_OP0, 4 # extract OP0 | 337 | extui a5, a4, INSN_OP0, 4 # extract OP0 |
@@ -359,14 +354,14 @@ ENTRY(fast_unaligned) | |||
359 | /* Get memory address */ | 354 | /* Get memory address */ |
360 | 355 | ||
361 | 1: | 356 | 1: |
362 | #if XCHAL_HAVE_LOOP | 357 | #if XCHAL_HAVE_LOOPS |
363 | rsr a3, LEND # check if we reached LEND | 358 | rsr a4, LEND # check if we reached LEND |
364 | bne a7, a3, 1f | 359 | bne a7, a4, 1f |
365 | rsr a3, LCOUNT # and LCOUNT != 0 | 360 | rsr a4, LCOUNT # and LCOUNT != 0 |
366 | beqz a3, 1f | 361 | beqz a4, 1f |
367 | addi a3, a3, -1 # decrement LCOUNT and set | 362 | addi a4, a4, -1 # decrement LCOUNT and set |
368 | rsr a7, LBEG # set PC to LBEGIN | 363 | rsr a7, LBEG # set PC to LBEGIN |
369 | wsr a3, LCOUNT | 364 | wsr a4, LCOUNT |
370 | #endif | 365 | #endif |
371 | 366 | ||
372 | 1: wsr a7, EPC_1 # skip store instruction | 367 | 1: wsr a7, EPC_1 # skip store instruction |
@@ -416,6 +411,7 @@ ENTRY(fast_unaligned) | |||
416 | 411 | ||
417 | /* Restore working register */ | 412 | /* Restore working register */ |
418 | 413 | ||
414 | l32i a8, a2, PT_AREG8 | ||
419 | l32i a7, a2, PT_AREG7 | 415 | l32i a7, a2, PT_AREG7 |
420 | l32i a6, a2, PT_AREG6 | 416 | l32i a6, a2, PT_AREG6 |
421 | l32i a5, a2, PT_AREG5 | 417 | l32i a5, a2, PT_AREG5 |
@@ -446,7 +442,7 @@ ENTRY(fast_unaligned) | |||
446 | mov a1, a2 | 442 | mov a1, a2 |
447 | 443 | ||
448 | rsr a0, PS | 444 | rsr a0, PS |
449 | bbsi.l a2, PS_UM_SHIFT, 1f # jump if user mode | 445 | bbsi.l a2, PS_UM_BIT, 1f # jump if user mode |
450 | 446 | ||
451 | movi a0, _kernel_exception | 447 | movi a0, _kernel_exception |
452 | jx a0 | 448 | jx a0 |
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index 7cd1d7f8f608..b256cfbef344 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -87,6 +87,11 @@ int main(void) | |||
87 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); | 87 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); |
88 | BLANK(); | 88 | BLANK(); |
89 | DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); | 89 | DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); |
90 | |||
91 | /* constants */ | ||
92 | DEFINE(_CLONE_VM, CLONE_VM); | ||
93 | DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED); | ||
94 | |||
90 | return 0; | 95 | return 0; |
91 | } | 96 | } |
92 | 97 | ||
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index cf5a93fb6a2e..01bcb9fcfcbd 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S | |||
@@ -90,7 +90,6 @@ ENTRY(enable_coprocessor) | |||
90 | rsync | 90 | rsync |
91 | retw | 91 | retw |
92 | 92 | ||
93 | #endif | ||
94 | 93 | ||
95 | ENTRY(save_coprocessor_extra) | 94 | ENTRY(save_coprocessor_extra) |
96 | entry sp, 16 | 95 | entry sp, 16 |
@@ -197,4 +196,5 @@ _xtensa_reginfo_tables: | |||
197 | XCHAL_CP7_SA_CONTENTS_LIBDB | 196 | XCHAL_CP7_SA_CONTENTS_LIBDB |
198 | .word 0xFC000000 /* invalid register number,marks end of table*/ | 197 | .word 0xFC000000 /* invalid register number,marks end of table*/ |
199 | _xtensa_reginfo_table_end: | 198 | _xtensa_reginfo_table_end: |
199 | #endif | ||
200 | 200 | ||
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 89e409e9e0de..9e271ba009bf 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
26 | #include <asm/signal.h> | 26 | #include <asm/signal.h> |
27 | #include <xtensa/coreasm.h> | 27 | #include <asm/tlbflush.h> |
28 | 28 | ||
29 | /* Unimplemented features. */ | 29 | /* Unimplemented features. */ |
30 | 30 | ||
@@ -364,7 +364,7 @@ common_exception: | |||
364 | movi a2, 1 | 364 | movi a2, 1 |
365 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] | 365 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] |
366 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception | 366 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception |
367 | movi a2, PS_WOE_MASK | 367 | movi a2, 1 << PS_WOE_BIT |
368 | or a3, a3, a2 | 368 | or a3, a3, a2 |
369 | rsr a0, EXCCAUSE | 369 | rsr a0, EXCCAUSE |
370 | xsr a3, PS | 370 | xsr a3, PS |
@@ -399,7 +399,7 @@ common_exception_return: | |||
399 | /* Jump if we are returning from kernel exceptions. */ | 399 | /* Jump if we are returning from kernel exceptions. */ |
400 | 400 | ||
401 | 1: l32i a3, a1, PT_PS | 401 | 1: l32i a3, a1, PT_PS |
402 | _bbsi.l a3, PS_UM_SHIFT, 2f | 402 | _bbsi.l a3, PS_UM_BIT, 2f |
403 | j kernel_exception_exit | 403 | j kernel_exception_exit |
404 | 404 | ||
405 | /* Specific to a user exception exit: | 405 | /* Specific to a user exception exit: |
@@ -422,7 +422,7 @@ common_exception_return: | |||
422 | * (Hint: There is only one user exception frame on stack) | 422 | * (Hint: There is only one user exception frame on stack) |
423 | */ | 423 | */ |
424 | 424 | ||
425 | movi a3, PS_WOE_MASK | 425 | movi a3, 1 << PS_WOE_BIT |
426 | 426 | ||
427 | _bbsi.l a4, TIF_NEED_RESCHED, 3f | 427 | _bbsi.l a4, TIF_NEED_RESCHED, 3f |
428 | _bbci.l a4, TIF_SIGPENDING, 4f | 428 | _bbci.l a4, TIF_SIGPENDING, 4f |
@@ -694,7 +694,7 @@ common_exception_exit: | |||
694 | ENTRY(debug_exception) | 694 | ENTRY(debug_exception) |
695 | 695 | ||
696 | rsr a0, EPS + XCHAL_DEBUGLEVEL | 696 | rsr a0, EPS + XCHAL_DEBUGLEVEL |
697 | bbsi.l a0, PS_EXCM_SHIFT, 1f # exception mode | 697 | bbsi.l a0, PS_EXCM_BIT, 1f # exception mode |
698 | 698 | ||
699 | /* Set EPC_1 and EXCCAUSE */ | 699 | /* Set EPC_1 and EXCCAUSE */ |
700 | 700 | ||
@@ -707,7 +707,7 @@ ENTRY(debug_exception) | |||
707 | 707 | ||
708 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ | 708 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ |
709 | 709 | ||
710 | movi a2, 1 << PS_EXCM_SHIFT | 710 | movi a2, 1 << PS_EXCM_BIT |
711 | or a2, a0, a2 | 711 | or a2, a0, a2 |
712 | movi a0, debug_exception # restore a3, debug jump vector | 712 | movi a0, debug_exception # restore a3, debug jump vector |
713 | wsr a2, PS | 713 | wsr a2, PS |
@@ -715,7 +715,7 @@ ENTRY(debug_exception) | |||
715 | 715 | ||
716 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ | 716 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ |
717 | 717 | ||
718 | bbsi.l a2, PS_UM_SHIFT, 2f # jump if user mode | 718 | bbsi.l a2, PS_UM_BIT, 2f # jump if user mode |
719 | 719 | ||
720 | addi a2, a1, -16-PT_SIZE # assume kernel stack | 720 | addi a2, a1, -16-PT_SIZE # assume kernel stack |
721 | s32i a0, a2, PT_AREG0 | 721 | s32i a0, a2, PT_AREG0 |
@@ -778,7 +778,7 @@ ENTRY(unrecoverable_exception) | |||
778 | wsr a1, WINDOWBASE | 778 | wsr a1, WINDOWBASE |
779 | rsync | 779 | rsync |
780 | 780 | ||
781 | movi a1, PS_WOE_MASK | 1 | 781 | movi a1, (1 << PS_WOE_BIT) | 1 |
782 | wsr a1, PS | 782 | wsr a1, PS |
783 | rsync | 783 | rsync |
784 | 784 | ||
@@ -1004,13 +1004,10 @@ ENTRY(fast_syscall_kernel) | |||
1004 | 1004 | ||
1005 | rsr a0, DEPC # get syscall-nr | 1005 | rsr a0, DEPC # get syscall-nr |
1006 | _beqz a0, fast_syscall_spill_registers | 1006 | _beqz a0, fast_syscall_spill_registers |
1007 | 1007 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | |
1008 | addi a0, a0, -__NR_sysxtensa | ||
1009 | _beqz a0, fast_syscall_sysxtensa | ||
1010 | 1008 | ||
1011 | j kernel_exception | 1009 | j kernel_exception |
1012 | 1010 | ||
1013 | |||
1014 | ENTRY(fast_syscall_user) | 1011 | ENTRY(fast_syscall_user) |
1015 | 1012 | ||
1016 | /* Skip syscall. */ | 1013 | /* Skip syscall. */ |
@@ -1024,9 +1021,7 @@ ENTRY(fast_syscall_user) | |||
1024 | 1021 | ||
1025 | rsr a0, DEPC # get syscall-nr | 1022 | rsr a0, DEPC # get syscall-nr |
1026 | _beqz a0, fast_syscall_spill_registers | 1023 | _beqz a0, fast_syscall_spill_registers |
1027 | 1024 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | |
1028 | addi a0, a0, -__NR_sysxtensa | ||
1029 | _beqz a0, fast_syscall_sysxtensa | ||
1030 | 1025 | ||
1031 | j user_exception | 1026 | j user_exception |
1032 | 1027 | ||
@@ -1047,18 +1042,19 @@ ENTRY(fast_syscall_unrecoverable) | |||
1047 | /* | 1042 | /* |
1048 | * sysxtensa syscall handler | 1043 | * sysxtensa syscall handler |
1049 | * | 1044 | * |
1050 | * int sysxtensa (XTENSA_ATOMIC_SET, ptr, val, unused); | 1045 | * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); |
1051 | * int sysxtensa (XTENSA_ATOMIC_ADD, ptr, val, unused); | 1046 | * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); |
1052 | * int sysxtensa (XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); | 1047 | * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); |
1053 | * int sysxtensa (XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); | 1048 | * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); |
1054 | * a2 a6 a3 a4 a5 | 1049 | * a2 a6 a3 a4 a5 |
1055 | * | 1050 | * |
1056 | * Entry condition: | 1051 | * Entry condition: |
1057 | * | 1052 | * |
1058 | * a0: trashed, original value saved on stack (PT_AREG0) | 1053 | * a0: a2 (syscall-nr), original value saved on stack (PT_AREG0) |
1059 | * a1: a1 | 1054 | * a1: a1 |
1060 | * a2: new stack pointer, original in DEPC | 1055 | * a2: new stack pointer, original in a0 and DEPC |
1061 | * a3: dispatch table | 1056 | * a3: dispatch table, original in excsave_1 |
1057 | * a4..a15: unchanged | ||
1062 | * depc: a2, original value saved on stack (PT_DEPC) | 1058 | * depc: a2, original value saved on stack (PT_DEPC) |
1063 | * excsave_1: a3 | 1059 | * excsave_1: a3 |
1064 | * | 1060 | * |
@@ -1091,59 +1087,62 @@ ENTRY(fast_syscall_unrecoverable) | |||
1091 | #define CATCH \ | 1087 | #define CATCH \ |
1092 | 67: | 1088 | 67: |
1093 | 1089 | ||
1094 | ENTRY(fast_syscall_sysxtensa) | 1090 | ENTRY(fast_syscall_xtensa) |
1095 | |||
1096 | _beqz a6, 1f | ||
1097 | _blti a6, SYSXTENSA_COUNT, 2f | ||
1098 | 1091 | ||
1099 | 1: j user_exception | 1092 | xsr a3, EXCSAVE_1 # restore a3, excsave1 |
1100 | |||
1101 | 2: xsr a3, EXCSAVE_1 # restore a3, excsave1 | ||
1102 | s32i a7, a2, PT_AREG7 | ||
1103 | 1093 | ||
1094 | s32i a7, a2, PT_AREG7 # we need an additional register | ||
1104 | movi a7, 4 # sizeof(unsigned int) | 1095 | movi a7, 4 # sizeof(unsigned int) |
1105 | access_ok a0, a3, a7, a2, .Leac | 1096 | access_ok a3, a7, a0, a2, .Leac # a0: scratch reg, a2: sp |
1106 | 1097 | ||
1107 | _beqi a6, SYSXTENSA_ATOMIC_SET, .Lset | 1098 | addi a6, a6, -1 # assuming SYS_XTENSA_ATOMIC_SET = 1 |
1108 | _beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg | 1099 | _bgeui a6, SYS_XTENSA_COUNT - 1, .Lill |
1109 | _beqi a6, SYSXTENSA_ATOMIC_ADD, .Ladd | 1100 | _bnei a6, SYS_XTENSA_ATOMIC_CMP_SWP - 1, .Lnswp |
1110 | 1101 | ||
1111 | /* Fall through for SYSXTENSA_ATOMIC_CMP_SWP */ | 1102 | /* Fall through for ATOMIC_CMP_SWP. */ |
1112 | 1103 | ||
1113 | .Lswp: /* Atomic compare and swap */ | 1104 | .Lswp: /* Atomic compare and swap */ |
1114 | 1105 | ||
1115 | TRY l32i a7, a3, 0 # read old value | 1106 | TRY l32i a0, a3, 0 # read old value |
1116 | bne a7, a4, 1f # same as old value? jump | 1107 | bne a0, a4, 1f # same as old value? jump |
1117 | s32i a5, a3, 0 # different, modify value | 1108 | TRY s32i a5, a3, 0 # different, modify value |
1118 | movi a7, 1 # and return 1 | 1109 | l32i a7, a2, PT_AREG7 # restore a7 |
1119 | j .Lret | 1110 | l32i a0, a2, PT_AREG0 # restore a0 |
1120 | 1111 | movi a2, 1 # and return 1 | |
1121 | 1: movi a7, 0 # same values: return 0 | 1112 | addi a6, a6, 1 # restore a6 (really necessary?) |
1122 | j .Lret | 1113 | rfe |
1123 | |||
1124 | .Ladd: /* Atomic add */ | ||
1125 | .Lexg: /* Atomic (exchange) add */ | ||
1126 | 1114 | ||
1127 | TRY l32i a7, a3, 0 | 1115 | 1: l32i a7, a2, PT_AREG7 # restore a7 |
1128 | add a4, a4, a7 | 1116 | l32i a0, a2, PT_AREG0 # restore a0 |
1129 | s32i a4, a3, 0 | 1117 | movi a2, 0 # return 0 (note that we cannot set |
1130 | j .Lret | 1118 | addi a6, a6, 1 # restore a6 (really necessary?) |
1119 | rfe | ||
1131 | 1120 | ||
1132 | .Lset: /* Atomic set */ | 1121 | .Lnswp: /* Atomic set, add, and exg_add. */ |
1133 | 1122 | ||
1134 | TRY l32i a7, a3, 0 # read old value as return value | 1123 | TRY l32i a7, a3, 0 # orig |
1135 | s32i a4, a3, 0 # write new value | 1124 | add a0, a4, a7 # + arg |
1125 | moveqz a0, a4, a6 # set | ||
1126 | TRY s32i a0, a3, 0 # write new value | ||
1136 | 1127 | ||
1137 | .Lret: mov a0, a2 | 1128 | mov a0, a2 |
1138 | mov a2, a7 | 1129 | mov a2, a7 |
1139 | l32i a7, a0, PT_AREG7 | 1130 | l32i a7, a0, PT_AREG7 # restore a7 |
1140 | l32i a3, a0, PT_AREG3 | 1131 | l32i a0, a0, PT_AREG0 # restore a0 |
1141 | l32i a0, a0, PT_AREG0 | 1132 | addi a6, a6, 1 # restore a6 (really necessary?) |
1142 | rfe | 1133 | rfe |
1143 | 1134 | ||
1144 | CATCH | 1135 | CATCH |
1145 | .Leac: movi a7, -EFAULT | 1136 | .Leac: l32i a7, a2, PT_AREG7 # restore a7 |
1146 | j .Lret | 1137 | l32i a0, a2, PT_AREG0 # restore a0 |
1138 | movi a2, -EFAULT | ||
1139 | rfe | ||
1140 | |||
1141 | .Lill: l32i a7, a2, PT_AREG0 # restore a7 | ||
1142 | l32i a0, a2, PT_AREG0 # restore a0 | ||
1143 | movi a2, -EINVAL | ||
1144 | rfe | ||
1145 | |||
1147 | 1146 | ||
1148 | 1147 | ||
1149 | 1148 | ||
@@ -1491,7 +1490,7 @@ ENTRY(_spill_registers) | |||
1491 | */ | 1490 | */ |
1492 | 1491 | ||
1493 | rsr a0, PS | 1492 | rsr a0, PS |
1494 | _bbci.l a0, PS_UM_SHIFT, 1f | 1493 | _bbci.l a0, PS_UM_BIT, 1f |
1495 | 1494 | ||
1496 | /* User space: Setup a dummy frame and kill application. | 1495 | /* User space: Setup a dummy frame and kill application. |
1497 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. | 1496 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. |
@@ -1510,7 +1509,7 @@ ENTRY(_spill_registers) | |||
1510 | l32i a1, a3, EXC_TABLE_KSTK | 1509 | l32i a1, a3, EXC_TABLE_KSTK |
1511 | wsr a3, EXCSAVE_1 | 1510 | wsr a3, EXCSAVE_1 |
1512 | 1511 | ||
1513 | movi a4, PS_WOE_MASK | 1 | 1512 | movi a4, (1 << PS_WOE_BIT) | 1 |
1514 | wsr a4, PS | 1513 | wsr a4, PS |
1515 | rsync | 1514 | rsync |
1516 | 1515 | ||
@@ -1612,7 +1611,7 @@ ENTRY(fast_second_level_miss) | |||
1612 | rsr a1, PTEVADDR | 1611 | rsr a1, PTEVADDR |
1613 | srli a1, a1, PAGE_SHIFT | 1612 | srli a1, a1, PAGE_SHIFT |
1614 | slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK | 1613 | slli a1, a1, PAGE_SHIFT # ptevaddr & PAGE_MASK |
1615 | addi a1, a1, DTLB_WAY_PGTABLE # ... + way_number | 1614 | addi a1, a1, DTLB_WAY_PGD # ... + way_number |
1616 | 1615 | ||
1617 | wdtlb a0, a1 | 1616 | wdtlb a0, a1 |
1618 | dsync | 1617 | dsync |
@@ -1654,7 +1653,7 @@ ENTRY(fast_second_level_miss) | |||
1654 | mov a1, a2 | 1653 | mov a1, a2 |
1655 | 1654 | ||
1656 | rsr a2, PS | 1655 | rsr a2, PS |
1657 | bbsi.l a2, PS_UM_SHIFT, 1f | 1656 | bbsi.l a2, PS_UM_BIT, 1f |
1658 | j _kernel_exception | 1657 | j _kernel_exception |
1659 | 1: j _user_exception | 1658 | 1: j _user_exception |
1660 | 1659 | ||
@@ -1753,7 +1752,7 @@ ENTRY(fast_store_prohibited) | |||
1753 | mov a1, a2 | 1752 | mov a1, a2 |
1754 | 1753 | ||
1755 | rsr a2, PS | 1754 | rsr a2, PS |
1756 | bbsi.l a2, PS_UM_SHIFT, 1f | 1755 | bbsi.l a2, PS_UM_BIT, 1f |
1757 | j _kernel_exception | 1756 | j _kernel_exception |
1758 | 1: j _user_exception | 1757 | 1: j _user_exception |
1759 | 1758 | ||
@@ -1907,6 +1906,103 @@ ENTRY(fast_coprocessor) | |||
1907 | #endif /* XCHAL_EXTRA_SA_SIZE */ | 1906 | #endif /* XCHAL_EXTRA_SA_SIZE */ |
1908 | 1907 | ||
1909 | /* | 1908 | /* |
1909 | * System Calls. | ||
1910 | * | ||
1911 | * void system_call (struct pt_regs* regs, int exccause) | ||
1912 | * a2 a3 | ||
1913 | */ | ||
1914 | |||
1915 | ENTRY(system_call) | ||
1916 | entry a1, 32 | ||
1917 | |||
1918 | /* regs->syscall = regs->areg[2] */ | ||
1919 | |||
1920 | l32i a3, a2, PT_AREG2 | ||
1921 | mov a6, a2 | ||
1922 | movi a4, do_syscall_trace_enter | ||
1923 | s32i a3, a2, PT_SYSCALL | ||
1924 | callx4 a4 | ||
1925 | |||
1926 | /* syscall = sys_call_table[syscall_nr] */ | ||
1927 | |||
1928 | movi a4, sys_call_table; | ||
1929 | movi a5, __NR_syscall_count | ||
1930 | movi a6, -ENOSYS | ||
1931 | bgeu a3, a5, 1f | ||
1932 | |||
1933 | addx4 a4, a3, a4 | ||
1934 | l32i a4, a4, 0 | ||
1935 | movi a5, sys_ni_syscall; | ||
1936 | beq a4, a5, 1f | ||
1937 | |||
1938 | /* Load args: arg0 - arg5 are passed via regs. */ | ||
1939 | |||
1940 | l32i a6, a2, PT_AREG6 | ||
1941 | l32i a7, a2, PT_AREG3 | ||
1942 | l32i a8, a2, PT_AREG4 | ||
1943 | l32i a9, a2, PT_AREG5 | ||
1944 | l32i a10, a2, PT_AREG8 | ||
1945 | l32i a11, a2, PT_AREG9 | ||
1946 | |||
1947 | /* Pass one additional argument to the syscall: pt_regs (on stack) */ | ||
1948 | s32i a2, a1, 0 | ||
1949 | |||
1950 | callx4 a4 | ||
1951 | |||
1952 | 1: /* regs->areg[2] = return_value */ | ||
1953 | |||
1954 | s32i a6, a2, PT_AREG2 | ||
1955 | movi a4, do_syscall_trace_leave | ||
1956 | mov a6, a2 | ||
1957 | callx4 a4 | ||
1958 | retw | ||
1959 | |||
1960 | |||
1961 | /* | ||
1962 | * Create a kernel thread | ||
1963 | * | ||
1964 | * int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | ||
1965 | * a2 a2 a3 a4 | ||
1966 | */ | ||
1967 | |||
1968 | ENTRY(kernel_thread) | ||
1969 | entry a1, 16 | ||
1970 | |||
1971 | mov a5, a2 # preserve fn over syscall | ||
1972 | mov a7, a3 # preserve args over syscall | ||
1973 | |||
1974 | movi a3, _CLONE_VM | _CLONE_UNTRACED | ||
1975 | movi a2, __NR_clone | ||
1976 | or a6, a4, a3 # arg0: flags | ||
1977 | mov a3, a1 # arg1: sp | ||
1978 | syscall | ||
1979 | |||
1980 | beq a3, a1, 1f # branch if parent | ||
1981 | mov a6, a7 # args | ||
1982 | callx4 a5 # fn(args) | ||
1983 | |||
1984 | movi a2, __NR_exit | ||
1985 | syscall # return value of fn(args) still in a6 | ||
1986 | |||
1987 | 1: retw | ||
1988 | |||
1989 | /* | ||
1990 | * Do a system call from kernel instead of calling sys_execve, so we end up | ||
1991 | * with proper pt_regs. | ||
1992 | * | ||
1993 | * int kernel_execve(const char *fname, char *const argv[], charg *const envp[]) | ||
1994 | * a2 a2 a3 a4 | ||
1995 | */ | ||
1996 | |||
1997 | ENTRY(kernel_execve) | ||
1998 | entry a1, 16 | ||
1999 | mov a6, a2 # arg0 is in a6 | ||
2000 | movi a2, __NR_execve | ||
2001 | syscall | ||
2002 | |||
2003 | retw | ||
2004 | |||
2005 | /* | ||
1910 | * Task switch. | 2006 | * Task switch. |
1911 | * | 2007 | * |
1912 | * struct task* _switch_to (struct task* prev, struct task* next) | 2008 | * struct task* _switch_to (struct task* prev, struct task* next) |
@@ -1924,7 +2020,7 @@ ENTRY(_switch_to) | |||
1924 | 2020 | ||
1925 | /* Disable ints while we manipulate the stack pointer; spill regs. */ | 2021 | /* Disable ints while we manipulate the stack pointer; spill regs. */ |
1926 | 2022 | ||
1927 | movi a5, PS_EXCM_MASK | LOCKLEVEL | 2023 | movi a5, (1 << PS_EXCM_BIT) | LOCKLEVEL |
1928 | xsr a5, PS | 2024 | xsr a5, PS |
1929 | rsr a3, EXCSAVE_1 | 2025 | rsr a3, EXCSAVE_1 |
1930 | rsync | 2026 | rsync |
@@ -1964,33 +2060,9 @@ ENTRY(ret_from_fork) | |||
1964 | movi a4, schedule_tail | 2060 | movi a4, schedule_tail |
1965 | callx4 a4 | 2061 | callx4 a4 |
1966 | 2062 | ||
1967 | movi a4, do_syscall_trace | 2063 | movi a4, do_syscall_trace_leave |
2064 | mov a6, a1 | ||
1968 | callx4 a4 | 2065 | callx4 a4 |
1969 | 2066 | ||
1970 | j common_exception_return | 2067 | j common_exception_return |
1971 | 2068 | ||
1972 | |||
1973 | |||
1974 | /* | ||
1975 | * Table of syscalls | ||
1976 | */ | ||
1977 | |||
1978 | .data | ||
1979 | .align 4 | ||
1980 | .global sys_call_table | ||
1981 | sys_call_table: | ||
1982 | |||
1983 | #define SYSCALL(call, narg) .word call | ||
1984 | #include "syscalls.h" | ||
1985 | |||
1986 | /* | ||
1987 | * Number of arguments of each syscall | ||
1988 | */ | ||
1989 | |||
1990 | .global sys_narg_table | ||
1991 | sys_narg_table: | ||
1992 | |||
1993 | #undef SYSCALL | ||
1994 | #define SYSCALL(call, narg) .byte narg | ||
1995 | #include "syscalls.h" | ||
1996 | |||
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index c07cb2522993..ea89910efa44 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -15,9 +15,9 @@ | |||
15 | * Kevin Chea | 15 | * Kevin Chea |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <xtensa/cacheasm.h> | ||
19 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
20 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/cacheasm.h> | ||
21 | 21 | ||
22 | /* | 22 | /* |
23 | * This module contains the entry code for kernel images. It performs the | 23 | * This module contains the entry code for kernel images. It performs the |
@@ -32,13 +32,6 @@ | |||
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | 34 | ||
35 | .macro iterate from, to , cmd | ||
36 | .ifeq ((\to - \from) & ~0xfff) | ||
37 | \cmd \from | ||
38 | iterate "(\from+1)", \to, \cmd | ||
39 | .endif | ||
40 | .endm | ||
41 | |||
42 | /* | 35 | /* |
43 | * _start | 36 | * _start |
44 | * | 37 | * |
@@ -64,7 +57,7 @@ _startup: | |||
64 | 57 | ||
65 | /* Disable interrupts and exceptions. */ | 58 | /* Disable interrupts and exceptions. */ |
66 | 59 | ||
67 | movi a0, XCHAL_PS_EXCM_MASK | 60 | movi a0, LOCKLEVEL |
68 | wsr a0, PS | 61 | wsr a0, PS |
69 | 62 | ||
70 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ | 63 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ |
@@ -91,11 +84,11 @@ _startup: | |||
91 | movi a1, 15 | 84 | movi a1, 15 |
92 | wsr a0, ICOUNTLEVEL | 85 | wsr a0, ICOUNTLEVEL |
93 | 86 | ||
94 | .macro reset_dbreak num | 87 | .set _index, 0 |
95 | wsr a0, DBREAKC + \num | 88 | .rept XCHAL_NUM_DBREAK - 1 |
96 | .endm | 89 | wsr a0, DBREAKC + _index |
97 | 90 | .set _index, _index + 1 | |
98 | iterate 0, XCHAL_NUM_IBREAK-1, reset_dbreak | 91 | .endr |
99 | #endif | 92 | #endif |
100 | 93 | ||
101 | /* Clear CCOUNT (not really necessary, but nice) */ | 94 | /* Clear CCOUNT (not really necessary, but nice) */ |
@@ -110,10 +103,11 @@ _startup: | |||
110 | 103 | ||
111 | /* Disable all timers. */ | 104 | /* Disable all timers. */ |
112 | 105 | ||
113 | .macro reset_timer num | 106 | .set _index, 0 |
114 | wsr a0, CCOMPARE_0 + \num | 107 | .rept XCHAL_NUM_TIMERS - 1 |
115 | .endm | 108 | wsr a0, CCOMPARE + _index |
116 | iterate 0, XCHAL_NUM_TIMERS-1, reset_timer | 109 | .set _index, _index + 1 |
110 | .endr | ||
117 | 111 | ||
118 | /* Interrupt initialization. */ | 112 | /* Interrupt initialization. */ |
119 | 113 | ||
@@ -139,12 +133,21 @@ _startup: | |||
139 | rsync | 133 | rsync |
140 | 134 | ||
141 | /* Initialize the caches. | 135 | /* Initialize the caches. |
142 | * Does not include flushing writeback d-cache. | 136 | * a2, a3 are just working registers (clobbered). |
143 | * a6, a7 are just working registers (clobbered). | ||
144 | */ | 137 | */ |
145 | 138 | ||
146 | icache_reset a2, a3 | 139 | #if XCHAL_DCACHE_LINE_LOCKABLE |
147 | dcache_reset a2, a3 | 140 | ___unlock_dcache_all a2 a3 |
141 | #endif | ||
142 | |||
143 | #if XCHAL_ICACHE_LINE_LOCKABLE | ||
144 | ___unlock_icache_all a2 a3 | ||
145 | #endif | ||
146 | |||
147 | ___invalidate_dcache_all a2 a3 | ||
148 | ___invalidate_icache_all a2 a3 | ||
149 | |||
150 | isync | ||
148 | 151 | ||
149 | /* Unpack data sections | 152 | /* Unpack data sections |
150 | * | 153 | * |
@@ -181,9 +184,9 @@ _startup: | |||
181 | movi a2, _bss_start # start of BSS | 184 | movi a2, _bss_start # start of BSS |
182 | movi a3, _bss_end # end of BSS | 185 | movi a3, _bss_end # end of BSS |
183 | 186 | ||
184 | 1: addi a2, a2, 4 | 187 | __loopt a2, a3, a4, 2 |
185 | s32i a0, a2, 0 | 188 | s32i a0, a2, 0 |
186 | blt a2, a3, 1b | 189 | __endla a2, a4, 4 |
187 | 190 | ||
188 | #if XCHAL_DCACHE_IS_WRITEBACK | 191 | #if XCHAL_DCACHE_IS_WRITEBACK |
189 | 192 | ||
@@ -191,7 +194,7 @@ _startup: | |||
191 | * instructions/data are available. | 194 | * instructions/data are available. |
192 | */ | 195 | */ |
193 | 196 | ||
194 | dcache_writeback_all a2, a3 | 197 | ___flush_dcache_all a2 a3 |
195 | #endif | 198 | #endif |
196 | 199 | ||
197 | /* Setup stack and enable window exceptions (keep irqs disabled) */ | 200 | /* Setup stack and enable window exceptions (keep irqs disabled) */ |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 1cf744ee0959..c9ea73b7031b 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Xtensa built-in interrupt controller and some generic functions copied | 4 | * Xtensa built-in interrupt controller and some generic functions copied |
5 | * from i386. | 5 | * from i386. |
6 | * | 6 | * |
7 | * Copyright (C) 2002 - 2005 Tensilica, Inc. | 7 | * Copyright (C) 2002 - 2006 Tensilica, Inc. |
8 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar | 8 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar |
9 | * | 9 | * |
10 | * | 10 | * |
@@ -22,11 +22,6 @@ | |||
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | #include <asm/platform.h> | 23 | #include <asm/platform.h> |
24 | 24 | ||
25 | static void enable_xtensa_irq(unsigned int irq); | ||
26 | static void disable_xtensa_irq(unsigned int irq); | ||
27 | static void mask_and_ack_xtensa(unsigned int irq); | ||
28 | static void end_xtensa_irq(unsigned int irq); | ||
29 | |||
30 | static unsigned int cached_irq_mask; | 25 | static unsigned int cached_irq_mask; |
31 | 26 | ||
32 | atomic_t irq_err_count; | 27 | atomic_t irq_err_count; |
@@ -46,8 +41,16 @@ void ack_bad_irq(unsigned int irq) | |||
46 | * handlers). | 41 | * handlers). |
47 | */ | 42 | */ |
48 | 43 | ||
49 | unsigned int do_IRQ(int irq, struct pt_regs *regs) | 44 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs) |
50 | { | 45 | { |
46 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
47 | struct irq_desc *desc = irq_desc + irq; | ||
48 | |||
49 | if (irq >= NR_IRQS) { | ||
50 | printk(KERN_EMERG "%s: cannot handle IRQ %d\n", | ||
51 | __FUNCTION__, irq); | ||
52 | } | ||
53 | |||
51 | irq_enter(); | 54 | irq_enter(); |
52 | 55 | ||
53 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 56 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
@@ -63,12 +66,10 @@ unsigned int do_IRQ(int irq, struct pt_regs *regs) | |||
63 | sp - sizeof(struct thread_info)); | 66 | sp - sizeof(struct thread_info)); |
64 | } | 67 | } |
65 | #endif | 68 | #endif |
66 | 69 | desc->handle_irq(irq, desc); | |
67 | __do_IRQ(irq, regs); | ||
68 | 70 | ||
69 | irq_exit(); | 71 | irq_exit(); |
70 | 72 | set_irq_regs(old_regs); | |
71 | return 1; | ||
72 | } | 73 | } |
73 | 74 | ||
74 | /* | 75 | /* |
@@ -118,72 +119,68 @@ skip: | |||
118 | } | 119 | } |
119 | return 0; | 120 | return 0; |
120 | } | 121 | } |
121 | /* shutdown is same as "disable" */ | ||
122 | #define shutdown_xtensa_irq disable_xtensa_irq | ||
123 | 122 | ||
124 | static unsigned int startup_xtensa_irq(unsigned int irq) | 123 | static void xtensa_irq_mask(unsigned int irq) |
125 | { | ||
126 | enable_xtensa_irq(irq); | ||
127 | return 0; /* never anything pending */ | ||
128 | } | ||
129 | |||
130 | static struct hw_interrupt_type xtensa_irq_type = { | ||
131 | "Xtensa-IRQ", | ||
132 | startup_xtensa_irq, | ||
133 | shutdown_xtensa_irq, | ||
134 | enable_xtensa_irq, | ||
135 | disable_xtensa_irq, | ||
136 | mask_and_ack_xtensa, | ||
137 | end_xtensa_irq | ||
138 | }; | ||
139 | |||
140 | static inline void mask_irq(unsigned int irq) | ||
141 | { | 124 | { |
142 | cached_irq_mask &= ~(1 << irq); | 125 | cached_irq_mask &= ~(1 << irq); |
143 | set_sr (cached_irq_mask, INTENABLE); | 126 | set_sr (cached_irq_mask, INTENABLE); |
144 | } | 127 | } |
145 | 128 | ||
146 | static inline void unmask_irq(unsigned int irq) | 129 | static void xtensa_irq_unmask(unsigned int irq) |
147 | { | 130 | { |
148 | cached_irq_mask |= 1 << irq; | 131 | cached_irq_mask |= 1 << irq; |
149 | set_sr (cached_irq_mask, INTENABLE); | 132 | set_sr (cached_irq_mask, INTENABLE); |
150 | } | 133 | } |
151 | 134 | ||
152 | static void disable_xtensa_irq(unsigned int irq) | 135 | static void xtensa_irq_ack(unsigned int irq) |
153 | { | 136 | { |
154 | unsigned long flags; | 137 | set_sr(1 << irq, INTCLEAR); |
155 | local_save_flags(flags); | ||
156 | mask_irq(irq); | ||
157 | local_irq_restore(flags); | ||
158 | } | 138 | } |
159 | 139 | ||
160 | static void enable_xtensa_irq(unsigned int irq) | 140 | static int xtensa_irq_retrigger(unsigned int irq) |
161 | { | 141 | { |
162 | unsigned long flags; | 142 | set_sr (1 << irq, INTSET); |
163 | local_save_flags(flags); | 143 | return 1; |
164 | unmask_irq(irq); | ||
165 | local_irq_restore(flags); | ||
166 | } | ||
167 | |||
168 | static void mask_and_ack_xtensa(unsigned int irq) | ||
169 | { | ||
170 | disable_xtensa_irq(irq); | ||
171 | } | 144 | } |
172 | 145 | ||
173 | static void end_xtensa_irq(unsigned int irq) | ||
174 | { | ||
175 | enable_xtensa_irq(irq); | ||
176 | } | ||
177 | 146 | ||
147 | static struct irq_chip xtensa_irq_chip = { | ||
148 | .name = "xtensa", | ||
149 | .mask = xtensa_irq_mask, | ||
150 | .unmask = xtensa_irq_unmask, | ||
151 | .ack = xtensa_irq_ack, | ||
152 | .retrigger = xtensa_irq_retrigger, | ||
153 | }; | ||
178 | 154 | ||
179 | void __init init_IRQ(void) | 155 | void __init init_IRQ(void) |
180 | { | 156 | { |
181 | int i; | 157 | int index; |
182 | 158 | ||
183 | for (i=0; i < XTENSA_NR_IRQS; i++) | 159 | for (index = 0; index < XTENSA_NR_IRQS; index++) { |
184 | irq_desc[i].chip = &xtensa_irq_type; | 160 | int mask = 1 << index; |
185 | 161 | ||
186 | cached_irq_mask = 0; | 162 | if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) |
163 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
164 | handle_simple_irq); | ||
187 | 165 | ||
188 | platform_init_irq(); | 166 | else if (mask & XCHAL_INTTYPE_MASK_EXTERN_EDGE) |
167 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
168 | handle_edge_irq); | ||
169 | |||
170 | else if (mask & XCHAL_INTTYPE_MASK_EXTERN_LEVEL) | ||
171 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
172 | handle_level_irq); | ||
173 | |||
174 | else if (mask & XCHAL_INTTYPE_MASK_TIMER) | ||
175 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
176 | handle_edge_irq); | ||
177 | |||
178 | else /* XCHAL_INTTYPE_MASK_WRITE_ERROR */ | ||
179 | /* XCHAL_INTTYPE_MASK_NMI */ | ||
180 | |||
181 | set_irq_chip_and_handler(index, &xtensa_irq_chip, | ||
182 | handle_level_irq); | ||
183 | } | ||
184 | |||
185 | cached_irq_mask = 0; | ||
189 | } | 186 | } |
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index 6648fa9d9192..ca76f071666e 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/xtensa/kernel/pci-dma.c | 2 | * arch/xtensa/pci-dma.c |
3 | * | 3 | * |
4 | * DMA coherent memory allocation. | 4 | * DMA coherent memory allocation. |
5 | * | 5 | * |
@@ -29,28 +29,48 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | void * | 31 | void * |
32 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) | 32 | dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag) |
33 | { | 33 | { |
34 | void *ret; | 34 | unsigned long ret; |
35 | unsigned long uncached = 0; | ||
35 | 36 | ||
36 | /* ignore region speicifiers */ | 37 | /* ignore region speicifiers */ |
37 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
38 | 38 | ||
39 | if (dev == NULL || (*dev->dma_mask < 0xffffffff)) | 39 | flag &= ~(__GFP_DMA | __GFP_HIGHMEM); |
40 | gfp |= GFP_DMA; | ||
41 | ret = (void *)__get_free_pages(gfp, get_order(size)); | ||
42 | 40 | ||
43 | if (ret != NULL) { | 41 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) |
44 | memset(ret, 0, size); | 42 | flag |= GFP_DMA; |
45 | *handle = virt_to_bus(ret); | 43 | ret = (unsigned long)__get_free_pages(flag, get_order(size)); |
44 | |||
45 | if (ret == 0) | ||
46 | return NULL; | ||
47 | |||
48 | /* We currently don't support coherent memory outside KSEG */ | ||
49 | |||
50 | if (ret < XCHAL_KSEG_CACHED_VADDR | ||
51 | || ret >= XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE) | ||
52 | BUG(); | ||
53 | |||
54 | |||
55 | if (ret != 0) { | ||
56 | memset((void*) ret, 0, size); | ||
57 | uncached = ret+XCHAL_KSEG_BYPASS_VADDR-XCHAL_KSEG_CACHED_VADDR; | ||
58 | *handle = virt_to_bus((void*)ret); | ||
59 | __flush_invalidate_dcache_range(ret, size); | ||
46 | } | 60 | } |
47 | return (void*) BYPASS_ADDR((unsigned long)ret); | 61 | |
62 | return (void*)uncached; | ||
48 | } | 63 | } |
49 | 64 | ||
50 | void dma_free_coherent(struct device *hwdev, size_t size, | 65 | void dma_free_coherent(struct device *hwdev, size_t size, |
51 | void *vaddr, dma_addr_t dma_handle) | 66 | void *vaddr, dma_addr_t dma_handle) |
52 | { | 67 | { |
53 | free_pages(CACHED_ADDR((unsigned long)vaddr), get_order(size)); | 68 | long addr=(long)vaddr+XCHAL_KSEG_CACHED_VADDR-XCHAL_KSEG_BYPASS_VADDR; |
69 | |||
70 | if (addr < 0 || addr >= XCHAL_KSEG_SIZE) | ||
71 | BUG(); | ||
72 | |||
73 | free_pages(addr, get_order(size)); | ||
54 | } | 74 | } |
55 | 75 | ||
56 | 76 | ||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index a7c4178c2a8c..795bd5ac6f4c 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -1,4 +1,3 @@ | |||
1 | // TODO verify coprocessor handling | ||
2 | /* | 1 | /* |
3 | * arch/xtensa/kernel/process.c | 2 | * arch/xtensa/kernel/process.c |
4 | * | 3 | * |
@@ -43,7 +42,7 @@ | |||
43 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
44 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
45 | #include <asm/asm-offsets.h> | 44 | #include <asm/asm-offsets.h> |
46 | #include <asm/coprocessor.h> | 45 | #include <asm/regs.h> |
47 | 46 | ||
48 | extern void ret_from_fork(void); | 47 | extern void ret_from_fork(void); |
49 | 48 | ||
@@ -67,25 +66,6 @@ void (*pm_power_off)(void) = NULL; | |||
67 | EXPORT_SYMBOL(pm_power_off); | 66 | EXPORT_SYMBOL(pm_power_off); |
68 | 67 | ||
69 | 68 | ||
70 | #if XCHAL_CP_NUM > 0 | ||
71 | |||
72 | /* | ||
73 | * Coprocessor ownership. | ||
74 | */ | ||
75 | |||
76 | coprocessor_info_t coprocessor_info[] = { | ||
77 | { 0, XTENSA_CPE_CP0_OFFSET }, | ||
78 | { 0, XTENSA_CPE_CP1_OFFSET }, | ||
79 | { 0, XTENSA_CPE_CP2_OFFSET }, | ||
80 | { 0, XTENSA_CPE_CP3_OFFSET }, | ||
81 | { 0, XTENSA_CPE_CP4_OFFSET }, | ||
82 | { 0, XTENSA_CPE_CP5_OFFSET }, | ||
83 | { 0, XTENSA_CPE_CP6_OFFSET }, | ||
84 | { 0, XTENSA_CPE_CP7_OFFSET }, | ||
85 | }; | ||
86 | |||
87 | #endif | ||
88 | |||
89 | /* | 69 | /* |
90 | * Powermanagement idle function, if any is provided by the platform. | 70 | * Powermanagement idle function, if any is provided by the platform. |
91 | */ | 71 | */ |
@@ -110,12 +90,10 @@ void cpu_idle(void) | |||
110 | 90 | ||
111 | void exit_thread(void) | 91 | void exit_thread(void) |
112 | { | 92 | { |
113 | release_coprocessors(current); /* Empty macro if no CPs are defined */ | ||
114 | } | 93 | } |
115 | 94 | ||
116 | void flush_thread(void) | 95 | void flush_thread(void) |
117 | { | 96 | { |
118 | release_coprocessors(current); /* Empty macro if no CPs are defined */ | ||
119 | } | 97 | } |
120 | 98 | ||
121 | /* | 99 | /* |
@@ -183,36 +161,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
183 | 161 | ||
184 | 162 | ||
185 | /* | 163 | /* |
186 | * Create a kernel thread | ||
187 | */ | ||
188 | |||
189 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
190 | { | ||
191 | long retval; | ||
192 | __asm__ __volatile__ | ||
193 | ("mov a5, %4\n\t" /* preserve fn in a5 */ | ||
194 | "mov a6, %3\n\t" /* preserve and setup arg in a6 */ | ||
195 | "movi a2, %1\n\t" /* load __NR_clone for syscall*/ | ||
196 | "mov a3, sp\n\t" /* sp check and sys_clone */ | ||
197 | "mov a4, %5\n\t" /* load flags for syscall */ | ||
198 | "syscall\n\t" | ||
199 | "beq a3, sp, 1f\n\t" /* branch if parent */ | ||
200 | "callx4 a5\n\t" /* call fn */ | ||
201 | "movi a2, %2\n\t" /* load __NR_exit for syscall */ | ||
202 | "mov a3, a6\n\t" /* load fn return value */ | ||
203 | "syscall\n" | ||
204 | "1:\n\t" | ||
205 | "mov %0, a2\n\t" /* parent returns zero */ | ||
206 | :"=r" (retval) | ||
207 | :"i" (__NR_clone), "i" (__NR_exit), | ||
208 | "r" (arg), "r" (fn), | ||
209 | "r" (flags | CLONE_VM) | ||
210 | : "a2", "a3", "a4", "a5", "a6" ); | ||
211 | return retval; | ||
212 | } | ||
213 | |||
214 | |||
215 | /* | ||
216 | * These bracket the sleeping functions.. | 164 | * These bracket the sleeping functions.. |
217 | */ | 165 | */ |
218 | 166 | ||
@@ -275,7 +223,7 @@ void do_copy_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs, | |||
275 | */ | 223 | */ |
276 | 224 | ||
277 | elfregs->pc = regs->pc; | 225 | elfregs->pc = regs->pc; |
278 | elfregs->ps = (regs->ps & ~XCHAL_PS_EXCM_MASK); | 226 | elfregs->ps = (regs->ps & ~(1 << PS_EXCM_BIT)); |
279 | elfregs->exccause = regs->exccause; | 227 | elfregs->exccause = regs->exccause; |
280 | elfregs->excvaddr = regs->excvaddr; | 228 | elfregs->excvaddr = regs->excvaddr; |
281 | elfregs->windowbase = regs->windowbase; | 229 | elfregs->windowbase = regs->windowbase; |
@@ -325,7 +273,7 @@ void do_restore_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs, | |||
325 | */ | 273 | */ |
326 | 274 | ||
327 | regs->pc = elfregs->pc; | 275 | regs->pc = elfregs->pc; |
328 | regs->ps = (elfregs->ps | XCHAL_PS_EXCM_MASK); | 276 | regs->ps = (elfregs->ps | (1 << PS_EXCM_BIT)); |
329 | regs->exccause = elfregs->exccause; | 277 | regs->exccause = elfregs->exccause; |
330 | regs->excvaddr = elfregs->excvaddr; | 278 | regs->excvaddr = elfregs->excvaddr; |
331 | regs->windowbase = elfregs->windowbase; | 279 | regs->windowbase = elfregs->windowbase; |
@@ -459,16 +407,7 @@ int do_restore_fpregs (elf_fpregset_t *fpregs, struct pt_regs *regs, | |||
459 | int | 407 | int |
460 | dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r) | 408 | dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r) |
461 | { | 409 | { |
462 | /* see asm/coprocessor.h for this magic number 16 */ | ||
463 | #if XTENSA_CP_EXTRA_SIZE > 16 | ||
464 | do_save_fpregs (r, regs, task); | ||
465 | |||
466 | /* For now, bit 16 means some extra state may be present: */ | ||
467 | // FIXME!! need to track to return more accurate mask | ||
468 | return 0x10000 | XCHAL_CP_MASK; | ||
469 | #else | ||
470 | return 0; /* no coprocessors active on this processor */ | 410 | return 0; /* no coprocessors active on this processor */ |
471 | #endif | ||
472 | } | 411 | } |
473 | 412 | ||
474 | /* | 413 | /* |
@@ -483,3 +422,44 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r) | |||
483 | { | 422 | { |
484 | return dump_task_fpu(regs, current, r); | 423 | return dump_task_fpu(regs, current, r); |
485 | } | 424 | } |
425 | |||
426 | asmlinkage | ||
427 | long xtensa_clone(unsigned long clone_flags, unsigned long newsp, | ||
428 | void __user *parent_tid, void *child_tls, | ||
429 | void __user *child_tid, long a5, | ||
430 | struct pt_regs *regs) | ||
431 | { | ||
432 | if (!newsp) | ||
433 | newsp = regs->areg[1]; | ||
434 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | ||
435 | } | ||
436 | |||
437 | /* | ||
438 | * * xtensa_execve() executes a new program. | ||
439 | * */ | ||
440 | |||
441 | asmlinkage | ||
442 | long xtensa_execve(char __user *name, char __user * __user *argv, | ||
443 | char __user * __user *envp, | ||
444 | long a3, long a4, long a5, | ||
445 | struct pt_regs *regs) | ||
446 | { | ||
447 | long error; | ||
448 | char * filename; | ||
449 | |||
450 | filename = getname(name); | ||
451 | error = PTR_ERR(filename); | ||
452 | if (IS_ERR(filename)) | ||
453 | goto out; | ||
454 | // FIXME: release coprocessor?? | ||
455 | error = do_execve(filename, argv, envp, regs); | ||
456 | if (error == 0) { | ||
457 | task_lock(current); | ||
458 | current->ptrace &= ~PT_DTRACE; | ||
459 | task_unlock(current); | ||
460 | } | ||
461 | putname(filename); | ||
462 | out: | ||
463 | return error; | ||
464 | } | ||
465 | |||
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9aea23cc0dc5..8b6d3d0623b6 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -96,7 +96,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
96 | /* Note: PS.EXCM is not set while user task is running; | 96 | /* Note: PS.EXCM is not set while user task is running; |
97 | * its being set in regs is for exception handling | 97 | * its being set in regs is for exception handling |
98 | * convenience. */ | 98 | * convenience. */ |
99 | tmp = (regs->ps & ~XCHAL_PS_EXCM_MASK); | 99 | tmp = (regs->ps & ~(1 << PS_EXCM_BIT)); |
100 | break; | 100 | break; |
101 | case REG_WB: | 101 | case REG_WB: |
102 | tmp = regs->windowbase; | 102 | tmp = regs->windowbase; |
@@ -332,12 +332,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
332 | 332 | ||
333 | void do_syscall_trace(void) | 333 | void do_syscall_trace(void) |
334 | { | 334 | { |
335 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
336 | return; | ||
337 | |||
338 | if (!(current->ptrace & PT_PTRACED)) | ||
339 | return; | ||
340 | |||
341 | /* | 335 | /* |
342 | * The 0x80 provides a way for the tracing parent to distinguish | 336 | * The 0x80 provides a way for the tracing parent to distinguish |
343 | * between a syscall stop and SIGTRAP delivery | 337 | * between a syscall stop and SIGTRAP delivery |
@@ -354,3 +348,23 @@ void do_syscall_trace(void) | |||
354 | current->exit_code = 0; | 348 | current->exit_code = 0; |
355 | } | 349 | } |
356 | } | 350 | } |
351 | |||
352 | void do_syscall_trace_enter(struct pt_regs *regs) | ||
353 | { | ||
354 | if (test_thread_flag(TIF_SYSCALL_TRACE) | ||
355 | && (current->ptrace & PT_PTRACED)) | ||
356 | do_syscall_trace(); | ||
357 | |||
358 | #if 0 | ||
359 | if (unlikely(current->audit_context)) | ||
360 | audit_syscall_entry(current, AUDIT_ARCH_XTENSA..); | ||
361 | #endif | ||
362 | } | ||
363 | |||
364 | void do_syscall_trace_leave(struct pt_regs *regs) | ||
365 | { | ||
366 | if ((test_thread_flag(TIF_SYSCALL_TRACE)) | ||
367 | && (current->ptrace & PT_PTRACED)) | ||
368 | do_syscall_trace(); | ||
369 | } | ||
370 | |||
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index c99ab72b41b6..b6374c09de20 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -42,8 +42,6 @@ | |||
42 | #include <asm/page.h> | 42 | #include <asm/page.h> |
43 | #include <asm/setup.h> | 43 | #include <asm/setup.h> |
44 | 44 | ||
45 | #include <xtensa/config/system.h> | ||
46 | |||
47 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | 45 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) |
48 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; | 46 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; |
49 | #endif | 47 | #endif |
@@ -336,7 +334,7 @@ c_show(struct seq_file *f, void *slot) | |||
336 | /* high-level stuff */ | 334 | /* high-level stuff */ |
337 | seq_printf(f,"processor\t: 0\n" | 335 | seq_printf(f,"processor\t: 0\n" |
338 | "vendor_id\t: Tensilica\n" | 336 | "vendor_id\t: Tensilica\n" |
339 | "model\t\t: Xtensa " XCHAL_HW_RELEASE_NAME "\n" | 337 | "model\t\t: Xtensa " XCHAL_HW_VERSION_NAME "\n" |
340 | "core ID\t\t: " XCHAL_CORE_ID "\n" | 338 | "core ID\t\t: " XCHAL_CORE_ID "\n" |
341 | "build ID\t: 0x%x\n" | 339 | "build ID\t: 0x%x\n" |
342 | "byte order\t: %s\n" | 340 | "byte order\t: %s\n" |
@@ -420,25 +418,6 @@ c_show(struct seq_file *f, void *slot) | |||
420 | XCHAL_NUM_TIMERS, | 418 | XCHAL_NUM_TIMERS, |
421 | XCHAL_DEBUGLEVEL); | 419 | XCHAL_DEBUGLEVEL); |
422 | 420 | ||
423 | /* Coprocessors */ | ||
424 | #if XCHAL_HAVE_CP | ||
425 | seq_printf(f, "coprocessors\t: %d\n", XCHAL_CP_NUM); | ||
426 | #else | ||
427 | seq_printf(f, "coprocessors\t: none\n"); | ||
428 | #endif | ||
429 | |||
430 | /* {I,D}{RAM,ROM} and XLMI */ | ||
431 | seq_printf(f,"inst ROMs\t: %d\n" | ||
432 | "inst RAMs\t: %d\n" | ||
433 | "data ROMs\t: %d\n" | ||
434 | "data RAMs\t: %d\n" | ||
435 | "XLMI ports\t: %d\n", | ||
436 | XCHAL_NUM_IROM, | ||
437 | XCHAL_NUM_IRAM, | ||
438 | XCHAL_NUM_DROM, | ||
439 | XCHAL_NUM_DRAM, | ||
440 | XCHAL_NUM_XLMI); | ||
441 | |||
442 | /* Cache */ | 421 | /* Cache */ |
443 | seq_printf(f,"icache line size: %d\n" | 422 | seq_printf(f,"icache line size: %d\n" |
444 | "icache ways\t: %d\n" | 423 | "icache ways\t: %d\n" |
@@ -466,24 +445,6 @@ c_show(struct seq_file *f, void *slot) | |||
466 | XCHAL_DCACHE_WAYS, | 445 | XCHAL_DCACHE_WAYS, |
467 | XCHAL_DCACHE_SIZE); | 446 | XCHAL_DCACHE_SIZE); |
468 | 447 | ||
469 | /* MMU */ | ||
470 | seq_printf(f,"ASID bits\t: %d\n" | ||
471 | "ASID invalid\t: %d\n" | ||
472 | "ASID kernel\t: %d\n" | ||
473 | "rings\t\t: %d\n" | ||
474 | "itlb ways\t: %d\n" | ||
475 | "itlb AR ways\t: %d\n" | ||
476 | "dtlb ways\t: %d\n" | ||
477 | "dtlb AR ways\t: %d\n", | ||
478 | XCHAL_MMU_ASID_BITS, | ||
479 | XCHAL_MMU_ASID_INVALID, | ||
480 | XCHAL_MMU_ASID_KERNEL, | ||
481 | XCHAL_MMU_RINGS, | ||
482 | XCHAL_ITLB_WAYS, | ||
483 | XCHAL_ITLB_ARF_WAYS, | ||
484 | XCHAL_DTLB_WAYS, | ||
485 | XCHAL_DTLB_ARF_WAYS); | ||
486 | |||
487 | return 0; | 448 | return 0; |
488 | } | 449 | } |
489 | 450 | ||
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c494f0826fc5..c6d9880a4cdb 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -12,8 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <xtensa/config/core.h> | 15 | #include <asm/variant/core.h> |
16 | #include <xtensa/hal.h> | 16 | #include <asm/coprocessor.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
@@ -46,7 +46,7 @@ extern struct task_struct *coproc_owners[]; | |||
46 | * Atomically swap in the new signal mask, and wait for a signal. | 46 | * Atomically swap in the new signal mask, and wait for a signal. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | int sys_sigsuspend(struct pt_regs *regs) | 49 | int xtensa_sigsuspend(struct pt_regs *regs) |
50 | { | 50 | { |
51 | old_sigset_t mask = (old_sigset_t) regs->areg[3]; | 51 | old_sigset_t mask = (old_sigset_t) regs->areg[3]; |
52 | sigset_t saveset; | 52 | sigset_t saveset; |
@@ -68,7 +68,7 @@ int sys_sigsuspend(struct pt_regs *regs) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | asmlinkage int | 70 | asmlinkage int |
71 | sys_rt_sigsuspend(struct pt_regs *regs) | 71 | xtensa_rt_sigsuspend(struct pt_regs *regs) |
72 | { | 72 | { |
73 | sigset_t *unewset = (sigset_t *) regs->areg[4]; | 73 | sigset_t *unewset = (sigset_t *) regs->areg[4]; |
74 | size_t sigsetsize = (size_t) regs->areg[3]; | 74 | size_t sigsetsize = (size_t) regs->areg[3]; |
@@ -96,7 +96,7 @@ sys_rt_sigsuspend(struct pt_regs *regs) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | asmlinkage int | 98 | asmlinkage int |
99 | sys_sigaction(int sig, const struct old_sigaction *act, | 99 | xtensa_sigaction(int sig, const struct old_sigaction *act, |
100 | struct old_sigaction *oact) | 100 | struct old_sigaction *oact) |
101 | { | 101 | { |
102 | struct k_sigaction new_ka, old_ka; | 102 | struct k_sigaction new_ka, old_ka; |
@@ -128,7 +128,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, | |||
128 | } | 128 | } |
129 | 129 | ||
130 | asmlinkage int | 130 | asmlinkage int |
131 | sys_sigaltstack(struct pt_regs *regs) | 131 | xtensa_sigaltstack(struct pt_regs *regs) |
132 | { | 132 | { |
133 | const stack_t *uss = (stack_t *) regs->areg[4]; | 133 | const stack_t *uss = (stack_t *) regs->areg[4]; |
134 | stack_t *uoss = (stack_t *) regs->areg[3]; | 134 | stack_t *uoss = (stack_t *) regs->areg[3]; |
@@ -216,8 +216,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) | |||
216 | * handler, or the user mode value doesn't matter (e.g. PS.OWB). | 216 | * handler, or the user mode value doesn't matter (e.g. PS.OWB). |
217 | */ | 217 | */ |
218 | err |= __get_user(ps, &sc->sc_ps); | 218 | err |= __get_user(ps, &sc->sc_ps); |
219 | regs->ps = (regs->ps & ~XCHAL_PS_CALLINC_MASK) | 219 | regs->ps = (regs->ps & ~PS_CALLINC_MASK) |
220 | | (ps & XCHAL_PS_CALLINC_MASK); | 220 | | (ps & PS_CALLINC_MASK); |
221 | 221 | ||
222 | /* Additional corruption checks */ | 222 | /* Additional corruption checks */ |
223 | 223 | ||
@@ -280,7 +280,7 @@ flush_my_cpstate(struct task_struct *tsk) | |||
280 | static int | 280 | static int |
281 | save_cpextra (struct _cpstate *buf) | 281 | save_cpextra (struct _cpstate *buf) |
282 | { | 282 | { |
283 | #if (XCHAL_EXTRA_SA_SIZE == 0) && (XCHAL_CP_NUM == 0) | 283 | #if XCHAL_CP_NUM == 0 |
284 | return 0; | 284 | return 0; |
285 | #else | 285 | #else |
286 | 286 | ||
@@ -350,7 +350,7 @@ setup_sigcontext(struct sigcontext *sc, struct _cpstate *cpstate, | |||
350 | return err; | 350 | return err; |
351 | } | 351 | } |
352 | 352 | ||
353 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | 353 | asmlinkage int xtensa_sigreturn(struct pt_regs *regs) |
354 | { | 354 | { |
355 | struct sigframe *frame = (struct sigframe *)regs->areg[1]; | 355 | struct sigframe *frame = (struct sigframe *)regs->areg[1]; |
356 | sigset_t set; | 356 | sigset_t set; |
@@ -382,7 +382,7 @@ badframe: | |||
382 | return 0; | 382 | return 0; |
383 | } | 383 | } |
384 | 384 | ||
385 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | 385 | asmlinkage int xtensa_rt_sigreturn(struct pt_regs *regs) |
386 | { | 386 | { |
387 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->areg[1]; | 387 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->areg[1]; |
388 | sigset_t set; | 388 | sigset_t set; |
@@ -497,8 +497,10 @@ gen_return_code(unsigned char *codemem, unsigned int use_rt_sigreturn) | |||
497 | 497 | ||
498 | /* Flush generated code out of the data cache */ | 498 | /* Flush generated code out of the data cache */ |
499 | 499 | ||
500 | if (err == 0) | 500 | if (err == 0) { |
501 | __flush_invalidate_cache_range((unsigned long)codemem, 6UL); | 501 | __invalidate_icache_range((unsigned long)codemem, 6UL); |
502 | __flush_invalidate_dcache_range((unsigned long)codemem, 6UL); | ||
503 | } | ||
502 | 504 | ||
503 | return err; | 505 | return err; |
504 | } | 506 | } |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c new file mode 100644 index 000000000000..418268f49766 --- /dev/null +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscall.c | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
10 | * Copyright (C) 1995 - 2000 by Ralf Baechle | ||
11 | * | ||
12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> | ||
13 | * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca> | ||
14 | * Chris Zankel <chris@zankel.net> | ||
15 | * Kevin Chea | ||
16 | * | ||
17 | */ | ||
18 | #include <asm/uaccess.h> | ||
19 | #include <asm/syscalls.h> | ||
20 | #include <asm/unistd.h> | ||
21 | #include <linux/linkage.h> | ||
22 | #include <linux/stringify.h> | ||
23 | #include <linux/errno.h> | ||
24 | #include <linux/syscalls.h> | ||
25 | #include <linux/file.h> | ||
26 | #include <linux/fs.h> | ||
27 | #include <linux/mman.h> | ||
28 | #include <linux/shm.h> | ||
29 | |||
30 | typedef void (*syscall_t)(void); | ||
31 | |||
32 | syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { | ||
33 | [0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall, | ||
34 | |||
35 | #undef __SYSCALL | ||
36 | #define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, | ||
37 | #undef _XTENSA_UNISTD_H | ||
38 | #undef __KERNEL_SYSCALLS__ | ||
39 | #include <asm/unistd.h> | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * xtensa_pipe() is the normal C calling standard for creating a pipe. It's not | ||
44 | * the way unix traditional does this, though. | ||
45 | */ | ||
46 | |||
47 | asmlinkage long xtensa_pipe(int __user *userfds) | ||
48 | { | ||
49 | int fd[2]; | ||
50 | int error; | ||
51 | |||
52 | error = do_pipe(fd); | ||
53 | if (!error) { | ||
54 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | ||
55 | error = -EFAULT; | ||
56 | } | ||
57 | return error; | ||
58 | } | ||
59 | |||
60 | |||
61 | asmlinkage long xtensa_mmap2(unsigned long addr, unsigned long len, | ||
62 | unsigned long prot, unsigned long flags, | ||
63 | unsigned long fd, unsigned long pgoff) | ||
64 | { | ||
65 | int error = -EBADF; | ||
66 | struct file * file = NULL; | ||
67 | |||
68 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
69 | if (!(flags & MAP_ANONYMOUS)) { | ||
70 | file = fget(fd); | ||
71 | if (!file) | ||
72 | goto out; | ||
73 | } | ||
74 | |||
75 | down_write(¤t->mm->mmap_sem); | ||
76 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
77 | up_write(¤t->mm->mmap_sem); | ||
78 | |||
79 | if (file) | ||
80 | fput(file); | ||
81 | out: | ||
82 | return error; | ||
83 | } | ||
84 | |||
85 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | ||
86 | { | ||
87 | unsigned long ret; | ||
88 | long err; | ||
89 | |||
90 | err = do_shmat(shmid, shmaddr, shmflg, &ret); | ||
91 | if (err) | ||
92 | return err; | ||
93 | return (long)ret; | ||
94 | } | ||
95 | |||
diff --git a/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c deleted file mode 100644 index f49cb239e603..000000000000 --- a/arch/xtensa/kernel/syscalls.c +++ /dev/null | |||
@@ -1,288 +0,0 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscalls.c | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | * Copyright (C) 2000 Silicon Graphics, Inc. | ||
10 | * Copyright (C) 1995 - 2000 by Ralf Baechle | ||
11 | * | ||
12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> | ||
13 | * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca> | ||
14 | * Chris Zankel <chris@zankel.net> | ||
15 | * Kevin Chea | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #define DEBUG 0 | ||
20 | |||
21 | #include <linux/linkage.h> | ||
22 | #include <linux/mm.h> | ||
23 | #include <linux/smp.h> | ||
24 | #include <linux/smp_lock.h> | ||
25 | #include <linux/mman.h> | ||
26 | #include <linux/sched.h> | ||
27 | #include <linux/file.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/utsname.h> | ||
30 | #include <linux/unistd.h> | ||
31 | #include <linux/stringify.h> | ||
32 | #include <linux/syscalls.h> | ||
33 | #include <linux/sem.h> | ||
34 | #include <linux/msg.h> | ||
35 | #include <linux/shm.h> | ||
36 | #include <linux/errno.h> | ||
37 | #include <asm/ptrace.h> | ||
38 | #include <asm/signal.h> | ||
39 | #include <asm/uaccess.h> | ||
40 | #include <asm/hardirq.h> | ||
41 | #include <asm/mman.h> | ||
42 | #include <asm/shmparam.h> | ||
43 | #include <asm/page.h> | ||
44 | |||
45 | extern void do_syscall_trace(void); | ||
46 | typedef int (*syscall_t)(void *a0,...); | ||
47 | extern syscall_t sys_call_table[]; | ||
48 | extern unsigned char sys_narg_table[]; | ||
49 | |||
50 | /* | ||
51 | * sys_pipe() is the normal C calling standard for creating a pipe. It's not | ||
52 | * the way unix traditional does this, though. | ||
53 | */ | ||
54 | |||
55 | int sys_pipe(int __user *userfds) | ||
56 | { | ||
57 | int fd[2]; | ||
58 | int error; | ||
59 | |||
60 | error = do_pipe(fd); | ||
61 | if (!error) { | ||
62 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | ||
63 | error = -EFAULT; | ||
64 | } | ||
65 | return error; | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * Common code for old and new mmaps. | ||
70 | */ | ||
71 | long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, | ||
72 | unsigned long flags, unsigned long fd, unsigned long pgoff) | ||
73 | { | ||
74 | int error = -EBADF; | ||
75 | struct file * file = NULL; | ||
76 | |||
77 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
78 | if (!(flags & MAP_ANONYMOUS)) { | ||
79 | file = fget(fd); | ||
80 | if (!file) | ||
81 | goto out; | ||
82 | } | ||
83 | |||
84 | down_write(¤t->mm->mmap_sem); | ||
85 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
86 | up_write(¤t->mm->mmap_sem); | ||
87 | |||
88 | if (file) | ||
89 | fput(file); | ||
90 | out: | ||
91 | return error; | ||
92 | } | ||
93 | |||
94 | int sys_clone(struct pt_regs *regs) | ||
95 | { | ||
96 | unsigned long clone_flags; | ||
97 | unsigned long newsp; | ||
98 | int __user *parent_tidptr, *child_tidptr; | ||
99 | clone_flags = regs->areg[4]; | ||
100 | newsp = regs->areg[3]; | ||
101 | parent_tidptr = (int __user *)regs->areg[5]; | ||
102 | child_tidptr = (int __user *)regs->areg[6]; | ||
103 | if (!newsp) | ||
104 | newsp = regs->areg[1]; | ||
105 | return do_fork(clone_flags,newsp,regs,0,parent_tidptr,child_tidptr); | ||
106 | } | ||
107 | |||
108 | /* | ||
109 | * sys_execve() executes a new program. | ||
110 | */ | ||
111 | |||
112 | int sys_execve(struct pt_regs *regs) | ||
113 | { | ||
114 | int error; | ||
115 | char * filename; | ||
116 | |||
117 | filename = getname((char *) (long)regs->areg[5]); | ||
118 | error = PTR_ERR(filename); | ||
119 | if (IS_ERR(filename)) | ||
120 | goto out; | ||
121 | error = do_execve(filename, (char **) (long)regs->areg[3], | ||
122 | (char **) (long)regs->areg[4], regs); | ||
123 | putname(filename); | ||
124 | |||
125 | out: | ||
126 | return error; | ||
127 | } | ||
128 | |||
129 | int sys_uname(struct old_utsname * name) | ||
130 | { | ||
131 | if (name && !copy_to_user(name, utsname(), sizeof (*name))) | ||
132 | return 0; | ||
133 | return -EFAULT; | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Build the string table for the builtin "poor man's strace". | ||
138 | */ | ||
139 | |||
140 | #if DEBUG | ||
141 | #define SYSCALL(fun, narg) #fun, | ||
142 | static char *sfnames[] = { | ||
143 | #include "syscalls.h" | ||
144 | }; | ||
145 | #undef SYS | ||
146 | #endif | ||
147 | |||
148 | void system_call (struct pt_regs *regs) | ||
149 | { | ||
150 | syscall_t syscall; | ||
151 | unsigned long parm0, parm1, parm2, parm3, parm4, parm5; | ||
152 | int nargs, res; | ||
153 | unsigned int syscallnr; | ||
154 | int ps; | ||
155 | |||
156 | #if DEBUG | ||
157 | int i; | ||
158 | unsigned long parms[6]; | ||
159 | char *sysname; | ||
160 | #endif | ||
161 | |||
162 | regs->syscall = regs->areg[2]; | ||
163 | |||
164 | do_syscall_trace(); | ||
165 | |||
166 | /* Have to load after syscall_trace because strace | ||
167 | * sometimes changes regs->syscall. | ||
168 | */ | ||
169 | syscallnr = regs->syscall; | ||
170 | |||
171 | parm0 = parm1 = parm2 = parm3 = parm4 = parm5 = 0; | ||
172 | |||
173 | /* Restore interrupt level to syscall invoker's. | ||
174 | * If this were in assembly, we wouldn't disable | ||
175 | * interrupts in the first place: | ||
176 | */ | ||
177 | local_save_flags (ps); | ||
178 | local_irq_restore((ps & ~XCHAL_PS_INTLEVEL_MASK) | | ||
179 | (regs->ps & XCHAL_PS_INTLEVEL_MASK) ); | ||
180 | |||
181 | if (syscallnr > __NR_Linux_syscalls) { | ||
182 | regs->areg[2] = -ENOSYS; | ||
183 | return; | ||
184 | } | ||
185 | |||
186 | syscall = sys_call_table[syscallnr]; | ||
187 | nargs = sys_narg_table[syscallnr]; | ||
188 | |||
189 | if (syscall == NULL) { | ||
190 | regs->areg[2] = -ENOSYS; | ||
191 | return; | ||
192 | } | ||
193 | |||
194 | /* There shouldn't be more than six arguments in the table! */ | ||
195 | |||
196 | if (nargs > 6) | ||
197 | panic("Internal error - too many syscall arguments (%d)!\n", | ||
198 | nargs); | ||
199 | |||
200 | /* Linux takes system-call arguments in registers. The ABI | ||
201 | * and Xtensa software conventions require the system-call | ||
202 | * number in a2. If an argument exists in a2, we move it to | ||
203 | * the next available register. Note that for improved | ||
204 | * efficiency, we do NOT shift all parameters down one | ||
205 | * register to maintain the original order. | ||
206 | * | ||
207 | * At best case (zero arguments), we just write the syscall | ||
208 | * number to a2. At worst case (1 to 6 arguments), we move | ||
209 | * the argument in a2 to the next available register, then | ||
210 | * write the syscall number to a2. | ||
211 | * | ||
212 | * For clarity, the following truth table enumerates all | ||
213 | * possibilities. | ||
214 | * | ||
215 | * arguments syscall number arg0, arg1, arg2, arg3, arg4, arg5 | ||
216 | * --------- -------------- ---------------------------------- | ||
217 | * 0 a2 | ||
218 | * 1 a2 a3 | ||
219 | * 2 a2 a4, a3 | ||
220 | * 3 a2 a5, a3, a4 | ||
221 | * 4 a2 a6, a3, a4, a5 | ||
222 | * 5 a2 a7, a3, a4, a5, a6 | ||
223 | * 6 a2 a8, a3, a4, a5, a6, a7 | ||
224 | */ | ||
225 | if (nargs) { | ||
226 | parm0 = regs->areg[nargs+2]; | ||
227 | parm1 = regs->areg[3]; | ||
228 | parm2 = regs->areg[4]; | ||
229 | parm3 = regs->areg[5]; | ||
230 | parm4 = regs->areg[6]; | ||
231 | parm5 = regs->areg[7]; | ||
232 | } else /* nargs == 0 */ | ||
233 | parm0 = (unsigned long) regs; | ||
234 | |||
235 | #if DEBUG | ||
236 | parms[0] = parm0; | ||
237 | parms[1] = parm1; | ||
238 | parms[2] = parm2; | ||
239 | parms[3] = parm3; | ||
240 | parms[4] = parm4; | ||
241 | parms[5] = parm5; | ||
242 | |||
243 | sysname = sfnames[syscallnr]; | ||
244 | if (strncmp(sysname, "sys_", 4) == 0) | ||
245 | sysname = sysname + 4; | ||
246 | |||
247 | printk("\017SYSCALL:I:%x:%d:%s %s(", regs->pc, current->pid, | ||
248 | current->comm, sysname); | ||
249 | for (i = 0; i < nargs; i++) | ||
250 | printk((i>0) ? ", %#lx" : "%#lx", parms[i]); | ||
251 | printk(")\n"); | ||
252 | #endif | ||
253 | |||
254 | res = syscall((void *)parm0, parm1, parm2, parm3, parm4, parm5); | ||
255 | |||
256 | #if DEBUG | ||
257 | printk("\017SYSCALL:O:%d:%s %s(",current->pid, current->comm, sysname); | ||
258 | for (i = 0; i < nargs; i++) | ||
259 | printk((i>0) ? ", %#lx" : "%#lx", parms[i]); | ||
260 | if (res < 4096) | ||
261 | printk(") = %d\n", res); | ||
262 | else | ||
263 | printk(") = %#x\n", res); | ||
264 | #endif /* DEBUG */ | ||
265 | |||
266 | regs->areg[2] = res; | ||
267 | do_syscall_trace(); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * Do a system call from kernel instead of calling sys_execve so we | ||
272 | * end up with proper pt_regs. | ||
273 | */ | ||
274 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
275 | { | ||
276 | long __res; | ||
277 | asm volatile ( | ||
278 | " mov a5, %2 \n" | ||
279 | " mov a4, %4 \n" | ||
280 | " mov a3, %3 \n" | ||
281 | " movi a2, %1 \n" | ||
282 | " syscall \n" | ||
283 | " mov %0, a2 \n" | ||
284 | : "=a" (__res) | ||
285 | : "i" (__NR_execve), "a" (filename), "a" (argv), "a" (envp) | ||
286 | : "a2", "a3", "a4", "a5"); | ||
287 | return __res; | ||
288 | } | ||
diff --git a/arch/xtensa/kernel/syscalls.h b/arch/xtensa/kernel/syscalls.h deleted file mode 100644 index 216c10a31501..000000000000 --- a/arch/xtensa/kernel/syscalls.h +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /* | ||
2 | * arch/xtensa/kernel/syscalls.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle | ||
9 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
10 | * | ||
11 | * Changes by Joe Taylor <joe@tensilica.com> | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * This file is being included twice - once to build a list of all | ||
16 | * syscalls and once to build a table of how many arguments each syscall | ||
17 | * accepts. Syscalls that receive a pointer to the saved registers are | ||
18 | * marked as having zero arguments. | ||
19 | * | ||
20 | * The binary compatibility calls are in a separate list. | ||
21 | * | ||
22 | * Entry '0' used to be system_call. It's removed to disable indirect | ||
23 | * system calls for now so user tasks can't recurse. See mips' | ||
24 | * sys_syscall for a comparable example. | ||
25 | */ | ||
26 | |||
27 | SYSCALL(0, 0) /* 00 */ | ||
28 | SYSCALL(sys_exit, 1) | ||
29 | SYSCALL(sys_ni_syscall, 0) | ||
30 | SYSCALL(sys_read, 3) | ||
31 | SYSCALL(sys_write, 3) | ||
32 | SYSCALL(sys_open, 3) /* 05 */ | ||
33 | SYSCALL(sys_close, 1) | ||
34 | SYSCALL(sys_ni_syscall, 3) | ||
35 | SYSCALL(sys_creat, 2) | ||
36 | SYSCALL(sys_link, 2) | ||
37 | SYSCALL(sys_unlink, 1) /* 10 */ | ||
38 | SYSCALL(sys_execve, 0) | ||
39 | SYSCALL(sys_chdir, 1) | ||
40 | SYSCALL(sys_ni_syscall, 1) | ||
41 | SYSCALL(sys_mknod, 3) | ||
42 | SYSCALL(sys_chmod, 2) /* 15 */ | ||
43 | SYSCALL(sys_lchown, 3) | ||
44 | SYSCALL(sys_ni_syscall, 0) | ||
45 | SYSCALL(sys_newstat, 2) | ||
46 | SYSCALL(sys_lseek, 3) | ||
47 | SYSCALL(sys_getpid, 0) /* 20 */ | ||
48 | SYSCALL(sys_mount, 5) | ||
49 | SYSCALL(sys_ni_syscall, 1) | ||
50 | SYSCALL(sys_setuid, 1) | ||
51 | SYSCALL(sys_getuid, 0) | ||
52 | SYSCALL(sys_ni_syscall, 1) /* 25 */ | ||
53 | SYSCALL(sys_ptrace, 4) | ||
54 | SYSCALL(sys_ni_syscall, 1) | ||
55 | SYSCALL(sys_newfstat, 2) | ||
56 | SYSCALL(sys_ni_syscall, 0) | ||
57 | SYSCALL(sys_utime, 2) /* 30 */ | ||
58 | SYSCALL(sys_ni_syscall, 0) | ||
59 | SYSCALL(sys_ni_syscall, 0) | ||
60 | SYSCALL(sys_access, 2) | ||
61 | SYSCALL(sys_ni_syscall, 1) | ||
62 | SYSCALL(sys_ni_syscall, 0) /* 35 */ | ||
63 | SYSCALL(sys_sync, 0) | ||
64 | SYSCALL(sys_kill, 2) | ||
65 | SYSCALL(sys_rename, 2) | ||
66 | SYSCALL(sys_mkdir, 2) | ||
67 | SYSCALL(sys_rmdir, 1) /* 40 */ | ||
68 | SYSCALL(sys_dup, 1) | ||
69 | SYSCALL(sys_pipe, 1) | ||
70 | SYSCALL(sys_times, 1) | ||
71 | SYSCALL(sys_ni_syscall, 0) | ||
72 | SYSCALL(sys_brk, 1) /* 45 */ | ||
73 | SYSCALL(sys_setgid, 1) | ||
74 | SYSCALL(sys_getgid, 0) | ||
75 | SYSCALL(sys_ni_syscall, 0) | ||
76 | SYSCALL(sys_geteuid, 0) | ||
77 | SYSCALL(sys_getegid, 0) /* 50 */ | ||
78 | SYSCALL(sys_acct, 1) | ||
79 | SYSCALL(sys_umount, 2) | ||
80 | SYSCALL(sys_ni_syscall, 0) | ||
81 | SYSCALL(sys_ioctl, 3) | ||
82 | SYSCALL(sys_fcntl, 3) /* 55 */ | ||
83 | SYSCALL(sys_ni_syscall, 2) | ||
84 | SYSCALL(sys_setpgid, 2) | ||
85 | SYSCALL(sys_ni_syscall, 0) | ||
86 | SYSCALL(sys_ni_syscall, 0) | ||
87 | SYSCALL(sys_umask, 1) /* 60 */ | ||
88 | SYSCALL(sys_chroot, 1) | ||
89 | SYSCALL(sys_ustat, 2) | ||
90 | SYSCALL(sys_dup2, 2) | ||
91 | SYSCALL(sys_getppid, 0) | ||
92 | SYSCALL(sys_ni_syscall, 0) /* 65 */ | ||
93 | SYSCALL(sys_setsid, 0) | ||
94 | SYSCALL(sys_sigaction, 3) | ||
95 | SYSCALL(sys_ni_syscall, 0) | ||
96 | SYSCALL(sys_ni_syscall, 1) | ||
97 | SYSCALL(sys_setreuid, 2) /* 70 */ | ||
98 | SYSCALL(sys_setregid, 2) | ||
99 | SYSCALL(sys_sigsuspend, 0) | ||
100 | SYSCALL(sys_ni_syscall, 1) | ||
101 | SYSCALL(sys_sethostname, 2) | ||
102 | SYSCALL(sys_setrlimit, 2) /* 75 */ | ||
103 | SYSCALL(sys_getrlimit, 2) | ||
104 | SYSCALL(sys_getrusage, 2) | ||
105 | SYSCALL(sys_gettimeofday, 2) | ||
106 | SYSCALL(sys_settimeofday, 2) | ||
107 | SYSCALL(sys_getgroups, 2) /* 80 */ | ||
108 | SYSCALL(sys_setgroups, 2) | ||
109 | SYSCALL(sys_ni_syscall, 0) | ||
110 | SYSCALL(sys_symlink, 2) | ||
111 | SYSCALL(sys_newlstat, 2) | ||
112 | SYSCALL(sys_readlink, 3) /* 85 */ | ||
113 | SYSCALL(sys_uselib, 1) | ||
114 | SYSCALL(sys_swapon, 2) | ||
115 | SYSCALL(sys_reboot, 3) | ||
116 | SYSCALL(sys_ni_syscall, 3) | ||
117 | SYSCALL(sys_ni_syscall, 6) /* 90 */ | ||
118 | SYSCALL(sys_munmap, 2) | ||
119 | SYSCALL(sys_truncate, 2) | ||
120 | SYSCALL(sys_ftruncate, 2) | ||
121 | SYSCALL(sys_fchmod, 2) | ||
122 | SYSCALL(sys_fchown, 3) /* 95 */ | ||
123 | SYSCALL(sys_getpriority, 2) | ||
124 | SYSCALL(sys_setpriority, 3) | ||
125 | SYSCALL(sys_ni_syscall, 0) | ||
126 | SYSCALL(sys_statfs, 2) | ||
127 | SYSCALL(sys_fstatfs, 2) /* 100 */ | ||
128 | SYSCALL(sys_ni_syscall, 3) | ||
129 | SYSCALL(sys_ni_syscall, 2) | ||
130 | SYSCALL(sys_syslog, 3) | ||
131 | SYSCALL(sys_setitimer, 3) | ||
132 | SYSCALL(sys_getitimer, 2) /* 105 */ | ||
133 | SYSCALL(sys_newstat, 2) | ||
134 | SYSCALL(sys_newlstat, 2) | ||
135 | SYSCALL(sys_newfstat, 2) | ||
136 | SYSCALL(sys_uname, 1) | ||
137 | SYSCALL(sys_ni_syscall, 0) /* 110 */ | ||
138 | SYSCALL(sys_vhangup, 0) | ||
139 | SYSCALL(sys_ni_syscall, 0) | ||
140 | SYSCALL(sys_ni_syscall, 0) | ||
141 | SYSCALL(sys_wait4, 4) | ||
142 | SYSCALL(sys_swapoff, 1) /* 115 */ | ||
143 | SYSCALL(sys_sysinfo, 1) | ||
144 | SYSCALL(sys_ni_syscall, 0) | ||
145 | SYSCALL(sys_fsync, 1) | ||
146 | SYSCALL(sys_sigreturn, 0) | ||
147 | SYSCALL(sys_clone, 0) /* 120 */ | ||
148 | SYSCALL(sys_setdomainname, 2) | ||
149 | SYSCALL(sys_newuname, 1) | ||
150 | SYSCALL(sys_ni_syscall, 0) | ||
151 | SYSCALL(sys_adjtimex, 1) | ||
152 | SYSCALL(sys_mprotect, 3) /* 125 */ | ||
153 | SYSCALL(sys_ni_syscall, 3) | ||
154 | SYSCALL(sys_ni_syscall, 2) | ||
155 | SYSCALL(sys_init_module, 2) | ||
156 | SYSCALL(sys_delete_module, 1) | ||
157 | SYSCALL(sys_ni_syscall, 1) /* 130 */ | ||
158 | SYSCALL(sys_quotactl, 0) | ||
159 | SYSCALL(sys_getpgid, 1) | ||
160 | SYSCALL(sys_fchdir, 1) | ||
161 | SYSCALL(sys_bdflush, 2) | ||
162 | SYSCALL(sys_sysfs, 3) /* 135 */ | ||
163 | SYSCALL(sys_personality, 1) | ||
164 | SYSCALL(sys_ni_syscall, 0) | ||
165 | SYSCALL(sys_setfsuid, 1) | ||
166 | SYSCALL(sys_setfsgid, 1) | ||
167 | SYSCALL(sys_llseek, 5) /* 140 */ | ||
168 | SYSCALL(sys_getdents, 3) | ||
169 | SYSCALL(sys_select, 5) | ||
170 | SYSCALL(sys_flock, 2) | ||
171 | SYSCALL(sys_msync, 3) | ||
172 | SYSCALL(sys_readv, 3) /* 145 */ | ||
173 | SYSCALL(sys_writev, 3) | ||
174 | SYSCALL(sys_ni_syscall, 3) | ||
175 | SYSCALL(sys_ni_syscall, 3) | ||
176 | SYSCALL(sys_ni_syscall, 4) /* handled in fast syscall handler. */ | ||
177 | SYSCALL(sys_ni_syscall, 0) /* 150 */ | ||
178 | SYSCALL(sys_getsid, 1) | ||
179 | SYSCALL(sys_fdatasync, 1) | ||
180 | SYSCALL(sys_sysctl, 1) | ||
181 | SYSCALL(sys_mlock, 2) | ||
182 | SYSCALL(sys_munlock, 2) /* 155 */ | ||
183 | SYSCALL(sys_mlockall, 1) | ||
184 | SYSCALL(sys_munlockall, 0) | ||
185 | SYSCALL(sys_sched_setparam,2) | ||
186 | SYSCALL(sys_sched_getparam,2) | ||
187 | SYSCALL(sys_sched_setscheduler,3) /* 160 */ | ||
188 | SYSCALL(sys_sched_getscheduler,1) | ||
189 | SYSCALL(sys_sched_yield,0) | ||
190 | SYSCALL(sys_sched_get_priority_max,1) | ||
191 | SYSCALL(sys_sched_get_priority_min,1) | ||
192 | SYSCALL(sys_sched_rr_get_interval,2) /* 165 */ | ||
193 | SYSCALL(sys_nanosleep,2) | ||
194 | SYSCALL(sys_mremap,4) | ||
195 | SYSCALL(sys_accept, 3) | ||
196 | SYSCALL(sys_bind, 3) | ||
197 | SYSCALL(sys_connect, 3) /* 170 */ | ||
198 | SYSCALL(sys_getpeername, 3) | ||
199 | SYSCALL(sys_getsockname, 3) | ||
200 | SYSCALL(sys_getsockopt, 5) | ||
201 | SYSCALL(sys_listen, 2) | ||
202 | SYSCALL(sys_recv, 4) /* 175 */ | ||
203 | SYSCALL(sys_recvfrom, 6) | ||
204 | SYSCALL(sys_recvmsg, 3) | ||
205 | SYSCALL(sys_send, 4) | ||
206 | SYSCALL(sys_sendmsg, 3) | ||
207 | SYSCALL(sys_sendto, 6) /* 180 */ | ||
208 | SYSCALL(sys_setsockopt, 5) | ||
209 | SYSCALL(sys_shutdown, 2) | ||
210 | SYSCALL(sys_socket, 3) | ||
211 | SYSCALL(sys_socketpair, 4) | ||
212 | SYSCALL(sys_setresuid, 3) /* 185 */ | ||
213 | SYSCALL(sys_getresuid, 3) | ||
214 | SYSCALL(sys_ni_syscall, 5) | ||
215 | SYSCALL(sys_poll, 3) | ||
216 | SYSCALL(sys_nfsservctl, 3) | ||
217 | SYSCALL(sys_setresgid, 3) /* 190 */ | ||
218 | SYSCALL(sys_getresgid, 3) | ||
219 | SYSCALL(sys_prctl, 5) | ||
220 | SYSCALL(sys_rt_sigreturn, 0) | ||
221 | SYSCALL(sys_rt_sigaction, 4) | ||
222 | SYSCALL(sys_rt_sigprocmask, 4) /* 195 */ | ||
223 | SYSCALL(sys_rt_sigpending, 2) | ||
224 | SYSCALL(sys_rt_sigtimedwait, 4) | ||
225 | SYSCALL(sys_rt_sigqueueinfo, 3) | ||
226 | SYSCALL(sys_rt_sigsuspend, 0) | ||
227 | SYSCALL(sys_pread64, 5) /* 200 */ | ||
228 | SYSCALL(sys_pwrite64, 5) | ||
229 | SYSCALL(sys_chown, 3) | ||
230 | SYSCALL(sys_getcwd, 2) | ||
231 | SYSCALL(sys_capget, 2) | ||
232 | SYSCALL(sys_capset, 2) /* 205 */ | ||
233 | SYSCALL(sys_sigaltstack, 0) | ||
234 | SYSCALL(sys_sendfile, 4) | ||
235 | SYSCALL(sys_ni_syscall, 0) | ||
236 | SYSCALL(sys_ni_syscall, 0) | ||
237 | SYSCALL(sys_mmap, 6) /* 210 */ | ||
238 | SYSCALL(sys_truncate64, 2) | ||
239 | SYSCALL(sys_ftruncate64, 2) | ||
240 | SYSCALL(sys_stat64, 2) | ||
241 | SYSCALL(sys_lstat64, 2) | ||
242 | SYSCALL(sys_fstat64, 2) /* 215 */ | ||
243 | SYSCALL(sys_pivot_root, 2) | ||
244 | SYSCALL(sys_mincore, 3) | ||
245 | SYSCALL(sys_madvise, 3) | ||
246 | SYSCALL(sys_getdents64, 3) | ||
247 | SYSCALL(sys_ni_syscall, 0) /* 220 */ | ||
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 37347e369987..a350431363a0 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -47,7 +47,7 @@ unsigned long long sched_clock(void) | |||
47 | return (unsigned long long)jiffies * (1000000000 / HZ); | 47 | return (unsigned long long)jiffies * (1000000000 / HZ); |
48 | } | 48 | } |
49 | 49 | ||
50 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 50 | static irqreturn_t timer_interrupt(int irq, void *dev_id); |
51 | static struct irqaction timer_irqaction = { | 51 | static struct irqaction timer_irqaction = { |
52 | .handler = timer_interrupt, | 52 | .handler = timer_interrupt, |
53 | .flags = IRQF_DISABLED, | 53 | .flags = IRQF_DISABLED, |
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(do_gettimeofday); | |||
150 | * The timer interrupt is called HZ times per second. | 150 | * The timer interrupt is called HZ times per second. |
151 | */ | 151 | */ |
152 | 152 | ||
153 | irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) | 153 | irqreturn_t timer_interrupt (int irq, void *dev_id) |
154 | { | 154 | { |
155 | 155 | ||
156 | unsigned long next; | 156 | unsigned long next; |
@@ -160,9 +160,9 @@ irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) | |||
160 | again: | 160 | again: |
161 | while ((signed long)(get_ccount() - next) > 0) { | 161 | while ((signed long)(get_ccount() - next) > 0) { |
162 | 162 | ||
163 | profile_tick(CPU_PROFILING, regs); | 163 | profile_tick(CPU_PROFILING); |
164 | #ifndef CONFIG_SMP | 164 | #ifndef CONFIG_SMP |
165 | update_process_times(user_mode(regs)); | 165 | update_process_times(user_mode(get_irq_regs())); |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | write_seqlock(&xtime_lock); | 168 | write_seqlock(&xtime_lock); |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index ce077d6bf3a0..693ab268485e 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -75,7 +75,7 @@ extern void system_call (struct pt_regs*); | |||
75 | #define USER 0x02 | 75 | #define USER 0x02 |
76 | 76 | ||
77 | #define COPROCESSOR(x) \ | 77 | #define COPROCESSOR(x) \ |
78 | { XCHAL_EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor } | 78 | { EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor } |
79 | 79 | ||
80 | typedef struct { | 80 | typedef struct { |
81 | int cause; | 81 | int cause; |
@@ -85,38 +85,38 @@ typedef struct { | |||
85 | 85 | ||
86 | dispatch_init_table_t __init dispatch_init_table[] = { | 86 | dispatch_init_table_t __init dispatch_init_table[] = { |
87 | 87 | ||
88 | { XCHAL_EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction}, | 88 | { EXCCAUSE_ILLEGAL_INSTRUCTION, 0, do_illegal_instruction}, |
89 | { XCHAL_EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel }, | 89 | { EXCCAUSE_SYSTEM_CALL, KRNL, fast_syscall_kernel }, |
90 | { XCHAL_EXCCAUSE_SYSTEM_CALL, USER, fast_syscall_user }, | 90 | { EXCCAUSE_SYSTEM_CALL, USER, fast_syscall_user }, |
91 | { XCHAL_EXCCAUSE_SYSTEM_CALL, 0, system_call }, | 91 | { EXCCAUSE_SYSTEM_CALL, 0, system_call }, |
92 | /* XCHAL_EXCCAUSE_INSTRUCTION_FETCH unhandled */ | 92 | /* EXCCAUSE_INSTRUCTION_FETCH unhandled */ |
93 | /* XCHAL_EXCCAUSE_LOAD_STORE_ERROR unhandled*/ | 93 | /* EXCCAUSE_LOAD_STORE_ERROR unhandled*/ |
94 | { XCHAL_EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt }, | 94 | { EXCCAUSE_LEVEL1_INTERRUPT, 0, do_interrupt }, |
95 | { XCHAL_EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca }, | 95 | { EXCCAUSE_ALLOCA, USER|KRNL, fast_alloca }, |
96 | /* XCHAL_EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ | 96 | /* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ |
97 | /* XCHAL_EXCCAUSE_PRIVILEGED unhandled */ | 97 | /* EXCCAUSE_PRIVILEGED unhandled */ |
98 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 98 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
99 | #ifdef CONFIG_UNALIGNED_USER | 99 | #ifdef CONFIG_UNALIGNED_USER |
100 | { XCHAL_EXCCAUSE_UNALIGNED, USER, fast_unaligned }, | 100 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, |
101 | #else | 101 | #else |
102 | { XCHAL_EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, | 102 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, |
103 | #endif | 103 | #endif |
104 | { XCHAL_EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, | 104 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, |
105 | #endif | 105 | #endif |
106 | { XCHAL_EXCCAUSE_ITLB_MISS, 0, do_page_fault }, | 106 | { EXCCAUSE_ITLB_MISS, 0, do_page_fault }, |
107 | { XCHAL_EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, | 107 | { EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, |
108 | { XCHAL_EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, | 108 | { EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, |
109 | { XCHAL_EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault }, | 109 | { EXCCAUSE_ITLB_PRIVILEGE, 0, do_page_fault }, |
110 | /* XCHAL_EXCCAUSE_SIZE_RESTRICTION unhandled */ | 110 | /* EXCCAUSE_SIZE_RESTRICTION unhandled */ |
111 | { XCHAL_EXCCAUSE_FETCH_CACHE_ATTRIBUTE, 0, do_page_fault }, | 111 | { EXCCAUSE_FETCH_CACHE_ATTRIBUTE, 0, do_page_fault }, |
112 | { XCHAL_EXCCAUSE_DTLB_MISS, USER|KRNL, fast_second_level_miss}, | 112 | { EXCCAUSE_DTLB_MISS, USER|KRNL, fast_second_level_miss}, |
113 | { XCHAL_EXCCAUSE_DTLB_MISS, 0, do_page_fault }, | 113 | { EXCCAUSE_DTLB_MISS, 0, do_page_fault }, |
114 | { XCHAL_EXCCAUSE_DTLB_MULTIHIT, 0, do_multihit }, | 114 | { EXCCAUSE_DTLB_MULTIHIT, 0, do_multihit }, |
115 | { XCHAL_EXCCAUSE_DTLB_PRIVILEGE, 0, do_page_fault }, | 115 | { EXCCAUSE_DTLB_PRIVILEGE, 0, do_page_fault }, |
116 | /* XCHAL_EXCCAUSE_DTLB_SIZE_RESTRICTION unhandled */ | 116 | /* EXCCAUSE_DTLB_SIZE_RESTRICTION unhandled */ |
117 | { XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, | 117 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, |
118 | { XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, | 118 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, |
119 | { XCHAL_EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, | 119 | { EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, |
120 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ | 120 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ |
121 | #if (XCHAL_CP_MASK & 1) | 121 | #if (XCHAL_CP_MASK & 1) |
122 | COPROCESSOR(0), | 122 | COPROCESSOR(0), |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 0e74397bfa2b..eb2d7bb69ee0 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -53,6 +53,8 @@ | |||
53 | #include <asm/thread_info.h> | 53 | #include <asm/thread_info.h> |
54 | #include <asm/processor.h> | 54 | #include <asm/processor.h> |
55 | 55 | ||
56 | #define WINDOW_VECTORS_SIZE 0x180 | ||
57 | |||
56 | 58 | ||
57 | /* | 59 | /* |
58 | * User exception vector. (Exceptions with PS.UM == 1, PS.EXCM == 0) | 60 | * User exception vector. (Exceptions with PS.UM == 1, PS.EXCM == 0) |
@@ -210,7 +212,7 @@ ENTRY(_DoubleExceptionVector) | |||
210 | /* Check for kernel double exception (usually fatal). */ | 212 | /* Check for kernel double exception (usually fatal). */ |
211 | 213 | ||
212 | rsr a3, PS | 214 | rsr a3, PS |
213 | _bbci.l a3, PS_UM_SHIFT, .Lksp | 215 | _bbci.l a3, PS_UM_BIT, .Lksp |
214 | 216 | ||
215 | /* Check if we are currently handling a window exception. */ | 217 | /* Check if we are currently handling a window exception. */ |
216 | /* Note: We don't need to indicate that we enter a critical section. */ | 218 | /* Note: We don't need to indicate that we enter a critical section. */ |
@@ -219,7 +221,7 @@ ENTRY(_DoubleExceptionVector) | |||
219 | 221 | ||
220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR | 222 | movi a3, XCHAL_WINDOW_VECTORS_VADDR |
221 | _bltu a0, a3, .Lfixup | 223 | _bltu a0, a3, .Lfixup |
222 | addi a3, a3, XSHAL_WINDOW_VECTORS_SIZE | 224 | addi a3, a3, WINDOW_VECTORS_SIZE |
223 | _bgeu a0, a3, .Lfixup | 225 | _bgeu a0, a3, .Lfixup |
224 | 226 | ||
225 | /* Window overflow/underflow exception. Get stack pointer. */ | 227 | /* Window overflow/underflow exception. Get stack pointer. */ |
@@ -245,7 +247,7 @@ ENTRY(_DoubleExceptionVector) | |||
245 | 247 | ||
246 | wsr a2, DEPC # save stack pointer temporarily | 248 | wsr a2, DEPC # save stack pointer temporarily |
247 | rsr a0, PS | 249 | rsr a0, PS |
248 | extui a0, a0, XCHAL_PS_OWB_SHIFT, XCHAL_PS_OWB_BITS | 250 | extui a0, a0, PS_OWB_SHIFT, 4 |
249 | wsr a0, WINDOWBASE | 251 | wsr a0, WINDOWBASE |
250 | rsync | 252 | rsync |
251 | 253 | ||
@@ -312,8 +314,8 @@ ENTRY(_DoubleExceptionVector) | |||
312 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ | 314 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ |
313 | 315 | ||
314 | rsr a3, EXCCAUSE | 316 | rsr a3, EXCCAUSE |
315 | beqi a3, XCHAL_EXCCAUSE_ITLB_MISS, 1f | 317 | beqi a3, EXCCAUSE_ITLB_MISS, 1f |
316 | addi a3, a3, -XCHAL_EXCCAUSE_DTLB_MISS | 318 | addi a3, a3, -EXCCAUSE_DTLB_MISS |
317 | bnez a3, .Lunrecoverable | 319 | bnez a3, .Lunrecoverable |
318 | 1: movi a3, fast_second_level_miss_double_kernel | 320 | 1: movi a3, fast_second_level_miss_double_kernel |
319 | jx a3 | 321 | jx a3 |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index cfe75f528725..a36c104c3a52 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -16,19 +16,17 @@ | |||
16 | 16 | ||
17 | #include <asm-generic/vmlinux.lds.h> | 17 | #include <asm-generic/vmlinux.lds.h> |
18 | 18 | ||
19 | #define _NOCLANGUAGE | 19 | #include <asm/variant/core.h> |
20 | #include <xtensa/config/core.h> | ||
21 | #include <xtensa/config/system.h> | ||
22 | OUTPUT_ARCH(xtensa) | 20 | OUTPUT_ARCH(xtensa) |
23 | ENTRY(_start) | 21 | ENTRY(_start) |
24 | 22 | ||
25 | #if XCHAL_MEMORY_ORDER == XTHAL_BIGENDIAN | 23 | #ifdef __XTENSA_EB__ |
26 | jiffies = jiffies_64 + 4; | 24 | jiffies = jiffies_64 + 4; |
27 | #else | 25 | #else |
28 | jiffies = jiffies_64; | 26 | jiffies = jiffies_64; |
29 | #endif | 27 | #endif |
30 | 28 | ||
31 | #define KERNELOFFSET 0x1000 | 29 | #define KERNELOFFSET 0xd0001000 |
32 | 30 | ||
33 | /* Note: In the following macros, it would be nice to specify only the | 31 | /* Note: In the following macros, it would be nice to specify only the |
34 | vector name and section kind and construct "sym" and "section" using | 32 | vector name and section kind and construct "sym" and "section" using |
@@ -75,7 +73,7 @@ jiffies = jiffies_64; | |||
75 | 73 | ||
76 | SECTIONS | 74 | SECTIONS |
77 | { | 75 | { |
78 | . = XCHAL_KSEG_CACHED_VADDR + KERNELOFFSET; | 76 | . = KERNELOFFSET; |
79 | /* .text section */ | 77 | /* .text section */ |
80 | 78 | ||
81 | _text = .; | 79 | _text = .; |
@@ -159,7 +157,7 @@ SECTIONS | |||
159 | 157 | ||
160 | /* Initialization code and data: */ | 158 | /* Initialization code and data: */ |
161 | 159 | ||
162 | . = ALIGN(1<<XCHAL_MMU_MIN_PTE_PAGE_SIZE); | 160 | . = ALIGN(1 << 12); |
163 | __init_begin = .; | 161 | __init_begin = .; |
164 | .init.text : { | 162 | .init.text : { |
165 | _sinittext = .; | 163 | _sinittext = .; |
@@ -223,32 +221,32 @@ SECTIONS | |||
223 | .dummy) | 221 | .dummy) |
224 | SECTION_VECTOR (_DebugInterruptVector_literal, | 222 | SECTION_VECTOR (_DebugInterruptVector_literal, |
225 | .DebugInterruptVector.literal, | 223 | .DebugInterruptVector.literal, |
226 | XCHAL_INTLEVEL_VECTOR_VADDR(XCHAL_DEBUGLEVEL) - 4, | 224 | XCHAL_DEBUG_VECTOR_VADDR - 4, |
227 | SIZEOF(.WindowVectors.text), | 225 | SIZEOF(.WindowVectors.text), |
228 | .WindowVectors.text) | 226 | .WindowVectors.text) |
229 | SECTION_VECTOR (_DebugInterruptVector_text, | 227 | SECTION_VECTOR (_DebugInterruptVector_text, |
230 | .DebugInterruptVector.text, | 228 | .DebugInterruptVector.text, |
231 | XCHAL_INTLEVEL_VECTOR_VADDR(XCHAL_DEBUGLEVEL), | 229 | XCHAL_DEBUG_VECTOR_VADDR, |
232 | 4, | 230 | 4, |
233 | .DebugInterruptVector.literal) | 231 | .DebugInterruptVector.literal) |
234 | SECTION_VECTOR (_KernelExceptionVector_literal, | 232 | SECTION_VECTOR (_KernelExceptionVector_literal, |
235 | .KernelExceptionVector.literal, | 233 | .KernelExceptionVector.literal, |
236 | XCHAL_KERNELEXC_VECTOR_VADDR - 4, | 234 | XCHAL_KERNEL_VECTOR_VADDR - 4, |
237 | SIZEOF(.DebugInterruptVector.text), | 235 | SIZEOF(.DebugInterruptVector.text), |
238 | .DebugInterruptVector.text) | 236 | .DebugInterruptVector.text) |
239 | SECTION_VECTOR (_KernelExceptionVector_text, | 237 | SECTION_VECTOR (_KernelExceptionVector_text, |
240 | .KernelExceptionVector.text, | 238 | .KernelExceptionVector.text, |
241 | XCHAL_KERNELEXC_VECTOR_VADDR, | 239 | XCHAL_KERNEL_VECTOR_VADDR, |
242 | 4, | 240 | 4, |
243 | .KernelExceptionVector.literal) | 241 | .KernelExceptionVector.literal) |
244 | SECTION_VECTOR (_UserExceptionVector_literal, | 242 | SECTION_VECTOR (_UserExceptionVector_literal, |
245 | .UserExceptionVector.literal, | 243 | .UserExceptionVector.literal, |
246 | XCHAL_USEREXC_VECTOR_VADDR - 4, | 244 | XCHAL_USER_VECTOR_VADDR - 4, |
247 | SIZEOF(.KernelExceptionVector.text), | 245 | SIZEOF(.KernelExceptionVector.text), |
248 | .KernelExceptionVector.text) | 246 | .KernelExceptionVector.text) |
249 | SECTION_VECTOR (_UserExceptionVector_text, | 247 | SECTION_VECTOR (_UserExceptionVector_text, |
250 | .UserExceptionVector.text, | 248 | .UserExceptionVector.text, |
251 | XCHAL_USEREXC_VECTOR_VADDR, | 249 | XCHAL_USER_VECTOR_VADDR, |
252 | 4, | 250 | 4, |
253 | .UserExceptionVector.literal) | 251 | .UserExceptionVector.literal) |
254 | SECTION_VECTOR (_DoubleExceptionVector_literal, | 252 | SECTION_VECTOR (_DoubleExceptionVector_literal, |
@@ -263,7 +261,7 @@ SECTIONS | |||
263 | .DoubleExceptionVector.literal) | 261 | .DoubleExceptionVector.literal) |
264 | 262 | ||
265 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; | 263 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; |
266 | . = ALIGN(1<<XCHAL_MMU_MIN_PTE_PAGE_SIZE); | 264 | . = ALIGN(1 << 12); |
267 | 265 | ||
268 | __init_end = .; | 266 | __init_end = .; |
269 | 267 | ||
diff --git a/arch/xtensa/lib/checksum.S b/arch/xtensa/lib/checksum.S index e2d64dfd530c..9d9cd990afa6 100644 --- a/arch/xtensa/lib/checksum.S +++ b/arch/xtensa/lib/checksum.S | |||
@@ -16,8 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/errno.h> | 17 | #include <asm/errno.h> |
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #define _ASMLANGUAGE | 19 | #include <asm/variant/core.h> |
20 | #include <xtensa/config/core.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * computes a partial checksum, e.g. for TCP/UDP fragments | 22 | * computes a partial checksum, e.g. for TCP/UDP fragments |
diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index e8f6d7eb7222..ddda8f4bc862 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S | |||
@@ -9,7 +9,7 @@ | |||
9 | * Copyright (C) 2002 - 2005 Tensilica Inc. | 9 | * Copyright (C) 2002 - 2005 Tensilica Inc. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <xtensa/coreasm.h> | 12 | #include <asm/variant/core.h> |
13 | 13 | ||
14 | .macro src_b r, w0, w1 | 14 | .macro src_b r, w0, w1 |
15 | #ifdef __XTENSA_EB__ | 15 | #ifdef __XTENSA_EB__ |
diff --git a/arch/xtensa/lib/memset.S b/arch/xtensa/lib/memset.S index 4de25134bc62..56a17495b2db 100644 --- a/arch/xtensa/lib/memset.S +++ b/arch/xtensa/lib/memset.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * void *memset(void *dst, int c, size_t length) | 17 | * void *memset(void *dst, int c, size_t length) |
diff --git a/arch/xtensa/lib/strncpy_user.S b/arch/xtensa/lib/strncpy_user.S index 71d55df43893..a834057bda6b 100644 --- a/arch/xtensa/lib/strncpy_user.S +++ b/arch/xtensa/lib/strncpy_user.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | 16 | ||
17 | /* Load or store instructions that may cause exceptions use the EX macro. */ | 17 | /* Load or store instructions that may cause exceptions use the EX macro. */ |
diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S index cdff4d670f3b..5e9c1e709b2e 100644 --- a/arch/xtensa/lib/strnlen_user.S +++ b/arch/xtensa/lib/strnlen_user.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (C) 2002 Tensilica Inc. | 11 | * Copyright (C) 2002 Tensilica Inc. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <xtensa/coreasm.h> | 14 | #include <asm/variant/core.h> |
15 | 15 | ||
16 | /* Load or store instructions that may cause exceptions use the EX macro. */ | 16 | /* Load or store instructions that may cause exceptions use the EX macro. */ |
17 | 17 | ||
diff --git a/arch/xtensa/lib/usercopy.S b/arch/xtensa/lib/usercopy.S index 4641ef510f0e..a8ab1d4fe0ae 100644 --- a/arch/xtensa/lib/usercopy.S +++ b/arch/xtensa/lib/usercopy.S | |||
@@ -53,7 +53,7 @@ | |||
53 | * a11/ original length | 53 | * a11/ original length |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <xtensa/coreasm.h> | 56 | #include <asm/variant/core.h> |
57 | 57 | ||
58 | #ifdef __XTENSA_EB__ | 58 | #ifdef __XTENSA_EB__ |
59 | #define ALIGN(R, W0, W1) src R, W0, W1 | 59 | #define ALIGN(R, W0, W1) src R, W0, W1 |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index dd0dbec2e57e..3dc6f2f07bbe 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | 23 | ||
24 | unsigned long asid_cache = ASID_FIRST_VERSION; | 24 | unsigned long asid_cache = ASID_USER_FIRST; |
25 | void bad_page_fault(struct pt_regs*, unsigned long, int); | 25 | void bad_page_fault(struct pt_regs*, unsigned long, int); |
26 | 26 | ||
27 | /* | 27 | /* |
@@ -58,10 +58,10 @@ void do_page_fault(struct pt_regs *regs) | |||
58 | return; | 58 | return; |
59 | } | 59 | } |
60 | 60 | ||
61 | is_write = (exccause == XCHAL_EXCCAUSE_STORE_CACHE_ATTRIBUTE) ? 1 : 0; | 61 | is_write = (exccause == EXCCAUSE_STORE_CACHE_ATTRIBUTE) ? 1 : 0; |
62 | is_exec = (exccause == XCHAL_EXCCAUSE_ITLB_PRIVILEGE || | 62 | is_exec = (exccause == EXCCAUSE_ITLB_PRIVILEGE || |
63 | exccause == XCHAL_EXCCAUSE_ITLB_MISS || | 63 | exccause == EXCCAUSE_ITLB_MISS || |
64 | exccause == XCHAL_EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; | 64 | exccause == EXCCAUSE_FETCH_CACHE_ATTRIBUTE) ? 1 : 0; |
65 | 65 | ||
66 | #if 0 | 66 | #if 0 |
67 | printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, | 67 | printk("[%s:%d:%08x:%d:%08x:%s%s]\n", current->comm, current->pid, |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 660ef058c149..e1ec2d1e8189 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -141,8 +141,8 @@ void __init bootmem_init(void) | |||
141 | if (min_low_pfn > max_pfn) | 141 | if (min_low_pfn > max_pfn) |
142 | panic("No memory found!\n"); | 142 | panic("No memory found!\n"); |
143 | 143 | ||
144 | max_low_pfn = max_pfn < MAX_LOW_MEMORY >> PAGE_SHIFT ? | 144 | max_low_pfn = max_pfn < MAX_MEM_PFN >> PAGE_SHIFT ? |
145 | max_pfn : MAX_LOW_MEMORY >> PAGE_SHIFT; | 145 | max_pfn : MAX_MEM_PFN >> PAGE_SHIFT; |
146 | 146 | ||
147 | /* Find an area to use for the bootmem bitmap. */ | 147 | /* Find an area to use for the bootmem bitmap. */ |
148 | 148 | ||
@@ -215,7 +215,7 @@ void __init init_mmu (void) | |||
215 | 215 | ||
216 | /* Set rasid register to a known value. */ | 216 | /* Set rasid register to a known value. */ |
217 | 217 | ||
218 | set_rasid_register (ASID_ALL_RESERVED); | 218 | set_rasid_register (ASID_USER_FIRST); |
219 | 219 | ||
220 | /* Set PTEVADDR special register to the start of the page | 220 | /* Set PTEVADDR special register to the start of the page |
221 | * table, which is in kernel mappable space (ie. not | 221 | * table, which is in kernel mappable space (ie. not |
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S index 327c0f17187c..ae085332c607 100644 --- a/arch/xtensa/mm/misc.S +++ b/arch/xtensa/mm/misc.S | |||
@@ -19,9 +19,8 @@ | |||
19 | #include <linux/linkage.h> | 19 | #include <linux/linkage.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | 22 | #include <asm/asmmacro.h> | |
23 | #include <xtensa/cacheasm.h> | 23 | #include <asm/cacheasm.h> |
24 | #include <xtensa/cacheattrasm.h> | ||
25 | 24 | ||
26 | /* clear_page (page) */ | 25 | /* clear_page (page) */ |
27 | 26 | ||
@@ -74,104 +73,66 @@ ENTRY(copy_page) | |||
74 | 73 | ||
75 | retw | 74 | retw |
76 | 75 | ||
77 | |||
78 | /* | 76 | /* |
79 | * void __flush_invalidate_cache_all(void) | 77 | * void __invalidate_icache_page(ulong start) |
80 | */ | 78 | */ |
81 | 79 | ||
82 | ENTRY(__flush_invalidate_cache_all) | 80 | ENTRY(__invalidate_icache_page) |
83 | entry sp, 16 | 81 | entry sp, 16 |
84 | dcache_writeback_inv_all a2, a3 | ||
85 | icache_invalidate_all a2, a3 | ||
86 | retw | ||
87 | 82 | ||
88 | /* | 83 | ___invalidate_icache_page a2 a3 |
89 | * void __invalidate_icache_all(void) | 84 | isync |
90 | */ | ||
91 | 85 | ||
92 | ENTRY(__invalidate_icache_all) | ||
93 | entry sp, 16 | ||
94 | icache_invalidate_all a2, a3 | ||
95 | retw | 86 | retw |
96 | 87 | ||
97 | /* | 88 | /* |
98 | * void __flush_invalidate_dcache_all(void) | 89 | * void __invalidate_dcache_page(ulong start) |
99 | */ | 90 | */ |
100 | 91 | ||
101 | ENTRY(__flush_invalidate_dcache_all) | 92 | ENTRY(__invalidate_dcache_page) |
102 | entry sp, 16 | 93 | entry sp, 16 |
103 | dcache_writeback_inv_all a2, a3 | ||
104 | retw | ||
105 | |||
106 | 94 | ||
107 | /* | 95 | ___invalidate_dcache_page a2 a3 |
108 | * void __flush_invalidate_cache_range(ulong start, ulong size) | 96 | dsync |
109 | */ | ||
110 | 97 | ||
111 | ENTRY(__flush_invalidate_cache_range) | ||
112 | entry sp, 16 | ||
113 | mov a4, a2 | ||
114 | mov a5, a3 | ||
115 | dcache_writeback_inv_region a4, a5, a6 | ||
116 | icache_invalidate_region a2, a3, a4 | ||
117 | retw | 98 | retw |
118 | 99 | ||
119 | /* | 100 | /* |
120 | * void __invalidate_icache_page(ulong start) | 101 | * void __flush_invalidate_dcache_page(ulong start) |
121 | */ | 102 | */ |
122 | 103 | ||
123 | ENTRY(__invalidate_icache_page) | 104 | ENTRY(__flush_invalidate_dcache_page) |
124 | entry sp, 16 | 105 | entry sp, 16 |
125 | movi a3, PAGE_SIZE | ||
126 | icache_invalidate_region a2, a3, a4 | ||
127 | retw | ||
128 | 106 | ||
129 | /* | 107 | ___flush_invalidate_dcache_page a2 a3 |
130 | * void __invalidate_dcache_page(ulong start) | ||
131 | */ | ||
132 | 108 | ||
133 | ENTRY(__invalidate_dcache_page) | 109 | dsync |
134 | entry sp, 16 | ||
135 | movi a3, PAGE_SIZE | ||
136 | dcache_invalidate_region a2, a3, a4 | ||
137 | retw | 110 | retw |
138 | 111 | ||
139 | /* | 112 | /* |
140 | * void __invalidate_icache_range(ulong start, ulong size) | 113 | * void __flush_dcache_page(ulong start) |
141 | */ | 114 | */ |
142 | 115 | ||
143 | ENTRY(__invalidate_icache_range) | 116 | ENTRY(__flush_dcache_page) |
144 | entry sp, 16 | 117 | entry sp, 16 |
145 | icache_invalidate_region a2, a3, a4 | ||
146 | retw | ||
147 | 118 | ||
148 | /* | 119 | ___flush_dcache_page a2 a3 |
149 | * void __invalidate_dcache_range(ulong start, ulong size) | ||
150 | */ | ||
151 | 120 | ||
152 | ENTRY(__invalidate_dcache_range) | 121 | dsync |
153 | entry sp, 16 | ||
154 | dcache_invalidate_region a2, a3, a4 | ||
155 | retw | 122 | retw |
156 | 123 | ||
157 | /* | ||
158 | * void __flush_dcache_page(ulong start) | ||
159 | */ | ||
160 | 124 | ||
161 | ENTRY(__flush_dcache_page) | ||
162 | entry sp, 16 | ||
163 | movi a3, PAGE_SIZE | ||
164 | dcache_writeback_region a2, a3, a4 | ||
165 | retw | ||
166 | 125 | ||
167 | /* | 126 | /* |
168 | * void __flush_invalidate_dcache_page(ulong start) | 127 | * void __invalidate_icache_range(ulong start, ulong size) |
169 | */ | 128 | */ |
170 | 129 | ||
171 | ENTRY(__flush_invalidate_dcache_page) | 130 | ENTRY(__invalidate_icache_range) |
172 | entry sp, 16 | 131 | entry sp, 16 |
173 | movi a3, PAGE_SIZE | 132 | |
174 | dcache_writeback_inv_region a2, a3, a4 | 133 | ___invalidate_icache_range a2 a3 a4 |
134 | isync | ||
135 | |||
175 | retw | 136 | retw |
176 | 137 | ||
177 | /* | 138 | /* |
@@ -180,195 +141,69 @@ ENTRY(__flush_invalidate_dcache_page) | |||
180 | 141 | ||
181 | ENTRY(__flush_invalidate_dcache_range) | 142 | ENTRY(__flush_invalidate_dcache_range) |
182 | entry sp, 16 | 143 | entry sp, 16 |
183 | dcache_writeback_inv_region a2, a3, a4 | ||
184 | retw | ||
185 | 144 | ||
186 | /* | 145 | ___flush_invalidate_dcache_range a2 a3 a4 |
187 | * void __invalidate_dcache_all(void) | 146 | dsync |
188 | */ | ||
189 | 147 | ||
190 | ENTRY(__invalidate_dcache_all) | ||
191 | entry sp, 16 | ||
192 | dcache_invalidate_all a2, a3 | ||
193 | retw | 148 | retw |
194 | 149 | ||
195 | /* | 150 | /* |
196 | * void __flush_invalidate_dcache_page_phys(ulong start) | 151 | * void _flush_dcache_range(ulong start, ulong size) |
197 | */ | 152 | */ |
198 | 153 | ||
199 | ENTRY(__flush_invalidate_dcache_page_phys) | 154 | ENTRY(__flush_dcache_range) |
200 | entry sp, 16 | 155 | entry sp, 16 |
201 | 156 | ||
202 | movi a3, XCHAL_DCACHE_SIZE | 157 | ___flush_dcache_range a2 a3 a4 |
203 | movi a4, PAGE_MASK | 1 | ||
204 | addi a2, a2, 1 | ||
205 | |||
206 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
207 | |||
208 | ldct a6, a3 | ||
209 | dsync | 158 | dsync |
210 | and a6, a6, a4 | ||
211 | beq a6, a2, 2f | ||
212 | bgeui a3, 2, 1b | ||
213 | retw | ||
214 | 159 | ||
215 | 2: diwbi a3, 0 | ||
216 | bgeui a3, 2, 1b | ||
217 | retw | 160 | retw |
218 | 161 | ||
219 | ENTRY(check_dcache_low0) | 162 | /* |
220 | entry sp, 16 | 163 | * void _invalidate_dcache_range(ulong start, ulong size) |
221 | 164 | */ | |
222 | movi a3, XCHAL_DCACHE_SIZE / 4 | ||
223 | movi a4, PAGE_MASK | 1 | ||
224 | addi a2, a2, 1 | ||
225 | |||
226 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
227 | |||
228 | ldct a6, a3 | ||
229 | dsync | ||
230 | and a6, a6, a4 | ||
231 | beq a6, a2, 2f | ||
232 | bgeui a3, 2, 1b | ||
233 | retw | ||
234 | |||
235 | 2: j 2b | ||
236 | |||
237 | ENTRY(check_dcache_high0) | ||
238 | entry sp, 16 | ||
239 | |||
240 | movi a5, XCHAL_DCACHE_SIZE / 4 | ||
241 | movi a3, XCHAL_DCACHE_SIZE / 2 | ||
242 | movi a4, PAGE_MASK | 1 | ||
243 | addi a2, a2, 1 | ||
244 | |||
245 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
246 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
247 | |||
248 | ldct a6, a3 | ||
249 | dsync | ||
250 | and a6, a6, a4 | ||
251 | beq a6, a2, 2f | ||
252 | bgeui a5, 2, 1b | ||
253 | retw | ||
254 | |||
255 | 2: j 2b | ||
256 | 165 | ||
257 | ENTRY(check_dcache_low1) | 166 | ENTRY(__invalidate_dcache_range) |
258 | entry sp, 16 | 167 | entry sp, 16 |
259 | 168 | ||
260 | movi a5, XCHAL_DCACHE_SIZE / 4 | 169 | ___invalidate_dcache_range a2 a3 a4 |
261 | movi a3, XCHAL_DCACHE_SIZE * 3 / 4 | ||
262 | movi a4, PAGE_MASK | 1 | ||
263 | addi a2, a2, 1 | ||
264 | 170 | ||
265 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
266 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
267 | 171 | ||
268 | ldct a6, a3 | ||
269 | dsync | ||
270 | and a6, a6, a4 | ||
271 | beq a6, a2, 2f | ||
272 | bgeui a5, 2, 1b | ||
273 | retw | 172 | retw |
274 | 173 | ||
275 | 2: j 2b | 174 | /* |
175 | * void _invalidate_icache_all(void) | ||
176 | */ | ||
276 | 177 | ||
277 | ENTRY(check_dcache_high1) | 178 | ENTRY(__invalidate_icache_all) |
278 | entry sp, 16 | 179 | entry sp, 16 |
279 | 180 | ||
280 | movi a5, XCHAL_DCACHE_SIZE / 4 | 181 | ___invalidate_icache_all a2 a3 |
281 | movi a3, XCHAL_DCACHE_SIZE | 182 | isync |
282 | movi a4, PAGE_MASK | 1 | ||
283 | addi a2, a2, 1 | ||
284 | |||
285 | 1: addi a3, a3, -XCHAL_DCACHE_LINESIZE | ||
286 | addi a5, a5, -XCHAL_DCACHE_LINESIZE | ||
287 | 183 | ||
288 | ldct a6, a3 | ||
289 | dsync | ||
290 | and a6, a6, a4 | ||
291 | beq a6, a2, 2f | ||
292 | bgeui a5, 2, 1b | ||
293 | retw | 184 | retw |
294 | 185 | ||
295 | 2: j 2b | ||
296 | |||
297 | |||
298 | /* | 186 | /* |
299 | * void __invalidate_icache_page_phys(ulong start) | 187 | * void _flush_invalidate_dcache_all(void) |
300 | */ | 188 | */ |
301 | 189 | ||
302 | ENTRY(__invalidate_icache_page_phys) | 190 | ENTRY(__flush_invalidate_dcache_all) |
303 | entry sp, 16 | 191 | entry sp, 16 |
304 | 192 | ||
305 | movi a3, XCHAL_ICACHE_SIZE | 193 | ___flush_invalidate_dcache_all a2 a3 |
306 | movi a4, PAGE_MASK | 1 | 194 | dsync |
307 | addi a2, a2, 1 | ||
308 | |||
309 | 1: addi a3, a3, -XCHAL_ICACHE_LINESIZE | ||
310 | |||
311 | lict a6, a3 | ||
312 | isync | ||
313 | and a6, a6, a4 | ||
314 | beq a6, a2, 2f | ||
315 | bgeui a3, 2, 1b | ||
316 | retw | ||
317 | 195 | ||
318 | 2: iii a3, 0 | ||
319 | bgeui a3, 2, 1b | ||
320 | retw | 196 | retw |
321 | 197 | ||
198 | /* | ||
199 | * void _invalidate_dcache_all(void) | ||
200 | */ | ||
322 | 201 | ||
323 | #if 0 | 202 | ENTRY(__invalidate_dcache_all) |
324 | |||
325 | movi a3, XCHAL_DCACHE_WAYS - 1 | ||
326 | movi a4, PAGE_SIZE | ||
327 | |||
328 | 1: mov a5, a2 | ||
329 | add a6, a2, a4 | ||
330 | |||
331 | 2: diwbi a5, 0 | ||
332 | diwbi a5, XCHAL_DCACHE_LINESIZE | ||
333 | diwbi a5, XCHAL_DCACHE_LINESIZE * 2 | ||
334 | diwbi a5, XCHAL_DCACHE_LINESIZE * 3 | ||
335 | |||
336 | addi a5, a5, XCHAL_DCACHE_LINESIZE * 4 | ||
337 | blt a5, a6, 2b | ||
338 | |||
339 | addi a3, a3, -1 | ||
340 | addi a2, a2, XCHAL_DCACHE_SIZE / XCHAL_DCACHE_WAYS | ||
341 | bgez a3, 1b | ||
342 | |||
343 | retw | ||
344 | |||
345 | ENTRY(__invalidate_icache_page_index) | ||
346 | entry sp, 16 | 203 | entry sp, 16 |
347 | 204 | ||
348 | movi a3, XCHAL_ICACHE_WAYS - 1 | 205 | ___invalidate_dcache_all a2 a3 |
349 | movi a4, PAGE_SIZE | 206 | dsync |
350 | |||
351 | 1: mov a5, a2 | ||
352 | add a6, a2, a4 | ||
353 | |||
354 | 2: iii a5, 0 | ||
355 | iii a5, XCHAL_ICACHE_LINESIZE | ||
356 | iii a5, XCHAL_ICACHE_LINESIZE * 2 | ||
357 | iii a5, XCHAL_ICACHE_LINESIZE * 3 | ||
358 | |||
359 | addi a5, a5, XCHAL_ICACHE_LINESIZE * 4 | ||
360 | blt a5, a6, 2b | ||
361 | |||
362 | addi a3, a3, -1 | ||
363 | addi a2, a2, XCHAL_ICACHE_SIZE / XCHAL_ICACHE_WAYS | ||
364 | bgez a3, 2b | ||
365 | 207 | ||
366 | retw | 208 | retw |
367 | 209 | ||
368 | #endif | ||
369 | |||
370 | |||
371 | |||
372 | |||
373 | |||
374 | |||
diff --git a/arch/xtensa/mm/tlb.c b/arch/xtensa/mm/tlb.c index 0fefb8666874..239461d8ea88 100644 --- a/arch/xtensa/mm/tlb.c +++ b/arch/xtensa/mm/tlb.c | |||
@@ -24,12 +24,12 @@ | |||
24 | 24 | ||
25 | static inline void __flush_itlb_all (void) | 25 | static inline void __flush_itlb_all (void) |
26 | { | 26 | { |
27 | int way, index; | 27 | int w, i; |
28 | 28 | ||
29 | for (way = 0; way < XCHAL_ITLB_ARF_WAYS; way++) { | 29 | for (w = 0; w < ITLB_ARF_WAYS; w++) { |
30 | for (index = 0; index < ITLB_ENTRIES_PER_ARF_WAY; index++) { | 30 | for (i = 0; i < (1 << XCHAL_ITLB_ARF_ENTRIES_LOG2); i++) { |
31 | int entry = way + (index << PAGE_SHIFT); | 31 | int e = w + (i << PAGE_SHIFT); |
32 | invalidate_itlb_entry_no_isync (entry); | 32 | invalidate_itlb_entry_no_isync(e); |
33 | } | 33 | } |
34 | } | 34 | } |
35 | asm volatile ("isync\n"); | 35 | asm volatile ("isync\n"); |
@@ -37,12 +37,12 @@ static inline void __flush_itlb_all (void) | |||
37 | 37 | ||
38 | static inline void __flush_dtlb_all (void) | 38 | static inline void __flush_dtlb_all (void) |
39 | { | 39 | { |
40 | int way, index; | 40 | int w, i; |
41 | 41 | ||
42 | for (way = 0; way < XCHAL_DTLB_ARF_WAYS; way++) { | 42 | for (w = 0; w < DTLB_ARF_WAYS; w++) { |
43 | for (index = 0; index < DTLB_ENTRIES_PER_ARF_WAY; index++) { | 43 | for (i = 0; i < (1 << XCHAL_DTLB_ARF_ENTRIES_LOG2); i++) { |
44 | int entry = way + (index << PAGE_SHIFT); | 44 | int e = w + (i << PAGE_SHIFT); |
45 | invalidate_dtlb_entry_no_isync (entry); | 45 | invalidate_dtlb_entry_no_isync(e); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | asm volatile ("isync\n"); | 48 | asm volatile ("isync\n"); |
@@ -63,21 +63,25 @@ void flush_tlb_all (void) | |||
63 | 63 | ||
64 | void flush_tlb_mm(struct mm_struct *mm) | 64 | void flush_tlb_mm(struct mm_struct *mm) |
65 | { | 65 | { |
66 | #if 0 | ||
67 | printk("[tlbmm<%lx>]\n", (unsigned long)mm->context); | ||
68 | #endif | ||
69 | |||
70 | if (mm == current->active_mm) { | 66 | if (mm == current->active_mm) { |
71 | int flags; | 67 | int flags; |
72 | local_save_flags(flags); | 68 | local_save_flags(flags); |
73 | get_new_mmu_context(mm, asid_cache); | 69 | __get_new_mmu_context(mm); |
74 | set_rasid_register(ASID_INSERT(mm->context)); | 70 | __load_mmu_context(mm); |
75 | local_irq_restore(flags); | 71 | local_irq_restore(flags); |
76 | } | 72 | } |
77 | else | 73 | else |
78 | mm->context = 0; | 74 | mm->context = 0; |
79 | } | 75 | } |
80 | 76 | ||
77 | #define _ITLB_ENTRIES (ITLB_ARF_WAYS << XCHAL_ITLB_ARF_ENTRIES_LOG2) | ||
78 | #define _DTLB_ENTRIES (DTLB_ARF_WAYS << XCHAL_DTLB_ARF_ENTRIES_LOG2) | ||
79 | #if _ITLB_ENTRIES > _DTLB_ENTRIES | ||
80 | # define _TLB_ENTRIES _ITLB_ENTRIES | ||
81 | #else | ||
82 | # define _TLB_ENTRIES _DTLB_ENTRIES | ||
83 | #endif | ||
84 | |||
81 | void flush_tlb_range (struct vm_area_struct *vma, | 85 | void flush_tlb_range (struct vm_area_struct *vma, |
82 | unsigned long start, unsigned long end) | 86 | unsigned long start, unsigned long end) |
83 | { | 87 | { |
@@ -93,7 +97,7 @@ void flush_tlb_range (struct vm_area_struct *vma, | |||
93 | #endif | 97 | #endif |
94 | local_save_flags(flags); | 98 | local_save_flags(flags); |
95 | 99 | ||
96 | if (end-start + (PAGE_SIZE-1) <= SMALLEST_NTLB_ENTRIES << PAGE_SHIFT) { | 100 | if (end-start + (PAGE_SIZE-1) <= _TLB_ENTRIES << PAGE_SHIFT) { |
97 | int oldpid = get_rasid_register(); | 101 | int oldpid = get_rasid_register(); |
98 | set_rasid_register (ASID_INSERT(mm->context)); | 102 | set_rasid_register (ASID_INSERT(mm->context)); |
99 | start &= PAGE_MASK; | 103 | start &= PAGE_MASK; |
@@ -111,9 +115,7 @@ void flush_tlb_range (struct vm_area_struct *vma, | |||
111 | 115 | ||
112 | set_rasid_register(oldpid); | 116 | set_rasid_register(oldpid); |
113 | } else { | 117 | } else { |
114 | get_new_mmu_context(mm, asid_cache); | 118 | flush_tlb_mm(mm); |
115 | if (mm == current->active_mm) | ||
116 | set_rasid_register(ASID_INSERT(mm->context)); | ||
117 | } | 119 | } |
118 | local_irq_restore(flags); | 120 | local_irq_restore(flags); |
119 | } | 121 | } |
@@ -123,10 +125,6 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
123 | struct mm_struct* mm = vma->vm_mm; | 125 | struct mm_struct* mm = vma->vm_mm; |
124 | unsigned long flags; | 126 | unsigned long flags; |
125 | int oldpid; | 127 | int oldpid; |
126 | #if 0 | ||
127 | printk("[tlbpage<%02lx,%08lx>]\n", | ||
128 | (unsigned long)mm->context, page); | ||
129 | #endif | ||
130 | 128 | ||
131 | if(mm->context == NO_CONTEXT) | 129 | if(mm->context == NO_CONTEXT) |
132 | return; | 130 | return; |
@@ -142,404 +140,5 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
142 | set_rasid_register(oldpid); | 140 | set_rasid_register(oldpid); |
143 | 141 | ||
144 | local_irq_restore(flags); | 142 | local_irq_restore(flags); |
145 | |||
146 | #if 0 | ||
147 | flush_tlb_all(); | ||
148 | return; | ||
149 | #endif | ||
150 | } | ||
151 | |||
152 | |||
153 | #ifdef DEBUG_TLB | ||
154 | |||
155 | #define USE_ITLB 0 | ||
156 | #define USE_DTLB 1 | ||
157 | |||
158 | struct way_config_t { | ||
159 | int indicies; | ||
160 | int indicies_log2; | ||
161 | int pgsz_log2; | ||
162 | int arf; | ||
163 | }; | ||
164 | |||
165 | static struct way_config_t itlb[XCHAL_ITLB_WAYS] = | ||
166 | { | ||
167 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES), | ||
168 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES_LOG2), | ||
169 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, PAGESZ_LOG2_MIN), | ||
170 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ARF) | ||
171 | }, | ||
172 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES), | ||
173 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES_LOG2), | ||
174 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, PAGESZ_LOG2_MIN), | ||
175 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ARF) | ||
176 | }, | ||
177 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES), | ||
178 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES_LOG2), | ||
179 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, PAGESZ_LOG2_MIN), | ||
180 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ARF) | ||
181 | }, | ||
182 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES), | ||
183 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES_LOG2), | ||
184 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, PAGESZ_LOG2_MIN), | ||
185 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ARF) | ||
186 | }, | ||
187 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES), | ||
188 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES_LOG2), | ||
189 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, PAGESZ_LOG2_MIN), | ||
190 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ARF) | ||
191 | }, | ||
192 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES), | ||
193 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES_LOG2), | ||
194 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, PAGESZ_LOG2_MIN), | ||
195 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ARF) | ||
196 | }, | ||
197 | { XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES), | ||
198 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES_LOG2), | ||
199 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, PAGESZ_LOG2_MIN), | ||
200 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ARF) | ||
201 | } | ||
202 | }; | ||
203 | |||
204 | static struct way_config_t dtlb[XCHAL_DTLB_WAYS] = | ||
205 | { | ||
206 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES), | ||
207 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES_LOG2), | ||
208 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, PAGESZ_LOG2_MIN), | ||
209 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ARF) | ||
210 | }, | ||
211 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES), | ||
212 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES_LOG2), | ||
213 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, PAGESZ_LOG2_MIN), | ||
214 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ARF) | ||
215 | }, | ||
216 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES), | ||
217 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES_LOG2), | ||
218 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, PAGESZ_LOG2_MIN), | ||
219 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ARF) | ||
220 | }, | ||
221 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES), | ||
222 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES_LOG2), | ||
223 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, PAGESZ_LOG2_MIN), | ||
224 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ARF) | ||
225 | }, | ||
226 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES), | ||
227 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES_LOG2), | ||
228 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, PAGESZ_LOG2_MIN), | ||
229 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ARF) | ||
230 | }, | ||
231 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES), | ||
232 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES_LOG2), | ||
233 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, PAGESZ_LOG2_MIN), | ||
234 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ARF) | ||
235 | }, | ||
236 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES), | ||
237 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES_LOG2), | ||
238 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, PAGESZ_LOG2_MIN), | ||
239 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ARF) | ||
240 | }, | ||
241 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES), | ||
242 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES_LOG2), | ||
243 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, PAGESZ_LOG2_MIN), | ||
244 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ARF) | ||
245 | }, | ||
246 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES), | ||
247 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES_LOG2), | ||
248 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, PAGESZ_LOG2_MIN), | ||
249 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ARF) | ||
250 | }, | ||
251 | { XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES), | ||
252 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES_LOG2), | ||
253 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, PAGESZ_LOG2_MIN), | ||
254 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ARF) | ||
255 | } | ||
256 | }; | ||
257 | |||
258 | /* Total number of entries: */ | ||
259 | #define ITLB_TOTAL_ENTRIES \ | ||
260 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY0_SET, ENTRIES) + \ | ||
261 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY1_SET, ENTRIES) + \ | ||
262 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY2_SET, ENTRIES) + \ | ||
263 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY3_SET, ENTRIES) + \ | ||
264 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY4_SET, ENTRIES) + \ | ||
265 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY5_SET, ENTRIES) + \ | ||
266 | XCHAL_ITLB_SET(XCHAL_ITLB_WAY6_SET, ENTRIES) | ||
267 | #define DTLB_TOTAL_ENTRIES \ | ||
268 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY0_SET, ENTRIES) + \ | ||
269 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY1_SET, ENTRIES) + \ | ||
270 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY2_SET, ENTRIES) + \ | ||
271 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY3_SET, ENTRIES) + \ | ||
272 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY4_SET, ENTRIES) + \ | ||
273 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY5_SET, ENTRIES) + \ | ||
274 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY6_SET, ENTRIES) + \ | ||
275 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY7_SET, ENTRIES) + \ | ||
276 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY8_SET, ENTRIES) + \ | ||
277 | XCHAL_DTLB_SET(XCHAL_DTLB_WAY9_SET, ENTRIES) | ||
278 | |||
279 | |||
280 | typedef struct { | ||
281 | unsigned va; | ||
282 | unsigned pa; | ||
283 | unsigned char asid; | ||
284 | unsigned char ca; | ||
285 | unsigned char way; | ||
286 | unsigned char index; | ||
287 | unsigned char pgsz_log2; /* 0 .. 32 */ | ||
288 | unsigned char type; /* 0=ITLB 1=DTLB */ | ||
289 | } tlb_dump_entry_t; | ||
290 | |||
291 | /* Return -1 if a precedes b, +1 if a follows b, 0 if same: */ | ||
292 | int cmp_tlb_dump_info( tlb_dump_entry_t *a, tlb_dump_entry_t *b ) | ||
293 | { | ||
294 | if (a->asid < b->asid) return -1; | ||
295 | if (a->asid > b->asid) return 1; | ||
296 | if (a->va < b->va) return -1; | ||
297 | if (a->va > b->va) return 1; | ||
298 | if (a->pa < b->pa) return -1; | ||
299 | if (a->pa > b->pa) return 1; | ||
300 | if (a->ca < b->ca) return -1; | ||
301 | if (a->ca > b->ca) return 1; | ||
302 | if (a->way < b->way) return -1; | ||
303 | if (a->way > b->way) return 1; | ||
304 | if (a->index < b->index) return -1; | ||
305 | if (a->index > b->index) return 1; | ||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | void sort_tlb_dump_info( tlb_dump_entry_t *t, int n ) | ||
310 | { | ||
311 | int i, j; | ||
312 | /* Simple O(n*n) sort: */ | ||
313 | for (i = 0; i < n-1; i++) | ||
314 | for (j = i+1; j < n; j++) | ||
315 | if (cmp_tlb_dump_info(t+i, t+j) > 0) { | ||
316 | tlb_dump_entry_t tmp = t[i]; | ||
317 | t[i] = t[j]; | ||
318 | t[j] = tmp; | ||
319 | } | ||
320 | } | ||
321 | |||
322 | |||
323 | static tlb_dump_entry_t itlb_dump_info[ITLB_TOTAL_ENTRIES]; | ||
324 | static tlb_dump_entry_t dtlb_dump_info[DTLB_TOTAL_ENTRIES]; | ||
325 | |||
326 | |||
327 | static inline char *way_type (int type) | ||
328 | { | ||
329 | return type ? "autorefill" : "non-autorefill"; | ||
330 | } | ||
331 | |||
332 | void print_entry (struct way_config_t *way_info, | ||
333 | unsigned int way, | ||
334 | unsigned int index, | ||
335 | unsigned int virtual, | ||
336 | unsigned int translation) | ||
337 | { | ||
338 | char valid_chr; | ||
339 | unsigned int va, pa, asid, ca; | ||
340 | |||
341 | va = virtual & | ||
342 | ~((1 << (way_info->pgsz_log2 + way_info->indicies_log2)) - 1); | ||
343 | asid = virtual & ((1 << XCHAL_MMU_ASID_BITS) - 1); | ||
344 | pa = translation & ~((1 << way_info->pgsz_log2) - 1); | ||
345 | ca = translation & ((1 << XCHAL_MMU_CA_BITS) - 1); | ||
346 | valid_chr = asid ? 'V' : 'I'; | ||
347 | |||
348 | /* Compute and incorporate the effect of the index bits on the | ||
349 | * va. It's more useful for kernel debugging, since we always | ||
350 | * want to know the effective va anyway. */ | ||
351 | |||
352 | va += index << way_info->pgsz_log2; | ||
353 | |||
354 | printk ("\t[%d,%d] (%c) vpn 0x%.8x ppn 0x%.8x asid 0x%.2x am 0x%x\n", | ||
355 | way, index, valid_chr, va, pa, asid, ca); | ||
356 | } | ||
357 | |||
358 | void print_itlb_entry (struct way_config_t *way_info, int way, int index) | ||
359 | { | ||
360 | print_entry (way_info, way, index, | ||
361 | read_itlb_virtual (way + (index << way_info->pgsz_log2)), | ||
362 | read_itlb_translation (way + (index << way_info->pgsz_log2))); | ||
363 | } | ||
364 | |||
365 | void print_dtlb_entry (struct way_config_t *way_info, int way, int index) | ||
366 | { | ||
367 | print_entry (way_info, way, index, | ||
368 | read_dtlb_virtual (way + (index << way_info->pgsz_log2)), | ||
369 | read_dtlb_translation (way + (index << way_info->pgsz_log2))); | ||
370 | } | ||
371 | |||
372 | void dump_itlb (void) | ||
373 | { | ||
374 | int way, index; | ||
375 | |||
376 | printk ("\nITLB: ways = %d\n", XCHAL_ITLB_WAYS); | ||
377 | |||
378 | for (way = 0; way < XCHAL_ITLB_WAYS; way++) { | ||
379 | printk ("\nWay: %d, Entries: %d, MinPageSize: %d, Type: %s\n", | ||
380 | way, itlb[way].indicies, | ||
381 | itlb[way].pgsz_log2, way_type(itlb[way].arf)); | ||
382 | for (index = 0; index < itlb[way].indicies; index++) { | ||
383 | print_itlb_entry(&itlb[way], way, index); | ||
384 | } | ||
385 | } | ||
386 | } | ||
387 | |||
388 | void dump_dtlb (void) | ||
389 | { | ||
390 | int way, index; | ||
391 | |||
392 | printk ("\nDTLB: ways = %d\n", XCHAL_DTLB_WAYS); | ||
393 | |||
394 | for (way = 0; way < XCHAL_DTLB_WAYS; way++) { | ||
395 | printk ("\nWay: %d, Entries: %d, MinPageSize: %d, Type: %s\n", | ||
396 | way, dtlb[way].indicies, | ||
397 | dtlb[way].pgsz_log2, way_type(dtlb[way].arf)); | ||
398 | for (index = 0; index < dtlb[way].indicies; index++) { | ||
399 | print_dtlb_entry(&dtlb[way], way, index); | ||
400 | } | ||
401 | } | ||
402 | } | ||
403 | |||
404 | void dump_tlb (tlb_dump_entry_t *tinfo, struct way_config_t *config, | ||
405 | int entries, int ways, int type, int show_invalid) | ||
406 | { | ||
407 | tlb_dump_entry_t *e = tinfo; | ||
408 | int way, i; | ||
409 | |||
410 | /* Gather all info: */ | ||
411 | for (way = 0; way < ways; way++) { | ||
412 | struct way_config_t *cfg = config + way; | ||
413 | for (i = 0; i < cfg->indicies; i++) { | ||
414 | unsigned wayindex = way + (i << cfg->pgsz_log2); | ||
415 | unsigned vv = (type ? read_dtlb_virtual (wayindex) | ||
416 | : read_itlb_virtual (wayindex)); | ||
417 | unsigned pp = (type ? read_dtlb_translation (wayindex) | ||
418 | : read_itlb_translation (wayindex)); | ||
419 | |||
420 | /* Compute and incorporate the effect of the index bits on the | ||
421 | * va. It's more useful for kernel debugging, since we always | ||
422 | * want to know the effective va anyway. */ | ||
423 | |||
424 | e->va = (vv & ~((1 << (cfg->pgsz_log2 + cfg->indicies_log2)) - 1)); | ||
425 | e->va += (i << cfg->pgsz_log2); | ||
426 | e->pa = (pp & ~((1 << cfg->pgsz_log2) - 1)); | ||
427 | e->asid = (vv & ((1 << XCHAL_MMU_ASID_BITS) - 1)); | ||
428 | e->ca = (pp & ((1 << XCHAL_MMU_CA_BITS) - 1)); | ||
429 | e->way = way; | ||
430 | e->index = i; | ||
431 | e->pgsz_log2 = cfg->pgsz_log2; | ||
432 | e->type = type; | ||
433 | e++; | ||
434 | } | ||
435 | } | ||
436 | #if 1 | ||
437 | /* Sort by ASID and VADDR: */ | ||
438 | sort_tlb_dump_info (tinfo, entries); | ||
439 | #endif | ||
440 | |||
441 | /* Display all sorted info: */ | ||
442 | printk ("\n%cTLB dump:\n", (type ? 'D' : 'I')); | ||
443 | for (e = tinfo, i = 0; i < entries; i++, e++) { | ||
444 | #if 0 | ||
445 | if (e->asid == 0 && !show_invalid) | ||
446 | continue; | ||
447 | #endif | ||
448 | printk ("%c way=%d i=%d ASID=%02X V=%08X -> P=%08X CA=%X (%d %cB)\n", | ||
449 | (e->type ? 'D' : 'I'), e->way, e->index, | ||
450 | e->asid, e->va, e->pa, e->ca, | ||
451 | (1 << (e->pgsz_log2 % 10)), | ||
452 | " kMG"[e->pgsz_log2 / 10] | ||
453 | ); | ||
454 | } | ||
455 | } | ||
456 | |||
457 | void dump_tlbs2 (int showinv) | ||
458 | { | ||
459 | dump_tlb (itlb_dump_info, itlb, ITLB_TOTAL_ENTRIES, XCHAL_ITLB_WAYS, 0, showinv); | ||
460 | dump_tlb (dtlb_dump_info, dtlb, DTLB_TOTAL_ENTRIES, XCHAL_DTLB_WAYS, 1, showinv); | ||
461 | } | ||
462 | |||
463 | void dump_all_tlbs (void) | ||
464 | { | ||
465 | dump_tlbs2 (1); | ||
466 | } | ||
467 | |||
468 | void dump_valid_tlbs (void) | ||
469 | { | ||
470 | dump_tlbs2 (0); | ||
471 | } | 143 | } |
472 | 144 | ||
473 | |||
474 | void dump_tlbs (void) | ||
475 | { | ||
476 | dump_itlb(); | ||
477 | dump_dtlb(); | ||
478 | } | ||
479 | |||
480 | void dump_cache_tag(int dcache, int idx) | ||
481 | { | ||
482 | int w, i, s, e; | ||
483 | unsigned long tag, index; | ||
484 | unsigned long num_lines, num_ways, cache_size, line_size; | ||
485 | |||
486 | num_ways = dcache ? XCHAL_DCACHE_WAYS : XCHAL_ICACHE_WAYS; | ||
487 | cache_size = dcache ? XCHAL_DCACHE_SIZE : XCHAL_ICACHE_SIZE; | ||
488 | line_size = dcache ? XCHAL_DCACHE_LINESIZE : XCHAL_ICACHE_LINESIZE; | ||
489 | |||
490 | num_lines = cache_size / num_ways; | ||
491 | |||
492 | s = 0; e = num_lines; | ||
493 | |||
494 | if (idx >= 0) | ||
495 | e = (s = idx * line_size) + 1; | ||
496 | |||
497 | for (i = s; i < e; i+= line_size) { | ||
498 | printk("\nline %#08x:", i); | ||
499 | for (w = 0; w < num_ways; w++) { | ||
500 | index = w * num_lines + i; | ||
501 | if (dcache) | ||
502 | __asm__ __volatile__("ldct %0, %1\n\t" | ||
503 | : "=a"(tag) : "a"(index)); | ||
504 | else | ||
505 | __asm__ __volatile__("lict %0, %1\n\t" | ||
506 | : "=a"(tag) : "a"(index)); | ||
507 | |||
508 | printk(" %#010lx", tag); | ||
509 | } | ||
510 | } | ||
511 | printk ("\n"); | ||
512 | } | ||
513 | |||
514 | void dump_icache(int index) | ||
515 | { | ||
516 | unsigned long data, addr; | ||
517 | int w, i; | ||
518 | |||
519 | const unsigned long num_ways = XCHAL_ICACHE_WAYS; | ||
520 | const unsigned long cache_size = XCHAL_ICACHE_SIZE; | ||
521 | const unsigned long line_size = XCHAL_ICACHE_LINESIZE; | ||
522 | const unsigned long num_lines = cache_size / num_ways / line_size; | ||
523 | |||
524 | for (w = 0; w < num_ways; w++) { | ||
525 | printk ("\nWay %d", w); | ||
526 | |||
527 | for (i = 0; i < line_size; i+= 4) { | ||
528 | addr = w * num_lines + index * line_size + i; | ||
529 | __asm__ __volatile__("licw %0, %1\n\t" | ||
530 | : "=a"(data) : "a"(addr)); | ||
531 | printk(" %#010lx", data); | ||
532 | } | ||
533 | } | ||
534 | printk ("\n"); | ||
535 | } | ||
536 | |||
537 | void dump_cache_tags(void) | ||
538 | { | ||
539 | printk("Instruction cache\n"); | ||
540 | dump_cache_tag(0, -1); | ||
541 | printk("Data cache\n"); | ||
542 | dump_cache_tag(1, -1); | ||
543 | } | ||
544 | |||
545 | #endif | ||
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 5c947cae7520..2f4f20ffe666 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
@@ -25,11 +25,15 @@ | |||
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | 27 | ||
28 | #include <xtensa/simcall.h> | 28 | #include <asm/platform/simcall.h> |
29 | 29 | ||
30 | #include <linux/tty.h> | 30 | #include <linux/tty.h> |
31 | #include <linux/tty_flip.h> | 31 | #include <linux/tty_flip.h> |
32 | 32 | ||
33 | #ifdef SERIAL_INLINE | ||
34 | #define _INLINE_ inline | ||
35 | #endif | ||
36 | |||
33 | #define SERIAL_MAX_NUM_LINES 1 | 37 | #define SERIAL_MAX_NUM_LINES 1 |
34 | #define SERIAL_TIMER_VALUE (20 * HZ) | 38 | #define SERIAL_TIMER_VALUE (20 * HZ) |
35 | 39 | ||
@@ -191,7 +195,7 @@ static int rs_read_proc(char *page, char **start, off_t off, int count, | |||
191 | } | 195 | } |
192 | 196 | ||
193 | 197 | ||
194 | static const struct tty_operations serial_ops = { | 198 | static struct tty_operations serial_ops = { |
195 | .open = rs_open, | 199 | .open = rs_open, |
196 | .close = rs_close, | 200 | .close = rs_close, |
197 | .write = rs_write, | 201 | .write = rs_write, |
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index 15d64414bd60..8ebfc8761229 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | 36 | ||
37 | #include <xtensa/simcall.h> | 37 | #include <asm/platform/simcall.h> |
38 | 38 | ||
39 | #define DRIVER_NAME "iss-netdev" | 39 | #define DRIVER_NAME "iss-netdev" |
40 | #define ETH_MAX_PACKET 1500 | 40 | #define ETH_MAX_PACKET 1500 |