diff options
Diffstat (limited to 'arch')
145 files changed, 891 insertions, 1132 deletions
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 4b873527ce1c..02c2db08114a 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -73,9 +73,6 @@ cpumask_t cpu_online_map; | |||
73 | 73 | ||
74 | EXPORT_SYMBOL(cpu_online_map); | 74 | EXPORT_SYMBOL(cpu_online_map); |
75 | 75 | ||
76 | /* cpus reported in the hwrpb */ | ||
77 | static unsigned long hwrpb_cpu_present_mask __initdata = 0; | ||
78 | |||
79 | int smp_num_probed; /* Internal processor count */ | 76 | int smp_num_probed; /* Internal processor count */ |
80 | int smp_num_cpus = 1; /* Number that came online. */ | 77 | int smp_num_cpus = 1; /* Number that came online. */ |
81 | 78 | ||
@@ -442,7 +439,7 @@ setup_smp(void) | |||
442 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 439 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
443 | smp_num_probed++; | 440 | smp_num_probed++; |
444 | /* Assume here that "whami" == index */ | 441 | /* Assume here that "whami" == index */ |
445 | hwrpb_cpu_present_mask |= (1UL << i); | 442 | cpu_set(i, cpu_possible_map); |
446 | cpu->pal_revision = boot_cpu_palrev; | 443 | cpu->pal_revision = boot_cpu_palrev; |
447 | } | 444 | } |
448 | 445 | ||
@@ -453,12 +450,12 @@ setup_smp(void) | |||
453 | } | 450 | } |
454 | } else { | 451 | } else { |
455 | smp_num_probed = 1; | 452 | smp_num_probed = 1; |
456 | hwrpb_cpu_present_mask = (1UL << boot_cpuid); | 453 | cpu_set(boot_cpuid, cpu_possible_map); |
457 | } | 454 | } |
458 | cpu_present_mask = cpumask_of_cpu(boot_cpuid); | 455 | cpu_present_mask = cpumask_of_cpu(boot_cpuid); |
459 | 456 | ||
460 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", | 457 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", |
461 | smp_num_probed, hwrpb_cpu_present_mask); | 458 | smp_num_probed, cpu_possible_map.bits[0]); |
462 | } | 459 | } |
463 | 460 | ||
464 | /* | 461 | /* |
@@ -467,8 +464,6 @@ setup_smp(void) | |||
467 | void __init | 464 | void __init |
468 | smp_prepare_cpus(unsigned int max_cpus) | 465 | smp_prepare_cpus(unsigned int max_cpus) |
469 | { | 466 | { |
470 | int cpu_count, i; | ||
471 | |||
472 | /* Take care of some initial bookkeeping. */ | 467 | /* Take care of some initial bookkeeping. */ |
473 | memset(ipi_data, 0, sizeof(ipi_data)); | 468 | memset(ipi_data, 0, sizeof(ipi_data)); |
474 | 469 | ||
@@ -486,19 +481,7 @@ smp_prepare_cpus(unsigned int max_cpus) | |||
486 | 481 | ||
487 | printk(KERN_INFO "SMP starting up secondaries.\n"); | 482 | printk(KERN_INFO "SMP starting up secondaries.\n"); |
488 | 483 | ||
489 | cpu_count = 1; | 484 | smp_num_cpus = smp_num_probed; |
490 | for (i = 0; (i < NR_CPUS) && (cpu_count < max_cpus); i++) { | ||
491 | if (i == boot_cpuid) | ||
492 | continue; | ||
493 | |||
494 | if (((hwrpb_cpu_present_mask >> i) & 1) == 0) | ||
495 | continue; | ||
496 | |||
497 | cpu_set(i, cpu_possible_map); | ||
498 | cpu_count++; | ||
499 | } | ||
500 | |||
501 | smp_num_cpus = cpu_count; | ||
502 | } | 485 | } |
503 | 486 | ||
504 | void __devinit | 487 | void __devinit |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5959e36c3b4c..15dc1a0dffbb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -10,9 +10,9 @@ config ARM | |||
10 | default y | 10 | default y |
11 | help | 11 | help |
12 | The ARM series is a line of low-power-consumption RISC chip designs | 12 | The ARM series is a line of low-power-consumption RISC chip designs |
13 | licensed by ARM ltd and targeted at embedded applications and | 13 | licensed by ARM Ltd and targeted at embedded applications and |
14 | handhelds such as the Compaq IPAQ. ARM-based PCs are no longer | 14 | handhelds such as the Compaq IPAQ. ARM-based PCs are no longer |
15 | manufactured, but legacy ARM-based PC hardware remains popular in | 15 | manufactured, but legacy ARM-based PC hardware remains popular in |
16 | Europe. There is an ARM Linux project with a web page at | 16 | Europe. There is an ARM Linux project with a web page at |
17 | <http://www.arm.linux.org.uk/>. | 17 | <http://www.arm.linux.org.uk/>. |
18 | 18 | ||
@@ -69,6 +69,9 @@ config GENERIC_ISA_DMA | |||
69 | config FIQ | 69 | config FIQ |
70 | bool | 70 | bool |
71 | 71 | ||
72 | config ARCH_MTD_XIP | ||
73 | bool | ||
74 | |||
72 | source "init/Kconfig" | 75 | source "init/Kconfig" |
73 | 76 | ||
74 | menu "System Type" | 77 | menu "System Type" |
@@ -81,45 +84,62 @@ config ARCH_CLPS7500 | |||
81 | bool "Cirrus-CL-PS7500FE" | 84 | bool "Cirrus-CL-PS7500FE" |
82 | select TIMER_ACORN | 85 | select TIMER_ACORN |
83 | select ISA | 86 | select ISA |
87 | help | ||
88 | Support for the Cirrus Logic PS7500FE system-on-a-chip. | ||
84 | 89 | ||
85 | config ARCH_CLPS711X | 90 | config ARCH_CLPS711X |
86 | bool "CLPS711x/EP721x-based" | 91 | bool "CLPS711x/EP721x-based" |
92 | help | ||
93 | Support for Cirrus Logic 711x/721x based boards. | ||
87 | 94 | ||
88 | config ARCH_CO285 | 95 | config ARCH_CO285 |
89 | bool "Co-EBSA285" | 96 | bool "Co-EBSA285" |
90 | select FOOTBRIDGE | 97 | select FOOTBRIDGE |
91 | select FOOTBRIDGE_ADDIN | 98 | select FOOTBRIDGE_ADDIN |
99 | help | ||
100 | Support for Intel's EBSA285 companion chip. | ||
92 | 101 | ||
93 | config ARCH_EBSA110 | 102 | config ARCH_EBSA110 |
94 | bool "EBSA-110" | 103 | bool "EBSA-110" |
95 | select ISA | 104 | select ISA |
96 | help | 105 | help |
97 | This is an evaluation board for the StrongARM processor available | 106 | This is an evaluation board for the StrongARM processor available |
98 | from Digital. It has limited hardware on-board, including an onboard | 107 | from Digital. It has limited hardware on-board, including an |
99 | Ethernet interface, two PCMCIA sockets, two serial ports and a | 108 | Ethernet interface, two PCMCIA sockets, two serial ports and a |
100 | parallel port. | 109 | parallel port. |
101 | 110 | ||
102 | config ARCH_FOOTBRIDGE | 111 | config ARCH_FOOTBRIDGE |
103 | bool "FootBridge" | 112 | bool "FootBridge" |
104 | select FOOTBRIDGE | 113 | select FOOTBRIDGE |
114 | help | ||
115 | Support for systems based on the DC21285 companion chip | ||
116 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | ||
105 | 117 | ||
106 | config ARCH_INTEGRATOR | 118 | config ARCH_INTEGRATOR |
107 | bool "Integrator" | 119 | bool "Integrator" |
108 | select ARM_AMBA | 120 | select ARM_AMBA |
109 | select ICST525 | 121 | select ICST525 |
122 | help | ||
123 | Support for ARM's Integrator platform. | ||
110 | 124 | ||
111 | config ARCH_IOP3XX | 125 | config ARCH_IOP3XX |
112 | bool "IOP3xx-based" | 126 | bool "IOP3xx-based" |
113 | select PCI | 127 | select PCI |
128 | help | ||
129 | Support for Intel's IOP3XX (XScale) family of processors. | ||
114 | 130 | ||
115 | config ARCH_IXP4XX | 131 | config ARCH_IXP4XX |
116 | bool "IXP4xx-based" | 132 | bool "IXP4xx-based" |
117 | select DMABOUNCE | 133 | select DMABOUNCE |
118 | select PCI | 134 | select PCI |
135 | help | ||
136 | Support for Intel's IXP4XX (XScale) family of processors. | ||
119 | 137 | ||
120 | config ARCH_IXP2000 | 138 | config ARCH_IXP2000 |
121 | bool "IXP2400/2800-based" | 139 | bool "IXP2400/2800-based" |
122 | select PCI | 140 | select PCI |
141 | help | ||
142 | Support for Intel's IXP2400/2800 (XScale) family of processors. | ||
123 | 143 | ||
124 | config ARCH_L7200 | 144 | config ARCH_L7200 |
125 | bool "LinkUp-L7200" | 145 | bool "LinkUp-L7200" |
@@ -136,6 +156,9 @@ config ARCH_L7200 | |||
136 | 156 | ||
137 | config ARCH_PXA | 157 | config ARCH_PXA |
138 | bool "PXA2xx-based" | 158 | bool "PXA2xx-based" |
159 | select ARCH_MTD_XIP | ||
160 | help | ||
161 | Support for Intel's PXA2XX processor line. | ||
139 | 162 | ||
140 | config ARCH_RPC | 163 | config ARCH_RPC |
141 | bool "RiscPC" | 164 | bool "RiscPC" |
@@ -152,19 +175,25 @@ config ARCH_SA1100 | |||
152 | bool "SA1100-based" | 175 | bool "SA1100-based" |
153 | select ISA | 176 | select ISA |
154 | select ARCH_DISCONTIGMEM_ENABLE | 177 | select ARCH_DISCONTIGMEM_ENABLE |
178 | select ARCH_MTD_XIP | ||
179 | help | ||
180 | Support for StrongARM 11x0 based boards. | ||
155 | 181 | ||
156 | config ARCH_S3C2410 | 182 | config ARCH_S3C2410 |
157 | bool "Samsung S3C2410" | 183 | bool "Samsung S3C2410" |
158 | help | 184 | help |
159 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics | 185 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics |
160 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 186 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
161 | the Samsung SMDK2410 development board (and derviatives). | 187 | the Samsung SMDK2410 development board (and derivatives). |
162 | 188 | ||
163 | config ARCH_SHARK | 189 | config ARCH_SHARK |
164 | bool "Shark" | 190 | bool "Shark" |
165 | select ISA | 191 | select ISA |
166 | select ISA_DMA | 192 | select ISA_DMA |
167 | select PCI | 193 | select PCI |
194 | help | ||
195 | Support for the StrongARM based Digital DNARD machine, also known | ||
196 | as "Shark" (<http://www.shark-linux.de/shark.html>). | ||
168 | 197 | ||
169 | config ARCH_LH7A40X | 198 | config ARCH_LH7A40X |
170 | bool "Sharp LH7A40X" | 199 | bool "Sharp LH7A40X" |
@@ -176,6 +205,8 @@ config ARCH_LH7A40X | |||
176 | 205 | ||
177 | config ARCH_OMAP | 206 | config ARCH_OMAP |
178 | bool "TI OMAP" | 207 | bool "TI OMAP" |
208 | help | ||
209 | Support for TI's OMAP platform (OMAP1 and OMAP2). | ||
179 | 210 | ||
180 | config ARCH_VERSATILE | 211 | config ARCH_VERSATILE |
181 | bool "Versatile" | 212 | bool "Versatile" |
@@ -194,6 +225,8 @@ config ARCH_REALVIEW | |||
194 | 225 | ||
195 | config ARCH_IMX | 226 | config ARCH_IMX |
196 | bool "IMX" | 227 | bool "IMX" |
228 | help | ||
229 | Support for Motorola's i.MX family of processors (MX1, MXL). | ||
197 | 230 | ||
198 | config ARCH_H720X | 231 | config ARCH_H720X |
199 | bool "Hynix-HMS720x-based" | 232 | bool "Hynix-HMS720x-based" |
@@ -210,8 +243,8 @@ config ARCH_AAEC2000 | |||
210 | config ARCH_AT91RM9200 | 243 | config ARCH_AT91RM9200 |
211 | bool "AT91RM9200" | 244 | bool "AT91RM9200" |
212 | help | 245 | help |
213 | Say Y here if you intend to run this kernel on an AT91RM9200-based | 246 | Say Y here if you intend to run this kernel on an Atmel |
214 | board. | 247 | AT91RM9200-based board. |
215 | 248 | ||
216 | endchoice | 249 | endchoice |
217 | 250 | ||
@@ -417,8 +450,8 @@ config AEABI | |||
417 | To use this you need GCC version 4.0.0 or later. | 450 | To use this you need GCC version 4.0.0 or later. |
418 | 451 | ||
419 | config OABI_COMPAT | 452 | config OABI_COMPAT |
420 | bool "Allow old ABI binaries to run with this kernel" | 453 | bool "Allow old ABI binaries to run with this kernel (EXPERIMENTAL)" |
421 | depends on AEABI | 454 | depends on AEABI && EXPERIMENTAL |
422 | default y | 455 | default y |
423 | help | 456 | help |
424 | This option preserves the old syscall interface along with the | 457 | This option preserves the old syscall interface along with the |
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig index 9592e3925c79..5fdaf3ce9d56 100644 --- a/arch/arm/configs/enp2611_defconfig +++ b/arch/arm/configs/enp2611_defconfig | |||
@@ -171,7 +171,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
171 | # | 171 | # |
172 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 172 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
173 | CONFIG_ZBOOT_ROM_BSS=0x0 | 173 | CONFIG_ZBOOT_ROM_BSS=0x0 |
174 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" | 174 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" |
175 | # CONFIG_XIP_KERNEL is not set | 175 | # CONFIG_XIP_KERNEL is not set |
176 | 176 | ||
177 | # | 177 | # |
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig index d9d6bb86a6fa..c67fc449a11f 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixdp2400_defconfig | |||
@@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
172 | # | 172 | # |
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 173 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | 174 | CONFIG_ZBOOT_ROM_BSS=0x0 |
175 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" | 175 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" |
176 | # CONFIG_XIP_KERNEL is not set | 176 | # CONFIG_XIP_KERNEL is not set |
177 | 177 | ||
178 | # | 178 | # |
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig index 2dc9d499c7d7..60d66e82c51f 100644 --- a/arch/arm/configs/ixdp2401_defconfig +++ b/arch/arm/configs/ixdp2401_defconfig | |||
@@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
172 | # | 172 | # |
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 173 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | 174 | CONFIG_ZBOOT_ROM_BSS=0x0 |
175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" | 175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0" |
176 | # CONFIG_XIP_KERNEL is not set | 176 | # CONFIG_XIP_KERNEL is not set |
177 | 177 | ||
178 | # | 178 | # |
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig index ea8f4b478fa3..f54f3dcc5b33 100644 --- a/arch/arm/configs/ixdp2801_defconfig +++ b/arch/arm/configs/ixdp2801_defconfig | |||
@@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
172 | # | 172 | # |
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 173 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | 174 | CONFIG_ZBOOT_ROM_BSS=0x0 |
175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware ixdp2x01_clock=50000000" | 175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0" |
176 | # CONFIG_XIP_KERNEL is not set | 176 | # CONFIG_XIP_KERNEL is not set |
177 | 177 | ||
178 | # | 178 | # |
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index 1964ccd8a71f..6695b07cf1ba 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc1 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Sun Nov 13 17:41:24 2005 | 4 | # Mon Feb 6 11:17:23 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
11 | 10 | ||
@@ -28,27 +27,31 @@ CONFIG_SYSVIPC=y | |||
28 | # CONFIG_BSD_PROCESS_ACCT is not set | 27 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | CONFIG_SYSCTL=y | 28 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 29 | # CONFIG_AUDIT is not set |
31 | # CONFIG_HOTPLUG is not set | ||
32 | CONFIG_KOBJECT_UEVENT=y | ||
33 | # CONFIG_IKCONFIG is not set | 30 | # CONFIG_IKCONFIG is not set |
34 | CONFIG_INITRAMFS_SOURCE="" | 31 | CONFIG_INITRAMFS_SOURCE="" |
32 | CONFIG_UID16=y | ||
33 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
35 | # CONFIG_EMBEDDED is not set | 34 | # CONFIG_EMBEDDED is not set |
36 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
37 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_HOTPLUG=y | ||
39 | CONFIG_PRINTK=y | 39 | CONFIG_PRINTK=y |
40 | CONFIG_BUG=y | 40 | CONFIG_BUG=y |
41 | CONFIG_ELF_CORE=y | ||
41 | CONFIG_BASE_FULL=y | 42 | CONFIG_BASE_FULL=y |
42 | CONFIG_FUTEX=y | 43 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 44 | CONFIG_EPOLL=y |
44 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
45 | CONFIG_SHMEM=y | 45 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 46 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
47 | CONFIG_CC_ALIGN_LABELS=0 | 47 | CONFIG_CC_ALIGN_LABELS=0 |
48 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
49 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | CONFIG_SLAB=y | ||
50 | # CONFIG_TINY_SHMEM is not set | 51 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | 52 | CONFIG_BASE_SMALL=0 |
53 | # CONFIG_SLOB is not set | ||
54 | CONFIG_OBSOLETE_INTERMODULE=y | ||
52 | 55 | ||
53 | # | 56 | # |
54 | # Loadable module support | 57 | # Loadable module support |
@@ -102,6 +105,7 @@ CONFIG_ARCH_S3C2410=y | |||
102 | # CONFIG_ARCH_IMX is not set | 105 | # CONFIG_ARCH_IMX is not set |
103 | # CONFIG_ARCH_H720X is not set | 106 | # CONFIG_ARCH_H720X is not set |
104 | # CONFIG_ARCH_AAEC2000 is not set | 107 | # CONFIG_ARCH_AAEC2000 is not set |
108 | # CONFIG_ARCH_AT91RM9200 is not set | ||
105 | 109 | ||
106 | # | 110 | # |
107 | # S3C24XX Implementations | 111 | # S3C24XX Implementations |
@@ -160,7 +164,6 @@ CONFIG_CPU_TLB_V4WBI=y | |||
160 | # Bus support | 164 | # Bus support |
161 | # | 165 | # |
162 | CONFIG_ISA=y | 166 | CONFIG_ISA=y |
163 | CONFIG_ISA_DMA_API=y | ||
164 | 167 | ||
165 | # | 168 | # |
166 | # PCCARD (PCMCIA/CardBus) support | 169 | # PCCARD (PCMCIA/CardBus) support |
@@ -172,6 +175,7 @@ CONFIG_ISA_DMA_API=y | |||
172 | # | 175 | # |
173 | # CONFIG_PREEMPT is not set | 176 | # CONFIG_PREEMPT is not set |
174 | # CONFIG_NO_IDLE_HZ is not set | 177 | # CONFIG_NO_IDLE_HZ is not set |
178 | # CONFIG_AEABI is not set | ||
175 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 179 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
176 | CONFIG_SELECT_MEMORY_MODEL=y | 180 | CONFIG_SELECT_MEMORY_MODEL=y |
177 | CONFIG_FLATMEM_MANUAL=y | 181 | CONFIG_FLATMEM_MANUAL=y |
@@ -214,6 +218,8 @@ CONFIG_BINFMT_AOUT=y | |||
214 | # Power management options | 218 | # Power management options |
215 | # | 219 | # |
216 | CONFIG_PM=y | 220 | CONFIG_PM=y |
221 | CONFIG_PM_LEGACY=y | ||
222 | # CONFIG_PM_DEBUG is not set | ||
217 | CONFIG_APM=y | 223 | CONFIG_APM=y |
218 | 224 | ||
219 | # | 225 | # |
@@ -259,6 +265,11 @@ CONFIG_TCP_CONG_BIC=y | |||
259 | # SCTP Configuration (EXPERIMENTAL) | 265 | # SCTP Configuration (EXPERIMENTAL) |
260 | # | 266 | # |
261 | # CONFIG_IP_SCTP is not set | 267 | # CONFIG_IP_SCTP is not set |
268 | |||
269 | # | ||
270 | # TIPC Configuration (EXPERIMENTAL) | ||
271 | # | ||
272 | # CONFIG_TIPC is not set | ||
262 | # CONFIG_ATM is not set | 273 | # CONFIG_ATM is not set |
263 | # CONFIG_BRIDGE is not set | 274 | # CONFIG_BRIDGE is not set |
264 | # CONFIG_VLAN_8021Q is not set | 275 | # CONFIG_VLAN_8021Q is not set |
@@ -276,7 +287,6 @@ CONFIG_TCP_CONG_BIC=y | |||
276 | # QoS and/or fair queueing | 287 | # QoS and/or fair queueing |
277 | # | 288 | # |
278 | # CONFIG_NET_SCHED is not set | 289 | # CONFIG_NET_SCHED is not set |
279 | # CONFIG_NET_CLS_ROUTE is not set | ||
280 | 290 | ||
281 | # | 291 | # |
282 | # Network testing | 292 | # Network testing |
@@ -300,6 +310,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
300 | # CONFIG_DEBUG_DRIVER is not set | 310 | # CONFIG_DEBUG_DRIVER is not set |
301 | 311 | ||
302 | # | 312 | # |
313 | # Connector - unified userspace <-> kernelspace linker | ||
314 | # | ||
315 | # CONFIG_CONNECTOR is not set | ||
316 | |||
317 | # | ||
303 | # Memory Technology Devices (MTD) | 318 | # Memory Technology Devices (MTD) |
304 | # | 319 | # |
305 | CONFIG_MTD=y | 320 | CONFIG_MTD=y |
@@ -412,8 +427,6 @@ CONFIG_PARPORT_1284=y | |||
412 | # | 427 | # |
413 | # Block devices | 428 | # Block devices |
414 | # | 429 | # |
415 | # CONFIG_BLK_DEV_XD is not set | ||
416 | # CONFIG_PARIDE is not set | ||
417 | # CONFIG_BLK_DEV_COW_COMMON is not set | 430 | # CONFIG_BLK_DEV_COW_COMMON is not set |
418 | CONFIG_BLK_DEV_LOOP=y | 431 | CONFIG_BLK_DEV_LOOP=y |
419 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 432 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -502,7 +515,6 @@ CONFIG_NETDEVICES=y | |||
502 | CONFIG_NET_ETHERNET=y | 515 | CONFIG_NET_ETHERNET=y |
503 | CONFIG_MII=y | 516 | CONFIG_MII=y |
504 | # CONFIG_NET_VENDOR_3COM is not set | 517 | # CONFIG_NET_VENDOR_3COM is not set |
505 | # CONFIG_LANCE is not set | ||
506 | # CONFIG_NET_VENDOR_SMC is not set | 518 | # CONFIG_NET_VENDOR_SMC is not set |
507 | # CONFIG_SMC91X is not set | 519 | # CONFIG_SMC91X is not set |
508 | CONFIG_DM9000=y | 520 | CONFIG_DM9000=y |
@@ -607,11 +619,11 @@ CONFIG_SERIAL_NONSTANDARD=y | |||
607 | # CONFIG_ROCKETPORT is not set | 619 | # CONFIG_ROCKETPORT is not set |
608 | # CONFIG_CYCLADES is not set | 620 | # CONFIG_CYCLADES is not set |
609 | # CONFIG_DIGIEPCA is not set | 621 | # CONFIG_DIGIEPCA is not set |
610 | # CONFIG_ESPSERIAL is not set | ||
611 | # CONFIG_MOXA_INTELLIO is not set | 622 | # CONFIG_MOXA_INTELLIO is not set |
612 | # CONFIG_MOXA_SMARTIO is not set | 623 | # CONFIG_MOXA_SMARTIO is not set |
613 | # CONFIG_ISI is not set | 624 | # CONFIG_ISI is not set |
614 | # CONFIG_SYNCLINKMP is not set | 625 | # CONFIG_SYNCLINKMP is not set |
626 | # CONFIG_SYNCLINK_GT is not set | ||
615 | # CONFIG_N_HDLC is not set | 627 | # CONFIG_N_HDLC is not set |
616 | # CONFIG_RISCOM8 is not set | 628 | # CONFIG_RISCOM8 is not set |
617 | # CONFIG_SPECIALIX is not set | 629 | # CONFIG_SPECIALIX is not set |
@@ -625,6 +637,7 @@ CONFIG_SERIAL_NONSTANDARD=y | |||
625 | CONFIG_SERIAL_8250=y | 637 | CONFIG_SERIAL_8250=y |
626 | CONFIG_SERIAL_8250_CONSOLE=y | 638 | CONFIG_SERIAL_8250_CONSOLE=y |
627 | CONFIG_SERIAL_8250_NR_UARTS=8 | 639 | CONFIG_SERIAL_8250_NR_UARTS=8 |
640 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
628 | CONFIG_SERIAL_8250_EXTENDED=y | 641 | CONFIG_SERIAL_8250_EXTENDED=y |
629 | CONFIG_SERIAL_8250_MANY_PORTS=y | 642 | CONFIG_SERIAL_8250_MANY_PORTS=y |
630 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 643 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
@@ -687,6 +700,7 @@ CONFIG_S3C2410_RTC=y | |||
687 | # | 700 | # |
688 | # TPM devices | 701 | # TPM devices |
689 | # | 702 | # |
703 | # CONFIG_TCG_TPM is not set | ||
690 | # CONFIG_TELCLOCK is not set | 704 | # CONFIG_TELCLOCK is not set |
691 | 705 | ||
692 | # | 706 | # |
@@ -731,6 +745,12 @@ CONFIG_SENSORS_EEPROM=m | |||
731 | # CONFIG_I2C_DEBUG_CHIP is not set | 745 | # CONFIG_I2C_DEBUG_CHIP is not set |
732 | 746 | ||
733 | # | 747 | # |
748 | # SPI support | ||
749 | # | ||
750 | # CONFIG_SPI is not set | ||
751 | # CONFIG_SPI_MASTER is not set | ||
752 | |||
753 | # | ||
734 | # Hardware Monitoring support | 754 | # Hardware Monitoring support |
735 | # | 755 | # |
736 | CONFIG_HWMON=y | 756 | CONFIG_HWMON=y |
@@ -863,6 +883,7 @@ CONFIG_FS_MBCACHE=y | |||
863 | # CONFIG_JFS_FS is not set | 883 | # CONFIG_JFS_FS is not set |
864 | # CONFIG_FS_POSIX_ACL is not set | 884 | # CONFIG_FS_POSIX_ACL is not set |
865 | # CONFIG_XFS_FS is not set | 885 | # CONFIG_XFS_FS is not set |
886 | # CONFIG_OCFS2_FS is not set | ||
866 | # CONFIG_MINIX_FS is not set | 887 | # CONFIG_MINIX_FS is not set |
867 | CONFIG_ROMFS_FS=y | 888 | CONFIG_ROMFS_FS=y |
868 | CONFIG_INOTIFY=y | 889 | CONFIG_INOTIFY=y |
@@ -897,6 +918,7 @@ CONFIG_SYSFS=y | |||
897 | # CONFIG_HUGETLB_PAGE is not set | 918 | # CONFIG_HUGETLB_PAGE is not set |
898 | CONFIG_RAMFS=y | 919 | CONFIG_RAMFS=y |
899 | # CONFIG_RELAYFS_FS is not set | 920 | # CONFIG_RELAYFS_FS is not set |
921 | # CONFIG_CONFIGFS_FS is not set | ||
900 | 922 | ||
901 | # | 923 | # |
902 | # Miscellaneous filesystems | 924 | # Miscellaneous filesystems |
@@ -965,6 +987,7 @@ CONFIG_SOLARIS_X86_PARTITION=y | |||
965 | # CONFIG_SGI_PARTITION is not set | 987 | # CONFIG_SGI_PARTITION is not set |
966 | # CONFIG_ULTRIX_PARTITION is not set | 988 | # CONFIG_ULTRIX_PARTITION is not set |
967 | # CONFIG_SUN_PARTITION is not set | 989 | # CONFIG_SUN_PARTITION is not set |
990 | # CONFIG_KARMA_PARTITION is not set | ||
968 | # CONFIG_EFI_PARTITION is not set | 991 | # CONFIG_EFI_PARTITION is not set |
969 | 992 | ||
970 | # | 993 | # |
@@ -1020,12 +1043,13 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1020 | # Kernel hacking | 1043 | # Kernel hacking |
1021 | # | 1044 | # |
1022 | # CONFIG_PRINTK_TIME is not set | 1045 | # CONFIG_PRINTK_TIME is not set |
1023 | CONFIG_DEBUG_KERNEL=y | ||
1024 | CONFIG_MAGIC_SYSRQ=y | 1046 | CONFIG_MAGIC_SYSRQ=y |
1047 | CONFIG_DEBUG_KERNEL=y | ||
1025 | CONFIG_LOG_BUF_SHIFT=16 | 1048 | CONFIG_LOG_BUF_SHIFT=16 |
1026 | CONFIG_DETECT_SOFTLOCKUP=y | 1049 | CONFIG_DETECT_SOFTLOCKUP=y |
1027 | # CONFIG_SCHEDSTATS is not set | 1050 | # CONFIG_SCHEDSTATS is not set |
1028 | # CONFIG_DEBUG_SLAB is not set | 1051 | # CONFIG_DEBUG_SLAB is not set |
1052 | CONFIG_DEBUG_MUTEXES=y | ||
1029 | # CONFIG_DEBUG_SPINLOCK is not set | 1053 | # CONFIG_DEBUG_SPINLOCK is not set |
1030 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1054 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1031 | # CONFIG_DEBUG_KOBJECT is not set | 1055 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1034,6 +1058,7 @@ CONFIG_DEBUG_INFO=y | |||
1034 | # CONFIG_DEBUG_FS is not set | 1058 | # CONFIG_DEBUG_FS is not set |
1035 | # CONFIG_DEBUG_VM is not set | 1059 | # CONFIG_DEBUG_VM is not set |
1036 | CONFIG_FRAME_POINTER=y | 1060 | CONFIG_FRAME_POINTER=y |
1061 | CONFIG_FORCED_INLINING=y | ||
1037 | # CONFIG_RCU_TORTURE_TEST is not set | 1062 | # CONFIG_RCU_TORTURE_TEST is not set |
1038 | CONFIG_DEBUG_USER=y | 1063 | CONFIG_DEBUG_USER=y |
1039 | # CONFIG_DEBUG_WAITQ is not set | 1064 | # CONFIG_DEBUG_WAITQ is not set |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index d058e7c12568..8c3035d5ffc9 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -291,21 +291,21 @@ | |||
291 | CALL(sys_mq_getsetattr) | 291 | CALL(sys_mq_getsetattr) |
292 | /* 280 */ CALL(sys_waitid) | 292 | /* 280 */ CALL(sys_waitid) |
293 | CALL(sys_socket) | 293 | CALL(sys_socket) |
294 | CALL(sys_bind) | 294 | CALL(ABI(sys_bind, sys_oabi_bind)) |
295 | CALL(sys_connect) | 295 | CALL(ABI(sys_connect, sys_oabi_connect)) |
296 | CALL(sys_listen) | 296 | CALL(sys_listen) |
297 | /* 285 */ CALL(sys_accept) | 297 | /* 285 */ CALL(sys_accept) |
298 | CALL(sys_getsockname) | 298 | CALL(sys_getsockname) |
299 | CALL(sys_getpeername) | 299 | CALL(sys_getpeername) |
300 | CALL(sys_socketpair) | 300 | CALL(sys_socketpair) |
301 | CALL(sys_send) | 301 | CALL(sys_send) |
302 | /* 290 */ CALL(sys_sendto) | 302 | /* 290 */ CALL(ABI(sys_sendto, sys_oabi_sendto)) |
303 | CALL(sys_recv) | 303 | CALL(sys_recv) |
304 | CALL(sys_recvfrom) | 304 | CALL(sys_recvfrom) |
305 | CALL(sys_shutdown) | 305 | CALL(sys_shutdown) |
306 | CALL(sys_setsockopt) | 306 | CALL(sys_setsockopt) |
307 | /* 295 */ CALL(sys_getsockopt) | 307 | /* 295 */ CALL(sys_getsockopt) |
308 | CALL(sys_sendmsg) | 308 | CALL(ABI(sys_sendmsg, sys_oabi_sendmsg)) |
309 | CALL(sys_recvmsg) | 309 | CALL(sys_recvmsg) |
310 | CALL(ABI(sys_semop, sys_oabi_semop)) | 310 | CALL(ABI(sys_semop, sys_oabi_semop)) |
311 | CALL(sys_semget) | 311 | CALL(sys_semget) |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index d401d908c463..964cd717506b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -333,10 +333,14 @@ __pabt_svc: | |||
333 | @ from the exception stack | 333 | @ from the exception stack |
334 | 334 | ||
335 | #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) | 335 | #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) |
336 | #ifndef CONFIG_MMU | ||
337 | #warning "NPTL on non MMU needs fixing" | ||
338 | #else | ||
336 | @ make sure our user space atomic helper is aborted | 339 | @ make sure our user space atomic helper is aborted |
337 | cmp r2, #TASK_SIZE | 340 | cmp r2, #TASK_SIZE |
338 | bichs r3, r3, #PSR_Z_BIT | 341 | bichs r3, r3, #PSR_Z_BIT |
339 | #endif | 342 | #endif |
343 | #endif | ||
340 | 344 | ||
341 | @ | 345 | @ |
342 | @ We are now ready to fill in the remaining blanks on the stack: | 346 | @ We are now ready to fill in the remaining blanks on the stack: |
@@ -705,7 +709,12 @@ __kuser_memory_barrier: @ 0xffff0fa0 | |||
705 | * The C flag is also set if *ptr was changed to allow for assembly | 709 | * The C flag is also set if *ptr was changed to allow for assembly |
706 | * optimization in the calling code. | 710 | * optimization in the calling code. |
707 | * | 711 | * |
708 | * Note: this routine already includes memory barriers as needed. | 712 | * Notes: |
713 | * | ||
714 | * - This routine already includes memory barriers as needed. | ||
715 | * | ||
716 | * - A failure might be transient, i.e. it is possible, although unlikely, | ||
717 | * that "failure" be returned even if *ptr == oldval. | ||
709 | * | 718 | * |
710 | * For example, a user space atomic_add implementation could look like this: | 719 | * For example, a user space atomic_add implementation could look like this: |
711 | * | 720 | * |
@@ -756,12 +765,18 @@ __kuser_cmpxchg: @ 0xffff0fc0 | |||
756 | * exception happening just after the str instruction which would | 765 | * exception happening just after the str instruction which would |
757 | * clear the Z flag although the exchange was done. | 766 | * clear the Z flag although the exchange was done. |
758 | */ | 767 | */ |
768 | #ifdef CONFIG_MMU | ||
759 | teq ip, ip @ set Z flag | 769 | teq ip, ip @ set Z flag |
760 | ldr ip, [r2] @ load current val | 770 | ldr ip, [r2] @ load current val |
761 | add r3, r2, #1 @ prepare store ptr | 771 | add r3, r2, #1 @ prepare store ptr |
762 | teqeq ip, r0 @ compare with oldval if still allowed | 772 | teqeq ip, r0 @ compare with oldval if still allowed |
763 | streq r1, [r3, #-1]! @ store newval if still allowed | 773 | streq r1, [r3, #-1]! @ store newval if still allowed |
764 | subs r0, r2, r3 @ if r2 == r3 the str occured | 774 | subs r0, r2, r3 @ if r2 == r3 the str occured |
775 | #else | ||
776 | #warning "NPTL on non MMU needs fixing" | ||
777 | mov r0, #-1 | ||
778 | adds r0, r0, #0 | ||
779 | #endif | ||
765 | mov pc, lr | 780 | mov pc, lr |
766 | 781 | ||
767 | #else | 782 | #else |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index eafa8e5284af..9d4b76409c64 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -59,6 +59,16 @@ | |||
59 | * struct sembuf loses its padding with EABI. Since arrays of them are | 59 | * struct sembuf loses its padding with EABI. Since arrays of them are |
60 | * used they have to be copyed to remove the padding. Compatibility wrappers | 60 | * used they have to be copyed to remove the padding. Compatibility wrappers |
61 | * provided below. | 61 | * provided below. |
62 | * | ||
63 | * sys_bind: | ||
64 | * sys_connect: | ||
65 | * sys_sendmsg: | ||
66 | * sys_sendto: | ||
67 | * | ||
68 | * 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 | * change the length argument to 110 whenever it is 112. Compatibility | ||
71 | * wrappers provided below. | ||
62 | */ | 72 | */ |
63 | 73 | ||
64 | #include <linux/syscalls.h> | 74 | #include <linux/syscalls.h> |
@@ -67,6 +77,7 @@ | |||
67 | #include <linux/fcntl.h> | 77 | #include <linux/fcntl.h> |
68 | #include <linux/eventpoll.h> | 78 | #include <linux/eventpoll.h> |
69 | #include <linux/sem.h> | 79 | #include <linux/sem.h> |
80 | #include <linux/socket.h> | ||
70 | #include <asm/ipc.h> | 81 | #include <asm/ipc.h> |
71 | #include <asm/uaccess.h> | 82 | #include <asm/uaccess.h> |
72 | 83 | ||
@@ -337,3 +348,63 @@ asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third, | |||
337 | return sys_ipc(call, first, second, third, ptr, fifth); | 348 | return sys_ipc(call, first, second, third, ptr, fifth); |
338 | } | 349 | } |
339 | } | 350 | } |
351 | |||
352 | asmlinkage long sys_oabi_bind(int fd, struct sockaddr __user *addr, int addrlen) | ||
353 | { | ||
354 | sa_family_t sa_family; | ||
355 | if (addrlen == 112 && | ||
356 | get_user(sa_family, &addr->sa_family) == 0 && | ||
357 | sa_family == AF_UNIX) | ||
358 | addrlen = 110; | ||
359 | return sys_bind(fd, addr, addrlen); | ||
360 | } | ||
361 | |||
362 | asmlinkage long sys_oabi_connect(int fd, struct sockaddr __user *addr, int addrlen) | ||
363 | { | ||
364 | sa_family_t sa_family; | ||
365 | if (addrlen == 112 && | ||
366 | get_user(sa_family, &addr->sa_family) == 0 && | ||
367 | sa_family == AF_UNIX) | ||
368 | addrlen = 110; | ||
369 | return sys_connect(fd, addr, addrlen); | ||
370 | } | ||
371 | |||
372 | asmlinkage long sys_oabi_sendto(int fd, void __user *buff, | ||
373 | size_t len, unsigned flags, | ||
374 | struct sockaddr __user *addr, | ||
375 | int addrlen) | ||
376 | { | ||
377 | sa_family_t sa_family; | ||
378 | if (addrlen == 112 && | ||
379 | get_user(sa_family, &addr->sa_family) == 0 && | ||
380 | sa_family == AF_UNIX) | ||
381 | addrlen = 110; | ||
382 | return sys_sendto(fd, buff, len, flags, addr, addrlen); | ||
383 | } | ||
384 | |||
385 | asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) | ||
386 | { | ||
387 | struct sockaddr __user *addr; | ||
388 | int msg_namelen; | ||
389 | sa_family_t sa_family; | ||
390 | if (msg && | ||
391 | get_user(msg_namelen, &msg->msg_namelen) == 0 && | ||
392 | msg_namelen == 112 && | ||
393 | get_user(addr, &msg->msg_name) == 0 && | ||
394 | get_user(sa_family, &addr->sa_family) == 0 && | ||
395 | sa_family == AF_UNIX) | ||
396 | { | ||
397 | /* | ||
398 | * HACK ALERT: there is a limit to how much backward bending | ||
399 | * we should do for what is actually a transitional | ||
400 | * compatibility layer. This already has known flaws with | ||
401 | * a few ioctls that we don't intend to fix. Therefore | ||
402 | * consider this blatent hack as another one... and take care | ||
403 | * to run for cover. In most cases it will "just work fine". | ||
404 | * If it doesn't, well, tough. | ||
405 | */ | ||
406 | put_user(110, &msg->msg_namelen); | ||
407 | } | ||
408 | return sys_sendmsg(fd, msg, flags); | ||
409 | } | ||
410 | |||
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index 0793dcf54f2e..0e2b641268ad 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -24,6 +24,8 @@ config ARCH_CEIVA | |||
24 | 24 | ||
25 | config ARCH_CLEP7312 | 25 | config ARCH_CLEP7312 |
26 | bool "CLEP7312" | 26 | bool "CLEP7312" |
27 | help | ||
28 | Boards based on the Cirrus Logic 7212/7312 chips. | ||
27 | 29 | ||
28 | config ARCH_EDB7211 | 30 | config ARCH_EDB7211 |
29 | bool "EDB7211" | 31 | bool "EDB7211" |
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index dc31e3fd6c57..8ab1b040288c 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include "generic.h" | 29 | #include "generic.h" |
30 | #include <asm/serial.h> | ||
31 | 30 | ||
32 | static struct resource cs89x0_resources[] = { | 31 | static struct resource cs89x0_resources[] = { |
33 | [0] = { | 32 | [0] = { |
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index 9e5a13bb39d0..52fac89e95b5 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
@@ -106,6 +106,7 @@ static void __init enp2611_pci_preinit(void) | |||
106 | { | 106 | { |
107 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | 107 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); |
108 | ixp2000_pci_preinit(); | 108 | ixp2000_pci_preinit(); |
109 | pcibios_setup("firmware"); | ||
109 | } | 110 | } |
110 | 111 | ||
111 | static inline int enp2611_pci_valid_device(struct pci_bus *bus, | 112 | static inline int enp2611_pci_valid_device(struct pci_bus *bus, |
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index 7c782403042a..09101271298e 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
@@ -68,6 +68,7 @@ void __init ixdp2400_pci_preinit(void) | |||
68 | { | 68 | { |
69 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | 69 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); |
70 | ixp2000_pci_preinit(); | 70 | ixp2000_pci_preinit(); |
71 | pcibios_setup("firmware"); | ||
71 | } | 72 | } |
72 | 73 | ||
73 | int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) | 74 | int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 10f06606d460..150519fb38ec 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -212,6 +212,7 @@ void __init ixdp2x01_pci_preinit(void) | |||
212 | { | 212 | { |
213 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000); | 213 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000); |
214 | ixp2000_pci_preinit(); | 214 | ixp2000_pci_preinit(); |
215 | pcibios_setup("firmware"); | ||
215 | } | 216 | } |
216 | 217 | ||
217 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | 218 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) |
@@ -299,7 +300,9 @@ struct hw_pci ixdp2x01_pci __initdata = { | |||
299 | 300 | ||
300 | int __init ixdp2x01_pci_init(void) | 301 | int __init ixdp2x01_pci_init(void) |
301 | { | 302 | { |
302 | pci_common_init(&ixdp2x01_pci); | 303 | if (machine_is_ixdp2401() || machine_is_ixdp2801()) |
304 | pci_common_init(&ixdp2x01_pci); | ||
305 | |||
303 | return 0; | 306 | return 0; |
304 | } | 307 | } |
305 | 308 | ||
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index bdc20b51b076..a177e78b2b87 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | static void __init omap_generic_init_irq(void) | 31 | static void __init omap_generic_init_irq(void) |
32 | { | 32 | { |
33 | omap1_init_common_hw(); | ||
33 | omap_init_irq(); | 34 | omap_init_irq(); |
34 | } | 35 | } |
35 | 36 | ||
@@ -104,7 +105,7 @@ static void __init omap_generic_init(void) | |||
104 | 105 | ||
105 | static void __init omap_generic_map_io(void) | 106 | static void __init omap_generic_map_io(void) |
106 | { | 107 | { |
107 | omap_map_common_io(); | 108 | omap1_map_common_io(); |
108 | } | 109 | } |
109 | 110 | ||
110 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | 111 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 9533c36a92df..89f0cc74a519 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -128,6 +128,7 @@ static void __init h2_init_smc91x(void) | |||
128 | 128 | ||
129 | static void __init h2_init_irq(void) | 129 | static void __init h2_init_irq(void) |
130 | { | 130 | { |
131 | omap1_init_common_hw(); | ||
131 | omap_init_irq(); | 132 | omap_init_irq(); |
132 | omap_gpio_init(); | 133 | omap_gpio_init(); |
133 | h2_init_smc91x(); | 134 | h2_init_smc91x(); |
@@ -194,7 +195,7 @@ static void __init h2_init(void) | |||
194 | 195 | ||
195 | static void __init h2_map_io(void) | 196 | static void __init h2_map_io(void) |
196 | { | 197 | { |
197 | omap_map_common_io(); | 198 | omap1_map_common_io(); |
198 | } | 199 | } |
199 | 200 | ||
200 | MACHINE_START(OMAP_H2, "TI-H2") | 201 | MACHINE_START(OMAP_H2, "TI-H2") |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index d665efc1c344..d9f386265996 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -203,6 +203,7 @@ static void __init h3_init_smc91x(void) | |||
203 | 203 | ||
204 | void h3_init_irq(void) | 204 | void h3_init_irq(void) |
205 | { | 205 | { |
206 | omap1_init_common_hw(); | ||
206 | omap_init_irq(); | 207 | omap_init_irq(); |
207 | omap_gpio_init(); | 208 | omap_gpio_init(); |
208 | h3_init_smc91x(); | 209 | h3_init_smc91x(); |
@@ -210,7 +211,7 @@ void h3_init_irq(void) | |||
210 | 211 | ||
211 | static void __init h3_map_io(void) | 212 | static void __init h3_map_io(void) |
212 | { | 213 | { |
213 | omap_map_common_io(); | 214 | omap1_map_common_io(); |
214 | } | 215 | } |
215 | 216 | ||
216 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | 217 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 652f37c7f906..a04e4332915e 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -181,6 +181,7 @@ static void __init innovator_init_smc91x(void) | |||
181 | 181 | ||
182 | void innovator_init_irq(void) | 182 | void innovator_init_irq(void) |
183 | { | 183 | { |
184 | omap1_init_common_hw(); | ||
184 | omap_init_irq(); | 185 | omap_init_irq(); |
185 | omap_gpio_init(); | 186 | omap_gpio_init(); |
186 | #ifdef CONFIG_ARCH_OMAP15XX | 187 | #ifdef CONFIG_ARCH_OMAP15XX |
@@ -285,7 +286,7 @@ static void __init innovator_init(void) | |||
285 | 286 | ||
286 | static void __init innovator_map_io(void) | 287 | static void __init innovator_map_io(void) |
287 | { | 288 | { |
288 | omap_map_common_io(); | 289 | omap1_map_common_io(); |
289 | 290 | ||
290 | #ifdef CONFIG_ARCH_OMAP15XX | 291 | #ifdef CONFIG_ARCH_OMAP15XX |
291 | if (cpu_is_omap1510()) { | 292 | if (cpu_is_omap1510()) { |
diff --git a/arch/arm/mach-omap1/board-netstar.c b/arch/arm/mach-omap1/board-netstar.c index 58f783930d45..60d5f8a3339c 100644 --- a/arch/arm/mach-omap1/board-netstar.c +++ b/arch/arm/mach-omap1/board-netstar.c | |||
@@ -65,6 +65,7 @@ static struct omap_board_config_kernel netstar_config[] = { | |||
65 | 65 | ||
66 | static void __init netstar_init_irq(void) | 66 | static void __init netstar_init_irq(void) |
67 | { | 67 | { |
68 | omap1_init_common_hw(); | ||
68 | omap_init_irq(); | 69 | omap_init_irq(); |
69 | omap_gpio_init(); | 70 | omap_gpio_init(); |
70 | } | 71 | } |
@@ -108,7 +109,7 @@ static void __init netstar_init(void) | |||
108 | 109 | ||
109 | static void __init netstar_map_io(void) | 110 | static void __init netstar_map_io(void) |
110 | { | 111 | { |
111 | omap_map_common_io(); | 112 | omap1_map_common_io(); |
112 | } | 113 | } |
113 | 114 | ||
114 | #define MACHINE_PANICED 1 | 115 | #define MACHINE_PANICED 1 |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index e5d126e8f276..543fa136106d 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -169,6 +169,7 @@ static void __init osk_init_cf(void) | |||
169 | 169 | ||
170 | static void __init osk_init_irq(void) | 170 | static void __init osk_init_irq(void) |
171 | { | 171 | { |
172 | omap1_init_common_hw(); | ||
172 | omap_init_irq(); | 173 | omap_init_irq(); |
173 | omap_gpio_init(); | 174 | omap_gpio_init(); |
174 | osk_init_smc91x(); | 175 | osk_init_smc91x(); |
@@ -269,7 +270,7 @@ static void __init osk_init(void) | |||
269 | 270 | ||
270 | static void __init osk_map_io(void) | 271 | static void __init osk_map_io(void) |
271 | { | 272 | { |
272 | omap_map_common_io(); | 273 | omap1_map_common_io(); |
273 | } | 274 | } |
274 | 275 | ||
275 | MACHINE_START(OMAP_OSK, "TI-OSK") | 276 | MACHINE_START(OMAP_OSK, "TI-OSK") |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 67fada207622..e488f7236775 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | static void __init omap_generic_init_irq(void) | 35 | static void __init omap_generic_init_irq(void) |
36 | { | 36 | { |
37 | omap1_init_common_hw(); | ||
37 | omap_init_irq(); | 38 | omap_init_irq(); |
38 | } | 39 | } |
39 | 40 | ||
@@ -72,7 +73,7 @@ static void __init omap_generic_init(void) | |||
72 | 73 | ||
73 | static void __init omap_generic_map_io(void) | 74 | static void __init omap_generic_map_io(void) |
74 | { | 75 | { |
75 | omap_map_common_io(); | 76 | omap1_map_common_io(); |
76 | } | 77 | } |
77 | 78 | ||
78 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") | 79 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 88708a0c52a2..3913a3cc0ce6 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -144,6 +144,7 @@ static void __init perseus2_init_smc91x(void) | |||
144 | 144 | ||
145 | void omap_perseus2_init_irq(void) | 145 | void omap_perseus2_init_irq(void) |
146 | { | 146 | { |
147 | omap1_init_common_hw(); | ||
147 | omap_init_irq(); | 148 | omap_init_irq(); |
148 | omap_gpio_init(); | 149 | omap_gpio_init(); |
149 | perseus2_init_smc91x(); | 150 | perseus2_init_smc91x(); |
@@ -160,7 +161,7 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = { | |||
160 | 161 | ||
161 | static void __init omap_perseus2_map_io(void) | 162 | static void __init omap_perseus2_map_io(void) |
162 | { | 163 | { |
163 | omap_map_common_io(); | 164 | omap1_map_common_io(); |
164 | iotable_init(omap_perseus2_io_desc, | 165 | iotable_init(omap_perseus2_io_desc, |
165 | ARRAY_SIZE(omap_perseus2_io_desc)); | 166 | ARRAY_SIZE(omap_perseus2_io_desc)); |
166 | 167 | ||
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 959b4b847c87..bfd5fdd1a875 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -162,6 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = { | |||
162 | 162 | ||
163 | static void __init voiceblue_init_irq(void) | 163 | static void __init voiceblue_init_irq(void) |
164 | { | 164 | { |
165 | omap1_init_common_hw(); | ||
165 | omap_init_irq(); | 166 | omap_init_irq(); |
166 | omap_gpio_init(); | 167 | omap_gpio_init(); |
167 | } | 168 | } |
@@ -206,7 +207,7 @@ static void __init voiceblue_init(void) | |||
206 | 207 | ||
207 | static void __init voiceblue_map_io(void) | 208 | static void __init voiceblue_map_io(void) |
208 | { | 209 | { |
209 | omap_map_common_io(); | 210 | omap1_map_common_io(); |
210 | } | 211 | } |
211 | 212 | ||
212 | #define MACHINE_PANICED 1 | 213 | #define MACHINE_PANICED 1 |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index a7a19f75b9e1..82d556be79c5 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | 15 | ||
16 | #include <asm/tlb.h> | ||
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/arch/mux.h> | 19 | #include <asm/arch/mux.h> |
@@ -83,15 +84,24 @@ static struct map_desc omap16xx_io_desc[] __initdata = { | |||
83 | }; | 84 | }; |
84 | #endif | 85 | #endif |
85 | 86 | ||
86 | static int initialized = 0; | 87 | /* |
87 | 88 | * Maps common IO regions for omap1. This should only get called from | |
88 | static void __init _omap_map_io(void) | 89 | * board specific init. |
90 | */ | ||
91 | void __init omap1_map_common_io(void) | ||
89 | { | 92 | { |
90 | initialized = 1; | ||
91 | |||
92 | /* We have to initialize the IO space mapping before we can run | ||
93 | * cpu_is_omapxxx() macros. */ | ||
94 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); | 93 | iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); |
94 | |||
95 | /* Normally devicemaps_init() would flush caches and tlb after | ||
96 | * mdesc->map_io(), but we must also do it here because of the CPU | ||
97 | * revision check below. | ||
98 | */ | ||
99 | local_flush_tlb_all(); | ||
100 | flush_cache_all(); | ||
101 | |||
102 | /* We want to check CPU revision early for cpu_is_omapxxxx() macros. | ||
103 | * IO space mapping must be initialized before we can do that. | ||
104 | */ | ||
95 | omap_check_revision(); | 105 | omap_check_revision(); |
96 | 106 | ||
97 | #ifdef CONFIG_ARCH_OMAP730 | 107 | #ifdef CONFIG_ARCH_OMAP730 |
@@ -111,7 +121,14 @@ static void __init _omap_map_io(void) | |||
111 | #endif | 121 | #endif |
112 | 122 | ||
113 | omap_sram_init(); | 123 | omap_sram_init(); |
124 | } | ||
114 | 125 | ||
126 | /* | ||
127 | * Common low-level hardware init for omap1. This should only get called from | ||
128 | * board specific init. | ||
129 | */ | ||
130 | void __init omap1_init_common_hw() | ||
131 | { | ||
115 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort | 132 | /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort |
116 | * on a Posted Write in the TIPB Bridge". | 133 | * on a Posted Write in the TIPB Bridge". |
117 | */ | 134 | */ |
@@ -121,16 +138,7 @@ static void __init _omap_map_io(void) | |||
121 | /* Must init clocks early to assure that timer interrupt works | 138 | /* Must init clocks early to assure that timer interrupt works |
122 | */ | 139 | */ |
123 | omap1_clk_init(); | 140 | omap1_clk_init(); |
124 | } | ||
125 | 141 | ||
126 | /* | 142 | omap1_mux_init(); |
127 | * This should only get called from board specific init | ||
128 | */ | ||
129 | void __init omap_map_common_io(void) | ||
130 | { | ||
131 | if (!initialized) { | ||
132 | _omap_map_io(); | ||
133 | omap1_mux_init(); | ||
134 | } | ||
135 | } | 143 | } |
136 | 144 | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index b937123e5c65..eaecbf422d8c 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | static void __init omap_generic_init_irq(void) | 34 | static void __init omap_generic_init_irq(void) |
35 | { | 35 | { |
36 | omap2_init_common_hw(); | ||
36 | omap_init_irq(); | 37 | omap_init_irq(); |
37 | } | 38 | } |
38 | 39 | ||
@@ -64,7 +65,7 @@ static void __init omap_generic_init(void) | |||
64 | 65 | ||
65 | static void __init omap_generic_map_io(void) | 66 | static void __init omap_generic_map_io(void) |
66 | { | 67 | { |
67 | omap_map_common_io(); | 68 | omap2_map_common_io(); |
68 | } | 69 | } |
69 | 70 | ||
70 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | 71 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index c3c35d40378a..a300d634d8a5 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -136,6 +136,7 @@ static inline void __init h4_init_smc91x(void) | |||
136 | 136 | ||
137 | static void __init omap_h4_init_irq(void) | 137 | static void __init omap_h4_init_irq(void) |
138 | { | 138 | { |
139 | omap2_init_common_hw(); | ||
139 | omap_init_irq(); | 140 | omap_init_irq(); |
140 | omap_gpio_init(); | 141 | omap_gpio_init(); |
141 | h4_init_smc91x(); | 142 | h4_init_smc91x(); |
@@ -181,7 +182,7 @@ static void __init omap_h4_init(void) | |||
181 | 182 | ||
182 | static void __init omap_h4_map_io(void) | 183 | static void __init omap_h4_map_io(void) |
183 | { | 184 | { |
184 | omap_map_common_io(); | 185 | omap2_map_common_io(); |
185 | } | 186 | } |
186 | 187 | ||
187 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | 188 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 4a222f59f2cf..4303d988c4bf 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -182,7 +182,7 @@ static const struct icst307_params realview_oscvco_params = { | |||
182 | static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) | 182 | static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) |
183 | { | 183 | { |
184 | void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET; | 184 | void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET; |
185 | void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC1_OFFSET; | 185 | void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET; |
186 | u32 val; | 186 | u32 val; |
187 | 187 | ||
188 | val = readl(sys_osc) & ~0x7ffff; | 188 | val = readl(sys_osc) & ~0x7ffff; |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index af2f3d52b61b..08489efdaf06 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
41 | 41 | ||
42 | #include <asm/hardware.h> | 42 | #include <asm/hardware.h> |
43 | #include <asm/atomic.h> | ||
44 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
45 | #include <asm/io.h> | 44 | #include <asm/io.h> |
46 | 45 | ||
@@ -59,22 +58,18 @@ static DEFINE_MUTEX(clocks_mutex); | |||
59 | void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable) | 58 | void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable) |
60 | { | 59 | { |
61 | unsigned long clkcon; | 60 | unsigned long clkcon; |
62 | unsigned long flags; | ||
63 | |||
64 | local_irq_save(flags); | ||
65 | 61 | ||
66 | clkcon = __raw_readl(S3C2410_CLKCON); | 62 | clkcon = __raw_readl(S3C2410_CLKCON); |
67 | clkcon &= ~clocks; | ||
68 | 63 | ||
69 | if (enable) | 64 | if (enable) |
70 | clkcon |= clocks; | 65 | clkcon |= clocks; |
66 | else | ||
67 | clkcon &= ~clocks; | ||
71 | 68 | ||
72 | /* ensure none of the special function bits set */ | 69 | /* ensure none of the special function bits set */ |
73 | clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER); | 70 | clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER); |
74 | 71 | ||
75 | __raw_writel(clkcon, S3C2410_CLKCON); | 72 | __raw_writel(clkcon, S3C2410_CLKCON); |
76 | |||
77 | local_irq_restore(flags); | ||
78 | } | 73 | } |
79 | 74 | ||
80 | /* enable and disable calls for use with the clk struct */ | 75 | /* enable and disable calls for use with the clk struct */ |
@@ -138,16 +133,32 @@ void clk_put(struct clk *clk) | |||
138 | 133 | ||
139 | int clk_enable(struct clk *clk) | 134 | int clk_enable(struct clk *clk) |
140 | { | 135 | { |
141 | if (IS_ERR(clk)) | 136 | if (IS_ERR(clk) || clk == NULL) |
142 | return -EINVAL; | 137 | return -EINVAL; |
143 | 138 | ||
144 | return (clk->enable)(clk, 1); | 139 | clk_enable(clk->parent); |
140 | |||
141 | mutex_lock(&clocks_mutex); | ||
142 | |||
143 | if ((clk->usage++) == 0) | ||
144 | (clk->enable)(clk, 1); | ||
145 | |||
146 | mutex_unlock(&clocks_mutex); | ||
147 | return 0; | ||
145 | } | 148 | } |
146 | 149 | ||
147 | void clk_disable(struct clk *clk) | 150 | void clk_disable(struct clk *clk) |
148 | { | 151 | { |
149 | if (!IS_ERR(clk)) | 152 | if (IS_ERR(clk) || clk == NULL) |
153 | return; | ||
154 | |||
155 | mutex_lock(&clocks_mutex); | ||
156 | |||
157 | if ((--clk->usage) == 0) | ||
150 | (clk->enable)(clk, 0); | 158 | (clk->enable)(clk, 0); |
159 | |||
160 | mutex_unlock(&clocks_mutex); | ||
161 | clk_disable(clk->parent); | ||
151 | } | 162 | } |
152 | 163 | ||
153 | 164 | ||
@@ -361,6 +372,14 @@ int s3c24xx_register_clock(struct clk *clk) | |||
361 | if (clk->enable == NULL) | 372 | if (clk->enable == NULL) |
362 | clk->enable = clk_null_enable; | 373 | clk->enable = clk_null_enable; |
363 | 374 | ||
375 | /* if this is a standard clock, set the usage state */ | ||
376 | |||
377 | if (clk->ctrlbit) { | ||
378 | unsigned long clkcon = __raw_readl(S3C2410_CLKCON); | ||
379 | |||
380 | clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0; | ||
381 | } | ||
382 | |||
364 | /* add to the list of available clocks */ | 383 | /* add to the list of available clocks */ |
365 | 384 | ||
366 | mutex_lock(&clocks_mutex); | 385 | mutex_lock(&clocks_mutex); |
@@ -402,6 +421,8 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
402 | * the LCD clock if it is not needed. | 421 | * the LCD clock if it is not needed. |
403 | */ | 422 | */ |
404 | 423 | ||
424 | mutex_lock(&clocks_mutex); | ||
425 | |||
405 | s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0); | 426 | s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0); |
406 | s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0); | 427 | s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0); |
407 | s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0); | 428 | s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0); |
@@ -409,6 +430,8 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
409 | s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0); | 430 | s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0); |
410 | s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0); | 431 | s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0); |
411 | 432 | ||
433 | mutex_unlock(&clocks_mutex); | ||
434 | |||
412 | /* assume uart clocks are correctly setup */ | 435 | /* assume uart clocks are correctly setup */ |
413 | 436 | ||
414 | /* register our clocks */ | 437 | /* register our clocks */ |
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h index 177d5c8decf7..eb5c95d1e7f2 100644 --- a/arch/arm/mach-s3c2410/clock.h +++ b/arch/arm/mach-s3c2410/clock.h | |||
@@ -16,6 +16,7 @@ struct clk { | |||
16 | struct clk *parent; | 16 | struct clk *parent; |
17 | const char *name; | 17 | const char *name; |
18 | int id; | 18 | int id; |
19 | int usage; | ||
19 | unsigned long rate; | 20 | unsigned long rate; |
20 | unsigned long ctrlbit; | 21 | unsigned long ctrlbit; |
21 | int (*enable)(struct clk *, int enable); | 22 | int (*enable)(struct clk *, int enable); |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index b8d994a24d1c..0a47d38789a5 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -275,6 +275,11 @@ static struct resource s3c_adc_resource[] = { | |||
275 | }, | 275 | }, |
276 | [1] = { | 276 | [1] = { |
277 | .start = IRQ_TC, | 277 | .start = IRQ_TC, |
278 | .end = IRQ_TC, | ||
279 | .flags = IORESOURCE_IRQ, | ||
280 | }, | ||
281 | [2] = { | ||
282 | .start = IRQ_ADC, | ||
278 | .end = IRQ_ADC, | 283 | .end = IRQ_ADC, |
279 | .flags = IORESOURCE_IRQ, | 284 | .flags = IORESOURCE_IRQ, |
280 | } | 285 | } |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 792f66375830..ee82763b02b8 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | #include <asm/tlb.h> | ||
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
22 | 23 | ||
@@ -96,6 +97,14 @@ void __init omap_map_sram(void) | |||
96 | omap_sram_io_desc[0].length); | 97 | omap_sram_io_desc[0].length); |
97 | 98 | ||
98 | /* | 99 | /* |
100 | * Normally devicemaps_init() would flush caches and tlb after | ||
101 | * mdesc->map_io(), but since we're called from map_io(), we | ||
102 | * must do it here. | ||
103 | */ | ||
104 | local_flush_tlb_all(); | ||
105 | flush_cache_all(); | ||
106 | |||
107 | /* | ||
99 | * Looks like we need to preserve some bootloader code at the | 108 | * Looks like we need to preserve some bootloader code at the |
100 | * beginning of SRAM for jumping to flash for reboot to work... | 109 | * beginning of SRAM for jumping to flash for reboot to work... |
101 | */ | 110 | */ |
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index f214f74f264e..961c0d58ded4 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -202,18 +202,18 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
202 | int i; | 202 | int i; |
203 | unsigned long tmp; | 203 | unsigned long tmp; |
204 | 204 | ||
205 | ret = 0; | ||
205 | for (i = 0; i <= PT_MAX; i++) { | 206 | for (i = 0; i <= PT_MAX; i++) { |
206 | tmp = get_reg(child, i); | 207 | tmp = get_reg(child, i); |
207 | 208 | ||
208 | if (put_user(tmp, datap)) { | 209 | if (put_user(tmp, datap)) { |
209 | ret = -EFAULT; | 210 | ret = -EFAULT; |
210 | goto out_tsk; | 211 | break; |
211 | } | 212 | } |
212 | 213 | ||
213 | data += sizeof(long); | 214 | data += sizeof(long); |
214 | } | 215 | } |
215 | 216 | ||
216 | ret = 0; | ||
217 | break; | 217 | break; |
218 | } | 218 | } |
219 | 219 | ||
@@ -222,10 +222,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
222 | int i; | 222 | int i; |
223 | unsigned long tmp; | 223 | unsigned long tmp; |
224 | 224 | ||
225 | ret = 0; | ||
225 | for (i = 0; i <= PT_MAX; i++) { | 226 | for (i = 0; i <= PT_MAX; i++) { |
226 | if (get_user(tmp, datap)) { | 227 | if (get_user(tmp, datap)) { |
227 | ret = -EFAULT; | 228 | ret = -EFAULT; |
228 | goto out_tsk; | 229 | break; |
229 | } | 230 | } |
230 | 231 | ||
231 | if (i == PT_DCCR) { | 232 | if (i == PT_DCCR) { |
@@ -237,7 +238,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
237 | data += sizeof(long); | 238 | data += sizeof(long); |
238 | } | 239 | } |
239 | 240 | ||
240 | ret = 0; | ||
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | 243 | ||
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index d11206e467ab..1ba57efff60d 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c | |||
@@ -24,7 +24,6 @@ | |||
24 | /* | 24 | /* |
25 | * Setup options | 25 | * Setup options |
26 | */ | 26 | */ |
27 | struct drive_info_struct { char dummy[32]; } drive_info; | ||
28 | struct screen_info screen_info; | 27 | struct screen_info screen_info; |
29 | 28 | ||
30 | extern int root_mountflags; | 29 | extern int root_mountflags; |
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 1b665928336b..5a8b3fb6d27b 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -309,3 +309,4 @@ ENTRY(sys_call_table) | |||
309 | .long sys_faccessat | 309 | .long sys_faccessat |
310 | .long sys_pselect6 | 310 | .long sys_pselect6 |
311 | .long sys_ppoll | 311 | .long sys_ppoll |
312 | .long sys_unshare /* 310 */ | ||
diff --git a/arch/ia64/dig/setup.c b/arch/ia64/dig/setup.c index d58003f1ad02..c9104bfff667 100644 --- a/arch/ia64/dig/setup.c +++ b/arch/ia64/dig/setup.c | |||
@@ -25,16 +25,6 @@ | |||
25 | #include <asm/machvec.h> | 25 | #include <asm/machvec.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | 27 | ||
28 | /* | ||
29 | * This is here so we can use the CMOS detection in ide-probe.c to | ||
30 | * determine what drives are present. In theory, we don't need this | ||
31 | * as the auto-detection could be done via ide-probe.c:do_probe() but | ||
32 | * in practice that would be much slower, which is painful when | ||
33 | * running in the simulator. Note that passing zeroes in DRIVE_INFO | ||
34 | * is sufficient (the IDE driver will autodetect the drive geometry). | ||
35 | */ | ||
36 | char drive_info[4*16]; | ||
37 | |||
38 | void __init | 28 | void __init |
39 | dig_setup (char **cmdline_p) | 29 | dig_setup (char **cmdline_p) |
40 | { | 30 | { |
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index c485a3b32ba8..9990320b6f9a 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -410,24 +410,16 @@ efi_init (void) | |||
410 | efi_config_table_t *config_tables; | 410 | efi_config_table_t *config_tables; |
411 | efi_char16_t *c16; | 411 | efi_char16_t *c16; |
412 | u64 efi_desc_size; | 412 | u64 efi_desc_size; |
413 | char *cp, *end, vendor[100] = "unknown"; | 413 | char *cp, vendor[100] = "unknown"; |
414 | extern char saved_command_line[]; | 414 | extern char saved_command_line[]; |
415 | int i; | 415 | int i; |
416 | 416 | ||
417 | /* it's too early to be able to use the standard kernel command line support... */ | 417 | /* it's too early to be able to use the standard kernel command line support... */ |
418 | for (cp = saved_command_line; *cp; ) { | 418 | for (cp = saved_command_line; *cp; ) { |
419 | if (memcmp(cp, "mem=", 4) == 0) { | 419 | if (memcmp(cp, "mem=", 4) == 0) { |
420 | cp += 4; | 420 | mem_limit = memparse(cp + 4, &cp); |
421 | mem_limit = memparse(cp, &end); | ||
422 | if (end != cp) | ||
423 | break; | ||
424 | cp = end; | ||
425 | } else if (memcmp(cp, "max_addr=", 9) == 0) { | 421 | } else if (memcmp(cp, "max_addr=", 9) == 0) { |
426 | cp += 9; | 422 | max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp)); |
427 | max_addr = GRANULEROUNDDOWN(memparse(cp, &end)); | ||
428 | if (end != cp) | ||
429 | break; | ||
430 | cp = end; | ||
431 | } else { | 423 | } else { |
432 | while (*cp != ' ' && *cp) | 424 | while (*cp != ' ' && *cp) |
433 | ++cp; | 425 | ++cp; |
@@ -458,7 +450,7 @@ efi_init (void) | |||
458 | /* Show what we know for posterity */ | 450 | /* Show what we know for posterity */ |
459 | c16 = __va(efi.systab->fw_vendor); | 451 | c16 = __va(efi.systab->fw_vendor); |
460 | if (c16) { | 452 | if (c16) { |
461 | for (i = 0;i < (int) sizeof(vendor) && *c16; ++i) | 453 | for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i) |
462 | vendor[i] = *c16++; | 454 | vendor[i] = *c16++; |
463 | vendor[i] = '\0'; | 455 | vendor[i] = '\0'; |
464 | } | 456 | } |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index fbc7ea35dd57..f1778a84ea61 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -352,6 +352,7 @@ start_ap: | |||
352 | mov ar.rsc=0 // place RSE in enforced lazy mode | 352 | mov ar.rsc=0 // place RSE in enforced lazy mode |
353 | ;; | 353 | ;; |
354 | loadrs // clear the dirty partition | 354 | loadrs // clear the dirty partition |
355 | mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base | ||
355 | ;; | 356 | ;; |
356 | mov ar.bspstore=r2 // establish the new RSE stack | 357 | mov ar.bspstore=r2 // establish the new RSE stack |
357 | ;; | 358 | ;; |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c0766575a3a2..35f7835294a3 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -71,6 +71,8 @@ unsigned long __per_cpu_offset[NR_CPUS]; | |||
71 | EXPORT_SYMBOL(__per_cpu_offset); | 71 | EXPORT_SYMBOL(__per_cpu_offset); |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | extern void ia64_setup_printk_clock(void); | ||
75 | |||
74 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); | 76 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); |
75 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); | 77 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); |
76 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); | 78 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); |
@@ -445,6 +447,8 @@ setup_arch (char **cmdline_p) | |||
445 | /* process SAL system table: */ | 447 | /* process SAL system table: */ |
446 | ia64_sal_init(efi.sal_systab); | 448 | ia64_sal_init(efi.sal_systab); |
447 | 449 | ||
450 | ia64_setup_printk_clock(); | ||
451 | |||
448 | #ifdef CONFIG_SMP | 452 | #ifdef CONFIG_SMP |
449 | cpu_physical_id(0) = hard_smp_processor_id(); | 453 | cpu_physical_id(0) = hard_smp_processor_id(); |
450 | 454 | ||
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 028a2b95936c..a094ec49ccfa 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -278,3 +278,30 @@ udelay (unsigned long usecs) | |||
278 | } | 278 | } |
279 | } | 279 | } |
280 | EXPORT_SYMBOL(udelay); | 280 | EXPORT_SYMBOL(udelay); |
281 | |||
282 | static unsigned long long ia64_itc_printk_clock(void) | ||
283 | { | ||
284 | if (ia64_get_kr(IA64_KR_PER_CPU_DATA)) | ||
285 | return sched_clock(); | ||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | static unsigned long long ia64_default_printk_clock(void) | ||
290 | { | ||
291 | return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) * | ||
292 | (1000000000/HZ); | ||
293 | } | ||
294 | |||
295 | unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock; | ||
296 | |||
297 | unsigned long long printk_clock(void) | ||
298 | { | ||
299 | return ia64_printk_clock(); | ||
300 | } | ||
301 | |||
302 | void __init | ||
303 | ia64_setup_printk_clock(void) | ||
304 | { | ||
305 | if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) | ||
306 | ia64_printk_clock = ia64_itc_printk_clock; | ||
307 | } | ||
diff --git a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c index 9ab684d1bb55..3db62f24596c 100644 --- a/arch/ia64/sn/kernel/mca.c +++ b/arch/ia64/sn/kernel/mca.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) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -137,7 +137,8 @@ int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdat | |||
137 | 137 | ||
138 | static int __init sn_salinfo_init(void) | 138 | static int __init sn_salinfo_init(void) |
139 | { | 139 | { |
140 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | 140 | if (ia64_platform_is("sn2")) |
141 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | ||
141 | return 0; | 142 | return 0; |
142 | } | 143 | } |
143 | 144 | ||
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index ee36bff93c30..48645ac120fc 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -67,6 +67,7 @@ extern unsigned long last_time_offset; | |||
67 | extern void (*ia64_mark_idle) (int); | 67 | extern void (*ia64_mark_idle) (int); |
68 | extern void snidle(int); | 68 | extern void snidle(int); |
69 | extern unsigned char acpi_kbd_controller_present; | 69 | extern unsigned char acpi_kbd_controller_present; |
70 | extern unsigned long long (*ia64_printk_clock)(void); | ||
70 | 71 | ||
71 | unsigned long sn_rtc_cycles_per_second; | 72 | unsigned long sn_rtc_cycles_per_second; |
72 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); | 73 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); |
@@ -125,20 +126,6 @@ struct screen_info sn_screen_info = { | |||
125 | }; | 126 | }; |
126 | 127 | ||
127 | /* | 128 | /* |
128 | * This is here so we can use the CMOS detection in ide-probe.c to | ||
129 | * determine what drives are present. In theory, we don't need this | ||
130 | * as the auto-detection could be done via ide-probe.c:do_probe() but | ||
131 | * in practice that would be much slower, which is painful when | ||
132 | * running in the simulator. Note that passing zeroes in DRIVE_INFO | ||
133 | * is sufficient (the IDE driver will autodetect the drive geometry). | ||
134 | */ | ||
135 | #ifdef CONFIG_IA64_GENERIC | ||
136 | extern char drive_info[4 * 16]; | ||
137 | #else | ||
138 | char drive_info[4 * 16]; | ||
139 | #endif | ||
140 | |||
141 | /* | ||
142 | * This routine can only be used during init, since | 129 | * This routine can only be used during init, since |
143 | * smp_boot_data is an init data structure. | 130 | * smp_boot_data is an init data structure. |
144 | * We have to use smp_boot_data.cpu_phys_id to find | 131 | * We have to use smp_boot_data.cpu_phys_id to find |
@@ -372,6 +359,16 @@ sn_scan_pcdp(void) | |||
372 | } | 359 | } |
373 | } | 360 | } |
374 | 361 | ||
362 | static unsigned long sn2_rtc_initial; | ||
363 | |||
364 | static unsigned long long ia64_sn2_printk_clock(void) | ||
365 | { | ||
366 | unsigned long rtc_now = rtc_time(); | ||
367 | |||
368 | return (rtc_now - sn2_rtc_initial) * | ||
369 | (1000000000 / sn_rtc_cycles_per_second); | ||
370 | } | ||
371 | |||
375 | /** | 372 | /** |
376 | * sn_setup - SN platform setup routine | 373 | * sn_setup - SN platform setup routine |
377 | * @cmdline_p: kernel command line | 374 | * @cmdline_p: kernel command line |
@@ -386,6 +383,7 @@ void __init sn_setup(char **cmdline_p) | |||
386 | u32 version = sn_sal_rev(); | 383 | u32 version = sn_sal_rev(); |
387 | extern void sn_cpu_init(void); | 384 | extern void sn_cpu_init(void); |
388 | 385 | ||
386 | sn2_rtc_initial = rtc_time(); | ||
389 | ia64_sn_plat_set_error_handling_features(); // obsolete | 387 | ia64_sn_plat_set_error_handling_features(); // obsolete |
390 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); | 388 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); |
391 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); | 389 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); |
@@ -437,19 +435,6 @@ void __init sn_setup(char **cmdline_p) | |||
437 | */ | 435 | */ |
438 | build_cnode_tables(); | 436 | build_cnode_tables(); |
439 | 437 | ||
440 | /* | ||
441 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
442 | * support here so we don't have to listen to failed keyboard probe | ||
443 | * messages. | ||
444 | */ | ||
445 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
446 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
447 | "is too old and doesn't provide FADT\n"); | ||
448 | acpi_kbd_controller_present = 0; | ||
449 | } | ||
450 | |||
451 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
452 | |||
453 | status = | 438 | status = |
454 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, | 439 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, |
455 | &drift); | 440 | &drift); |
@@ -463,6 +448,21 @@ void __init sn_setup(char **cmdline_p) | |||
463 | 448 | ||
464 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; | 449 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; |
465 | 450 | ||
451 | ia64_printk_clock = ia64_sn2_printk_clock; | ||
452 | |||
453 | /* | ||
454 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
455 | * support here so we don't have to listen to failed keyboard probe | ||
456 | * messages. | ||
457 | */ | ||
458 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
459 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
460 | "is too old and doesn't provide FADT\n"); | ||
461 | acpi_kbd_controller_present = 0; | ||
462 | } | ||
463 | |||
464 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
465 | |||
466 | /* | 466 | /* |
467 | * we set the default root device to /dev/hda | 467 | * we set the default root device to /dev/hda |
468 | * to make simulation easy | 468 | * to make simulation easy |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 19b54fbcd7ea..70db21f3df21 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.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) 2004-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved. |
7 | * | 7 | * |
8 | * SGI Altix topology and hardware performance monitoring API. | 8 | * SGI Altix topology and hardware performance monitoring API. |
9 | * Mark Goodwin <markgw@sgi.com>. | 9 | * Mark Goodwin <markgw@sgi.com>. |
@@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_register_init(void) | |||
973 | { | 973 | { |
974 | int e; | 974 | int e; |
975 | 975 | ||
976 | if (!ia64_platform_is("sn2")) | ||
977 | return 0; | ||
978 | |||
976 | sn_hwperf_init(); | 979 | sn_hwperf_init(); |
977 | 980 | ||
978 | /* | 981 | /* |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index dbc8a392105f..be8b711367ec 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
@@ -18,11 +18,6 @@ | |||
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
19 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
20 | 20 | ||
21 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) | ||
22 | extern struct drive_info_struct drive_info; | ||
23 | EXPORT_SYMBOL(drive_info); | ||
24 | #endif | ||
25 | |||
26 | /* platform dependent support */ | 21 | /* platform dependent support */ |
27 | EXPORT_SYMBOL(boot_cpu_data); | 22 | EXPORT_SYMBOL(boot_cpu_data); |
28 | EXPORT_SYMBOL(dump_fpu); | 23 | EXPORT_SYMBOL(dump_fpu); |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index c2e4dccf0112..d742037a7ccb 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -37,12 +37,6 @@ | |||
37 | extern void init_mmu(void); | 37 | extern void init_mmu(void); |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) \ | ||
41 | || defined(CONFIG_BLK_DEV_IDE_MODULE) \ | ||
42 | || defined(CONFIG_BLK_DEV_HD_MODULE) | ||
43 | struct drive_info_struct { char dummy[32]; } drive_info; | ||
44 | #endif | ||
45 | |||
46 | extern char _end[]; | 40 | extern char _end[]; |
47 | 41 | ||
48 | /* | 42 | /* |
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 99bf43824795..63c117dae0c3 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c | |||
@@ -39,6 +39,14 @@ | |||
39 | 39 | ||
40 | asmlinkage void ret_from_fork(void); | 40 | asmlinkage void ret_from_fork(void); |
41 | 41 | ||
42 | /* | ||
43 | * The following aren't currently used. | ||
44 | */ | ||
45 | void (*pm_idle)(void); | ||
46 | EXPORT_SYMBOL(pm_idle); | ||
47 | |||
48 | void (*pm_power_off)(void); | ||
49 | EXPORT_SYMBOL(pm_power_off); | ||
42 | 50 | ||
43 | /* | 51 | /* |
44 | * The idle loop on an m68knommu.. | 52 | * The idle loop on an m68knommu.. |
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index 050685b87a3c..b9713a723053 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c | |||
@@ -140,7 +140,7 @@ void __init plat_setup(void) | |||
140 | uart.type = PORT_UNKNOWN; | 140 | uart.type = PORT_UNKNOWN; |
141 | uart.uartclk = 18432000; | 141 | uart.uartclk = 18432000; |
142 | uart.irq = COBALT_SERIAL_IRQ; | 142 | uart.irq = COBALT_SERIAL_IRQ; |
143 | uart.flags = STD_COM_FLAGS; | 143 | uart.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
144 | uart.iobase = 0xc800000; | 144 | uart.iobase = 0xc800000; |
145 | uart.iotype = UPIO_PORT; | 145 | uart.iotype = UPIO_PORT; |
146 | 146 | ||
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index fa98f10d0132..5232fc752935 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. | 6 | * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. |
7 | * Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | * Copyright (C) 2004 Thiemo Seufer | 9 | * Copyright (C) 2004 Thiemo Seufer |
9 | */ | 10 | */ |
@@ -58,8 +59,8 @@ ATTRIB_NORET void cpu_idle(void) | |||
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
61 | extern int do_signal(sigset_t *oldset, struct pt_regs *regs); | 62 | extern void do_signal(struct pt_regs *regs); |
62 | extern int do_signal32(sigset_t *oldset, struct pt_regs *regs); | 63 | extern void do_signal32(struct pt_regs *regs); |
63 | 64 | ||
64 | /* | 65 | /* |
65 | * Native o32 and N64 ABI without DSP ASE | 66 | * Native o32 and N64 ABI without DSP ASE |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index a42e0e8caa7b..d7c4a38ed5ae 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -617,6 +617,23 @@ einval: li v0, -EINVAL | |||
617 | sys sys_inotify_init 0 | 617 | sys sys_inotify_init 0 |
618 | sys sys_inotify_add_watch 3 /* 4285 */ | 618 | sys sys_inotify_add_watch 3 /* 4285 */ |
619 | sys sys_inotify_rm_watch 2 | 619 | sys sys_inotify_rm_watch 2 |
620 | sys sys_migrate_pages 4 | ||
621 | sys sys_openat 4 | ||
622 | sys sys_mkdirat 3 | ||
623 | sys sys_mknodat 4 /* 4290 */ | ||
624 | sys sys_fchownat 5 | ||
625 | sys sys_futimesat 3 | ||
626 | sys sys_newfstatat 4 | ||
627 | sys sys_unlinkat 3 | ||
628 | sys sys_renameat 4 /* 4295 */ | ||
629 | sys sys_linkat 4 | ||
630 | sys sys_symlinkat 3 | ||
631 | sys sys_readlinkat 4 | ||
632 | sys sys_fchmodat 3 | ||
633 | sys sys_faccessat 3 /* 4300 */ | ||
634 | sys sys_pselect6 6 | ||
635 | sys sys_ppoll 5 | ||
636 | sys sys_unshare 1 | ||
620 | .endm | 637 | .endm |
621 | 638 | ||
622 | /* We pre-compute the number of _instruction_ bytes needed to | 639 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 47bfbd416709..98bf25df56f3 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -443,3 +443,20 @@ sys_call_table: | |||
443 | PTR sys_inotify_init | 443 | PTR sys_inotify_init |
444 | PTR sys_inotify_add_watch | 444 | PTR sys_inotify_add_watch |
445 | PTR sys_inotify_rm_watch /* 5245 */ | 445 | PTR sys_inotify_rm_watch /* 5245 */ |
446 | PTR sys_migrate_pages | ||
447 | PTR sys_openat | ||
448 | PTR sys_mkdirat | ||
449 | PTR sys_mknodat | ||
450 | PTR sys_fchownat /* 5250 */ | ||
451 | PTR sys_futimesat | ||
452 | PTR sys_newfstatat | ||
453 | PTR sys_unlinkat | ||
454 | PTR sys_renameat | ||
455 | PTR sys_linkat /* 5255 */ | ||
456 | PTR sys_symlinkat | ||
457 | PTR sys_readlinkat | ||
458 | PTR sys_fchmodat | ||
459 | PTR sys_faccessat | ||
460 | PTR sys_pselect6 /* 5260 */ | ||
461 | PTR sys_ppoll | ||
462 | PTR sys_unshare | ||
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index b465ced1758f..bc4980cefc8b 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -369,3 +369,20 @@ EXPORT(sysn32_call_table) | |||
369 | PTR sys_inotify_init | 369 | PTR sys_inotify_init |
370 | PTR sys_inotify_add_watch | 370 | PTR sys_inotify_add_watch |
371 | PTR sys_inotify_rm_watch | 371 | PTR sys_inotify_rm_watch |
372 | PTR sys_migrate_pages /* 6250 */ | ||
373 | PTR sys_openat | ||
374 | PTR sys_mkdirat | ||
375 | PTR sys_mknodat | ||
376 | PTR sys_fchownat | ||
377 | PTR sys_futimesat /* 6255 */ | ||
378 | PTR sys_newfstatat | ||
379 | PTR sys_unlinkat | ||
380 | PTR sys_renameat | ||
381 | PTR sys_linkat | ||
382 | PTR sys_symlinkat /* 6260 */ | ||
383 | PTR sys_readlinkat | ||
384 | PTR sys_fchmodat | ||
385 | PTR sys_faccessat | ||
386 | PTR sys_pselect6 | ||
387 | PTR sys_ppoll /* 6265 */ | ||
388 | PTR sys_unshare | ||
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 3d338ca7eeeb..5b0414018c9a 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -491,4 +491,21 @@ sys_call_table: | |||
491 | PTR sys_inotify_init | 491 | PTR sys_inotify_init |
492 | PTR sys_inotify_add_watch /* 4285 */ | 492 | PTR sys_inotify_add_watch /* 4285 */ |
493 | PTR sys_inotify_rm_watch | 493 | PTR sys_inotify_rm_watch |
494 | PTR sys_migrate_pages | ||
495 | PTR compat_sys_openat | ||
496 | PTR sys_mkdirat | ||
497 | PTR sys_mknodat /* 4290 */ | ||
498 | PTR sys_fchownat | ||
499 | PTR compat_sys_futimesat | ||
500 | PTR compat_sys_newfstatat | ||
501 | PTR sys_unlinkat | ||
502 | PTR sys_renameat /* 4295 */ | ||
503 | PTR sys_linkat | ||
504 | PTR sys_symlinkat | ||
505 | PTR sys_readlinkat | ||
506 | PTR sys_fchmodat | ||
507 | PTR sys_faccessat /* 4300 */ | ||
508 | PTR sys_pselect6 | ||
509 | PTR sys_ppoll | ||
510 | PTR sys_unshare | ||
494 | .size sys_call_table,.-sys_call_table | 511 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index aaec4785e9a6..c974cc9b30eb 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 40 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
41 | 41 | ||
42 | int do_signal(sigset_t *oldset, struct pt_regs *regs); | ||
43 | |||
44 | /* | 42 | /* |
45 | * Atomically swap in the new signal mask, and wait for a signal. | 43 | * Atomically swap in the new signal mask, and wait for a signal. |
46 | */ | 44 | */ |
@@ -50,7 +48,7 @@ save_static_function(sys_sigsuspend); | |||
50 | __attribute_used__ noinline static int | 48 | __attribute_used__ noinline static int |
51 | _sys_sigsuspend(nabi_no_regargs struct pt_regs regs) | 49 | _sys_sigsuspend(nabi_no_regargs struct pt_regs regs) |
52 | { | 50 | { |
53 | sigset_t saveset, newset; | 51 | sigset_t newset; |
54 | sigset_t __user *uset; | 52 | sigset_t __user *uset; |
55 | 53 | ||
56 | uset = (sigset_t __user *) regs.regs[4]; | 54 | uset = (sigset_t __user *) regs.regs[4]; |
@@ -59,19 +57,15 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
59 | sigdelsetmask(&newset, ~_BLOCKABLE); | 57 | sigdelsetmask(&newset, ~_BLOCKABLE); |
60 | 58 | ||
61 | spin_lock_irq(¤t->sighand->siglock); | 59 | spin_lock_irq(¤t->sighand->siglock); |
62 | saveset = current->blocked; | 60 | current->saved_sigmask = current->blocked; |
63 | current->blocked = newset; | 61 | current->blocked = newset; |
64 | recalc_sigpending(); | 62 | recalc_sigpending(); |
65 | spin_unlock_irq(¤t->sighand->siglock); | 63 | spin_unlock_irq(¤t->sighand->siglock); |
66 | 64 | ||
67 | regs.regs[2] = EINTR; | 65 | current->state = TASK_INTERRUPTIBLE; |
68 | regs.regs[7] = 1; | 66 | schedule(); |
69 | while (1) { | 67 | set_thread_flag(TIF_RESTORE_SIGMASK); |
70 | current->state = TASK_INTERRUPTIBLE; | 68 | return -ERESTARTNOHAND; |
71 | schedule(); | ||
72 | if (do_signal(&saveset, ®s)) | ||
73 | return -EINTR; | ||
74 | } | ||
75 | } | 69 | } |
76 | #endif | 70 | #endif |
77 | 71 | ||
@@ -79,7 +73,7 @@ save_static_function(sys_rt_sigsuspend); | |||
79 | __attribute_used__ noinline static int | 73 | __attribute_used__ noinline static int |
80 | _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | 74 | _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) |
81 | { | 75 | { |
82 | sigset_t saveset, newset; | 76 | sigset_t newset; |
83 | sigset_t __user *unewset; | 77 | sigset_t __user *unewset; |
84 | size_t sigsetsize; | 78 | size_t sigsetsize; |
85 | 79 | ||
@@ -94,19 +88,15 @@ _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
94 | sigdelsetmask(&newset, ~_BLOCKABLE); | 88 | sigdelsetmask(&newset, ~_BLOCKABLE); |
95 | 89 | ||
96 | spin_lock_irq(¤t->sighand->siglock); | 90 | spin_lock_irq(¤t->sighand->siglock); |
97 | saveset = current->blocked; | 91 | current->saved_sigmask = current->blocked; |
98 | current->blocked = newset; | 92 | current->blocked = newset; |
99 | recalc_sigpending(); | 93 | recalc_sigpending(); |
100 | spin_unlock_irq(¤t->sighand->siglock); | 94 | spin_unlock_irq(¤t->sighand->siglock); |
101 | 95 | ||
102 | regs.regs[2] = EINTR; | 96 | current->state = TASK_INTERRUPTIBLE; |
103 | regs.regs[7] = 1; | 97 | schedule(); |
104 | while (1) { | 98 | set_thread_flag(TIF_RESTORE_SIGMASK); |
105 | current->state = TASK_INTERRUPTIBLE; | 99 | return -ERESTARTNOHAND; |
106 | schedule(); | ||
107 | if (do_signal(&saveset, ®s)) | ||
108 | return -EINTR; | ||
109 | } | ||
110 | } | 100 | } |
111 | 101 | ||
112 | #ifdef CONFIG_TRAD_SIGNALS | 102 | #ifdef CONFIG_TRAD_SIGNALS |
@@ -315,11 +305,11 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
315 | current->comm, current->pid, | 305 | current->comm, current->pid, |
316 | frame, regs->cp0_epc, frame->regs[31]); | 306 | frame, regs->cp0_epc, frame->regs[31]); |
317 | #endif | 307 | #endif |
318 | return 1; | 308 | return 0; |
319 | 309 | ||
320 | give_sigsegv: | 310 | give_sigsegv: |
321 | force_sigsegv(signr, current); | 311 | force_sigsegv(signr, current); |
322 | return 0; | 312 | return -EFAULT; |
323 | } | 313 | } |
324 | #endif | 314 | #endif |
325 | 315 | ||
@@ -375,11 +365,11 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
375 | current->comm, current->pid, | 365 | current->comm, current->pid, |
376 | frame, regs->cp0_epc, regs->regs[31]); | 366 | frame, regs->cp0_epc, regs->regs[31]); |
377 | #endif | 367 | #endif |
378 | return 1; | 368 | return 0; |
379 | 369 | ||
380 | give_sigsegv: | 370 | give_sigsegv: |
381 | force_sigsegv(signr, current); | 371 | force_sigsegv(signr, current); |
382 | return 0; | 372 | return -EFAULT; |
383 | } | 373 | } |
384 | 374 | ||
385 | static inline int handle_signal(unsigned long sig, siginfo_t *info, | 375 | static inline int handle_signal(unsigned long sig, siginfo_t *info, |
@@ -393,7 +383,7 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info, | |||
393 | regs->regs[2] = EINTR; | 383 | regs->regs[2] = EINTR; |
394 | break; | 384 | break; |
395 | case ERESTARTSYS: | 385 | case ERESTARTSYS: |
396 | if(!(ka->sa.sa_flags & SA_RESTART)) { | 386 | if (!(ka->sa.sa_flags & SA_RESTART)) { |
397 | regs->regs[2] = EINTR; | 387 | regs->regs[2] = EINTR; |
398 | break; | 388 | break; |
399 | } | 389 | } |
@@ -420,9 +410,10 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info, | |||
420 | return ret; | 410 | return ret; |
421 | } | 411 | } |
422 | 412 | ||
423 | int do_signal(sigset_t *oldset, struct pt_regs *regs) | 413 | void do_signal(struct pt_regs *regs) |
424 | { | 414 | { |
425 | struct k_sigaction ka; | 415 | struct k_sigaction ka; |
416 | sigset_t *oldset; | ||
426 | siginfo_t info; | 417 | siginfo_t info; |
427 | int signr; | 418 | int signr; |
428 | 419 | ||
@@ -432,17 +423,31 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) | |||
432 | * if so. | 423 | * if so. |
433 | */ | 424 | */ |
434 | if (!user_mode(regs)) | 425 | if (!user_mode(regs)) |
435 | return 1; | 426 | return; |
436 | 427 | ||
437 | if (try_to_freeze()) | 428 | if (try_to_freeze()) |
438 | goto no_signal; | 429 | goto no_signal; |
439 | 430 | ||
440 | if (!oldset) | 431 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
432 | oldset = ¤t->saved_sigmask; | ||
433 | else | ||
441 | oldset = ¤t->blocked; | 434 | oldset = ¤t->blocked; |
442 | 435 | ||
436 | |||
443 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 437 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
444 | if (signr > 0) | 438 | if (signr > 0) { |
445 | return handle_signal(signr, &info, &ka, oldset, regs); | 439 | /* Whee! Actually deliver the signal. */ |
440 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | ||
441 | /* | ||
442 | * A signal was successfully delivered; the saved | ||
443 | * sigmask will have been stored in the signal frame, | ||
444 | * and will be restored by sigreturn, so we can simply | ||
445 | * clear the TIF_RESTORE_SIGMASK flag. | ||
446 | */ | ||
447 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
448 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
449 | } | ||
450 | } | ||
446 | 451 | ||
447 | no_signal: | 452 | no_signal: |
448 | /* | 453 | /* |
@@ -463,18 +468,25 @@ no_signal: | |||
463 | regs->cp0_epc -= 4; | 468 | regs->cp0_epc -= 4; |
464 | } | 469 | } |
465 | } | 470 | } |
466 | return 0; | 471 | |
472 | /* | ||
473 | * If there's no signal to deliver, we just put the saved sigmask | ||
474 | * back | ||
475 | */ | ||
476 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
477 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
478 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
479 | } | ||
467 | } | 480 | } |
468 | 481 | ||
469 | /* | 482 | /* |
470 | * notification of userspace execution resumption | 483 | * notification of userspace execution resumption |
471 | * - triggered by current->work.notify_resume | 484 | * - triggered by the TIF_WORK_MASK flags |
472 | */ | 485 | */ |
473 | asmlinkage void do_notify_resume(struct pt_regs *regs, sigset_t *oldset, | 486 | asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, |
474 | __u32 thread_info_flags) | 487 | __u32 thread_info_flags) |
475 | { | 488 | { |
476 | /* deal with pending signal delivery */ | 489 | /* deal with pending signal delivery */ |
477 | if (thread_info_flags & _TIF_SIGPENDING) { | 490 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
478 | current->thread.abi->do_signal(oldset, regs); | 491 | current->thread.abi->do_signal(regs); |
479 | } | ||
480 | } | 492 | } |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 136260c8f756..da3271e1fdac 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -694,11 +694,11 @@ int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
694 | current->comm, current->pid, | 694 | current->comm, current->pid, |
695 | frame, regs->cp0_epc, frame->sf_code); | 695 | frame, regs->cp0_epc, frame->sf_code); |
696 | #endif | 696 | #endif |
697 | return 1; | 697 | return 0; |
698 | 698 | ||
699 | give_sigsegv: | 699 | give_sigsegv: |
700 | force_sigsegv(signr, current); | 700 | force_sigsegv(signr, current); |
701 | return 0; | 701 | return -EFAULT; |
702 | } | 702 | } |
703 | 703 | ||
704 | int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 704 | int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, |
@@ -765,11 +765,11 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | |||
765 | current->comm, current->pid, | 765 | current->comm, current->pid, |
766 | frame, regs->cp0_epc, frame->rs_code); | 766 | frame, regs->cp0_epc, frame->rs_code); |
767 | #endif | 767 | #endif |
768 | return 1; | 768 | return 0; |
769 | 769 | ||
770 | give_sigsegv: | 770 | give_sigsegv: |
771 | force_sigsegv(signr, current); | 771 | force_sigsegv(signr, current); |
772 | return 0; | 772 | return -EFAULT; |
773 | } | 773 | } |
774 | 774 | ||
775 | static inline int handle_signal(unsigned long sig, siginfo_t *info, | 775 | static inline int handle_signal(unsigned long sig, siginfo_t *info, |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 9156863c1a5d..384fc4a639a4 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -186,9 +186,9 @@ int setup_rt_frame_n32(struct k_sigaction * ka, | |||
186 | current->comm, current->pid, | 186 | current->comm, current->pid, |
187 | frame, regs->cp0_epc, regs->regs[31]); | 187 | frame, regs->cp0_epc, regs->regs[31]); |
188 | #endif | 188 | #endif |
189 | return 1; | 189 | return 0; |
190 | 190 | ||
191 | give_sigsegv: | 191 | give_sigsegv: |
192 | force_sigsegv(signr, current); | 192 | force_sigsegv(signr, current); |
193 | return 0; | 193 | return -EFAULT; |
194 | } | 194 | } |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 332358430ff5..1da2eeb3ef9e 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -212,12 +212,12 @@ asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs) | |||
212 | int error; | 212 | int error; |
213 | char * filename; | 213 | char * filename; |
214 | 214 | ||
215 | filename = getname((char *) (long)regs.regs[4]); | 215 | filename = getname((char __user *) (long)regs.regs[4]); |
216 | error = PTR_ERR(filename); | 216 | error = PTR_ERR(filename); |
217 | if (IS_ERR(filename)) | 217 | if (IS_ERR(filename)) |
218 | goto out; | 218 | goto out; |
219 | error = do_execve(filename, (char **) (long)regs.regs[5], | 219 | error = do_execve(filename, (char __user *__user *) (long)regs.regs[5], |
220 | (char **) (long)regs.regs[6], ®s); | 220 | (char __user *__user *) (long)regs.regs[6], ®s); |
221 | putname(filename); | 221 | putname(filename); |
222 | 222 | ||
223 | out: | 223 | out: |
@@ -227,7 +227,7 @@ out: | |||
227 | /* | 227 | /* |
228 | * Compacrapability ... | 228 | * Compacrapability ... |
229 | */ | 229 | */ |
230 | asmlinkage int sys_uname(struct old_utsname * name) | 230 | asmlinkage int sys_uname(struct old_utsname __user * name) |
231 | { | 231 | { |
232 | if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) | 232 | if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) |
233 | return 0; | 233 | return 0; |
@@ -237,7 +237,7 @@ asmlinkage int sys_uname(struct old_utsname * name) | |||
237 | /* | 237 | /* |
238 | * Compacrapability ... | 238 | * Compacrapability ... |
239 | */ | 239 | */ |
240 | asmlinkage int sys_olduname(struct oldold_utsname * name) | 240 | asmlinkage int sys_olduname(struct oldold_utsname __user * name) |
241 | { | 241 | { |
242 | int error; | 242 | int error; |
243 | 243 | ||
@@ -274,7 +274,7 @@ void sys_set_thread_area(unsigned long addr) | |||
274 | asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | 274 | asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) |
275 | { | 275 | { |
276 | int tmp, len; | 276 | int tmp, len; |
277 | char *name; | 277 | char __user *name; |
278 | 278 | ||
279 | switch(cmd) { | 279 | switch(cmd) { |
280 | case SETNAME: { | 280 | case SETNAME: { |
@@ -283,7 +283,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | |||
283 | if (!capable(CAP_SYS_ADMIN)) | 283 | if (!capable(CAP_SYS_ADMIN)) |
284 | return -EPERM; | 284 | return -EPERM; |
285 | 285 | ||
286 | name = (char *) arg1; | 286 | name = (char __user *) arg1; |
287 | 287 | ||
288 | len = strncpy_from_user(nodename, name, __NEW_UTS_LEN); | 288 | len = strncpy_from_user(nodename, name, __NEW_UTS_LEN); |
289 | if (len < 0) | 289 | if (len < 0) |
@@ -324,7 +324,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | |||
324 | * This is really horribly ugly. | 324 | * This is really horribly ugly. |
325 | */ | 325 | */ |
326 | asmlinkage int sys_ipc (uint call, int first, int second, | 326 | asmlinkage int sys_ipc (uint call, int first, int second, |
327 | unsigned long third, void *ptr, long fifth) | 327 | unsigned long third, void __user *ptr, long fifth) |
328 | { | 328 | { |
329 | int version, ret; | 329 | int version, ret; |
330 | 330 | ||
@@ -333,24 +333,25 @@ asmlinkage int sys_ipc (uint call, int first, int second, | |||
333 | 333 | ||
334 | switch (call) { | 334 | switch (call) { |
335 | case SEMOP: | 335 | case SEMOP: |
336 | return sys_semtimedop (first, (struct sembuf *)ptr, second, | 336 | return sys_semtimedop (first, (struct sembuf __user *)ptr, |
337 | NULL); | 337 | second, NULL); |
338 | case SEMTIMEDOP: | 338 | case SEMTIMEDOP: |
339 | return sys_semtimedop (first, (struct sembuf *)ptr, second, | 339 | return sys_semtimedop (first, (struct sembuf __user *)ptr, |
340 | (const struct timespec __user *)fifth); | 340 | second, |
341 | (const struct timespec __user *)fifth); | ||
341 | case SEMGET: | 342 | case SEMGET: |
342 | return sys_semget (first, second, third); | 343 | return sys_semget (first, second, third); |
343 | case SEMCTL: { | 344 | case SEMCTL: { |
344 | union semun fourth; | 345 | union semun fourth; |
345 | if (!ptr) | 346 | if (!ptr) |
346 | return -EINVAL; | 347 | return -EINVAL; |
347 | if (get_user(fourth.__pad, (void **) ptr)) | 348 | if (get_user(fourth.__pad, (void *__user *) ptr)) |
348 | return -EFAULT; | 349 | return -EFAULT; |
349 | return sys_semctl (first, second, third, fourth); | 350 | return sys_semctl (first, second, third, fourth); |
350 | } | 351 | } |
351 | 352 | ||
352 | case MSGSND: | 353 | case MSGSND: |
353 | return sys_msgsnd (first, (struct msgbuf *) ptr, | 354 | return sys_msgsnd (first, (struct msgbuf __user *) ptr, |
354 | second, third); | 355 | second, third); |
355 | case MSGRCV: | 356 | case MSGRCV: |
356 | switch (version) { | 357 | switch (version) { |
@@ -360,7 +361,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, | |||
360 | return -EINVAL; | 361 | return -EINVAL; |
361 | 362 | ||
362 | if (copy_from_user(&tmp, | 363 | if (copy_from_user(&tmp, |
363 | (struct ipc_kludge *) ptr, | 364 | (struct ipc_kludge __user *) ptr, |
364 | sizeof (tmp))) | 365 | sizeof (tmp))) |
365 | return -EFAULT; | 366 | return -EFAULT; |
366 | return sys_msgrcv (first, tmp.msgp, second, | 367 | return sys_msgrcv (first, tmp.msgp, second, |
@@ -368,35 +369,38 @@ asmlinkage int sys_ipc (uint call, int first, int second, | |||
368 | } | 369 | } |
369 | default: | 370 | default: |
370 | return sys_msgrcv (first, | 371 | return sys_msgrcv (first, |
371 | (struct msgbuf *) ptr, | 372 | (struct msgbuf __user *) ptr, |
372 | second, fifth, third); | 373 | second, fifth, third); |
373 | } | 374 | } |
374 | case MSGGET: | 375 | case MSGGET: |
375 | return sys_msgget ((key_t) first, second); | 376 | return sys_msgget ((key_t) first, second); |
376 | case MSGCTL: | 377 | case MSGCTL: |
377 | return sys_msgctl (first, second, (struct msqid_ds *) ptr); | 378 | return sys_msgctl (first, second, |
379 | (struct msqid_ds __user *) ptr); | ||
378 | 380 | ||
379 | case SHMAT: | 381 | case SHMAT: |
380 | switch (version) { | 382 | switch (version) { |
381 | default: { | 383 | default: { |
382 | ulong raddr; | 384 | ulong raddr; |
383 | ret = do_shmat (first, (char *) ptr, second, &raddr); | 385 | ret = do_shmat (first, (char __user *) ptr, second, |
386 | &raddr); | ||
384 | if (ret) | 387 | if (ret) |
385 | return ret; | 388 | return ret; |
386 | return put_user (raddr, (ulong *) third); | 389 | return put_user (raddr, (ulong __user *) third); |
387 | } | 390 | } |
388 | case 1: /* iBCS2 emulator entry point */ | 391 | case 1: /* iBCS2 emulator entry point */ |
389 | if (!segment_eq(get_fs(), get_ds())) | 392 | if (!segment_eq(get_fs(), get_ds())) |
390 | return -EINVAL; | 393 | return -EINVAL; |
391 | return do_shmat (first, (char *) ptr, second, (ulong *) third); | 394 | return do_shmat (first, (char __user *) ptr, second, |
395 | (ulong *) third); | ||
392 | } | 396 | } |
393 | case SHMDT: | 397 | case SHMDT: |
394 | return sys_shmdt ((char *)ptr); | 398 | return sys_shmdt ((char __user *)ptr); |
395 | case SHMGET: | 399 | case SHMGET: |
396 | return sys_shmget (first, second, third); | 400 | return sys_shmget (first, second, third); |
397 | case SHMCTL: | 401 | case SHMCTL: |
398 | return sys_shmctl (first, second, | 402 | return sys_shmctl (first, second, |
399 | (struct shmid_ds *) ptr); | 403 | (struct shmid_ds __user *) ptr); |
400 | default: | 404 | default: |
401 | return -ENOSYS; | 405 | return -ENOSYS; |
402 | } | 406 | } |
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c index dcd819d57dae..83eb08b7a072 100644 --- a/arch/mips/lasat/setup.c +++ b/arch/mips/lasat/setup.c | |||
@@ -134,8 +134,8 @@ void __init serial_init(void) | |||
134 | 134 | ||
135 | memset(&s, 0, sizeof(s)); | 135 | memset(&s, 0, sizeof(s)); |
136 | 136 | ||
137 | s.flags = STD_COM_FLAGS; | 137 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
138 | s.iotype = SERIAL_IO_MEM; | 138 | s.iotype = UPIO_MEM; |
139 | 139 | ||
140 | if (mips_machtype == MACH_LASAT_100) { | 140 | if (mips_machtype == MACH_LASAT_100) { |
141 | s.uartclk = LASAT_BASE_BAUD_100 * 16; | 141 | s.uartclk = LASAT_BASE_BAUD_100 * 16; |
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index 625843b30bed..873cf3141a31 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c | |||
@@ -82,8 +82,8 @@ static void __init serial_init(void) | |||
82 | #endif | 82 | #endif |
83 | s.irq = ATLASINT_UART; | 83 | s.irq = ATLASINT_UART; |
84 | s.uartclk = ATLAS_BASE_BAUD * 16; | 84 | s.uartclk = ATLAS_BASE_BAUD * 16; |
85 | s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ; | 85 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; |
86 | s.iotype = SERIAL_IO_PORT; | 86 | s.iotype = UPIO_PORT; |
87 | s.regshift = 3; | 87 | s.regshift = 3; |
88 | 88 | ||
89 | if (early_serial_setup(&s) != 0) { | 89 | if (early_serial_setup(&s) != 0) { |
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index f966bc161dfa..4266ce445174 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c | |||
@@ -71,8 +71,8 @@ static void __init serial_init(void) | |||
71 | #endif | 71 | #endif |
72 | s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0; | 72 | s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0; |
73 | s.uartclk = SEAD_BASE_BAUD * 16; | 73 | s.uartclk = SEAD_BASE_BAUD * 16; |
74 | s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ; | 74 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; |
75 | s.iotype = 0; | 75 | s.iotype = UPIO_PORT; |
76 | s.regshift = 3; | 76 | s.regshift = 3; |
77 | 77 | ||
78 | if (early_serial_setup(&s) != 0) { | 78 | if (early_serial_setup(&s) != 0) { |
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c index 485d5a58d9cf..a2fd62997ca3 100644 --- a/arch/mips/mips-boards/sim/sim_setup.c +++ b/arch/mips/mips-boards/sim/sim_setup.c | |||
@@ -88,8 +88,8 @@ static void __init serial_init(void) | |||
88 | but poll for now */ | 88 | but poll for now */ |
89 | s.irq = 0; | 89 | s.irq = 0; |
90 | s.uartclk = BASE_BAUD * 16; | 90 | s.uartclk = BASE_BAUD * 16; |
91 | s.flags = ASYNC_BOOT_AUTOCONF | UPF_SKIP_TEST; | 91 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
92 | s.iotype = SERIAL_IO_PORT | ASYNC_SKIP_TEST; | 92 | s.iotype = UPIO_PORT; |
93 | s.regshift = 0; | 93 | s.regshift = 0; |
94 | s.timeout = 4; | 94 | s.timeout = 4; |
95 | 95 | ||
diff --git a/arch/mips/momentum/jaguar_atx/ja-console.c b/arch/mips/momentum/jaguar_atx/ja-console.c index da6e1ed34db1..2292d0ec47fc 100644 --- a/arch/mips/momentum/jaguar_atx/ja-console.c +++ b/arch/mips/momentum/jaguar_atx/ja-console.c | |||
@@ -93,7 +93,7 @@ static void inline ja_console_probe(void) | |||
93 | up.uartclk = JAGUAR_ATX_UART_CLK; | 93 | up.uartclk = JAGUAR_ATX_UART_CLK; |
94 | up.regshift = 2; | 94 | up.regshift = 2; |
95 | up.iotype = UPIO_MEM; | 95 | up.iotype = UPIO_MEM; |
96 | up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 96 | up.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
97 | up.line = 0; | 97 | up.line = 0; |
98 | 98 | ||
99 | if (early_serial_setup(&up)) | 99 | if (early_serial_setup(&up)) |
diff --git a/arch/mips/philips/pnx8550/common/platform.c b/arch/mips/philips/pnx8550/common/platform.c index 8aa9bd65b45e..a592260fd673 100644 --- a/arch/mips/philips/pnx8550/common/platform.c +++ b/arch/mips/philips/pnx8550/common/platform.c | |||
@@ -66,28 +66,28 @@ struct ip3106_port ip3106_ports[] = { | |||
66 | [0] = { | 66 | [0] = { |
67 | .port = { | 67 | .port = { |
68 | .type = PORT_IP3106, | 68 | .type = PORT_IP3106, |
69 | .iotype = SERIAL_IO_MEM, | 69 | .iotype = UPIO_MEM, |
70 | .membase = (void __iomem *)PNX8550_UART_PORT0, | 70 | .membase = (void __iomem *)PNX8550_UART_PORT0, |
71 | .mapbase = PNX8550_UART_PORT0, | 71 | .mapbase = PNX8550_UART_PORT0, |
72 | .irq = PNX8550_UART_INT(0), | 72 | .irq = PNX8550_UART_INT(0), |
73 | .uartclk = 3692300, | 73 | .uartclk = 3692300, |
74 | .fifosize = 16, | 74 | .fifosize = 16, |
75 | .ops = &ip3106_pops, | 75 | .ops = &ip3106_pops, |
76 | .flags = ASYNC_BOOT_AUTOCONF, | 76 | .flags = UPF_BOOT_AUTOCONF, |
77 | .line = 0, | 77 | .line = 0, |
78 | }, | 78 | }, |
79 | }, | 79 | }, |
80 | [1] = { | 80 | [1] = { |
81 | .port = { | 81 | .port = { |
82 | .type = PORT_IP3106, | 82 | .type = PORT_IP3106, |
83 | .iotype = SERIAL_IO_MEM, | 83 | .iotype = UPIO_MEM, |
84 | .membase = (void __iomem *)PNX8550_UART_PORT1, | 84 | .membase = (void __iomem *)PNX8550_UART_PORT1, |
85 | .mapbase = PNX8550_UART_PORT1, | 85 | .mapbase = PNX8550_UART_PORT1, |
86 | .irq = PNX8550_UART_INT(1), | 86 | .irq = PNX8550_UART_INT(1), |
87 | .uartclk = 3692300, | 87 | .uartclk = 3692300, |
88 | .fifosize = 16, | 88 | .fifosize = 16, |
89 | .ops = &ip3106_pops, | 89 | .ops = &ip3106_pops, |
90 | .flags = ASYNC_BOOT_AUTOCONF, | 90 | .flags = UPF_BOOT_AUTOCONF, |
91 | .line = 1, | 91 | .line = 1, |
92 | }, | 92 | }, |
93 | }, | 93 | }, |
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 059755b5ed57..8bce711575de 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c | |||
@@ -185,7 +185,7 @@ static void __init py_uart_setup(void) | |||
185 | up.uartclk = TITAN_UART_CLK; | 185 | up.uartclk = TITAN_UART_CLK; |
186 | up.regshift = 0; | 186 | up.regshift = 0; |
187 | up.iotype = UPIO_MEM; | 187 | up.iotype = UPIO_MEM; |
188 | up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 188 | up.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
189 | up.line = 0; | 189 | up.line = 0; |
190 | 190 | ||
191 | if (early_serial_setup(&up)) | 191 | if (early_serial_setup(&up)) |
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c index d10a269aeae1..2c38770b1e1b 100644 --- a/arch/mips/sgi-ip32/ip32-setup.c +++ b/arch/mips/sgi-ip32/ip32-setup.c | |||
@@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str) | |||
66 | #include <linux/tty.h> | 66 | #include <linux/tty.h> |
67 | #include <linux/serial.h> | 67 | #include <linux/serial.h> |
68 | #include <linux/serial_core.h> | 68 | #include <linux/serial_core.h> |
69 | extern int early_serial_setup(struct uart_port *port); | ||
70 | |||
71 | #define STD_COM_FLAGS (ASYNC_SKIP_TEST) | ||
72 | #define BASE_BAUD (1843200 / 16) | ||
73 | |||
74 | #endif /* CONFIG_SERIAL_8250 */ | 69 | #endif /* CONFIG_SERIAL_8250 */ |
75 | 70 | ||
76 | /* An arbitrary time; this can be decreased if reliability looks good */ | 71 | /* An arbitrary time; this can be decreased if reliability looks good */ |
@@ -110,8 +105,8 @@ void __init plat_setup(void) | |||
110 | o2_serial[0].type = PORT_16550A; | 105 | o2_serial[0].type = PORT_16550A; |
111 | o2_serial[0].line = 0; | 106 | o2_serial[0].line = 0; |
112 | o2_serial[0].irq = MACEISA_SERIAL1_IRQ; | 107 | o2_serial[0].irq = MACEISA_SERIAL1_IRQ; |
113 | o2_serial[0].flags = STD_COM_FLAGS; | 108 | o2_serial[0].flags = UPF_SKIP_TEST; |
114 | o2_serial[0].uartclk = BASE_BAUD * 16; | 109 | o2_serial[0].uartclk = 1843200; |
115 | o2_serial[0].iotype = UPIO_MEM; | 110 | o2_serial[0].iotype = UPIO_MEM; |
116 | o2_serial[0].membase = (char *)&mace->isa.serial1; | 111 | o2_serial[0].membase = (char *)&mace->isa.serial1; |
117 | o2_serial[0].fifosize = 14; | 112 | o2_serial[0].fifosize = 14; |
@@ -121,8 +116,8 @@ void __init plat_setup(void) | |||
121 | o2_serial[1].type = PORT_16550A; | 116 | o2_serial[1].type = PORT_16550A; |
122 | o2_serial[1].line = 1; | 117 | o2_serial[1].line = 1; |
123 | o2_serial[1].irq = MACEISA_SERIAL2_IRQ; | 118 | o2_serial[1].irq = MACEISA_SERIAL2_IRQ; |
124 | o2_serial[1].flags = STD_COM_FLAGS; | 119 | o2_serial[1].flags = UPF_SKIP_TEST; |
125 | o2_serial[1].uartclk = BASE_BAUD * 16; | 120 | o2_serial[1].uartclk = 1843200; |
126 | o2_serial[1].iotype = UPIO_MEM; | 121 | o2_serial[1].iotype = UPIO_MEM; |
127 | o2_serial[1].membase = (char *)&mace->isa.serial2; | 122 | o2_serial[1].membase = (char *)&mace->isa.serial2; |
128 | o2_serial[1].fifosize = 14; | 123 | o2_serial[1].fifosize = 14; |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 29b4d61898f2..05273ccced0e 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
@@ -468,19 +468,23 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) | |||
468 | if ( opcode == 1 ) { /* GETFSIND */ | 468 | if ( opcode == 1 ) { /* GETFSIND */ |
469 | len = strlen_user((char *)arg1); | 469 | len = strlen_user((char *)arg1); |
470 | printk(KERN_DEBUG "len of arg1 = %d\n", len); | 470 | printk(KERN_DEBUG "len of arg1 = %d\n", len); |
471 | 471 | if (len == 0) | |
472 | fsname = (char *) kmalloc(len+1, GFP_KERNEL); | 472 | return 0; |
473 | fsname = (char *) kmalloc(len, GFP_KERNEL); | ||
473 | if ( !fsname ) { | 474 | if ( !fsname ) { |
474 | printk(KERN_DEBUG "failed to kmalloc fsname\n"); | 475 | printk(KERN_DEBUG "failed to kmalloc fsname\n"); |
475 | return 0; | 476 | return 0; |
476 | } | 477 | } |
477 | 478 | ||
478 | if ( copy_from_user(fsname, (char *)arg1, len+1) ) { | 479 | if ( copy_from_user(fsname, (char *)arg1, len) ) { |
479 | printk(KERN_DEBUG "failed to copy_from_user fsname\n"); | 480 | printk(KERN_DEBUG "failed to copy_from_user fsname\n"); |
480 | kfree(fsname); | 481 | kfree(fsname); |
481 | return 0; | 482 | return 0; |
482 | } | 483 | } |
483 | 484 | ||
485 | /* String could be altered by userspace after strlen_user() */ | ||
486 | fsname[len] = '\0'; | ||
487 | |||
484 | printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname); | 488 | printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname); |
485 | if ( !strcmp(fsname, "hfs") ) { | 489 | if ( !strcmp(fsname, "hfs") ) { |
486 | fstype = 0; | 490 | fstype = 0; |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index e4362dfa37fb..340730fb8c91 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) | |||
66 | #else | 66 | #else |
67 | ld r4,PACACURRENT(r13) | 67 | ld r4,PACACURRENT(r13) |
68 | addi r5,r4,THREAD /* Get THREAD */ | 68 | addi r5,r4,THREAD /* Get THREAD */ |
69 | ld r4,THREAD_FPEXC_MODE(r5) | 69 | lwz r4,THREAD_FPEXC_MODE(r5) |
70 | ori r12,r12,MSR_FP | 70 | ori r12,r12,MSR_FP |
71 | or r12,r12,r4 | 71 | or r12,r12,r4 |
72 | std r12,_MSR(r1) | 72 | std r12,_MSR(r1) |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 308268466342..415659629394 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -749,11 +749,12 @@ iSeries_secondary_smp_loop: | |||
749 | 749 | ||
750 | .globl decrementer_iSeries_masked | 750 | .globl decrementer_iSeries_masked |
751 | decrementer_iSeries_masked: | 751 | decrementer_iSeries_masked: |
752 | /* We may not have a valid TOC pointer in here. */ | ||
752 | li r11,1 | 753 | li r11,1 |
753 | ld r12,PACALPPACAPTR(r13) | 754 | ld r12,PACALPPACAPTR(r13) |
754 | stb r11,LPPACADECRINT(r12) | 755 | stb r11,LPPACADECRINT(r12) |
755 | LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) | 756 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) |
756 | lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) | 757 | lwz r12,0(r12) |
757 | mtspr SPRN_DEC,r12 | 758 | mtspr SPRN_DEC,r12 |
758 | /* fall through */ | 759 | /* fall through */ |
759 | 760 | ||
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 4d9b4388918b..946f3219fd29 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
334 | 334 | ||
335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
336 | 336 | ||
337 | /* Make sure updates are seen by hardware */ | ||
338 | mb(); | ||
339 | |||
340 | DBG("mapped %d elements:\n", outcount); | 337 | DBG("mapped %d elements:\n", outcount); |
341 | 338 | ||
342 | /* For the sake of iommu_unmap_sg, we clear out the length in the | 339 | /* For the sake of iommu_unmap_sg, we clear out the length in the |
@@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
347 | outs->dma_address = DMA_ERROR_CODE; | 344 | outs->dma_address = DMA_ERROR_CODE; |
348 | outs->dma_length = 0; | 345 | outs->dma_length = 0; |
349 | } | 346 | } |
347 | |||
348 | /* Make sure updates are seen by hardware */ | ||
349 | mb(); | ||
350 | |||
350 | return outcount; | 351 | return outcount; |
351 | 352 | ||
352 | failure: | 353 | failure: |
@@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
358 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) | 359 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) |
359 | >> PAGE_SHIFT; | 360 | >> PAGE_SHIFT; |
360 | __iommu_free(tbl, vaddr, npages); | 361 | __iommu_free(tbl, vaddr, npages); |
362 | s->dma_address = DMA_ERROR_CODE; | ||
363 | s->dma_length = 0; | ||
361 | } | 364 | } |
362 | } | 365 | } |
363 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 366 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index d50c8df0183e..294832a7e0a6 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -491,7 +491,12 @@ void __init finish_device_tree(void) | |||
491 | size = 16; | 491 | size = 16; |
492 | finish_node(allnodes, &size, 1); | 492 | finish_node(allnodes, &size, 1); |
493 | size -= 16; | 493 | size -= 16; |
494 | end = start = (unsigned long) __va(lmb_alloc(size, 128)); | 494 | |
495 | if (0 == size) | ||
496 | end = start = 0; | ||
497 | else | ||
498 | end = start = (unsigned long)__va(lmb_alloc(size, 128)); | ||
499 | |||
495 | finish_node(allnodes, &end, 0); | 500 | finish_node(allnodes, &end, 0); |
496 | BUG_ON(end != start + size); | 501 | BUG_ON(end != start + size); |
497 | 502 | ||
@@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, | |||
1398 | 1403 | ||
1399 | read_lock(&devtree_lock); | 1404 | read_lock(&devtree_lock); |
1400 | np = from ? from->allnext : allnodes; | 1405 | np = from ? from->allnext : allnodes; |
1401 | for (; np != 0; np = np->allnext) | 1406 | for (; np != NULL; np = np->allnext) |
1402 | if (np->name != 0 && strcasecmp(np->name, name) == 0 | 1407 | if (np->name != NULL && strcasecmp(np->name, name) == 0 |
1403 | && of_node_get(np)) | 1408 | && of_node_get(np)) |
1404 | break; | 1409 | break; |
1405 | if (from) | 1410 | if (from) |
@@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np, | |||
1917 | 1922 | ||
1918 | return 0; | 1923 | return 0; |
1919 | } | 1924 | } |
1925 | |||
1926 | #ifdef CONFIG_KEXEC | ||
1927 | /* We may have allocated the flat device tree inside the crash kernel region | ||
1928 | * in prom_init. If so we need to move it out into regular memory. */ | ||
1929 | void kdump_move_device_tree(void) | ||
1930 | { | ||
1931 | unsigned long start, end; | ||
1932 | struct boot_param_header *new; | ||
1933 | |||
1934 | start = __pa((unsigned long)initial_boot_params); | ||
1935 | end = start + initial_boot_params->totalsize; | ||
1936 | |||
1937 | if (end < crashk_res.start || start > crashk_res.end) | ||
1938 | return; | ||
1939 | |||
1940 | new = (struct boot_param_header*) | ||
1941 | __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); | ||
1942 | |||
1943 | memcpy(new, initial_boot_params, initial_boot_params->totalsize); | ||
1944 | |||
1945 | initial_boot_params = new; | ||
1946 | |||
1947 | DBG("Flat device tree blob moved to %p\n", initial_boot_params); | ||
1948 | |||
1949 | /* XXX should we unreserve the old DT? */ | ||
1950 | } | ||
1951 | #endif /* CONFIG_KEXEC */ | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 7881ec96ef11..ec7153f4d47c 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2098 | */ | 2098 | */ |
2099 | prom_init_stdout(); | 2099 | prom_init_stdout(); |
2100 | 2100 | ||
2101 | /* Bail if this is a kdump kernel. */ | ||
2102 | if (PHYSICAL_START > 0) | ||
2103 | prom_panic("Error: You can't boot a kdump kernel from OF!\n"); | ||
2104 | |||
2101 | /* | 2105 | /* |
2102 | * Check for an initrd | 2106 | * Check for an initrd |
2103 | */ | 2107 | */ |
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index a8099c806150..3934c227549b 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | |||
465 | if (parent == NULL) | 465 | if (parent == NULL) |
466 | return NULL; | 466 | return NULL; |
467 | bus = of_match_bus(parent); | 467 | bus = of_match_bus(parent); |
468 | if (strcmp(bus->name, "pci")) | 468 | if (strcmp(bus->name, "pci")) { |
469 | of_node_put(parent); | ||
469 | return NULL; | 470 | return NULL; |
471 | } | ||
470 | bus->count_cells(dev, &na, &ns); | 472 | bus->count_cells(dev, &na, &ns); |
471 | of_node_put(parent); | 473 | of_node_put(parent); |
472 | if (!OF_CHECK_COUNTS(na, ns)) | 474 | if (!OF_CHECK_COUNTS(na, ns)) |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 7fe4a5c944c9..b5b2add7ad1e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
24 | #include <asm/rtas.h> | 24 | #include <asm/rtas.h> |
25 | #include <asm/hvcall.h> | ||
25 | #include <asm/semaphore.h> | 26 | #include <asm/semaphore.h> |
26 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
@@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | |||
565 | #ifdef CONFIG_PPC_PSERIES | 566 | #ifdef CONFIG_PPC_PSERIES |
566 | static void rtas_percpu_suspend_me(void *info) | 567 | static void rtas_percpu_suspend_me(void *info) |
567 | { | 568 | { |
569 | int i; | ||
568 | long rc; | 570 | long rc; |
569 | long flags; | 571 | long flags; |
570 | struct rtas_suspend_me_data *data = | 572 | struct rtas_suspend_me_data *data = |
@@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info) | |||
587 | 589 | ||
588 | if (rc == H_Continue) { | 590 | if (rc == H_Continue) { |
589 | data->waiting = 0; | 591 | data->waiting = 0; |
590 | rtas_call(ibm_suspend_me_token, 0, 1, | 592 | data->args->args[data->args->nargs] = |
591 | data->args->args); | 593 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); |
594 | for_each_cpu(i) | ||
595 | plpar_hcall_norets(H_PROD,i); | ||
592 | } else { | 596 | } else { |
593 | data->waiting = -EBUSY; | 597 | data->waiting = -EBUSY; |
594 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); | 598 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); |
595 | } | 599 | } |
596 | 600 | ||
597 | out: | 601 | out: |
598 | /* before we restore interrupts, make sure we don't | ||
599 | * generate a spurious soft lockup errors | ||
600 | */ | ||
601 | touch_softlockup_watchdog(); | ||
602 | local_irq_restore(flags); | 602 | local_irq_restore(flags); |
603 | return; | 603 | return; |
604 | } | 604 | } |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 50500093c97f..aaf384c3f04a 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type) | |||
672 | static void remove_flash_pde(struct proc_dir_entry *dp) | 672 | static void remove_flash_pde(struct proc_dir_entry *dp) |
673 | { | 673 | { |
674 | if (dp) { | 674 | if (dp) { |
675 | if (dp->data != NULL) | 675 | kfree(dp->data); |
676 | kfree(dp->data); | ||
677 | dp->owner = NULL; | 676 | dp->owner = NULL; |
678 | remove_proc_entry(dp->name, dp->parent); | 677 | remove_proc_entry(dp->name, dp->parent); |
679 | } | 678 | } |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index e29b275e09e0..a717dff695ef 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -398,6 +398,9 @@ void __init setup_system(void) | |||
398 | { | 398 | { |
399 | DBG(" -> setup_system()\n"); | 399 | DBG(" -> setup_system()\n"); |
400 | 400 | ||
401 | #ifdef CONFIG_KEXEC | ||
402 | kdump_move_device_tree(); | ||
403 | #endif | ||
401 | /* | 404 | /* |
402 | * Unflatten the device-tree passed by prom_init or kexec | 405 | * Unflatten the device-tree passed by prom_init or kexec |
403 | */ | 406 | */ |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index c6d0595da6b5..bd837b5dbf06 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -142,11 +142,7 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | static inline compat_uptr_t to_user_ptr(void *kp) | 145 | #define to_user_ptr(p) ptr_to_compat(p) |
146 | { | ||
147 | return (compat_uptr_t)(u64)kp; | ||
148 | } | ||
149 | |||
150 | #define from_user_ptr(p) compat_ptr(p) | 146 | #define from_user_ptr(p) compat_ptr(p) |
151 | 147 | ||
152 | static inline int save_general_regs(struct pt_regs *regs, | 148 | static inline int save_general_regs(struct pt_regs *regs, |
@@ -213,8 +209,8 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
213 | return 0; | 209 | return 0; |
214 | } | 210 | } |
215 | 211 | ||
216 | #define to_user_ptr(p) (p) | 212 | #define to_user_ptr(p) ((unsigned long)(p)) |
217 | #define from_user_ptr(p) (p) | 213 | #define from_user_ptr(p) ((void __user *)(p)) |
218 | 214 | ||
219 | static inline int save_general_regs(struct pt_regs *regs, | 215 | static inline int save_general_regs(struct pt_regs *regs, |
220 | struct mcontext __user *frame) | 216 | struct mcontext __user *frame) |
@@ -526,7 +522,7 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act, | |||
526 | 522 | ||
527 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | 523 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); |
528 | if (!ret && oact) { | 524 | if (!ret && oact) { |
529 | ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler); | 525 | ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler); |
530 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); | 526 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); |
531 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | 527 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); |
532 | } | 528 | } |
@@ -675,8 +671,8 @@ long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo | |||
675 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | 671 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, |
676 | int r6, int r7, int r8, struct pt_regs *regs) | 672 | int r6, int r7, int r8, struct pt_regs *regs) |
677 | { | 673 | { |
678 | stack_32_t __user * newstack = (stack_32_t __user *)(long) __new; | 674 | stack_32_t __user * newstack = compat_ptr(__new); |
679 | stack_32_t __user * oldstack = (stack_32_t __user *)(long) __old; | 675 | stack_32_t __user * oldstack = compat_ptr(__old); |
680 | stack_t uss, uoss; | 676 | stack_t uss, uoss; |
681 | int ret; | 677 | int ret; |
682 | mm_segment_t old_fs; | 678 | mm_segment_t old_fs; |
@@ -708,7 +704,7 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | |||
708 | set_fs(old_fs); | 704 | set_fs(old_fs); |
709 | /* Copy the stack information to the user output buffer */ | 705 | /* Copy the stack information to the user output buffer */ |
710 | if (!ret && oldstack && | 706 | if (!ret && oldstack && |
711 | (put_user((long)uoss.ss_sp, &oldstack->ss_sp) || | 707 | (put_user(ptr_to_compat(uoss.ss_sp), &oldstack->ss_sp) || |
712 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || | 708 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || |
713 | __put_user(uoss.ss_size, &oldstack->ss_size))) | 709 | __put_user(uoss.ss_size, &oldstack->ss_size))) |
714 | return -EFAULT; | 710 | return -EFAULT; |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index b3193116e686..497a5d3df359 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -60,8 +60,8 @@ struct rt_sigframe { | |||
60 | struct ucontext uc; | 60 | struct ucontext uc; |
61 | unsigned long _unused[2]; | 61 | unsigned long _unused[2]; |
62 | unsigned int tramp[TRAMP_SIZE]; | 62 | unsigned int tramp[TRAMP_SIZE]; |
63 | struct siginfo *pinfo; | 63 | struct siginfo __user *pinfo; |
64 | void *puc; | 64 | void __user *puc; |
65 | struct siginfo info; | 65 | struct siginfo info; |
66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ | 66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ |
67 | char abigap[288]; | 67 | char abigap[288]; |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index c8458c531b25..13595a64f013 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused) | |||
540 | if (smp_ops->take_timebase) | 540 | if (smp_ops->take_timebase) |
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | ||
544 | per_cpu(last_jiffy, cpu) = get_tb(); | ||
545 | |||
543 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
544 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
545 | spin_unlock(&call_lock); | 548 | spin_unlock(&call_lock); |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c4a294d657b9..1886045a2fd8 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void) | |||
612 | 612 | ||
613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ | 613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ |
614 | node_found = 0; | 614 | node_found = 0; |
615 | if (cpu != 0) { | 615 | if (cpu) { |
616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", | 616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", |
617 | NULL); | 617 | NULL); |
618 | if (fp != 0) { | 618 | if (fp) { |
619 | node_found = 1; | 619 | node_found = 1; |
620 | ppc_tb_freq = *fp; | 620 | ppc_tb_freq = *fp; |
621 | } | 621 | } |
@@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void) | |||
626 | 626 | ||
627 | ppc_proc_freq = DEFAULT_PROC_FREQ; | 627 | ppc_proc_freq = DEFAULT_PROC_FREQ; |
628 | node_found = 0; | 628 | node_found = 0; |
629 | if (cpu != 0) { | 629 | if (cpu) { |
630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", | 630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", |
631 | NULL); | 631 | NULL); |
632 | if (fp != 0) { | 632 | if (fp) { |
633 | node_found = 1; | 633 | node_found = 1; |
634 | ppc_proc_freq = *fp; | 634 | ppc_proc_freq = *fp; |
635 | } | 635 | } |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 2da65a9c93f6..5d29dcca523c 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PPC_MAPLE | 146 | #ifdef CONFIG_PPC_MAPLE |
147 | void udbg_maple_real_putc(unsigned char c) | 147 | void udbg_maple_real_putc(char c) |
148 | { | 148 | { |
149 | if (udbg_comport) { | 149 | if (udbg_comport) { |
150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) | 150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 9584608fd768..bbe3eac918e8 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -197,6 +197,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size) | |||
197 | { | 197 | { |
198 | struct lmb_region *_rgn = &(lmb.reserved); | 198 | struct lmb_region *_rgn = &(lmb.reserved); |
199 | 199 | ||
200 | BUG_ON(0 == size); | ||
201 | |||
200 | return lmb_add_region(_rgn, base, size); | 202 | return lmb_add_region(_rgn, base, size); |
201 | } | 203 | } |
202 | 204 | ||
@@ -227,6 +229,8 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | |||
227 | long i, j; | 229 | long i, j; |
228 | unsigned long base = 0; | 230 | unsigned long base = 0; |
229 | 231 | ||
232 | BUG_ON(0 == size); | ||
233 | |||
230 | #ifdef CONFIG_PPC32 | 234 | #ifdef CONFIG_PPC32 |
231 | /* On 32-bit, make sure we allocate lowmem */ | 235 | /* On 32-bit, make sure we allocate lowmem */ |
232 | if (max_addr == LMB_ALLOC_ANYWHERE) | 236 | if (max_addr == LMB_ALLOC_ANYWHERE) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 15aac0d78dfa..550517c2dd42 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -435,17 +435,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
435 | { | 435 | { |
436 | clear_page(page); | 436 | clear_page(page); |
437 | 437 | ||
438 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | ||
439 | return; | ||
440 | /* | 438 | /* |
441 | * We shouldnt have to do this, but some versions of glibc | 439 | * We shouldnt have to do this, but some versions of glibc |
442 | * require it (ld.so assumes zero filled pages are icache clean) | 440 | * require it (ld.so assumes zero filled pages are icache clean) |
443 | * - Anton | 441 | * - Anton |
444 | */ | 442 | */ |
445 | 443 | flush_dcache_page(pg); | |
446 | /* avoid an atomic op if possible */ | ||
447 | if (test_bit(PG_arch_1, &pg->flags)) | ||
448 | clear_bit(PG_arch_1, &pg->flags); | ||
449 | } | 444 | } |
450 | EXPORT_SYMBOL(clear_user_page); | 445 | EXPORT_SYMBOL(clear_user_page); |
451 | 446 | ||
@@ -469,12 +464,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | |||
469 | return; | 464 | return; |
470 | #endif | 465 | #endif |
471 | 466 | ||
472 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | 467 | flush_dcache_page(pg); |
473 | return; | ||
474 | |||
475 | /* avoid an atomic op if possible */ | ||
476 | if (test_bit(PG_arch_1, &pg->flags)) | ||
477 | clear_bit(PG_arch_1, &pg->flags); | ||
478 | } | 468 | } |
479 | 469 | ||
480 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | 470 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, |
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index 16031b565be4..3b998a393e3f 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -2,7 +2,7 @@ obj-y += interrupt.o iommu.o setup.o spider-pic.o | |||
2 | obj-y += pervasive.o | 2 | obj-y += pervasive.o |
3 | 3 | ||
4 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
5 | obj-$(CONFIG_SPU_FS) += spufs/ spu-base.o | 5 | obj-$(CONFIG_SPU_FS) += spu-base.o spufs/ |
6 | 6 | ||
7 | spu-base-y += spu_base.o spu_priv1.o | 7 | spu-base-y += spu_base.o spu_priv1.o |
8 | 8 | ||
diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h index 3a2057fa314a..814f54742e0f 100644 --- a/arch/powerpc/platforms/chrp/chrp.h +++ b/arch/powerpc/platforms/chrp/chrp.h | |||
@@ -5,7 +5,6 @@ | |||
5 | extern void chrp_nvram_init(void); | 5 | extern void chrp_nvram_init(void); |
6 | extern void chrp_get_rtc_time(struct rtc_time *); | 6 | extern void chrp_get_rtc_time(struct rtc_time *); |
7 | extern int chrp_set_rtc_time(struct rtc_time *); | 7 | extern int chrp_set_rtc_time(struct rtc_time *); |
8 | extern void chrp_calibrate_decr(void); | ||
9 | extern long chrp_time_init(void); | 8 | extern long chrp_time_init(void); |
10 | 9 | ||
11 | extern void chrp_find_bridges(void); | 10 | extern void chrp_find_bridges(void); |
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 00c52f27ef4f..8ef279ad36ad 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -204,9 +204,11 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
204 | struct device_node *root = find_path_device("/"); | 204 | struct device_node *root = find_path_device("/"); |
205 | struct device_node *rtas; | 205 | struct device_node *rtas; |
206 | 206 | ||
207 | of_node_get(root); | ||
207 | rtas = of_find_node_by_name (root, "rtas"); | 208 | rtas = of_find_node_by_name (root, "rtas"); |
208 | if (rtas) { | 209 | if (rtas) { |
209 | hose->ops = &rtas_pci_ops; | 210 | hose->ops = &rtas_pci_ops; |
211 | of_node_put(rtas); | ||
210 | } else { | 212 | } else { |
211 | printk ("RTAS supporting Pegasos OF not found, please upgrade" | 213 | printk ("RTAS supporting Pegasos OF not found, please upgrade" |
212 | " your firmware\n"); | 214 | " your firmware\n"); |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 2dc87aa5962f..e1fadbf49150 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -506,7 +506,7 @@ void __init chrp_init(void) | |||
506 | ppc_md.halt = rtas_halt; | 506 | ppc_md.halt = rtas_halt; |
507 | 507 | ||
508 | ppc_md.time_init = chrp_time_init; | 508 | ppc_md.time_init = chrp_time_init; |
509 | ppc_md.calibrate_decr = chrp_calibrate_decr; | 509 | ppc_md.calibrate_decr = generic_calibrate_decr; |
510 | 510 | ||
511 | /* this may get overridden with rtas routines later... */ | 511 | /* this may get overridden with rtas routines later... */ |
512 | ppc_md.set_rtc_time = chrp_set_rtc_time; | 512 | ppc_md.set_rtc_time = chrp_set_rtc_time; |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 36a0f97bb7b1..78df2e7ca88a 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm) | |||
167 | tm->tm_mon = mon; | 167 | tm->tm_mon = mon; |
168 | tm->tm_year = year; | 168 | tm->tm_year = year; |
169 | } | 169 | } |
170 | |||
171 | |||
172 | void __init chrp_calibrate_decr(void) | ||
173 | { | ||
174 | struct device_node *cpu; | ||
175 | unsigned int freq, *fp; | ||
176 | |||
177 | /* | ||
178 | * The cpu node should have a timebase-frequency property | ||
179 | * to tell us the rate at which the decrementer counts. | ||
180 | */ | ||
181 | freq = 16666000; /* hardcoded default */ | ||
182 | cpu = find_type_devices("cpu"); | ||
183 | if (cpu != 0) { | ||
184 | fp = (unsigned int *) | ||
185 | get_property(cpu, "timebase-frequency", NULL); | ||
186 | if (fp != 0) | ||
187 | freq = *fp; | ||
188 | } | ||
189 | ppc_tb_freq = freq; | ||
190 | } | ||
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 535c802b369f..87eb6bb7f0e7 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1052,8 +1052,7 @@ struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter) | |||
1052 | } | 1052 | } |
1053 | EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus); | 1053 | EXPORT_SYMBOL_GPL(pmac_i2c_adapter_to_bus); |
1054 | 1054 | ||
1055 | extern int pmac_i2c_match_adapter(struct device_node *dev, | 1055 | int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter) |
1056 | struct i2c_adapter *adapter) | ||
1057 | { | 1056 | { |
1058 | struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev); | 1057 | struct pmac_i2c_bus *bus = pmac_i2c_find_bus(dev); |
1059 | 1058 | ||
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index f671ed253901..de3f30e6b333 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -136,14 +136,14 @@ static void __init fixup_bus_range(struct device_node *bridge) | |||
136 | |(((unsigned int)(off)) & 0xFCUL) \ | 136 | |(((unsigned int)(off)) & 0xFCUL) \ |
137 | |1UL) | 137 | |1UL) |
138 | 138 | ||
139 | static unsigned long macrisc_cfg_access(struct pci_controller* hose, | 139 | static volatile void __iomem *macrisc_cfg_access(struct pci_controller* hose, |
140 | u8 bus, u8 dev_fn, u8 offset) | 140 | u8 bus, u8 dev_fn, u8 offset) |
141 | { | 141 | { |
142 | unsigned int caddr; | 142 | unsigned int caddr; |
143 | 143 | ||
144 | if (bus == hose->first_busno) { | 144 | if (bus == hose->first_busno) { |
145 | if (dev_fn < (11 << 3)) | 145 | if (dev_fn < (11 << 3)) |
146 | return 0; | 146 | return NULL; |
147 | caddr = MACRISC_CFA0(dev_fn, offset); | 147 | caddr = MACRISC_CFA0(dev_fn, offset); |
148 | } else | 148 | } else |
149 | caddr = MACRISC_CFA1(bus, dev_fn, offset); | 149 | caddr = MACRISC_CFA1(bus, dev_fn, offset); |
@@ -154,14 +154,14 @@ static unsigned long macrisc_cfg_access(struct pci_controller* hose, | |||
154 | } while (in_le32(hose->cfg_addr) != caddr); | 154 | } while (in_le32(hose->cfg_addr) != caddr); |
155 | 155 | ||
156 | offset &= has_uninorth ? 0x07 : 0x03; | 156 | offset &= has_uninorth ? 0x07 : 0x03; |
157 | return ((unsigned long)hose->cfg_data) + offset; | 157 | return hose->cfg_data + offset; |
158 | } | 158 | } |
159 | 159 | ||
160 | static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, | 160 | static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, |
161 | int offset, int len, u32 *val) | 161 | int offset, int len, u32 *val) |
162 | { | 162 | { |
163 | struct pci_controller *hose; | 163 | struct pci_controller *hose; |
164 | unsigned long addr; | 164 | volatile void __iomem *addr; |
165 | 165 | ||
166 | hose = pci_bus_to_host(bus); | 166 | hose = pci_bus_to_host(bus); |
167 | if (hose == NULL) | 167 | if (hose == NULL) |
@@ -177,13 +177,13 @@ static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn, | |||
177 | */ | 177 | */ |
178 | switch (len) { | 178 | switch (len) { |
179 | case 1: | 179 | case 1: |
180 | *val = in_8((u8 *)addr); | 180 | *val = in_8(addr); |
181 | break; | 181 | break; |
182 | case 2: | 182 | case 2: |
183 | *val = in_le16((u16 *)addr); | 183 | *val = in_le16(addr); |
184 | break; | 184 | break; |
185 | default: | 185 | default: |
186 | *val = in_le32((u32 *)addr); | 186 | *val = in_le32(addr); |
187 | break; | 187 | break; |
188 | } | 188 | } |
189 | return PCIBIOS_SUCCESSFUL; | 189 | return PCIBIOS_SUCCESSFUL; |
@@ -193,7 +193,7 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
193 | int offset, int len, u32 val) | 193 | int offset, int len, u32 val) |
194 | { | 194 | { |
195 | struct pci_controller *hose; | 195 | struct pci_controller *hose; |
196 | unsigned long addr; | 196 | volatile void __iomem *addr; |
197 | 197 | ||
198 | hose = pci_bus_to_host(bus); | 198 | hose = pci_bus_to_host(bus); |
199 | if (hose == NULL) | 199 | if (hose == NULL) |
@@ -209,16 +209,16 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
209 | */ | 209 | */ |
210 | switch (len) { | 210 | switch (len) { |
211 | case 1: | 211 | case 1: |
212 | out_8((u8 *)addr, val); | 212 | out_8(addr, val); |
213 | (void) in_8((u8 *)addr); | 213 | (void) in_8(addr); |
214 | break; | 214 | break; |
215 | case 2: | 215 | case 2: |
216 | out_le16((u16 *)addr, val); | 216 | out_le16(addr, val); |
217 | (void) in_le16((u16 *)addr); | 217 | (void) in_le16(addr); |
218 | break; | 218 | break; |
219 | default: | 219 | default: |
220 | out_le32((u32 *)addr, val); | 220 | out_le32(addr, val); |
221 | (void) in_le32((u32 *)addr); | 221 | (void) in_le32(addr); |
222 | break; | 222 | break; |
223 | } | 223 | } |
224 | return PCIBIOS_SUCCESSFUL; | 224 | return PCIBIOS_SUCCESSFUL; |
@@ -348,25 +348,23 @@ static int u3_ht_skip_device(struct pci_controller *hose, | |||
348 | + (((unsigned int)bus) << 16) \ | 348 | + (((unsigned int)bus) << 16) \ |
349 | + 0x01000000UL) | 349 | + 0x01000000UL) |
350 | 350 | ||
351 | static unsigned long u3_ht_cfg_access(struct pci_controller* hose, | 351 | static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, |
352 | u8 bus, u8 devfn, u8 offset) | 352 | u8 bus, u8 devfn, u8 offset) |
353 | { | 353 | { |
354 | if (bus == hose->first_busno) { | 354 | if (bus == hose->first_busno) { |
355 | /* For now, we don't self probe U3 HT bridge */ | 355 | /* For now, we don't self probe U3 HT bridge */ |
356 | if (PCI_SLOT(devfn) == 0) | 356 | if (PCI_SLOT(devfn) == 0) |
357 | return 0; | 357 | return NULL; |
358 | return ((unsigned long)hose->cfg_data) + | 358 | return hose->cfg_data + U3_HT_CFA0(devfn, offset); |
359 | U3_HT_CFA0(devfn, offset); | ||
360 | } else | 359 | } else |
361 | return ((unsigned long)hose->cfg_data) + | 360 | return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); |
362 | U3_HT_CFA1(bus, devfn, offset); | ||
363 | } | 361 | } |
364 | 362 | ||
365 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | 363 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, |
366 | int offset, int len, u32 *val) | 364 | int offset, int len, u32 *val) |
367 | { | 365 | { |
368 | struct pci_controller *hose; | 366 | struct pci_controller *hose; |
369 | unsigned long addr; | 367 | volatile void __iomem *addr; |
370 | 368 | ||
371 | hose = pci_bus_to_host(bus); | 369 | hose = pci_bus_to_host(bus); |
372 | if (hose == NULL) | 370 | if (hose == NULL) |
@@ -400,13 +398,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | |||
400 | */ | 398 | */ |
401 | switch (len) { | 399 | switch (len) { |
402 | case 1: | 400 | case 1: |
403 | *val = in_8((u8 *)addr); | 401 | *val = in_8(addr); |
404 | break; | 402 | break; |
405 | case 2: | 403 | case 2: |
406 | *val = in_le16((u16 *)addr); | 404 | *val = in_le16(addr); |
407 | break; | 405 | break; |
408 | default: | 406 | default: |
409 | *val = in_le32((u32 *)addr); | 407 | *val = in_le32(addr); |
410 | break; | 408 | break; |
411 | } | 409 | } |
412 | return PCIBIOS_SUCCESSFUL; | 410 | return PCIBIOS_SUCCESSFUL; |
@@ -416,7 +414,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
416 | int offset, int len, u32 val) | 414 | int offset, int len, u32 val) |
417 | { | 415 | { |
418 | struct pci_controller *hose; | 416 | struct pci_controller *hose; |
419 | unsigned long addr; | 417 | volatile void __iomem *addr; |
420 | 418 | ||
421 | hose = pci_bus_to_host(bus); | 419 | hose = pci_bus_to_host(bus); |
422 | if (hose == NULL) | 420 | if (hose == NULL) |
@@ -442,16 +440,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
442 | */ | 440 | */ |
443 | switch (len) { | 441 | switch (len) { |
444 | case 1: | 442 | case 1: |
445 | out_8((u8 *)addr, val); | 443 | out_8(addr, val); |
446 | (void) in_8((u8 *)addr); | 444 | (void) in_8(addr); |
447 | break; | 445 | break; |
448 | case 2: | 446 | case 2: |
449 | out_le16((u16 *)addr, val); | 447 | out_le16(addr, val); |
450 | (void) in_le16((u16 *)addr); | 448 | (void) in_le16(addr); |
451 | break; | 449 | break; |
452 | default: | 450 | default: |
453 | out_le32((u32 *)addr, val); | 451 | out_le32((u32 __iomem *)addr, val); |
454 | (void) in_le32((u32 *)addr); | 452 | (void) in_le32(addr); |
455 | break; | 453 | break; |
456 | } | 454 | } |
457 | return PCIBIOS_SUCCESSFUL; | 455 | return PCIBIOS_SUCCESSFUL; |
@@ -476,7 +474,7 @@ static struct pci_ops u3_ht_pci_ops = | |||
476 | |(((unsigned int)(off)) & 0xfcU) \ | 474 | |(((unsigned int)(off)) & 0xfcU) \ |
477 | |1UL) | 475 | |1UL) |
478 | 476 | ||
479 | static unsigned long u4_pcie_cfg_access(struct pci_controller* hose, | 477 | static volatile void __iomem *u4_pcie_cfg_access(struct pci_controller* hose, |
480 | u8 bus, u8 dev_fn, int offset) | 478 | u8 bus, u8 dev_fn, int offset) |
481 | { | 479 | { |
482 | unsigned int caddr; | 480 | unsigned int caddr; |
@@ -492,14 +490,14 @@ static unsigned long u4_pcie_cfg_access(struct pci_controller* hose, | |||
492 | } while (in_le32(hose->cfg_addr) != caddr); | 490 | } while (in_le32(hose->cfg_addr) != caddr); |
493 | 491 | ||
494 | offset &= 0x03; | 492 | offset &= 0x03; |
495 | return ((unsigned long)hose->cfg_data) + offset; | 493 | return hose->cfg_data + offset; |
496 | } | 494 | } |
497 | 495 | ||
498 | static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, | 496 | static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, |
499 | int offset, int len, u32 *val) | 497 | int offset, int len, u32 *val) |
500 | { | 498 | { |
501 | struct pci_controller *hose; | 499 | struct pci_controller *hose; |
502 | unsigned long addr; | 500 | volatile void __iomem *addr; |
503 | 501 | ||
504 | hose = pci_bus_to_host(bus); | 502 | hose = pci_bus_to_host(bus); |
505 | if (hose == NULL) | 503 | if (hose == NULL) |
@@ -515,13 +513,13 @@ static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, | |||
515 | */ | 513 | */ |
516 | switch (len) { | 514 | switch (len) { |
517 | case 1: | 515 | case 1: |
518 | *val = in_8((u8 *)addr); | 516 | *val = in_8(addr); |
519 | break; | 517 | break; |
520 | case 2: | 518 | case 2: |
521 | *val = in_le16((u16 *)addr); | 519 | *val = in_le16(addr); |
522 | break; | 520 | break; |
523 | default: | 521 | default: |
524 | *val = in_le32((u32 *)addr); | 522 | *val = in_le32(addr); |
525 | break; | 523 | break; |
526 | } | 524 | } |
527 | return PCIBIOS_SUCCESSFUL; | 525 | return PCIBIOS_SUCCESSFUL; |
@@ -531,7 +529,7 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
531 | int offset, int len, u32 val) | 529 | int offset, int len, u32 val) |
532 | { | 530 | { |
533 | struct pci_controller *hose; | 531 | struct pci_controller *hose; |
534 | unsigned long addr; | 532 | volatile void __iomem *addr; |
535 | 533 | ||
536 | hose = pci_bus_to_host(bus); | 534 | hose = pci_bus_to_host(bus); |
537 | if (hose == NULL) | 535 | if (hose == NULL) |
@@ -547,16 +545,16 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
547 | */ | 545 | */ |
548 | switch (len) { | 546 | switch (len) { |
549 | case 1: | 547 | case 1: |
550 | out_8((u8 *)addr, val); | 548 | out_8(addr, val); |
551 | (void) in_8((u8 *)addr); | 549 | (void) in_8(addr); |
552 | break; | 550 | break; |
553 | case 2: | 551 | case 2: |
554 | out_le16((u16 *)addr, val); | 552 | out_le16(addr, val); |
555 | (void) in_le16((u16 *)addr); | 553 | (void) in_le16(addr); |
556 | break; | 554 | break; |
557 | default: | 555 | default: |
558 | out_le32((u32 *)addr, val); | 556 | out_le32(addr, val); |
559 | (void) in_le32((u32 *)addr); | 557 | (void) in_le32(addr); |
560 | break; | 558 | break; |
561 | } | 559 | } |
562 | return PCIBIOS_SUCCESSFUL; | 560 | return PCIBIOS_SUCCESSFUL; |
@@ -773,8 +771,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
773 | * the reg address cell, we shall fix that by killing struct | 771 | * the reg address cell, we shall fix that by killing struct |
774 | * reg_property and using some accessor functions instead | 772 | * reg_property and using some accessor functions instead |
775 | */ | 773 | */ |
776 | hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, | 774 | hose->cfg_data = ioremap(0xf2000000, 0x02000000); |
777 | 0x02000000); | ||
778 | 775 | ||
779 | /* | 776 | /* |
780 | * /ht node doesn't expose a "ranges" property, so we "remove" | 777 | * /ht node doesn't expose a "ranges" property, so we "remove" |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 89c4c3636161..1955462f4082 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -82,8 +82,6 @@ | |||
82 | 82 | ||
83 | #undef SHOW_GATWICK_IRQS | 83 | #undef SHOW_GATWICK_IRQS |
84 | 84 | ||
85 | unsigned char drive_info; | ||
86 | |||
87 | int ppc_override_l2cr = 0; | 85 | int ppc_override_l2cr = 0; |
88 | int ppc_override_l2cr_value; | 86 | int ppc_override_l2cr_value; |
89 | int has_l2cache = 0; | 87 | int has_l2cache = 0; |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 6373372932ba..e3cbba49fd6e 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -333,7 +333,7 @@ void handle_eeh_events (struct eeh_event *event) | |||
333 | rc = eeh_reset_device(frozen_pdn, NULL); | 333 | rc = eeh_reset_device(frozen_pdn, NULL); |
334 | if (rc) | 334 | if (rc) |
335 | goto hard_fail; | 335 | goto hard_fail; |
336 | pci_walk_bus(frozen_bus, eeh_report_reset, 0); | 336 | pci_walk_bus(frozen_bus, eeh_report_reset, NULL); |
337 | } | 337 | } |
338 | 338 | ||
339 | /* If all devices reported they can proceed, the re-enable PIO */ | 339 | /* If all devices reported they can proceed, the re-enable PIO */ |
@@ -342,11 +342,11 @@ void handle_eeh_events (struct eeh_event *event) | |||
342 | rc = eeh_reset_device(frozen_pdn, NULL); | 342 | rc = eeh_reset_device(frozen_pdn, NULL); |
343 | if (rc) | 343 | if (rc) |
344 | goto hard_fail; | 344 | goto hard_fail; |
345 | pci_walk_bus(frozen_bus, eeh_report_reset, 0); | 345 | pci_walk_bus(frozen_bus, eeh_report_reset, NULL); |
346 | } | 346 | } |
347 | 347 | ||
348 | /* Tell all device drivers that they can resume operations */ | 348 | /* Tell all device drivers that they can resume operations */ |
349 | pci_walk_bus(frozen_bus, eeh_report_resume, 0); | 349 | pci_walk_bus(frozen_bus, eeh_report_resume, NULL); |
350 | 350 | ||
351 | return; | 351 | return; |
352 | 352 | ||
@@ -367,7 +367,7 @@ hard_fail: | |||
367 | eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); | 367 | eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); |
368 | 368 | ||
369 | /* Notify all devices that they're about to go down. */ | 369 | /* Notify all devices that they're about to go down. */ |
370 | pci_walk_bus(frozen_bus, eeh_report_failure, 0); | 370 | pci_walk_bus(frozen_bus, eeh_report_failure, NULL); |
371 | 371 | ||
372 | /* Shut down the device drivers for good. */ | 372 | /* Shut down the device drivers for good. */ |
373 | pcibios_remove_pci_devices(frozen_bus); | 373 | pcibios_remove_pci_devices(frozen_bus); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index da6cebaf72cd..9edeca83f434 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -585,7 +585,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus) | |||
585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | 585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) |
586 | { | 586 | { |
587 | /* Don't risk a hypervisor call if we're crashing */ | 587 | /* Don't risk a hypervisor call if we're crashing */ |
588 | if (!crash_shutdown) { | 588 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { |
589 | unsigned long vpa = __pa(get_lppaca()); | 589 | unsigned long vpa = __pa(get_lppaca()); |
590 | 590 | ||
591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { | 591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 977de9db8754..6298264efe36 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -59,7 +59,7 @@ static unsigned long dart_tablesize; | |||
59 | static u32 *dart_vbase; | 59 | static u32 *dart_vbase; |
60 | 60 | ||
61 | /* Mapped base address for the dart */ | 61 | /* Mapped base address for the dart */ |
62 | static unsigned int *__iomem dart; | 62 | static unsigned int __iomem *dart; |
63 | 63 | ||
64 | /* Dummy val that entries are set to when unused */ | 64 | /* Dummy val that entries are set to when unused */ |
65 | static unsigned int dart_emptyval; | 65 | static unsigned int dart_emptyval; |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index 3e6ca7f5843f..c1e89ad0684d 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -810,13 +810,16 @@ initial_mmu: | |||
810 | mtspr SPRN_MD_TWC, r9 | 810 | mtspr SPRN_MD_TWC, r9 |
811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ | 811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ |
812 | addis r11, r11, 0x0080 /* Add 8M */ | 812 | addis r11, r11, 0x0080 /* Add 8M */ |
813 | mtspr SPRN_MD_RPN, r8 | 813 | mtspr SPRN_MD_RPN, r11 |
814 | |||
815 | addi r10, r10, 0x0100 | ||
816 | mtspr SPRN_MD_CTR, r10 | ||
814 | 817 | ||
815 | addis r8, r8, 0x0080 /* Add 8M */ | 818 | addis r8, r8, 0x0080 /* Add 8M */ |
816 | mtspr SPRN_MD_EPN, r8 | 819 | mtspr SPRN_MD_EPN, r8 |
817 | mtspr SPRN_MD_TWC, r9 | 820 | mtspr SPRN_MD_TWC, r9 |
818 | addis r11, r11, 0x0080 /* Add 8M */ | 821 | addis r11, r11, 0x0080 /* Add 8M */ |
819 | mtspr SPRN_MD_RPN, r8 | 822 | mtspr SPRN_MD_RPN, r11 |
820 | #endif | 823 | #endif |
821 | 824 | ||
822 | /* Since the cache is enabled according to the information we | 825 | /* Since the cache is enabled according to the information we |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 3a6e4bcb3c53..15bd9b448a48 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -186,11 +186,15 @@ EXPORT_SYMBOL(flush_tlb_kernel_range); | |||
186 | EXPORT_SYMBOL(flush_tlb_page); | 186 | EXPORT_SYMBOL(flush_tlb_page); |
187 | EXPORT_SYMBOL(_tlbie); | 187 | EXPORT_SYMBOL(_tlbie); |
188 | #ifdef CONFIG_ALTIVEC | 188 | #ifdef CONFIG_ALTIVEC |
189 | #ifndef CONFIG_SMP | ||
189 | EXPORT_SYMBOL(last_task_used_altivec); | 190 | EXPORT_SYMBOL(last_task_used_altivec); |
191 | #endif | ||
190 | EXPORT_SYMBOL(giveup_altivec); | 192 | EXPORT_SYMBOL(giveup_altivec); |
191 | #endif /* CONFIG_ALTIVEC */ | 193 | #endif /* CONFIG_ALTIVEC */ |
192 | #ifdef CONFIG_SPE | 194 | #ifdef CONFIG_SPE |
195 | #ifndef CONFIG_SMP | ||
193 | EXPORT_SYMBOL(last_task_used_spe); | 196 | EXPORT_SYMBOL(last_task_used_spe); |
197 | #endif | ||
194 | EXPORT_SYMBOL(giveup_spe); | 198 | EXPORT_SYMBOL(giveup_spe); |
195 | #endif /* CONFIG_SPE */ | 199 | #endif /* CONFIG_SPE */ |
196 | #ifdef CONFIG_SMP | 200 | #ifdef CONFIG_SMP |
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 159b228eca1e..0ec53f049338 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -332,8 +332,8 @@ bamboo_early_serial_map(void) | |||
332 | port.irq = 0; | 332 | port.irq = 0; |
333 | port.uartclk = clocks.uart0; | 333 | port.uartclk = clocks.uart0; |
334 | port.regshift = 0; | 334 | port.regshift = 0; |
335 | port.iotype = SERIAL_IO_MEM; | 335 | port.iotype = UPIO_MEM; |
336 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 336 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
337 | port.line = 0; | 337 | port.line = 0; |
338 | 338 | ||
339 | if (early_serial_setup(&port) != 0) { | 339 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c index 8110f55668c5..ce48a4f08cbb 100644 --- a/arch/ppc/platforms/4xx/bubinga.c +++ b/arch/ppc/platforms/4xx/bubinga.c | |||
@@ -97,8 +97,8 @@ bubinga_early_serial_map(void) | |||
97 | port.irq = ACTING_UART0_INT; | 97 | port.irq = ACTING_UART0_INT; |
98 | port.uartclk = uart_clock; | 98 | port.uartclk = uart_clock; |
99 | port.regshift = 0; | 99 | port.regshift = 0; |
100 | port.iotype = SERIAL_IO_MEM; | 100 | port.iotype = UPIO_MEM; |
101 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 101 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
102 | port.line = 0; | 102 | port.line = 0; |
103 | 103 | ||
104 | if (early_serial_setup(&port) != 0) { | 104 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 64ebae19cdbb..9a828b623417 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -225,8 +225,8 @@ ebony_early_serial_map(void) | |||
225 | port.irq = 0; | 225 | port.irq = 0; |
226 | port.uartclk = clocks.uart0; | 226 | port.uartclk = clocks.uart0; |
227 | port.regshift = 0; | 227 | port.regshift = 0; |
228 | port.iotype = SERIAL_IO_MEM; | 228 | port.iotype = UPIO_MEM; |
229 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 229 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
230 | port.line = 0; | 230 | port.line = 0; |
231 | 231 | ||
232 | if (early_serial_setup(&port) != 0) { | 232 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index d810b736d9bf..21d29132aebd 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -279,8 +279,8 @@ luan_early_serial_map(void) | |||
279 | port.irq = UART0_INT; | 279 | port.irq = UART0_INT; |
280 | port.uartclk = clocks.uart0; | 280 | port.uartclk = clocks.uart0; |
281 | port.regshift = 0; | 281 | port.regshift = 0; |
282 | port.iotype = SERIAL_IO_MEM; | 282 | port.iotype = UPIO_MEM; |
283 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 283 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
284 | port.line = 0; | 284 | port.line = 0; |
285 | 285 | ||
286 | if (early_serial_setup(&port) != 0) { | 286 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 73b2c98158f6..4f355b6acab2 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -248,8 +248,8 @@ ocotea_early_serial_map(void) | |||
248 | port.irq = UART0_INT; | 248 | port.irq = UART0_INT; |
249 | port.uartclk = clocks.uart0; | 249 | port.uartclk = clocks.uart0; |
250 | port.regshift = 0; | 250 | port.regshift = 0; |
251 | port.iotype = SERIAL_IO_MEM; | 251 | port.iotype = UPIO_MEM; |
252 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 252 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
253 | port.line = 0; | 253 | port.line = 0; |
254 | 254 | ||
255 | if (early_serial_setup(&port) != 0) { | 255 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index 0b1b77d986bf..e90d97f64f76 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c | |||
@@ -95,8 +95,8 @@ ml300_early_serial_map(void) | |||
95 | port.irq = old_ports[i].irq; | 95 | port.irq = old_ports[i].irq; |
96 | port.uartclk = old_ports[i].baud_base * 16; | 96 | port.uartclk = old_ports[i].baud_base * 16; |
97 | port.regshift = old_ports[i].iomem_reg_shift; | 97 | port.regshift = old_ports[i].iomem_reg_shift; |
98 | port.iotype = SERIAL_IO_MEM; | 98 | port.iotype = UPIO_MEM; |
99 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 99 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
100 | port.line = i; | 100 | port.line = i; |
101 | 101 | ||
102 | if (early_serial_setup(&port) != 0) { | 102 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index e60f4bd437ec..b065b8babcd3 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -305,8 +305,8 @@ yucca_early_serial_map(void) | |||
305 | port.irq = UART0_INT; | 305 | port.irq = UART0_INT; |
306 | port.uartclk = clocks.uart0; | 306 | port.uartclk = clocks.uart0; |
307 | port.regshift = 0; | 307 | port.regshift = 0; |
308 | port.iotype = SERIAL_IO_MEM; | 308 | port.iotype = UPIO_MEM; |
309 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 309 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; |
310 | port.line = 0; | 310 | port.line = 0; |
311 | 311 | ||
312 | if (early_serial_setup(&port) != 0) { | 312 | if (early_serial_setup(&port) != 0) { |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 012e1e652c03..1a659bbc1860 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -301,14 +301,14 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
301 | struct uart_port p; | 301 | struct uart_port p; |
302 | 302 | ||
303 | memset(&p, 0, sizeof (p)); | 303 | memset(&p, 0, sizeof (p)); |
304 | p.iotype = SERIAL_IO_MEM; | 304 | p.iotype = UPIO_MEM; |
305 | p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4500); | 305 | p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4500); |
306 | p.uartclk = binfo->bi_busfreq; | 306 | p.uartclk = binfo->bi_busfreq; |
307 | 307 | ||
308 | gen550_init(0, &p); | 308 | gen550_init(0, &p); |
309 | 309 | ||
310 | memset(&p, 0, sizeof (p)); | 310 | memset(&p, 0, sizeof (p)); |
311 | p.iotype = SERIAL_IO_MEM; | 311 | p.iotype = UPIO_MEM; |
312 | p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4600); | 312 | p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4600); |
313 | p.uartclk = binfo->bi_busfreq; | 313 | p.uartclk = binfo->bi_busfreq; |
314 | 314 | ||
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 2eceb1e6f4eb..408d64f18e1a 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -162,14 +162,14 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
162 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); | 162 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); |
163 | 163 | ||
164 | memset(&p, 0, sizeof (p)); | 164 | memset(&p, 0, sizeof (p)); |
165 | p.iotype = SERIAL_IO_MEM; | 165 | p.iotype = UPIO_MEM; |
166 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; | 166 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; |
167 | p.uartclk = binfo->bi_busfreq; | 167 | p.uartclk = binfo->bi_busfreq; |
168 | 168 | ||
169 | gen550_init(0, &p); | 169 | gen550_init(0, &p); |
170 | 170 | ||
171 | memset(&p, 0, sizeof (p)); | 171 | memset(&p, 0, sizeof (p)); |
172 | p.iotype = SERIAL_IO_MEM; | 172 | p.iotype = UPIO_MEM; |
173 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; | 173 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; |
174 | p.uartclk = binfo->bi_busfreq; | 174 | p.uartclk = binfo->bi_busfreq; |
175 | 175 | ||
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index b332ebae6bd3..1801ab392e22 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -534,14 +534,14 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
534 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); | 534 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); |
535 | 535 | ||
536 | memset(&p, 0, sizeof (p)); | 536 | memset(&p, 0, sizeof (p)); |
537 | p.iotype = SERIAL_IO_MEM; | 537 | p.iotype = UPIO_MEM; |
538 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; | 538 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; |
539 | p.uartclk = binfo->bi_busfreq; | 539 | p.uartclk = binfo->bi_busfreq; |
540 | 540 | ||
541 | gen550_init(0, &p); | 541 | gen550_init(0, &p); |
542 | 542 | ||
543 | memset(&p, 0, sizeof (p)); | 543 | memset(&p, 0, sizeof (p)); |
544 | p.iotype = SERIAL_IO_MEM; | 544 | p.iotype = UPIO_MEM; |
545 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; | 545 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; |
546 | p.uartclk = binfo->bi_busfreq; | 546 | p.uartclk = binfo->bi_busfreq; |
547 | 547 | ||
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index e777ba824aa9..8a72221f816c 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -64,7 +64,7 @@ sbc8560_early_serial_map(void) | |||
64 | uart_req.irq = MPC85xx_IRQ_EXT9; | 64 | uart_req.irq = MPC85xx_IRQ_EXT9; |
65 | uart_req.flags = STD_COM_FLAGS; | 65 | uart_req.flags = STD_COM_FLAGS; |
66 | uart_req.uartclk = BASE_BAUD * 16; | 66 | uart_req.uartclk = BASE_BAUD * 16; |
67 | uart_req.iotype = SERIAL_IO_MEM; | 67 | uart_req.iotype = UPIO_MEM; |
68 | uart_req.mapbase = UARTA_ADDR; | 68 | uart_req.mapbase = UARTA_ADDR; |
69 | uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE); | 69 | uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE); |
70 | uart_req.type = PORT_16650; | 70 | uart_req.type = PORT_16650; |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index b436f4d0a3fa..a5e38ba62732 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c | |||
@@ -346,14 +346,14 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
346 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); | 346 | binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); |
347 | 347 | ||
348 | memset(&p, 0, sizeof (p)); | 348 | memset(&p, 0, sizeof (p)); |
349 | p.iotype = SERIAL_IO_MEM; | 349 | p.iotype = UPIO_MEM; |
350 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; | 350 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET; |
351 | p.uartclk = binfo->bi_busfreq; | 351 | p.uartclk = binfo->bi_busfreq; |
352 | 352 | ||
353 | gen550_init(0, &p); | 353 | gen550_init(0, &p); |
354 | 354 | ||
355 | memset(&p, 0, sizeof (p)); | 355 | memset(&p, 0, sizeof (p)); |
356 | p.iotype = SERIAL_IO_MEM; | 356 | p.iotype = UPIO_MEM; |
357 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; | 357 | p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET; |
358 | p.uartclk = binfo->bi_busfreq; | 358 | p.uartclk = binfo->bi_busfreq; |
359 | 359 | ||
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index 48a4a510d598..aefcc0e7be57 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -116,7 +116,7 @@ chestnut_early_serial_map(void) | |||
116 | port.uartclk = BASE_BAUD * 16; | 116 | port.uartclk = BASE_BAUD * 16; |
117 | port.irq = UART0_INT; | 117 | port.irq = UART0_INT; |
118 | port.flags = STD_COM_FLAGS | UPF_IOREMAP; | 118 | port.flags = STD_COM_FLAGS | UPF_IOREMAP; |
119 | port.iotype = SERIAL_IO_MEM; | 119 | port.iotype = UPIO_MEM; |
120 | port.mapbase = CHESTNUT_UART0_IO_BASE; | 120 | port.mapbase = CHESTNUT_UART0_IO_BASE; |
121 | port.regshift = 0; | 121 | port.regshift = 0; |
122 | 122 | ||
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c index 32358b3fb236..ffde8f6f6302 100644 --- a/arch/ppc/platforms/ev64260.c +++ b/arch/ppc/platforms/ev64260.c | |||
@@ -330,7 +330,7 @@ ev64260_early_serial_map(void) | |||
330 | port.irq = EV64260_UART_0_IRQ; | 330 | port.irq = EV64260_UART_0_IRQ; |
331 | port.uartclk = BASE_BAUD * 16; | 331 | port.uartclk = BASE_BAUD * 16; |
332 | port.regshift = 2; | 332 | port.regshift = 2; |
333 | port.iotype = SERIAL_IO_MEM; | 333 | port.iotype = UPIO_MEM; |
334 | port.flags = STD_COM_FLAGS; | 334 | port.flags = STD_COM_FLAGS; |
335 | 335 | ||
336 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | 336 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 708b8739ecdd..872c0a3ba3c7 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -100,7 +100,7 @@ static void __init ppc7d_early_serial_map(void) | |||
100 | serial_req.uartclk = UART_CLK; | 100 | serial_req.uartclk = UART_CLK; |
101 | serial_req.irq = 4; | 101 | serial_req.irq = 4; |
102 | serial_req.flags = STD_COM_FLAGS; | 102 | serial_req.flags = STD_COM_FLAGS; |
103 | serial_req.iotype = SERIAL_IO_MEM; | 103 | serial_req.iotype = UPIO_MEM; |
104 | serial_req.membase = (u_char *) PPC7D_SERIAL_0; | 104 | serial_req.membase = (u_char *) PPC7D_SERIAL_0; |
105 | 105 | ||
106 | gen550_init(0, &serial_req); | 106 | gen550_init(0, &serial_req); |
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c index 5ad70d357cb9..69e1de7971f2 100644 --- a/arch/ppc/platforms/spruce.c +++ b/arch/ppc/platforms/spruce.c | |||
@@ -176,8 +176,8 @@ spruce_early_serial_map(void) | |||
176 | memset(&serial_req, 0, sizeof(serial_req)); | 176 | memset(&serial_req, 0, sizeof(serial_req)); |
177 | serial_req.uartclk = uart_clk; | 177 | serial_req.uartclk = uart_clk; |
178 | serial_req.irq = UART0_INT; | 178 | serial_req.irq = UART0_INT; |
179 | serial_req.flags = ASYNC_BOOT_AUTOCONF; | 179 | serial_req.flags = UPF_BOOT_AUTOCONF; |
180 | serial_req.iotype = SERIAL_IO_MEM; | 180 | serial_req.iotype = UPIO_MEM; |
181 | serial_req.membase = (u_char *)UART0_IO_BASE; | 181 | serial_req.membase = (u_char *)UART0_IO_BASE; |
182 | serial_req.regshift = 0; | 182 | serial_req.regshift = 0; |
183 | 183 | ||
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index ab34b1d6072f..2fe28ded2c60 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -189,8 +189,8 @@ ocp_device_resume(struct device *dev) | |||
189 | struct bus_type ocp_bus_type = { | 189 | struct bus_type ocp_bus_type = { |
190 | .name = "ocp", | 190 | .name = "ocp", |
191 | .match = ocp_device_match, | 191 | .match = ocp_device_match, |
192 | .probe = ocp_driver_probe, | 192 | .probe = ocp_device_probe, |
193 | .remove = ocp_driver_remove, | 193 | .remove = ocp_device_remove, |
194 | .suspend = ocp_device_suspend, | 194 | .suspend = ocp_device_suspend, |
195 | .resume = ocp_device_resume, | 195 | .resume = ocp_device_resume, |
196 | }; | 196 | }; |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 1b5fe9e398d4..7bada82527a8 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -108,7 +108,7 @@ mpc83xx_early_serial_map(void) | |||
108 | 108 | ||
109 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | 109 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) |
110 | memset(&serial_req, 0, sizeof (serial_req)); | 110 | memset(&serial_req, 0, sizeof (serial_req)); |
111 | serial_req.iotype = SERIAL_IO_MEM; | 111 | serial_req.iotype = UPIO_MEM; |
112 | serial_req.mapbase = pdata[0].mapbase; | 112 | serial_req.mapbase = pdata[0].mapbase; |
113 | serial_req.membase = pdata[0].membase; | 113 | serial_req.membase = pdata[0].membase; |
114 | serial_req.regshift = 0; | 114 | serial_req.regshift = 0; |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index 1a47ff4b831d..e4dda43fdaa7 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -90,7 +90,7 @@ mpc85xx_early_serial_map(void) | |||
90 | 90 | ||
91 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | 91 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) |
92 | memset(&serial_req, 0, sizeof (serial_req)); | 92 | memset(&serial_req, 0, sizeof (serial_req)); |
93 | serial_req.iotype = SERIAL_IO_MEM; | 93 | serial_req.iotype = UPIO_MEM; |
94 | serial_req.mapbase = pdata[0].mapbase; | 94 | serial_req.mapbase = pdata[0].mapbase; |
95 | serial_req.membase = pdata[0].membase; | 95 | serial_req.membase = pdata[0].membase; |
96 | serial_req.regshift = 0; | 96 | serial_req.regshift = 0; |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index bf9a7a361b34..cc20f0e3a7d3 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -100,12 +100,12 @@ | |||
100 | #define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid) | 100 | #define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid) |
101 | #define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid) | 101 | #define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid) |
102 | 102 | ||
103 | asmlinkage long sys32_chown16(const char * filename, u16 user, u16 group) | 103 | asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group) |
104 | { | 104 | { |
105 | return sys_chown(filename, low2highuid(user), low2highgid(group)); | 105 | return sys_chown(filename, low2highuid(user), low2highgid(group)); |
106 | } | 106 | } |
107 | 107 | ||
108 | asmlinkage long sys32_lchown16(const char * filename, u16 user, u16 group) | 108 | asmlinkage long sys32_lchown16(const char __user * filename, u16 user, u16 group) |
109 | { | 109 | { |
110 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); | 110 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); |
111 | } | 111 | } |
@@ -141,7 +141,7 @@ asmlinkage long sys32_setresuid16(u16 ruid, u16 euid, u16 suid) | |||
141 | low2highuid(suid)); | 141 | low2highuid(suid)); |
142 | } | 142 | } |
143 | 143 | ||
144 | asmlinkage long sys32_getresuid16(u16 *ruid, u16 *euid, u16 *suid) | 144 | asmlinkage long sys32_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid) |
145 | { | 145 | { |
146 | int retval; | 146 | int retval; |
147 | 147 | ||
@@ -158,7 +158,7 @@ asmlinkage long sys32_setresgid16(u16 rgid, u16 egid, u16 sgid) | |||
158 | low2highgid(sgid)); | 158 | low2highgid(sgid)); |
159 | } | 159 | } |
160 | 160 | ||
161 | asmlinkage long sys32_getresgid16(u16 *rgid, u16 *egid, u16 *sgid) | 161 | asmlinkage long sys32_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid) |
162 | { | 162 | { |
163 | int retval; | 163 | int retval; |
164 | 164 | ||
@@ -179,7 +179,7 @@ asmlinkage long sys32_setfsgid16(u16 gid) | |||
179 | return sys_setfsgid((gid_t)gid); | 179 | return sys_setfsgid((gid_t)gid); |
180 | } | 180 | } |
181 | 181 | ||
182 | static int groups16_to_user(u16 *grouplist, struct group_info *group_info) | 182 | static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info) |
183 | { | 183 | { |
184 | int i; | 184 | int i; |
185 | u16 group; | 185 | u16 group; |
@@ -193,7 +193,7 @@ static int groups16_to_user(u16 *grouplist, struct group_info *group_info) | |||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static int groups16_from_user(struct group_info *group_info, u16 *grouplist) | 196 | static int groups16_from_user(struct group_info *group_info, u16 __user *grouplist) |
197 | { | 197 | { |
198 | int i; | 198 | int i; |
199 | u16 group; | 199 | u16 group; |
@@ -207,7 +207,7 @@ static int groups16_from_user(struct group_info *group_info, u16 *grouplist) | |||
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | asmlinkage long sys32_getgroups16(int gidsetsize, u16 *grouplist) | 210 | asmlinkage long sys32_getgroups16(int gidsetsize, u16 __user *grouplist) |
211 | { | 211 | { |
212 | int i; | 212 | int i; |
213 | 213 | ||
@@ -231,7 +231,7 @@ out: | |||
231 | return i; | 231 | return i; |
232 | } | 232 | } |
233 | 233 | ||
234 | asmlinkage long sys32_setgroups16(int gidsetsize, u16 *grouplist) | 234 | asmlinkage long sys32_setgroups16(int gidsetsize, u16 __user *grouplist) |
235 | { | 235 | { |
236 | struct group_info *group_info; | 236 | struct group_info *group_info; |
237 | int retval; | 237 | int retval; |
@@ -278,14 +278,14 @@ asmlinkage long sys32_getegid16(void) | |||
278 | 278 | ||
279 | /* 32-bit timeval and related flotsam. */ | 279 | /* 32-bit timeval and related flotsam. */ |
280 | 280 | ||
281 | static inline long get_tv32(struct timeval *o, struct compat_timeval *i) | 281 | static inline long get_tv32(struct timeval *o, struct compat_timeval __user *i) |
282 | { | 282 | { |
283 | return (!access_ok(VERIFY_READ, o, sizeof(*o)) || | 283 | return (!access_ok(VERIFY_READ, o, sizeof(*o)) || |
284 | (__get_user(o->tv_sec, &i->tv_sec) || | 284 | (__get_user(o->tv_sec, &i->tv_sec) || |
285 | __get_user(o->tv_usec, &i->tv_usec))); | 285 | __get_user(o->tv_usec, &i->tv_usec))); |
286 | } | 286 | } |
287 | 287 | ||
288 | static inline long put_tv32(struct compat_timeval *o, struct timeval *i) | 288 | static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) |
289 | { | 289 | { |
290 | return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) || | 290 | return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) || |
291 | (__put_user(i->tv_sec, &o->tv_sec) || | 291 | (__put_user(i->tv_sec, &o->tv_sec) || |
@@ -341,7 +341,7 @@ asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) | |||
341 | return -ENOSYS; | 341 | return -ENOSYS; |
342 | } | 342 | } |
343 | 343 | ||
344 | asmlinkage long sys32_truncate64(const char * path, unsigned long high, unsigned long low) | 344 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) |
345 | { | 345 | { |
346 | if ((int)high < 0) | 346 | if ((int)high < 0) |
347 | return -EINVAL; | 347 | return -EINVAL; |
@@ -357,7 +357,7 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned | |||
357 | return sys_ftruncate(fd, (high << 32) | low); | 357 | return sys_ftruncate(fd, (high << 32) | low); |
358 | } | 358 | } |
359 | 359 | ||
360 | int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) | 360 | int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) |
361 | { | 361 | { |
362 | int err; | 362 | int err; |
363 | 363 | ||
@@ -591,7 +591,7 @@ sys32_delete_module(const char __user *name_user, unsigned int flags) | |||
591 | 591 | ||
592 | extern struct timezone sys_tz; | 592 | extern struct timezone sys_tz; |
593 | 593 | ||
594 | asmlinkage long sys32_gettimeofday(struct compat_timeval *tv, struct timezone *tz) | 594 | asmlinkage long sys32_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) |
595 | { | 595 | { |
596 | if (tv) { | 596 | if (tv) { |
597 | struct timeval ktv; | 597 | struct timeval ktv; |
@@ -606,7 +606,7 @@ asmlinkage long sys32_gettimeofday(struct compat_timeval *tv, struct timezone *t | |||
606 | return 0; | 606 | return 0; |
607 | } | 607 | } |
608 | 608 | ||
609 | static inline long get_ts32(struct timespec *o, struct compat_timeval *i) | 609 | static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i) |
610 | { | 610 | { |
611 | long usec; | 611 | long usec; |
612 | 612 | ||
@@ -620,7 +620,7 @@ static inline long get_ts32(struct timespec *o, struct compat_timeval *i) | |||
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
622 | 622 | ||
623 | asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz) | 623 | asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) |
624 | { | 624 | { |
625 | struct timespec kts; | 625 | struct timespec kts; |
626 | struct timezone ktz; | 626 | struct timezone ktz; |
@@ -645,7 +645,7 @@ asmlinkage long sys32_pause(void) | |||
645 | return -ERESTARTNOHAND; | 645 | return -ERESTARTNOHAND; |
646 | } | 646 | } |
647 | 647 | ||
648 | asmlinkage long sys32_pread64(unsigned int fd, char *ubuf, | 648 | asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, |
649 | size_t count, u32 poshi, u32 poslo) | 649 | size_t count, u32 poshi, u32 poslo) |
650 | { | 650 | { |
651 | if ((compat_ssize_t) count < 0) | 651 | if ((compat_ssize_t) count < 0) |
@@ -653,7 +653,7 @@ asmlinkage long sys32_pread64(unsigned int fd, char *ubuf, | |||
653 | return sys_pread64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo)); | 653 | return sys_pread64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo)); |
654 | } | 654 | } |
655 | 655 | ||
656 | asmlinkage long sys32_pwrite64(unsigned int fd, const char *ubuf, | 656 | asmlinkage long sys32_pwrite64(unsigned int fd, const char __user *ubuf, |
657 | size_t count, u32 poshi, u32 poslo) | 657 | size_t count, u32 poshi, u32 poslo) |
658 | { | 658 | { |
659 | if ((compat_ssize_t) count < 0) | 659 | if ((compat_ssize_t) count < 0) |
@@ -666,7 +666,7 @@ asmlinkage compat_ssize_t sys32_readahead(int fd, u32 offhi, u32 offlo, s32 coun | |||
666 | return sys_readahead(fd, ((loff_t)AA(offhi) << 32) | AA(offlo), count); | 666 | return sys_readahead(fd, ((loff_t)AA(offhi) << 32) | AA(offlo), count); |
667 | } | 667 | } |
668 | 668 | ||
669 | asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, size_t count) | 669 | asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, size_t count) |
670 | { | 670 | { |
671 | mm_segment_t old_fs = get_fs(); | 671 | mm_segment_t old_fs = get_fs(); |
672 | int ret; | 672 | int ret; |
@@ -686,7 +686,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, size | |||
686 | } | 686 | } |
687 | 687 | ||
688 | asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | 688 | asmlinkage long sys32_sendfile64(int out_fd, int in_fd, |
689 | compat_loff_t *offset, s32 count) | 689 | compat_loff_t __user *offset, s32 count) |
690 | { | 690 | { |
691 | mm_segment_t old_fs = get_fs(); | 691 | mm_segment_t old_fs = get_fs(); |
692 | int ret; | 692 | int ret; |
@@ -722,7 +722,7 @@ struct timex32 { | |||
722 | 722 | ||
723 | extern int do_adjtimex(struct timex *); | 723 | extern int do_adjtimex(struct timex *); |
724 | 724 | ||
725 | asmlinkage long sys32_adjtimex(struct timex32 *utp) | 725 | asmlinkage long sys32_adjtimex(struct timex32 __user *utp) |
726 | { | 726 | { |
727 | struct timex txc; | 727 | struct timex txc; |
728 | int ret; | 728 | int ret; |
@@ -789,12 +789,13 @@ struct __sysctl_args32 { | |||
789 | u32 __unused[4]; | 789 | u32 __unused[4]; |
790 | }; | 790 | }; |
791 | 791 | ||
792 | asmlinkage long sys32_sysctl(struct __sysctl_args32 *args) | 792 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) |
793 | { | 793 | { |
794 | struct __sysctl_args32 tmp; | 794 | struct __sysctl_args32 tmp; |
795 | int error; | 795 | int error; |
796 | size_t oldlen, *oldlenp = NULL; | 796 | size_t oldlen; |
797 | unsigned long addr = (((long)&args->__unused[0]) + 7) & ~7; | 797 | size_t __user *oldlenp = NULL; |
798 | unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7; | ||
798 | 799 | ||
799 | if (copy_from_user(&tmp, args, sizeof(tmp))) | 800 | if (copy_from_user(&tmp, args, sizeof(tmp))) |
800 | return -EFAULT; | 801 | return -EFAULT; |
@@ -806,20 +807,20 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 *args) | |||
806 | basically copy the whole sysctl.c here, and | 807 | basically copy the whole sysctl.c here, and |
807 | glibc's __sysctl uses rw memory for the structure | 808 | glibc's __sysctl uses rw memory for the structure |
808 | anyway. */ | 809 | anyway. */ |
809 | if (get_user(oldlen, (u32 *)A(tmp.oldlenp)) || | 810 | if (get_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)) || |
810 | put_user(oldlen, (size_t *)addr)) | 811 | put_user(oldlen, (size_t __user *)addr)) |
811 | return -EFAULT; | 812 | return -EFAULT; |
812 | oldlenp = (size_t *)addr; | 813 | oldlenp = (size_t __user *)addr; |
813 | } | 814 | } |
814 | 815 | ||
815 | lock_kernel(); | 816 | lock_kernel(); |
816 | error = do_sysctl((int *)A(tmp.name), tmp.nlen, (void *)A(tmp.oldval), | 817 | error = do_sysctl(compat_ptr(tmp.name), tmp.nlen, compat_ptr(tmp.oldval), |
817 | oldlenp, (void *)A(tmp.newval), tmp.newlen); | 818 | oldlenp, compat_ptr(tmp.newval), tmp.newlen); |
818 | unlock_kernel(); | 819 | unlock_kernel(); |
819 | if (oldlenp) { | 820 | if (oldlenp) { |
820 | if (!error) { | 821 | if (!error) { |
821 | if (get_user(oldlen, (size_t *)addr) || | 822 | if (get_user(oldlen, (size_t __user *)addr) || |
822 | put_user(oldlen, (u32 *)A(tmp.oldlenp))) | 823 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) |
823 | error = -EFAULT; | 824 | error = -EFAULT; |
824 | } | 825 | } |
825 | copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); | 826 | copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); |
@@ -853,7 +854,7 @@ struct stat64_emu31 { | |||
853 | unsigned long st_ino; | 854 | unsigned long st_ino; |
854 | }; | 855 | }; |
855 | 856 | ||
856 | static int cp_stat64(struct stat64_emu31 *ubuf, struct kstat *stat) | 857 | static int cp_stat64(struct stat64_emu31 __user *ubuf, struct kstat *stat) |
857 | { | 858 | { |
858 | struct stat64_emu31 tmp; | 859 | struct stat64_emu31 tmp; |
859 | 860 | ||
@@ -877,7 +878,7 @@ static int cp_stat64(struct stat64_emu31 *ubuf, struct kstat *stat) | |||
877 | return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 878 | return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
878 | } | 879 | } |
879 | 880 | ||
880 | asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf) | 881 | asmlinkage long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf) |
881 | { | 882 | { |
882 | struct kstat stat; | 883 | struct kstat stat; |
883 | int ret = vfs_stat(filename, &stat); | 884 | int ret = vfs_stat(filename, &stat); |
@@ -886,7 +887,7 @@ asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf) | |||
886 | return ret; | 887 | return ret; |
887 | } | 888 | } |
888 | 889 | ||
889 | asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf) | 890 | asmlinkage long sys32_lstat64(char __user * filename, struct stat64_emu31 __user * statbuf) |
890 | { | 891 | { |
891 | struct kstat stat; | 892 | struct kstat stat; |
892 | int ret = vfs_lstat(filename, &stat); | 893 | int ret = vfs_lstat(filename, &stat); |
@@ -895,7 +896,7 @@ asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf) | |||
895 | return ret; | 896 | return ret; |
896 | } | 897 | } |
897 | 898 | ||
898 | asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 * statbuf) | 899 | asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * statbuf) |
899 | { | 900 | { |
900 | struct kstat stat; | 901 | struct kstat stat; |
901 | int ret = vfs_fstat(fd, &stat); | 902 | int ret = vfs_fstat(fd, &stat); |
@@ -952,7 +953,7 @@ out: | |||
952 | 953 | ||
953 | 954 | ||
954 | asmlinkage unsigned long | 955 | asmlinkage unsigned long |
955 | old32_mmap(struct mmap_arg_struct_emu31 *arg) | 956 | old32_mmap(struct mmap_arg_struct_emu31 __user *arg) |
956 | { | 957 | { |
957 | struct mmap_arg_struct_emu31 a; | 958 | struct mmap_arg_struct_emu31 a; |
958 | int error = -EFAULT; | 959 | int error = -EFAULT; |
@@ -970,7 +971,7 @@ out: | |||
970 | } | 971 | } |
971 | 972 | ||
972 | asmlinkage long | 973 | asmlinkage long |
973 | sys32_mmap2(struct mmap_arg_struct_emu31 *arg) | 974 | sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) |
974 | { | 975 | { |
975 | struct mmap_arg_struct_emu31 a; | 976 | struct mmap_arg_struct_emu31 a; |
976 | int error = -EFAULT; | 977 | int error = -EFAULT; |
@@ -982,7 +983,7 @@ out: | |||
982 | return error; | 983 | return error; |
983 | } | 984 | } |
984 | 985 | ||
985 | asmlinkage long sys32_read(unsigned int fd, char * buf, size_t count) | 986 | asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) |
986 | { | 987 | { |
987 | if ((compat_ssize_t) count < 0) | 988 | if ((compat_ssize_t) count < 0) |
988 | return -EINVAL; | 989 | return -EINVAL; |
@@ -990,7 +991,7 @@ asmlinkage long sys32_read(unsigned int fd, char * buf, size_t count) | |||
990 | return sys_read(fd, buf, count); | 991 | return sys_read(fd, buf, count); |
991 | } | 992 | } |
992 | 993 | ||
993 | asmlinkage long sys32_write(unsigned int fd, char * buf, size_t count) | 994 | asmlinkage long sys32_write(unsigned int fd, char __user * buf, size_t count) |
994 | { | 995 | { |
995 | if ((compat_ssize_t) count < 0) | 996 | if ((compat_ssize_t) count < 0) |
996 | return -EINVAL; | 997 | return -EINVAL; |
@@ -1002,12 +1003,12 @@ asmlinkage long sys32_clone(struct pt_regs regs) | |||
1002 | { | 1003 | { |
1003 | unsigned long clone_flags; | 1004 | unsigned long clone_flags; |
1004 | unsigned long newsp; | 1005 | unsigned long newsp; |
1005 | int *parent_tidptr, *child_tidptr; | 1006 | int __user *parent_tidptr, *child_tidptr; |
1006 | 1007 | ||
1007 | clone_flags = regs.gprs[3] & 0xffffffffUL; | 1008 | clone_flags = regs.gprs[3] & 0xffffffffUL; |
1008 | newsp = regs.orig_gpr2 & 0x7fffffffUL; | 1009 | newsp = regs.orig_gpr2 & 0x7fffffffUL; |
1009 | parent_tidptr = (int *) (regs.gprs[4] & 0x7fffffffUL); | 1010 | parent_tidptr = compat_ptr(regs.gprs[4]); |
1010 | child_tidptr = (int *) (regs.gprs[5] & 0x7fffffffUL); | 1011 | child_tidptr = compat_ptr(regs.gprs[5]); |
1011 | if (!newsp) | 1012 | if (!newsp) |
1012 | newsp = regs.gprs[15]; | 1013 | newsp = regs.gprs[15]; |
1013 | return do_fork(clone_flags, newsp, ®s, 0, | 1014 | return do_fork(clone_flags, newsp, ®s, 0, |
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 6a63553493c5..e351780bb660 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -122,8 +122,8 @@ out: | |||
122 | #ifndef CONFIG_64BIT | 122 | #ifndef CONFIG_64BIT |
123 | struct sel_arg_struct { | 123 | struct sel_arg_struct { |
124 | unsigned long n; | 124 | unsigned long n; |
125 | fd_set *inp, *outp, *exp; | 125 | fd_set __user *inp, *outp, *exp; |
126 | struct timeval *tvp; | 126 | struct timeval __user *tvp; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | asmlinkage long old_select(struct sel_arg_struct __user *arg) | 129 | asmlinkage long old_select(struct sel_arg_struct __user *arg) |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 5d21e9e6e7b4..a46793beeddd 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -486,7 +486,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
486 | info.si_signo = signal; | 486 | info.si_signo = signal; |
487 | info.si_errno = 0; | 487 | info.si_errno = 0; |
488 | info.si_code = ILL_ILLOPC; | 488 | info.si_code = ILL_ILLOPC; |
489 | info.si_addr = (void *) location; | 489 | info.si_addr = (void __user *) location; |
490 | do_trap(interruption_code, signal, | 490 | do_trap(interruption_code, signal, |
491 | "illegal operation", regs, &info); | 491 | "illegal operation", regs, &info); |
492 | } | 492 | } |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 2d5cb1385753..b075ab499d05 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -42,8 +42,8 @@ static volatile long cmm_timed_pages_target = 0; | |||
42 | static long cmm_timeout_pages = 0; | 42 | static long cmm_timeout_pages = 0; |
43 | static long cmm_timeout_seconds = 0; | 43 | static long cmm_timeout_seconds = 0; |
44 | 44 | ||
45 | static struct cmm_page_array *cmm_page_list = 0; | 45 | static struct cmm_page_array *cmm_page_list = NULL; |
46 | static struct cmm_page_array *cmm_timed_page_list = 0; | 46 | static struct cmm_page_array *cmm_timed_page_list = NULL; |
47 | 47 | ||
48 | static unsigned long cmm_thread_active = 0; | 48 | static unsigned long cmm_thread_active = 0; |
49 | static struct work_struct cmm_thread_starter; | 49 | static struct work_struct cmm_thread_starter; |
@@ -259,7 +259,7 @@ static struct ctl_table cmm_table[]; | |||
259 | 259 | ||
260 | static int | 260 | static int |
261 | cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, | 261 | cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, |
262 | void *buffer, size_t *lenp, loff_t *ppos) | 262 | void __user *buffer, size_t *lenp, loff_t *ppos) |
263 | { | 263 | { |
264 | char buf[16], *p; | 264 | char buf[16], *p; |
265 | long pages; | 265 | long pages; |
@@ -300,7 +300,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, | |||
300 | 300 | ||
301 | static int | 301 | static int |
302 | cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, | 302 | cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, |
303 | void *buffer, size_t *lenp, loff_t *ppos) | 303 | void __user *buffer, size_t *lenp, loff_t *ppos) |
304 | { | 304 | { |
305 | char buf[64], *p; | 305 | char buf[64], *p; |
306 | long pages, seconds; | 306 | long pages, seconds; |
@@ -419,7 +419,7 @@ cmm_init (void) | |||
419 | #ifdef CONFIG_CMM_IUCV | 419 | #ifdef CONFIG_CMM_IUCV |
420 | smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); | 420 | smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); |
421 | #endif | 421 | #endif |
422 | INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, 0); | 422 | INIT_WORK(&cmm_thread_starter, (void *) cmm_start_thread, NULL); |
423 | init_waitqueue_head(&cmm_thread_wait); | 423 | init_waitqueue_head(&cmm_thread_wait); |
424 | init_timer(&cmm_timer); | 424 | init_timer(&cmm_timer); |
425 | return 0; | 425 | return 0; |
diff --git a/arch/sh/boards/renesas/rts7751r2d/io.c b/arch/sh/boards/renesas/rts7751r2d/io.c index c46f9154cfd5..123abbbc91e0 100644 --- a/arch/sh/boards/renesas/rts7751r2d/io.c +++ b/arch/sh/boards/renesas/rts7751r2d/io.c | |||
@@ -216,24 +216,26 @@ void rts7751r2d_insb(unsigned long port, void *addr, unsigned long count) | |||
216 | { | 216 | { |
217 | volatile __u8 *bp; | 217 | volatile __u8 *bp; |
218 | volatile __u16 *p; | 218 | volatile __u16 *p; |
219 | unsigned char *s = addr; | ||
219 | 220 | ||
220 | if (CHECK_AX88796L_PORT(port)) { | 221 | if (CHECK_AX88796L_PORT(port)) { |
221 | p = (volatile unsigned short *)port88796l(port, 0); | 222 | p = (volatile unsigned short *)port88796l(port, 0); |
222 | while (count--) *((unsigned char *) addr)++ = *p & 0xff; | 223 | while (count--) *s++ = *p & 0xff; |
223 | } else if (PXSEG(port)) | 224 | } else if (PXSEG(port)) |
224 | while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)port; | 225 | while (count--) *s++ = *(volatile unsigned char *)port; |
225 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { | 226 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { |
226 | bp = (__u8 *)PCI_IOMAP(port); | 227 | bp = (__u8 *)PCI_IOMAP(port); |
227 | while (count--) *((volatile unsigned char *) addr)++ = *bp; | 228 | while (count--) *s++ = *bp; |
228 | } else { | 229 | } else { |
229 | p = (volatile unsigned short *)port2adr(port); | 230 | p = (volatile unsigned short *)port2adr(port); |
230 | while (count--) *((unsigned char *) addr)++ = *p & 0xff; | 231 | while (count--) *s++ = *p & 0xff; |
231 | } | 232 | } |
232 | } | 233 | } |
233 | 234 | ||
234 | void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count) | 235 | void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count) |
235 | { | 236 | { |
236 | volatile __u16 *p; | 237 | volatile __u16 *p; |
238 | __u16 *s = addr; | ||
237 | 239 | ||
238 | if (CHECK_AX88796L_PORT(port)) | 240 | if (CHECK_AX88796L_PORT(port)) |
239 | p = (volatile unsigned short *)port88796l(port, 1); | 241 | p = (volatile unsigned short *)port88796l(port, 1); |
@@ -243,7 +245,7 @@ void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count) | |||
243 | p = (volatile unsigned short *)PCI_IOMAP(port); | 245 | p = (volatile unsigned short *)PCI_IOMAP(port); |
244 | else | 246 | else |
245 | p = (volatile unsigned short *)port2adr(port); | 247 | p = (volatile unsigned short *)port2adr(port); |
246 | while (count--) *((__u16 *) addr)++ = *p; | 248 | while (count--) *s++ = *p; |
247 | } | 249 | } |
248 | 250 | ||
249 | void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count) | 251 | void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count) |
@@ -252,8 +254,9 @@ void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count) | |||
252 | maybebadio(insl, port); | 254 | maybebadio(insl, port); |
253 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { | 255 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { |
254 | volatile __u32 *p = (__u32 *)PCI_IOMAP(port); | 256 | volatile __u32 *p = (__u32 *)PCI_IOMAP(port); |
257 | __u32 *s = addr; | ||
255 | 258 | ||
256 | while (count--) *((__u32 *) addr)++ = *p; | 259 | while (count--) *s++ = *p; |
257 | } else | 260 | } else |
258 | maybebadio(insl, port); | 261 | maybebadio(insl, port); |
259 | } | 262 | } |
@@ -262,24 +265,26 @@ void rts7751r2d_outsb(unsigned long port, const void *addr, unsigned long count) | |||
262 | { | 265 | { |
263 | volatile __u8 *bp; | 266 | volatile __u8 *bp; |
264 | volatile __u16 *p; | 267 | volatile __u16 *p; |
268 | const __u8 *s = addr; | ||
265 | 269 | ||
266 | if (CHECK_AX88796L_PORT(port)) { | 270 | if (CHECK_AX88796L_PORT(port)) { |
267 | p = (volatile unsigned short *)port88796l(port, 0); | 271 | p = (volatile unsigned short *)port88796l(port, 0); |
268 | while (count--) *p = *((unsigned char *) addr)++; | 272 | while (count--) *p = *s++; |
269 | } else if (PXSEG(port)) | 273 | } else if (PXSEG(port)) |
270 | while (count--) *(volatile unsigned char *)port = *((unsigned char *) addr)++; | 274 | while (count--) *(volatile unsigned char *)port = *s++; |
271 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { | 275 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { |
272 | bp = (__u8 *)PCI_IOMAP(port); | 276 | bp = (__u8 *)PCI_IOMAP(port); |
273 | while (count--) *bp = *((volatile unsigned char *) addr)++; | 277 | while (count--) *bp = *s++; |
274 | } else { | 278 | } else { |
275 | p = (volatile unsigned short *)port2adr(port); | 279 | p = (volatile unsigned short *)port2adr(port); |
276 | while (count--) *p = *((unsigned char *) addr)++; | 280 | while (count--) *p = *s++; |
277 | } | 281 | } |
278 | } | 282 | } |
279 | 283 | ||
280 | void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count) | 284 | void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count) |
281 | { | 285 | { |
282 | volatile __u16 *p; | 286 | volatile __u16 *p; |
287 | const __u16 *s = addr; | ||
283 | 288 | ||
284 | if (CHECK_AX88796L_PORT(port)) | 289 | if (CHECK_AX88796L_PORT(port)) |
285 | p = (volatile unsigned short *)port88796l(port, 1); | 290 | p = (volatile unsigned short *)port88796l(port, 1); |
@@ -289,7 +294,7 @@ void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count) | |||
289 | p = (volatile unsigned short *)PCI_IOMAP(port); | 294 | p = (volatile unsigned short *)PCI_IOMAP(port); |
290 | else | 295 | else |
291 | p = (volatile unsigned short *)port2adr(port); | 296 | p = (volatile unsigned short *)port2adr(port); |
292 | while (count--) *p = *((__u16 *) addr)++; | 297 | while (count--) *p = *s++; |
293 | } | 298 | } |
294 | 299 | ||
295 | void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count) | 300 | void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count) |
@@ -298,8 +303,9 @@ void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count) | |||
298 | maybebadio(outsl, port); | 303 | maybebadio(outsl, port); |
299 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { | 304 | else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { |
300 | volatile __u32 *p = (__u32 *)PCI_IOMAP(port); | 305 | volatile __u32 *p = (__u32 *)PCI_IOMAP(port); |
306 | const __u32 *s = addr; | ||
301 | 307 | ||
302 | while (count--) *p = *((__u32 *) addr)++; | 308 | while (count--) *p = *s++; |
303 | } else | 309 | } else |
304 | maybebadio(outsl, port); | 310 | maybebadio(outsl, port); |
305 | } | 311 | } |
diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c index 472b450e61be..de29c45f23a7 100644 --- a/arch/sh64/kernel/sh_ksyms.c +++ b/arch/sh64/kernel/sh_ksyms.c | |||
@@ -31,14 +31,6 @@ | |||
31 | 31 | ||
32 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); | 32 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); |
33 | 33 | ||
34 | #if 0 | ||
35 | /* Not yet - there's no declaration of drive_info anywhere. */ | ||
36 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) | ||
37 | extern struct drive_info_struct drive_info; | ||
38 | EXPORT_SYMBOL(drive_info); | ||
39 | #endif | ||
40 | #endif | ||
41 | |||
42 | /* platform dependent support */ | 34 | /* platform dependent support */ |
43 | EXPORT_SYMBOL(dump_fpu); | 35 | EXPORT_SYMBOL(dump_fpu); |
44 | EXPORT_SYMBOL(iounmap); | 36 | EXPORT_SYMBOL(iounmap); |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 267ec8f6fb58..887f6a160c58 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #define curptr g6 | 39 | #define curptr g6 |
40 | 40 | ||
41 | #define NR_SYSCALLS 299 /* Each OS is different... */ | 41 | #define NR_SYSCALLS 300 /* Each OS is different... */ |
42 | 42 | ||
43 | /* These are just handy. */ | 43 | /* These are just handy. */ |
44 | #define _SV save %sp, -STACKFRAME_SZ, %sp | 44 | #define _SV save %sp, -STACKFRAME_SZ, %sp |
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index fbb05a452e51..118cac84a0f5 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
@@ -54,7 +54,7 @@ void (*pm_idle)(void); | |||
54 | * This is done via auxio, but could be used as a fallback | 54 | * This is done via auxio, but could be used as a fallback |
55 | * handler when auxio is not present-- unused for now... | 55 | * handler when auxio is not present-- unused for now... |
56 | */ | 56 | */ |
57 | void (*pm_power_off)(void); | 57 | void (*pm_power_off)(void) = machine_power_off; |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * sysctl - toggle power-off restriction for serial console | 60 | * sysctl - toggle power-off restriction for serial console |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 6877ae4cd1d9..c0314705d73a 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -78,7 +78,7 @@ sys_call_table: | |||
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_newfstatat |
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 | 81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
82 | 82 | ||
83 | #ifdef CONFIG_SUNOS_EMUL | 83 | #ifdef CONFIG_SUNOS_EMUL |
84 | /* Now the SunOS syscall table. */ | 84 | /* Now the SunOS syscall table. */ |
@@ -190,5 +190,6 @@ sunos_sys_table: | |||
190 | /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys | 190 | /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys |
191 | .long sunos_nosys, sunos_nosys, sunos_nosys | 191 | .long sunos_nosys, sunos_nosys, sunos_nosys |
192 | .long sunos_nosys, sunos_nosys, sunos_nosys | 192 | .long sunos_nosys, sunos_nosys, sunos_nosys |
193 | .long sunos_nosys | ||
193 | 194 | ||
194 | #endif | 195 | #endif |
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index bc56a7d88308..069d49777b2a 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/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-rc2 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Sat Feb 4 02:31:38 2006 | 4 | # Tue Feb 7 17:47:18 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
@@ -30,7 +30,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
30 | # General setup | 30 | # General setup |
31 | # | 31 | # |
32 | CONFIG_LOCALVERSION="" | 32 | CONFIG_LOCALVERSION="" |
33 | CONFIG_LOCALVERSION_AUTO=y | 33 | # CONFIG_LOCALVERSION_AUTO is not set |
34 | CONFIG_SWAP=y | 34 | CONFIG_SWAP=y |
35 | CONFIG_SYSVIPC=y | 35 | CONFIG_SYSVIPC=y |
36 | CONFIG_POSIX_MQUEUE=y | 36 | CONFIG_POSIX_MQUEUE=y |
@@ -766,6 +766,7 @@ CONFIG_HWMON=y | |||
766 | # CONFIG_SENSORS_ASB100 is not set | 766 | # CONFIG_SENSORS_ASB100 is not set |
767 | # CONFIG_SENSORS_ATXP1 is not set | 767 | # CONFIG_SENSORS_ATXP1 is not set |
768 | # CONFIG_SENSORS_DS1621 is not set | 768 | # CONFIG_SENSORS_DS1621 is not set |
769 | # CONFIG_SENSORS_F71805F is not set | ||
769 | # CONFIG_SENSORS_FSCHER is not set | 770 | # CONFIG_SENSORS_FSCHER is not set |
770 | # CONFIG_SENSORS_FSCPOS is not set | 771 | # CONFIG_SENSORS_FSCPOS is not set |
771 | # CONFIG_SENSORS_GL518SM is not set | 772 | # CONFIG_SENSORS_GL518SM is not set |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 12911e7463f2..a73553ae7e53 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #define curptr g6 | 26 | #define curptr g6 |
27 | 27 | ||
28 | #define NR_SYSCALLS 299 /* Each OS is different... */ | 28 | #define NR_SYSCALLS 300 /* Each OS is different... */ |
29 | 29 | ||
30 | .text | 30 | .text |
31 | .align 32 | 31 | .align 32 |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 2881faf36635..5928b3c33e27 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -79,7 +79,7 @@ sys_call_table32: | |||
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_newfstatat |
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 | 82 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare |
83 | 83 | ||
84 | #endif /* CONFIG_COMPAT */ | 84 | #endif /* CONFIG_COMPAT */ |
85 | 85 | ||
@@ -148,7 +148,7 @@ sys_call_table: | |||
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, compat_sys_newfstatat |
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 | 151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
152 | 152 | ||
153 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ | 153 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ |
154 | defined(CONFIG_SOLARIS_EMUL_MODULE) | 154 | defined(CONFIG_SOLARIS_EMUL_MODULE) |
@@ -261,4 +261,5 @@ sunos_sys_table: | |||
261 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys | 261 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys |
262 | .word sunos_nosys, sunos_nosys, sunos_nosys | 262 | .word sunos_nosys, sunos_nosys, sunos_nosys |
263 | .word sunos_nosys, sunos_nosys, sunos_nosys | 263 | .word sunos_nosys, sunos_nosys, sunos_nosys |
264 | .word sunos_nosys | ||
264 | #endif | 265 | #endif |
diff --git a/arch/sparc64/solaris/systbl.S b/arch/sparc64/solaris/systbl.S index d25667eeae10..7043ca18caf9 100644 --- a/arch/sparc64/solaris/systbl.S +++ b/arch/sparc64/solaris/systbl.S | |||
@@ -283,32 +283,3 @@ solaris_sys_table: | |||
283 | .word solaris_unimplemented /* 253 */ | 283 | .word solaris_unimplemented /* 253 */ |
284 | .word solaris_unimplemented /* 254 */ | 284 | .word solaris_unimplemented /* 254 */ |
285 | .word solaris_unimplemented /* 255 */ | 285 | .word solaris_unimplemented /* 255 */ |
286 | .word solaris_unimplemented /* 256 */ | ||
287 | .word solaris_unimplemented /* 257 */ | ||
288 | .word solaris_unimplemented /* 258 */ | ||
289 | .word solaris_unimplemented /* 259 */ | ||
290 | .word solaris_unimplemented /* 260 */ | ||
291 | .word solaris_unimplemented /* 261 */ | ||
292 | .word solaris_unimplemented /* 262 */ | ||
293 | .word solaris_unimplemented /* 263 */ | ||
294 | .word solaris_unimplemented /* 264 */ | ||
295 | .word solaris_unimplemented /* 265 */ | ||
296 | .word solaris_unimplemented /* 266 */ | ||
297 | .word solaris_unimplemented /* 267 */ | ||
298 | .word solaris_unimplemented /* 268 */ | ||
299 | .word solaris_unimplemented /* 269 */ | ||
300 | .word solaris_unimplemented /* 270 */ | ||
301 | .word solaris_unimplemented /* 271 */ | ||
302 | .word solaris_unimplemented /* 272 */ | ||
303 | .word solaris_unimplemented /* 273 */ | ||
304 | .word solaris_unimplemented /* 274 */ | ||
305 | .word solaris_unimplemented /* 275 */ | ||
306 | .word solaris_unimplemented /* 276 */ | ||
307 | .word solaris_unimplemented /* 277 */ | ||
308 | .word solaris_unimplemented /* 278 */ | ||
309 | .word solaris_unimplemented /* 279 */ | ||
310 | .word solaris_unimplemented /* 280 */ | ||
311 | .word solaris_unimplemented /* 281 */ | ||
312 | .word solaris_unimplemented /* 282 */ | ||
313 | .word solaris_unimplemented /* 283 */ | ||
314 | |||
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 5d50d4a44abf..2f880cb167a5 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <termios.h> | 9 | #include <termios.h> |
10 | #include <string.h> | 10 | #include <string.h> |
11 | #include <signal.h> | 11 | #include <signal.h> |
12 | #include <sched.h> | ||
12 | #include <sys/stat.h> | 13 | #include <sys/stat.h> |
13 | #include <sys/ioctl.h> | 14 | #include <sys/ioctl.h> |
14 | #include <sys/socket.h> | 15 | #include <sys/socket.h> |
@@ -73,7 +74,6 @@ static void winch_handler(int sig) | |||
73 | struct winch_data { | 74 | struct winch_data { |
74 | int pty_fd; | 75 | int pty_fd; |
75 | int pipe_fd; | 76 | int pipe_fd; |
76 | int close_me; | ||
77 | }; | 77 | }; |
78 | 78 | ||
79 | static int winch_thread(void *arg) | 79 | static int winch_thread(void *arg) |
@@ -84,7 +84,6 @@ static int winch_thread(void *arg) | |||
84 | int count, err; | 84 | int count, err; |
85 | char c = 1; | 85 | char c = 1; |
86 | 86 | ||
87 | os_close_file(data->close_me); | ||
88 | pty_fd = data->pty_fd; | 87 | pty_fd = data->pty_fd; |
89 | pipe_fd = data->pipe_fd; | 88 | pipe_fd = data->pipe_fd; |
90 | count = os_write_file(pipe_fd, &c, sizeof(c)); | 89 | count = os_write_file(pipe_fd, &c, sizeof(c)); |
@@ -153,15 +152,16 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) | |||
153 | } | 152 | } |
154 | 153 | ||
155 | data = ((struct winch_data) { .pty_fd = fd, | 154 | data = ((struct winch_data) { .pty_fd = fd, |
156 | .pipe_fd = fds[1], | 155 | .pipe_fd = fds[1] } ); |
157 | .close_me = fds[0] } ); | 156 | /* CLONE_FILES so this thread doesn't hold open files which are open |
158 | err = run_helper_thread(winch_thread, &data, 0, &stack, 0); | 157 | * now, but later closed. This is a problem with /dev/net/tun. |
158 | */ | ||
159 | err = run_helper_thread(winch_thread, &data, CLONE_FILES, &stack, 0); | ||
159 | if(err < 0){ | 160 | if(err < 0){ |
160 | printk("fork of winch_thread failed - errno = %d\n", errno); | 161 | printk("fork of winch_thread failed - errno = %d\n", errno); |
161 | goto out_close; | 162 | goto out_close; |
162 | } | 163 | } |
163 | 164 | ||
164 | os_close_file(fds[1]); | ||
165 | *fd_out = fds[0]; | 165 | *fd_out = fds[0]; |
166 | n = os_read_file(fds[0], &c, sizeof(c)); | 166 | n = os_read_file(fds[0], &c, sizeof(c)); |
167 | if(n != sizeof(c)){ | 167 | if(n != sizeof(c)){ |
@@ -169,13 +169,12 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) | |||
169 | printk("read failed, err = %d\n", -n); | 169 | printk("read failed, err = %d\n", -n); |
170 | printk("fd %d will not support SIGWINCH\n", fd); | 170 | printk("fd %d will not support SIGWINCH\n", fd); |
171 | err = -EINVAL; | 171 | err = -EINVAL; |
172 | goto out_close1; | 172 | goto out_close; |
173 | } | 173 | } |
174 | return err ; | 174 | return err ; |
175 | 175 | ||
176 | out_close: | 176 | out_close: |
177 | os_close_file(fds[1]); | 177 | os_close_file(fds[1]); |
178 | out_close1: | ||
179 | os_close_file(fds[0]); | 178 | os_close_file(fds[0]); |
180 | out: | 179 | out: |
181 | return err; | 180 | return err; |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 8ebb2241ad42..8c7279bb353b 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -131,9 +131,8 @@ static int uml_net_open(struct net_device *dev) | |||
131 | SA_INTERRUPT | SA_SHIRQ, dev->name, dev); | 131 | SA_INTERRUPT | SA_SHIRQ, dev->name, dev); |
132 | if(err != 0){ | 132 | if(err != 0){ |
133 | printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); | 133 | printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); |
134 | if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user); | ||
135 | lp->fd = -1; | ||
136 | err = -ENETUNREACH; | 134 | err = -ENETUNREACH; |
135 | goto out_close; | ||
137 | } | 136 | } |
138 | 137 | ||
139 | lp->tl.data = (unsigned long) &lp->user; | 138 | lp->tl.data = (unsigned long) &lp->user; |
@@ -145,9 +144,19 @@ static int uml_net_open(struct net_device *dev) | |||
145 | */ | 144 | */ |
146 | while((err = uml_net_rx(dev)) > 0) ; | 145 | while((err = uml_net_rx(dev)) > 0) ; |
147 | 146 | ||
148 | out: | ||
149 | spin_unlock(&lp->lock); | 147 | spin_unlock(&lp->lock); |
150 | return(err); | 148 | |
149 | spin_lock(&opened_lock); | ||
150 | list_add(&lp->list, &opened); | ||
151 | spin_unlock(&opened_lock); | ||
152 | |||
153 | return 0; | ||
154 | out_close: | ||
155 | if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user); | ||
156 | lp->fd = -1; | ||
157 | out: | ||
158 | spin_unlock(&lp->lock); | ||
159 | return err; | ||
151 | } | 160 | } |
152 | 161 | ||
153 | static int uml_net_close(struct net_device *dev) | 162 | static int uml_net_close(struct net_device *dev) |
@@ -161,9 +170,13 @@ static int uml_net_close(struct net_device *dev) | |||
161 | if(lp->close != NULL) | 170 | if(lp->close != NULL) |
162 | (*lp->close)(lp->fd, &lp->user); | 171 | (*lp->close)(lp->fd, &lp->user); |
163 | lp->fd = -1; | 172 | lp->fd = -1; |
164 | list_del(&lp->list); | ||
165 | 173 | ||
166 | spin_unlock(&lp->lock); | 174 | spin_unlock(&lp->lock); |
175 | |||
176 | spin_lock(&opened_lock); | ||
177 | list_del(&lp->list); | ||
178 | spin_unlock(&opened_lock); | ||
179 | |||
167 | return 0; | 180 | return 0; |
168 | } | 181 | } |
169 | 182 | ||
@@ -410,11 +423,7 @@ static int eth_configure(int n, void *init, char *mac, | |||
410 | if (device->have_mac) | 423 | if (device->have_mac) |
411 | set_ether_mac(dev, device->mac); | 424 | set_ether_mac(dev, device->mac); |
412 | 425 | ||
413 | spin_lock(&opened_lock); | 426 | return 0; |
414 | list_add(&lp->list, &opened); | ||
415 | spin_unlock(&opened_lock); | ||
416 | |||
417 | return(0); | ||
418 | } | 427 | } |
419 | 428 | ||
420 | static struct uml_net *find_device(int n) | 429 | static struct uml_net *find_device(int n) |
diff --git a/arch/um/include/registers.h b/arch/um/include/registers.h index 4892e5fcef07..83b688ca198f 100644 --- a/arch/um/include/registers.h +++ b/arch/um/include/registers.h | |||
@@ -14,7 +14,7 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs); | |||
14 | extern void save_registers(int pid, union uml_pt_regs *regs); | 14 | extern void save_registers(int pid, union uml_pt_regs *regs); |
15 | extern void restore_registers(int pid, union uml_pt_regs *regs); | 15 | extern void restore_registers(int pid, union uml_pt_regs *regs); |
16 | extern void init_registers(int pid); | 16 | extern void init_registers(int pid); |
17 | extern void get_safe_registers(unsigned long * regs); | 17 | extern void get_safe_registers(unsigned long * regs, unsigned long * fp_regs); |
18 | extern void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer); | 18 | extern void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer); |
19 | 19 | ||
20 | #endif | 20 | #endif |
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c deleted file mode 100644 index eea1c9c4bb0f..000000000000 --- a/arch/um/kernel/skas/process.c +++ /dev/null | |||
@@ -1,569 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002- 2004 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | #include <unistd.h> | ||
9 | #include <errno.h> | ||
10 | #include <signal.h> | ||
11 | #include <setjmp.h> | ||
12 | #include <sched.h> | ||
13 | #include <sys/wait.h> | ||
14 | #include <sys/mman.h> | ||
15 | #include <sys/user.h> | ||
16 | #include <sys/time.h> | ||
17 | #include <asm/unistd.h> | ||
18 | #include <asm/types.h> | ||
19 | #include "user.h" | ||
20 | #include "ptrace_user.h" | ||
21 | #include "sysdep/ptrace.h" | ||
22 | #include "user_util.h" | ||
23 | #include "kern_util.h" | ||
24 | #include "skas.h" | ||
25 | #include "stub-data.h" | ||
26 | #include "mm_id.h" | ||
27 | #include "sysdep/sigcontext.h" | ||
28 | #include "sysdep/stub.h" | ||
29 | #include "os.h" | ||
30 | #include "proc_mm.h" | ||
31 | #include "skas_ptrace.h" | ||
32 | #include "chan_user.h" | ||
33 | #include "registers.h" | ||
34 | #include "mem.h" | ||
35 | #include "uml-config.h" | ||
36 | #include "process.h" | ||
37 | |||
38 | int is_skas_winch(int pid, int fd, void *data) | ||
39 | { | ||
40 | if(pid != os_getpgrp()) | ||
41 | return(0); | ||
42 | |||
43 | register_winch_irq(-1, fd, -1, data); | ||
44 | return(1); | ||
45 | } | ||
46 | |||
47 | void wait_stub_done(int pid, int sig, char * fname) | ||
48 | { | ||
49 | int n, status, err; | ||
50 | |||
51 | do { | ||
52 | if ( sig != -1 ) { | ||
53 | err = ptrace(PTRACE_CONT, pid, 0, sig); | ||
54 | if(err) | ||
55 | panic("%s : continue failed, errno = %d\n", | ||
56 | fname, errno); | ||
57 | } | ||
58 | sig = 0; | ||
59 | |||
60 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | ||
61 | } while((n >= 0) && WIFSTOPPED(status) && | ||
62 | ((WSTOPSIG(status) == SIGVTALRM) || | ||
63 | /* running UML inside a detached screen can cause | ||
64 | * SIGWINCHes | ||
65 | */ | ||
66 | (WSTOPSIG(status) == SIGWINCH))); | ||
67 | |||
68 | if((n < 0) || !WIFSTOPPED(status) || | ||
69 | (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ | ||
70 | unsigned long regs[HOST_FRAME_SIZE]; | ||
71 | if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) | ||
72 | printk("Failed to get registers from stub, " | ||
73 | "errno = %d\n", errno); | ||
74 | else { | ||
75 | int i; | ||
76 | |||
77 | printk("Stub registers -\n"); | ||
78 | for(i = 0; i < HOST_FRAME_SIZE; i++) | ||
79 | printk("\t%d - %lx\n", i, regs[i]); | ||
80 | } | ||
81 | panic("%s : failed to wait for SIGUSR1/SIGTRAP, " | ||
82 | "pid = %d, n = %d, errno = %d, status = 0x%x\n", | ||
83 | fname, pid, n, errno, status); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | void get_skas_faultinfo(int pid, struct faultinfo * fi) | ||
88 | { | ||
89 | int err; | ||
90 | |||
91 | if(ptrace_faultinfo){ | ||
92 | err = ptrace(PTRACE_FAULTINFO, pid, 0, fi); | ||
93 | if(err) | ||
94 | panic("get_skas_faultinfo - PTRACE_FAULTINFO failed, " | ||
95 | "errno = %d\n", errno); | ||
96 | |||
97 | /* Special handling for i386, which has different structs */ | ||
98 | if (sizeof(struct ptrace_faultinfo) < sizeof(struct faultinfo)) | ||
99 | memset((char *)fi + sizeof(struct ptrace_faultinfo), 0, | ||
100 | sizeof(struct faultinfo) - | ||
101 | sizeof(struct ptrace_faultinfo)); | ||
102 | } | ||
103 | else { | ||
104 | wait_stub_done(pid, SIGSEGV, "get_skas_faultinfo"); | ||
105 | |||
106 | /* faultinfo is prepared by the stub-segv-handler at start of | ||
107 | * the stub stack page. We just have to copy it. | ||
108 | */ | ||
109 | memcpy(fi, (void *)current_stub_stack(), sizeof(*fi)); | ||
110 | } | ||
111 | } | ||
112 | |||
113 | static void handle_segv(int pid, union uml_pt_regs * regs) | ||
114 | { | ||
115 | get_skas_faultinfo(pid, ®s->skas.faultinfo); | ||
116 | segv(regs->skas.faultinfo, 0, 1, NULL); | ||
117 | } | ||
118 | |||
119 | /*To use the same value of using_sysemu as the caller, ask it that value (in local_using_sysemu)*/ | ||
120 | static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu) | ||
121 | { | ||
122 | int err, status; | ||
123 | |||
124 | /* Mark this as a syscall */ | ||
125 | UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->skas.regs); | ||
126 | |||
127 | if (!local_using_sysemu) | ||
128 | { | ||
129 | err = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid); | ||
130 | if(err < 0) | ||
131 | panic("handle_trap - nullifying syscall failed errno = %d\n", | ||
132 | errno); | ||
133 | |||
134 | err = ptrace(PTRACE_SYSCALL, pid, 0, 0); | ||
135 | if(err < 0) | ||
136 | panic("handle_trap - continuing to end of syscall failed, " | ||
137 | "errno = %d\n", errno); | ||
138 | |||
139 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); | ||
140 | if((err < 0) || !WIFSTOPPED(status) || | ||
141 | (WSTOPSIG(status) != SIGTRAP + 0x80)) | ||
142 | panic("handle_trap - failed to wait at end of syscall, " | ||
143 | "errno = %d, status = %d\n", errno, status); | ||
144 | } | ||
145 | |||
146 | handle_syscall(regs); | ||
147 | } | ||
148 | |||
149 | extern int __syscall_stub_start; | ||
150 | int stub_code_fd = -1; | ||
151 | __u64 stub_code_offset; | ||
152 | |||
153 | static int userspace_tramp(void *stack) | ||
154 | { | ||
155 | void *addr; | ||
156 | |||
157 | ptrace(PTRACE_TRACEME, 0, 0, 0); | ||
158 | |||
159 | init_new_thread_signals(1); | ||
160 | enable_timer(); | ||
161 | |||
162 | if(!proc_mm){ | ||
163 | /* This has a pte, but it can't be mapped in with the usual | ||
164 | * tlb_flush mechanism because this is part of that mechanism | ||
165 | */ | ||
166 | addr = mmap64((void *) UML_CONFIG_STUB_CODE, page_size(), | ||
167 | PROT_EXEC, MAP_FIXED | MAP_PRIVATE, | ||
168 | stub_code_fd, stub_code_offset); | ||
169 | if(addr == MAP_FAILED){ | ||
170 | printk("mapping stub code failed, errno = %d\n", | ||
171 | errno); | ||
172 | exit(1); | ||
173 | } | ||
174 | |||
175 | if(stack != NULL){ | ||
176 | int fd; | ||
177 | __u64 offset; | ||
178 | |||
179 | fd = phys_mapping(to_phys(stack), &offset); | ||
180 | addr = mmap((void *) UML_CONFIG_STUB_DATA, page_size(), | ||
181 | PROT_READ | PROT_WRITE, | ||
182 | MAP_FIXED | MAP_SHARED, fd, offset); | ||
183 | if(addr == MAP_FAILED){ | ||
184 | printk("mapping stub stack failed, " | ||
185 | "errno = %d\n", errno); | ||
186 | exit(1); | ||
187 | } | ||
188 | } | ||
189 | } | ||
190 | if(!ptrace_faultinfo){ | ||
191 | unsigned long v = UML_CONFIG_STUB_CODE + | ||
192 | (unsigned long) stub_segv_handler - | ||
193 | (unsigned long) &__syscall_stub_start; | ||
194 | |||
195 | set_sigstack((void *) UML_CONFIG_STUB_DATA, page_size()); | ||
196 | set_handler(SIGSEGV, (void *) v, SA_ONSTACK, | ||
197 | SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, | ||
198 | SIGUSR1, -1); | ||
199 | } | ||
200 | |||
201 | os_stop_process(os_getpid()); | ||
202 | return(0); | ||
203 | } | ||
204 | |||
205 | /* Each element set once, and only accessed by a single processor anyway */ | ||
206 | #undef NR_CPUS | ||
207 | #define NR_CPUS 1 | ||
208 | int userspace_pid[NR_CPUS]; | ||
209 | |||
210 | int start_userspace(unsigned long stub_stack) | ||
211 | { | ||
212 | void *stack; | ||
213 | unsigned long sp; | ||
214 | int pid, status, n, flags; | ||
215 | |||
216 | if ( stub_code_fd == -1 ) | ||
217 | stub_code_fd = phys_mapping(to_phys(&__syscall_stub_start), | ||
218 | &stub_code_offset); | ||
219 | |||
220 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | ||
221 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | ||
222 | if(stack == MAP_FAILED) | ||
223 | panic("start_userspace : mmap failed, errno = %d", errno); | ||
224 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); | ||
225 | |||
226 | flags = CLONE_FILES | SIGCHLD; | ||
227 | if(proc_mm) flags |= CLONE_VM; | ||
228 | pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack); | ||
229 | if(pid < 0) | ||
230 | panic("start_userspace : clone failed, errno = %d", errno); | ||
231 | |||
232 | do { | ||
233 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | ||
234 | if(n < 0) | ||
235 | panic("start_userspace : wait failed, errno = %d", | ||
236 | errno); | ||
237 | } while(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGVTALRM)); | ||
238 | |||
239 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) | ||
240 | panic("start_userspace : expected SIGSTOP, got status = %d", | ||
241 | status); | ||
242 | |||
243 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, (void *)PTRACE_O_TRACESYSGOOD) < 0) | ||
244 | panic("start_userspace : PTRACE_SETOPTIONS failed, errno=%d\n", | ||
245 | errno); | ||
246 | |||
247 | if(munmap(stack, PAGE_SIZE) < 0) | ||
248 | panic("start_userspace : munmap failed, errno = %d\n", errno); | ||
249 | |||
250 | return(pid); | ||
251 | } | ||
252 | |||
253 | void userspace(union uml_pt_regs *regs) | ||
254 | { | ||
255 | int err, status, op, pid = userspace_pid[0]; | ||
256 | int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/ | ||
257 | |||
258 | while(1){ | ||
259 | restore_registers(pid, regs); | ||
260 | |||
261 | /* Now we set local_using_sysemu to be used for one loop */ | ||
262 | local_using_sysemu = get_using_sysemu(); | ||
263 | |||
264 | op = SELECT_PTRACE_OPERATION(local_using_sysemu, singlestepping(NULL)); | ||
265 | |||
266 | err = ptrace(op, pid, 0, 0); | ||
267 | if(err) | ||
268 | panic("userspace - could not resume userspace process, " | ||
269 | "pid=%d, ptrace operation = %d, errno = %d\n", | ||
270 | op, errno); | ||
271 | |||
272 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); | ||
273 | if(err < 0) | ||
274 | panic("userspace - waitpid failed, errno = %d\n", | ||
275 | errno); | ||
276 | |||
277 | regs->skas.is_user = 1; | ||
278 | save_registers(pid, regs); | ||
279 | UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */ | ||
280 | |||
281 | if(WIFSTOPPED(status)){ | ||
282 | switch(WSTOPSIG(status)){ | ||
283 | case SIGSEGV: | ||
284 | if(PTRACE_FULL_FAULTINFO || !ptrace_faultinfo) | ||
285 | user_signal(SIGSEGV, regs, pid); | ||
286 | else handle_segv(pid, regs); | ||
287 | break; | ||
288 | case SIGTRAP + 0x80: | ||
289 | handle_trap(pid, regs, local_using_sysemu); | ||
290 | break; | ||
291 | case SIGTRAP: | ||
292 | relay_signal(SIGTRAP, regs); | ||
293 | break; | ||
294 | case SIGIO: | ||
295 | case SIGVTALRM: | ||
296 | case SIGILL: | ||
297 | case SIGBUS: | ||
298 | case SIGFPE: | ||
299 | case SIGWINCH: | ||
300 | user_signal(WSTOPSIG(status), regs, pid); | ||
301 | break; | ||
302 | default: | ||
303 | printk("userspace - child stopped with signal " | ||
304 | "%d\n", WSTOPSIG(status)); | ||
305 | } | ||
306 | pid = userspace_pid[0]; | ||
307 | interrupt_end(); | ||
308 | |||
309 | /* Avoid -ERESTARTSYS handling in host */ | ||
310 | PT_SYSCALL_NR(regs->skas.regs) = -1; | ||
311 | } | ||
312 | } | ||
313 | } | ||
314 | #define INIT_JMP_NEW_THREAD 0 | ||
315 | #define INIT_JMP_REMOVE_SIGSTACK 1 | ||
316 | #define INIT_JMP_CALLBACK 2 | ||
317 | #define INIT_JMP_HALT 3 | ||
318 | #define INIT_JMP_REBOOT 4 | ||
319 | |||
320 | |||
321 | int copy_context_skas0(unsigned long new_stack, int pid) | ||
322 | { | ||
323 | int err; | ||
324 | unsigned long regs[MAX_REG_NR]; | ||
325 | unsigned long current_stack = current_stub_stack(); | ||
326 | struct stub_data *data = (struct stub_data *) current_stack; | ||
327 | struct stub_data *child_data = (struct stub_data *) new_stack; | ||
328 | __u64 new_offset; | ||
329 | int new_fd = phys_mapping(to_phys((void *)new_stack), &new_offset); | ||
330 | |||
331 | /* prepare offset and fd of child's stack as argument for parent's | ||
332 | * and child's mmap2 calls | ||
333 | */ | ||
334 | *data = ((struct stub_data) { .offset = MMAP_OFFSET(new_offset), | ||
335 | .fd = new_fd, | ||
336 | .timer = ((struct itimerval) | ||
337 | { { 0, 1000000 / hz() }, | ||
338 | { 0, 1000000 / hz() }})}); | ||
339 | get_safe_registers(regs); | ||
340 | |||
341 | /* Set parent's instruction pointer to start of clone-stub */ | ||
342 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | ||
343 | (unsigned long) stub_clone_handler - | ||
344 | (unsigned long) &__syscall_stub_start; | ||
345 | regs[REGS_SP_INDEX] = UML_CONFIG_STUB_DATA + PAGE_SIZE - | ||
346 | sizeof(void *); | ||
347 | err = ptrace_setregs(pid, regs); | ||
348 | if(err < 0) | ||
349 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " | ||
350 | "pid = %d, errno = %d\n", pid, errno); | ||
351 | |||
352 | /* set a well known return code for detection of child write failure */ | ||
353 | child_data->err = 12345678; | ||
354 | |||
355 | /* Wait, until parent has finished its work: read child's pid from | ||
356 | * parent's stack, and check, if bad result. | ||
357 | */ | ||
358 | wait_stub_done(pid, 0, "copy_context_skas0"); | ||
359 | |||
360 | pid = data->err; | ||
361 | if(pid < 0) | ||
362 | panic("copy_context_skas0 - stub-parent reports error %d\n", | ||
363 | pid); | ||
364 | |||
365 | /* Wait, until child has finished too: read child's result from | ||
366 | * child's stack and check it. | ||
367 | */ | ||
368 | wait_stub_done(pid, -1, "copy_context_skas0"); | ||
369 | if (child_data->err != UML_CONFIG_STUB_DATA) | ||
370 | panic("copy_context_skas0 - stub-child reports error %d\n", | ||
371 | child_data->err); | ||
372 | |||
373 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, | ||
374 | (void *)PTRACE_O_TRACESYSGOOD) < 0) | ||
375 | panic("copy_context_skas0 : PTRACE_SETOPTIONS failed, " | ||
376 | "errno = %d\n", errno); | ||
377 | |||
378 | return pid; | ||
379 | } | ||
380 | |||
381 | /* | ||
382 | * This is used only, if stub pages are needed, while proc_mm is | ||
383 | * availabl. Opening /proc/mm creates a new mm_context, which lacks | ||
384 | * the stub-pages. Thus, we map them using /proc/mm-fd | ||
385 | */ | ||
386 | void map_stub_pages(int fd, unsigned long code, | ||
387 | unsigned long data, unsigned long stack) | ||
388 | { | ||
389 | struct proc_mm_op mmop; | ||
390 | int n; | ||
391 | |||
392 | mmop = ((struct proc_mm_op) { .op = MM_MMAP, | ||
393 | .u = | ||
394 | { .mmap = | ||
395 | { .addr = code, | ||
396 | .len = PAGE_SIZE, | ||
397 | .prot = PROT_EXEC, | ||
398 | .flags = MAP_FIXED | MAP_PRIVATE, | ||
399 | .fd = stub_code_fd, | ||
400 | .offset = stub_code_offset | ||
401 | } } }); | ||
402 | n = os_write_file(fd, &mmop, sizeof(mmop)); | ||
403 | if(n != sizeof(mmop)) | ||
404 | panic("map_stub_pages : /proc/mm map for code failed, " | ||
405 | "err = %d\n", -n); | ||
406 | |||
407 | if ( stack ) { | ||
408 | __u64 map_offset; | ||
409 | int map_fd = phys_mapping(to_phys((void *)stack), &map_offset); | ||
410 | mmop = ((struct proc_mm_op) | ||
411 | { .op = MM_MMAP, | ||
412 | .u = | ||
413 | { .mmap = | ||
414 | { .addr = data, | ||
415 | .len = PAGE_SIZE, | ||
416 | .prot = PROT_READ | PROT_WRITE, | ||
417 | .flags = MAP_FIXED | MAP_SHARED, | ||
418 | .fd = map_fd, | ||
419 | .offset = map_offset | ||
420 | } } }); | ||
421 | n = os_write_file(fd, &mmop, sizeof(mmop)); | ||
422 | if(n != sizeof(mmop)) | ||
423 | panic("map_stub_pages : /proc/mm map for data failed, " | ||
424 | "err = %d\n", -n); | ||
425 | } | ||
426 | } | ||
427 | |||
428 | void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, | ||
429 | void (*handler)(int)) | ||
430 | { | ||
431 | unsigned long flags; | ||
432 | sigjmp_buf switch_buf, fork_buf; | ||
433 | |||
434 | *switch_buf_ptr = &switch_buf; | ||
435 | *fork_buf_ptr = &fork_buf; | ||
436 | |||
437 | /* Somewhat subtle - siglongjmp restores the signal mask before doing | ||
438 | * the longjmp. This means that when jumping from one stack to another | ||
439 | * when the target stack has interrupts enabled, an interrupt may occur | ||
440 | * on the source stack. This is bad when starting up a process because | ||
441 | * it's not supposed to get timer ticks until it has been scheduled. | ||
442 | * So, we disable interrupts around the sigsetjmp to ensure that | ||
443 | * they can't happen until we get back here where they are safe. | ||
444 | */ | ||
445 | flags = get_signals(); | ||
446 | block_signals(); | ||
447 | if(sigsetjmp(fork_buf, 1) == 0) | ||
448 | new_thread_proc(stack, handler); | ||
449 | |||
450 | remove_sigstack(); | ||
451 | |||
452 | set_signals(flags); | ||
453 | } | ||
454 | |||
455 | void thread_wait(void *sw, void *fb) | ||
456 | { | ||
457 | sigjmp_buf buf, **switch_buf = sw, *fork_buf; | ||
458 | |||
459 | *switch_buf = &buf; | ||
460 | fork_buf = fb; | ||
461 | if(sigsetjmp(buf, 1) == 0) | ||
462 | siglongjmp(*fork_buf, INIT_JMP_REMOVE_SIGSTACK); | ||
463 | } | ||
464 | |||
465 | void switch_threads(void *me, void *next) | ||
466 | { | ||
467 | sigjmp_buf my_buf, **me_ptr = me, *next_buf = next; | ||
468 | |||
469 | *me_ptr = &my_buf; | ||
470 | if(sigsetjmp(my_buf, 1) == 0) | ||
471 | siglongjmp(*next_buf, 1); | ||
472 | } | ||
473 | |||
474 | static sigjmp_buf initial_jmpbuf; | ||
475 | |||
476 | /* XXX Make these percpu */ | ||
477 | static void (*cb_proc)(void *arg); | ||
478 | static void *cb_arg; | ||
479 | static sigjmp_buf *cb_back; | ||
480 | |||
481 | int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr) | ||
482 | { | ||
483 | sigjmp_buf **switch_buf = switch_buf_ptr; | ||
484 | int n; | ||
485 | |||
486 | set_handler(SIGWINCH, (__sighandler_t) sig_handler, | ||
487 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGALRM, | ||
488 | SIGVTALRM, -1); | ||
489 | |||
490 | *fork_buf_ptr = &initial_jmpbuf; | ||
491 | n = sigsetjmp(initial_jmpbuf, 1); | ||
492 | switch(n){ | ||
493 | case INIT_JMP_NEW_THREAD: | ||
494 | new_thread_proc((void *) stack, new_thread_handler); | ||
495 | break; | ||
496 | case INIT_JMP_REMOVE_SIGSTACK: | ||
497 | remove_sigstack(); | ||
498 | break; | ||
499 | case INIT_JMP_CALLBACK: | ||
500 | (*cb_proc)(cb_arg); | ||
501 | siglongjmp(*cb_back, 1); | ||
502 | break; | ||
503 | case INIT_JMP_HALT: | ||
504 | kmalloc_ok = 0; | ||
505 | return(0); | ||
506 | case INIT_JMP_REBOOT: | ||
507 | kmalloc_ok = 0; | ||
508 | return(1); | ||
509 | default: | ||
510 | panic("Bad sigsetjmp return in start_idle_thread - %d\n", n); | ||
511 | } | ||
512 | siglongjmp(**switch_buf, 1); | ||
513 | } | ||
514 | |||
515 | void initial_thread_cb_skas(void (*proc)(void *), void *arg) | ||
516 | { | ||
517 | sigjmp_buf here; | ||
518 | |||
519 | cb_proc = proc; | ||
520 | cb_arg = arg; | ||
521 | cb_back = &here; | ||
522 | |||
523 | block_signals(); | ||
524 | if(sigsetjmp(here, 1) == 0) | ||
525 | siglongjmp(initial_jmpbuf, INIT_JMP_CALLBACK); | ||
526 | unblock_signals(); | ||
527 | |||
528 | cb_proc = NULL; | ||
529 | cb_arg = NULL; | ||
530 | cb_back = NULL; | ||
531 | } | ||
532 | |||
533 | void halt_skas(void) | ||
534 | { | ||
535 | block_signals(); | ||
536 | siglongjmp(initial_jmpbuf, INIT_JMP_HALT); | ||
537 | } | ||
538 | |||
539 | void reboot_skas(void) | ||
540 | { | ||
541 | block_signals(); | ||
542 | siglongjmp(initial_jmpbuf, INIT_JMP_REBOOT); | ||
543 | } | ||
544 | |||
545 | void switch_mm_skas(struct mm_id *mm_idp) | ||
546 | { | ||
547 | int err; | ||
548 | |||
549 | #warning need cpu pid in switch_mm_skas | ||
550 | if(proc_mm){ | ||
551 | err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, | ||
552 | mm_idp->u.mm_fd); | ||
553 | if(err) | ||
554 | panic("switch_mm_skas - PTRACE_SWITCH_MM failed, " | ||
555 | "errno = %d\n", errno); | ||
556 | } | ||
557 | else userspace_pid[0] = mm_idp->u.pid; | ||
558 | } | ||
559 | |||
560 | /* | ||
561 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
562 | * Emacs will notice this stuff at the end of the file and automatically | ||
563 | * adjust the settings for this buffer only. This must remain at the end | ||
564 | * of the file. | ||
565 | * --------------------------------------------------------------------------- | ||
566 | * Local variables: | ||
567 | * c-file-style: "linux" | ||
568 | * End: | ||
569 | */ | ||
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index e2d3ca445ef5..27cdf9164422 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -193,6 +193,24 @@ __uml_setup("root=", uml_root_setup, | |||
193 | " root=/dev/ubd5\n\n" | 193 | " root=/dev/ubd5\n\n" |
194 | ); | 194 | ); |
195 | 195 | ||
196 | #ifndef CONFIG_MODE_TT | ||
197 | |||
198 | static int __init no_skas_debug_setup(char *line, int *add) | ||
199 | { | ||
200 | printf("'debug' is not necessary to gdb UML in skas mode - run \n"); | ||
201 | printf("'gdb linux' and disable CONFIG_CMDLINE_ON_HOST if gdb \n"); | ||
202 | printf("doesn't work as expected\n"); | ||
203 | |||
204 | return 0; | ||
205 | } | ||
206 | |||
207 | __uml_setup("debug", no_skas_debug_setup, | ||
208 | "debug\n" | ||
209 | " this flag is not needed to run gdb on UML in skas mode\n\n" | ||
210 | ); | ||
211 | |||
212 | #endif | ||
213 | |||
196 | #ifdef CONFIG_SMP | 214 | #ifdef CONFIG_SMP |
197 | static int __init uml_ncpus_setup(char *line, int *add) | 215 | static int __init uml_ncpus_setup(char *line, int *add) |
198 | { | 216 | { |
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c index 52945338b64d..87c3aa0252db 100644 --- a/arch/um/os-Linux/drivers/tuntap_user.c +++ b/arch/um/os-Linux/drivers/tuntap_user.c | |||
@@ -122,6 +122,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, | |||
122 | return(-EINVAL); | 122 | return(-EINVAL); |
123 | } | 123 | } |
124 | *fd_out = ((int *) CMSG_DATA(cmsg))[0]; | 124 | *fd_out = ((int *) CMSG_DATA(cmsg))[0]; |
125 | os_set_exec_close(*fd_out, 1); | ||
125 | return(0); | 126 | return(0); |
126 | } | 127 | } |
127 | 128 | ||
@@ -137,7 +138,8 @@ static int tuntap_open(void *data) | |||
137 | return(err); | 138 | return(err); |
138 | 139 | ||
139 | if(pri->fixed_config){ | 140 | if(pri->fixed_config){ |
140 | pri->fd = os_open_file("/dev/net/tun", of_rdwr(OPENFLAGS()), 0); | 141 | pri->fd = os_open_file("/dev/net/tun", |
142 | of_cloexec(of_rdwr(OPENFLAGS())), 0); | ||
141 | if(pri->fd < 0){ | 143 | if(pri->fd < 0){ |
142 | printk("Failed to open /dev/net/tun, err = %d\n", | 144 | printk("Failed to open /dev/net/tun, err = %d\n", |
143 | -pri->fd); | 145 | -pri->fd); |
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 9890e9090f58..fbb080c2fc26 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -60,7 +60,7 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | |||
60 | 60 | ||
61 | multi_count++; | 61 | multi_count++; |
62 | 62 | ||
63 | get_safe_registers(regs); | 63 | get_safe_registers(regs, NULL); |
64 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | 64 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + |
65 | ((unsigned long) &batch_syscall_stub - | 65 | ((unsigned long) &batch_syscall_stub - |
66 | (unsigned long) &__syscall_stub_start); | 66 | (unsigned long) &__syscall_stub_start); |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 120a21c5883f..bbf34cb91ce1 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -310,16 +310,12 @@ void userspace(union uml_pt_regs *regs) | |||
310 | } | 310 | } |
311 | } | 311 | } |
312 | } | 312 | } |
313 | #define INIT_JMP_NEW_THREAD 0 | ||
314 | #define INIT_JMP_REMOVE_SIGSTACK 1 | ||
315 | #define INIT_JMP_CALLBACK 2 | ||
316 | #define INIT_JMP_HALT 3 | ||
317 | #define INIT_JMP_REBOOT 4 | ||
318 | 313 | ||
319 | int copy_context_skas0(unsigned long new_stack, int pid) | 314 | int copy_context_skas0(unsigned long new_stack, int pid) |
320 | { | 315 | { |
321 | int err; | 316 | int err; |
322 | unsigned long regs[MAX_REG_NR]; | 317 | unsigned long regs[HOST_FRAME_SIZE]; |
318 | unsigned long fp_regs[HOST_FP_SIZE]; | ||
323 | unsigned long current_stack = current_stub_stack(); | 319 | unsigned long current_stack = current_stub_stack(); |
324 | struct stub_data *data = (struct stub_data *) current_stack; | 320 | struct stub_data *data = (struct stub_data *) current_stack; |
325 | struct stub_data *child_data = (struct stub_data *) new_stack; | 321 | struct stub_data *child_data = (struct stub_data *) new_stack; |
@@ -334,7 +330,7 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
334 | .timer = ((struct itimerval) | 330 | .timer = ((struct itimerval) |
335 | { { 0, 1000000 / hz() }, | 331 | { { 0, 1000000 / hz() }, |
336 | { 0, 1000000 / hz() }})}); | 332 | { 0, 1000000 / hz() }})}); |
337 | get_safe_registers(regs); | 333 | get_safe_registers(regs, fp_regs); |
338 | 334 | ||
339 | /* Set parent's instruction pointer to start of clone-stub */ | 335 | /* Set parent's instruction pointer to start of clone-stub */ |
340 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | 336 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + |
@@ -350,6 +346,11 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
350 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " | 346 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " |
351 | "pid = %d, errno = %d\n", pid, errno); | 347 | "pid = %d, errno = %d\n", pid, errno); |
352 | 348 | ||
349 | err = ptrace_setfpregs(pid, fp_regs); | ||
350 | if(err < 0) | ||
351 | panic("copy_context_skas0 : PTRACE_SETFPREGS failed, " | ||
352 | "pid = %d, errno = %d\n", pid, errno); | ||
353 | |||
353 | /* set a well known return code for detection of child write failure */ | 354 | /* set a well known return code for detection of child write failure */ |
354 | child_data->err = 12345678; | 355 | child_data->err = 12345678; |
355 | 356 | ||
@@ -457,6 +458,12 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, | |||
457 | set_signals(flags); | 458 | set_signals(flags); |
458 | } | 459 | } |
459 | 460 | ||
461 | #define INIT_JMP_NEW_THREAD 0 | ||
462 | #define INIT_JMP_REMOVE_SIGSTACK 1 | ||
463 | #define INIT_JMP_CALLBACK 2 | ||
464 | #define INIT_JMP_HALT 3 | ||
465 | #define INIT_JMP_REBOOT 4 | ||
466 | |||
460 | void thread_wait(void *sw, void *fb) | 467 | void thread_wait(void *sw, void *fb) |
461 | { | 468 | { |
462 | sigjmp_buf buf, **switch_buf = sw, *fork_buf; | 469 | sigjmp_buf buf, **switch_buf = sw, *fork_buf; |
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 6c5b17ed59e1..829d6b0d8b02 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -49,6 +49,7 @@ static int ptrace_child(void *arg) | |||
49 | int pid = os_getpid(), ppid = getppid(); | 49 | int pid = os_getpid(), ppid = getppid(); |
50 | int sc_result; | 50 | int sc_result; |
51 | 51 | ||
52 | change_sig(SIGWINCH, 0); | ||
52 | if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){ | 53 | if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){ |
53 | perror("ptrace"); | 54 | perror("ptrace"); |
54 | os_kill_process(pid, 0); | 55 | os_kill_process(pid, 0); |
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index aee4812333c6..7a6f6b99ceff 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -122,9 +122,12 @@ void init_registers(int pid) | |||
122 | err); | 122 | err); |
123 | } | 123 | } |
124 | 124 | ||
125 | void get_safe_registers(unsigned long *regs) | 125 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
126 | { | 126 | { |
127 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); | 127 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); |
128 | if(fp_regs != NULL) | ||
129 | memcpy(fp_regs, exec_fp_regs, | ||
130 | HOST_FP_SIZE * sizeof(unsigned long)); | ||
128 | } | 131 | } |
129 | 132 | ||
130 | void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) | 133 | void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) |
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c index 4b638dfb52b0..001941fa1a1e 100644 --- a/arch/um/os-Linux/sys-x86_64/registers.c +++ b/arch/um/os-Linux/sys-x86_64/registers.c | |||
@@ -70,9 +70,12 @@ void init_registers(int pid) | |||
70 | err); | 70 | err); |
71 | } | 71 | } |
72 | 72 | ||
73 | void get_safe_registers(unsigned long *regs) | 73 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
74 | { | 74 | { |
75 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); | 75 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); |
76 | if(fp_regs != NULL) | ||
77 | memcpy(fp_regs, exec_fp_regs, | ||
78 | HOST_FP_SIZE * sizeof(unsigned long)); | ||
76 | } | 79 | } |
77 | 80 | ||
78 | void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) | 81 | void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) |
diff --git a/arch/um/sys-x86_64/ptrace_user.c b/arch/um/sys-x86_64/ptrace_user.c index 12e404c6fa46..b5f9c33e311e 100644 --- a/arch/um/sys-x86_64/ptrace_user.c +++ b/arch/um/sys-x86_64/ptrace_user.c | |||
@@ -24,6 +24,13 @@ int ptrace_setregs(long pid, unsigned long *regs) | |||
24 | return(0); | 24 | return(0); |
25 | } | 25 | } |
26 | 26 | ||
27 | int ptrace_setfpregs(long pid, unsigned long *regs) | ||
28 | { | ||
29 | if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0) | ||
30 | return -errno; | ||
31 | return 0; | ||
32 | } | ||
33 | |||
27 | void ptrace_pokeuser(unsigned long addr, unsigned long data) | 34 | void ptrace_pokeuser(unsigned long addr, unsigned long data) |
28 | { | 35 | { |
29 | panic("ptrace_pokeuser"); | 36 | panic("ptrace_pokeuser"); |
diff --git a/arch/um/sys-x86_64/user-offsets.c b/arch/um/sys-x86_64/user-offsets.c index 5a585bfbb8c2..7bd54a921cf7 100644 --- a/arch/um/sys-x86_64/user-offsets.c +++ b/arch/um/sys-x86_64/user-offsets.c | |||
@@ -57,7 +57,7 @@ void foo(void) | |||
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | DEFINE_LONGS(HOST_FRAME_SIZE, FRAME_SIZE); | 59 | DEFINE_LONGS(HOST_FRAME_SIZE, FRAME_SIZE); |
60 | DEFINE(HOST_FP_SIZE, 0); | 60 | DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long)); |
61 | DEFINE(HOST_XFP_SIZE, 0); | 61 | DEFINE(HOST_XFP_SIZE, 0); |
62 | DEFINE_LONGS(HOST_RBX, RBX); | 62 | DEFINE_LONGS(HOST_RBX, RBX); |
63 | DEFINE_LONGS(HOST_RCX, RCX); | 63 | DEFINE_LONGS(HOST_RCX, RCX); |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index 067c0f47bd0d..ada4535d0161 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -685,6 +685,9 @@ ia32_sys_call_table: | |||
685 | .quad sys_readlinkat /* 305 */ | 685 | .quad sys_readlinkat /* 305 */ |
686 | .quad sys_fchmodat | 686 | .quad sys_fchmodat |
687 | .quad sys_faccessat | 687 | .quad sys_faccessat |
688 | .quad sys_ni_syscall /* pselect6 for now */ | ||
689 | .quad sys_ni_syscall /* ppoll for now */ | ||
690 | .quad sys_unshare /* 310 */ | ||
688 | ia32_syscall_end: | 691 | ia32_syscall_end: |
689 | .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 | 692 | .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 |
690 | .quad ni_syscall | 693 | .quad ni_syscall |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 363db5a003df..9435ab7d6fb8 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -94,7 +94,6 @@ unsigned long saved_video_mode; | |||
94 | /* | 94 | /* |
95 | * Setup options | 95 | * Setup options |
96 | */ | 96 | */ |
97 | struct drive_info_struct { char dummy[32]; } drive_info; | ||
98 | struct screen_info screen_info; | 97 | struct screen_info screen_info; |
99 | struct sys_desc_table_struct { | 98 | struct sys_desc_table_struct { |
100 | unsigned short length; | 99 | unsigned short length; |
@@ -572,7 +571,6 @@ void __init setup_arch(char **cmdline_p) | |||
572 | unsigned long kernel_end; | 571 | unsigned long kernel_end; |
573 | 572 | ||
574 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 573 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); |
575 | drive_info = DRIVE_INFO; | ||
576 | screen_info = SCREEN_INFO; | 574 | screen_info = SCREEN_INFO; |
577 | edid_info = EDID_INFO; | 575 | edid_info = EDID_INFO; |
578 | saved_video_mode = SAVED_VIDEO_MODE; | 576 | saved_video_mode = SAVED_VIDEO_MODE; |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index a28756ef7cef..67e4e28f4df8 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/nmi.h> | 59 | #include <asm/nmi.h> |
60 | #include <asm/irq.h> | 60 | #include <asm/irq.h> |
61 | #include <asm/hw_irq.h> | 61 | #include <asm/hw_irq.h> |
62 | #include <asm/numa.h> | ||
62 | 63 | ||
63 | /* Number of siblings per CPU package */ | 64 | /* Number of siblings per CPU package */ |
64 | int smp_num_siblings = 1; | 65 | int smp_num_siblings = 1; |
@@ -890,6 +891,7 @@ do_rest: | |||
890 | if (boot_error) { | 891 | if (boot_error) { |
891 | cpu_clear(cpu, cpu_callout_map); /* was set here (do_boot_cpu()) */ | 892 | cpu_clear(cpu, cpu_callout_map); /* was set here (do_boot_cpu()) */ |
892 | clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ | 893 | clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ |
894 | clear_node_cpumask(cpu); /* was set by numa_add_cpu */ | ||
893 | cpu_clear(cpu, cpu_present_map); | 895 | cpu_clear(cpu, cpu_present_map); |
894 | cpu_clear(cpu, cpu_possible_map); | 896 | cpu_clear(cpu, cpu_possible_map); |
895 | x86_cpu_to_apicid[cpu] = BAD_APICID; | 897 | x86_cpu_to_apicid[cpu] = BAD_APICID; |
@@ -1187,6 +1189,7 @@ void remove_cpu_from_maps(void) | |||
1187 | cpu_clear(cpu, cpu_callout_map); | 1189 | cpu_clear(cpu, cpu_callout_map); |
1188 | cpu_clear(cpu, cpu_callin_map); | 1190 | cpu_clear(cpu, cpu_callin_map); |
1189 | clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ | 1191 | clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ |
1192 | clear_node_cpumask(cpu); | ||
1190 | } | 1193 | } |
1191 | 1194 | ||
1192 | int __cpu_disable(void) | 1195 | int __cpu_disable(void) |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index c0844bffbf84..dba7237be5c1 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -748,7 +748,7 @@ static __init int late_hpet_init(void) | |||
748 | * Timer0 and Timer1 is used by platform. | 748 | * Timer0 and Timer1 is used by platform. |
749 | */ | 749 | */ |
750 | hd.hd_phys_address = vxtime.hpet_address; | 750 | hd.hd_phys_address = vxtime.hpet_address; |
751 | hd.hd_address = (void *)fix_to_virt(FIX_HPET_BASE); | 751 | hd.hd_address = (void __iomem *)fix_to_virt(FIX_HPET_BASE); |
752 | hd.hd_nirqs = ntimer; | 752 | hd.hd_nirqs = ntimer; |
753 | hd.hd_flags = HPET_DATA_PLATFORM; | 753 | hd.hd_flags = HPET_DATA_PLATFORM; |
754 | hpet_reserve_timer(&hd, 0); | 754 | hpet_reserve_timer(&hd, 0); |
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index b614d54d2ae4..3496abc8d372 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c | |||
@@ -39,11 +39,6 @@ extern void __write_lock_failed(rwlock_t *rw); | |||
39 | extern void __read_lock_failed(rwlock_t *rw); | 39 | extern void __read_lock_failed(rwlock_t *rw); |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) | ||
43 | extern struct drive_info_struct drive_info; | ||
44 | EXPORT_SYMBOL(drive_info); | ||
45 | #endif | ||
46 | |||
47 | /* platform dependent support */ | 42 | /* platform dependent support */ |
48 | EXPORT_SYMBOL(boot_cpu_data); | 43 | EXPORT_SYMBOL(boot_cpu_data); |
49 | //EXPORT_SYMBOL(dump_fpu); | 44 | //EXPORT_SYMBOL(dump_fpu); |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index b4a3fe4ec249..18f371fe37f8 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -49,7 +49,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus) | |||
49 | return pci_mmcfg_virt[0].virt; | 49 | return pci_mmcfg_virt[0].virt; |
50 | 50 | ||
51 | /* Fall back to type 0 */ | 51 | /* Fall back to type 0 */ |
52 | return 0; | 52 | return NULL; |
53 | } | 53 | } |
54 | 54 | ||
55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) | 55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) |