diff options
Diffstat (limited to 'arch')
144 files changed, 1061 insertions, 1072 deletions
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 8c3035d5ffc9..3173924a9b60 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -111,7 +111,7 @@ | |||
111 | CALL(sys_statfs) | 111 | CALL(sys_statfs) |
112 | /* 100 */ CALL(sys_fstatfs) | 112 | /* 100 */ CALL(sys_fstatfs) |
113 | CALL(sys_ni_syscall) | 113 | CALL(sys_ni_syscall) |
114 | CALL(OBSOLETE(sys_socketcall)) | 114 | CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall))) |
115 | CALL(sys_syslog) | 115 | CALL(sys_syslog) |
116 | CALL(sys_setitimer) | 116 | CALL(sys_setitimer) |
117 | /* 105 */ CALL(sys_getitimer) | 117 | /* 105 */ CALL(sys_getitimer) |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c45d10d07bde..68273b4dc882 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/root_dev.h> | 23 | #include <linux/root_dev.h> |
24 | #include <linux/cpu.h> | 24 | #include <linux/cpu.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/smp.h> | ||
26 | 27 | ||
27 | #include <asm/cpu.h> | 28 | #include <asm/cpu.h> |
28 | #include <asm/elf.h> | 29 | #include <asm/elf.h> |
@@ -771,6 +772,10 @@ void __init setup_arch(char **cmdline_p) | |||
771 | paging_init(&meminfo, mdesc); | 772 | paging_init(&meminfo, mdesc); |
772 | request_standard_resources(&meminfo, mdesc); | 773 | request_standard_resources(&meminfo, mdesc); |
773 | 774 | ||
775 | #ifdef CONFIG_SMP | ||
776 | smp_init_cpus(); | ||
777 | #endif | ||
778 | |||
774 | cpu_init(); | 779 | cpu_init(); |
775 | 780 | ||
776 | /* | 781 | /* |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 7338948bd7d3..02aa300c4633 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -338,7 +338,6 @@ void __init smp_prepare_boot_cpu(void) | |||
338 | 338 | ||
339 | per_cpu(cpu_data, cpu).idle = current; | 339 | per_cpu(cpu_data, cpu).idle = current; |
340 | 340 | ||
341 | cpu_set(cpu, cpu_possible_map); | ||
342 | cpu_set(cpu, cpu_present_map); | 341 | cpu_set(cpu, cpu_present_map); |
343 | cpu_set(cpu, cpu_online_map); | 342 | cpu_set(cpu, cpu_online_map); |
344 | } | 343 | } |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 9d4b76409c64..8e2f9bc3368b 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -64,6 +64,7 @@ | |||
64 | * sys_connect: | 64 | * sys_connect: |
65 | * sys_sendmsg: | 65 | * sys_sendmsg: |
66 | * sys_sendto: | 66 | * sys_sendto: |
67 | * sys_socketcall: | ||
67 | * | 68 | * |
68 | * struct sockaddr_un loses its padding with EABI. Since the size of the | 69 | * struct sockaddr_un loses its padding with EABI. Since the size of the |
69 | * structure is used as a validation test in unix_mkname(), we need to | 70 | * structure is used as a validation test in unix_mkname(), we need to |
@@ -78,6 +79,7 @@ | |||
78 | #include <linux/eventpoll.h> | 79 | #include <linux/eventpoll.h> |
79 | #include <linux/sem.h> | 80 | #include <linux/sem.h> |
80 | #include <linux/socket.h> | 81 | #include <linux/socket.h> |
82 | #include <linux/net.h> | ||
81 | #include <asm/ipc.h> | 83 | #include <asm/ipc.h> |
82 | #include <asm/uaccess.h> | 84 | #include <asm/uaccess.h> |
83 | 85 | ||
@@ -408,3 +410,31 @@ asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned fla | |||
408 | return sys_sendmsg(fd, msg, flags); | 410 | return sys_sendmsg(fd, msg, flags); |
409 | } | 411 | } |
410 | 412 | ||
413 | asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args) | ||
414 | { | ||
415 | unsigned long r = -EFAULT, a[6]; | ||
416 | |||
417 | switch (call) { | ||
418 | case SYS_BIND: | ||
419 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
420 | r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
421 | break; | ||
422 | case SYS_CONNECT: | ||
423 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
424 | r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
425 | break; | ||
426 | case SYS_SENDTO: | ||
427 | if (copy_from_user(a, args, 6 * sizeof(long)) == 0) | ||
428 | r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3], | ||
429 | (struct sockaddr __user *)a[4], a[5]); | ||
430 | break; | ||
431 | case SYS_SENDMSG: | ||
432 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
433 | r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]); | ||
434 | break; | ||
435 | default: | ||
436 | r = sys_socketcall(call, args); | ||
437 | } | ||
438 | |||
439 | return r; | ||
440 | } | ||
diff --git a/arch/arm/mach-integrator/platsmp.c b/arch/arm/mach-integrator/platsmp.c index ea10bd8c972c..1bc8534ef0c6 100644 --- a/arch/arm/mach-integrator/platsmp.c +++ b/arch/arm/mach-integrator/platsmp.c | |||
@@ -140,6 +140,18 @@ static void __init poke_milo(void) | |||
140 | mb(); | 140 | mb(); |
141 | } | 141 | } |
142 | 142 | ||
143 | /* | ||
144 | * Initialise the CPU possible map early - this describes the CPUs | ||
145 | * which may be present or become present in the system. | ||
146 | */ | ||
147 | void __init smp_init_cpus(void) | ||
148 | { | ||
149 | unsigned int i, ncores = get_core_count(); | ||
150 | |||
151 | for (i = 0; i < ncores; i++) | ||
152 | cpu_set(i, cpu_possible_map); | ||
153 | } | ||
154 | |||
143 | void __init smp_prepare_cpus(unsigned int max_cpus) | 155 | void __init smp_prepare_cpus(unsigned int max_cpus) |
144 | { | 156 | { |
145 | unsigned int ncores = get_core_count(); | 157 | unsigned int ncores = get_core_count(); |
@@ -176,14 +188,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
176 | max_cpus = ncores; | 188 | max_cpus = ncores; |
177 | 189 | ||
178 | /* | 190 | /* |
179 | * Initialise the possible/present maps. | 191 | * Initialise the present map, which describes the set of CPUs |
180 | * cpu_possible_map describes the set of CPUs which may be present | 192 | * actually populated at the present time. |
181 | * cpu_present_map describes the set of CPUs populated | ||
182 | */ | 193 | */ |
183 | for (i = 0; i < max_cpus; i++) { | 194 | for (i = 0; i < max_cpus; i++) |
184 | cpu_set(i, cpu_possible_map); | ||
185 | cpu_set(i, cpu_present_map); | 195 | cpu_set(i, cpu_present_map); |
186 | } | ||
187 | 196 | ||
188 | /* | 197 | /* |
189 | * Do we need any more CPUs? If so, then let them know where | 198 | * Do we need any more CPUs? If so, then let them know where |
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c index e4f4c52d93d4..0ebbcb20c6ae 100644 --- a/arch/arm/mach-iop3xx/iop321-setup.c +++ b/arch/arm/mach-iop3xx/iop321-setup.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <linux/init.h> | ||
17 | #include <linux/major.h> | 16 | #include <linux/major.h> |
18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
19 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c index 63585485123e..2d6abe5be14d 100644 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ b/arch/arm/mach-iop3xx/iop331-setup.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/init.h> | ||
16 | #include <linux/major.h> | 15 | #include <linux/major.h> |
17 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index da9340a53434..f260a9d34f70 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -27,8 +27,6 @@ static struct flash_platform_data nslu2_flash_data = { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | static struct resource nslu2_flash_resource = { | 29 | static struct resource nslu2_flash_resource = { |
30 | .start = NSLU2_FLASH_BASE, | ||
31 | .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE, | ||
32 | .flags = IORESOURCE_MEM, | 30 | .flags = IORESOURCE_MEM, |
33 | }; | 31 | }; |
34 | 32 | ||
@@ -116,6 +114,10 @@ static void __init nslu2_init(void) | |||
116 | { | 114 | { |
117 | ixp4xx_sys_init(); | 115 | ixp4xx_sys_init(); |
118 | 116 | ||
117 | nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); | ||
118 | nslu2_flash_resource.end = | ||
119 | IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; | ||
120 | |||
119 | pm_power_off = nslu2_power_off; | 121 | pm_power_off = nslu2_power_off; |
120 | 122 | ||
121 | platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); | 123 | platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index a8fbd76d8be5..b8484e15dacb 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -143,6 +143,18 @@ static void __init poke_milo(void) | |||
143 | mb(); | 143 | mb(); |
144 | } | 144 | } |
145 | 145 | ||
146 | /* | ||
147 | * Initialise the CPU possible map early - this describes the CPUs | ||
148 | * which may be present or become present in the system. | ||
149 | */ | ||
150 | void __init smp_init_cpus(void) | ||
151 | { | ||
152 | unsigned int i, ncores = get_core_count(); | ||
153 | |||
154 | for (i = 0; i < ncores; i++) | ||
155 | cpu_set(i, cpu_possible_map); | ||
156 | } | ||
157 | |||
146 | void __init smp_prepare_cpus(unsigned int max_cpus) | 158 | void __init smp_prepare_cpus(unsigned int max_cpus) |
147 | { | 159 | { |
148 | unsigned int ncores = get_core_count(); | 160 | unsigned int ncores = get_core_count(); |
@@ -179,14 +191,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
179 | local_timer_setup(cpu); | 191 | local_timer_setup(cpu); |
180 | 192 | ||
181 | /* | 193 | /* |
182 | * Initialise the possible/present maps. | 194 | * Initialise the present map, which describes the set of CPUs |
183 | * cpu_possible_map describes the set of CPUs which may be present | 195 | * actually populated at the present time. |
184 | * cpu_present_map describes the set of CPUs populated | ||
185 | */ | 196 | */ |
186 | for (i = 0; i < max_cpus; i++) { | 197 | for (i = 0; i < max_cpus; i++) |
187 | cpu_set(i, cpu_possible_map); | ||
188 | cpu_set(i, cpu_present_map); | 198 | cpu_set(i, cpu_present_map); |
189 | } | ||
190 | 199 | ||
191 | /* | 200 | /* |
192 | * Do we need any more CPUs? If so, then let them know where | 201 | * Do we need any more CPUs? If so, then let them know where |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 1c316f14ed94..646a3a5d33a5 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -46,10 +46,11 @@ | |||
46 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
47 | #include <asm/mach-types.h> | 47 | #include <asm/mach-types.h> |
48 | 48 | ||
49 | //#include <asm/debug-ll.h> | 49 | |
50 | #include <asm/arch/regs-serial.h> | 50 | #include <asm/arch/regs-serial.h> |
51 | #include <asm/arch/regs-lcd.h> | 51 | #include <asm/arch/regs-lcd.h> |
52 | 52 | ||
53 | #include <asm/arch/h1940-latch.h> | ||
53 | #include <asm/arch/fb.h> | 54 | #include <asm/arch/fb.h> |
54 | 55 | ||
55 | #include <linux/serial_core.h> | 56 | #include <linux/serial_core.h> |
@@ -59,7 +60,12 @@ | |||
59 | #include "cpu.h" | 60 | #include "cpu.h" |
60 | 61 | ||
61 | static struct map_desc h1940_iodesc[] __initdata = { | 62 | static struct map_desc h1940_iodesc[] __initdata = { |
62 | /* nothing here yet */ | 63 | [0] = { |
64 | .virtual = (unsigned long)H1940_LATCH, | ||
65 | .pfn = __phys_to_pfn(H1940_PA_LATCH), | ||
66 | .length = SZ_16K, | ||
67 | .type = MT_DEVICE | ||
68 | }, | ||
63 | }; | 69 | }; |
64 | 70 | ||
65 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 71 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
@@ -92,6 +98,25 @@ static struct s3c2410_uartcfg h1940_uartcfgs[] = { | |||
92 | } | 98 | } |
93 | }; | 99 | }; |
94 | 100 | ||
101 | /* Board control latch control */ | ||
102 | |||
103 | static unsigned int latch_state = H1940_LATCH_DEFAULT; | ||
104 | |||
105 | void h1940_latch_control(unsigned int clear, unsigned int set) | ||
106 | { | ||
107 | unsigned long flags; | ||
108 | |||
109 | local_irq_save(flags); | ||
110 | |||
111 | latch_state &= ~clear; | ||
112 | latch_state |= set; | ||
113 | |||
114 | __raw_writel(latch_state, H1940_LATCH); | ||
115 | |||
116 | local_irq_restore(flags); | ||
117 | } | ||
118 | |||
119 | EXPORT_SYMBOL_GPL(h1940_latch_control); | ||
95 | 120 | ||
96 | 121 | ||
97 | /** | 122 | /** |
diff --git a/arch/arm/mach-s3c2410/s3c2400.h b/arch/arm/mach-s3c2410/s3c2400.h new file mode 100644 index 000000000000..8b2394e1ed40 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2400.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* arch/arm/mach-s3c2410/s3c2400.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C2400 cpu support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * Modifications: | ||
13 | * 09-Fev-2006 LCVR First version, based on s3c2410.h | ||
14 | */ | ||
15 | |||
16 | #ifdef CONFIG_CPU_S3C2400 | ||
17 | |||
18 | extern int s3c2400_init(void); | ||
19 | |||
20 | extern void s3c2400_map_io(struct map_desc *mach_desc, int size); | ||
21 | |||
22 | extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
23 | |||
24 | extern void s3c2400_init_clocks(int xtal); | ||
25 | |||
26 | #else | ||
27 | #define s3c2400_init_clocks NULL | ||
28 | #define s3c2400_init_uarts NULL | ||
29 | #define s3c2400_map_io NULL | ||
30 | #define s3c2400_init NULL | ||
31 | #endif | ||
diff --git a/arch/arm/plat-omap/pm.c b/arch/arm/plat-omap/pm.c index 1a24e2c10714..093efd786f21 100644 --- a/arch/arm/plat-omap/pm.c +++ b/arch/arm/plat-omap/pm.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/pm.h> | 38 | #include <linux/pm.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/pm.h> | ||
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
43 | 42 | ||
44 | #include <asm/io.h> | 43 | #include <asm/io.h> |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 60a617aff8ba..e08383712370 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -25,6 +25,10 @@ config GENERIC_HARDIRQS | |||
25 | bool | 25 | bool |
26 | default n | 26 | default n |
27 | 27 | ||
28 | config TIME_LOW_RES | ||
29 | bool | ||
30 | default y | ||
31 | |||
28 | mainmenu "Fujitsu FR-V Kernel Configuration" | 32 | mainmenu "Fujitsu FR-V Kernel Configuration" |
29 | 33 | ||
30 | source "init/Kconfig" | 34 | source "init/Kconfig" |
diff --git a/arch/frv/Makefile b/arch/frv/Makefile index 90c0fb8d9dc3..d163747d17c0 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile | |||
@@ -81,7 +81,7 @@ endif | |||
81 | # - reserve CC3 for use with atomic ops | 81 | # - reserve CC3 for use with atomic ops |
82 | # - all the extra registers are dealt with only at context switch time | 82 | # - all the extra registers are dealt with only at context switch time |
83 | CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media | 83 | CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media |
84 | CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 | 84 | CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 |
85 | AFLAGS += -mno-fdpic | 85 | AFLAGS += -mno-fdpic |
86 | ASFLAGS += -mno-fdpic | 86 | ASFLAGS += -mno-fdpic |
87 | 87 | ||
diff --git a/arch/frv/kernel/break.S b/arch/frv/kernel/break.S index 33233dc23e29..687c48d62dde 100644 --- a/arch/frv/kernel/break.S +++ b/arch/frv/kernel/break.S | |||
@@ -200,12 +200,20 @@ __break_step: | |||
200 | movsg bpcsr,gr2 | 200 | movsg bpcsr,gr2 |
201 | sethi.p %hi(__entry_kernel_external_interrupt),gr3 | 201 | sethi.p %hi(__entry_kernel_external_interrupt),gr3 |
202 | setlo %lo(__entry_kernel_external_interrupt),gr3 | 202 | setlo %lo(__entry_kernel_external_interrupt),gr3 |
203 | subcc gr2,gr3,gr0,icc0 | 203 | subcc.p gr2,gr3,gr0,icc0 |
204 | sethi %hi(__entry_uspace_external_interrupt),gr3 | ||
205 | setlo.p %lo(__entry_uspace_external_interrupt),gr3 | ||
204 | beq icc0,#2,__break_step_kernel_external_interrupt | 206 | beq icc0,#2,__break_step_kernel_external_interrupt |
205 | sethi.p %hi(__entry_uspace_external_interrupt),gr3 | 207 | subcc.p gr2,gr3,gr0,icc0 |
206 | setlo %lo(__entry_uspace_external_interrupt),gr3 | 208 | sethi %hi(__entry_kernel_external_interrupt_virtually_disabled),gr3 |
207 | subcc gr2,gr3,gr0,icc0 | 209 | setlo.p %lo(__entry_kernel_external_interrupt_virtually_disabled),gr3 |
208 | beq icc0,#2,__break_step_uspace_external_interrupt | 210 | beq icc0,#2,__break_step_uspace_external_interrupt |
211 | subcc.p gr2,gr3,gr0,icc0 | ||
212 | sethi %hi(__entry_kernel_external_interrupt_virtual_reenable),gr3 | ||
213 | setlo.p %lo(__entry_kernel_external_interrupt_virtual_reenable),gr3 | ||
214 | beq icc0,#2,__break_step_kernel_external_interrupt_virtually_disabled | ||
215 | subcc gr2,gr3,gr0,icc0 | ||
216 | beq icc0,#2,__break_step_kernel_external_interrupt_virtual_reenable | ||
209 | 217 | ||
210 | LEDS 0x2007,gr2 | 218 | LEDS 0x2007,gr2 |
211 | 219 | ||
@@ -254,6 +262,9 @@ __break_step_kernel_softprog_interrupt: | |||
254 | # step through an external interrupt from kernel mode | 262 | # step through an external interrupt from kernel mode |
255 | .globl __break_step_kernel_external_interrupt | 263 | .globl __break_step_kernel_external_interrupt |
256 | __break_step_kernel_external_interrupt: | 264 | __break_step_kernel_external_interrupt: |
265 | # deal with virtual interrupt disablement | ||
266 | beq icc2,#0,__break_step_kernel_external_interrupt_virtually_disabled | ||
267 | |||
257 | sethi.p %hi(__entry_kernel_external_interrupt_reentry),gr3 | 268 | sethi.p %hi(__entry_kernel_external_interrupt_reentry),gr3 |
258 | setlo %lo(__entry_kernel_external_interrupt_reentry),gr3 | 269 | setlo %lo(__entry_kernel_external_interrupt_reentry),gr3 |
259 | 270 | ||
@@ -294,6 +305,64 @@ __break_return_as_kernel_prologue: | |||
294 | #endif | 305 | #endif |
295 | rett #1 | 306 | rett #1 |
296 | 307 | ||
308 | # we single-stepped into an interrupt handler whilst interrupts were merely virtually disabled | ||
309 | # need to really disable interrupts, set flag, fix up and return | ||
310 | __break_step_kernel_external_interrupt_virtually_disabled: | ||
311 | movsg psr,gr2 | ||
312 | andi gr2,#~PSR_PIL,gr2 | ||
313 | ori gr2,#PSR_PIL_14,gr2 /* debugging interrupts only */ | ||
314 | movgs gr2,psr | ||
315 | |||
316 | ldi @(gr31,#REG_CCR),gr3 | ||
317 | movgs gr3,ccr | ||
318 | subcc.p gr0,gr0,gr0,icc2 /* leave Z set, clear C */ | ||
319 | |||
320 | # exceptions must've been enabled and we must've been in supervisor mode | ||
321 | setlos BPSR_BET|BPSR_BS,gr3 | ||
322 | movgs gr3,bpsr | ||
323 | |||
324 | # return to where the interrupt happened | ||
325 | movsg pcsr,gr2 | ||
326 | movgs gr2,bpcsr | ||
327 | |||
328 | lddi.p @(gr31,#REG_GR(2)),gr2 | ||
329 | |||
330 | xor gr31,gr31,gr31 | ||
331 | movgs gr0,brr | ||
332 | #ifdef CONFIG_MMU | ||
333 | movsg scr3,gr31 | ||
334 | #endif | ||
335 | rett #1 | ||
336 | |||
337 | # we stepped through into the virtual interrupt reenablement trap | ||
338 | # | ||
339 | # we also want to single step anyway, but after fixing up so that we get an event on the | ||
340 | # instruction after the broken-into exception returns | ||
341 | .globl __break_step_kernel_external_interrupt_virtual_reenable | ||
342 | __break_step_kernel_external_interrupt_virtual_reenable: | ||
343 | movsg psr,gr2 | ||
344 | andi gr2,#~PSR_PIL,gr2 | ||
345 | movgs gr2,psr | ||
346 | |||
347 | ldi @(gr31,#REG_CCR),gr3 | ||
348 | movgs gr3,ccr | ||
349 | subicc gr0,#1,gr0,icc2 /* clear Z, set C */ | ||
350 | |||
351 | # save the adjusted ICC2 | ||
352 | movsg ccr,gr3 | ||
353 | sti gr3,@(gr31,#REG_CCR) | ||
354 | |||
355 | # exceptions must've been enabled and we must've been in supervisor mode | ||
356 | setlos BPSR_BET|BPSR_BS,gr3 | ||
357 | movgs gr3,bpsr | ||
358 | |||
359 | # return to where the trap happened | ||
360 | movsg pcsr,gr2 | ||
361 | movgs gr2,bpcsr | ||
362 | |||
363 | # and then process the single step | ||
364 | bra __break_continue | ||
365 | |||
297 | # step through an internal exception from uspace mode | 366 | # step through an internal exception from uspace mode |
298 | .globl __break_step_uspace_softprog_interrupt | 367 | .globl __break_step_uspace_softprog_interrupt |
299 | __break_step_uspace_softprog_interrupt: | 368 | __break_step_uspace_softprog_interrupt: |
diff --git a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S index 9b9243e2103c..81568acea9cd 100644 --- a/arch/frv/kernel/entry-table.S +++ b/arch/frv/kernel/entry-table.S | |||
@@ -116,6 +116,8 @@ __break_kerneltrap_fixup_table: | |||
116 | .long __break_step_uspace_external_interrupt | 116 | .long __break_step_uspace_external_interrupt |
117 | .section .trap.kernel | 117 | .section .trap.kernel |
118 | .org \tbr_tt | 118 | .org \tbr_tt |
119 | # deal with virtual interrupt disablement | ||
120 | beq icc2,#0,__entry_kernel_external_interrupt_virtually_disabled | ||
119 | bra __entry_kernel_external_interrupt | 121 | bra __entry_kernel_external_interrupt |
120 | .section .trap.fixup.kernel | 122 | .section .trap.fixup.kernel |
121 | .org \tbr_tt >> 2 | 123 | .org \tbr_tt >> 2 |
@@ -259,25 +261,52 @@ __trap_fixup_kernel_data_tlb_miss: | |||
259 | .org TBR_TT_TRAP0 | 261 | .org TBR_TT_TRAP0 |
260 | .rept 127 | 262 | .rept 127 |
261 | bra __entry_uspace_softprog_interrupt | 263 | bra __entry_uspace_softprog_interrupt |
262 | bra __break_step_uspace_softprog_interrupt | 264 | .long 0,0,0 |
263 | .long 0,0 | ||
264 | .endr | 265 | .endr |
265 | .org TBR_TT_BREAK | 266 | .org TBR_TT_BREAK |
266 | bra __entry_break | 267 | bra __entry_break |
267 | .long 0,0,0 | 268 | .long 0,0,0 |
268 | 269 | ||
270 | .section .trap.fixup.user | ||
271 | .org TBR_TT_TRAP0 >> 2 | ||
272 | .rept 127 | ||
273 | .long __break_step_uspace_softprog_interrupt | ||
274 | .endr | ||
275 | .org TBR_TT_BREAK >> 2 | ||
276 | .long 0 | ||
277 | |||
269 | # miscellaneous kernel mode entry points | 278 | # miscellaneous kernel mode entry points |
270 | .section .trap.kernel | 279 | .section .trap.kernel |
271 | .org TBR_TT_TRAP0 | 280 | .org TBR_TT_TRAP0 |
272 | .rept 127 | ||
273 | bra __entry_kernel_softprog_interrupt | 281 | bra __entry_kernel_softprog_interrupt |
274 | bra __break_step_kernel_softprog_interrupt | 282 | .org TBR_TT_TRAP1 |
275 | .long 0,0 | 283 | bra __entry_kernel_softprog_interrupt |
284 | |||
285 | # trap #2 in kernel - reenable interrupts | ||
286 | .org TBR_TT_TRAP2 | ||
287 | bra __entry_kernel_external_interrupt_virtual_reenable | ||
288 | |||
289 | # miscellaneous kernel traps | ||
290 | .org TBR_TT_TRAP3 | ||
291 | .rept 124 | ||
292 | bra __entry_kernel_softprog_interrupt | ||
293 | .long 0,0,0 | ||
276 | .endr | 294 | .endr |
277 | .org TBR_TT_BREAK | 295 | .org TBR_TT_BREAK |
278 | bra __entry_break | 296 | bra __entry_break |
279 | .long 0,0,0 | 297 | .long 0,0,0 |
280 | 298 | ||
299 | .section .trap.fixup.kernel | ||
300 | .org TBR_TT_TRAP0 >> 2 | ||
301 | .long __break_step_kernel_softprog_interrupt | ||
302 | .long __break_step_kernel_softprog_interrupt | ||
303 | .long __break_step_kernel_external_interrupt_virtual_reenable | ||
304 | .rept 124 | ||
305 | .long __break_step_kernel_softprog_interrupt | ||
306 | .endr | ||
307 | .org TBR_TT_BREAK >> 2 | ||
308 | .long 0 | ||
309 | |||
281 | # miscellaneous debug mode entry points | 310 | # miscellaneous debug mode entry points |
282 | .section .trap.break | 311 | .section .trap.break |
283 | .org TBR_TT_BREAK | 312 | .org TBR_TT_BREAK |
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 5f6548388b74..1d21c8d34d8a 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -141,7 +141,10 @@ __entry_uspace_external_interrupt_reentry: | |||
141 | 141 | ||
142 | movsg gner0,gr4 | 142 | movsg gner0,gr4 |
143 | movsg gner1,gr5 | 143 | movsg gner1,gr5 |
144 | stdi gr4,@(gr28,#REG_GNER0) | 144 | stdi.p gr4,@(gr28,#REG_GNER0) |
145 | |||
146 | # interrupts start off fully disabled in the interrupt handler | ||
147 | subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ | ||
145 | 148 | ||
146 | # set up kernel global registers | 149 | # set up kernel global registers |
147 | sethi.p %hi(__kernel_current_task),gr5 | 150 | sethi.p %hi(__kernel_current_task),gr5 |
@@ -193,9 +196,8 @@ __entry_uspace_external_interrupt_reentry: | |||
193 | .type __entry_kernel_external_interrupt,@function | 196 | .type __entry_kernel_external_interrupt,@function |
194 | __entry_kernel_external_interrupt: | 197 | __entry_kernel_external_interrupt: |
195 | LEDS 0x6210 | 198 | LEDS 0x6210 |
196 | 199 | // sub sp,gr15,gr31 | |
197 | sub sp,gr15,gr31 | 200 | // LEDS32 |
198 | LEDS32 | ||
199 | 201 | ||
200 | # set up the stack pointer | 202 | # set up the stack pointer |
201 | or.p sp,gr0,gr30 | 203 | or.p sp,gr0,gr30 |
@@ -231,7 +233,10 @@ __entry_kernel_external_interrupt_reentry: | |||
231 | stdi gr24,@(gr28,#REG_GR(24)) | 233 | stdi gr24,@(gr28,#REG_GR(24)) |
232 | stdi gr26,@(gr28,#REG_GR(26)) | 234 | stdi gr26,@(gr28,#REG_GR(26)) |
233 | sti gr29,@(gr28,#REG_GR(29)) | 235 | sti gr29,@(gr28,#REG_GR(29)) |
234 | stdi gr30,@(gr28,#REG_GR(30)) | 236 | stdi.p gr30,@(gr28,#REG_GR(30)) |
237 | |||
238 | # note virtual interrupts will be fully enabled upon return | ||
239 | subicc gr0,#1,gr0,icc2 /* clear Z, set C */ | ||
235 | 240 | ||
236 | movsg tbr ,gr20 | 241 | movsg tbr ,gr20 |
237 | movsg psr ,gr22 | 242 | movsg psr ,gr22 |
@@ -267,7 +272,10 @@ __entry_kernel_external_interrupt_reentry: | |||
267 | 272 | ||
268 | movsg gner0,gr4 | 273 | movsg gner0,gr4 |
269 | movsg gner1,gr5 | 274 | movsg gner1,gr5 |
270 | stdi gr4,@(gr28,#REG_GNER0) | 275 | stdi.p gr4,@(gr28,#REG_GNER0) |
276 | |||
277 | # interrupts start off fully disabled in the interrupt handler | ||
278 | subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ | ||
271 | 279 | ||
272 | # set the return address | 280 | # set the return address |
273 | sethi.p %hi(__entry_return_from_kernel_interrupt),gr4 | 281 | sethi.p %hi(__entry_return_from_kernel_interrupt),gr4 |
@@ -291,6 +299,45 @@ __entry_kernel_external_interrupt_reentry: | |||
291 | 299 | ||
292 | .size __entry_kernel_external_interrupt,.-__entry_kernel_external_interrupt | 300 | .size __entry_kernel_external_interrupt,.-__entry_kernel_external_interrupt |
293 | 301 | ||
302 | ############################################################################### | ||
303 | # | ||
304 | # deal with interrupts that were actually virtually disabled | ||
305 | # - we need to really disable them, flag the fact and return immediately | ||
306 | # - if you change this, you must alter break.S also | ||
307 | # | ||
308 | ############################################################################### | ||
309 | .balign L1_CACHE_BYTES | ||
310 | .globl __entry_kernel_external_interrupt_virtually_disabled | ||
311 | .type __entry_kernel_external_interrupt_virtually_disabled,@function | ||
312 | __entry_kernel_external_interrupt_virtually_disabled: | ||
313 | movsg psr,gr30 | ||
314 | andi gr30,#~PSR_PIL,gr30 | ||
315 | ori gr30,#PSR_PIL_14,gr30 ; debugging interrupts only | ||
316 | movgs gr30,psr | ||
317 | subcc gr0,gr0,gr0,icc2 ; leave Z set, clear C | ||
318 | rett #0 | ||
319 | |||
320 | .size __entry_kernel_external_interrupt_virtually_disabled,.-__entry_kernel_external_interrupt_virtually_disabled | ||
321 | |||
322 | ############################################################################### | ||
323 | # | ||
324 | # deal with re-enablement of interrupts that were pending when virtually re-enabled | ||
325 | # - set ICC2.C, re-enable the real interrupts and return | ||
326 | # - we can clear ICC2.Z because we shouldn't be here if it's not 0 [due to TIHI] | ||
327 | # - if you change this, you must alter break.S also | ||
328 | # | ||
329 | ############################################################################### | ||
330 | .balign L1_CACHE_BYTES | ||
331 | .globl __entry_kernel_external_interrupt_virtual_reenable | ||
332 | .type __entry_kernel_external_interrupt_virtual_reenable,@function | ||
333 | __entry_kernel_external_interrupt_virtual_reenable: | ||
334 | movsg psr,gr30 | ||
335 | andi gr30,#~PSR_PIL,gr30 ; re-enable interrupts | ||
336 | movgs gr30,psr | ||
337 | subicc gr0,#1,gr0,icc2 ; clear Z, set C | ||
338 | rett #0 | ||
339 | |||
340 | .size __entry_kernel_external_interrupt_virtual_reenable,.-__entry_kernel_external_interrupt_virtual_reenable | ||
294 | 341 | ||
295 | ############################################################################### | 342 | ############################################################################### |
296 | # | 343 | # |
@@ -335,6 +382,7 @@ __entry_uspace_softprog_interrupt_reentry: | |||
335 | 382 | ||
336 | sethi.p %hi(__entry_return_from_user_exception),gr23 | 383 | sethi.p %hi(__entry_return_from_user_exception),gr23 |
337 | setlo %lo(__entry_return_from_user_exception),gr23 | 384 | setlo %lo(__entry_return_from_user_exception),gr23 |
385 | |||
338 | bra __entry_common | 386 | bra __entry_common |
339 | 387 | ||
340 | .size __entry_uspace_softprog_interrupt,.-__entry_uspace_softprog_interrupt | 388 | .size __entry_uspace_softprog_interrupt,.-__entry_uspace_softprog_interrupt |
@@ -495,7 +543,10 @@ __entry_common: | |||
495 | 543 | ||
496 | movsg gner0,gr4 | 544 | movsg gner0,gr4 |
497 | movsg gner1,gr5 | 545 | movsg gner1,gr5 |
498 | stdi gr4,@(gr28,#REG_GNER0) | 546 | stdi.p gr4,@(gr28,#REG_GNER0) |
547 | |||
548 | # set up virtual interrupt disablement | ||
549 | subicc gr0,#1,gr0,icc2 /* clear Z flag, set C flag */ | ||
499 | 550 | ||
500 | # set up kernel global registers | 551 | # set up kernel global registers |
501 | sethi.p %hi(__kernel_current_task),gr5 | 552 | sethi.p %hi(__kernel_current_task),gr5 |
@@ -1418,11 +1469,27 @@ sys_call_table: | |||
1418 | .long sys_add_key | 1469 | .long sys_add_key |
1419 | .long sys_request_key | 1470 | .long sys_request_key |
1420 | .long sys_keyctl | 1471 | .long sys_keyctl |
1421 | .long sys_ni_syscall // sys_vperfctr_open | 1472 | .long sys_ioprio_set |
1422 | .long sys_ni_syscall // sys_vperfctr_control /* 290 */ | 1473 | .long sys_ioprio_get /* 290 */ |
1423 | .long sys_ni_syscall // sys_vperfctr_unlink | 1474 | .long sys_inotify_init |
1424 | .long sys_ni_syscall // sys_vperfctr_iresume | 1475 | .long sys_inotify_add_watch |
1425 | .long sys_ni_syscall // sys_vperfctr_read | 1476 | .long sys_inotify_rm_watch |
1477 | .long sys_migrate_pages | ||
1478 | .long sys_openat /* 295 */ | ||
1479 | .long sys_mkdirat | ||
1480 | .long sys_mknodat | ||
1481 | .long sys_fchownat | ||
1482 | .long sys_futimesat | ||
1483 | .long sys_newfstatat /* 300 */ | ||
1484 | .long sys_unlinkat | ||
1485 | .long sys_renameat | ||
1486 | .long sys_linkat | ||
1487 | .long sys_symlinkat | ||
1488 | .long sys_readlinkat /* 305 */ | ||
1489 | .long sys_fchmodat | ||
1490 | .long sys_faccessat | ||
1491 | .long sys_pselect6 | ||
1492 | .long sys_ppoll | ||
1426 | 1493 | ||
1427 | 1494 | ||
1428 | syscall_table_size = (. - sys_call_table) | 1495 | syscall_table_size = (. - sys_call_table) |
diff --git a/arch/frv/kernel/head.S b/arch/frv/kernel/head.S index c73b4fe9f6ca..29a5265489b7 100644 --- a/arch/frv/kernel/head.S +++ b/arch/frv/kernel/head.S | |||
@@ -513,6 +513,9 @@ __head_mmu_enabled: | |||
513 | movgs gr0,ccr | 513 | movgs gr0,ccr |
514 | movgs gr0,cccr | 514 | movgs gr0,cccr |
515 | 515 | ||
516 | # initialise the virtual interrupt handling | ||
517 | subcc gr0,gr0,gr0,icc2 /* set Z, clear C */ | ||
518 | |||
516 | #ifdef CONFIG_MMU | 519 | #ifdef CONFIG_MMU |
517 | movgs gr3,scr2 | 520 | movgs gr3,scr2 |
518 | movgs gr3,scr3 | 521 | movgs gr3,scr3 |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 59580c59c62c..27ab4c30aac6 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -287,18 +287,11 @@ asmlinkage void do_IRQ(void) | |||
287 | struct irq_source *source; | 287 | struct irq_source *source; |
288 | int level, cpu; | 288 | int level, cpu; |
289 | 289 | ||
290 | irq_enter(); | ||
291 | |||
290 | level = (__frame->tbr >> 4) & 0xf; | 292 | level = (__frame->tbr >> 4) & 0xf; |
291 | cpu = smp_processor_id(); | 293 | cpu = smp_processor_id(); |
292 | 294 | ||
293 | #if 0 | ||
294 | { | ||
295 | static u32 irqcount; | ||
296 | *(volatile u32 *) 0xe1200004 = ~((irqcount++ << 8) | level); | ||
297 | *(volatile u16 *) 0xffc00100 = (u16) ~0x9999; | ||
298 | mb(); | ||
299 | } | ||
300 | #endif | ||
301 | |||
302 | if ((unsigned long) __frame - (unsigned long) (current + 1) < 512) | 295 | if ((unsigned long) __frame - (unsigned long) (current + 1) < 512) |
303 | BUG(); | 296 | BUG(); |
304 | 297 | ||
@@ -308,40 +301,12 @@ asmlinkage void do_IRQ(void) | |||
308 | 301 | ||
309 | kstat_this_cpu.irqs[level]++; | 302 | kstat_this_cpu.irqs[level]++; |
310 | 303 | ||
311 | irq_enter(); | ||
312 | |||
313 | for (source = frv_irq_levels[level].sources; source; source = source->next) | 304 | for (source = frv_irq_levels[level].sources; source; source = source->next) |
314 | source->doirq(source); | 305 | source->doirq(source); |
315 | 306 | ||
316 | irq_exit(); | ||
317 | |||
318 | __clr_MASK(level); | 307 | __clr_MASK(level); |
319 | 308 | ||
320 | /* only process softirqs if we didn't interrupt another interrupt handler */ | 309 | irq_exit(); |
321 | if ((__frame->psr & PSR_PIL) == PSR_PIL_0) | ||
322 | if (local_softirq_pending()) | ||
323 | do_softirq(); | ||
324 | |||
325 | #ifdef CONFIG_PREEMPT | ||
326 | local_irq_disable(); | ||
327 | while (--current->preempt_count == 0) { | ||
328 | if (!(__frame->psr & PSR_S) || | ||
329 | current->need_resched == 0 || | ||
330 | in_interrupt()) | ||
331 | break; | ||
332 | current->preempt_count++; | ||
333 | local_irq_enable(); | ||
334 | preempt_schedule(); | ||
335 | local_irq_disable(); | ||
336 | } | ||
337 | #endif | ||
338 | |||
339 | #if 0 | ||
340 | { | ||
341 | *(volatile u16 *) 0xffc00100 = (u16) ~0x6666; | ||
342 | mb(); | ||
343 | } | ||
344 | #endif | ||
345 | 310 | ||
346 | } /* end do_IRQ() */ | 311 | } /* end do_IRQ() */ |
347 | 312 | ||
diff --git a/arch/frv/mm/kmap.c b/arch/frv/mm/kmap.c index 539f45e6d15e..c54f18e65ea6 100644 --- a/arch/frv/mm/kmap.c +++ b/arch/frv/mm/kmap.c | |||
@@ -44,15 +44,6 @@ void iounmap(void *addr) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * __iounmap unmaps nearly everything, so be careful | ||
48 | * it doesn't free currently pointer/page tables anymore but it | ||
49 | * wans't used anyway and might be added later. | ||
50 | */ | ||
51 | void __iounmap(void *addr, unsigned long size) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | /* | ||
56 | * Set new cache mode for some kernel address space. | 47 | * Set new cache mode for some kernel address space. |
57 | * The caller must push data for that range itself, if such data may already | 48 | * The caller must push data for that range itself, if such data may already |
58 | * be in the cache. | 49 | * be in the cache. |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 80940d712acf..98308b018a35 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -33,6 +33,10 @@ config GENERIC_CALIBRATE_DELAY | |||
33 | bool | 33 | bool |
34 | default y | 34 | default y |
35 | 35 | ||
36 | config TIME_LOW_RES | ||
37 | bool | ||
38 | default y | ||
39 | |||
36 | config ISA | 40 | config ISA |
37 | bool | 41 | bool |
38 | default y | 42 | default y |
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu index a380167a13cf..582797db9603 100644 --- a/arch/h8300/Kconfig.cpu +++ b/arch/h8300/Kconfig.cpu | |||
@@ -169,7 +169,7 @@ endif | |||
169 | 169 | ||
170 | config CPU_H8300H | 170 | config CPU_H8300H |
171 | bool | 171 | bool |
172 | depends on (H8002 || H83007 || H83048 || H83068) | 172 | depends on (H83002 || H83007 || H83048 || H83068) |
173 | default y | 173 | default y |
174 | 174 | ||
175 | config CPU_H8S | 175 | config CPU_H8S |
diff --git a/arch/i386/boot/.gitignore b/arch/i386/boot/.gitignore new file mode 100644 index 000000000000..495f20c085de --- /dev/null +++ b/arch/i386/boot/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | bootsect | ||
2 | bzImage | ||
3 | setup | ||
diff --git a/arch/i386/boot/tools/.gitignore b/arch/i386/boot/tools/.gitignore new file mode 100644 index 000000000000..378eac25d311 --- /dev/null +++ b/arch/i386/boot/tools/.gitignore | |||
@@ -0,0 +1 @@ | |||
build | |||
diff --git a/arch/i386/kernel/.gitignore b/arch/i386/kernel/.gitignore new file mode 100644 index 000000000000..40836ad9079c --- /dev/null +++ b/arch/i386/kernel/.gitignore | |||
@@ -0,0 +1 @@ | |||
vsyscall.lds | |||
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index bdbeb77f4e22..7214c9b577ab 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/mm.h> | ||
2 | #include <linux/init.h> | 3 | #include <linux/init.h> |
3 | #include <asm/processor.h> | 4 | #include <asm/processor.h> |
4 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 5884469f6bfe..2bee6499edd9 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -398,7 +398,11 @@ ignore_int: | |||
398 | pushl 32(%esp) | 398 | pushl 32(%esp) |
399 | pushl 40(%esp) | 399 | pushl 40(%esp) |
400 | pushl $int_msg | 400 | pushl $int_msg |
401 | #ifdef CONFIG_EARLY_PRINTK | ||
402 | call early_printk | ||
403 | #else | ||
401 | call printk | 404 | call printk |
405 | #endif | ||
402 | addl $(5*4),%esp | 406 | addl $(5*4),%esp |
403 | popl %ds | 407 | popl %ds |
404 | popl %es | 408 | popl %es |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 255adb498268..fb00ab7b7612 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -87,11 +87,7 @@ EXPORT_SYMBOL(cpu_online_map); | |||
87 | cpumask_t cpu_callin_map; | 87 | cpumask_t cpu_callin_map; |
88 | cpumask_t cpu_callout_map; | 88 | cpumask_t cpu_callout_map; |
89 | EXPORT_SYMBOL(cpu_callout_map); | 89 | EXPORT_SYMBOL(cpu_callout_map); |
90 | #ifdef CONFIG_HOTPLUG_CPU | ||
91 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
92 | #else | ||
93 | cpumask_t cpu_possible_map; | 90 | cpumask_t cpu_possible_map; |
94 | #endif | ||
95 | EXPORT_SYMBOL(cpu_possible_map); | 91 | EXPORT_SYMBOL(cpu_possible_map); |
96 | static cpumask_t smp_commenced_mask; | 92 | static cpumask_t smp_commenced_mask; |
97 | 93 | ||
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 5a8b3fb6d27b..ac687d00a1ce 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -299,7 +299,7 @@ ENTRY(sys_call_table) | |||
299 | .long sys_mknodat | 299 | .long sys_mknodat |
300 | .long sys_fchownat | 300 | .long sys_fchownat |
301 | .long sys_futimesat | 301 | .long sys_futimesat |
302 | .long sys_newfstatat /* 300 */ | 302 | .long sys_fstatat64 /* 300 */ |
303 | .long sys_unlinkat | 303 | .long sys_unlinkat |
304 | .long sys_renameat | 304 | .long sys_renameat |
305 | .long sys_linkat | 305 | .long sys_linkat |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 7c86e3c5f1c1..a7f5a2aceba2 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -282,6 +282,10 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
282 | if (val != CPUFREQ_RESUMECHANGE) | 282 | if (val != CPUFREQ_RESUMECHANGE) |
283 | write_seqlock_irq(&xtime_lock); | 283 | write_seqlock_irq(&xtime_lock); |
284 | if (!ref_freq) { | 284 | if (!ref_freq) { |
285 | if (!freq->old){ | ||
286 | ref_freq = freq->new; | ||
287 | goto end; | ||
288 | } | ||
285 | ref_freq = freq->old; | 289 | ref_freq = freq->old; |
286 | loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; | 290 | loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; |
287 | #ifndef CONFIG_SMP | 291 | #ifndef CONFIG_SMP |
@@ -307,6 +311,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
307 | #endif | 311 | #endif |
308 | } | 312 | } |
309 | 313 | ||
314 | end: | ||
310 | if (val != CPUFREQ_RESUMECHANGE) | 315 | if (val != CPUFREQ_RESUMECHANGE) |
311 | write_sequnlock_irq(&xtime_lock); | 316 | write_sequnlock_irq(&xtime_lock); |
312 | 317 | ||
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S index 4daefb2ec1b2..76b728159403 100644 --- a/arch/i386/kernel/vsyscall-sysenter.S +++ b/arch/i386/kernel/vsyscall-sysenter.S | |||
@@ -7,6 +7,21 @@ | |||
7 | * for details. | 7 | * for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* | ||
11 | * The caller puts arg2 in %ecx, which gets pushed. The kernel will use | ||
12 | * %ecx itself for arg2. The pushing is because the sysexit instruction | ||
13 | * (found in entry.S) requires that we clobber %ecx with the desired %esp. | ||
14 | * User code might expect that %ecx is unclobbered though, as it would be | ||
15 | * for returning via the iret instruction, so we must push and pop. | ||
16 | * | ||
17 | * The caller puts arg3 in %edx, which the sysexit instruction requires | ||
18 | * for %eip. Thus, exactly as for arg2, we must push and pop. | ||
19 | * | ||
20 | * Arg6 is different. The caller puts arg6 in %ebp. Since the sysenter | ||
21 | * instruction clobbers %esp, the user's %esp won't even survive entry | ||
22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch | ||
23 | * arg6 from the stack. | ||
24 | */ | ||
10 | .text | 25 | .text |
11 | .globl __kernel_vsyscall | 26 | .globl __kernel_vsyscall |
12 | .type __kernel_vsyscall,@function | 27 | .type __kernel_vsyscall,@function |
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 72a1b9cae2e4..6e4c3baef6cc 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -240,7 +240,7 @@ static cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
240 | cpumask_t cpu_callin_map = CPU_MASK_NONE; | 240 | cpumask_t cpu_callin_map = CPU_MASK_NONE; |
241 | cpumask_t cpu_callout_map = CPU_MASK_NONE; | 241 | cpumask_t cpu_callout_map = CPU_MASK_NONE; |
242 | EXPORT_SYMBOL(cpu_callout_map); | 242 | EXPORT_SYMBOL(cpu_callout_map); |
243 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | 243 | cpumask_t cpu_possible_map = CPU_MASK_NONE; |
244 | EXPORT_SYMBOL(cpu_possible_map); | 244 | EXPORT_SYMBOL(cpu_possible_map); |
245 | 245 | ||
246 | /* The per processor IRQ masks (these are usually kept in sync) */ | 246 | /* The per processor IRQ masks (these are usually kept in sync) */ |
diff --git a/arch/i386/oprofile/backtrace.c b/arch/i386/oprofile/backtrace.c index acc18138fb22..c049ce414f01 100644 --- a/arch/i386/oprofile/backtrace.c +++ b/arch/i386/oprofile/backtrace.c | |||
@@ -20,7 +20,20 @@ struct frame_head { | |||
20 | } __attribute__((packed)); | 20 | } __attribute__((packed)); |
21 | 21 | ||
22 | static struct frame_head * | 22 | static struct frame_head * |
23 | dump_backtrace(struct frame_head * head) | 23 | dump_kernel_backtrace(struct frame_head * head) |
24 | { | ||
25 | oprofile_add_trace(head->ret); | ||
26 | |||
27 | /* frame pointers should strictly progress back up the stack | ||
28 | * (towards higher addresses) */ | ||
29 | if (head >= head->ebp) | ||
30 | return NULL; | ||
31 | |||
32 | return head->ebp; | ||
33 | } | ||
34 | |||
35 | static struct frame_head * | ||
36 | dump_user_backtrace(struct frame_head * head) | ||
24 | { | 37 | { |
25 | struct frame_head bufhead[2]; | 38 | struct frame_head bufhead[2]; |
26 | 39 | ||
@@ -105,10 +118,10 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth) | |||
105 | 118 | ||
106 | if (!user_mode_vm(regs)) { | 119 | if (!user_mode_vm(regs)) { |
107 | while (depth-- && valid_kernel_stack(head, regs)) | 120 | while (depth-- && valid_kernel_stack(head, regs)) |
108 | head = dump_backtrace(head); | 121 | head = dump_kernel_backtrace(head); |
109 | return; | 122 | return; |
110 | } | 123 | } |
111 | 124 | ||
112 | while (depth-- && head) | 125 | while (depth-- && head) |
113 | head = dump_backtrace(head); | 126 | head = dump_user_backtrace(head); |
114 | } | 127 | } |
diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index 5856510210fa..b3355a9ca2c3 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c | |||
@@ -515,6 +515,7 @@ sys32_signal (int sig, unsigned int handler) | |||
515 | 515 | ||
516 | sigact_set_handler(&new_sa, handler, 0); | 516 | sigact_set_handler(&new_sa, handler, 0); |
517 | new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK; | 517 | new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK; |
518 | sigemptyset(&new_sa.sa.sa_mask); | ||
518 | 519 | ||
519 | ret = do_sigaction(sig, &new_sa, &old_sa); | 520 | ret = do_sigaction(sig, &new_sa, &old_sa); |
520 | 521 | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index d2702c419cf8..ecd44bdc8394 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -761,6 +761,59 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) | |||
761 | return (0); | 761 | return (0); |
762 | } | 762 | } |
763 | 763 | ||
764 | int additional_cpus __initdata = -1; | ||
765 | |||
766 | static __init int setup_additional_cpus(char *s) | ||
767 | { | ||
768 | if (s) | ||
769 | additional_cpus = simple_strtol(s, NULL, 0); | ||
770 | |||
771 | return 0; | ||
772 | } | ||
773 | |||
774 | early_param("additional_cpus", setup_additional_cpus); | ||
775 | |||
776 | /* | ||
777 | * cpu_possible_map should be static, it cannot change as cpu's | ||
778 | * are onlined, or offlined. The reason is per-cpu data-structures | ||
779 | * are allocated by some modules at init time, and dont expect to | ||
780 | * do this dynamically on cpu arrival/departure. | ||
781 | * cpu_present_map on the other hand can change dynamically. | ||
782 | * In case when cpu_hotplug is not compiled, then we resort to current | ||
783 | * behaviour, which is cpu_possible == cpu_present. | ||
784 | * - Ashok Raj | ||
785 | * | ||
786 | * Three ways to find out the number of additional hotplug CPUs: | ||
787 | * - If the BIOS specified disabled CPUs in ACPI/mptables use that. | ||
788 | * - The user can overwrite it with additional_cpus=NUM | ||
789 | * - Otherwise don't reserve additional CPUs. | ||
790 | */ | ||
791 | __init void prefill_possible_map(void) | ||
792 | { | ||
793 | int i; | ||
794 | int possible, disabled_cpus; | ||
795 | |||
796 | disabled_cpus = total_cpus - available_cpus; | ||
797 | |||
798 | if (additional_cpus == -1) { | ||
799 | if (disabled_cpus > 0) | ||
800 | additional_cpus = disabled_cpus; | ||
801 | else | ||
802 | additional_cpus = 0; | ||
803 | } | ||
804 | |||
805 | possible = available_cpus + additional_cpus; | ||
806 | |||
807 | if (possible > NR_CPUS) | ||
808 | possible = NR_CPUS; | ||
809 | |||
810 | printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", | ||
811 | possible, max((possible - available_cpus), 0)); | ||
812 | |||
813 | for (i = 0; i < possible; i++) | ||
814 | cpu_set(i, cpu_possible_map); | ||
815 | } | ||
816 | |||
764 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) | 817 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) |
765 | { | 818 | { |
766 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 819 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 7a6ffd613789..930fdfca6ddb 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -569,7 +569,9 @@ GLOBAL_ENTRY(ia64_trace_syscall) | |||
569 | .mem.offset 0,0; st8.spill [r2]=r8 // store return value in slot for r8 | 569 | .mem.offset 0,0; st8.spill [r2]=r8 // store return value in slot for r8 |
570 | .mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10 | 570 | .mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10 |
571 | br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value | 571 | br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value |
572 | .ret3: br.cond.sptk .work_pending_syscall_end | 572 | .ret3: |
573 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk | ||
574 | br.cond.sptk .work_pending_syscall_end | ||
573 | 575 | ||
574 | strace_error: | 576 | strace_error: |
575 | ld8 r3=[r2] // load pt_regs.r8 | 577 | ld8 r3=[r2] // load pt_regs.r8 |
@@ -1601,5 +1603,21 @@ sys_call_table: | |||
1601 | data8 sys_inotify_add_watch | 1603 | data8 sys_inotify_add_watch |
1602 | data8 sys_inotify_rm_watch | 1604 | data8 sys_inotify_rm_watch |
1603 | data8 sys_migrate_pages // 1280 | 1605 | data8 sys_migrate_pages // 1280 |
1606 | data8 sys_openat | ||
1607 | data8 sys_mkdirat | ||
1608 | data8 sys_mknodat | ||
1609 | data8 sys_fchownat | ||
1610 | data8 sys_futimesat // 1285 | ||
1611 | data8 sys_newfstatat | ||
1612 | data8 sys_unlinkat | ||
1613 | data8 sys_renameat | ||
1614 | data8 sys_linkat | ||
1615 | data8 sys_symlinkat // 1290 | ||
1616 | data8 sys_readlinkat | ||
1617 | data8 sys_fchmodat | ||
1618 | data8 sys_faccessat | ||
1619 | data8 sys_ni_syscall // reserved for pselect | ||
1620 | data8 sys_ni_syscall // 1295 reserved for ppoll | ||
1621 | data8 sys_unshare | ||
1604 | 1622 | ||
1605 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1623 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index ce423910ca97..ac6055c83115 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -878,31 +878,8 @@ fsyscall_table: | |||
878 | data8 0 // timer_delete | 878 | data8 0 // timer_delete |
879 | data8 0 // clock_settime | 879 | data8 0 // clock_settime |
880 | data8 fsys_clock_gettime // clock_gettime | 880 | data8 fsys_clock_gettime // clock_gettime |
881 | data8 0 // clock_getres // 1255 | 881 | #define __NR_syscall_last 1255 |
882 | data8 0 // clock_nanosleep | 882 | |
883 | data8 0 // fstatfs64 | 883 | .space 8*(NR_syscalls + 1024 - __NR_syscall_last), 0 |
884 | data8 0 // statfs64 | ||
885 | data8 0 | ||
886 | data8 0 // 1260 | ||
887 | data8 0 | ||
888 | data8 0 // mq_open | ||
889 | data8 0 // mq_unlink | ||
890 | data8 0 // mq_timedsend | ||
891 | data8 0 // mq_timedreceive // 1265 | ||
892 | data8 0 // mq_notify | ||
893 | data8 0 // mq_getsetattr | ||
894 | data8 0 // kexec_load | ||
895 | data8 0 | ||
896 | data8 0 // 1270 | ||
897 | data8 0 | ||
898 | data8 0 | ||
899 | data8 0 | ||
900 | data8 0 | ||
901 | data8 0 // 1275 | ||
902 | data8 0 | ||
903 | data8 0 | ||
904 | data8 0 | ||
905 | data8 0 | ||
906 | data8 0 // 1280 | ||
907 | 884 | ||
908 | .org fsyscall_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 885 | .org fsyscall_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index e72de580ebbf..bbcfd08378a6 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c | |||
@@ -10,23 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | EXPORT_SYMBOL(memset); | 12 | EXPORT_SYMBOL(memset); |
13 | EXPORT_SYMBOL(memchr); | ||
14 | EXPORT_SYMBOL(memcmp); | ||
15 | EXPORT_SYMBOL(memcpy); | 13 | EXPORT_SYMBOL(memcpy); |
16 | EXPORT_SYMBOL(memmove); | ||
17 | EXPORT_SYMBOL(memscan); | ||
18 | EXPORT_SYMBOL(strcat); | ||
19 | EXPORT_SYMBOL(strchr); | ||
20 | EXPORT_SYMBOL(strcmp); | ||
21 | EXPORT_SYMBOL(strcpy); | ||
22 | EXPORT_SYMBOL(strlen); | 14 | EXPORT_SYMBOL(strlen); |
23 | EXPORT_SYMBOL(strncat); | ||
24 | EXPORT_SYMBOL(strncmp); | ||
25 | EXPORT_SYMBOL(strncpy); | ||
26 | EXPORT_SYMBOL(strnlen); | ||
27 | EXPORT_SYMBOL(strrchr); | ||
28 | EXPORT_SYMBOL(strstr); | ||
29 | EXPORT_SYMBOL(strpbrk); | ||
30 | 15 | ||
31 | #include <asm/checksum.h> | 16 | #include <asm/checksum.h> |
32 | EXPORT_SYMBOL(ip_fast_csum); /* hand-coded assembly */ | 17 | EXPORT_SYMBOL(ip_fast_csum); /* hand-coded assembly */ |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 3492e3211a44..8fd93afa75a7 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -437,6 +437,9 @@ recover_from_read_error(slidx_table_t *slidx, | |||
437 | * the process not have any locks of kernel. | 437 | * the process not have any locks of kernel. |
438 | */ | 438 | */ |
439 | 439 | ||
440 | /* Is minstate valid? */ | ||
441 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) | ||
442 | return 0; | ||
440 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); | 443 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); |
441 | 444 | ||
442 | /* | 445 | /* |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 35f7835294a3..3258e09278d0 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -430,6 +430,7 @@ setup_arch (char **cmdline_p) | |||
430 | if (early_console_setup(*cmdline_p) == 0) | 430 | if (early_console_setup(*cmdline_p) == 0) |
431 | mark_bsp_online(); | 431 | mark_bsp_online(); |
432 | 432 | ||
433 | parse_early_param(); | ||
433 | #ifdef CONFIG_ACPI | 434 | #ifdef CONFIG_ACPI |
434 | /* Initialize the ACPI boot-time table parser */ | 435 | /* Initialize the ACPI boot-time table parser */ |
435 | acpi_table_init(); | 436 | acpi_table_init(); |
@@ -688,6 +689,9 @@ void | |||
688 | setup_per_cpu_areas (void) | 689 | setup_per_cpu_areas (void) |
689 | { | 690 | { |
690 | /* start_kernel() requires this... */ | 691 | /* start_kernel() requires this... */ |
692 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | ||
693 | prefill_possible_map(); | ||
694 | #endif | ||
691 | } | 695 | } |
692 | 696 | ||
693 | /* | 697 | /* |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 8f44e7d2df66..b681ef34a86e 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -129,7 +129,7 @@ DEFINE_PER_CPU(int, cpu_state); | |||
129 | /* Bitmasks of currently online, and possible CPUs */ | 129 | /* Bitmasks of currently online, and possible CPUs */ |
130 | cpumask_t cpu_online_map; | 130 | cpumask_t cpu_online_map; |
131 | EXPORT_SYMBOL(cpu_online_map); | 131 | EXPORT_SYMBOL(cpu_online_map); |
132 | cpumask_t cpu_possible_map; | 132 | cpumask_t cpu_possible_map = CPU_MASK_NONE; |
133 | EXPORT_SYMBOL(cpu_possible_map); | 133 | EXPORT_SYMBOL(cpu_possible_map); |
134 | 134 | ||
135 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; | 135 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; |
@@ -506,9 +506,6 @@ smp_build_cpu_map (void) | |||
506 | 506 | ||
507 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 507 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
508 | ia64_cpu_to_sapicid[cpu] = -1; | 508 | ia64_cpu_to_sapicid[cpu] = -1; |
509 | #ifdef CONFIG_HOTPLUG_CPU | ||
510 | cpu_set(cpu, cpu_possible_map); | ||
511 | #endif | ||
512 | } | 509 | } |
513 | 510 | ||
514 | ia64_cpu_to_sapicid[0] = boot_cpu_id; | 511 | ia64_cpu_to_sapicid[0] = boot_cpu_id; |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index a094ec49ccfa..307d01e15b2e 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -250,32 +250,27 @@ time_init (void) | |||
250 | set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); | 250 | set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); |
251 | } | 251 | } |
252 | 252 | ||
253 | #define SMALLUSECS 100 | 253 | /* |
254 | 254 | * Generic udelay assumes that if preemption is allowed and the thread | |
255 | void | 255 | * migrates to another CPU, that the ITC values are synchronized across |
256 | udelay (unsigned long usecs) | 256 | * all CPUs. |
257 | */ | ||
258 | static void | ||
259 | ia64_itc_udelay (unsigned long usecs) | ||
257 | { | 260 | { |
258 | unsigned long start; | 261 | unsigned long start = ia64_get_itc(); |
259 | unsigned long cycles; | 262 | unsigned long end = start + usecs*local_cpu_data->cyc_per_usec; |
260 | unsigned long smallusecs; | ||
261 | 263 | ||
262 | /* | 264 | while (time_before(ia64_get_itc(), end)) |
263 | * Execute the non-preemptible delay loop (because the ITC might | 265 | cpu_relax(); |
264 | * not be synchronized between CPUS) in relatively short time | 266 | } |
265 | * chunks, allowing preemption between the chunks. | ||
266 | */ | ||
267 | while (usecs > 0) { | ||
268 | smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs; | ||
269 | preempt_disable(); | ||
270 | cycles = smallusecs*local_cpu_data->cyc_per_usec; | ||
271 | start = ia64_get_itc(); | ||
272 | 267 | ||
273 | while (ia64_get_itc() - start < cycles) | 268 | void (*ia64_udelay)(unsigned long usecs) = &ia64_itc_udelay; |
274 | cpu_relax(); | ||
275 | 269 | ||
276 | preempt_enable(); | 270 | void |
277 | usecs -= smallusecs; | 271 | udelay (unsigned long usecs) |
278 | } | 272 | { |
273 | (*ia64_udelay)(usecs); | ||
279 | } | 274 | } |
280 | EXPORT_SYMBOL(udelay); | 275 | EXPORT_SYMBOL(udelay); |
281 | 276 | ||
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 55391901b013..dabd6c32641e 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> /* for EXPORT_SYMBOL */ | 16 | #include <linux/module.h> /* for EXPORT_SYMBOL */ |
17 | #include <linux/hardirq.h> | 17 | #include <linux/hardirq.h> |
18 | #include <linux/kprobes.h> | 18 | #include <linux/kprobes.h> |
19 | #include <linux/delay.h> /* for ssleep() */ | ||
19 | 20 | ||
20 | #include <asm/fpswa.h> | 21 | #include <asm/fpswa.h> |
21 | #include <asm/ia32.h> | 22 | #include <asm/ia32.h> |
@@ -116,6 +117,13 @@ die (const char *str, struct pt_regs *regs, long err) | |||
116 | bust_spinlocks(0); | 117 | bust_spinlocks(0); |
117 | die.lock_owner = -1; | 118 | die.lock_owner = -1; |
118 | spin_unlock_irq(&die.lock); | 119 | spin_unlock_irq(&die.lock); |
120 | |||
121 | if (panic_on_oops) { | ||
122 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | ||
123 | ssleep(5); | ||
124 | panic("Fatal exception"); | ||
125 | } | ||
126 | |||
119 | do_exit(SIGSEGV); | 127 | do_exit(SIGSEGV); |
120 | } | 128 | } |
121 | 129 | ||
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index d7e4d79e16a8..3edef0d32f86 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -23,6 +23,10 @@ | |||
23 | #include "xtalk/hubdev.h" | 23 | #include "xtalk/hubdev.h" |
24 | #include "xtalk/xwidgetdev.h" | 24 | #include "xtalk/xwidgetdev.h" |
25 | 25 | ||
26 | |||
27 | extern void sn_init_cpei_timer(void); | ||
28 | extern void register_sn_procfs(void); | ||
29 | |||
26 | static struct list_head sn_sysdata_list; | 30 | static struct list_head sn_sysdata_list; |
27 | 31 | ||
28 | /* sysdata list struct */ | 32 | /* sysdata list struct */ |
@@ -40,12 +44,12 @@ struct brick { | |||
40 | struct slab_info slab_info[MAX_SLABS + 1]; | 44 | struct slab_info slab_info[MAX_SLABS + 1]; |
41 | }; | 45 | }; |
42 | 46 | ||
43 | int sn_ioif_inited = 0; /* SN I/O infrastructure initialized? */ | 47 | int sn_ioif_inited; /* SN I/O infrastructure initialized? */ |
44 | 48 | ||
45 | struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ | 49 | struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ |
46 | 50 | ||
47 | static int max_segment_number = 0; /* Default highest segment number */ | 51 | static int max_segment_number; /* Default highest segment number */ |
48 | static int max_pcibus_number = 255; /* Default highest pci bus number */ | 52 | static int max_pcibus_number = 255; /* Default highest pci bus number */ |
49 | 53 | ||
50 | /* | 54 | /* |
51 | * Hooks and struct for unsupported pci providers | 55 | * Hooks and struct for unsupported pci providers |
@@ -84,7 +88,6 @@ static inline u64 | |||
84 | sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num, | 88 | sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num, |
85 | u64 address) | 89 | u64 address) |
86 | { | 90 | { |
87 | |||
88 | struct ia64_sal_retval ret_stuff; | 91 | struct ia64_sal_retval ret_stuff; |
89 | ret_stuff.status = 0; | 92 | ret_stuff.status = 0; |
90 | ret_stuff.v0 = 0; | 93 | ret_stuff.v0 = 0; |
@@ -94,7 +97,6 @@ sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num, | |||
94 | (u64) nasid, (u64) widget_num, | 97 | (u64) nasid, (u64) widget_num, |
95 | (u64) device_num, (u64) address, 0, 0, 0); | 98 | (u64) device_num, (u64) address, 0, 0, 0); |
96 | return ret_stuff.status; | 99 | return ret_stuff.status; |
97 | |||
98 | } | 100 | } |
99 | 101 | ||
100 | /* | 102 | /* |
@@ -102,7 +104,6 @@ sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num, | |||
102 | */ | 104 | */ |
103 | static inline u64 sal_get_hubdev_info(u64 handle, u64 address) | 105 | static inline u64 sal_get_hubdev_info(u64 handle, u64 address) |
104 | { | 106 | { |
105 | |||
106 | struct ia64_sal_retval ret_stuff; | 107 | struct ia64_sal_retval ret_stuff; |
107 | ret_stuff.status = 0; | 108 | ret_stuff.status = 0; |
108 | ret_stuff.v0 = 0; | 109 | ret_stuff.v0 = 0; |
@@ -118,7 +119,6 @@ static inline u64 sal_get_hubdev_info(u64 handle, u64 address) | |||
118 | */ | 119 | */ |
119 | static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address) | 120 | static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address) |
120 | { | 121 | { |
121 | |||
122 | struct ia64_sal_retval ret_stuff; | 122 | struct ia64_sal_retval ret_stuff; |
123 | ret_stuff.status = 0; | 123 | ret_stuff.status = 0; |
124 | ret_stuff.v0 = 0; | 124 | ret_stuff.v0 = 0; |
@@ -215,7 +215,7 @@ static void __init sn_fixup_ionodes(void) | |||
215 | struct hubdev_info *hubdev; | 215 | struct hubdev_info *hubdev; |
216 | u64 status; | 216 | u64 status; |
217 | u64 nasid; | 217 | u64 nasid; |
218 | int i, widget, device; | 218 | int i, widget, device, size; |
219 | 219 | ||
220 | /* | 220 | /* |
221 | * Get SGI Specific HUB chipset information. | 221 | * Get SGI Specific HUB chipset information. |
@@ -251,48 +251,37 @@ static void __init sn_fixup_ionodes(void) | |||
251 | if (!hubdev->hdi_flush_nasid_list.widget_p) | 251 | if (!hubdev->hdi_flush_nasid_list.widget_p) |
252 | continue; | 252 | continue; |
253 | 253 | ||
254 | size = (HUB_WIDGET_ID_MAX + 1) * | ||
255 | sizeof(struct sn_flush_device_kernel *); | ||
254 | hubdev->hdi_flush_nasid_list.widget_p = | 256 | hubdev->hdi_flush_nasid_list.widget_p = |
255 | kmalloc((HUB_WIDGET_ID_MAX + 1) * | 257 | kzalloc(size, GFP_KERNEL); |
256 | sizeof(struct sn_flush_device_kernel *), | 258 | if (!hubdev->hdi_flush_nasid_list.widget_p) |
257 | GFP_KERNEL); | 259 | BUG(); |
258 | memset(hubdev->hdi_flush_nasid_list.widget_p, 0x0, | ||
259 | (HUB_WIDGET_ID_MAX + 1) * | ||
260 | sizeof(struct sn_flush_device_kernel *)); | ||
261 | 260 | ||
262 | for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) { | 261 | for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) { |
263 | sn_flush_device_kernel = kmalloc(DEV_PER_WIDGET * | 262 | size = DEV_PER_WIDGET * |
264 | sizeof(struct | 263 | sizeof(struct sn_flush_device_kernel); |
265 | sn_flush_device_kernel), | 264 | sn_flush_device_kernel = kzalloc(size, GFP_KERNEL); |
266 | GFP_KERNEL); | ||
267 | if (!sn_flush_device_kernel) | 265 | if (!sn_flush_device_kernel) |
268 | BUG(); | 266 | BUG(); |
269 | memset(sn_flush_device_kernel, 0x0, | ||
270 | DEV_PER_WIDGET * | ||
271 | sizeof(struct sn_flush_device_kernel)); | ||
272 | 267 | ||
273 | dev_entry = sn_flush_device_kernel; | 268 | dev_entry = sn_flush_device_kernel; |
274 | for (device = 0; device < DEV_PER_WIDGET; | 269 | for (device = 0; device < DEV_PER_WIDGET; |
275 | device++,dev_entry++) { | 270 | device++,dev_entry++) { |
276 | dev_entry->common = kmalloc(sizeof(struct | 271 | size = sizeof(struct sn_flush_device_common); |
277 | sn_flush_device_common), | 272 | dev_entry->common = kzalloc(size, GFP_KERNEL); |
278 | GFP_KERNEL); | ||
279 | if (!dev_entry->common) | 273 | if (!dev_entry->common) |
280 | BUG(); | 274 | BUG(); |
281 | memset(dev_entry->common, 0x0, sizeof(struct | ||
282 | sn_flush_device_common)); | ||
283 | 275 | ||
284 | if (sn_prom_feature_available( | 276 | if (sn_prom_feature_available( |
285 | PRF_DEVICE_FLUSH_LIST)) | 277 | PRF_DEVICE_FLUSH_LIST)) |
286 | status = sal_get_device_dmaflush_list( | 278 | status = sal_get_device_dmaflush_list( |
287 | nasid, | 279 | nasid, widget, device, |
288 | widget, | 280 | (u64)(dev_entry->common)); |
289 | device, | ||
290 | (u64)(dev_entry->common)); | ||
291 | else | 281 | else |
292 | status = sn_device_fixup_war(nasid, | 282 | status = sn_device_fixup_war(nasid, |
293 | widget, | 283 | widget, device, |
294 | device, | 284 | dev_entry->common); |
295 | dev_entry->common); | ||
296 | if (status != SALRET_OK) | 285 | if (status != SALRET_OK) |
297 | panic("SAL call failed: %s\n", | 286 | panic("SAL call failed: %s\n", |
298 | ia64_sal_strerror(status)); | 287 | ia64_sal_strerror(status)); |
@@ -383,13 +372,12 @@ void sn_pci_fixup_slot(struct pci_dev *dev) | |||
383 | 372 | ||
384 | pci_dev_get(dev); /* for the sysdata pointer */ | 373 | pci_dev_get(dev); /* for the sysdata pointer */ |
385 | pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL); | 374 | pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL); |
386 | if (pcidev_info <= 0) | 375 | if (!pcidev_info) |
387 | BUG(); /* Cannot afford to run out of memory */ | 376 | BUG(); /* Cannot afford to run out of memory */ |
388 | 377 | ||
389 | sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL); | 378 | sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL); |
390 | if (sn_irq_info <= 0) | 379 | if (!sn_irq_info) |
391 | BUG(); /* Cannot afford to run out of memory */ | 380 | BUG(); /* Cannot afford to run out of memory */ |
392 | memset(sn_irq_info, 0, sizeof(struct sn_irq_info)); | ||
393 | 381 | ||
394 | /* Call to retrieve pci device information needed by kernel. */ | 382 | /* Call to retrieve pci device information needed by kernel. */ |
395 | status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, | 383 | status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, |
@@ -482,13 +470,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev) | |||
482 | */ | 470 | */ |
483 | void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | 471 | void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) |
484 | { | 472 | { |
485 | int status = 0; | 473 | int status; |
486 | int nasid, cnode; | 474 | int nasid, cnode; |
487 | struct pci_controller *controller; | 475 | struct pci_controller *controller; |
488 | struct sn_pci_controller *sn_controller; | 476 | struct sn_pci_controller *sn_controller; |
489 | struct pcibus_bussoft *prom_bussoft_ptr; | 477 | struct pcibus_bussoft *prom_bussoft_ptr; |
490 | struct hubdev_info *hubdev_info; | 478 | struct hubdev_info *hubdev_info; |
491 | void *provider_soft = NULL; | 479 | void *provider_soft; |
492 | struct sn_pcibus_provider *provider; | 480 | struct sn_pcibus_provider *provider; |
493 | 481 | ||
494 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, | 482 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, |
@@ -535,6 +523,8 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
535 | bus->sysdata = controller; | 523 | bus->sysdata = controller; |
536 | if (provider->bus_fixup) | 524 | if (provider->bus_fixup) |
537 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); | 525 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); |
526 | else | ||
527 | provider_soft = NULL; | ||
538 | 528 | ||
539 | if (provider_soft == NULL) { | 529 | if (provider_soft == NULL) { |
540 | /* fixup failed or not applicable */ | 530 | /* fixup failed or not applicable */ |
@@ -617,15 +607,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev) | |||
617 | void sn_bus_free_sysdata(void) | 607 | void sn_bus_free_sysdata(void) |
618 | { | 608 | { |
619 | struct sysdata_el *element; | 609 | struct sysdata_el *element; |
620 | struct list_head *list; | 610 | struct list_head *list, *safe; |
621 | 611 | ||
622 | sn_sysdata_free_start: | 612 | list_for_each_safe(list, safe, &sn_sysdata_list) { |
623 | list_for_each(list, &sn_sysdata_list) { | ||
624 | element = list_entry(list, struct sysdata_el, entry); | 613 | element = list_entry(list, struct sysdata_el, entry); |
625 | list_del(&element->entry); | 614 | list_del(&element->entry); |
615 | list_del(&(((struct pcidev_info *) | ||
616 | (element->sysdata))->pdi_list)); | ||
626 | kfree(element->sysdata); | 617 | kfree(element->sysdata); |
627 | kfree(element); | 618 | kfree(element); |
628 | goto sn_sysdata_free_start; | ||
629 | } | 619 | } |
630 | return; | 620 | return; |
631 | } | 621 | } |
@@ -638,13 +628,8 @@ sn_sysdata_free_start: | |||
638 | 628 | ||
639 | static int __init sn_pci_init(void) | 629 | static int __init sn_pci_init(void) |
640 | { | 630 | { |
641 | int i = 0; | 631 | int i, j; |
642 | int j = 0; | ||
643 | struct pci_dev *pci_dev = NULL; | 632 | struct pci_dev *pci_dev = NULL; |
644 | extern void sn_init_cpei_timer(void); | ||
645 | #ifdef CONFIG_PROC_FS | ||
646 | extern void register_sn_procfs(void); | ||
647 | #endif | ||
648 | 633 | ||
649 | if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM()) | 634 | if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM()) |
650 | return 0; | 635 | return 0; |
@@ -700,32 +685,29 @@ static int __init sn_pci_init(void) | |||
700 | */ | 685 | */ |
701 | void hubdev_init_node(nodepda_t * npda, cnodeid_t node) | 686 | void hubdev_init_node(nodepda_t * npda, cnodeid_t node) |
702 | { | 687 | { |
703 | |||
704 | struct hubdev_info *hubdev_info; | 688 | struct hubdev_info *hubdev_info; |
689 | int size; | ||
690 | pg_data_t *pg; | ||
691 | |||
692 | size = sizeof(struct hubdev_info); | ||
705 | 693 | ||
706 | if (node >= num_online_nodes()) /* Headless/memless IO nodes */ | 694 | if (node >= num_online_nodes()) /* Headless/memless IO nodes */ |
707 | hubdev_info = | 695 | pg = NODE_DATA(0); |
708 | (struct hubdev_info *)alloc_bootmem_node(NODE_DATA(0), | ||
709 | sizeof(struct | ||
710 | hubdev_info)); | ||
711 | else | 696 | else |
712 | hubdev_info = | 697 | pg = NODE_DATA(node); |
713 | (struct hubdev_info *)alloc_bootmem_node(NODE_DATA(node), | ||
714 | sizeof(struct | ||
715 | hubdev_info)); | ||
716 | npda->pdinfo = (void *)hubdev_info; | ||
717 | 698 | ||
699 | hubdev_info = (struct hubdev_info *)alloc_bootmem_node(pg, size); | ||
700 | |||
701 | npda->pdinfo = (void *)hubdev_info; | ||
718 | } | 702 | } |
719 | 703 | ||
720 | geoid_t | 704 | geoid_t |
721 | cnodeid_get_geoid(cnodeid_t cnode) | 705 | cnodeid_get_geoid(cnodeid_t cnode) |
722 | { | 706 | { |
723 | |||
724 | struct hubdev_info *hubdev; | 707 | struct hubdev_info *hubdev; |
725 | 708 | ||
726 | hubdev = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); | 709 | hubdev = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); |
727 | return hubdev->hdi_geoid; | 710 | return hubdev->hdi_geoid; |
728 | |||
729 | } | 711 | } |
730 | 712 | ||
731 | subsys_initcall(sn_pci_init); | 713 | subsys_initcall(sn_pci_init); |
@@ -734,3 +716,4 @@ EXPORT_SYMBOL(sn_pci_unfixup_slot); | |||
734 | EXPORT_SYMBOL(sn_pci_controller_fixup); | 716 | EXPORT_SYMBOL(sn_pci_controller_fixup); |
735 | EXPORT_SYMBOL(sn_bus_store_sysdata); | 717 | EXPORT_SYMBOL(sn_bus_store_sysdata); |
736 | EXPORT_SYMBOL(sn_bus_free_sysdata); | 718 | EXPORT_SYMBOL(sn_bus_free_sysdata); |
719 | EXPORT_SYMBOL(sn_pcidev_info_get); | ||
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 74d87d903d5d..c373113d073a 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -299,7 +299,9 @@ void sn_irq_unfixup(struct pci_dev *pci_dev) | |||
299 | return; | 299 | return; |
300 | 300 | ||
301 | sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info; | 301 | sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info; |
302 | if (!sn_irq_info || !sn_irq_info->irq_irq) { | 302 | if (!sn_irq_info) |
303 | return; | ||
304 | if (!sn_irq_info->irq_irq) { | ||
303 | kfree(sn_irq_info); | 305 | kfree(sn_irq_info); |
304 | return; | 306 | return; |
305 | } | 307 | } |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index 48645ac120fc..5b84836c2171 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second); | |||
75 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | 75 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); |
76 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); | 76 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); |
77 | 77 | ||
78 | DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); | 78 | DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); |
79 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); | 79 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); |
80 | 80 | ||
81 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); | 81 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); |
@@ -317,6 +317,7 @@ struct pcdp_vga_device { | |||
317 | #define PCDP_PCI_TRANS_IOPORT 0x02 | 317 | #define PCDP_PCI_TRANS_IOPORT 0x02 |
318 | #define PCDP_PCI_TRANS_MMIO 0x01 | 318 | #define PCDP_PCI_TRANS_MMIO 0x01 |
319 | 319 | ||
320 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) | ||
320 | static void | 321 | static void |
321 | sn_scan_pcdp(void) | 322 | sn_scan_pcdp(void) |
322 | { | 323 | { |
@@ -358,6 +359,7 @@ sn_scan_pcdp(void) | |||
358 | break; /* once we find the primary, we're done */ | 359 | break; /* once we find the primary, we're done */ |
359 | } | 360 | } |
360 | } | 361 | } |
362 | #endif | ||
361 | 363 | ||
362 | static unsigned long sn2_rtc_initial; | 364 | static unsigned long sn2_rtc_initial; |
363 | 365 | ||
diff --git a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c index 81c63b2f8ae9..6ae276d5d50c 100644 --- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c +++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1999,2001-2004 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (C) 1999,2001-2004, 2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | * | 7 | * |
8 | * Module to export the system's Firmware Interface Tables, including | 8 | * Module to export the system's Firmware Interface Tables, including |
9 | * PROM revision numbers and banners, in /proc | 9 | * PROM revision numbers and banners, in /proc |
@@ -190,7 +190,7 @@ static int | |||
190 | read_version_entry(char *page, char **start, off_t off, int count, int *eof, | 190 | read_version_entry(char *page, char **start, off_t off, int count, int *eof, |
191 | void *data) | 191 | void *data) |
192 | { | 192 | { |
193 | int len = 0; | 193 | int len; |
194 | 194 | ||
195 | /* data holds the NASID of the node */ | 195 | /* data holds the NASID of the node */ |
196 | len = dump_version(page, (unsigned long)data); | 196 | len = dump_version(page, (unsigned long)data); |
@@ -202,7 +202,7 @@ static int | |||
202 | read_fit_entry(char *page, char **start, off_t off, int count, int *eof, | 202 | read_fit_entry(char *page, char **start, off_t off, int count, int *eof, |
203 | void *data) | 203 | void *data) |
204 | { | 204 | { |
205 | int len = 0; | 205 | int len; |
206 | 206 | ||
207 | /* data holds the NASID of the node */ | 207 | /* data holds the NASID of the node */ |
208 | len = dump_fit(page, (unsigned long)data); | 208 | len = dump_fit(page, (unsigned long)data); |
@@ -229,13 +229,16 @@ int __init prominfo_init(void) | |||
229 | struct proc_dir_entry *p; | 229 | struct proc_dir_entry *p; |
230 | cnodeid_t cnodeid; | 230 | cnodeid_t cnodeid; |
231 | unsigned long nasid; | 231 | unsigned long nasid; |
232 | int size; | ||
232 | char name[NODE_NAME_LEN]; | 233 | char name[NODE_NAME_LEN]; |
233 | 234 | ||
234 | if (!ia64_platform_is("sn2")) | 235 | if (!ia64_platform_is("sn2")) |
235 | return 0; | 236 | return 0; |
236 | 237 | ||
237 | proc_entries = kmalloc(num_online_nodes() * sizeof(struct proc_dir_entry *), | 238 | size = num_online_nodes() * sizeof(struct proc_dir_entry *); |
238 | GFP_KERNEL); | 239 | proc_entries = kzalloc(size, GFP_KERNEL); |
240 | if (!proc_entries) | ||
241 | return -ENOMEM; | ||
239 | 242 | ||
240 | sgi_prominfo_entry = proc_mkdir("sgi_prominfo", NULL); | 243 | sgi_prominfo_entry = proc_mkdir("sgi_prominfo", NULL); |
241 | 244 | ||
@@ -244,14 +247,12 @@ int __init prominfo_init(void) | |||
244 | sprintf(name, "node%d", cnodeid); | 247 | sprintf(name, "node%d", cnodeid); |
245 | *entp = proc_mkdir(name, sgi_prominfo_entry); | 248 | *entp = proc_mkdir(name, sgi_prominfo_entry); |
246 | nasid = cnodeid_to_nasid(cnodeid); | 249 | nasid = cnodeid_to_nasid(cnodeid); |
247 | p = create_proc_read_entry( | 250 | p = create_proc_read_entry("fit", 0, *entp, read_fit_entry, |
248 | "fit", 0, *entp, read_fit_entry, | 251 | (void *)nasid); |
249 | (void *)nasid); | ||
250 | if (p) | 252 | if (p) |
251 | p->owner = THIS_MODULE; | 253 | p->owner = THIS_MODULE; |
252 | p = create_proc_read_entry( | 254 | p = create_proc_read_entry("version", 0, *entp, |
253 | "version", 0, *entp, read_version_entry, | 255 | read_version_entry, (void *)nasid); |
254 | (void *)nasid); | ||
255 | if (p) | 256 | if (p) |
256 | p->owner = THIS_MODULE; | 257 | p->owner = THIS_MODULE; |
257 | entp++; | 258 | entp++; |
@@ -263,7 +264,7 @@ int __init prominfo_init(void) | |||
263 | void __exit prominfo_exit(void) | 264 | void __exit prominfo_exit(void) |
264 | { | 265 | { |
265 | struct proc_dir_entry **entp; | 266 | struct proc_dir_entry **entp; |
266 | unsigned cnodeid; | 267 | unsigned int cnodeid; |
267 | char name[NODE_NAME_LEN]; | 268 | char name[NODE_NAME_LEN]; |
268 | 269 | ||
269 | entp = proc_entries; | 270 | entp = proc_entries; |
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index f153a4c35c70..24eefb2fc55f 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -46,8 +46,14 @@ DECLARE_PER_CPU(struct ptc_stats, ptcstats); | |||
46 | 46 | ||
47 | static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock); | 47 | static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock); |
48 | 48 | ||
49 | void sn2_ptc_deadlock_recovery(short *, short, short, int, volatile unsigned long *, unsigned long, | 49 | extern unsigned long |
50 | volatile unsigned long *, unsigned long); | 50 | sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long, |
51 | volatile unsigned long *, unsigned long, | ||
52 | volatile unsigned long *, unsigned long); | ||
53 | void | ||
54 | sn2_ptc_deadlock_recovery(short *, short, short, int, | ||
55 | volatile unsigned long *, unsigned long, | ||
56 | volatile unsigned long *, unsigned long); | ||
51 | 57 | ||
52 | /* | 58 | /* |
53 | * Note: some is the following is captured here to make degugging easier | 59 | * Note: some is the following is captured here to make degugging easier |
@@ -59,16 +65,6 @@ void sn2_ptc_deadlock_recovery(short *, short, short, int, volatile unsigned lon | |||
59 | #define reset_max_active_on_deadlock() 1 | 65 | #define reset_max_active_on_deadlock() 1 |
60 | #define PTC_LOCK(sh1) ((sh1) ? &sn2_global_ptc_lock : &sn_nodepda->ptc_lock) | 66 | #define PTC_LOCK(sh1) ((sh1) ? &sn2_global_ptc_lock : &sn_nodepda->ptc_lock) |
61 | 67 | ||
62 | static inline void ptc_lock(int sh1, unsigned long *flagp) | ||
63 | { | ||
64 | spin_lock_irqsave(PTC_LOCK(sh1), *flagp); | ||
65 | } | ||
66 | |||
67 | static inline void ptc_unlock(int sh1, unsigned long flags) | ||
68 | { | ||
69 | spin_unlock_irqrestore(PTC_LOCK(sh1), flags); | ||
70 | } | ||
71 | |||
72 | struct ptc_stats { | 68 | struct ptc_stats { |
73 | unsigned long ptc_l; | 69 | unsigned long ptc_l; |
74 | unsigned long change_rid; | 70 | unsigned long change_rid; |
@@ -82,6 +78,8 @@ struct ptc_stats { | |||
82 | unsigned long shub_ptc_flushes_not_my_mm; | 78 | unsigned long shub_ptc_flushes_not_my_mm; |
83 | }; | 79 | }; |
84 | 80 | ||
81 | #define sn2_ptctest 0 | ||
82 | |||
85 | static inline unsigned long wait_piowc(void) | 83 | static inline unsigned long wait_piowc(void) |
86 | { | 84 | { |
87 | volatile unsigned long *piows; | 85 | volatile unsigned long *piows; |
@@ -200,7 +198,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
200 | max_active = max_active_pio(shub1); | 198 | max_active = max_active_pio(shub1); |
201 | 199 | ||
202 | itc = ia64_get_itc(); | 200 | itc = ia64_get_itc(); |
203 | ptc_lock(shub1, &flags); | 201 | spin_lock_irqsave(PTC_LOCK(shub1), flags); |
204 | itc2 = ia64_get_itc(); | 202 | itc2 = ia64_get_itc(); |
205 | 203 | ||
206 | __get_cpu_var(ptcstats).lock_itc_clocks += itc2 - itc; | 204 | __get_cpu_var(ptcstats).lock_itc_clocks += itc2 - itc; |
@@ -258,7 +256,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
258 | ia64_srlz_d(); | 256 | ia64_srlz_d(); |
259 | } | 257 | } |
260 | 258 | ||
261 | ptc_unlock(shub1, flags); | 259 | spin_unlock_irqrestore(PTC_LOCK(shub1), flags); |
262 | 260 | ||
263 | preempt_enable(); | 261 | preempt_enable(); |
264 | } | 262 | } |
@@ -270,11 +268,12 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
270 | * TLB flush transaction. The recovery sequence is somewhat tricky & is | 268 | * TLB flush transaction. The recovery sequence is somewhat tricky & is |
271 | * coded in assembly language. | 269 | * coded in assembly language. |
272 | */ | 270 | */ |
273 | void sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid, volatile unsigned long *ptc0, unsigned long data0, | 271 | |
274 | volatile unsigned long *ptc1, unsigned long data1) | 272 | void |
273 | sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid, | ||
274 | volatile unsigned long *ptc0, unsigned long data0, | ||
275 | volatile unsigned long *ptc1, unsigned long data1) | ||
275 | { | 276 | { |
276 | extern unsigned long sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long, | ||
277 | volatile unsigned long *, unsigned long, volatile unsigned long *, unsigned long); | ||
278 | short nasid, i; | 277 | short nasid, i; |
279 | unsigned long *piows, zeroval, n; | 278 | unsigned long *piows, zeroval, n; |
280 | 279 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index a06719d752a0..c686d9c12f7b 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -6,11 +6,11 @@ | |||
6 | * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <asm/uaccess.h> | ||
10 | 9 | ||
11 | #ifdef CONFIG_PROC_FS | 10 | #ifdef CONFIG_PROC_FS |
12 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
13 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <asm/uaccess.h> | ||
14 | #include <asm/sn/sn_sal.h> | 14 | #include <asm/sn/sn_sal.h> |
15 | 15 | ||
16 | static int partition_id_show(struct seq_file *s, void *p) | 16 | static int partition_id_show(struct seq_file *s, void *p) |
@@ -90,10 +90,10 @@ static int coherence_id_open(struct inode *inode, struct file *file) | |||
90 | return single_open(file, coherence_id_show, NULL); | 90 | return single_open(file, coherence_id_show, NULL); |
91 | } | 91 | } |
92 | 92 | ||
93 | static struct proc_dir_entry *sn_procfs_create_entry( | 93 | static struct proc_dir_entry |
94 | const char *name, struct proc_dir_entry *parent, | 94 | *sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent, |
95 | int (*openfunc)(struct inode *, struct file *), | 95 | int (*openfunc)(struct inode *, struct file *), |
96 | int (*releasefunc)(struct inode *, struct file *)) | 96 | int (*releasefunc)(struct inode *, struct file *)) |
97 | { | 97 | { |
98 | struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); | 98 | struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); |
99 | 99 | ||
@@ -126,24 +126,24 @@ void register_sn_procfs(void) | |||
126 | return; | 126 | return; |
127 | 127 | ||
128 | sn_procfs_create_entry("partition_id", sgi_proc_dir, | 128 | sn_procfs_create_entry("partition_id", sgi_proc_dir, |
129 | partition_id_open, single_release); | 129 | partition_id_open, single_release); |
130 | 130 | ||
131 | sn_procfs_create_entry("system_serial_number", sgi_proc_dir, | 131 | sn_procfs_create_entry("system_serial_number", sgi_proc_dir, |
132 | system_serial_number_open, single_release); | 132 | system_serial_number_open, single_release); |
133 | 133 | ||
134 | sn_procfs_create_entry("licenseID", sgi_proc_dir, | 134 | sn_procfs_create_entry("licenseID", sgi_proc_dir, |
135 | licenseID_open, single_release); | 135 | licenseID_open, single_release); |
136 | 136 | ||
137 | e = sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, | 137 | e = sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, |
138 | sn_force_interrupt_open, single_release); | 138 | sn_force_interrupt_open, single_release); |
139 | if (e) | 139 | if (e) |
140 | e->proc_fops->write = sn_force_interrupt_write_proc; | 140 | e->proc_fops->write = sn_force_interrupt_write_proc; |
141 | 141 | ||
142 | sn_procfs_create_entry("coherence_id", sgi_proc_dir, | 142 | sn_procfs_create_entry("coherence_id", sgi_proc_dir, |
143 | coherence_id_open, single_release); | 143 | coherence_id_open, single_release); |
144 | 144 | ||
145 | sn_procfs_create_entry("sn_topology", sgi_proc_dir, | 145 | sn_procfs_create_entry("sn_topology", sgi_proc_dir, |
146 | sn_topology_open, sn_topology_release); | 146 | sn_topology_open, sn_topology_release); |
147 | } | 147 | } |
148 | 148 | ||
149 | #endif /* CONFIG_PROC_FS */ | 149 | #endif /* CONFIG_PROC_FS */ |
diff --git a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c index deb9baf4d473..56a88b6df4b4 100644 --- a/arch/ia64/sn/kernel/sn2/timer.c +++ b/arch/ia64/sn/kernel/sn2/timer.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/hw_irq.h> | 15 | #include <asm/hw_irq.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/timex.h> | ||
17 | 18 | ||
18 | #include <asm/sn/leds.h> | 19 | #include <asm/sn/leds.h> |
19 | #include <asm/sn/shub_mmr.h> | 20 | #include <asm/sn/shub_mmr.h> |
@@ -28,9 +29,27 @@ static struct time_interpolator sn2_interpolator = { | |||
28 | .source = TIME_SOURCE_MMIO64 | 29 | .source = TIME_SOURCE_MMIO64 |
29 | }; | 30 | }; |
30 | 31 | ||
32 | /* | ||
33 | * sn udelay uses the RTC instead of the ITC because the ITC is not | ||
34 | * synchronized across all CPUs, and the thread may migrate to another CPU | ||
35 | * if preemption is enabled. | ||
36 | */ | ||
37 | static void | ||
38 | ia64_sn_udelay (unsigned long usecs) | ||
39 | { | ||
40 | unsigned long start = rtc_time(); | ||
41 | unsigned long end = start + | ||
42 | usecs * sn_rtc_cycles_per_second / 1000000; | ||
43 | |||
44 | while (time_before((unsigned long)rtc_time(), end)) | ||
45 | cpu_relax(); | ||
46 | } | ||
47 | |||
31 | void __init sn_timer_init(void) | 48 | void __init sn_timer_init(void) |
32 | { | 49 | { |
33 | sn2_interpolator.frequency = sn_rtc_cycles_per_second; | 50 | sn2_interpolator.frequency = sn_rtc_cycles_per_second; |
34 | sn2_interpolator.addr = RTC_COUNTER_ADDR; | 51 | sn2_interpolator.addr = RTC_COUNTER_ADDR; |
35 | register_time_interpolator(&sn2_interpolator); | 52 | register_time_interpolator(&sn2_interpolator); |
53 | |||
54 | ia64_udelay = &ia64_sn_udelay; | ||
36 | } | 55 | } |
diff --git a/arch/ia64/sn/kernel/sn2/timer_interrupt.c b/arch/ia64/sn/kernel/sn2/timer_interrupt.c index adf5db2e2afe..fa7f69945917 100644 --- a/arch/ia64/sn/kernel/sn2/timer_interrupt.c +++ b/arch/ia64/sn/kernel/sn2/timer_interrupt.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * | 3 | * |
4 | * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. | 4 | * Copyright (c) 2005, 2006 Silicon Graphics, Inc. All Rights Reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of version 2 of the GNU General Public License | 7 | * under the terms of version 2 of the GNU General Public License |
@@ -22,11 +22,6 @@ | |||
22 | * License along with this program; if not, write the Free Software | 22 | * License along with this program; if not, write the Free Software |
23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
24 | * | 24 | * |
25 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
26 | * Mountain View, CA 94043, or: | ||
27 | * | ||
28 | * http://www.sgi.com | ||
29 | * | ||
30 | * For further information regarding this notice, see: | 25 | * For further information regarding this notice, see: |
31 | * | 26 | * |
32 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan | 27 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan |
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index d263d3e8fbb9..8a56f8b5ffa2 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c | |||
@@ -284,12 +284,10 @@ struct sn_irq_info *tiocx_irq_alloc(nasid_t nasid, int widget, int irq, | |||
284 | if ((nasid & 1) == 0) | 284 | if ((nasid & 1) == 0) |
285 | return NULL; | 285 | return NULL; |
286 | 286 | ||
287 | sn_irq_info = kmalloc(sn_irq_size, GFP_KERNEL); | 287 | sn_irq_info = kzalloc(sn_irq_size, GFP_KERNEL); |
288 | if (sn_irq_info == NULL) | 288 | if (sn_irq_info == NULL) |
289 | return NULL; | 289 | return NULL; |
290 | 290 | ||
291 | memset(sn_irq_info, 0x0, sn_irq_size); | ||
292 | |||
293 | status = tiocx_intr_alloc(nasid, widget, __pa(sn_irq_info), irq, | 291 | status = tiocx_intr_alloc(nasid, widget, __pa(sn_irq_info), irq, |
294 | req_nasid, slice); | 292 | req_nasid, slice); |
295 | if (status) { | 293 | if (status) { |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 36e5437a0fb6..cdf6856ce089 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -738,7 +738,9 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags) | |||
738 | 738 | ||
739 | /* make sure all activity has settled down first */ | 739 | /* make sure all activity has settled down first */ |
740 | 740 | ||
741 | if (atomic_read(&ch->references) > 0) { | 741 | if (atomic_read(&ch->references) > 0 || |
742 | ((ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) && | ||
743 | !(ch->flags & XPC_C_DISCONNECTINGCALLOUT_MADE))) { | ||
742 | return; | 744 | return; |
743 | } | 745 | } |
744 | DBUG_ON(atomic_read(&ch->kthreads_assigned) != 0); | 746 | DBUG_ON(atomic_read(&ch->kthreads_assigned) != 0); |
@@ -775,7 +777,7 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags) | |||
775 | 777 | ||
776 | /* both sides are disconnected now */ | 778 | /* both sides are disconnected now */ |
777 | 779 | ||
778 | if (ch->flags & XPC_C_CONNECTCALLOUT) { | 780 | if (ch->flags & XPC_C_DISCONNECTINGCALLOUT_MADE) { |
779 | spin_unlock_irqrestore(&ch->lock, *irq_flags); | 781 | spin_unlock_irqrestore(&ch->lock, *irq_flags); |
780 | xpc_disconnect_callout(ch, xpcDisconnected); | 782 | xpc_disconnect_callout(ch, xpcDisconnected); |
781 | spin_lock_irqsave(&ch->lock, *irq_flags); | 783 | spin_lock_irqsave(&ch->lock, *irq_flags); |
@@ -1300,7 +1302,7 @@ xpc_process_msg_IPI(struct xpc_partition *part, int ch_number) | |||
1300 | "delivered=%d, partid=%d, channel=%d\n", | 1302 | "delivered=%d, partid=%d, channel=%d\n", |
1301 | nmsgs_sent, ch->partid, ch->number); | 1303 | nmsgs_sent, ch->partid, ch->number); |
1302 | 1304 | ||
1303 | if (ch->flags & XPC_C_CONNECTCALLOUT) { | 1305 | if (ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) { |
1304 | xpc_activate_kthreads(ch, nmsgs_sent); | 1306 | xpc_activate_kthreads(ch, nmsgs_sent); |
1305 | } | 1307 | } |
1306 | } | 1308 | } |
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 9cd460dfe27e..8cbf16432570 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -750,12 +750,16 @@ xpc_daemonize_kthread(void *args) | |||
750 | /* let registerer know that connection has been established */ | 750 | /* let registerer know that connection has been established */ |
751 | 751 | ||
752 | spin_lock_irqsave(&ch->lock, irq_flags); | 752 | spin_lock_irqsave(&ch->lock, irq_flags); |
753 | if (!(ch->flags & XPC_C_CONNECTCALLOUT)) { | 753 | if (!(ch->flags & XPC_C_CONNECTEDCALLOUT)) { |
754 | ch->flags |= XPC_C_CONNECTCALLOUT; | 754 | ch->flags |= XPC_C_CONNECTEDCALLOUT; |
755 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 755 | spin_unlock_irqrestore(&ch->lock, irq_flags); |
756 | 756 | ||
757 | xpc_connected_callout(ch); | 757 | xpc_connected_callout(ch); |
758 | 758 | ||
759 | spin_lock_irqsave(&ch->lock, irq_flags); | ||
760 | ch->flags |= XPC_C_CONNECTEDCALLOUT_MADE; | ||
761 | spin_unlock_irqrestore(&ch->lock, irq_flags); | ||
762 | |||
759 | /* | 763 | /* |
760 | * It is possible that while the callout was being | 764 | * It is possible that while the callout was being |
761 | * made that the remote partition sent some messages. | 765 | * made that the remote partition sent some messages. |
@@ -777,15 +781,17 @@ xpc_daemonize_kthread(void *args) | |||
777 | 781 | ||
778 | if (atomic_dec_return(&ch->kthreads_assigned) == 0) { | 782 | if (atomic_dec_return(&ch->kthreads_assigned) == 0) { |
779 | spin_lock_irqsave(&ch->lock, irq_flags); | 783 | spin_lock_irqsave(&ch->lock, irq_flags); |
780 | if ((ch->flags & XPC_C_CONNECTCALLOUT) && | 784 | if ((ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) && |
781 | !(ch->flags & XPC_C_DISCONNECTCALLOUT)) { | 785 | !(ch->flags & XPC_C_DISCONNECTINGCALLOUT)) { |
782 | ch->flags |= XPC_C_DISCONNECTCALLOUT; | 786 | ch->flags |= XPC_C_DISCONNECTINGCALLOUT; |
783 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 787 | spin_unlock_irqrestore(&ch->lock, irq_flags); |
784 | 788 | ||
785 | xpc_disconnect_callout(ch, xpcDisconnecting); | 789 | xpc_disconnect_callout(ch, xpcDisconnecting); |
786 | } else { | 790 | |
787 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 791 | spin_lock_irqsave(&ch->lock, irq_flags); |
792 | ch->flags |= XPC_C_DISCONNECTINGCALLOUT_MADE; | ||
788 | } | 793 | } |
794 | spin_unlock_irqrestore(&ch->lock, irq_flags); | ||
789 | if (atomic_dec_return(&part->nchannels_engaged) == 0) { | 795 | if (atomic_dec_return(&part->nchannels_engaged) == 0) { |
790 | xpc_mark_partition_disengaged(part); | 796 | xpc_mark_partition_disengaged(part); |
791 | xpc_IPI_send_disengage(part); | 797 | xpc_IPI_send_disengage(part); |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 5a36292388eb..b4b84c269210 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -335,10 +335,10 @@ int sn_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size) | |||
335 | */ | 335 | */ |
336 | 336 | ||
337 | SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE, | 337 | SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE, |
338 | pci_domain_nr(bus), bus->number, | 338 | pci_domain_nr(bus), bus->number, |
339 | 0, /* io */ | 339 | 0, /* io */ |
340 | 0, /* read */ | 340 | 0, /* read */ |
341 | port, size, __pa(val)); | 341 | port, size, __pa(val)); |
342 | 342 | ||
343 | if (isrv.status == 0) | 343 | if (isrv.status == 0) |
344 | return size; | 344 | return size; |
@@ -381,10 +381,10 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size) | |||
381 | */ | 381 | */ |
382 | 382 | ||
383 | SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE, | 383 | SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE, |
384 | pci_domain_nr(bus), bus->number, | 384 | pci_domain_nr(bus), bus->number, |
385 | 0, /* io */ | 385 | 0, /* io */ |
386 | 1, /* write */ | 386 | 1, /* write */ |
387 | port, size, __pa(&val)); | 387 | port, size, __pa(&val)); |
388 | 388 | ||
389 | if (isrv.status == 0) | 389 | if (isrv.status == 0) |
390 | return size; | 390 | return size; |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c index aa3fa5152a32..1f0253bfe0a0 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2001-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/sn/pcibus_provider_defs.h> | 12 | #include <asm/sn/pcibus_provider_defs.h> |
13 | #include <asm/sn/pcidev.h> | 13 | #include <asm/sn/pcidev.h> |
14 | 14 | ||
15 | int pcibr_invalidate_ate = 0; /* by default don't invalidate ATE on free */ | 15 | int pcibr_invalidate_ate; /* by default don't invalidate ATE on free */ |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * mark_ate: Mark the ate as either free or inuse. | 18 | * mark_ate: Mark the ate as either free or inuse. |
@@ -20,14 +20,12 @@ int pcibr_invalidate_ate = 0; /* by default don't invalidate ATE on free */ | |||
20 | static void mark_ate(struct ate_resource *ate_resource, int start, int number, | 20 | static void mark_ate(struct ate_resource *ate_resource, int start, int number, |
21 | u64 value) | 21 | u64 value) |
22 | { | 22 | { |
23 | |||
24 | u64 *ate = ate_resource->ate; | 23 | u64 *ate = ate_resource->ate; |
25 | int index; | 24 | int index; |
26 | int length = 0; | 25 | int length = 0; |
27 | 26 | ||
28 | for (index = start; length < number; index++, length++) | 27 | for (index = start; length < number; index++, length++) |
29 | ate[index] = value; | 28 | ate[index] = value; |
30 | |||
31 | } | 29 | } |
32 | 30 | ||
33 | /* | 31 | /* |
@@ -37,7 +35,6 @@ static void mark_ate(struct ate_resource *ate_resource, int start, int number, | |||
37 | static int find_free_ate(struct ate_resource *ate_resource, int start, | 35 | static int find_free_ate(struct ate_resource *ate_resource, int start, |
38 | int count) | 36 | int count) |
39 | { | 37 | { |
40 | |||
41 | u64 *ate = ate_resource->ate; | 38 | u64 *ate = ate_resource->ate; |
42 | int index; | 39 | int index; |
43 | int start_free; | 40 | int start_free; |
@@ -70,12 +67,10 @@ static int find_free_ate(struct ate_resource *ate_resource, int start, | |||
70 | static inline void free_ate_resource(struct ate_resource *ate_resource, | 67 | static inline void free_ate_resource(struct ate_resource *ate_resource, |
71 | int start) | 68 | int start) |
72 | { | 69 | { |
73 | |||
74 | mark_ate(ate_resource, start, ate_resource->ate[start], 0); | 70 | mark_ate(ate_resource, start, ate_resource->ate[start], 0); |
75 | if ((ate_resource->lowest_free_index > start) || | 71 | if ((ate_resource->lowest_free_index > start) || |
76 | (ate_resource->lowest_free_index < 0)) | 72 | (ate_resource->lowest_free_index < 0)) |
77 | ate_resource->lowest_free_index = start; | 73 | ate_resource->lowest_free_index = start; |
78 | |||
79 | } | 74 | } |
80 | 75 | ||
81 | /* | 76 | /* |
@@ -84,7 +79,6 @@ static inline void free_ate_resource(struct ate_resource *ate_resource, | |||
84 | static inline int alloc_ate_resource(struct ate_resource *ate_resource, | 79 | static inline int alloc_ate_resource(struct ate_resource *ate_resource, |
85 | int ate_needed) | 80 | int ate_needed) |
86 | { | 81 | { |
87 | |||
88 | int start_index; | 82 | int start_index; |
89 | 83 | ||
90 | /* | 84 | /* |
@@ -118,19 +112,12 @@ static inline int alloc_ate_resource(struct ate_resource *ate_resource, | |||
118 | */ | 112 | */ |
119 | int pcibr_ate_alloc(struct pcibus_info *pcibus_info, int count) | 113 | int pcibr_ate_alloc(struct pcibus_info *pcibus_info, int count) |
120 | { | 114 | { |
121 | int status = 0; | 115 | int status; |
122 | u64 flag; | 116 | unsigned long flags; |
123 | 117 | ||
124 | flag = pcibr_lock(pcibus_info); | 118 | spin_lock_irqsave(&pcibus_info->pbi_lock, flags); |
125 | status = alloc_ate_resource(&pcibus_info->pbi_int_ate_resource, count); | 119 | status = alloc_ate_resource(&pcibus_info->pbi_int_ate_resource, count); |
126 | 120 | spin_unlock_irqrestore(&pcibus_info->pbi_lock, flags); | |
127 | if (status < 0) { | ||
128 | /* Failed to allocate */ | ||
129 | pcibr_unlock(pcibus_info, flag); | ||
130 | return -1; | ||
131 | } | ||
132 | |||
133 | pcibr_unlock(pcibus_info, flag); | ||
134 | 121 | ||
135 | return status; | 122 | return status; |
136 | } | 123 | } |
@@ -182,7 +169,7 @@ void pcibr_ate_free(struct pcibus_info *pcibus_info, int index) | |||
182 | ate_write(pcibus_info, index, count, (ate & ~PCI32_ATE_V)); | 169 | ate_write(pcibus_info, index, count, (ate & ~PCI32_ATE_V)); |
183 | } | 170 | } |
184 | 171 | ||
185 | flags = pcibr_lock(pcibus_info); | 172 | spin_lock_irqsave(&pcibus_info->pbi_lock, flags); |
186 | free_ate_resource(&pcibus_info->pbi_int_ate_resource, index); | 173 | free_ate_resource(&pcibus_info->pbi_int_ate_resource, index); |
187 | pcibr_unlock(pcibus_info, flags); | 174 | spin_unlock_irqrestore(&pcibus_info->pbi_lock, flags); |
188 | } | 175 | } |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c index 54ce5b7ceed2..9f86bb6519aa 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c | |||
@@ -137,14 +137,12 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr, | |||
137 | pci_addr |= PCI64_ATTR_VIRTUAL; | 137 | pci_addr |= PCI64_ATTR_VIRTUAL; |
138 | 138 | ||
139 | return pci_addr; | 139 | return pci_addr; |
140 | |||
141 | } | 140 | } |
142 | 141 | ||
143 | static dma_addr_t | 142 | static dma_addr_t |
144 | pcibr_dmatrans_direct32(struct pcidev_info * info, | 143 | pcibr_dmatrans_direct32(struct pcidev_info * info, |
145 | u64 paddr, size_t req_size, u64 flags) | 144 | u64 paddr, size_t req_size, u64 flags) |
146 | { | 145 | { |
147 | |||
148 | struct pcidev_info *pcidev_info = info->pdi_host_pcidev_info; | 146 | struct pcidev_info *pcidev_info = info->pdi_host_pcidev_info; |
149 | struct pcibus_info *pcibus_info = (struct pcibus_info *)pcidev_info-> | 147 | struct pcibus_info *pcibus_info = (struct pcibus_info *)pcidev_info-> |
150 | pdi_pcibus_info; | 148 | pdi_pcibus_info; |
@@ -171,7 +169,6 @@ pcibr_dmatrans_direct32(struct pcidev_info * info, | |||
171 | } | 169 | } |
172 | 170 | ||
173 | return PCI32_DIRECT_BASE | offset; | 171 | return PCI32_DIRECT_BASE | offset; |
174 | |||
175 | } | 172 | } |
176 | 173 | ||
177 | /* | 174 | /* |
@@ -218,9 +215,8 @@ void sn_dma_flush(u64 addr) | |||
218 | u64 flags; | 215 | u64 flags; |
219 | u64 itte; | 216 | u64 itte; |
220 | struct hubdev_info *hubinfo; | 217 | struct hubdev_info *hubinfo; |
221 | volatile struct sn_flush_device_kernel *p; | 218 | struct sn_flush_device_kernel *p; |
222 | volatile struct sn_flush_device_common *common; | 219 | struct sn_flush_device_common *common; |
223 | |||
224 | struct sn_flush_nasid_entry *flush_nasid_list; | 220 | struct sn_flush_nasid_entry *flush_nasid_list; |
225 | 221 | ||
226 | if (!sn_ioif_inited) | 222 | if (!sn_ioif_inited) |
@@ -310,8 +306,7 @@ void sn_dma_flush(u64 addr) | |||
310 | (common->sfdl_slot - 1)); | 306 | (common->sfdl_slot - 1)); |
311 | } | 307 | } |
312 | } else { | 308 | } else { |
313 | spin_lock_irqsave((spinlock_t *)&p->sfdl_flush_lock, | 309 | spin_lock_irqsave(&p->sfdl_flush_lock, flags); |
314 | flags); | ||
315 | *common->sfdl_flush_addr = 0; | 310 | *common->sfdl_flush_addr = 0; |
316 | 311 | ||
317 | /* force an interrupt. */ | 312 | /* force an interrupt. */ |
@@ -322,8 +317,7 @@ void sn_dma_flush(u64 addr) | |||
322 | cpu_relax(); | 317 | cpu_relax(); |
323 | 318 | ||
324 | /* okay, everything is synched up. */ | 319 | /* okay, everything is synched up. */ |
325 | spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock, | 320 | spin_unlock_irqrestore(&p->sfdl_flush_lock, flags); |
326 | flags); | ||
327 | } | 321 | } |
328 | return; | 322 | return; |
329 | } | 323 | } |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 2fac27049bf6..98f716bd92f0 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -163,9 +163,12 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
163 | /* Setup the PMU ATE map */ | 163 | /* Setup the PMU ATE map */ |
164 | soft->pbi_int_ate_resource.lowest_free_index = 0; | 164 | soft->pbi_int_ate_resource.lowest_free_index = 0; |
165 | soft->pbi_int_ate_resource.ate = | 165 | soft->pbi_int_ate_resource.ate = |
166 | kmalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL); | 166 | kzalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL); |
167 | memset(soft->pbi_int_ate_resource.ate, 0, | 167 | |
168 | (soft->pbi_int_ate_size * sizeof(u64))); | 168 | if (!soft->pbi_int_ate_resource.ate) { |
169 | kfree(soft); | ||
170 | return NULL; | ||
171 | } | ||
169 | 172 | ||
170 | if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) { | 173 | if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) { |
171 | /* TIO PCI Bridge: find nearest node with CPUs */ | 174 | /* TIO PCI Bridge: find nearest node with CPUs */ |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 96b919828053..8849439e88dd 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -21,6 +21,10 @@ config GENERIC_CALIBRATE_DELAY | |||
21 | bool | 21 | bool |
22 | default y | 22 | default y |
23 | 23 | ||
24 | config TIME_LOW_RES | ||
25 | bool | ||
26 | default y | ||
27 | |||
24 | config ARCH_MAY_HAVE_PC_FDC | 28 | config ARCH_MAY_HAVE_PC_FDC |
25 | bool | 29 | bool |
26 | depends on Q40 || (BROKEN && SUN3X) | 30 | depends on Q40 || (BROKEN && SUN3X) |
diff --git a/arch/m68k/fpsp040/bindec.S b/arch/m68k/fpsp040/bindec.S index 3ba446a99a12..72f1159cb804 100644 --- a/arch/m68k/fpsp040/bindec.S +++ b/arch/m68k/fpsp040/bindec.S | |||
@@ -131,9 +131,8 @@ | |||
131 | | Copyright (C) Motorola, Inc. 1990 | 131 | | Copyright (C) Motorola, Inc. 1990 |
132 | | All Rights Reserved | 132 | | All Rights Reserved |
133 | | | 133 | | |
134 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 134 | | For details on the license for this file, please see the |
135 | | The copyright notice above does not evidence any | 135 | | file, README, in this same directory. |
136 | | actual or intended publication of such source code. | ||
137 | 136 | ||
138 | |BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package | 137 | |BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package |
139 | 138 | ||
diff --git a/arch/m68k/fpsp040/binstr.S b/arch/m68k/fpsp040/binstr.S index d53555c0a2b6..8a05ba92a8a0 100644 --- a/arch/m68k/fpsp040/binstr.S +++ b/arch/m68k/fpsp040/binstr.S | |||
@@ -60,9 +60,8 @@ | |||
60 | | Copyright (C) Motorola, Inc. 1990 | 60 | | Copyright (C) Motorola, Inc. 1990 |
61 | | All Rights Reserved | 61 | | All Rights Reserved |
62 | | | 62 | | |
63 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 63 | | For details on the license for this file, please see the |
64 | | The copyright notice above does not evidence any | 64 | | file, README, in this same directory. |
65 | | actual or intended publication of such source code. | ||
66 | 65 | ||
67 | |BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package | 66 | |BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package |
68 | 67 | ||
diff --git a/arch/m68k/fpsp040/bugfix.S b/arch/m68k/fpsp040/bugfix.S index 942c4f6f4fd1..3bb9c84bb058 100644 --- a/arch/m68k/fpsp040/bugfix.S +++ b/arch/m68k/fpsp040/bugfix.S | |||
@@ -152,9 +152,8 @@ | |||
152 | | Copyright (C) Motorola, Inc. 1990 | 152 | | Copyright (C) Motorola, Inc. 1990 |
153 | | All Rights Reserved | 153 | | All Rights Reserved |
154 | | | 154 | | |
155 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 155 | | For details on the license for this file, please see the |
156 | | The copyright notice above does not evidence any | 156 | | file, README, in this same directory. |
157 | | actual or intended publication of such source code. | ||
158 | 157 | ||
159 | |BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package | 158 | |BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package |
160 | 159 | ||
diff --git a/arch/m68k/fpsp040/decbin.S b/arch/m68k/fpsp040/decbin.S index 2160609e328d..16ed796bad87 100644 --- a/arch/m68k/fpsp040/decbin.S +++ b/arch/m68k/fpsp040/decbin.S | |||
@@ -69,9 +69,8 @@ | |||
69 | | Copyright (C) Motorola, Inc. 1990 | 69 | | Copyright (C) Motorola, Inc. 1990 |
70 | | All Rights Reserved | 70 | | All Rights Reserved |
71 | | | 71 | | |
72 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 72 | | For details on the license for this file, please see the |
73 | | The copyright notice above does not evidence any | 73 | | file, README, in this same directory. |
74 | | actual or intended publication of such source code. | ||
75 | 74 | ||
76 | |DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package | 75 | |DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package |
77 | 76 | ||
diff --git a/arch/m68k/fpsp040/do_func.S b/arch/m68k/fpsp040/do_func.S index 81f6a9856dce..3eff99a80413 100644 --- a/arch/m68k/fpsp040/do_func.S +++ b/arch/m68k/fpsp040/do_func.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/fpsp.h b/arch/m68k/fpsp040/fpsp.h index 984a4eb8010a..5df4cd772934 100644 --- a/arch/m68k/fpsp040/fpsp.h +++ b/arch/m68k/fpsp040/fpsp.h | |||
@@ -5,9 +5,8 @@ | |||
5 | | Copyright (C) Motorola, Inc. 1990 | 5 | | Copyright (C) Motorola, Inc. 1990 |
6 | | All Rights Reserved | 6 | | All Rights Reserved |
7 | | | 7 | | |
8 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 8 | | For details on the license for this file, please see the |
9 | | The copyright notice above does not evidence any | 9 | | file, README, in this same directory. |
10 | | actual or intended publication of such source code. | ||
11 | 10 | ||
12 | | fpsp.h --- stack frame offsets during FPSP exception handling | 11 | | fpsp.h --- stack frame offsets during FPSP exception handling |
13 | | | 12 | | |
diff --git a/arch/m68k/fpsp040/gen_except.S b/arch/m68k/fpsp040/gen_except.S index 401d06f39f73..3642cb7e3641 100644 --- a/arch/m68k/fpsp040/gen_except.S +++ b/arch/m68k/fpsp040/gen_except.S | |||
@@ -29,9 +29,8 @@ | |||
29 | | Copyright (C) Motorola, Inc. 1990 | 29 | | Copyright (C) Motorola, Inc. 1990 |
30 | | All Rights Reserved | 30 | | All Rights Reserved |
31 | | | 31 | | |
32 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 32 | | For details on the license for this file, please see the |
33 | | The copyright notice above does not evidence any | 33 | | file, README, in this same directory. |
34 | | actual or intended publication of such source code. | ||
35 | 34 | ||
36 | GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package | 35 | GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package |
37 | 36 | ||
diff --git a/arch/m68k/fpsp040/get_op.S b/arch/m68k/fpsp040/get_op.S index c7c2f3727425..64c36d79ef83 100644 --- a/arch/m68k/fpsp040/get_op.S +++ b/arch/m68k/fpsp040/get_op.S | |||
@@ -54,9 +54,8 @@ | |||
54 | | Copyright (C) Motorola, Inc. 1990 | 54 | | Copyright (C) Motorola, Inc. 1990 |
55 | | All Rights Reserved | 55 | | All Rights Reserved |
56 | | | 56 | | |
57 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 57 | | For details on the license for this file, please see the |
58 | | The copyright notice above does not evidence any | 58 | | file, README, in this same directory. |
59 | | actual or intended publication of such source code. | ||
60 | 59 | ||
61 | GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 60 | GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
62 | 61 | ||
diff --git a/arch/m68k/fpsp040/kernel_ex.S b/arch/m68k/fpsp040/kernel_ex.S index 476b711967ce..45bcf3455d34 100644 --- a/arch/m68k/fpsp040/kernel_ex.S +++ b/arch/m68k/fpsp040/kernel_ex.S | |||
@@ -12,9 +12,8 @@ | |||
12 | | Copyright (C) Motorola, Inc. 1990 | 12 | | Copyright (C) Motorola, Inc. 1990 |
13 | | All Rights Reserved | 13 | | All Rights Reserved |
14 | | | 14 | | |
15 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 15 | | For details on the license for this file, please see the |
16 | | The copyright notice above does not evidence any | 16 | | file, README, in this same directory. |
17 | | actual or intended publication of such source code. | ||
18 | 17 | ||
19 | KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package | 18 | KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package |
20 | 19 | ||
diff --git a/arch/m68k/fpsp040/res_func.S b/arch/m68k/fpsp040/res_func.S index 8f6b95217865..d9cdf4383545 100644 --- a/arch/m68k/fpsp040/res_func.S +++ b/arch/m68k/fpsp040/res_func.S | |||
@@ -16,9 +16,8 @@ | |||
16 | | Copyright (C) Motorola, Inc. 1990 | 16 | | Copyright (C) Motorola, Inc. 1990 |
17 | | All Rights Reserved | 17 | | All Rights Reserved |
18 | | | 18 | | |
19 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 19 | | For details on the license for this file, please see the |
20 | | The copyright notice above does not evidence any | 20 | | file, README, in this same directory. |
21 | | actual or intended publication of such source code. | ||
22 | 21 | ||
23 | RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package | 22 | RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package |
24 | 23 | ||
diff --git a/arch/m68k/fpsp040/round.S b/arch/m68k/fpsp040/round.S index 00f98068783f..f84ae0dd4358 100644 --- a/arch/m68k/fpsp040/round.S +++ b/arch/m68k/fpsp040/round.S | |||
@@ -8,9 +8,8 @@ | |||
8 | | Copyright (C) Motorola, Inc. 1990 | 8 | | Copyright (C) Motorola, Inc. 1990 |
9 | | All Rights Reserved | 9 | | All Rights Reserved |
10 | | | 10 | | |
11 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 11 | | For details on the license for this file, please see the |
12 | | The copyright notice above does not evidence any | 12 | | file, README, in this same directory. |
13 | | actual or intended publication of such source code. | ||
14 | 13 | ||
15 | |ROUND idnt 2,1 | Motorola 040 Floating Point Software Package | 14 | |ROUND idnt 2,1 | Motorola 040 Floating Point Software Package |
16 | 15 | ||
diff --git a/arch/m68k/fpsp040/sacos.S b/arch/m68k/fpsp040/sacos.S index 83b00ab1c48f..513c7cca7318 100644 --- a/arch/m68k/fpsp040/sacos.S +++ b/arch/m68k/fpsp040/sacos.S | |||
@@ -38,9 +38,8 @@ | |||
38 | | Copyright (C) Motorola, Inc. 1990 | 38 | | Copyright (C) Motorola, Inc. 1990 |
39 | | All Rights Reserved | 39 | | All Rights Reserved |
40 | | | 40 | | |
41 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 41 | | For details on the license for this file, please see the |
42 | | The copyright notice above does not evidence any | 42 | | file, README, in this same directory. |
43 | | actual or intended publication of such source code. | ||
44 | 43 | ||
45 | |SACOS idnt 2,1 | Motorola 040 Floating Point Software Package | 44 | |SACOS idnt 2,1 | Motorola 040 Floating Point Software Package |
46 | 45 | ||
diff --git a/arch/m68k/fpsp040/sasin.S b/arch/m68k/fpsp040/sasin.S index 5647a6043903..2a269a58ceaa 100644 --- a/arch/m68k/fpsp040/sasin.S +++ b/arch/m68k/fpsp040/sasin.S | |||
@@ -38,9 +38,8 @@ | |||
38 | | Copyright (C) Motorola, Inc. 1990 | 38 | | Copyright (C) Motorola, Inc. 1990 |
39 | | All Rights Reserved | 39 | | All Rights Reserved |
40 | | | 40 | | |
41 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 41 | | For details on the license for this file, please see the |
42 | | The copyright notice above does not evidence any | 42 | | file, README, in this same directory. |
43 | | actual or intended publication of such source code. | ||
44 | 43 | ||
45 | |SASIN idnt 2,1 | Motorola 040 Floating Point Software Package | 44 | |SASIN idnt 2,1 | Motorola 040 Floating Point Software Package |
46 | 45 | ||
diff --git a/arch/m68k/fpsp040/satan.S b/arch/m68k/fpsp040/satan.S index 20dae222d51e..c8a664998f92 100644 --- a/arch/m68k/fpsp040/satan.S +++ b/arch/m68k/fpsp040/satan.S | |||
@@ -43,9 +43,8 @@ | |||
43 | | Copyright (C) Motorola, Inc. 1990 | 43 | | Copyright (C) Motorola, Inc. 1990 |
44 | | All Rights Reserved | 44 | | All Rights Reserved |
45 | | | 45 | | |
46 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 46 | | For details on the license for this file, please see the |
47 | | The copyright notice above does not evidence any | 47 | | file, README, in this same directory. |
48 | | actual or intended publication of such source code. | ||
49 | 48 | ||
50 | |satan idnt 2,1 | Motorola 040 Floating Point Software Package | 49 | |satan idnt 2,1 | Motorola 040 Floating Point Software Package |
51 | 50 | ||
diff --git a/arch/m68k/fpsp040/satanh.S b/arch/m68k/fpsp040/satanh.S index 20f07810bcda..ba91f77a7571 100644 --- a/arch/m68k/fpsp040/satanh.S +++ b/arch/m68k/fpsp040/satanh.S | |||
@@ -45,9 +45,8 @@ | |||
45 | | Copyright (C) Motorola, Inc. 1990 | 45 | | Copyright (C) Motorola, Inc. 1990 |
46 | | All Rights Reserved | 46 | | All Rights Reserved |
47 | | | 47 | | |
48 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 48 | | For details on the license for this file, please see the |
49 | | The copyright notice above does not evidence any | 49 | | file, README, in this same directory. |
50 | | actual or intended publication of such source code. | ||
51 | 50 | ||
52 | |satanh idnt 2,1 | Motorola 040 Floating Point Software Package | 51 | |satanh idnt 2,1 | Motorola 040 Floating Point Software Package |
53 | 52 | ||
diff --git a/arch/m68k/fpsp040/scale.S b/arch/m68k/fpsp040/scale.S index 5c9b805265f2..04829dd4f1f4 100644 --- a/arch/m68k/fpsp040/scale.S +++ b/arch/m68k/fpsp040/scale.S | |||
@@ -21,9 +21,8 @@ | |||
21 | | Copyright (C) Motorola, Inc. 1990 | 21 | | Copyright (C) Motorola, Inc. 1990 |
22 | | All Rights Reserved | 22 | | All Rights Reserved |
23 | | | 23 | | |
24 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 24 | | For details on the license for this file, please see the |
25 | | The copyright notice above does not evidence any | 25 | | file, README, in this same directory. |
26 | | actual or intended publication of such source code. | ||
27 | 26 | ||
28 | |SCALE idnt 2,1 | Motorola 040 Floating Point Software Package | 27 | |SCALE idnt 2,1 | Motorola 040 Floating Point Software Package |
29 | 28 | ||
diff --git a/arch/m68k/fpsp040/scosh.S b/arch/m68k/fpsp040/scosh.S index e81edbb87642..07d3a4d7c86d 100644 --- a/arch/m68k/fpsp040/scosh.S +++ b/arch/m68k/fpsp040/scosh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/setox.S b/arch/m68k/fpsp040/setox.S index 0aa75f9bf7d1..145af5447581 100644 --- a/arch/m68k/fpsp040/setox.S +++ b/arch/m68k/fpsp040/setox.S | |||
@@ -331,9 +331,8 @@ | |||
331 | | Copyright (C) Motorola, Inc. 1990 | 331 | | Copyright (C) Motorola, Inc. 1990 |
332 | | All Rights Reserved | 332 | | All Rights Reserved |
333 | | | 333 | | |
334 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 334 | | For details on the license for this file, please see the |
335 | | The copyright notice above does not evidence any | 335 | | file, README, in this same directory. |
336 | | actual or intended publication of such source code. | ||
337 | 336 | ||
338 | |setox idnt 2,1 | Motorola 040 Floating Point Software Package | 337 | |setox idnt 2,1 | Motorola 040 Floating Point Software Package |
339 | 338 | ||
diff --git a/arch/m68k/fpsp040/sgetem.S b/arch/m68k/fpsp040/sgetem.S index 0fcbd045ba75..d9234f4aed57 100644 --- a/arch/m68k/fpsp040/sgetem.S +++ b/arch/m68k/fpsp040/sgetem.S | |||
@@ -24,9 +24,8 @@ | |||
24 | | Copyright (C) Motorola, Inc. 1990 | 24 | | Copyright (C) Motorola, Inc. 1990 |
25 | | All Rights Reserved | 25 | | All Rights Reserved |
26 | | | 26 | | |
27 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 27 | | For details on the license for this file, please see the |
28 | | The copyright notice above does not evidence any | 28 | | file, README, in this same directory. |
29 | | actual or intended publication of such source code. | ||
30 | 29 | ||
31 | |SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package | 30 | |SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package |
32 | 31 | ||
diff --git a/arch/m68k/fpsp040/sint.S b/arch/m68k/fpsp040/sint.S index 0f9bd28e55a0..0e92d4e5d231 100644 --- a/arch/m68k/fpsp040/sint.S +++ b/arch/m68k/fpsp040/sint.S | |||
@@ -51,9 +51,8 @@ | |||
51 | | Copyright (C) Motorola, Inc. 1990 | 51 | | Copyright (C) Motorola, Inc. 1990 |
52 | | All Rights Reserved | 52 | | All Rights Reserved |
53 | | | 53 | | |
54 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 54 | | For details on the license for this file, please see the |
55 | | The copyright notice above does not evidence any | 55 | | file, README, in this same directory. |
56 | | actual or intended publication of such source code. | ||
57 | 56 | ||
58 | |SINT idnt 2,1 | Motorola 040 Floating Point Software Package | 57 | |SINT idnt 2,1 | Motorola 040 Floating Point Software Package |
59 | 58 | ||
diff --git a/arch/m68k/fpsp040/skeleton.S b/arch/m68k/fpsp040/skeleton.S index a1629194e3fd..a8f41615d94a 100644 --- a/arch/m68k/fpsp040/skeleton.S +++ b/arch/m68k/fpsp040/skeleton.S | |||
@@ -30,9 +30,8 @@ | |||
30 | | Copyright (C) Motorola, Inc. 1990 | 30 | | Copyright (C) Motorola, Inc. 1990 |
31 | | All Rights Reserved | 31 | | All Rights Reserved |
32 | | | 32 | | |
33 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 33 | | For details on the license for this file, please see the |
34 | | The copyright notice above does not evidence any | 34 | | file, README, in this same directory. |
35 | | actual or intended publication of such source code. | ||
36 | 35 | ||
37 | | | 36 | | |
38 | | Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk) | 37 | | Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk) |
diff --git a/arch/m68k/fpsp040/slog2.S b/arch/m68k/fpsp040/slog2.S index 517fa4563246..fac2c738382e 100644 --- a/arch/m68k/fpsp040/slog2.S +++ b/arch/m68k/fpsp040/slog2.S | |||
@@ -96,9 +96,8 @@ | |||
96 | | Copyright (C) Motorola, Inc. 1990 | 96 | | Copyright (C) Motorola, Inc. 1990 |
97 | | All Rights Reserved | 97 | | All Rights Reserved |
98 | | | 98 | | |
99 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 99 | | For details on the license for this file, please see the |
100 | | The copyright notice above does not evidence any | 100 | | file, README, in this same directory. |
101 | | actual or intended publication of such source code. | ||
102 | 101 | ||
103 | |SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package | 102 | |SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package |
104 | 103 | ||
diff --git a/arch/m68k/fpsp040/slogn.S b/arch/m68k/fpsp040/slogn.S index 2aaa0725c035..d98eaf641ec4 100644 --- a/arch/m68k/fpsp040/slogn.S +++ b/arch/m68k/fpsp040/slogn.S | |||
@@ -63,9 +63,8 @@ | |||
63 | | Copyright (C) Motorola, Inc. 1990 | 63 | | Copyright (C) Motorola, Inc. 1990 |
64 | | All Rights Reserved | 64 | | All Rights Reserved |
65 | | | 65 | | |
66 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 66 | | For details on the license for this file, please see the |
67 | | The copyright notice above does not evidence any | 67 | | file, README, in this same directory. |
68 | | actual or intended publication of such source code. | ||
69 | 68 | ||
70 | |slogn idnt 2,1 | Motorola 040 Floating Point Software Package | 69 | |slogn idnt 2,1 | Motorola 040 Floating Point Software Package |
71 | 70 | ||
diff --git a/arch/m68k/fpsp040/smovecr.S b/arch/m68k/fpsp040/smovecr.S index a0127fa55e9c..73c36512081b 100644 --- a/arch/m68k/fpsp040/smovecr.S +++ b/arch/m68k/fpsp040/smovecr.S | |||
@@ -15,9 +15,8 @@ | |||
15 | | Copyright (C) Motorola, Inc. 1990 | 15 | | Copyright (C) Motorola, Inc. 1990 |
16 | | All Rights Reserved | 16 | | All Rights Reserved |
17 | | | 17 | | |
18 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 18 | | For details on the license for this file, please see the |
19 | | The copyright notice above does not evidence any | 19 | | file, README, in this same directory. |
20 | | actual or intended publication of such source code. | ||
21 | 20 | ||
22 | |SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package | 21 | |SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package |
23 | 22 | ||
diff --git a/arch/m68k/fpsp040/srem_mod.S b/arch/m68k/fpsp040/srem_mod.S index 8c8d7f50cc68..a27e70c9a0eb 100644 --- a/arch/m68k/fpsp040/srem_mod.S +++ b/arch/m68k/fpsp040/srem_mod.S | |||
@@ -66,9 +66,8 @@ | |||
66 | | Copyright (C) Motorola, Inc. 1990 | 66 | | Copyright (C) Motorola, Inc. 1990 |
67 | | All Rights Reserved | 67 | | All Rights Reserved |
68 | | | 68 | | |
69 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 69 | | For details on the license for this file, please see the |
70 | | The copyright notice above does not evidence any | 70 | | file, README, in this same directory. |
71 | | actual or intended publication of such source code. | ||
72 | 71 | ||
73 | SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package | 72 | SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package |
74 | 73 | ||
diff --git a/arch/m68k/fpsp040/ssin.S b/arch/m68k/fpsp040/ssin.S index 043c91cdd657..a1ef8e01bf06 100644 --- a/arch/m68k/fpsp040/ssin.S +++ b/arch/m68k/fpsp040/ssin.S | |||
@@ -83,9 +83,8 @@ | |||
83 | | Copyright (C) Motorola, Inc. 1990 | 83 | | Copyright (C) Motorola, Inc. 1990 |
84 | | All Rights Reserved | 84 | | All Rights Reserved |
85 | | | 85 | | |
86 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 86 | | For details on the license for this file, please see the |
87 | | The copyright notice above does not evidence any | 87 | | file, README, in this same directory. |
88 | | actual or intended publication of such source code. | ||
89 | 88 | ||
90 | |SSIN idnt 2,1 | Motorola 040 Floating Point Software Package | 89 | |SSIN idnt 2,1 | Motorola 040 Floating Point Software Package |
91 | 90 | ||
diff --git a/arch/m68k/fpsp040/ssinh.S b/arch/m68k/fpsp040/ssinh.S index c8b3308bb143..8a560edc7653 100644 --- a/arch/m68k/fpsp040/ssinh.S +++ b/arch/m68k/fpsp040/ssinh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |SSINH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |SSINH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/stan.S b/arch/m68k/fpsp040/stan.S index b5c2a196e617..f8553aaececb 100644 --- a/arch/m68k/fpsp040/stan.S +++ b/arch/m68k/fpsp040/stan.S | |||
@@ -50,9 +50,8 @@ | |||
50 | | Copyright (C) Motorola, Inc. 1990 | 50 | | Copyright (C) Motorola, Inc. 1990 |
51 | | All Rights Reserved | 51 | | All Rights Reserved |
52 | | | 52 | | |
53 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 53 | | For details on the license for this file, please see the |
54 | | The copyright notice above does not evidence any | 54 | | file, README, in this same directory. |
55 | | actual or intended publication of such source code. | ||
56 | 55 | ||
57 | |STAN idnt 2,1 | Motorola 040 Floating Point Software Package | 56 | |STAN idnt 2,1 | Motorola 040 Floating Point Software Package |
58 | 57 | ||
diff --git a/arch/m68k/fpsp040/stanh.S b/arch/m68k/fpsp040/stanh.S index 33b009802243..7e12e59ee8c7 100644 --- a/arch/m68k/fpsp040/stanh.S +++ b/arch/m68k/fpsp040/stanh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |STANH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |STANH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/sto_res.S b/arch/m68k/fpsp040/sto_res.S index 0cdca3b060ad..484b47d4eaad 100644 --- a/arch/m68k/fpsp040/sto_res.S +++ b/arch/m68k/fpsp040/sto_res.S | |||
@@ -19,9 +19,8 @@ | |||
19 | | Copyright (C) Motorola, Inc. 1990 | 19 | | Copyright (C) Motorola, Inc. 1990 |
20 | | All Rights Reserved | 20 | | All Rights Reserved |
21 | | | 21 | | |
22 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 22 | | For details on the license for this file, please see the |
23 | | The copyright notice above does not evidence any | 23 | | file, README, in this same directory. |
24 | | actual or intended publication of such source code. | ||
25 | 24 | ||
26 | STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package | 25 | STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package |
27 | 26 | ||
diff --git a/arch/m68k/fpsp040/stwotox.S b/arch/m68k/fpsp040/stwotox.S index 4e3c1407d3df..0d5e6a1436a6 100644 --- a/arch/m68k/fpsp040/stwotox.S +++ b/arch/m68k/fpsp040/stwotox.S | |||
@@ -76,9 +76,8 @@ | |||
76 | | Copyright (C) Motorola, Inc. 1990 | 76 | | Copyright (C) Motorola, Inc. 1990 |
77 | | All Rights Reserved | 77 | | All Rights Reserved |
78 | | | 78 | | |
79 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 79 | | For details on the license for this file, please see the |
80 | | The copyright notice above does not evidence any | 80 | | file, README, in this same directory. |
81 | | actual or intended publication of such source code. | ||
82 | 81 | ||
83 | |STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package | 82 | |STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package |
84 | 83 | ||
diff --git a/arch/m68k/fpsp040/tbldo.S b/arch/m68k/fpsp040/tbldo.S index fe60cf4d20d7..fd5c37a5a2b9 100644 --- a/arch/m68k/fpsp040/tbldo.S +++ b/arch/m68k/fpsp040/tbldo.S | |||
@@ -17,9 +17,8 @@ | |||
17 | | Copyright (C) Motorola, Inc. 1990 | 17 | | Copyright (C) Motorola, Inc. 1990 |
18 | | All Rights Reserved | 18 | | All Rights Reserved |
19 | | | 19 | | |
20 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 20 | | For details on the license for this file, please see the |
21 | | The copyright notice above does not evidence any | 21 | | file, README, in this same directory. |
22 | | actual or intended publication of such source code. | ||
23 | 22 | ||
24 | |TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package | 23 | |TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package |
25 | 24 | ||
diff --git a/arch/m68k/fpsp040/util.S b/arch/m68k/fpsp040/util.S index 452f3d65857b..65b26fa88c60 100644 --- a/arch/m68k/fpsp040/util.S +++ b/arch/m68k/fpsp040/util.S | |||
@@ -16,9 +16,8 @@ | |||
16 | | Copyright (C) Motorola, Inc. 1990 | 16 | | Copyright (C) Motorola, Inc. 1990 |
17 | | All Rights Reserved | 17 | | All Rights Reserved |
18 | | | 18 | | |
19 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 19 | | For details on the license for this file, please see the |
20 | | The copyright notice above does not evidence any | 20 | | file, README, in this same directory. |
21 | | actual or intended publication of such source code. | ||
22 | 21 | ||
23 | |UTIL idnt 2,1 | Motorola 040 Floating Point Software Package | 22 | |UTIL idnt 2,1 | Motorola 040 Floating Point Software Package |
24 | 23 | ||
diff --git a/arch/m68k/fpsp040/x_bsun.S b/arch/m68k/fpsp040/x_bsun.S index 039247b09c8b..d5a576bfac79 100644 --- a/arch/m68k/fpsp040/x_bsun.S +++ b/arch/m68k/fpsp040/x_bsun.S | |||
@@ -13,9 +13,8 @@ | |||
13 | | Copyright (C) Motorola, Inc. 1990 | 13 | | Copyright (C) Motorola, Inc. 1990 |
14 | | All Rights Reserved | 14 | | All Rights Reserved |
15 | | | 15 | | |
16 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 16 | | For details on the license for this file, please see the |
17 | | The copyright notice above does not evidence any | 17 | | file, README, in this same directory. |
18 | | actual or intended publication of such source code. | ||
19 | 18 | ||
20 | X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package | 19 | X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package |
21 | 20 | ||
diff --git a/arch/m68k/fpsp040/x_fline.S b/arch/m68k/fpsp040/x_fline.S index 3917710b0fde..264e126d1db7 100644 --- a/arch/m68k/fpsp040/x_fline.S +++ b/arch/m68k/fpsp040/x_fline.S | |||
@@ -13,9 +13,8 @@ | |||
13 | | Copyright (C) Motorola, Inc. 1990 | 13 | | Copyright (C) Motorola, Inc. 1990 |
14 | | All Rights Reserved | 14 | | All Rights Reserved |
15 | | | 15 | | |
16 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 16 | | For details on the license for this file, please see the |
17 | | The copyright notice above does not evidence any | 17 | | file, README, in this same directory. |
18 | | actual or intended publication of such source code. | ||
19 | 18 | ||
20 | X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package | 19 | X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package |
21 | 20 | ||
diff --git a/arch/m68k/fpsp040/x_operr.S b/arch/m68k/fpsp040/x_operr.S index b0f54bcb49a7..e2c371c3a45d 100644 --- a/arch/m68k/fpsp040/x_operr.S +++ b/arch/m68k/fpsp040/x_operr.S | |||
@@ -43,9 +43,8 @@ | |||
43 | | Copyright (C) Motorola, Inc. 1990 | 43 | | Copyright (C) Motorola, Inc. 1990 |
44 | | All Rights Reserved | 44 | | All Rights Reserved |
45 | | | 45 | | |
46 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 46 | | For details on the license for this file, please see the |
47 | | The copyright notice above does not evidence any | 47 | | file, README, in this same directory. |
48 | | actual or intended publication of such source code. | ||
49 | 48 | ||
50 | X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package | 49 | X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package |
51 | 50 | ||
diff --git a/arch/m68k/fpsp040/x_ovfl.S b/arch/m68k/fpsp040/x_ovfl.S index 22cb8b42c7b6..6fe4989ee31f 100644 --- a/arch/m68k/fpsp040/x_ovfl.S +++ b/arch/m68k/fpsp040/x_ovfl.S | |||
@@ -35,9 +35,8 @@ | |||
35 | | Copyright (C) Motorola, Inc. 1990 | 35 | | Copyright (C) Motorola, Inc. 1990 |
36 | | All Rights Reserved | 36 | | All Rights Reserved |
37 | | | 37 | | |
38 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 38 | | For details on the license for this file, please see the |
39 | | The copyright notice above does not evidence any | 39 | | file, README, in this same directory. |
40 | | actual or intended publication of such source code. | ||
41 | 40 | ||
42 | X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package | 41 | X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package |
43 | 42 | ||
diff --git a/arch/m68k/fpsp040/x_snan.S b/arch/m68k/fpsp040/x_snan.S index 039af573312e..4ed766416378 100644 --- a/arch/m68k/fpsp040/x_snan.S +++ b/arch/m68k/fpsp040/x_snan.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/x_store.S b/arch/m68k/fpsp040/x_store.S index 4282fa67d449..402dc0c0ebc0 100644 --- a/arch/m68k/fpsp040/x_store.S +++ b/arch/m68k/fpsp040/x_store.S | |||
@@ -11,9 +11,8 @@ | |||
11 | | Copyright (C) Motorola, Inc. 1990 | 11 | | Copyright (C) Motorola, Inc. 1990 |
12 | | All Rights Reserved | 12 | | All Rights Reserved |
13 | | | 13 | | |
14 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 14 | | For details on the license for this file, please see the |
15 | | The copyright notice above does not evidence any | 15 | | file, README, in this same directory. |
16 | | actual or intended publication of such source code. | ||
17 | 16 | ||
18 | X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package | 17 | X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package |
19 | 18 | ||
diff --git a/arch/m68k/fpsp040/x_unfl.S b/arch/m68k/fpsp040/x_unfl.S index 077fcc230fcc..eb772ff3b812 100644 --- a/arch/m68k/fpsp040/x_unfl.S +++ b/arch/m68k/fpsp040/x_unfl.S | |||
@@ -21,9 +21,8 @@ | |||
21 | | Copyright (C) Motorola, Inc. 1990 | 21 | | Copyright (C) Motorola, Inc. 1990 |
22 | | All Rights Reserved | 22 | | All Rights Reserved |
23 | | | 23 | | |
24 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 24 | | For details on the license for this file, please see the |
25 | | The copyright notice above does not evidence any | 25 | | file, README, in this same directory. |
26 | | actual or intended publication of such source code. | ||
27 | 26 | ||
28 | X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package | 27 | X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package |
29 | 28 | ||
diff --git a/arch/m68k/fpsp040/x_unimp.S b/arch/m68k/fpsp040/x_unimp.S index 920cb9410e9e..6f382b21228b 100644 --- a/arch/m68k/fpsp040/x_unimp.S +++ b/arch/m68k/fpsp040/x_unimp.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/x_unsupp.S b/arch/m68k/fpsp040/x_unsupp.S index 4ec57285b683..d7cf46208c62 100644 --- a/arch/m68k/fpsp040/x_unsupp.S +++ b/arch/m68k/fpsp040/x_unsupp.S | |||
@@ -23,9 +23,8 @@ | |||
23 | | Copyright (C) Motorola, Inc. 1990 | 23 | | Copyright (C) Motorola, Inc. 1990 |
24 | | All Rights Reserved | 24 | | All Rights Reserved |
25 | | | 25 | | |
26 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 26 | | For details on the license for this file, please see the |
27 | | The copyright notice above does not evidence any | 27 | | file, README, in this same directory. |
28 | | actual or intended publication of such source code. | ||
29 | 28 | ||
30 | X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 29 | X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
31 | 30 | ||
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index e2a6e8648960..e50858dbc237 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -29,6 +29,10 @@ config GENERIC_CALIBRATE_DELAY | |||
29 | bool | 29 | bool |
30 | default y | 30 | default y |
31 | 31 | ||
32 | config TIME_LOW_RES | ||
33 | bool | ||
34 | default y | ||
35 | |||
32 | source "init/Kconfig" | 36 | source "init/Kconfig" |
33 | 37 | ||
34 | menu "Processor type and features" | 38 | menu "Processor type and features" |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6a57407df1bc..38c0f3360d51 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -94,7 +94,6 @@ endif | |||
94 | # machines may also. Since BFD is incredibly buggy with respect to | 94 | # machines may also. Since BFD is incredibly buggy with respect to |
95 | # crossformat linking we rely on the elf2ecoff tool for format conversion. | 95 | # crossformat linking we rely on the elf2ecoff tool for format conversion. |
96 | # | 96 | # |
97 | cflags-y += -I $(TOPDIR)/include/asm/gcc | ||
98 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe | 97 | cflags-y += -G 0 -mno-abicalls -fno-pic -pipe |
99 | LDFLAGS_vmlinux += -G 0 -static -n -nostdlib | 98 | LDFLAGS_vmlinux += -G 0 -static -n -nostdlib |
100 | MODFLAGS += -mlong-calls | 99 | MODFLAGS += -mlong-calls |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 5232fc752935..092679c2dca9 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/a.out.h> | 25 | #include <linux/a.out.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/completion.h> | 27 | #include <linux/completion.h> |
28 | #include <linux/kallsyms.h> | ||
28 | 29 | ||
29 | #include <asm/abi.h> | 30 | #include <asm/abi.h> |
30 | #include <asm/bootinfo.h> | 31 | #include <asm/bootinfo.h> |
@@ -272,46 +273,19 @@ long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
272 | 273 | ||
273 | static struct mips_frame_info { | 274 | static struct mips_frame_info { |
274 | void *func; | 275 | void *func; |
275 | int omit_fp; /* compiled without fno-omit-frame-pointer */ | 276 | unsigned long func_size; |
276 | int frame_offset; | 277 | int frame_size; |
277 | int pc_offset; | 278 | int pc_offset; |
278 | } schedule_frame, mfinfo[] = { | 279 | } *schedule_frame, mfinfo[64]; |
279 | { schedule, 0 }, /* must be first */ | 280 | static int mfinfo_num; |
280 | /* arch/mips/kernel/semaphore.c */ | ||
281 | { __down, 1 }, | ||
282 | { __down_interruptible, 1 }, | ||
283 | /* kernel/sched.c */ | ||
284 | #ifdef CONFIG_PREEMPT | ||
285 | { preempt_schedule, 0 }, | ||
286 | #endif | ||
287 | { wait_for_completion, 0 }, | ||
288 | { interruptible_sleep_on, 0 }, | ||
289 | { interruptible_sleep_on_timeout, 0 }, | ||
290 | { sleep_on, 0 }, | ||
291 | { sleep_on_timeout, 0 }, | ||
292 | { yield, 0 }, | ||
293 | { io_schedule, 0 }, | ||
294 | { io_schedule_timeout, 0 }, | ||
295 | #if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) | ||
296 | { __preempt_spin_lock, 0 }, | ||
297 | { __preempt_write_lock, 0 }, | ||
298 | #endif | ||
299 | /* kernel/timer.c */ | ||
300 | { schedule_timeout, 1 }, | ||
301 | /* { nanosleep_restart, 1 }, */ | ||
302 | /* lib/rwsem-spinlock.c */ | ||
303 | { __down_read, 1 }, | ||
304 | { __down_write, 1 }, | ||
305 | }; | ||
306 | 281 | ||
307 | static int mips_frame_info_initialized; | ||
308 | static int __init get_frame_info(struct mips_frame_info *info) | 282 | static int __init get_frame_info(struct mips_frame_info *info) |
309 | { | 283 | { |
310 | int i; | 284 | int i; |
311 | void *func = info->func; | 285 | void *func = info->func; |
312 | union mips_instruction *ip = (union mips_instruction *)func; | 286 | union mips_instruction *ip = (union mips_instruction *)func; |
313 | info->pc_offset = -1; | 287 | info->pc_offset = -1; |
314 | info->frame_offset = info->omit_fp ? 0 : -1; | 288 | info->frame_size = 0; |
315 | for (i = 0; i < 128; i++, ip++) { | 289 | for (i = 0; i < 128; i++, ip++) { |
316 | /* if jal, jalr, jr, stop. */ | 290 | /* if jal, jalr, jr, stop. */ |
317 | if (ip->j_format.opcode == jal_op || | 291 | if (ip->j_format.opcode == jal_op || |
@@ -320,6 +294,23 @@ static int __init get_frame_info(struct mips_frame_info *info) | |||
320 | ip->r_format.func == jr_op))) | 294 | ip->r_format.func == jr_op))) |
321 | break; | 295 | break; |
322 | 296 | ||
297 | if (info->func_size && i >= info->func_size / 4) | ||
298 | break; | ||
299 | if ( | ||
300 | #ifdef CONFIG_32BIT | ||
301 | ip->i_format.opcode == addiu_op && | ||
302 | #endif | ||
303 | #ifdef CONFIG_64BIT | ||
304 | ip->i_format.opcode == daddiu_op && | ||
305 | #endif | ||
306 | ip->i_format.rs == 29 && | ||
307 | ip->i_format.rt == 29) { | ||
308 | /* addiu/daddiu sp,sp,-imm */ | ||
309 | if (info->frame_size) | ||
310 | continue; | ||
311 | info->frame_size = - ip->i_format.simmediate; | ||
312 | } | ||
313 | |||
323 | if ( | 314 | if ( |
324 | #ifdef CONFIG_32BIT | 315 | #ifdef CONFIG_32BIT |
325 | ip->i_format.opcode == sw_op && | 316 | ip->i_format.opcode == sw_op && |
@@ -327,31 +318,20 @@ static int __init get_frame_info(struct mips_frame_info *info) | |||
327 | #ifdef CONFIG_64BIT | 318 | #ifdef CONFIG_64BIT |
328 | ip->i_format.opcode == sd_op && | 319 | ip->i_format.opcode == sd_op && |
329 | #endif | 320 | #endif |
330 | ip->i_format.rs == 29) | 321 | ip->i_format.rs == 29 && |
331 | { | 322 | ip->i_format.rt == 31) { |
332 | /* sw / sd $ra, offset($sp) */ | 323 | /* sw / sd $ra, offset($sp) */ |
333 | if (ip->i_format.rt == 31) { | 324 | if (info->pc_offset != -1) |
334 | if (info->pc_offset != -1) | 325 | continue; |
335 | continue; | 326 | info->pc_offset = |
336 | info->pc_offset = | 327 | ip->i_format.simmediate / sizeof(long); |
337 | ip->i_format.simmediate / sizeof(long); | ||
338 | } | ||
339 | /* sw / sd $s8, offset($sp) */ | ||
340 | if (ip->i_format.rt == 30) { | ||
341 | //#if 0 /* gcc 3.4 does aggressive optimization... */ | ||
342 | if (info->frame_offset != -1) | ||
343 | continue; | ||
344 | //#endif | ||
345 | info->frame_offset = | ||
346 | ip->i_format.simmediate / sizeof(long); | ||
347 | } | ||
348 | } | 328 | } |
349 | } | 329 | } |
350 | if (info->pc_offset == -1 || info->frame_offset == -1) { | 330 | if (info->pc_offset == -1 || info->frame_size == 0) { |
351 | printk("Can't analyze prologue code at %p\n", func); | 331 | if (func == schedule) |
332 | printk("Can't analyze prologue code at %p\n", func); | ||
352 | info->pc_offset = -1; | 333 | info->pc_offset = -1; |
353 | info->frame_offset = -1; | 334 | info->frame_size = 0; |
354 | return -1; | ||
355 | } | 335 | } |
356 | 336 | ||
357 | return 0; | 337 | return 0; |
@@ -359,25 +339,36 @@ static int __init get_frame_info(struct mips_frame_info *info) | |||
359 | 339 | ||
360 | static int __init frame_info_init(void) | 340 | static int __init frame_info_init(void) |
361 | { | 341 | { |
362 | int i, found; | 342 | int i; |
363 | for (i = 0; i < ARRAY_SIZE(mfinfo); i++) | 343 | #ifdef CONFIG_KALLSYMS |
364 | if (get_frame_info(&mfinfo[i])) | 344 | char *modname; |
365 | return -1; | 345 | char namebuf[KSYM_NAME_LEN + 1]; |
366 | schedule_frame = mfinfo[0]; | 346 | unsigned long start, size, ofs; |
367 | /* bubble sort */ | 347 | extern char __sched_text_start[], __sched_text_end[]; |
368 | do { | 348 | extern char __lock_text_start[], __lock_text_end[]; |
369 | struct mips_frame_info tmp; | 349 | |
370 | found = 0; | 350 | start = (unsigned long)__sched_text_start; |
371 | for (i = 1; i < ARRAY_SIZE(mfinfo); i++) { | 351 | for (i = 0; i < ARRAY_SIZE(mfinfo); i++) { |
372 | if (mfinfo[i-1].func > mfinfo[i].func) { | 352 | if (start == (unsigned long)schedule) |
373 | tmp = mfinfo[i]; | 353 | schedule_frame = &mfinfo[i]; |
374 | mfinfo[i] = mfinfo[i-1]; | 354 | if (!kallsyms_lookup(start, &size, &ofs, &modname, namebuf)) |
375 | mfinfo[i-1] = tmp; | 355 | break; |
376 | found = 1; | 356 | mfinfo[i].func = (void *)(start + ofs); |
377 | } | 357 | mfinfo[i].func_size = size; |
378 | } | 358 | start += size - ofs; |
379 | } while (found); | 359 | if (start >= (unsigned long)__lock_text_end) |
380 | mips_frame_info_initialized = 1; | 360 | break; |
361 | if (start == (unsigned long)__sched_text_end) | ||
362 | start = (unsigned long)__lock_text_start; | ||
363 | } | ||
364 | #else | ||
365 | mfinfo[0].func = schedule; | ||
366 | schedule_frame = &mfinfo[0]; | ||
367 | #endif | ||
368 | for (i = 0; i < ARRAY_SIZE(mfinfo) && mfinfo[i].func; i++) | ||
369 | get_frame_info(&mfinfo[i]); | ||
370 | |||
371 | mfinfo_num = i; | ||
381 | return 0; | 372 | return 0; |
382 | } | 373 | } |
383 | 374 | ||
@@ -394,47 +385,52 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
394 | if (t->reg31 == (unsigned long) ret_from_fork) | 385 | if (t->reg31 == (unsigned long) ret_from_fork) |
395 | return t->reg31; | 386 | return t->reg31; |
396 | 387 | ||
397 | if (schedule_frame.pc_offset < 0) | 388 | if (!schedule_frame || schedule_frame->pc_offset < 0) |
398 | return 0; | 389 | return 0; |
399 | return ((unsigned long *)t->reg29)[schedule_frame.pc_offset]; | 390 | return ((unsigned long *)t->reg29)[schedule_frame->pc_offset]; |
400 | } | 391 | } |
401 | 392 | ||
402 | /* get_wchan - a maintenance nightmare^W^Wpain in the ass ... */ | 393 | /* get_wchan - a maintenance nightmare^W^Wpain in the ass ... */ |
403 | unsigned long get_wchan(struct task_struct *p) | 394 | unsigned long get_wchan(struct task_struct *p) |
404 | { | 395 | { |
405 | unsigned long stack_page; | 396 | unsigned long stack_page; |
406 | unsigned long frame, pc; | 397 | unsigned long pc; |
398 | #ifdef CONFIG_KALLSYMS | ||
399 | unsigned long frame; | ||
400 | #endif | ||
407 | 401 | ||
408 | if (!p || p == current || p->state == TASK_RUNNING) | 402 | if (!p || p == current || p->state == TASK_RUNNING) |
409 | return 0; | 403 | return 0; |
410 | 404 | ||
411 | stack_page = (unsigned long)task_stack_page(p); | 405 | stack_page = (unsigned long)task_stack_page(p); |
412 | if (!stack_page || !mips_frame_info_initialized) | 406 | if (!stack_page || !mfinfo_num) |
413 | return 0; | 407 | return 0; |
414 | 408 | ||
415 | pc = thread_saved_pc(p); | 409 | pc = thread_saved_pc(p); |
410 | #ifdef CONFIG_KALLSYMS | ||
416 | if (!in_sched_functions(pc)) | 411 | if (!in_sched_functions(pc)) |
417 | return pc; | 412 | return pc; |
418 | 413 | ||
419 | frame = ((unsigned long *)p->thread.reg30)[schedule_frame.frame_offset]; | 414 | frame = p->thread.reg29 + schedule_frame->frame_size; |
420 | do { | 415 | do { |
421 | int i; | 416 | int i; |
422 | 417 | ||
423 | if (frame < stack_page || frame > stack_page + THREAD_SIZE - 32) | 418 | if (frame < stack_page || frame > stack_page + THREAD_SIZE - 32) |
424 | return 0; | 419 | return 0; |
425 | 420 | ||
426 | for (i = ARRAY_SIZE(mfinfo) - 1; i >= 0; i--) { | 421 | for (i = mfinfo_num - 1; i >= 0; i--) { |
427 | if (pc >= (unsigned long) mfinfo[i].func) | 422 | if (pc >= (unsigned long) mfinfo[i].func) |
428 | break; | 423 | break; |
429 | } | 424 | } |
430 | if (i < 0) | 425 | if (i < 0) |
431 | break; | 426 | break; |
432 | 427 | ||
433 | if (mfinfo[i].omit_fp) | ||
434 | break; | ||
435 | pc = ((unsigned long *)frame)[mfinfo[i].pc_offset]; | 428 | pc = ((unsigned long *)frame)[mfinfo[i].pc_offset]; |
436 | frame = ((unsigned long *)frame)[mfinfo[i].frame_offset]; | 429 | if (!mfinfo[i].frame_size) |
430 | break; | ||
431 | frame += mfinfo[i].frame_size; | ||
437 | } while (in_sched_functions(pc)); | 432 | } while (in_sched_functions(pc)); |
433 | #endif | ||
438 | 434 | ||
439 | return pc; | 435 | return pc; |
440 | } | 436 | } |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index d7c4a38ed5ae..d83e033dbc87 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -623,7 +623,7 @@ einval: li v0, -EINVAL | |||
623 | sys sys_mknodat 4 /* 4290 */ | 623 | sys sys_mknodat 4 /* 4290 */ |
624 | sys sys_fchownat 5 | 624 | sys sys_fchownat 5 |
625 | sys sys_futimesat 3 | 625 | sys sys_futimesat 3 |
626 | sys sys_newfstatat 4 | 626 | sys sys_fstatat64 4 |
627 | sys sys_unlinkat 3 | 627 | sys sys_unlinkat 3 |
628 | sys sys_renameat 4 /* 4295 */ | 628 | sys sys_renameat 4 /* 4295 */ |
629 | sys sys_linkat 4 | 629 | sys sys_linkat 4 |
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index 0fbc492d24b4..36bfc2588aa3 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h | |||
@@ -176,7 +176,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | |||
176 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) | 176 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) |
177 | sp = current->sas_ss_sp + current->sas_ss_size; | 177 | sp = current->sas_ss_sp + current->sas_ss_size; |
178 | 178 | ||
179 | return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? 32 : ALMASK)); | 179 | return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK)); |
180 | } | 180 | } |
181 | 181 | ||
182 | static inline int install_sigtramp(unsigned int __user *tramp, | 182 | static inline int install_sigtramp(unsigned int __user *tramp, |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index da3271e1fdac..8a8b8dd90417 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -537,7 +537,7 @@ _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
537 | /* The ucontext contains a stack32_t, so we must convert! */ | 537 | /* The ucontext contains a stack32_t, so we must convert! */ |
538 | if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) | 538 | if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) |
539 | goto badframe; | 539 | goto badframe; |
540 | st.ss_size = (long) sp; | 540 | st.ss_sp = (void *)(long) sp; |
541 | if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size)) | 541 | if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size)) |
542 | goto badframe; | 542 | goto badframe; |
543 | if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags)) | 543 | if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags)) |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 384fc4a639a4..5a3776096f07 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -108,7 +108,7 @@ _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
108 | /* The ucontext contains a stack32_t, so we must convert! */ | 108 | /* The ucontext contains a stack32_t, so we must convert! */ |
109 | if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) | 109 | if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) |
110 | goto badframe; | 110 | goto badframe; |
111 | st.ss_size = (long) sp; | 111 | st.ss_sp = (void *)(long) sp; |
112 | if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size)) | 112 | if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size)) |
113 | goto badframe; | 113 | goto badframe; |
114 | if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags)) | 114 | if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags)) |
diff --git a/arch/mips/kernel/smp_mt.c b/arch/mips/kernel/smp_mt.c index 794a1c3de2a4..c930364830d0 100644 --- a/arch/mips/kernel/smp_mt.c +++ b/arch/mips/kernel/smp_mt.c | |||
@@ -68,6 +68,8 @@ void __init sanitize_tlb_entries(void) | |||
68 | 68 | ||
69 | set_c0_mvpcontrol(MVPCONTROL_VPC); | 69 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
70 | 70 | ||
71 | back_to_back_c0_hazard(); | ||
72 | |||
71 | /* Disable TLB sharing */ | 73 | /* Disable TLB sharing */ |
72 | clear_c0_mvpcontrol(MVPCONTROL_STLB); | 74 | clear_c0_mvpcontrol(MVPCONTROL_STLB); |
73 | 75 | ||
@@ -102,35 +104,6 @@ void __init sanitize_tlb_entries(void) | |||
102 | clear_c0_mvpcontrol(MVPCONTROL_VPC); | 104 | clear_c0_mvpcontrol(MVPCONTROL_VPC); |
103 | } | 105 | } |
104 | 106 | ||
105 | #if 0 | ||
106 | /* | ||
107 | * Use c0_MVPConf0 to find out how many CPUs are available, setting up | ||
108 | * phys_cpu_present_map and the logical/physical mappings. | ||
109 | */ | ||
110 | void __init prom_build_cpu_map(void) | ||
111 | { | ||
112 | int i, num, ncpus; | ||
113 | |||
114 | cpus_clear(phys_cpu_present_map); | ||
115 | |||
116 | /* assume we boot on cpu 0.... */ | ||
117 | cpu_set(0, phys_cpu_present_map); | ||
118 | __cpu_number_map[0] = 0; | ||
119 | __cpu_logical_map[0] = 0; | ||
120 | |||
121 | if (cpu_has_mipsmt) { | ||
122 | ncpus = ((read_c0_mvpconf0() & (MVPCONF0_PVPE)) >> MVPCONF0_PVPE_SHIFT) + 1; | ||
123 | for (i=1, num=0; i< NR_CPUS && i<ncpus; i++) { | ||
124 | cpu_set(i, phys_cpu_present_map); | ||
125 | __cpu_number_map[i] = ++num; | ||
126 | __cpu_logical_map[num] = i; | ||
127 | } | ||
128 | |||
129 | printk(KERN_INFO "%i available secondary CPU(s)\n", num); | ||
130 | } | ||
131 | } | ||
132 | #endif | ||
133 | |||
134 | static void ipi_resched_dispatch (struct pt_regs *regs) | 107 | static void ipi_resched_dispatch (struct pt_regs *regs) |
135 | { | 108 | { |
136 | do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ, regs); | 109 | do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ, regs); |
@@ -222,6 +195,9 @@ void prom_prepare_cpus(unsigned int max_cpus) | |||
222 | 195 | ||
223 | /* set config to be the same as vpe0, particularly kseg0 coherency alg */ | 196 | /* set config to be the same as vpe0, particularly kseg0 coherency alg */ |
224 | write_vpe_c0_config( read_c0_config()); | 197 | write_vpe_c0_config( read_c0_config()); |
198 | |||
199 | /* Propagate Config7 */ | ||
200 | write_vpe_c0_config7(read_c0_config7()); | ||
225 | } | 201 | } |
226 | 202 | ||
227 | } | 203 | } |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index e51c38cef88e..1b71d91e8268 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -471,61 +471,29 @@ struct flush_icache_range_args { | |||
471 | static inline void local_r4k_flush_icache_range(void *args) | 471 | static inline void local_r4k_flush_icache_range(void *args) |
472 | { | 472 | { |
473 | struct flush_icache_range_args *fir_args = args; | 473 | struct flush_icache_range_args *fir_args = args; |
474 | unsigned long dc_lsize = cpu_dcache_line_size(); | ||
475 | unsigned long ic_lsize = cpu_icache_line_size(); | ||
476 | unsigned long sc_lsize = cpu_scache_line_size(); | ||
477 | unsigned long start = fir_args->start; | 474 | unsigned long start = fir_args->start; |
478 | unsigned long end = fir_args->end; | 475 | unsigned long end = fir_args->end; |
479 | unsigned long addr, aend; | ||
480 | 476 | ||
481 | if (!cpu_has_ic_fills_f_dc) { | 477 | if (!cpu_has_ic_fills_f_dc) { |
482 | if (end - start > dcache_size) { | 478 | if (end - start > dcache_size) { |
483 | r4k_blast_dcache(); | 479 | r4k_blast_dcache(); |
484 | } else { | 480 | } else { |
485 | R4600_HIT_CACHEOP_WAR_IMPL; | 481 | R4600_HIT_CACHEOP_WAR_IMPL; |
486 | addr = start & ~(dc_lsize - 1); | 482 | protected_blast_dcache_range(start, end); |
487 | aend = (end - 1) & ~(dc_lsize - 1); | ||
488 | |||
489 | while (1) { | ||
490 | /* Hit_Writeback_Inv_D */ | ||
491 | protected_writeback_dcache_line(addr); | ||
492 | if (addr == aend) | ||
493 | break; | ||
494 | addr += dc_lsize; | ||
495 | } | ||
496 | } | 483 | } |
497 | 484 | ||
498 | if (!cpu_icache_snoops_remote_store) { | 485 | if (!cpu_icache_snoops_remote_store) { |
499 | if (end - start > scache_size) { | 486 | if (end - start > scache_size) |
500 | r4k_blast_scache(); | 487 | r4k_blast_scache(); |
501 | } else { | 488 | else |
502 | addr = start & ~(sc_lsize - 1); | 489 | protected_blast_scache_range(start, end); |
503 | aend = (end - 1) & ~(sc_lsize - 1); | ||
504 | |||
505 | while (1) { | ||
506 | /* Hit_Writeback_Inv_SD */ | ||
507 | protected_writeback_scache_line(addr); | ||
508 | if (addr == aend) | ||
509 | break; | ||
510 | addr += sc_lsize; | ||
511 | } | ||
512 | } | ||
513 | } | 490 | } |
514 | } | 491 | } |
515 | 492 | ||
516 | if (end - start > icache_size) | 493 | if (end - start > icache_size) |
517 | r4k_blast_icache(); | 494 | r4k_blast_icache(); |
518 | else { | 495 | else |
519 | addr = start & ~(ic_lsize - 1); | 496 | protected_blast_icache_range(start, end); |
520 | aend = (end - 1) & ~(ic_lsize - 1); | ||
521 | while (1) { | ||
522 | /* Hit_Invalidate_I */ | ||
523 | protected_flush_icache_line(addr); | ||
524 | if (addr == aend) | ||
525 | break; | ||
526 | addr += ic_lsize; | ||
527 | } | ||
528 | } | ||
529 | } | 497 | } |
530 | 498 | ||
531 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) | 499 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) |
@@ -619,27 +587,14 @@ static void r4k_flush_icache_page(struct vm_area_struct *vma, | |||
619 | 587 | ||
620 | static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | 588 | static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) |
621 | { | 589 | { |
622 | unsigned long end, a; | ||
623 | |||
624 | /* Catch bad driver code */ | 590 | /* Catch bad driver code */ |
625 | BUG_ON(size == 0); | 591 | BUG_ON(size == 0); |
626 | 592 | ||
627 | if (cpu_has_subset_pcaches) { | 593 | if (cpu_has_subset_pcaches) { |
628 | unsigned long sc_lsize = cpu_scache_line_size(); | 594 | if (size >= scache_size) |
629 | |||
630 | if (size >= scache_size) { | ||
631 | r4k_blast_scache(); | 595 | r4k_blast_scache(); |
632 | return; | 596 | else |
633 | } | 597 | blast_scache_range(addr, addr + size); |
634 | |||
635 | a = addr & ~(sc_lsize - 1); | ||
636 | end = (addr + size - 1) & ~(sc_lsize - 1); | ||
637 | while (1) { | ||
638 | flush_scache_line(a); /* Hit_Writeback_Inv_SD */ | ||
639 | if (a == end) | ||
640 | break; | ||
641 | a += sc_lsize; | ||
642 | } | ||
643 | return; | 598 | return; |
644 | } | 599 | } |
645 | 600 | ||
@@ -651,17 +606,8 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
651 | if (size >= dcache_size) { | 606 | if (size >= dcache_size) { |
652 | r4k_blast_dcache(); | 607 | r4k_blast_dcache(); |
653 | } else { | 608 | } else { |
654 | unsigned long dc_lsize = cpu_dcache_line_size(); | ||
655 | |||
656 | R4600_HIT_CACHEOP_WAR_IMPL; | 609 | R4600_HIT_CACHEOP_WAR_IMPL; |
657 | a = addr & ~(dc_lsize - 1); | 610 | blast_dcache_range(addr, addr + size); |
658 | end = (addr + size - 1) & ~(dc_lsize - 1); | ||
659 | while (1) { | ||
660 | flush_dcache_line(a); /* Hit_Writeback_Inv_D */ | ||
661 | if (a == end) | ||
662 | break; | ||
663 | a += dc_lsize; | ||
664 | } | ||
665 | } | 611 | } |
666 | 612 | ||
667 | bc_wback_inv(addr, size); | 613 | bc_wback_inv(addr, size); |
@@ -669,44 +615,22 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
669 | 615 | ||
670 | static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | 616 | static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) |
671 | { | 617 | { |
672 | unsigned long end, a; | ||
673 | |||
674 | /* Catch bad driver code */ | 618 | /* Catch bad driver code */ |
675 | BUG_ON(size == 0); | 619 | BUG_ON(size == 0); |
676 | 620 | ||
677 | if (cpu_has_subset_pcaches) { | 621 | if (cpu_has_subset_pcaches) { |
678 | unsigned long sc_lsize = cpu_scache_line_size(); | 622 | if (size >= scache_size) |
679 | |||
680 | if (size >= scache_size) { | ||
681 | r4k_blast_scache(); | 623 | r4k_blast_scache(); |
682 | return; | 624 | else |
683 | } | 625 | blast_scache_range(addr, addr + size); |
684 | |||
685 | a = addr & ~(sc_lsize - 1); | ||
686 | end = (addr + size - 1) & ~(sc_lsize - 1); | ||
687 | while (1) { | ||
688 | flush_scache_line(a); /* Hit_Writeback_Inv_SD */ | ||
689 | if (a == end) | ||
690 | break; | ||
691 | a += sc_lsize; | ||
692 | } | ||
693 | return; | 626 | return; |
694 | } | 627 | } |
695 | 628 | ||
696 | if (size >= dcache_size) { | 629 | if (size >= dcache_size) { |
697 | r4k_blast_dcache(); | 630 | r4k_blast_dcache(); |
698 | } else { | 631 | } else { |
699 | unsigned long dc_lsize = cpu_dcache_line_size(); | ||
700 | |||
701 | R4600_HIT_CACHEOP_WAR_IMPL; | 632 | R4600_HIT_CACHEOP_WAR_IMPL; |
702 | a = addr & ~(dc_lsize - 1); | 633 | blast_dcache_range(addr, addr + size); |
703 | end = (addr + size - 1) & ~(dc_lsize - 1); | ||
704 | while (1) { | ||
705 | flush_dcache_line(a); /* Hit_Writeback_Inv_D */ | ||
706 | if (a == end) | ||
707 | break; | ||
708 | a += dc_lsize; | ||
709 | } | ||
710 | } | 634 | } |
711 | 635 | ||
712 | bc_inv(addr, size); | 636 | bc_inv(addr, size); |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index 0a97a9434eba..7c572bea4a98 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -44,8 +44,6 @@ __asm__ __volatile__( \ | |||
44 | /* TX39H-style cache flush routines. */ | 44 | /* TX39H-style cache flush routines. */ |
45 | static void tx39h_flush_icache_all(void) | 45 | static void tx39h_flush_icache_all(void) |
46 | { | 46 | { |
47 | unsigned long start = KSEG0; | ||
48 | unsigned long end = (start + icache_size); | ||
49 | unsigned long flags, config; | 47 | unsigned long flags, config; |
50 | 48 | ||
51 | /* disable icache (set ICE#) */ | 49 | /* disable icache (set ICE#) */ |
@@ -53,33 +51,18 @@ static void tx39h_flush_icache_all(void) | |||
53 | config = read_c0_conf(); | 51 | config = read_c0_conf(); |
54 | write_c0_conf(config & ~TX39_CONF_ICE); | 52 | write_c0_conf(config & ~TX39_CONF_ICE); |
55 | TX39_STOP_STREAMING(); | 53 | TX39_STOP_STREAMING(); |
56 | 54 | blast_icache16(); | |
57 | /* invalidate icache */ | ||
58 | while (start < end) { | ||
59 | cache16_unroll32(start, Index_Invalidate_I); | ||
60 | start += 0x200; | ||
61 | } | ||
62 | |||
63 | write_c0_conf(config); | 55 | write_c0_conf(config); |
64 | local_irq_restore(flags); | 56 | local_irq_restore(flags); |
65 | } | 57 | } |
66 | 58 | ||
67 | static void tx39h_dma_cache_wback_inv(unsigned long addr, unsigned long size) | 59 | static void tx39h_dma_cache_wback_inv(unsigned long addr, unsigned long size) |
68 | { | 60 | { |
69 | unsigned long end, a; | ||
70 | unsigned long dc_lsize = current_cpu_data.dcache.linesz; | ||
71 | |||
72 | /* Catch bad driver code */ | 61 | /* Catch bad driver code */ |
73 | BUG_ON(size == 0); | 62 | BUG_ON(size == 0); |
74 | 63 | ||
75 | iob(); | 64 | iob(); |
76 | a = addr & ~(dc_lsize - 1); | 65 | blast_inv_dcache_range(addr, addr + size); |
77 | end = (addr + size - 1) & ~(dc_lsize - 1); | ||
78 | while (1) { | ||
79 | invalidate_dcache_line(a); /* Hit_Invalidate_D */ | ||
80 | if (a == end) break; | ||
81 | a += dc_lsize; | ||
82 | } | ||
83 | } | 66 | } |
84 | 67 | ||
85 | 68 | ||
@@ -241,42 +224,21 @@ static void tx39_flush_data_cache_page(unsigned long addr) | |||
241 | 224 | ||
242 | static void tx39_flush_icache_range(unsigned long start, unsigned long end) | 225 | static void tx39_flush_icache_range(unsigned long start, unsigned long end) |
243 | { | 226 | { |
244 | unsigned long dc_lsize = current_cpu_data.dcache.linesz; | ||
245 | unsigned long addr, aend; | ||
246 | |||
247 | if (end - start > dcache_size) | 227 | if (end - start > dcache_size) |
248 | tx39_blast_dcache(); | 228 | tx39_blast_dcache(); |
249 | else { | 229 | else |
250 | addr = start & ~(dc_lsize - 1); | 230 | protected_blast_dcache_range(start, end); |
251 | aend = (end - 1) & ~(dc_lsize - 1); | ||
252 | |||
253 | while (1) { | ||
254 | /* Hit_Writeback_Inv_D */ | ||
255 | protected_writeback_dcache_line(addr); | ||
256 | if (addr == aend) | ||
257 | break; | ||
258 | addr += dc_lsize; | ||
259 | } | ||
260 | } | ||
261 | 231 | ||
262 | if (end - start > icache_size) | 232 | if (end - start > icache_size) |
263 | tx39_blast_icache(); | 233 | tx39_blast_icache(); |
264 | else { | 234 | else { |
265 | unsigned long flags, config; | 235 | unsigned long flags, config; |
266 | addr = start & ~(dc_lsize - 1); | ||
267 | aend = (end - 1) & ~(dc_lsize - 1); | ||
268 | /* disable icache (set ICE#) */ | 236 | /* disable icache (set ICE#) */ |
269 | local_irq_save(flags); | 237 | local_irq_save(flags); |
270 | config = read_c0_conf(); | 238 | config = read_c0_conf(); |
271 | write_c0_conf(config & ~TX39_CONF_ICE); | 239 | write_c0_conf(config & ~TX39_CONF_ICE); |
272 | TX39_STOP_STREAMING(); | 240 | TX39_STOP_STREAMING(); |
273 | while (1) { | 241 | protected_blast_icache_range(start, end); |
274 | /* Hit_Invalidate_I */ | ||
275 | protected_flush_icache_line(addr); | ||
276 | if (addr == aend) | ||
277 | break; | ||
278 | addr += dc_lsize; | ||
279 | } | ||
280 | write_c0_conf(config); | 242 | write_c0_conf(config); |
281 | local_irq_restore(flags); | 243 | local_irq_restore(flags); |
282 | } | 244 | } |
@@ -311,7 +273,7 @@ static void tx39_flush_icache_page(struct vm_area_struct *vma, struct page *page | |||
311 | 273 | ||
312 | static void tx39_dma_cache_wback_inv(unsigned long addr, unsigned long size) | 274 | static void tx39_dma_cache_wback_inv(unsigned long addr, unsigned long size) |
313 | { | 275 | { |
314 | unsigned long end, a; | 276 | unsigned long end; |
315 | 277 | ||
316 | if (((size | addr) & (PAGE_SIZE - 1)) == 0) { | 278 | if (((size | addr) & (PAGE_SIZE - 1)) == 0) { |
317 | end = addr + size; | 279 | end = addr + size; |
@@ -322,20 +284,13 @@ static void tx39_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
322 | } else if (size > dcache_size) { | 284 | } else if (size > dcache_size) { |
323 | tx39_blast_dcache(); | 285 | tx39_blast_dcache(); |
324 | } else { | 286 | } else { |
325 | unsigned long dc_lsize = current_cpu_data.dcache.linesz; | 287 | blast_dcache_range(addr, addr + size); |
326 | a = addr & ~(dc_lsize - 1); | ||
327 | end = (addr + size - 1) & ~(dc_lsize - 1); | ||
328 | while (1) { | ||
329 | flush_dcache_line(a); /* Hit_Writeback_Inv_D */ | ||
330 | if (a == end) break; | ||
331 | a += dc_lsize; | ||
332 | } | ||
333 | } | 288 | } |
334 | } | 289 | } |
335 | 290 | ||
336 | static void tx39_dma_cache_inv(unsigned long addr, unsigned long size) | 291 | static void tx39_dma_cache_inv(unsigned long addr, unsigned long size) |
337 | { | 292 | { |
338 | unsigned long end, a; | 293 | unsigned long end; |
339 | 294 | ||
340 | if (((size | addr) & (PAGE_SIZE - 1)) == 0) { | 295 | if (((size | addr) & (PAGE_SIZE - 1)) == 0) { |
341 | end = addr + size; | 296 | end = addr + size; |
@@ -346,14 +301,7 @@ static void tx39_dma_cache_inv(unsigned long addr, unsigned long size) | |||
346 | } else if (size > dcache_size) { | 301 | } else if (size > dcache_size) { |
347 | tx39_blast_dcache(); | 302 | tx39_blast_dcache(); |
348 | } else { | 303 | } else { |
349 | unsigned long dc_lsize = current_cpu_data.dcache.linesz; | 304 | blast_inv_dcache_range(addr, addr + size); |
350 | a = addr & ~(dc_lsize - 1); | ||
351 | end = (addr + size - 1) & ~(dc_lsize - 1); | ||
352 | while (1) { | ||
353 | invalidate_dcache_line(a); /* Hit_Invalidate_D */ | ||
354 | if (a == end) break; | ||
355 | a += dc_lsize; | ||
356 | } | ||
357 | } | 305 | } |
358 | } | 306 | } |
359 | 307 | ||
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 7c914a4c67c3..eca33cfa8a4c 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -29,6 +29,11 @@ config GENERIC_CALIBRATE_DELAY | |||
29 | bool | 29 | bool |
30 | default y | 30 | default y |
31 | 31 | ||
32 | config TIME_LOW_RES | ||
33 | bool | ||
34 | depends on SMP | ||
35 | default y | ||
36 | |||
32 | config GENERIC_ISA_DMA | 37 | config GENERIC_ISA_DMA |
33 | bool | 38 | bool |
34 | 39 | ||
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 51d2480627d1..71011eadb872 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -377,15 +377,15 @@ | |||
377 | ENTRY_SAME(inotify_init) | 377 | ENTRY_SAME(inotify_init) |
378 | ENTRY_SAME(inotify_add_watch) /* 270 */ | 378 | ENTRY_SAME(inotify_add_watch) /* 270 */ |
379 | ENTRY_SAME(inotify_rm_watch) | 379 | ENTRY_SAME(inotify_rm_watch) |
380 | ENTRY_COMP(pselect6) | 380 | ENTRY_SAME(ni_syscall) /* 271 ENTRY_COMP(pselect6) */ |
381 | ENTRY_COMP(ppoll) | 381 | ENTRY_SAME(ni_syscall) /* 272 ENTRY_COMP(ppoll) */ |
382 | ENTRY_SAME(migrate_pages) | 382 | ENTRY_SAME(migrate_pages) |
383 | ENTRY_COMP(openat) /* 275 */ | 383 | ENTRY_COMP(openat) /* 275 */ |
384 | ENTRY_SAME(mkdirat) | 384 | ENTRY_SAME(mkdirat) |
385 | ENTRY_SAME(mknodat) | 385 | ENTRY_SAME(mknodat) |
386 | ENTRY_SAME(fchownat) | 386 | ENTRY_SAME(fchownat) |
387 | ENTRY_COMP(futimesat) | 387 | ENTRY_COMP(futimesat) |
388 | ENTRY_COMP(newfstatat) /* 280 */ | 388 | ENTRY_SAME(fstatat64) /* 280 */ |
389 | ENTRY_SAME(unlinkat) | 389 | ENTRY_SAME(unlinkat) |
390 | ENTRY_SAME(renameat) | 390 | ENTRY_SAME(renameat) |
391 | ENTRY_SAME(linkat) | 391 | ENTRY_SAME(linkat) |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index df338c5cc910..80d114a3a837 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -83,6 +83,12 @@ config GENERIC_TBSYNC | |||
83 | default y if PPC32 && SMP | 83 | default y if PPC32 && SMP |
84 | default n | 84 | default n |
85 | 85 | ||
86 | config DEFAULT_UIMAGE | ||
87 | bool | ||
88 | help | ||
89 | Used to allow a board to specify it wants a uImage built by default | ||
90 | default n | ||
91 | |||
86 | menu "Processor support" | 92 | menu "Processor support" |
87 | choice | 93 | choice |
88 | prompt "Processor Type" | 94 | prompt "Processor Type" |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 44dd82b791d1..5500ab55d042 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -142,6 +142,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | |||
142 | # Default to zImage, override when needed | 142 | # Default to zImage, override when needed |
143 | defaultimage-y := zImage | 143 | defaultimage-y := zImage |
144 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux | 144 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux |
145 | defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage | ||
145 | KBUILD_IMAGE := $(defaultimage-y) | 146 | KBUILD_IMAGE := $(defaultimage-y) |
146 | all: $(KBUILD_IMAGE) | 147 | all: $(KBUILD_IMAGE) |
147 | 148 | ||
@@ -167,6 +168,8 @@ endef | |||
167 | 168 | ||
168 | archclean: | 169 | archclean: |
169 | $(Q)$(MAKE) $(clean)=$(boot) | 170 | $(Q)$(MAKE) $(clean)=$(boot) |
171 | |||
172 | archmrproper: | ||
170 | $(Q)rm -rf arch/$(ARCH)/include | 173 | $(Q)rm -rf arch/$(ARCH)/include |
171 | 174 | ||
172 | archprepare: checkbin | 175 | archprepare: checkbin |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index c287980b7e65..80e9fe2632b8 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -12,10 +12,10 @@ endif | |||
12 | 12 | ||
13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ | 13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ |
14 | irq.o align.o signal_32.o pmc.o vdso.o \ | 14 | irq.o align.o signal_32.o pmc.o vdso.o \ |
15 | init_task.o process.o | 15 | init_task.o process.o systbl.o |
16 | obj-y += vdso32/ | 16 | obj-y += vdso32/ |
17 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ | 17 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ |
18 | signal_64.o ptrace32.o systbl.o \ | 18 | signal_64.o ptrace32.o \ |
19 | paca.o cpu_setup_power4.o \ | 19 | paca.o cpu_setup_power4.o \ |
20 | firmware.o sysfs.o idle_64.o | 20 | firmware.o sysfs.o idle_64.o |
21 | obj-$(CONFIG_PPC64) += vdso64/ | 21 | obj-$(CONFIG_PPC64) += vdso64/ |
@@ -46,7 +46,7 @@ extra-$(CONFIG_8xx) := head_8xx.o | |||
46 | extra-y += vmlinux.lds | 46 | extra-y += vmlinux.lds |
47 | 47 | ||
48 | obj-y += time.o prom.o traps.o setup-common.o udbg.o | 48 | obj-y += time.o prom.o traps.o setup-common.o udbg.o |
49 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o systbl.o | 49 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o |
50 | obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o | 50 | obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o |
51 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o | 51 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o |
52 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 52 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 007b15ee36d2..8a9f994ed917 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -36,8 +36,6 @@ | |||
36 | #ifdef CONFIG_PPC64 | 36 | #ifdef CONFIG_PPC64 |
37 | #define sys_sigpending sys_ni_syscall | 37 | #define sys_sigpending sys_ni_syscall |
38 | #define sys_old_getrlimit sys_ni_syscall | 38 | #define sys_old_getrlimit sys_ni_syscall |
39 | #else | ||
40 | #define ppc_rtas sys_ni_syscall | ||
41 | #endif | 39 | #endif |
42 | 40 | ||
43 | _GLOBAL(sys_call_table) | 41 | _GLOBAL(sys_call_table) |
@@ -323,3 +321,4 @@ SYSCALL(spu_run) | |||
323 | SYSCALL(spu_create) | 321 | SYSCALL(spu_create) |
324 | COMPAT_SYS(pselect6) | 322 | COMPAT_SYS(pselect6) |
325 | COMPAT_SYS(ppoll) | 323 | COMPAT_SYS(ppoll) |
324 | SYSCALL(unshare) | ||
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index c3427eed8345..5a936566fd61 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -1048,286 +1048,3 @@ _GLOBAL(name) \ | |||
1048 | blr | 1048 | blr |
1049 | 1049 | ||
1050 | SYSCALL(execve) | 1050 | SYSCALL(execve) |
1051 | |||
1052 | /* Why isn't this a) automatic, b) written in 'C'? */ | ||
1053 | .data | ||
1054 | .align 4 | ||
1055 | _GLOBAL(sys_call_table) | ||
1056 | .long sys_restart_syscall /* 0 */ | ||
1057 | .long sys_exit | ||
1058 | .long ppc_fork | ||
1059 | .long sys_read | ||
1060 | .long sys_write | ||
1061 | .long sys_open /* 5 */ | ||
1062 | .long sys_close | ||
1063 | .long sys_waitpid | ||
1064 | .long sys_creat | ||
1065 | .long sys_link | ||
1066 | .long sys_unlink /* 10 */ | ||
1067 | .long sys_execve | ||
1068 | .long sys_chdir | ||
1069 | .long sys_time | ||
1070 | .long sys_mknod | ||
1071 | .long sys_chmod /* 15 */ | ||
1072 | .long sys_lchown | ||
1073 | .long sys_ni_syscall /* old break syscall holder */ | ||
1074 | .long sys_stat | ||
1075 | .long sys_lseek | ||
1076 | .long sys_getpid /* 20 */ | ||
1077 | .long sys_mount | ||
1078 | .long sys_oldumount | ||
1079 | .long sys_setuid | ||
1080 | .long sys_getuid | ||
1081 | .long sys_stime /* 25 */ | ||
1082 | .long sys_ptrace | ||
1083 | .long sys_alarm | ||
1084 | .long sys_fstat | ||
1085 | .long sys_pause | ||
1086 | .long sys_utime /* 30 */ | ||
1087 | .long sys_ni_syscall /* old stty syscall holder */ | ||
1088 | .long sys_ni_syscall /* old gtty syscall holder */ | ||
1089 | .long sys_access | ||
1090 | .long sys_nice | ||
1091 | .long sys_ni_syscall /* 35 */ /* old ftime syscall holder */ | ||
1092 | .long sys_sync | ||
1093 | .long sys_kill | ||
1094 | .long sys_rename | ||
1095 | .long sys_mkdir | ||
1096 | .long sys_rmdir /* 40 */ | ||
1097 | .long sys_dup | ||
1098 | .long sys_pipe | ||
1099 | .long sys_times | ||
1100 | .long sys_ni_syscall /* old prof syscall holder */ | ||
1101 | .long sys_brk /* 45 */ | ||
1102 | .long sys_setgid | ||
1103 | .long sys_getgid | ||
1104 | .long sys_signal | ||
1105 | .long sys_geteuid | ||
1106 | .long sys_getegid /* 50 */ | ||
1107 | .long sys_acct | ||
1108 | .long sys_umount /* recycled never used phys() */ | ||
1109 | .long sys_ni_syscall /* old lock syscall holder */ | ||
1110 | .long sys_ioctl | ||
1111 | .long sys_fcntl /* 55 */ | ||
1112 | .long sys_ni_syscall /* old mpx syscall holder */ | ||
1113 | .long sys_setpgid | ||
1114 | .long sys_ni_syscall /* old ulimit syscall holder */ | ||
1115 | .long sys_olduname | ||
1116 | .long sys_umask /* 60 */ | ||
1117 | .long sys_chroot | ||
1118 | .long sys_ustat | ||
1119 | .long sys_dup2 | ||
1120 | .long sys_getppid | ||
1121 | .long sys_getpgrp /* 65 */ | ||
1122 | .long sys_setsid | ||
1123 | .long sys_sigaction | ||
1124 | .long sys_sgetmask | ||
1125 | .long sys_ssetmask | ||
1126 | .long sys_setreuid /* 70 */ | ||
1127 | .long sys_setregid | ||
1128 | .long sys_sigsuspend | ||
1129 | .long sys_sigpending | ||
1130 | .long sys_sethostname | ||
1131 | .long sys_setrlimit /* 75 */ | ||
1132 | .long sys_old_getrlimit | ||
1133 | .long sys_getrusage | ||
1134 | .long sys_gettimeofday | ||
1135 | .long sys_settimeofday | ||
1136 | .long sys_getgroups /* 80 */ | ||
1137 | .long sys_setgroups | ||
1138 | .long ppc_select | ||
1139 | .long sys_symlink | ||
1140 | .long sys_lstat | ||
1141 | .long sys_readlink /* 85 */ | ||
1142 | .long sys_uselib | ||
1143 | .long sys_swapon | ||
1144 | .long sys_reboot | ||
1145 | .long old_readdir | ||
1146 | .long sys_mmap /* 90 */ | ||
1147 | .long sys_munmap | ||
1148 | .long sys_truncate | ||
1149 | .long sys_ftruncate | ||
1150 | .long sys_fchmod | ||
1151 | .long sys_fchown /* 95 */ | ||
1152 | .long sys_getpriority | ||
1153 | .long sys_setpriority | ||
1154 | .long sys_ni_syscall /* old profil syscall holder */ | ||
1155 | .long sys_statfs | ||
1156 | .long sys_fstatfs /* 100 */ | ||
1157 | .long sys_ni_syscall | ||
1158 | .long sys_socketcall | ||
1159 | .long sys_syslog | ||
1160 | .long sys_setitimer | ||
1161 | .long sys_getitimer /* 105 */ | ||
1162 | .long sys_newstat | ||
1163 | .long sys_newlstat | ||
1164 | .long sys_newfstat | ||
1165 | .long sys_uname | ||
1166 | .long sys_ni_syscall /* 110 */ | ||
1167 | .long sys_vhangup | ||
1168 | .long sys_ni_syscall /* old 'idle' syscall */ | ||
1169 | .long sys_ni_syscall | ||
1170 | .long sys_wait4 | ||
1171 | .long sys_swapoff /* 115 */ | ||
1172 | .long sys_sysinfo | ||
1173 | .long sys_ipc | ||
1174 | .long sys_fsync | ||
1175 | .long sys_sigreturn | ||
1176 | .long ppc_clone /* 120 */ | ||
1177 | .long sys_setdomainname | ||
1178 | .long sys_newuname | ||
1179 | .long sys_ni_syscall | ||
1180 | .long sys_adjtimex | ||
1181 | .long sys_mprotect /* 125 */ | ||
1182 | .long sys_sigprocmask | ||
1183 | .long sys_ni_syscall /* old sys_create_module */ | ||
1184 | .long sys_init_module | ||
1185 | .long sys_delete_module | ||
1186 | .long sys_ni_syscall /* old sys_get_kernel_syms */ /* 130 */ | ||
1187 | .long sys_quotactl | ||
1188 | .long sys_getpgid | ||
1189 | .long sys_fchdir | ||
1190 | .long sys_bdflush | ||
1191 | .long sys_sysfs /* 135 */ | ||
1192 | .long sys_personality | ||
1193 | .long sys_ni_syscall /* for afs_syscall */ | ||
1194 | .long sys_setfsuid | ||
1195 | .long sys_setfsgid | ||
1196 | .long sys_llseek /* 140 */ | ||
1197 | .long sys_getdents | ||
1198 | .long ppc_select | ||
1199 | .long sys_flock | ||
1200 | .long sys_msync | ||
1201 | .long sys_readv /* 145 */ | ||
1202 | .long sys_writev | ||
1203 | .long sys_getsid | ||
1204 | .long sys_fdatasync | ||
1205 | .long sys_sysctl | ||
1206 | .long sys_mlock /* 150 */ | ||
1207 | .long sys_munlock | ||
1208 | .long sys_mlockall | ||
1209 | .long sys_munlockall | ||
1210 | .long sys_sched_setparam | ||
1211 | .long sys_sched_getparam /* 155 */ | ||
1212 | .long sys_sched_setscheduler | ||
1213 | .long sys_sched_getscheduler | ||
1214 | .long sys_sched_yield | ||
1215 | .long sys_sched_get_priority_max | ||
1216 | .long sys_sched_get_priority_min /* 160 */ | ||
1217 | .long sys_sched_rr_get_interval | ||
1218 | .long sys_nanosleep | ||
1219 | .long sys_mremap | ||
1220 | .long sys_setresuid | ||
1221 | .long sys_getresuid /* 165 */ | ||
1222 | .long sys_ni_syscall /* old sys_query_module */ | ||
1223 | .long sys_poll | ||
1224 | .long sys_nfsservctl | ||
1225 | .long sys_setresgid | ||
1226 | .long sys_getresgid /* 170 */ | ||
1227 | .long sys_prctl | ||
1228 | .long sys_rt_sigreturn | ||
1229 | .long sys_rt_sigaction | ||
1230 | .long sys_rt_sigprocmask | ||
1231 | .long sys_rt_sigpending /* 175 */ | ||
1232 | .long sys_rt_sigtimedwait | ||
1233 | .long sys_rt_sigqueueinfo | ||
1234 | .long sys_rt_sigsuspend | ||
1235 | .long sys_pread64 | ||
1236 | .long sys_pwrite64 /* 180 */ | ||
1237 | .long sys_chown | ||
1238 | .long sys_getcwd | ||
1239 | .long sys_capget | ||
1240 | .long sys_capset | ||
1241 | .long sys_sigaltstack /* 185 */ | ||
1242 | .long sys_sendfile | ||
1243 | .long sys_ni_syscall /* streams1 */ | ||
1244 | .long sys_ni_syscall /* streams2 */ | ||
1245 | .long ppc_vfork | ||
1246 | .long sys_getrlimit /* 190 */ | ||
1247 | .long sys_readahead | ||
1248 | .long sys_mmap2 | ||
1249 | .long sys_truncate64 | ||
1250 | .long sys_ftruncate64 | ||
1251 | .long sys_stat64 /* 195 */ | ||
1252 | .long sys_lstat64 | ||
1253 | .long sys_fstat64 | ||
1254 | .long sys_pciconfig_read | ||
1255 | .long sys_pciconfig_write | ||
1256 | .long sys_pciconfig_iobase /* 200 */ | ||
1257 | .long sys_ni_syscall /* 201 - reserved - MacOnLinux - new */ | ||
1258 | .long sys_getdents64 | ||
1259 | .long sys_pivot_root | ||
1260 | .long sys_fcntl64 | ||
1261 | .long sys_madvise /* 205 */ | ||
1262 | .long sys_mincore | ||
1263 | .long sys_gettid | ||
1264 | .long sys_tkill | ||
1265 | .long sys_setxattr | ||
1266 | .long sys_lsetxattr /* 210 */ | ||
1267 | .long sys_fsetxattr | ||
1268 | .long sys_getxattr | ||
1269 | .long sys_lgetxattr | ||
1270 | .long sys_fgetxattr | ||
1271 | .long sys_listxattr /* 215 */ | ||
1272 | .long sys_llistxattr | ||
1273 | .long sys_flistxattr | ||
1274 | .long sys_removexattr | ||
1275 | .long sys_lremovexattr | ||
1276 | .long sys_fremovexattr /* 220 */ | ||
1277 | .long sys_futex | ||
1278 | .long sys_sched_setaffinity | ||
1279 | .long sys_sched_getaffinity | ||
1280 | .long sys_ni_syscall | ||
1281 | .long sys_ni_syscall /* 225 - reserved for Tux */ | ||
1282 | .long sys_sendfile64 | ||
1283 | .long sys_io_setup | ||
1284 | .long sys_io_destroy | ||
1285 | .long sys_io_getevents | ||
1286 | .long sys_io_submit /* 230 */ | ||
1287 | .long sys_io_cancel | ||
1288 | .long sys_set_tid_address | ||
1289 | .long sys_fadvise64 | ||
1290 | .long sys_exit_group | ||
1291 | .long sys_lookup_dcookie /* 235 */ | ||
1292 | .long sys_epoll_create | ||
1293 | .long sys_epoll_ctl | ||
1294 | .long sys_epoll_wait | ||
1295 | .long sys_remap_file_pages | ||
1296 | .long sys_timer_create /* 240 */ | ||
1297 | .long sys_timer_settime | ||
1298 | .long sys_timer_gettime | ||
1299 | .long sys_timer_getoverrun | ||
1300 | .long sys_timer_delete | ||
1301 | .long sys_clock_settime /* 245 */ | ||
1302 | .long sys_clock_gettime | ||
1303 | .long sys_clock_getres | ||
1304 | .long sys_clock_nanosleep | ||
1305 | .long sys_swapcontext | ||
1306 | .long sys_tgkill /* 250 */ | ||
1307 | .long sys_utimes | ||
1308 | .long sys_statfs64 | ||
1309 | .long sys_fstatfs64 | ||
1310 | .long ppc_fadvise64_64 | ||
1311 | .long sys_ni_syscall /* 255 - rtas (used on ppc64) */ | ||
1312 | .long sys_debug_setcontext | ||
1313 | .long sys_ni_syscall /* 257 reserved for vserver */ | ||
1314 | .long sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */ | ||
1315 | .long sys_ni_syscall /* 259 reserved for new sys_mbind */ | ||
1316 | .long sys_ni_syscall /* 260 reserved for new sys_get_mempolicy */ | ||
1317 | .long sys_ni_syscall /* 261 reserved for new sys_set_mempolicy */ | ||
1318 | .long sys_mq_open | ||
1319 | .long sys_mq_unlink | ||
1320 | .long sys_mq_timedsend | ||
1321 | .long sys_mq_timedreceive /* 265 */ | ||
1322 | .long sys_mq_notify | ||
1323 | .long sys_mq_getsetattr | ||
1324 | .long sys_kexec_load | ||
1325 | .long sys_add_key | ||
1326 | .long sys_request_key /* 270 */ | ||
1327 | .long sys_keyctl | ||
1328 | .long sys_waitid | ||
1329 | .long sys_ioprio_set | ||
1330 | .long sys_ioprio_get | ||
1331 | .long sys_inotify_init /* 275 */ | ||
1332 | .long sys_inotify_add_watch | ||
1333 | .long sys_inotify_rm_watch | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 3525c91204d4..f8d0cd540a06 100644 --- a/arch/s390/defconfig +++ b/arch/s390/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.16-rc1 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Thu Jan 19 10:58:53 2006 | 4 | # Wed Feb 8 10:44:39 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
@@ -12,7 +12,6 @@ CONFIG_S390=y | |||
12 | # Code maturity level options | 12 | # Code maturity level options |
13 | # | 13 | # |
14 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_LOCK_KERNEL=y | 15 | CONFIG_LOCK_KERNEL=y |
17 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 16 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
18 | 17 | ||
@@ -154,6 +153,7 @@ CONFIG_NET=y | |||
154 | # | 153 | # |
155 | # Networking options | 154 | # Networking options |
156 | # | 155 | # |
156 | # CONFIG_NETDEBUG is not set | ||
157 | CONFIG_PACKET=y | 157 | CONFIG_PACKET=y |
158 | # CONFIG_PACKET_MMAP is not set | 158 | # CONFIG_PACKET_MMAP is not set |
159 | CONFIG_UNIX=y | 159 | CONFIG_UNIX=y |
@@ -607,6 +607,7 @@ CONFIG_MSDOS_PARTITION=y | |||
607 | # Instrumentation Support | 607 | # Instrumentation Support |
608 | # | 608 | # |
609 | # CONFIG_PROFILING is not set | 609 | # CONFIG_PROFILING is not set |
610 | # CONFIG_STATISTICS is not set | ||
610 | 611 | ||
611 | # | 612 | # |
612 | # Kernel hacking | 613 | # Kernel hacking |
@@ -624,7 +625,7 @@ CONFIG_DEBUG_MUTEXES=y | |||
624 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 625 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
625 | # CONFIG_DEBUG_KOBJECT is not set | 626 | # CONFIG_DEBUG_KOBJECT is not set |
626 | # CONFIG_DEBUG_INFO is not set | 627 | # CONFIG_DEBUG_INFO is not set |
627 | # CONFIG_DEBUG_FS is not set | 628 | CONFIG_DEBUG_FS=y |
628 | # CONFIG_DEBUG_VM is not set | 629 | # CONFIG_DEBUG_VM is not set |
629 | CONFIG_FORCED_INLINING=y | 630 | CONFIG_FORCED_INLINING=y |
630 | # CONFIG_RCU_TORTURE_TEST is not set | 631 | # CONFIG_RCU_TORTURE_TEST is not set |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index cc20f0e3a7d3..2d021626c1a6 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta | |||
905 | return ret; | 905 | return ret; |
906 | } | 906 | } |
907 | 907 | ||
908 | asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, | ||
909 | struct stat64_emu31 __user* statbuf, int flag) | ||
910 | { | ||
911 | struct kstat stat; | ||
912 | int error = -EINVAL; | ||
913 | |||
914 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
915 | goto out; | ||
916 | |||
917 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
918 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
919 | else | ||
920 | error = vfs_stat_fd(dfd, filename, &stat); | ||
921 | |||
922 | if (!error) | ||
923 | error = cp_stat64(statbuf, &stat); | ||
924 | out: | ||
925 | return error; | ||
926 | } | ||
927 | |||
908 | /* | 928 | /* |
909 | * Linux/i386 didn't use to be able to handle more than | 929 | * Linux/i386 didn't use to be able to handle more than |
910 | * 4 system call parameters, so these system calls used a memory | 930 | * 4 system call parameters, so these system calls used a memory |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index ef706694a0c1..5291b5f8788d 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -195,9 +195,6 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | 197 | ||
198 | int | ||
199 | do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact); | ||
200 | |||
201 | asmlinkage long | 198 | asmlinkage long |
202 | sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, | 199 | sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, |
203 | struct sigaction32 __user *oact, size_t sigsetsize) | 200 | struct sigaction32 __user *oact, size_t sigsetsize) |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 83b33fe1923c..dd2d6c3e8df8 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper: | |||
1523 | llgtr %r4,%r4 # struct timeval * | 1523 | llgtr %r4,%r4 # struct timeval * |
1524 | jg compat_sys_futimesat | 1524 | jg compat_sys_futimesat |
1525 | 1525 | ||
1526 | .globl compat_sys_newfstatat_wrapper | 1526 | .globl sys32_fstatat_wrapper |
1527 | compat_sys_newfstatat_wrapper: | 1527 | sys32_fstatat_wrapper: |
1528 | llgfr %r2,%r2 # unsigned int | 1528 | llgfr %r2,%r2 # unsigned int |
1529 | llgtr %r3,%r3 # char * | 1529 | llgtr %r3,%r3 # char * |
1530 | llgtr %r4,%r4 # struct stat * | 1530 | llgtr %r4,%r4 # struct stat64 * |
1531 | lgfr %r5,%r5 # int | 1531 | lgfr %r5,%r5 # int |
1532 | jg compat_sys_newfstatat | 1532 | jg sys32_fstatat |
1533 | 1533 | ||
1534 | .globl sys_unlinkat_wrapper | 1534 | .globl sys_unlinkat_wrapper |
1535 | sys_unlinkat_wrapper: | 1535 | sys_unlinkat_wrapper: |
@@ -1602,3 +1602,8 @@ compat_sys_ppoll_wrapper: | |||
1602 | llgtr %r5,%r5 # const sigset_t * | 1602 | llgtr %r5,%r5 # const sigset_t * |
1603 | llgfr %r6,%r6 # size_t | 1603 | llgfr %r6,%r6 # size_t |
1604 | jg compat_sys_ppoll | 1604 | jg compat_sys_ppoll |
1605 | |||
1606 | .globl sys_unshare_wrapper | ||
1607 | sys_unshare_wrapper: | ||
1608 | llgfr %r2,%r2 # unsigned long | ||
1609 | jg sys_unshare | ||
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index f0ed5c642c74..bad81b5832db 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -12,15 +12,16 @@ | |||
12 | * on the S390 architecture. | 12 | * on the S390 architecture. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/cio.h> | ||
16 | #include <asm/setup.h> | ||
17 | #include <linux/device.h> | 15 | #include <linux/device.h> |
18 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
19 | #include <linux/kexec.h> | 17 | #include <linux/kexec.h> |
20 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <asm/cio.h> | ||
20 | #include <asm/setup.h> | ||
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/smp.h> | ||
24 | 25 | ||
25 | static void kexec_halt_all_cpus(void *); | 26 | static void kexec_halt_all_cpus(void *); |
26 | 27 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index cbfcfd02a43a..0d1ad5dbe2b1 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -52,7 +52,7 @@ extern volatile int __cpu_logical_map[]; | |||
52 | struct _lowcore *lowcore_ptr[NR_CPUS]; | 52 | struct _lowcore *lowcore_ptr[NR_CPUS]; |
53 | 53 | ||
54 | cpumask_t cpu_online_map; | 54 | cpumask_t cpu_online_map; |
55 | cpumask_t cpu_possible_map; | 55 | cpumask_t cpu_possible_map = CPU_MASK_ALL; |
56 | 56 | ||
57 | static struct task_struct *current_set[NR_CPUS]; | 57 | static struct task_struct *current_set[NR_CPUS]; |
58 | 58 | ||
@@ -514,9 +514,6 @@ __init smp_check_cpus(unsigned int max_cpus) | |||
514 | num_cpus++; | 514 | num_cpus++; |
515 | } | 515 | } |
516 | 516 | ||
517 | for (cpu = 1; cpu < max_cpus; cpu++) | ||
518 | cpu_set(cpu, cpu_possible_map); | ||
519 | |||
520 | printk("Detected %d CPU's\n",(int) num_cpus); | 517 | printk("Detected %d CPU's\n",(int) num_cpus); |
521 | printk("Boot cpu address %2X\n", boot_cpu_addr); | 518 | printk("Boot cpu address %2X\n", boot_cpu_addr); |
522 | } | 519 | } |
@@ -810,7 +807,6 @@ void __devinit smp_prepare_boot_cpu(void) | |||
810 | 807 | ||
811 | cpu_set(0, cpu_online_map); | 808 | cpu_set(0, cpu_online_map); |
812 | cpu_set(0, cpu_present_map); | 809 | cpu_set(0, cpu_present_map); |
813 | cpu_set(0, cpu_possible_map); | ||
814 | S390_lowcore.percpu_offset = __per_cpu_offset[0]; | 810 | S390_lowcore.percpu_offset = __per_cpu_offset[0]; |
815 | current_set[0] = current; | 811 | current_set[0] = current; |
816 | } | 812 | } |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 3280345efacd..84921fe8d266 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) | |||
301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ | 301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ |
302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) | 302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) |
303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) | 303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) |
304 | SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper) | 304 | SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper) |
305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) | 305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) |
306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ | 306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ |
307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) | 307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) |
@@ -311,3 +311,4 @@ SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper) | |||
311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ | 311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ |
312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) | 312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) |
313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) | 313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) |
314 | SYSCALL(sys_unshare,sys_unshare,sys_unshare_wrapper) | ||
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index e96c35bddac7..71f0a2fb3078 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -30,7 +30,7 @@ void __delay(unsigned long loops) | |||
30 | */ | 30 | */ |
31 | __asm__ __volatile__( | 31 | __asm__ __volatile__( |
32 | "0: brct %0,0b" | 32 | "0: brct %0,0b" |
33 | : /* no outputs */ : "r" (loops/2) ); | 33 | : /* no outputs */ : "r" ((loops/2) + 1)); |
34 | } | 34 | } |
35 | 35 | ||
36 | /* | 36 | /* |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index c0314705d73a..768de64b371f 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -76,7 +76,7 @@ sys_call_table: | |||
76 | /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink | 76 | /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink |
77 | /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid | 77 | /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid |
78 | /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat | 78 | /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat |
79 | /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_newfstatat | 79 | /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 |
80 | /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 80 | /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare | 81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
82 | 82 | ||
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 9264ccbaaafa..417727bd87ba 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c | |||
@@ -428,6 +428,27 @@ asmlinkage long compat_sys_fstat64(unsigned int fd, | |||
428 | return error; | 428 | return error; |
429 | } | 429 | } |
430 | 430 | ||
431 | asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename, | ||
432 | struct compat_stat64 __user * statbuf, int flag) | ||
433 | { | ||
434 | struct kstat stat; | ||
435 | int error = -EINVAL; | ||
436 | |||
437 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
438 | goto out; | ||
439 | |||
440 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
441 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
442 | else | ||
443 | error = vfs_stat_fd(dfd, filename, &stat); | ||
444 | |||
445 | if (!error) | ||
446 | error = cp_compat_stat64(&stat, statbuf); | ||
447 | |||
448 | out: | ||
449 | return error; | ||
450 | } | ||
451 | |||
431 | asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) | 452 | asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) |
432 | { | 453 | { |
433 | return sys_sysfs(option, arg1, arg2); | 454 | return sys_sysfs(option, arg1, arg2); |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 5928b3c33e27..c3adb7ac167d 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -77,7 +77,7 @@ sys_call_table32: | |||
77 | /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink | 77 | /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink |
78 | .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid | 78 | .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid |
79 | /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat | 79 | /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat |
80 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_newfstatat | 80 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 |
81 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 81 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
82 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare | 82 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare |
83 | 83 | ||
@@ -146,7 +146,7 @@ sys_call_table: | |||
146 | /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink | 146 | /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink |
147 | .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid | 147 | .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid |
148 | /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat | 148 | /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat |
149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, compat_sys_newfstatat | 149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 |
150 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 150 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare | 151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
152 | 152 | ||
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig index 04494638b963..e7fc3e500342 100644 --- a/arch/v850/Kconfig +++ b/arch/v850/Kconfig | |||
@@ -28,6 +28,10 @@ config GENERIC_IRQ_PROBE | |||
28 | bool | 28 | bool |
29 | default y | 29 | default y |
30 | 30 | ||
31 | config TIME_LOW_RES | ||
32 | bool | ||
33 | default y | ||
34 | |||
31 | # Turn off some random 386 crap that can affect device config | 35 | # Turn off some random 386 crap that can affect device config |
32 | config ISA | 36 | config ISA |
33 | bool | 37 | bool |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 56832929a543..b337136f28b6 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.16-rc1-git2 | 3 | # Linux kernel version: 2.6.16-rc3 |
4 | # Thu Jan 19 10:05:21 2006 | 4 | # Mon Feb 13 22:31:24 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -21,7 +21,6 @@ CONFIG_DMI=y | |||
21 | # Code maturity level options | 21 | # Code maturity level options |
22 | # | 22 | # |
23 | CONFIG_EXPERIMENTAL=y | 23 | CONFIG_EXPERIMENTAL=y |
24 | CONFIG_CLEAN_COMPILE=y | ||
25 | CONFIG_LOCK_KERNEL=y | 24 | CONFIG_LOCK_KERNEL=y |
26 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 25 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
27 | 26 | ||
@@ -267,6 +266,7 @@ CONFIG_NET=y | |||
267 | # | 266 | # |
268 | # Networking options | 267 | # Networking options |
269 | # | 268 | # |
269 | # CONFIG_NETDEBUG is not set | ||
270 | CONFIG_PACKET=y | 270 | CONFIG_PACKET=y |
271 | # CONFIG_PACKET_MMAP is not set | 271 | # CONFIG_PACKET_MMAP is not set |
272 | CONFIG_UNIX=y | 272 | CONFIG_UNIX=y |
@@ -446,7 +446,6 @@ CONFIG_BLK_DEV_PIIX=y | |||
446 | # CONFIG_BLK_DEV_NS87415 is not set | 446 | # CONFIG_BLK_DEV_NS87415 is not set |
447 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | 447 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set |
448 | CONFIG_BLK_DEV_PDC202XX_NEW=y | 448 | CONFIG_BLK_DEV_PDC202XX_NEW=y |
449 | # CONFIG_PDC202XX_FORCE is not set | ||
450 | # CONFIG_BLK_DEV_SVWKS is not set | 449 | # CONFIG_BLK_DEV_SVWKS is not set |
451 | # CONFIG_BLK_DEV_SIIMAGE is not set | 450 | # CONFIG_BLK_DEV_SIIMAGE is not set |
452 | # CONFIG_BLK_DEV_SIS5513 is not set | 451 | # CONFIG_BLK_DEV_SIS5513 is not set |
@@ -573,7 +572,33 @@ CONFIG_FUSION_MAX_SGE=128 | |||
573 | # | 572 | # |
574 | # IEEE 1394 (FireWire) support | 573 | # IEEE 1394 (FireWire) support |
575 | # | 574 | # |
576 | # CONFIG_IEEE1394 is not set | 575 | CONFIG_IEEE1394=y |
576 | |||
577 | # | ||
578 | # Subsystem Options | ||
579 | # | ||
580 | # CONFIG_IEEE1394_VERBOSEDEBUG is not set | ||
581 | # CONFIG_IEEE1394_OUI_DB is not set | ||
582 | # CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set | ||
583 | # CONFIG_IEEE1394_EXPORT_FULL_API is not set | ||
584 | |||
585 | # | ||
586 | # Device Drivers | ||
587 | # | ||
588 | |||
589 | # | ||
590 | # Texas Instruments PCILynx requires I2C | ||
591 | # | ||
592 | CONFIG_IEEE1394_OHCI1394=y | ||
593 | |||
594 | # | ||
595 | # Protocol Drivers | ||
596 | # | ||
597 | # CONFIG_IEEE1394_VIDEO1394 is not set | ||
598 | # CONFIG_IEEE1394_SBP2 is not set | ||
599 | # CONFIG_IEEE1394_ETH1394 is not set | ||
600 | # CONFIG_IEEE1394_DV1394 is not set | ||
601 | CONFIG_IEEE1394_RAWIO=y | ||
577 | 602 | ||
578 | # | 603 | # |
579 | # I2O device support | 604 | # I2O device support |
@@ -772,6 +797,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | |||
772 | # | 797 | # |
773 | CONFIG_SERIAL_CORE=y | 798 | CONFIG_SERIAL_CORE=y |
774 | CONFIG_SERIAL_CORE_CONSOLE=y | 799 | CONFIG_SERIAL_CORE_CONSOLE=y |
800 | # CONFIG_SERIAL_JSM is not set | ||
775 | CONFIG_UNIX98_PTYS=y | 801 | CONFIG_UNIX98_PTYS=y |
776 | CONFIG_LEGACY_PTYS=y | 802 | CONFIG_LEGACY_PTYS=y |
777 | CONFIG_LEGACY_PTY_COUNT=256 | 803 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -871,6 +897,7 @@ CONFIG_HPET_MMAP=y | |||
871 | # | 897 | # |
872 | CONFIG_HWMON=y | 898 | CONFIG_HWMON=y |
873 | # CONFIG_HWMON_VID is not set | 899 | # CONFIG_HWMON_VID is not set |
900 | # CONFIG_SENSORS_F71805F is not set | ||
874 | # CONFIG_SENSORS_HDAPS is not set | 901 | # CONFIG_SENSORS_HDAPS is not set |
875 | # CONFIG_HWMON_DEBUG_CHIP is not set | 902 | # CONFIG_HWMON_DEBUG_CHIP is not set |
876 | 903 | ||
@@ -1101,7 +1128,6 @@ CONFIG_USB_MON=y | |||
1101 | # EDAC - error detection and reporting (RAS) | 1128 | # EDAC - error detection and reporting (RAS) |
1102 | # | 1129 | # |
1103 | # CONFIG_EDAC is not set | 1130 | # CONFIG_EDAC is not set |
1104 | # CONFIG_EDAC_POLL is not set | ||
1105 | 1131 | ||
1106 | # | 1132 | # |
1107 | # Firmware Drivers | 1133 | # Firmware Drivers |
@@ -1291,14 +1317,12 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1291 | # CONFIG_DEBUG_SPINLOCK is not set | 1317 | # CONFIG_DEBUG_SPINLOCK is not set |
1292 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1318 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1293 | # CONFIG_DEBUG_KOBJECT is not set | 1319 | # CONFIG_DEBUG_KOBJECT is not set |
1294 | # CONFIG_DEBUG_INFO is not set | 1320 | CONFIG_DEBUG_INFO=y |
1295 | CONFIG_DEBUG_FS=y | 1321 | CONFIG_DEBUG_FS=y |
1296 | # CONFIG_DEBUG_VM is not set | 1322 | # CONFIG_DEBUG_VM is not set |
1297 | # CONFIG_FRAME_POINTER is not set | 1323 | # CONFIG_FRAME_POINTER is not set |
1298 | # CONFIG_FORCED_INLINING is not set | 1324 | # CONFIG_FORCED_INLINING is not set |
1299 | # CONFIG_UNWIND_INFO is not set | ||
1300 | # CONFIG_RCU_TORTURE_TEST is not set | 1325 | # CONFIG_RCU_TORTURE_TEST is not set |
1301 | CONFIG_INIT_DEBUG=y | ||
1302 | # CONFIG_DEBUG_RODATA is not set | 1326 | # CONFIG_DEBUG_RODATA is not set |
1303 | # CONFIG_IOMMU_DEBUG is not set | 1327 | # CONFIG_IOMMU_DEBUG is not set |
1304 | 1328 | ||
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index ada4535d0161..00dee176c08e 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -677,7 +677,7 @@ ia32_sys_call_table: | |||
677 | .quad sys_mknodat | 677 | .quad sys_mknodat |
678 | .quad sys_fchownat | 678 | .quad sys_fchownat |
679 | .quad compat_sys_futimesat | 679 | .quad compat_sys_futimesat |
680 | .quad compat_sys_newfstatat /* 300 */ | 680 | .quad sys32_fstatat /* 300 */ |
681 | .quad sys_unlinkat | 681 | .quad sys_unlinkat |
682 | .quad sys_renameat | 682 | .quad sys_renameat |
683 | .quad sys_linkat | 683 | .quad sys_linkat |
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 54481af5344a..2bc55af95419 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c | |||
@@ -180,6 +180,28 @@ sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) | |||
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
183 | asmlinkage long | ||
184 | sys32_fstatat(unsigned int dfd, char __user *filename, | ||
185 | struct stat64 __user* statbuf, int flag) | ||
186 | { | ||
187 | struct kstat stat; | ||
188 | int error = -EINVAL; | ||
189 | |||
190 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
191 | goto out; | ||
192 | |||
193 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
194 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
195 | else | ||
196 | error = vfs_stat_fd(dfd, filename, &stat); | ||
197 | |||
198 | if (!error) | ||
199 | error = cp_stat64(statbuf, &stat); | ||
200 | |||
201 | out: | ||
202 | return error; | ||
203 | } | ||
204 | |||
183 | /* | 205 | /* |
184 | * Linux/i386 didn't use to be able to handle more than | 206 | * Linux/i386 didn't use to be able to handle more than |
185 | * 4 system call parameters, so these system calls used a memory | 207 | * 4 system call parameters, so these system calls used a memory |
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 6147770b4347..e5b14c57eaa0 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -708,7 +708,7 @@ static void setup_APIC_timer(unsigned int clocks) | |||
708 | local_irq_save(flags); | 708 | local_irq_save(flags); |
709 | 709 | ||
710 | /* wait for irq slice */ | 710 | /* wait for irq slice */ |
711 | if (vxtime.hpet_address) { | 711 | if (vxtime.hpet_address && hpet_use_timer) { |
712 | int trigger = hpet_readl(HPET_T0_CMP); | 712 | int trigger = hpet_readl(HPET_T0_CMP); |
713 | while (hpet_readl(HPET_COUNTER) >= trigger) | 713 | while (hpet_readl(HPET_COUNTER) >= trigger) |
714 | /* do nothing */ ; | 714 | /* do nothing */ ; |
@@ -1152,6 +1152,7 @@ __setup("noapicmaintimer", setup_noapicmaintimer); | |||
1152 | static __init int setup_apicpmtimer(char *s) | 1152 | static __init int setup_apicpmtimer(char *s) |
1153 | { | 1153 | { |
1154 | apic_calibrate_pmtmr = 1; | 1154 | apic_calibrate_pmtmr = 1; |
1155 | notsc_setup(NULL); | ||
1155 | return setup_apicmaintimer(NULL); | 1156 | return setup_apicmaintimer(NULL); |
1156 | } | 1157 | } |
1157 | __setup("apicpmtimer", setup_apicpmtimer); | 1158 | __setup("apicpmtimer", setup_apicpmtimer); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index b150c87a08c6..7c10e9009d61 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -554,6 +554,7 @@ iret_label: | |||
554 | /* running with kernel gs */ | 554 | /* running with kernel gs */ |
555 | bad_iret: | 555 | bad_iret: |
556 | movq $-9999,%rdi /* better code? */ | 556 | movq $-9999,%rdi /* better code? */ |
557 | sti | ||
557 | jmp do_exit | 558 | jmp do_exit |
558 | .previous | 559 | .previous |
559 | 560 | ||
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 692c737feddb..02fc7fa0ea28 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -213,6 +213,11 @@ ENTRY(early_idt_handler) | |||
213 | cmpl $2,early_recursion_flag(%rip) | 213 | cmpl $2,early_recursion_flag(%rip) |
214 | jz 1f | 214 | jz 1f |
215 | call dump_stack | 215 | call dump_stack |
216 | #ifdef CONFIG_KALLSYMS | ||
217 | leaq early_idt_ripmsg(%rip),%rdi | ||
218 | movq 8(%rsp),%rsi # get rip again | ||
219 | call __print_symbol | ||
220 | #endif | ||
216 | 1: hlt | 221 | 1: hlt |
217 | jmp 1b | 222 | jmp 1b |
218 | early_recursion_flag: | 223 | early_recursion_flag: |
@@ -220,6 +225,8 @@ early_recursion_flag: | |||
220 | 225 | ||
221 | early_idt_msg: | 226 | early_idt_msg: |
222 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" | 227 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" |
228 | early_idt_ripmsg: | ||
229 | .asciz "RIP %s\n" | ||
223 | 230 | ||
224 | .code32 | 231 | .code32 |
225 | ENTRY(no_long_mode) | 232 | ENTRY(no_long_mode) |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 4282d72b2a26..2585c1d92b26 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include <linux/mc146818rtc.h> | 30 | #include <linux/mc146818rtc.h> |
31 | #include <linux/acpi.h> | 31 | #include <linux/acpi.h> |
32 | #include <linux/sysdev.h> | 32 | #include <linux/sysdev.h> |
33 | #ifdef CONFIG_ACPI | ||
34 | #include <acpi/acpi_bus.h> | ||
35 | #endif | ||
33 | 36 | ||
34 | #include <asm/io.h> | 37 | #include <asm/io.h> |
35 | #include <asm/smp.h> | 38 | #include <asm/smp.h> |
@@ -260,6 +263,8 @@ __setup("apic", enable_ioapic_setup); | |||
260 | 263 | ||
261 | And another hack to disable the IOMMU on VIA chipsets. | 264 | And another hack to disable the IOMMU on VIA chipsets. |
262 | 265 | ||
266 | ... and others. Really should move this somewhere else. | ||
267 | |||
263 | Kludge-O-Rama. */ | 268 | Kludge-O-Rama. */ |
264 | void __init check_ioapic(void) | 269 | void __init check_ioapic(void) |
265 | { | 270 | { |
@@ -307,6 +312,17 @@ void __init check_ioapic(void) | |||
307 | case PCI_VENDOR_ID_ATI: | 312 | case PCI_VENDOR_ID_ATI: |
308 | if (apic_runs_main_timer != 0) | 313 | if (apic_runs_main_timer != 0) |
309 | break; | 314 | break; |
315 | #ifdef CONFIG_ACPI | ||
316 | /* Don't do this for laptops right | ||
317 | right now because their timer | ||
318 | doesn't necessarily tick in C2/3 */ | ||
319 | if (acpi_fadt.revision >= 3 && | ||
320 | (acpi_fadt.plvl2_lat + acpi_fadt.plvl3_lat) < 1100) { | ||
321 | printk(KERN_INFO | ||
322 | "ATI board detected, but seems to be a laptop. Timer might be shakey, sorry\n"); | ||
323 | break; | ||
324 | } | ||
325 | #endif | ||
310 | printk(KERN_INFO | 326 | printk(KERN_INFO |
311 | "ATI board detected. Using APIC/PM timer.\n"); | 327 | "ATI board detected. Using APIC/PM timer.\n"); |
312 | apic_runs_main_timer = 1; | 328 | apic_runs_main_timer = 1; |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 8be407a1f62d..5bf17e41cd2d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void) | |||
236 | { | 236 | { |
237 | if (nmi_active < 0) { | 237 | if (nmi_active < 0) { |
238 | nmi_watchdog = NMI_LOCAL_APIC; | 238 | nmi_watchdog = NMI_LOCAL_APIC; |
239 | touch_nmi_watchdog(); | ||
239 | setup_apic_nmi_watchdog(); | 240 | setup_apic_nmi_watchdog(); |
240 | } | 241 | } |
241 | } | 242 | } |
@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch); | |||
456 | 457 | ||
457 | void touch_nmi_watchdog (void) | 458 | void touch_nmi_watchdog (void) |
458 | { | 459 | { |
459 | int i; | 460 | if (nmi_watchdog > 0) { |
461 | unsigned cpu; | ||
460 | 462 | ||
461 | /* | 463 | /* |
462 | * Tell other CPUs to reset their alert counters. We cannot | 464 | * Tell other CPUs to reset their alert counters. We cannot |
463 | * do it ourselves because the alert count increase is not | 465 | * do it ourselves because the alert count increase is not |
464 | * atomic. | 466 | * atomic. |
465 | */ | 467 | */ |
466 | for (i = 0; i < NR_CPUS; i++) | 468 | for_each_present_cpu (cpu) |
467 | per_cpu(nmi_touch, i) = 1; | 469 | per_cpu(nmi_touch, cpu) = 1; |
470 | } | ||
468 | 471 | ||
469 | touch_softlockup_watchdog(); | 472 | touch_softlockup_watchdog(); |
470 | } | 473 | } |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2fe23a6c361b..dd0718dc178b 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -310,7 +310,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di | |||
310 | 310 | ||
311 | for (i = 0; i < nents; i++) { | 311 | for (i = 0; i < nents; i++) { |
312 | struct scatterlist *s = &sg[i]; | 312 | struct scatterlist *s = &sg[i]; |
313 | if (!s->dma_length || !s->length) | 313 | if (!s->dma_length) |
314 | break; | 314 | break; |
315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); | 315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); |
316 | } | 316 | } |
@@ -364,7 +364,6 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
364 | 364 | ||
365 | BUG_ON(i > start && s->offset); | 365 | BUG_ON(i > start && s->offset); |
366 | if (i == start) { | 366 | if (i == start) { |
367 | *sout = *s; | ||
368 | sout->dma_address = iommu_bus_base; | 367 | sout->dma_address = iommu_bus_base; |
369 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; | 368 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; |
370 | sout->dma_length = s->length; | 369 | sout->dma_length = s->length; |
@@ -379,7 +378,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
379 | SET_LEAK(iommu_page); | 378 | SET_LEAK(iommu_page); |
380 | addr += PAGE_SIZE; | 379 | addr += PAGE_SIZE; |
381 | iommu_page++; | 380 | iommu_page++; |
382 | } | 381 | } |
383 | } | 382 | } |
384 | BUG_ON(iommu_page - iommu_start != pages); | 383 | BUG_ON(iommu_page - iommu_start != pages); |
385 | return 0; | 384 | return 0; |
@@ -391,7 +390,6 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
391 | { | 390 | { |
392 | if (!need) { | 391 | if (!need) { |
393 | BUG_ON(stopat - start != 1); | 392 | BUG_ON(stopat - start != 1); |
394 | *sout = sg[start]; | ||
395 | sout->dma_length = sg[start].length; | 393 | sout->dma_length = sg[start].length; |
396 | return 0; | 394 | return 0; |
397 | } | 395 | } |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index dba7237be5c1..67841d11ed1f 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -59,7 +59,7 @@ static int notsc __initdata = 0; | |||
59 | unsigned int cpu_khz; /* TSC clocks / usec, not used here */ | 59 | unsigned int cpu_khz; /* TSC clocks / usec, not used here */ |
60 | static unsigned long hpet_period; /* fsecs / HPET clock */ | 60 | static unsigned long hpet_period; /* fsecs / HPET clock */ |
61 | unsigned long hpet_tick; /* HPET clocks / interrupt */ | 61 | unsigned long hpet_tick; /* HPET clocks / interrupt */ |
62 | static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ | 62 | int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ |
63 | unsigned long vxtime_hz = PIT_TICK_RATE; | 63 | unsigned long vxtime_hz = PIT_TICK_RATE; |
64 | int report_lost_ticks; /* command line option */ | 64 | int report_lost_ticks; /* command line option */ |
65 | unsigned long long monotonic_base; | 65 | unsigned long long monotonic_base; |
@@ -326,7 +326,10 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) | |||
326 | print_symbol("rip %s\n", regs->rip); | 326 | print_symbol("rip %s\n", regs->rip); |
327 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { | 327 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { |
328 | printk(KERN_WARNING "Falling back to HPET\n"); | 328 | printk(KERN_WARNING "Falling back to HPET\n"); |
329 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | 329 | if (hpet_use_timer) |
330 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
331 | else | ||
332 | vxtime.last = hpet_readl(HPET_COUNTER); | ||
330 | vxtime.mode = VXTIME_HPET; | 333 | vxtime.mode = VXTIME_HPET; |
331 | do_gettimeoffset = do_gettimeoffset_hpet; | 334 | do_gettimeoffset = do_gettimeoffset_hpet; |
332 | } | 335 | } |
@@ -988,7 +991,10 @@ void __init time_init_gtod(void) | |||
988 | notsc = 1; | 991 | notsc = 1; |
989 | if (vxtime.hpet_address && notsc) { | 992 | if (vxtime.hpet_address && notsc) { |
990 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; | 993 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; |
991 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | 994 | if (hpet_use_timer) |
995 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
996 | else | ||
997 | vxtime.last = hpet_readl(HPET_COUNTER); | ||
992 | vxtime.mode = VXTIME_HPET; | 998 | vxtime.mode = VXTIME_HPET; |
993 | do_gettimeoffset = do_gettimeoffset_hpet; | 999 | do_gettimeoffset = do_gettimeoffset_hpet; |
994 | #ifdef CONFIG_X86_PM_TIMER | 1000 | #ifdef CONFIG_X86_PM_TIMER |
@@ -1321,8 +1327,7 @@ static int __init nohpet_setup(char *s) | |||
1321 | 1327 | ||
1322 | __setup("nohpet", nohpet_setup); | 1328 | __setup("nohpet", nohpet_setup); |
1323 | 1329 | ||
1324 | 1330 | int __init notsc_setup(char *s) | |
1325 | static int __init notsc_setup(char *s) | ||
1326 | { | 1331 | { |
1327 | notsc = 1; | 1332 | notsc = 1; |
1328 | return 0; | 1333 | return 0; |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index ee1b2da9e5e7..28d50dc540e8 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -90,6 +90,20 @@ static inline void conditional_sti(struct pt_regs *regs) | |||
90 | local_irq_enable(); | 90 | local_irq_enable(); |
91 | } | 91 | } |
92 | 92 | ||
93 | static inline void preempt_conditional_sti(struct pt_regs *regs) | ||
94 | { | ||
95 | preempt_disable(); | ||
96 | if (regs->eflags & X86_EFLAGS_IF) | ||
97 | local_irq_enable(); | ||
98 | } | ||
99 | |||
100 | static inline void preempt_conditional_cli(struct pt_regs *regs) | ||
101 | { | ||
102 | if (regs->eflags & X86_EFLAGS_IF) | ||
103 | local_irq_disable(); | ||
104 | preempt_enable_no_resched(); | ||
105 | } | ||
106 | |||
93 | static int kstack_depth_to_print = 10; | 107 | static int kstack_depth_to_print = 10; |
94 | 108 | ||
95 | #ifdef CONFIG_KALLSYMS | 109 | #ifdef CONFIG_KALLSYMS |
@@ -693,7 +707,7 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, | |||
693 | SIGTRAP) == NOTIFY_STOP) | 707 | SIGTRAP) == NOTIFY_STOP) |
694 | return; | 708 | return; |
695 | 709 | ||
696 | conditional_sti(regs); | 710 | preempt_conditional_sti(regs); |
697 | 711 | ||
698 | /* Mask out spurious debug traps due to lazy DR7 setting */ | 712 | /* Mask out spurious debug traps due to lazy DR7 setting */ |
699 | if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) { | 713 | if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) { |
@@ -738,11 +752,13 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, | |||
738 | 752 | ||
739 | clear_dr7: | 753 | clear_dr7: |
740 | set_debugreg(0UL, 7); | 754 | set_debugreg(0UL, 7); |
755 | preempt_conditional_cli(regs); | ||
741 | return; | 756 | return; |
742 | 757 | ||
743 | clear_TF_reenable: | 758 | clear_TF_reenable: |
744 | set_tsk_thread_flag(tsk, TIF_SINGLESTEP); | 759 | set_tsk_thread_flag(tsk, TIF_SINGLESTEP); |
745 | regs->eflags &= ~TF_MASK; | 760 | regs->eflags &= ~TF_MASK; |
761 | preempt_conditional_cli(regs); | ||
746 | } | 762 | } |
747 | 763 | ||
748 | static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) | 764 | static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) |
diff --git a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c index a5663e0bb01c..dd60e71fdba6 100644 --- a/arch/x86_64/mm/k8topology.c +++ b/arch/x86_64/mm/k8topology.c | |||
@@ -155,7 +155,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
155 | if (!found) | 155 | if (!found) |
156 | return -1; | 156 | return -1; |
157 | 157 | ||
158 | memnode_shift = compute_hash_shift(nodes, numnodes); | 158 | memnode_shift = compute_hash_shift(nodes, 8); |
159 | if (memnode_shift < 0) { | 159 | if (memnode_shift < 0) { |
160 | printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); | 160 | printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); |
161 | return -1; | 161 | return -1; |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 6ef9f9a76235..22e51beee8d3 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -351,7 +351,7 @@ void __init init_cpu_to_node(void) | |||
351 | continue; | 351 | continue; |
352 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 352 | if (apicid_to_node[apicid] == NUMA_NO_NODE) |
353 | continue; | 353 | continue; |
354 | cpu_to_node[i] = apicid_to_node[apicid]; | 354 | numa_set_node(i,apicid_to_node[apicid]); |
355 | } | 355 | } |
356 | } | 356 | } |
357 | 357 | ||
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index cd25300726fc..482c25767369 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -228,7 +228,8 @@ static int nodes_cover_memory(void) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | e820ram = end_pfn - e820_hole_size(0, end_pfn); | 230 | e820ram = end_pfn - e820_hole_size(0, end_pfn); |
231 | if (pxmram < e820ram) { | 231 | /* We seem to lose 3 pages somewhere. Allow a bit of slack. */ |
232 | if ((long)(e820ram - pxmram) >= 1*1024*1024) { | ||
232 | printk(KERN_ERR | 233 | printk(KERN_ERR |
233 | "SRAT: PXMs only cover %luMB of your %luMB e820 RAM. Not used.\n", | 234 | "SRAT: PXMs only cover %luMB of your %luMB e820 RAM. Not used.\n", |
234 | (pxmram << PAGE_SHIFT) >> 20, | 235 | (pxmram << PAGE_SHIFT) >> 20, |
@@ -270,7 +271,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
270 | return -1; | 271 | return -1; |
271 | } | 272 | } |
272 | 273 | ||
273 | memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed)); | 274 | memnode_shift = compute_hash_shift(nodes, MAX_NUMNODES); |
274 | if (memnode_shift < 0) { | 275 | if (memnode_shift < 0) { |
275 | printk(KERN_ERR | 276 | printk(KERN_ERR |
276 | "SRAT: No NUMA node hash function found. Contact maintainer\n"); | 277 | "SRAT: No NUMA node hash function found. Contact maintainer\n"); |