diff options
123 files changed, 929 insertions, 591 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/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/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/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/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/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/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/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/block/elevator.c b/block/elevator.c index 2fc269f69726..24b702d649a9 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
| @@ -293,7 +293,7 @@ void elv_requeue_request(request_queue_t *q, struct request *rq) | |||
| 293 | 293 | ||
| 294 | rq->flags &= ~REQ_STARTED; | 294 | rq->flags &= ~REQ_STARTED; |
| 295 | 295 | ||
| 296 | __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE, 0); | 296 | elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE); |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | static void elv_drain_elevator(request_queue_t *q) | 299 | static void elv_drain_elevator(request_queue_t *q) |
| @@ -310,41 +310,11 @@ static void elv_drain_elevator(request_queue_t *q) | |||
| 310 | } | 310 | } |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | void __elv_add_request(request_queue_t *q, struct request *rq, int where, | 313 | void elv_insert(request_queue_t *q, struct request *rq, int where) |
| 314 | int plug) | ||
| 315 | { | 314 | { |
| 316 | struct list_head *pos; | 315 | struct list_head *pos; |
| 317 | unsigned ordseq; | 316 | unsigned ordseq; |
| 318 | 317 | ||
| 319 | if (q->ordcolor) | ||
| 320 | rq->flags |= REQ_ORDERED_COLOR; | ||
| 321 | |||
| 322 | if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) { | ||
| 323 | /* | ||
| 324 | * toggle ordered color | ||
| 325 | */ | ||
| 326 | if (blk_barrier_rq(rq)) | ||
| 327 | q->ordcolor ^= 1; | ||
| 328 | |||
| 329 | /* | ||
| 330 | * barriers implicitly indicate back insertion | ||
| 331 | */ | ||
| 332 | if (where == ELEVATOR_INSERT_SORT) | ||
| 333 | where = ELEVATOR_INSERT_BACK; | ||
| 334 | |||
| 335 | /* | ||
| 336 | * this request is scheduling boundary, update end_sector | ||
| 337 | */ | ||
| 338 | if (blk_fs_request(rq)) { | ||
| 339 | q->end_sector = rq_end_sector(rq); | ||
| 340 | q->boundary_rq = rq; | ||
| 341 | } | ||
| 342 | } else if (!(rq->flags & REQ_ELVPRIV) && where == ELEVATOR_INSERT_SORT) | ||
| 343 | where = ELEVATOR_INSERT_BACK; | ||
| 344 | |||
| 345 | if (plug) | ||
| 346 | blk_plug_device(q); | ||
| 347 | |||
| 348 | rq->q = q; | 318 | rq->q = q; |
| 349 | 319 | ||
| 350 | switch (where) { | 320 | switch (where) { |
| @@ -425,6 +395,42 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where, | |||
| 425 | } | 395 | } |
| 426 | } | 396 | } |
| 427 | 397 | ||
| 398 | void __elv_add_request(request_queue_t *q, struct request *rq, int where, | ||
| 399 | int plug) | ||
| 400 | { | ||
| 401 | if (q->ordcolor) | ||
| 402 | rq->flags |= REQ_ORDERED_COLOR; | ||
| 403 | |||
| 404 | if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) { | ||
| 405 | /* | ||
| 406 | * toggle ordered color | ||
| 407 | */ | ||
| 408 | if (blk_barrier_rq(rq)) | ||
| 409 | q->ordcolor ^= 1; | ||
| 410 | |||
| 411 | /* | ||
| 412 | * barriers implicitly indicate back insertion | ||
| 413 | */ | ||
| 414 | if (where == ELEVATOR_INSERT_SORT) | ||
| 415 | where = ELEVATOR_INSERT_BACK; | ||
| 416 | |||
| 417 | /* | ||
| 418 | * this request is scheduling boundary, update | ||
| 419 | * end_sector | ||
| 420 | */ | ||
| 421 | if (blk_fs_request(rq)) { | ||
| 422 | q->end_sector = rq_end_sector(rq); | ||
| 423 | q->boundary_rq = rq; | ||
| 424 | } | ||
| 425 | } else if (!(rq->flags & REQ_ELVPRIV) && where == ELEVATOR_INSERT_SORT) | ||
| 426 | where = ELEVATOR_INSERT_BACK; | ||
| 427 | |||
| 428 | if (plug) | ||
| 429 | blk_plug_device(q); | ||
| 430 | |||
| 431 | elv_insert(q, rq, where); | ||
| 432 | } | ||
| 433 | |||
| 428 | void elv_add_request(request_queue_t *q, struct request *rq, int where, | 434 | void elv_add_request(request_queue_t *q, struct request *rq, int where, |
| 429 | int plug) | 435 | int plug) |
| 430 | { | 436 | { |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index ee5ed98db4cd..03d9c82b0fe7 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
| @@ -454,7 +454,7 @@ static void queue_flush(request_queue_t *q, unsigned which) | |||
| 454 | rq->end_io = end_io; | 454 | rq->end_io = end_io; |
| 455 | q->prepare_flush_fn(q, rq); | 455 | q->prepare_flush_fn(q, rq); |
| 456 | 456 | ||
| 457 | __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0); | 457 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | static inline struct request *start_ordered(request_queue_t *q, | 460 | static inline struct request *start_ordered(request_queue_t *q, |
| @@ -490,7 +490,7 @@ static inline struct request *start_ordered(request_queue_t *q, | |||
| 490 | else | 490 | else |
| 491 | q->ordseq |= QUEUE_ORDSEQ_POSTFLUSH; | 491 | q->ordseq |= QUEUE_ORDSEQ_POSTFLUSH; |
| 492 | 492 | ||
| 493 | __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0); | 493 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); |
| 494 | 494 | ||
| 495 | if (q->ordered & QUEUE_ORDERED_PREFLUSH) { | 495 | if (q->ordered & QUEUE_ORDERED_PREFLUSH) { |
| 496 | queue_flush(q, QUEUE_ORDERED_PREFLUSH); | 496 | queue_flush(q, QUEUE_ORDERED_PREFLUSH); |
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index cc72210687eb..24f7af9d0abc 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
| @@ -310,6 +310,8 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
| 310 | if (!rq->timeout) | 310 | if (!rq->timeout) |
| 311 | rq->timeout = BLK_DEFAULT_TIMEOUT; | 311 | rq->timeout = BLK_DEFAULT_TIMEOUT; |
| 312 | 312 | ||
| 313 | rq->retries = 0; | ||
| 314 | |||
| 313 | start_time = jiffies; | 315 | start_time = jiffies; |
| 314 | 316 | ||
| 315 | /* ignore return value. All information is passed back to caller | 317 | /* ignore return value. All information is passed back to caller |
| @@ -427,6 +429,7 @@ static int sg_scsi_ioctl(struct file *file, request_queue_t *q, | |||
| 427 | rq->data = buffer; | 429 | rq->data = buffer; |
| 428 | rq->data_len = bytes; | 430 | rq->data_len = bytes; |
| 429 | rq->flags |= REQ_BLOCK_PC; | 431 | rq->flags |= REQ_BLOCK_PC; |
| 432 | rq->retries = 0; | ||
| 430 | 433 | ||
| 431 | blk_execute_rq(q, bd_disk, rq, 0); | 434 | blk_execute_rq(q, bd_disk, rq, 0); |
| 432 | err = rq->errors & 0xff; /* only 8 bit SCSI status */ | 435 | err = rq->errors & 0xff; /* only 8 bit SCSI status */ |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4c67727d75b1..05ba410682a3 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
| @@ -222,7 +222,7 @@ config SYNCLINKMP | |||
| 222 | 222 | ||
| 223 | config SYNCLINK_GT | 223 | config SYNCLINK_GT |
| 224 | tristate "SyncLink GT/AC support" | 224 | tristate "SyncLink GT/AC support" |
| 225 | depends on SERIAL_NONSTANDARD | 225 | depends on SERIAL_NONSTANDARD && PCI |
| 226 | help | 226 | help |
| 227 | Support for SyncLink GT and SyncLink AC families of | 227 | Support for SyncLink GT and SyncLink AC families of |
| 228 | synchronous and asynchronous serial adapters | 228 | synchronous and asynchronous serial adapters |
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 0ef560144be3..6dfc94122dd9 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig | |||
| @@ -351,7 +351,7 @@ config HISAX_ENTERNOW_PCI | |||
| 351 | 351 | ||
| 352 | config HISAX_AMD7930 | 352 | config HISAX_AMD7930 |
| 353 | bool "Am7930 (EXPERIMENTAL)" | 353 | bool "Am7930 (EXPERIMENTAL)" |
| 354 | depends on EXPERIMENTAL && SPARC | 354 | depends on EXPERIMENTAL && SPARC && BROKEN |
| 355 | help | 355 | help |
| 356 | This enables HiSax support for the AMD7930 chips on some SPARCs. | 356 | This enables HiSax support for the AMD7930 chips on some SPARCs. |
| 357 | This code is not finished yet. | 357 | This code is not finished yet. |
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index b11cd31d8d27..12ad462737ba 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig | |||
| @@ -190,7 +190,7 @@ config WINDFARM_PM91 | |||
| 190 | config WINDFARM_PM112 | 190 | config WINDFARM_PM112 |
| 191 | tristate "Support for thermal management on PowerMac11,2" | 191 | tristate "Support for thermal management on PowerMac11,2" |
| 192 | depends on WINDFARM && I2C && PMAC_SMU | 192 | depends on WINDFARM && I2C && PMAC_SMU |
| 193 | select I2C_PMAC_SMU | 193 | select I2C_POWERMAC |
| 194 | help | 194 | help |
| 195 | This driver provides thermal control for the PowerMac11,2 | 195 | This driver provides thermal control for the PowerMac11,2 |
| 196 | which are the recent dual and quad G5 machines using the | 196 | which are the recent dual and quad G5 machines using the |
diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c index 297c32ab51e3..840fe0177121 100644 --- a/drivers/media/video/compat_ioctl32.c +++ b/drivers/media/video/compat_ioctl32.c | |||
| @@ -167,29 +167,32 @@ static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user | |||
| 167 | if (kp->clipcount > 2048) | 167 | if (kp->clipcount > 2048) |
| 168 | return -EINVAL; | 168 | return -EINVAL; |
| 169 | if (kp->clipcount) { | 169 | if (kp->clipcount) { |
| 170 | struct v4l2_clip32 *uclips = compat_ptr(up->clips); | 170 | struct v4l2_clip32 __user *uclips; |
| 171 | struct v4l2_clip *kclips; | 171 | struct v4l2_clip __user *kclips; |
| 172 | int n = kp->clipcount; | 172 | int n = kp->clipcount; |
| 173 | compat_caddr_t p; | ||
| 173 | 174 | ||
| 175 | if (get_user(p, &up->clips)) | ||
| 176 | return -EFAULT; | ||
| 177 | uclips = compat_ptr(p); | ||
| 174 | kclips = compat_alloc_user_space(n * sizeof(struct v4l2_clip)); | 178 | kclips = compat_alloc_user_space(n * sizeof(struct v4l2_clip)); |
| 175 | kp->clips = kclips; | 179 | kp->clips = kclips; |
| 176 | while (--n >= 0) { | 180 | while (--n >= 0) { |
| 177 | if (!access_ok(VERIFY_READ, &uclips->c, sizeof(uclips->c)) || | 181 | if (copy_in_user(&kclips->c, &uclips->c, sizeof(uclips->c))) |
| 178 | copy_from_user(&kclips->c, &uclips->c, sizeof(uclips->c))) | 182 | return -EFAULT; |
| 183 | if (put_user(n ? kclips + 1 : NULL, &kclips->next)) | ||
| 179 | return -EFAULT; | 184 | return -EFAULT; |
| 180 | kclips->next = n ? kclips + 1 : 0; | ||
| 181 | uclips += 1; | 185 | uclips += 1; |
| 182 | kclips += 1; | 186 | kclips += 1; |
| 183 | } | 187 | } |
| 184 | } else | 188 | } else |
| 185 | kp->clips = 0; | 189 | kp->clips = NULL; |
| 186 | return 0; | 190 | return 0; |
| 187 | } | 191 | } |
| 188 | 192 | ||
| 189 | static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) | 193 | static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) |
| 190 | { | 194 | { |
| 191 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_window32)) || | 195 | if (copy_to_user(&up->w, &kp->w, sizeof(up->w)) || |
| 192 | copy_to_user(&up->w, &kp->w, sizeof(up->w)) || | ||
| 193 | put_user(kp->field, &up->field) || | 196 | put_user(kp->field, &up->field) || |
| 194 | put_user(kp->chromakey, &up->chromakey) || | 197 | put_user(kp->chromakey, &up->chromakey) || |
| 195 | put_user(kp->clipcount, &up->clipcount)) | 198 | put_user(kp->clipcount, &up->clipcount)) |
| @@ -199,33 +202,29 @@ static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user | |||
| 199 | 202 | ||
| 200 | static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) | 203 | static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) |
| 201 | { | 204 | { |
| 202 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_pix_format)) || | 205 | if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format))) |
| 203 | copy_from_user(kp, up, sizeof(struct v4l2_pix_format))) | 206 | return -EFAULT; |
| 204 | return -EFAULT; | ||
| 205 | return 0; | 207 | return 0; |
| 206 | } | 208 | } |
| 207 | 209 | ||
| 208 | static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) | 210 | static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) |
| 209 | { | 211 | { |
| 210 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_pix_format)) || | 212 | if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format))) |
| 211 | copy_to_user(up, kp, sizeof(struct v4l2_pix_format))) | 213 | return -EFAULT; |
| 212 | return -EFAULT; | ||
| 213 | return 0; | 214 | return 0; |
| 214 | } | 215 | } |
| 215 | 216 | ||
| 216 | static inline int get_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) | 217 | static inline int get_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) |
| 217 | { | 218 | { |
| 218 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_vbi_format)) || | 219 | if (copy_from_user(kp, up, sizeof(struct v4l2_vbi_format))) |
| 219 | copy_from_user(kp, up, sizeof(struct v4l2_vbi_format))) | 220 | return -EFAULT; |
| 220 | return -EFAULT; | ||
| 221 | return 0; | 221 | return 0; |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | static inline int put_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) | 224 | static inline int put_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) |
| 225 | { | 225 | { |
| 226 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_vbi_format)) || | 226 | if (copy_to_user(up, kp, sizeof(struct v4l2_vbi_format))) |
| 227 | copy_to_user(up, kp, sizeof(struct v4l2_vbi_format))) | 227 | return -EFAULT; |
| 228 | return -EFAULT; | ||
| 229 | return 0; | 228 | return 0; |
| 230 | } | 229 | } |
| 231 | 230 | ||
| @@ -279,18 +278,16 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user | |||
| 279 | 278 | ||
| 280 | static inline int get_v4l2_standard(struct v4l2_standard *kp, struct v4l2_standard __user *up) | 279 | static inline int get_v4l2_standard(struct v4l2_standard *kp, struct v4l2_standard __user *up) |
| 281 | { | 280 | { |
| 282 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_standard)) || | 281 | if (copy_from_user(kp, up, sizeof(struct v4l2_standard))) |
| 283 | copy_from_user(kp, up, sizeof(struct v4l2_standard))) | 282 | return -EFAULT; |
| 284 | return -EFAULT; | ||
| 285 | return 0; | 283 | return 0; |
| 286 | 284 | ||
| 287 | } | 285 | } |
| 288 | 286 | ||
| 289 | static inline int put_v4l2_standard(struct v4l2_standard *kp, struct v4l2_standard __user *up) | 287 | static inline int put_v4l2_standard(struct v4l2_standard *kp, struct v4l2_standard __user *up) |
| 290 | { | 288 | { |
| 291 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_standard)) || | 289 | if (copy_to_user(up, kp, sizeof(struct v4l2_standard))) |
| 292 | copy_to_user(up, kp, sizeof(struct v4l2_standard))) | 290 | return -EFAULT; |
| 293 | return -EFAULT; | ||
| 294 | return 0; | 291 | return 0; |
| 295 | } | 292 | } |
| 296 | 293 | ||
| @@ -328,18 +325,16 @@ static int put_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32 | |||
| 328 | 325 | ||
| 329 | static inline int get_v4l2_tuner(struct v4l2_tuner *kp, struct v4l2_tuner __user *up) | 326 | static inline int get_v4l2_tuner(struct v4l2_tuner *kp, struct v4l2_tuner __user *up) |
| 330 | { | 327 | { |
| 331 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_tuner)) || | 328 | if (copy_from_user(kp, up, sizeof(struct v4l2_tuner))) |
| 332 | copy_from_user(kp, up, sizeof(struct v4l2_tuner))) | 329 | return -EFAULT; |
| 333 | return -EFAULT; | ||
| 334 | return 0; | 330 | return 0; |
| 335 | 331 | ||
| 336 | } | 332 | } |
| 337 | 333 | ||
| 338 | static inline int put_v4l2_tuner(struct v4l2_tuner *kp, struct v4l2_tuner __user *up) | 334 | static inline int put_v4l2_tuner(struct v4l2_tuner *kp, struct v4l2_tuner __user *up) |
| 339 | { | 335 | { |
| 340 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_tuner)) || | 336 | if (copy_to_user(up, kp, sizeof(struct v4l2_tuner))) |
| 341 | copy_to_user(up, kp, sizeof(struct v4l2_tuner))) | 337 | return -EFAULT; |
| 342 | return -EFAULT; | ||
| 343 | return 0; | 338 | return 0; |
| 344 | } | 339 | } |
| 345 | 340 | ||
| @@ -380,11 +375,13 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user | |||
| 380 | break; | 375 | break; |
| 381 | case V4L2_MEMORY_USERPTR: | 376 | case V4L2_MEMORY_USERPTR: |
| 382 | { | 377 | { |
| 383 | unsigned long tmp = (unsigned long)compat_ptr(up->m.userptr); | 378 | compat_long_t tmp; |
| 384 | 379 | ||
| 385 | if(get_user(kp->length, &up->length) || | 380 | if (get_user(kp->length, &up->length) || |
| 386 | get_user(kp->m.userptr, &tmp)) | 381 | get_user(tmp, &up->m.userptr)) |
| 387 | return -EFAULT; | 382 | return -EFAULT; |
| 383 | |||
| 384 | kp->m.userptr = (unsigned long)compat_ptr(tmp); | ||
| 388 | } | 385 | } |
| 389 | break; | 386 | break; |
| 390 | case V4L2_MEMORY_OVERLAY: | 387 | case V4L2_MEMORY_OVERLAY: |
| @@ -468,33 +465,29 @@ static int put_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_frame | |||
| 468 | 465 | ||
| 469 | static inline int get_v4l2_input32(struct v4l2_input *kp, struct v4l2_input __user *up) | 466 | static inline int get_v4l2_input32(struct v4l2_input *kp, struct v4l2_input __user *up) |
| 470 | { | 467 | { |
| 471 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_input) - 4) || | 468 | if (copy_from_user(kp, up, sizeof(struct v4l2_input) - 4)) |
| 472 | copy_from_user(kp, up, sizeof(struct v4l2_input) - 4)) | 469 | return -EFAULT; |
| 473 | return -EFAULT; | ||
| 474 | return 0; | 470 | return 0; |
| 475 | } | 471 | } |
| 476 | 472 | ||
| 477 | static inline int put_v4l2_input32(struct v4l2_input *kp, struct v4l2_input __user *up) | 473 | static inline int put_v4l2_input32(struct v4l2_input *kp, struct v4l2_input __user *up) |
| 478 | { | 474 | { |
| 479 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_input) - 4) || | 475 | if (copy_to_user(up, kp, sizeof(struct v4l2_input) - 4)) |
| 480 | copy_to_user(up, kp, sizeof(struct v4l2_input) - 4)) | 476 | return -EFAULT; |
| 481 | return -EFAULT; | ||
| 482 | return 0; | 477 | return 0; |
| 483 | } | 478 | } |
| 484 | 479 | ||
| 485 | static inline int get_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user *up) | 480 | static inline int get_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user *up) |
| 486 | { | 481 | { |
| 487 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_input)) || | 482 | if (copy_from_user(kp, up, sizeof(struct v4l2_input))) |
| 488 | copy_from_user(kp, up, sizeof(struct v4l2_input))) | 483 | return -EFAULT; |
| 489 | return -EFAULT; | ||
| 490 | return 0; | 484 | return 0; |
| 491 | } | 485 | } |
| 492 | 486 | ||
| 493 | static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user *up) | 487 | static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user *up) |
| 494 | { | 488 | { |
| 495 | if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_input)) || | 489 | if (copy_to_user(up, kp, sizeof(struct v4l2_input))) |
| 496 | copy_to_user(up, kp, sizeof(struct v4l2_input))) | 490 | return -EFAULT; |
| 497 | return -EFAULT; | ||
| 498 | return 0; | 491 | return 0; |
| 499 | } | 492 | } |
| 500 | 493 | ||
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig index effa0d7a73ac..205bb7083335 100644 --- a/drivers/mtd/chips/Kconfig +++ b/drivers/mtd/chips/Kconfig | |||
| @@ -301,7 +301,7 @@ config MTD_JEDEC | |||
| 301 | 301 | ||
| 302 | config MTD_XIP | 302 | config MTD_XIP |
| 303 | bool "XIP aware MTD support" | 303 | bool "XIP aware MTD support" |
| 304 | depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARM | 304 | depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARCH_MTD_XIP |
| 305 | default y if XIP_KERNEL | 305 | default y if XIP_KERNEL |
| 306 | help | 306 | help |
| 307 | This allows MTD support to work with flash memory which is also | 307 | This allows MTD support to work with flash memory which is also |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index c5cd61c7f927..e5bb9f5ae429 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
| @@ -748,7 +748,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, | |||
| 748 | if (essid->length) { | 748 | if (essid->length) { |
| 749 | dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */ | 749 | dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */ |
| 750 | /* if it is to big, trunk it */ | 750 | /* if it is to big, trunk it */ |
| 751 | dwrq->length = min(IW_ESSID_MAX_SIZE, essid->length); | 751 | dwrq->length = min((u8)IW_ESSID_MAX_SIZE, essid->length); |
| 752 | } else { | 752 | } else { |
| 753 | dwrq->flags = 0; | 753 | dwrq->flags = 0; |
| 754 | dwrq->length = 0; | 754 | dwrq->length = 0; |
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 7aef7518b0d1..8c5c276c5577 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c | |||
| @@ -362,7 +362,7 @@ static struct uart_ops serial21285_ops = { | |||
| 362 | 362 | ||
| 363 | static struct uart_port serial21285_port = { | 363 | static struct uart_port serial21285_port = { |
| 364 | .mapbase = 0x42000160, | 364 | .mapbase = 0x42000160, |
| 365 | .iotype = SERIAL_IO_MEM, | 365 | .iotype = UPIO_MEM, |
| 366 | .irq = NO_IRQ, | 366 | .irq = NO_IRQ, |
| 367 | .fifosize = 16, | 367 | .fifosize = 16, |
| 368 | .ops = &serial21285_ops, | 368 | .ops = &serial21285_ops, |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 179c1f065e60..b1fc97d5f643 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -2229,6 +2229,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
| 2229 | * and restore the IER | 2229 | * and restore the IER |
| 2230 | */ | 2230 | */ |
| 2231 | wait_for_xmitr(up, BOTH_EMPTY); | 2231 | wait_for_xmitr(up, BOTH_EMPTY); |
| 2232 | up->ier |= UART_IER_THRI; | ||
| 2232 | serial_out(up, UART_IER, ier | UART_IER_THRI); | 2233 | serial_out(up, UART_IER, ier | UART_IER_THRI); |
| 2233 | } | 2234 | } |
| 2234 | 2235 | ||
diff --git a/drivers/serial/8250_au1x00.c b/drivers/serial/8250_au1x00.c index 06ae8fbcc947..8d8d7a70d03e 100644 --- a/drivers/serial/8250_au1x00.c +++ b/drivers/serial/8250_au1x00.c | |||
| @@ -56,7 +56,6 @@ static struct plat_serial8250_port au1x00_data[] = { | |||
| 56 | #elif defined(CONFIG_SOC_AU1550) | 56 | #elif defined(CONFIG_SOC_AU1550) |
| 57 | PORT(UART0_ADDR, AU1550_UART0_INT), | 57 | PORT(UART0_ADDR, AU1550_UART0_INT), |
| 58 | PORT(UART1_ADDR, AU1550_UART1_INT), | 58 | PORT(UART1_ADDR, AU1550_UART1_INT), |
| 59 | PORT(UART2_ADDR, AU1550_UART2_INT), | ||
| 60 | PORT(UART3_ADDR, AU1550_UART3_INT), | 59 | PORT(UART3_ADDR, AU1550_UART3_INT), |
| 61 | #elif defined(CONFIG_SOC_AU1200) | 60 | #elif defined(CONFIG_SOC_AU1200) |
| 62 | PORT(UART0_ADDR, AU1200_UART0_INT), | 61 | PORT(UART0_ADDR, AU1200_UART0_INT), |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index bb9ec28ccc2b..94886c000d2a 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
| @@ -1882,6 +1882,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 1882 | PCI_SUBVENDOR_ID_CONNECT_TECH, | 1882 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 1883 | PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0, | 1883 | PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0, |
| 1884 | pbn_b0_4_1843200 }, | 1884 | pbn_b0_4_1843200 }, |
| 1885 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, | ||
| 1886 | PCI_VENDOR_ID_AFAVLAB, | ||
| 1887 | PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0, | ||
| 1888 | pbn_b0_4_1152000 }, | ||
| 1885 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152, | 1889 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152, |
| 1886 | PCI_SUBVENDOR_ID_CONNECT_TECH, | 1890 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 1887 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0, | 1891 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0, |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 429de2723a1c..321a3b3a5728 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
| @@ -561,7 +561,7 @@ static struct uart_amba_port amba_ports[UART_NR] = { | |||
| 561 | .port = { | 561 | .port = { |
| 562 | .membase = (void *)IO_ADDRESS(INTEGRATOR_UART0_BASE), | 562 | .membase = (void *)IO_ADDRESS(INTEGRATOR_UART0_BASE), |
| 563 | .mapbase = INTEGRATOR_UART0_BASE, | 563 | .mapbase = INTEGRATOR_UART0_BASE, |
| 564 | .iotype = SERIAL_IO_MEM, | 564 | .iotype = UPIO_MEM, |
| 565 | .irq = IRQ_UARTINT0, | 565 | .irq = IRQ_UARTINT0, |
| 566 | .uartclk = 14745600, | 566 | .uartclk = 14745600, |
| 567 | .fifosize = 16, | 567 | .fifosize = 16, |
| @@ -576,7 +576,7 @@ static struct uart_amba_port amba_ports[UART_NR] = { | |||
| 576 | .port = { | 576 | .port = { |
| 577 | .membase = (void *)IO_ADDRESS(INTEGRATOR_UART1_BASE), | 577 | .membase = (void *)IO_ADDRESS(INTEGRATOR_UART1_BASE), |
| 578 | .mapbase = INTEGRATOR_UART1_BASE, | 578 | .mapbase = INTEGRATOR_UART1_BASE, |
| 579 | .iotype = SERIAL_IO_MEM, | 579 | .iotype = UPIO_MEM, |
| 580 | .irq = IRQ_UARTINT1, | 580 | .irq = IRQ_UARTINT1, |
| 581 | .uartclk = 14745600, | 581 | .uartclk = 14745600, |
| 582 | .fifosize = 16, | 582 | .fifosize = 16, |
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c index ceb5d7f37bbd..344022fe53ef 100644 --- a/drivers/serial/au1x00_uart.c +++ b/drivers/serial/au1x00_uart.c | |||
| @@ -892,7 +892,7 @@ serial8250_request_std_resource(struct uart_8250_port *up, struct resource **res | |||
| 892 | int ret = 0; | 892 | int ret = 0; |
| 893 | 893 | ||
| 894 | switch (up->port.iotype) { | 894 | switch (up->port.iotype) { |
| 895 | case SERIAL_IO_MEM: | 895 | case UPIO_MEM: |
| 896 | if (up->port.mapbase) { | 896 | if (up->port.mapbase) { |
| 897 | *res = request_mem_region(up->port.mapbase, size, "serial"); | 897 | *res = request_mem_region(up->port.mapbase, size, "serial"); |
| 898 | if (!*res) | 898 | if (!*res) |
| @@ -900,8 +900,8 @@ serial8250_request_std_resource(struct uart_8250_port *up, struct resource **res | |||
| 900 | } | 900 | } |
| 901 | break; | 901 | break; |
| 902 | 902 | ||
| 903 | case SERIAL_IO_HUB6: | 903 | case UPIO_HUB6: |
| 904 | case SERIAL_IO_PORT: | 904 | case UPIO_PORT: |
| 905 | *res = request_region(up->port.iobase, size, "serial"); | 905 | *res = request_region(up->port.iobase, size, "serial"); |
| 906 | if (!*res) | 906 | if (!*res) |
| 907 | ret = -EBUSY; | 907 | ret = -EBUSY; |
| @@ -919,7 +919,7 @@ static void serial8250_release_port(struct uart_port *port) | |||
| 919 | size <<= up->port.regshift; | 919 | size <<= up->port.regshift; |
| 920 | 920 | ||
| 921 | switch (up->port.iotype) { | 921 | switch (up->port.iotype) { |
| 922 | case SERIAL_IO_MEM: | 922 | case UPIO_MEM: |
| 923 | if (up->port.mapbase) { | 923 | if (up->port.mapbase) { |
| 924 | /* | 924 | /* |
| 925 | * Unmap the area. | 925 | * Unmap the area. |
| @@ -935,8 +935,8 @@ static void serial8250_release_port(struct uart_port *port) | |||
| 935 | } | 935 | } |
| 936 | break; | 936 | break; |
| 937 | 937 | ||
| 938 | case SERIAL_IO_HUB6: | 938 | case UPIO_HUB6: |
| 939 | case SERIAL_IO_PORT: | 939 | case UPIO_PORT: |
| 940 | start = up->port.iobase; | 940 | start = up->port.iobase; |
| 941 | 941 | ||
| 942 | if (size) | 942 | if (size) |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 16af5626c243..b7bf4c698a47 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
| @@ -252,12 +252,9 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs) | |||
| 252 | /* If we have not enough room in tty flip buffer, then we try | 252 | /* If we have not enough room in tty flip buffer, then we try |
| 253 | * later, which will be the next rx-interrupt or a timeout | 253 | * later, which will be the next rx-interrupt or a timeout |
| 254 | */ | 254 | */ |
| 255 | if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) { | 255 | if(tty_buffer_request_room(tty, i) < i) { |
| 256 | tty->flip.work.func((void *)tty); | 256 | printk(KERN_WARNING "No room in flip buffer\n"); |
| 257 | if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) { | 257 | return; |
| 258 | printk(KERN_WARNING "TTY_DONT_FLIP set\n"); | ||
| 259 | return; | ||
| 260 | } | ||
| 261 | } | 258 | } |
| 262 | 259 | ||
| 263 | /* get pointer */ | 260 | /* get pointer */ |
| @@ -276,9 +273,7 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs) | |||
| 276 | continue; | 273 | continue; |
| 277 | 274 | ||
| 278 | error_return: | 275 | error_return: |
| 279 | *tty->flip.char_buf_ptr++ = ch; | 276 | tty_insert_flip_char(tty, ch, flg); |
| 280 | *tty->flip.flag_buf_ptr++ = flg; | ||
| 281 | tty->flip.count++; | ||
| 282 | 277 | ||
| 283 | } /* End while (i--) */ | 278 | } /* End while (i--) */ |
| 284 | 279 | ||
| @@ -908,7 +903,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 908 | .port = { | 903 | .port = { |
| 909 | .irq = SMC1_IRQ, | 904 | .irq = SMC1_IRQ, |
| 910 | .ops = &cpm_uart_pops, | 905 | .ops = &cpm_uart_pops, |
| 911 | .iotype = SERIAL_IO_MEM, | 906 | .iotype = UPIO_MEM, |
| 912 | .lock = SPIN_LOCK_UNLOCKED, | 907 | .lock = SPIN_LOCK_UNLOCKED, |
| 913 | }, | 908 | }, |
| 914 | .flags = FLAG_SMC, | 909 | .flags = FLAG_SMC, |
| @@ -922,7 +917,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 922 | .port = { | 917 | .port = { |
| 923 | .irq = SMC2_IRQ, | 918 | .irq = SMC2_IRQ, |
| 924 | .ops = &cpm_uart_pops, | 919 | .ops = &cpm_uart_pops, |
| 925 | .iotype = SERIAL_IO_MEM, | 920 | .iotype = UPIO_MEM, |
| 926 | .lock = SPIN_LOCK_UNLOCKED, | 921 | .lock = SPIN_LOCK_UNLOCKED, |
| 927 | }, | 922 | }, |
| 928 | .flags = FLAG_SMC, | 923 | .flags = FLAG_SMC, |
| @@ -939,7 +934,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 939 | .port = { | 934 | .port = { |
| 940 | .irq = SCC1_IRQ, | 935 | .irq = SCC1_IRQ, |
| 941 | .ops = &cpm_uart_pops, | 936 | .ops = &cpm_uart_pops, |
| 942 | .iotype = SERIAL_IO_MEM, | 937 | .iotype = UPIO_MEM, |
| 943 | .lock = SPIN_LOCK_UNLOCKED, | 938 | .lock = SPIN_LOCK_UNLOCKED, |
| 944 | }, | 939 | }, |
| 945 | .tx_nrfifos = TX_NUM_FIFO, | 940 | .tx_nrfifos = TX_NUM_FIFO, |
| @@ -953,7 +948,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 953 | .port = { | 948 | .port = { |
| 954 | .irq = SCC2_IRQ, | 949 | .irq = SCC2_IRQ, |
| 955 | .ops = &cpm_uart_pops, | 950 | .ops = &cpm_uart_pops, |
| 956 | .iotype = SERIAL_IO_MEM, | 951 | .iotype = UPIO_MEM, |
| 957 | .lock = SPIN_LOCK_UNLOCKED, | 952 | .lock = SPIN_LOCK_UNLOCKED, |
| 958 | }, | 953 | }, |
| 959 | .tx_nrfifos = TX_NUM_FIFO, | 954 | .tx_nrfifos = TX_NUM_FIFO, |
| @@ -967,7 +962,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 967 | .port = { | 962 | .port = { |
| 968 | .irq = SCC3_IRQ, | 963 | .irq = SCC3_IRQ, |
| 969 | .ops = &cpm_uart_pops, | 964 | .ops = &cpm_uart_pops, |
| 970 | .iotype = SERIAL_IO_MEM, | 965 | .iotype = UPIO_MEM, |
| 971 | .lock = SPIN_LOCK_UNLOCKED, | 966 | .lock = SPIN_LOCK_UNLOCKED, |
| 972 | }, | 967 | }, |
| 973 | .tx_nrfifos = TX_NUM_FIFO, | 968 | .tx_nrfifos = TX_NUM_FIFO, |
| @@ -981,7 +976,7 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { | |||
| 981 | .port = { | 976 | .port = { |
| 982 | .irq = SCC4_IRQ, | 977 | .irq = SCC4_IRQ, |
| 983 | .ops = &cpm_uart_pops, | 978 | .ops = &cpm_uart_pops, |
| 984 | .iotype = SERIAL_IO_MEM, | 979 | .iotype = UPIO_MEM, |
| 985 | .lock = SPIN_LOCK_UNLOCKED, | 980 | .lock = SPIN_LOCK_UNLOCKED, |
| 986 | }, | 981 | }, |
| 987 | .tx_nrfifos = TX_NUM_FIFO, | 982 | .tx_nrfifos = TX_NUM_FIFO, |
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index a64ba26a94e8..ba5541de673b 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c | |||
| @@ -262,6 +262,7 @@ static inline void dz_receive_chars(struct dz_port *dport) | |||
| 262 | } | 262 | } |
| 263 | tty_insert_flip_char(tty, ch, flag); | 263 | tty_insert_flip_char(tty, ch, flag); |
| 264 | ignore_char: | 264 | ignore_char: |
| 265 | ; | ||
| 265 | } while (status & DZ_DVAL); | 266 | } while (status & DZ_DVAL); |
| 266 | 267 | ||
| 267 | if (tty) | 268 | if (tty) |
| @@ -650,7 +651,7 @@ static void __init dz_init_ports(void) | |||
| 650 | for (i = 0, dport = dz_ports; i < DZ_NB_PORT; i++, dport++) { | 651 | for (i = 0, dport = dz_ports; i < DZ_NB_PORT; i++, dport++) { |
| 651 | spin_lock_init(&dport->port.lock); | 652 | spin_lock_init(&dport->port.lock); |
| 652 | dport->port.membase = (char *) base; | 653 | dport->port.membase = (char *) base; |
| 653 | dport->port.iotype = SERIAL_IO_PORT; | 654 | dport->port.iotype = UPIO_PORT; |
| 654 | dport->port.irq = dec_interrupt[DEC_IRQ_DZ11]; | 655 | dport->port.irq = dec_interrupt[DEC_IRQ_DZ11]; |
| 655 | dport->port.line = i; | 656 | dport->port.line = i; |
| 656 | dport->port.fifosize = 1; | 657 | dport->port.fifosize = 1; |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 858048efe1ed..4d53fb5ca87b 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
| @@ -668,7 +668,7 @@ static struct imx_port imx_ports[] = { | |||
| 668 | .rtsirq = UART1_MINT_RTS, | 668 | .rtsirq = UART1_MINT_RTS, |
| 669 | .port = { | 669 | .port = { |
| 670 | .type = PORT_IMX, | 670 | .type = PORT_IMX, |
| 671 | .iotype = SERIAL_IO_MEM, | 671 | .iotype = UPIO_MEM, |
| 672 | .membase = (void *)IMX_UART1_BASE, | 672 | .membase = (void *)IMX_UART1_BASE, |
| 673 | .mapbase = IMX_UART1_BASE, /* FIXME */ | 673 | .mapbase = IMX_UART1_BASE, /* FIXME */ |
| 674 | .irq = UART1_MINT_RX, | 674 | .irq = UART1_MINT_RX, |
| @@ -684,7 +684,7 @@ static struct imx_port imx_ports[] = { | |||
| 684 | .rtsirq = UART2_MINT_RTS, | 684 | .rtsirq = UART2_MINT_RTS, |
| 685 | .port = { | 685 | .port = { |
| 686 | .type = PORT_IMX, | 686 | .type = PORT_IMX, |
| 687 | .iotype = SERIAL_IO_MEM, | 687 | .iotype = UPIO_MEM, |
| 688 | .membase = (void *)IMX_UART2_BASE, | 688 | .membase = (void *)IMX_UART2_BASE, |
| 689 | .mapbase = IMX_UART2_BASE, /* FIXME */ | 689 | .mapbase = IMX_UART2_BASE, /* FIXME */ |
| 690 | .irq = UART2_MINT_RX, | 690 | .irq = UART2_MINT_RX, |
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 66f117d15065..419dd3cd7862 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
| @@ -215,7 +215,7 @@ static void __load_zsregs(struct zilog_channel *channel, unsigned char *regs) | |||
| 215 | /* Lower and upper byte of baud rate generator divisor. */ | 215 | /* Lower and upper byte of baud rate generator divisor. */ |
| 216 | write_zsreg(channel, R12, regs[R12]); | 216 | write_zsreg(channel, R12, regs[R12]); |
| 217 | write_zsreg(channel, R13, regs[R13]); | 217 | write_zsreg(channel, R13, regs[R13]); |
| 218 | 218 | ||
| 219 | /* Now rewrite R14, with BRENAB (if set). */ | 219 | /* Now rewrite R14, with BRENAB (if set). */ |
| 220 | write_zsreg(channel, R14, regs[R14]); | 220 | write_zsreg(channel, R14, regs[R14]); |
| 221 | 221 | ||
| @@ -571,7 +571,7 @@ static void ip22zilog_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
| 571 | else | 571 | else |
| 572 | clear_bits |= DTR; | 572 | clear_bits |= DTR; |
| 573 | 573 | ||
| 574 | /* NOTE: Not subject to 'transmitter active' rule. */ | 574 | /* NOTE: Not subject to 'transmitter active' rule. */ |
| 575 | up->curregs[R5] |= set_bits; | 575 | up->curregs[R5] |= set_bits; |
| 576 | up->curregs[R5] &= ~clear_bits; | 576 | up->curregs[R5] &= ~clear_bits; |
| 577 | write_zsreg(channel, R5, up->curregs[R5]); | 577 | write_zsreg(channel, R5, up->curregs[R5]); |
| @@ -654,7 +654,7 @@ static void ip22zilog_enable_ms(struct uart_port *port) | |||
| 654 | if (new_reg != up->curregs[R15]) { | 654 | if (new_reg != up->curregs[R15]) { |
| 655 | up->curregs[R15] = new_reg; | 655 | up->curregs[R15] = new_reg; |
| 656 | 656 | ||
| 657 | /* NOTE: Not subject to 'transmitter active' rule. */ | 657 | /* NOTE: Not subject to 'transmitter active' rule. */ |
| 658 | write_zsreg(channel, R15, up->curregs[R15]); | 658 | write_zsreg(channel, R15, up->curregs[R15]); |
| 659 | } | 659 | } |
| 660 | } | 660 | } |
| @@ -680,7 +680,7 @@ static void ip22zilog_break_ctl(struct uart_port *port, int break_state) | |||
| 680 | if (new_reg != up->curregs[R5]) { | 680 | if (new_reg != up->curregs[R5]) { |
| 681 | up->curregs[R5] = new_reg; | 681 | up->curregs[R5] = new_reg; |
| 682 | 682 | ||
| 683 | /* NOTE: Not subject to 'transmitter active' rule. */ | 683 | /* NOTE: Not subject to 'transmitter active' rule. */ |
| 684 | write_zsreg(channel, R5, up->curregs[R5]); | 684 | write_zsreg(channel, R5, up->curregs[R5]); |
| 685 | } | 685 | } |
| 686 | 686 | ||
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index b48066a64a7d..242a04104393 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
| @@ -80,7 +80,7 @@ | |||
| 80 | #include <asm/serial.h> | 80 | #include <asm/serial.h> |
| 81 | 81 | ||
| 82 | /* Standard COM flags */ | 82 | /* Standard COM flags */ |
| 83 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | 83 | #define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) |
| 84 | 84 | ||
| 85 | /* | 85 | /* |
| 86 | * SERIAL_PORT_DFNS tells us about built-in ports that have no | 86 | * SERIAL_PORT_DFNS tells us about built-in ports that have no |
diff --git a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h index 07d0dd80aa3d..7c3ec24f7e50 100644 --- a/drivers/serial/m32r_sio.h +++ b/drivers/serial/m32r_sio.h | |||
| @@ -37,7 +37,7 @@ struct old_serial_port { | |||
| 37 | unsigned int irq; | 37 | unsigned int irq; |
| 38 | unsigned int flags; | 38 | unsigned int flags; |
| 39 | unsigned char io_type; | 39 | unsigned char io_type; |
| 40 | unsigned char *iomem_base; | 40 | unsigned char __iomem *iomem_base; |
| 41 | unsigned short iomem_reg_shift; | 41 | unsigned short iomem_reg_shift; |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 4e49168c3176..868eaf4a1a68 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c | |||
| @@ -462,7 +462,7 @@ static int __init mux_probe(struct parisc_device *dev) | |||
| 462 | port->mapbase = dev->hpa.start + MUX_OFFSET + | 462 | port->mapbase = dev->hpa.start + MUX_OFFSET + |
| 463 | (i * MUX_LINE_OFFSET); | 463 | (i * MUX_LINE_OFFSET); |
| 464 | port->membase = ioremap(port->mapbase, MUX_LINE_OFFSET); | 464 | port->membase = ioremap(port->mapbase, MUX_LINE_OFFSET); |
| 465 | port->iotype = SERIAL_IO_MEM; | 465 | port->iotype = UPIO_MEM; |
| 466 | port->type = PORT_MUX; | 466 | port->type = PORT_MUX; |
| 467 | port->irq = NO_IRQ; | 467 | port->irq = NO_IRQ; |
| 468 | port->uartclk = 0; | 468 | port->uartclk = 0; |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 4e03a87f3fb4..9b7ed58cb53b 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
| @@ -1492,7 +1492,7 @@ no_dma: | |||
| 1492 | /* | 1492 | /* |
| 1493 | * Init remaining bits of "port" structure | 1493 | * Init remaining bits of "port" structure |
| 1494 | */ | 1494 | */ |
| 1495 | uap->port.iotype = SERIAL_IO_MEM; | 1495 | uap->port.iotype = UPIO_MEM; |
| 1496 | uap->port.irq = np->intrs[0].line; | 1496 | uap->port.irq = np->intrs[0].line; |
| 1497 | uap->port.uartclk = ZS_CLOCK; | 1497 | uap->port.uartclk = ZS_CLOCK; |
| 1498 | uap->port.fifosize = 1; | 1498 | uap->port.fifosize = 1; |
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 0a2dd6c5b95f..7410e093a6b9 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
| @@ -161,7 +161,11 @@ s3c24xx_serial_dbg(const char *fmt, ...) | |||
| 161 | 161 | ||
| 162 | /* we can support 3 uarts, but not always use them */ | 162 | /* we can support 3 uarts, but not always use them */ |
| 163 | 163 | ||
| 164 | #ifdef CONFIG_CPU_S3C2400 | ||
| 165 | #define NR_PORTS (2) | ||
| 166 | #else | ||
| 164 | #define NR_PORTS (3) | 167 | #define NR_PORTS (3) |
| 168 | #endif | ||
| 165 | 169 | ||
| 166 | /* port irq numbers */ | 170 | /* port irq numbers */ |
| 167 | 171 | ||
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index ff7b60b4de37..2c00b8625852 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c | |||
| @@ -628,7 +628,7 @@ static void __init sa1100_init_ports(void) | |||
| 628 | sa1100_ports[i].port.ops = &sa1100_pops; | 628 | sa1100_ports[i].port.ops = &sa1100_pops; |
| 629 | sa1100_ports[i].port.fifosize = 8; | 629 | sa1100_ports[i].port.fifosize = 8; |
| 630 | sa1100_ports[i].port.line = i; | 630 | sa1100_ports[i].port.line = i; |
| 631 | sa1100_ports[i].port.iotype = SERIAL_IO_MEM; | 631 | sa1100_ports[i].port.iotype = UPIO_MEM; |
| 632 | init_timer(&sa1100_ports[i].timer); | 632 | init_timer(&sa1100_ports[i].timer); |
| 633 | sa1100_ports[i].timer.function = sa1100_timeout; | 633 | sa1100_ports[i].timer.function = sa1100_timeout; |
| 634 | sa1100_ports[i].timer.data = (unsigned long)&sa1100_ports[i]; | 634 | sa1100_ports[i].timer.data = (unsigned long)&sa1100_ports[i]; |
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index d0490f67f597..04186eaae227 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
| @@ -501,7 +501,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { | |||
| 501 | .port = { | 501 | .port = { |
| 502 | .membase = (void*) io_p2v (UART1_PHYS), | 502 | .membase = (void*) io_p2v (UART1_PHYS), |
| 503 | .mapbase = UART1_PHYS, | 503 | .mapbase = UART1_PHYS, |
| 504 | .iotype = SERIAL_IO_MEM, | 504 | .iotype = UPIO_MEM, |
| 505 | .irq = IRQ_UART1INTR, | 505 | .irq = IRQ_UART1INTR, |
| 506 | .uartclk = 14745600/2, | 506 | .uartclk = 14745600/2, |
| 507 | .fifosize = 16, | 507 | .fifosize = 16, |
| @@ -514,7 +514,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { | |||
| 514 | .port = { | 514 | .port = { |
| 515 | .membase = (void*) io_p2v (UART2_PHYS), | 515 | .membase = (void*) io_p2v (UART2_PHYS), |
| 516 | .mapbase = UART2_PHYS, | 516 | .mapbase = UART2_PHYS, |
| 517 | .iotype = SERIAL_IO_MEM, | 517 | .iotype = UPIO_MEM, |
| 518 | .irq = IRQ_UART2INTR, | 518 | .irq = IRQ_UART2INTR, |
| 519 | .uartclk = 14745600/2, | 519 | .uartclk = 14745600/2, |
| 520 | .fifosize = 16, | 520 | .fifosize = 16, |
| @@ -527,7 +527,7 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { | |||
| 527 | .port = { | 527 | .port = { |
| 528 | .membase = (void*) io_p2v (UART3_PHYS), | 528 | .membase = (void*) io_p2v (UART3_PHYS), |
| 529 | .mapbase = UART3_PHYS, | 529 | .mapbase = UART3_PHYS, |
| 530 | .iotype = SERIAL_IO_MEM, | 530 | .iotype = UPIO_MEM, |
| 531 | .irq = IRQ_UART3INTR, | 531 | .irq = IRQ_UART3INTR, |
| 532 | .uartclk = 14745600/2, | 532 | .uartclk = 14745600/2, |
| 533 | .fifosize = 16, | 533 | .fifosize = 16, |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 80737c131ce7..44f6bf79bbe1 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
| @@ -1468,10 +1468,10 @@ static struct sci_port sci_ports[] = { | |||
| 1468 | .port = { | 1468 | .port = { |
| 1469 | .membase = (void *)0xff923000, | 1469 | .membase = (void *)0xff923000, |
| 1470 | .mapbase = 0xff923000, | 1470 | .mapbase = 0xff923000, |
| 1471 | .iotype = SERIAL_IO_MEM, | 1471 | .iotype = UPIO_MEM, |
| 1472 | .irq = 61, | 1472 | .irq = 61, |
| 1473 | .ops = &sci_uart_ops, | 1473 | .ops = &sci_uart_ops, |
| 1474 | .flags = ASYNC_BOOT_AUTOCONF, | 1474 | .flags = UPF_BOOT_AUTOCONF, |
| 1475 | .line = 0, | 1475 | .line = 0, |
| 1476 | }, | 1476 | }, |
| 1477 | .type = PORT_SCIF, | 1477 | .type = PORT_SCIF, |
| @@ -1482,10 +1482,10 @@ static struct sci_port sci_ports[] = { | |||
| 1482 | .port = { | 1482 | .port = { |
| 1483 | .membase = (void *)0xff924000, | 1483 | .membase = (void *)0xff924000, |
| 1484 | .mapbase = 0xff924000, | 1484 | .mapbase = 0xff924000, |
| 1485 | .iotype = SERIAL_IO_MEM, | 1485 | .iotype = UPIO_MEM, |
| 1486 | .irq = 62, | 1486 | .irq = 62, |
| 1487 | .ops = &sci_uart_ops, | 1487 | .ops = &sci_uart_ops, |
| 1488 | .flags = ASYNC_BOOT_AUTOCONF, | 1488 | .flags = UPF_BOOT_AUTOCONF, |
| 1489 | .line = 1, | 1489 | .line = 1, |
| 1490 | }, | 1490 | }, |
| 1491 | .type = PORT_SCIF, | 1491 | .type = PORT_SCIF, |
| @@ -1496,10 +1496,10 @@ static struct sci_port sci_ports[] = { | |||
| 1496 | .port = { | 1496 | .port = { |
| 1497 | .membase = (void *)0xff925000, | 1497 | .membase = (void *)0xff925000, |
| 1498 | .mapbase = 0xff925000, | 1498 | .mapbase = 0xff925000, |
| 1499 | .iotype = SERIAL_IO_MEM, | 1499 | .iotype = UPIO_MEM, |
| 1500 | .irq = 63, | 1500 | .irq = 63, |
| 1501 | .ops = &sci_uart_ops, | 1501 | .ops = &sci_uart_ops, |
| 1502 | .flags = ASYNC_BOOT_AUTOCONF, | 1502 | .flags = UPF_BOOT_AUTOCONF, |
| 1503 | .line = 2, | 1503 | .line = 2, |
| 1504 | }, | 1504 | }, |
| 1505 | .type = PORT_SCIF, | 1505 | .type = PORT_SCIF, |
| @@ -1511,10 +1511,10 @@ static struct sci_port sci_ports[] = { | |||
| 1511 | .port = { | 1511 | .port = { |
| 1512 | .membase = (void *)0xffe00000, | 1512 | .membase = (void *)0xffe00000, |
| 1513 | .mapbase = 0xffe00000, | 1513 | .mapbase = 0xffe00000, |
| 1514 | .iotype = SERIAL_IO_MEM, | 1514 | .iotype = UPIO_MEM, |
| 1515 | .irq = 43, | 1515 | .irq = 43, |
| 1516 | .ops = &sci_uart_ops, | 1516 | .ops = &sci_uart_ops, |
| 1517 | .flags = ASYNC_BOOT_AUTOCONF, | 1517 | .flags = UPF_BOOT_AUTOCONF, |
| 1518 | .line = 0, | 1518 | .line = 0, |
| 1519 | }, | 1519 | }, |
| 1520 | .type = PORT_SCIF, | 1520 | .type = PORT_SCIF, |
| @@ -1525,10 +1525,10 @@ static struct sci_port sci_ports[] = { | |||
| 1525 | .port = { | 1525 | .port = { |
| 1526 | .membase = (void *)0xffe10000, | 1526 | .membase = (void *)0xffe10000, |
| 1527 | .mapbase = 0xffe10000, | 1527 | .mapbase = 0xffe10000, |
| 1528 | .iotype = SERIAL_IO_MEM, | 1528 | .iotype = UPIO_MEM, |
| 1529 | .irq = 79, | 1529 | .irq = 79, |
| 1530 | .ops = &sci_uart_ops, | 1530 | .ops = &sci_uart_ops, |
| 1531 | .flags = ASYNC_BOOT_AUTOCONF, | 1531 | .flags = UPF_BOOT_AUTOCONF, |
| 1532 | .line = 1, | 1532 | .line = 1, |
| 1533 | }, | 1533 | }, |
| 1534 | .type = PORT_SCIF, | 1534 | .type = PORT_SCIF, |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 8bcaebcc0ad7..85664228a0b6 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
| @@ -1036,7 +1036,7 @@ static void __init sab_attach_callback(struct linux_ebus_device *edev, void *arg | |||
| 1036 | up->port.irq = edev->irqs[0]; | 1036 | up->port.irq = edev->irqs[0]; |
| 1037 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; | 1037 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; |
| 1038 | up->port.mapbase = (unsigned long)up->regs; | 1038 | up->port.mapbase = (unsigned long)up->regs; |
| 1039 | up->port.iotype = SERIAL_IO_MEM; | 1039 | up->port.iotype = UPIO_MEM; |
| 1040 | 1040 | ||
| 1041 | writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); | 1041 | writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); |
| 1042 | 1042 | ||
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index bc67442c6b4c..308704566948 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
| @@ -109,11 +109,11 @@ static _INLINE_ unsigned int serial_in(struct uart_sunsu_port *up, int offset) | |||
| 109 | offset <<= up->port.regshift; | 109 | offset <<= up->port.regshift; |
| 110 | 110 | ||
| 111 | switch (up->port.iotype) { | 111 | switch (up->port.iotype) { |
| 112 | case SERIAL_IO_HUB6: | 112 | case UPIO_HUB6: |
| 113 | outb(up->port.hub6 - 1 + offset, up->port.iobase); | 113 | outb(up->port.hub6 - 1 + offset, up->port.iobase); |
| 114 | return inb(up->port.iobase + 1); | 114 | return inb(up->port.iobase + 1); |
| 115 | 115 | ||
| 116 | case SERIAL_IO_MEM: | 116 | case UPIO_MEM: |
| 117 | return readb(up->port.membase + offset); | 117 | return readb(up->port.membase + offset); |
| 118 | 118 | ||
| 119 | default: | 119 | default: |
| @@ -139,12 +139,12 @@ serial_out(struct uart_sunsu_port *up, int offset, int value) | |||
| 139 | offset <<= up->port.regshift; | 139 | offset <<= up->port.regshift; |
| 140 | 140 | ||
| 141 | switch (up->port.iotype) { | 141 | switch (up->port.iotype) { |
| 142 | case SERIAL_IO_HUB6: | 142 | case UPIO_HUB6: |
| 143 | outb(up->port.hub6 - 1 + offset, up->port.iobase); | 143 | outb(up->port.hub6 - 1 + offset, up->port.iobase); |
| 144 | outb(value, up->port.iobase + 1); | 144 | outb(value, up->port.iobase + 1); |
| 145 | break; | 145 | break; |
| 146 | 146 | ||
| 147 | case SERIAL_IO_MEM: | 147 | case UPIO_MEM: |
| 148 | writeb(value, up->port.membase + offset); | 148 | writeb(value, up->port.membase + offset); |
| 149 | break; | 149 | break; |
| 150 | 150 | ||
| @@ -1052,7 +1052,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) | |||
| 1052 | return; | 1052 | return; |
| 1053 | 1053 | ||
| 1054 | up->type_probed = PORT_UNKNOWN; | 1054 | up->type_probed = PORT_UNKNOWN; |
| 1055 | up->port.iotype = SERIAL_IO_MEM; | 1055 | up->port.iotype = UPIO_MEM; |
| 1056 | 1056 | ||
| 1057 | /* | 1057 | /* |
| 1058 | * First we look for Ebus-bases su's | 1058 | * First we look for Ebus-bases su's |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 3c72484adea7..5cc4d4c2935c 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
| @@ -1487,7 +1487,7 @@ static void __init sunzilog_prepare(void) | |||
| 1487 | up[(chip * 2) + 1].port.membase = (void __iomem *)&rp->channelB; | 1487 | up[(chip * 2) + 1].port.membase = (void __iomem *)&rp->channelB; |
| 1488 | 1488 | ||
| 1489 | /* Channel A */ | 1489 | /* Channel A */ |
| 1490 | up[(chip * 2) + 0].port.iotype = SERIAL_IO_MEM; | 1490 | up[(chip * 2) + 0].port.iotype = UPIO_MEM; |
| 1491 | up[(chip * 2) + 0].port.irq = zilog_irq; | 1491 | up[(chip * 2) + 0].port.irq = zilog_irq; |
| 1492 | up[(chip * 2) + 0].port.uartclk = ZS_CLOCK; | 1492 | up[(chip * 2) + 0].port.uartclk = ZS_CLOCK; |
| 1493 | up[(chip * 2) + 0].port.fifosize = 1; | 1493 | up[(chip * 2) + 0].port.fifosize = 1; |
| @@ -1498,7 +1498,7 @@ static void __init sunzilog_prepare(void) | |||
| 1498 | up[(chip * 2) + 0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; | 1498 | up[(chip * 2) + 0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; |
| 1499 | 1499 | ||
| 1500 | /* Channel B */ | 1500 | /* Channel B */ |
| 1501 | up[(chip * 2) + 1].port.iotype = SERIAL_IO_MEM; | 1501 | up[(chip * 2) + 1].port.iotype = UPIO_MEM; |
| 1502 | up[(chip * 2) + 1].port.irq = zilog_irq; | 1502 | up[(chip * 2) + 1].port.irq = zilog_irq; |
| 1503 | up[(chip * 2) + 1].port.uartclk = ZS_CLOCK; | 1503 | up[(chip * 2) + 1].port.uartclk = ZS_CLOCK; |
| 1504 | up[(chip * 2) + 1].port.fifosize = 1; | 1504 | up[(chip * 2) + 1].port.fifosize = 1; |
diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c index 9378895a8d56..df705fda4243 100644 --- a/drivers/serial/v850e_uart.c +++ b/drivers/serial/v850e_uart.c | |||
| @@ -496,7 +496,7 @@ static int __init v850e_uart_init (void) | |||
| 496 | 496 | ||
| 497 | port->ops = &v850e_uart_ops; | 497 | port->ops = &v850e_uart_ops; |
| 498 | port->line = chan; | 498 | port->line = chan; |
| 499 | port->iotype = SERIAL_IO_MEM; | 499 | port->iotype = UPIO_MEM; |
| 500 | port->flags = UPF_BOOT_AUTOCONF; | 500 | port->flags = UPF_BOOT_AUTOCONF; |
| 501 | 501 | ||
| 502 | /* We actually use multiple IRQs, but the serial | 502 | /* We actually use multiple IRQs, but the serial |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index c70ae81b5d98..12357e1fa558 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
| @@ -38,10 +38,10 @@ static inline unsigned mcr_pack(unsigned pulse, unsigned sample) | |||
| 38 | 38 | ||
| 39 | static int nic_wait(struct ioc3_driver_data *idd) | 39 | static int nic_wait(struct ioc3_driver_data *idd) |
| 40 | { | 40 | { |
| 41 | volatile unsigned mcr; | 41 | unsigned mcr; |
| 42 | 42 | ||
| 43 | do { | 43 | do { |
| 44 | mcr = (volatile unsigned)idd->vma->mcr; | 44 | mcr = readl(&idd->vma->mcr); |
| 45 | } while (!(mcr & 2)); | 45 | } while (!(mcr & 2)); |
| 46 | 46 | ||
| 47 | return mcr & 1; | 47 | return mcr & 1; |
| @@ -53,7 +53,7 @@ static int nic_reset(struct ioc3_driver_data *idd) | |||
| 53 | unsigned long flags; | 53 | unsigned long flags; |
| 54 | 54 | ||
| 55 | local_irq_save(flags); | 55 | local_irq_save(flags); |
| 56 | idd->vma->mcr = mcr_pack(500, 65); | 56 | writel(mcr_pack(500, 65), &idd->vma->mcr); |
| 57 | presence = nic_wait(idd); | 57 | presence = nic_wait(idd); |
| 58 | local_irq_restore(flags); | 58 | local_irq_restore(flags); |
| 59 | 59 | ||
| @@ -68,7 +68,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd) | |||
| 68 | unsigned long flags; | 68 | unsigned long flags; |
| 69 | 69 | ||
| 70 | local_irq_save(flags); | 70 | local_irq_save(flags); |
| 71 | idd->vma->mcr = mcr_pack(6, 13); | 71 | writel(mcr_pack(6, 13), &idd->vma->mcr); |
| 72 | result = nic_wait(idd); | 72 | result = nic_wait(idd); |
| 73 | local_irq_restore(flags); | 73 | local_irq_restore(flags); |
| 74 | 74 | ||
| @@ -80,9 +80,9 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd) | |||
| 80 | static inline void nic_write_bit(struct ioc3_driver_data *idd, int bit) | 80 | static inline void nic_write_bit(struct ioc3_driver_data *idd, int bit) |
| 81 | { | 81 | { |
| 82 | if (bit) | 82 | if (bit) |
| 83 | idd->vma->mcr = mcr_pack(6, 110); | 83 | writel(mcr_pack(6, 110), &idd->vma->mcr); |
| 84 | else | 84 | else |
| 85 | idd->vma->mcr = mcr_pack(80, 30); | 85 | writel(mcr_pack(80, 30), &idd->vma->mcr); |
| 86 | 86 | ||
| 87 | nic_wait(idd); | 87 | nic_wait(idd); |
| 88 | } | 88 | } |
| @@ -337,7 +337,7 @@ static void probe_nic(struct ioc3_driver_data *idd) | |||
| 337 | int save = 0, loops = 3; | 337 | int save = 0, loops = 3; |
| 338 | unsigned long first, addr; | 338 | unsigned long first, addr; |
| 339 | 339 | ||
| 340 | idd->vma->gpcr_s = GPCR_MLAN_EN; | 340 | writel(GPCR_MLAN_EN, &idd->vma->gpcr_s); |
| 341 | 341 | ||
| 342 | while(loops>0) { | 342 | while(loops>0) { |
| 343 | idd->nic_part[0] = 0; | 343 | idd->nic_part[0] = 0; |
| @@ -408,7 +408,7 @@ static irqreturn_t ioc3_intr_io(int irq, void *arg, struct pt_regs *regs) | |||
| 408 | 408 | ||
| 409 | read_lock_irqsave(&ioc3_submodules_lock, flags); | 409 | read_lock_irqsave(&ioc3_submodules_lock, flags); |
| 410 | 410 | ||
| 411 | if(idd->dual_irq && idd->vma->eisr) { | 411 | if(idd->dual_irq && readb(&idd->vma->eisr)) { |
| 412 | /* send Ethernet IRQ to the driver */ | 412 | /* send Ethernet IRQ to the driver */ |
| 413 | if(ioc3_ethernet && idd->active[ioc3_ethernet->id] && | 413 | if(ioc3_ethernet && idd->active[ioc3_ethernet->id] && |
| 414 | ioc3_ethernet->intr) { | 414 | ioc3_ethernet->intr) { |
| @@ -682,7 +682,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
| 682 | idd->id = ioc3_counter++; | 682 | idd->id = ioc3_counter++; |
| 683 | up_write(&ioc3_devices_rwsem); | 683 | up_write(&ioc3_devices_rwsem); |
| 684 | 684 | ||
| 685 | idd->gpdr_shadow = idd->vma->gpdr; | 685 | idd->gpdr_shadow = readl(&idd->vma->gpdr); |
| 686 | 686 | ||
| 687 | /* Read IOC3 NIC contents */ | 687 | /* Read IOC3 NIC contents */ |
| 688 | probe_nic(idd); | 688 | probe_nic(idd); |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 5dd0207ffd46..057e60217fc5 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
| @@ -931,8 +931,8 @@ struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */ | |||
| 931 | static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | 931 | static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
| 932 | { | 932 | { |
| 933 | int err, i; | 933 | int err, i; |
| 934 | sg_req_info_t *r; | 934 | sg_req_info_t __user *r; |
| 935 | struct compat_sg_req_info *o = (struct compat_sg_req_info *)arg; | 935 | struct compat_sg_req_info __user *o = (void __user *)arg; |
| 936 | r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE); | 936 | r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE); |
| 937 | err = sys_ioctl(fd,cmd,(unsigned long)r); | 937 | err = sys_ioctl(fd,cmd,(unsigned long)r); |
| 938 | if (err < 0) | 938 | if (err < 0) |
| @@ -2739,8 +2739,8 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon | |||
| 2739 | static int | 2739 | static int |
| 2740 | lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | 2740 | lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
| 2741 | { | 2741 | { |
| 2742 | struct compat_timeval *tc = (struct compat_timeval *)arg; | 2742 | struct compat_timeval __user *tc = (struct compat_timeval __user *)arg; |
| 2743 | struct timeval *tn = compat_alloc_user_space(sizeof(struct timeval)); | 2743 | struct timeval __user *tn = compat_alloc_user_space(sizeof(struct timeval)); |
| 2744 | struct timeval ts; | 2744 | struct timeval ts; |
| 2745 | if (get_user(ts.tv_sec, &tc->tv_sec) || | 2745 | if (get_user(ts.tv_sec, &tc->tv_sec) || |
| 2746 | get_user(ts.tv_usec, &tc->tv_usec) || | 2746 | get_user(ts.tv_usec, &tc->tv_usec) || |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index f5bcc9a1aed6..b726acfcab14 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
| @@ -116,7 +116,11 @@ typedef struct { volatile u32 offset[4096]; } __regbase32; | |||
| 116 | ->offset[((vaddr)&4095)>>2] | 116 | ->offset[((vaddr)&4095)>>2] |
| 117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) | 117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) |
| 118 | 118 | ||
| 119 | extern void omap_map_common_io(void); | 119 | extern void omap1_map_common_io(void); |
| 120 | extern void omap1_init_common_hw(void); | ||
| 121 | |||
| 122 | extern void omap2_map_common_io(void); | ||
| 123 | extern void omap2_init_common_hw(void); | ||
| 120 | 124 | ||
| 121 | #else | 125 | #else |
| 122 | 126 | ||
diff --git a/include/asm-arm/mutex.h b/include/asm-arm/mutex.h index 6caa59f1f595..cb29d84e690d 100644 --- a/include/asm-arm/mutex.h +++ b/include/asm-arm/mutex.h | |||
| @@ -23,72 +23,71 @@ | |||
| 23 | * simply bail out immediately through the slow path where the lock will be | 23 | * simply bail out immediately through the slow path where the lock will be |
| 24 | * reattempted until it succeeds. | 24 | * reattempted until it succeeds. |
| 25 | */ | 25 | */ |
| 26 | #define __mutex_fastpath_lock(count, fail_fn) \ | 26 | static inline void |
| 27 | do { \ | 27 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
| 28 | int __ex_flag, __res; \ | 28 | { |
| 29 | \ | 29 | int __ex_flag, __res; |
| 30 | typecheck(atomic_t *, count); \ | 30 | |
| 31 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 31 | __asm__ ( |
| 32 | \ | 32 | |
| 33 | __asm__ ( \ | 33 | "ldrex %0, [%2] \n\t" |
| 34 | "ldrex %0, [%2] \n" \ | 34 | "sub %0, %0, #1 \n\t" |
| 35 | "sub %0, %0, #1 \n" \ | 35 | "strex %1, %0, [%2] " |
| 36 | "strex %1, %0, [%2] \n" \ | 36 | |
| 37 | \ | 37 | : "=&r" (__res), "=&r" (__ex_flag) |
| 38 | : "=&r" (__res), "=&r" (__ex_flag) \ | 38 | : "r" (&(count)->counter) |
| 39 | : "r" (&(count)->counter) \ | 39 | : "cc","memory" ); |
| 40 | : "cc","memory" ); \ | 40 | |
| 41 | \ | 41 | __res |= __ex_flag; |
| 42 | if (unlikely(__res || __ex_flag)) \ | 42 | if (unlikely(__res != 0)) |
| 43 | fail_fn(count); \ | 43 | fail_fn(count); |
| 44 | } while (0) | 44 | } |
| 45 | 45 | ||
| 46 | #define __mutex_fastpath_lock_retval(count, fail_fn) \ | 46 | static inline int |
| 47 | ({ \ | 47 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) |
| 48 | int __ex_flag, __res; \ | 48 | { |
| 49 | \ | 49 | int __ex_flag, __res; |
| 50 | typecheck(atomic_t *, count); \ | 50 | |
| 51 | typecheck_fn(fastcall int (*)(atomic_t *), fail_fn); \ | 51 | __asm__ ( |
| 52 | \ | 52 | |
| 53 | __asm__ ( \ | 53 | "ldrex %0, [%2] \n\t" |
| 54 | "ldrex %0, [%2] \n" \ | 54 | "sub %0, %0, #1 \n\t" |
| 55 | "sub %0, %0, #1 \n" \ | 55 | "strex %1, %0, [%2] " |
| 56 | "strex %1, %0, [%2] \n" \ | 56 | |
| 57 | \ | 57 | : "=&r" (__res), "=&r" (__ex_flag) |
| 58 | : "=&r" (__res), "=&r" (__ex_flag) \ | 58 | : "r" (&(count)->counter) |
| 59 | : "r" (&(count)->counter) \ | 59 | : "cc","memory" ); |
| 60 | : "cc","memory" ); \ | 60 | |
| 61 | \ | 61 | __res |= __ex_flag; |
| 62 | __res |= __ex_flag; \ | 62 | if (unlikely(__res != 0)) |
| 63 | if (unlikely(__res != 0)) \ | 63 | __res = fail_fn(count); |
| 64 | __res = fail_fn(count); \ | 64 | return __res; |
| 65 | __res; \ | 65 | } |
| 66 | }) | ||
| 67 | 66 | ||
| 68 | /* | 67 | /* |
| 69 | * Same trick is used for the unlock fast path. However the original value, | 68 | * Same trick is used for the unlock fast path. However the original value, |
| 70 | * rather than the result, is used to test for success in order to have | 69 | * rather than the result, is used to test for success in order to have |
| 71 | * better generated assembly. | 70 | * better generated assembly. |
| 72 | */ | 71 | */ |
| 73 | #define __mutex_fastpath_unlock(count, fail_fn) \ | 72 | static inline void |
| 74 | do { \ | 73 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
| 75 | int __ex_flag, __res, __orig; \ | 74 | { |
| 76 | \ | 75 | int __ex_flag, __res, __orig; |
| 77 | typecheck(atomic_t *, count); \ | 76 | |
| 78 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 77 | __asm__ ( |
| 79 | \ | 78 | |
| 80 | __asm__ ( \ | 79 | "ldrex %0, [%3] \n\t" |
| 81 | "ldrex %0, [%3] \n" \ | 80 | "add %1, %0, #1 \n\t" |
| 82 | "add %1, %0, #1 \n" \ | 81 | "strex %2, %1, [%3] " |
| 83 | "strex %2, %1, [%3] \n" \ | 82 | |
| 84 | \ | 83 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
| 85 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) \ | 84 | : "r" (&(count)->counter) |
| 86 | : "r" (&(count)->counter) \ | 85 | : "cc","memory" ); |
| 87 | : "cc","memory" ); \ | 86 | |
| 88 | \ | 87 | __orig |= __ex_flag; |
| 89 | if (unlikely(__orig || __ex_flag)) \ | 88 | if (unlikely(__orig != 0)) |
| 90 | fail_fn(count); \ | 89 | fail_fn(count); |
| 91 | } while (0) | 90 | } |
| 92 | 91 | ||
| 93 | /* | 92 | /* |
| 94 | * If the unlock was done on a contended lock, or if the unlock simply fails | 93 | * If the unlock was done on a contended lock, or if the unlock simply fails |
| @@ -110,12 +109,12 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | |||
| 110 | 109 | ||
| 111 | __asm__ ( | 110 | __asm__ ( |
| 112 | 111 | ||
| 113 | "1: ldrex %0, [%3] \n" | 112 | "1: ldrex %0, [%3] \n\t" |
| 114 | "subs %1, %0, #1 \n" | 113 | "subs %1, %0, #1 \n\t" |
| 115 | "strexeq %2, %1, [%3] \n" | 114 | "strexeq %2, %1, [%3] \n\t" |
| 116 | "movlt %0, #0 \n" | 115 | "movlt %0, #0 \n\t" |
| 117 | "cmpeq %2, #0 \n" | 116 | "cmpeq %2, #0 \n\t" |
| 118 | "bgt 1b \n" | 117 | "bgt 1b " |
| 119 | 118 | ||
| 120 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) | 119 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
| 121 | : "r" (&count->counter) | 120 | : "r" (&count->counter) |
diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 2e7e651c3e3f..1ce0518ace2e 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.h | |||
| @@ -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) 2005 by Ralf Baechle | 6 | * Copyright (C) 2005, 06 by Ralf Baechle (ralf@linux-mips.org) |
| 7 | * Copyright (C) 2005 MIPS Technologies, Inc. | 7 | * Copyright (C) 2005 MIPS Technologies, Inc. |
| 8 | */ | 8 | */ |
| 9 | #ifndef _ASM_ABI_H | 9 | #ifndef _ASM_ABI_H |
| @@ -13,7 +13,7 @@ | |||
| 13 | #include <asm/siginfo.h> | 13 | #include <asm/siginfo.h> |
| 14 | 14 | ||
| 15 | struct mips_abi { | 15 | struct mips_abi { |
| 16 | int (* const do_signal)(sigset_t *oldset, struct pt_regs *regs); | 16 | void (* const do_signal)(struct pt_regs *regs); |
| 17 | int (* const setup_frame)(struct k_sigaction * ka, | 17 | int (* const setup_frame)(struct k_sigaction * ka, |
| 18 | struct pt_regs *regs, int signr, | 18 | struct pt_regs *regs, int signr, |
| 19 | sigset_t *set); | 19 | sigset_t *set); |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index a9fa1254894a..5a4c8a54b8f4 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
| @@ -56,38 +56,38 @@ | |||
| 56 | * variations of functions: non-prefixed ones that preserve the value | 56 | * variations of functions: non-prefixed ones that preserve the value |
| 57 | * and prefixed ones that preserve byte addresses. The latters are | 57 | * and prefixed ones that preserve byte addresses. The latters are |
| 58 | * typically used for moving raw data between a peripheral and memory (cf. | 58 | * typically used for moving raw data between a peripheral and memory (cf. |
| 59 | * string I/O functions), hence the "mem_" prefix. | 59 | * string I/O functions), hence the "__mem_" prefix. |
| 60 | */ | 60 | */ |
| 61 | #if defined(CONFIG_SWAP_IO_SPACE) | 61 | #if defined(CONFIG_SWAP_IO_SPACE) |
| 62 | 62 | ||
| 63 | # define ioswabb(x) (x) | 63 | # define ioswabb(x) (x) |
| 64 | # define mem_ioswabb(x) (x) | 64 | # define __mem_ioswabb(x) (x) |
| 65 | # ifdef CONFIG_SGI_IP22 | 65 | # ifdef CONFIG_SGI_IP22 |
| 66 | /* | 66 | /* |
| 67 | * IP22 seems braindead enough to swap 16bits values in hardware, but | 67 | * IP22 seems braindead enough to swap 16bits values in hardware, but |
| 68 | * not 32bits. Go figure... Can't tell without documentation. | 68 | * not 32bits. Go figure... Can't tell without documentation. |
| 69 | */ | 69 | */ |
| 70 | # define ioswabw(x) (x) | 70 | # define ioswabw(x) (x) |
| 71 | # define mem_ioswabw(x) le16_to_cpu(x) | 71 | # define __mem_ioswabw(x) le16_to_cpu(x) |
| 72 | # else | 72 | # else |
| 73 | # define ioswabw(x) le16_to_cpu(x) | 73 | # define ioswabw(x) le16_to_cpu(x) |
| 74 | # define mem_ioswabw(x) (x) | 74 | # define __mem_ioswabw(x) (x) |
| 75 | # endif | 75 | # endif |
| 76 | # define ioswabl(x) le32_to_cpu(x) | 76 | # define ioswabl(x) le32_to_cpu(x) |
| 77 | # define mem_ioswabl(x) (x) | 77 | # define __mem_ioswabl(x) (x) |
| 78 | # define ioswabq(x) le64_to_cpu(x) | 78 | # define ioswabq(x) le64_to_cpu(x) |
| 79 | # define mem_ioswabq(x) (x) | 79 | # define __mem_ioswabq(x) (x) |
| 80 | 80 | ||
| 81 | #else | 81 | #else |
| 82 | 82 | ||
| 83 | # define ioswabb(x) (x) | 83 | # define ioswabb(x) (x) |
| 84 | # define mem_ioswabb(x) (x) | 84 | # define __mem_ioswabb(x) (x) |
| 85 | # define ioswabw(x) (x) | 85 | # define ioswabw(x) (x) |
| 86 | # define mem_ioswabw(x) cpu_to_le16(x) | 86 | # define __mem_ioswabw(x) cpu_to_le16(x) |
| 87 | # define ioswabl(x) (x) | 87 | # define ioswabl(x) (x) |
| 88 | # define mem_ioswabl(x) cpu_to_le32(x) | 88 | # define __mem_ioswabl(x) cpu_to_le32(x) |
| 89 | # define ioswabq(x) (x) | 89 | # define ioswabq(x) (x) |
| 90 | # define mem_ioswabq(x) cpu_to_le32(x) | 90 | # define __mem_ioswabq(x) cpu_to_le32(x) |
| 91 | 91 | ||
| 92 | #endif | 92 | #endif |
| 93 | 93 | ||
| @@ -342,7 +342,7 @@ static inline void pfx##write##bwlq(type val, \ | |||
| 342 | BUG(); \ | 342 | BUG(); \ |
| 343 | } \ | 343 | } \ |
| 344 | \ | 344 | \ |
| 345 | static inline type pfx##read##bwlq(volatile void __iomem *mem) \ | 345 | static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ |
| 346 | { \ | 346 | { \ |
| 347 | volatile type *__mem; \ | 347 | volatile type *__mem; \ |
| 348 | type __val; \ | 348 | type __val; \ |
| @@ -417,7 +417,7 @@ __BUILD_MEMORY_SINGLE(bus, bwlq, type, 1) | |||
| 417 | \ | 417 | \ |
| 418 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ | 418 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ |
| 419 | __BUILD_MEMORY_PFX(, bwlq, type) \ | 419 | __BUILD_MEMORY_PFX(, bwlq, type) \ |
| 420 | __BUILD_MEMORY_PFX(mem_, bwlq, type) \ | 420 | __BUILD_MEMORY_PFX(__mem_, bwlq, type) \ |
| 421 | 421 | ||
| 422 | BUILDIO_MEM(b, u8) | 422 | BUILDIO_MEM(b, u8) |
| 423 | BUILDIO_MEM(w, u16) | 423 | BUILDIO_MEM(w, u16) |
| @@ -430,7 +430,7 @@ BUILDIO_MEM(q, u64) | |||
| 430 | 430 | ||
| 431 | #define BUILDIO_IOPORT(bwlq, type) \ | 431 | #define BUILDIO_IOPORT(bwlq, type) \ |
| 432 | __BUILD_IOPORT_PFX(, bwlq, type) \ | 432 | __BUILD_IOPORT_PFX(, bwlq, type) \ |
| 433 | __BUILD_IOPORT_PFX(mem_, bwlq, type) | 433 | __BUILD_IOPORT_PFX(__mem_, bwlq, type) |
| 434 | 434 | ||
| 435 | BUILDIO_IOPORT(b, u8) | 435 | BUILDIO_IOPORT(b, u8) |
| 436 | BUILDIO_IOPORT(w, u16) | 436 | BUILDIO_IOPORT(w, u16) |
| @@ -464,7 +464,7 @@ static inline void writes##bwlq(volatile void __iomem *mem, \ | |||
| 464 | const volatile type *__addr = addr; \ | 464 | const volatile type *__addr = addr; \ |
| 465 | \ | 465 | \ |
| 466 | while (count--) { \ | 466 | while (count--) { \ |
| 467 | mem_write##bwlq(*__addr, mem); \ | 467 | __mem_write##bwlq(*__addr, mem); \ |
| 468 | __addr++; \ | 468 | __addr++; \ |
| 469 | } \ | 469 | } \ |
| 470 | } \ | 470 | } \ |
| @@ -475,7 +475,7 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | |||
| 475 | volatile type *__addr = addr; \ | 475 | volatile type *__addr = addr; \ |
| 476 | \ | 476 | \ |
| 477 | while (count--) { \ | 477 | while (count--) { \ |
| 478 | *__addr = mem_read##bwlq(mem); \ | 478 | *__addr = __mem_read##bwlq(mem); \ |
| 479 | __addr++; \ | 479 | __addr++; \ |
| 480 | } \ | 480 | } \ |
| 481 | } | 481 | } |
| @@ -488,7 +488,7 @@ static inline void outs##bwlq(unsigned long port, const void *addr, \ | |||
| 488 | const volatile type *__addr = addr; \ | 488 | const volatile type *__addr = addr; \ |
| 489 | \ | 489 | \ |
| 490 | while (count--) { \ | 490 | while (count--) { \ |
| 491 | mem_out##bwlq(*__addr, port); \ | 491 | __mem_out##bwlq(*__addr, port); \ |
| 492 | __addr++; \ | 492 | __addr++; \ |
| 493 | } \ | 493 | } \ |
| 494 | } \ | 494 | } \ |
| @@ -499,7 +499,7 @@ static inline void ins##bwlq(unsigned long port, void *addr, \ | |||
| 499 | volatile type *__addr = addr; \ | 499 | volatile type *__addr = addr; \ |
| 500 | \ | 500 | \ |
| 501 | while (count--) { \ | 501 | while (count--) { \ |
| 502 | *__addr = mem_in##bwlq(port); \ | 502 | *__addr = __mem_in##bwlq(port); \ |
| 503 | __addr++; \ | 503 | __addr++; \ |
| 504 | } \ | 504 | } \ |
| 505 | } | 505 | } |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 1612b3fe1080..fa193f861e71 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
| @@ -114,6 +114,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
| 114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
| 115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ |
| 116 | #define TIF_SECCOMP 5 /* secure computing */ | 116 | #define TIF_SECCOMP 5 /* secure computing */ |
| 117 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | ||
| 117 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 118 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
| 118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
| 119 | #define TIF_MEMDIE 18 | 120 | #define TIF_MEMDIE 18 |
| @@ -125,6 +126,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
| 125 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 126 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
| 126 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 127 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
| 127 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 128 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
| 129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
| 128 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 130 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
| 129 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
| 130 | 132 | ||
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 89ea8b60e945..e7ff9b187783 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
| @@ -307,17 +307,33 @@ | |||
| 307 | #define __NR_inotify_init (__NR_Linux + 284) | 307 | #define __NR_inotify_init (__NR_Linux + 284) |
| 308 | #define __NR_inotify_add_watch (__NR_Linux + 285) | 308 | #define __NR_inotify_add_watch (__NR_Linux + 285) |
| 309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) | 309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) |
| 310 | 310 | #define __NR_migrate_pages (__NR_Linux + 287) | |
| 311 | #define __NR_openat (__NR_Linux + 288) | ||
| 312 | #define __NR_mkdirat (__NR_Linux + 289) | ||
| 313 | #define __NR_mknodat (__NR_Linux + 290) | ||
| 314 | #define __NR_fchownat (__NR_Linux + 291) | ||
| 315 | #define __NR_futimesat (__NR_Linux + 292) | ||
| 316 | #define __NR_newfstatat (__NR_Linux + 293) | ||
| 317 | #define __NR_unlinkat (__NR_Linux + 294) | ||
| 318 | #define __NR_renameat (__NR_Linux + 295) | ||
| 319 | #define __NR_linkat (__NR_Linux + 296) | ||
| 320 | #define __NR_symlinkat (__NR_Linux + 297) | ||
| 321 | #define __NR_readlinkat (__NR_Linux + 298) | ||
| 322 | #define __NR_fchmodat (__NR_Linux + 299) | ||
| 323 | #define __NR_faccessat (__NR_Linux + 300) | ||
| 324 | #define __NR_pselect6 (__NR_Linux + 301) | ||
| 325 | #define __NR_ppoll (__NR_Linux + 302) | ||
| 326 | #define __NR_unshare (__NR_Linux + 303) | ||
| 311 | 327 | ||
| 312 | /* | 328 | /* |
| 313 | * Offset of the last Linux o32 flavoured syscall | 329 | * Offset of the last Linux o32 flavoured syscall |
| 314 | */ | 330 | */ |
| 315 | #define __NR_Linux_syscalls 286 | 331 | #define __NR_Linux_syscalls 303 |
| 316 | 332 | ||
| 317 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 333 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 318 | 334 | ||
| 319 | #define __NR_O32_Linux 4000 | 335 | #define __NR_O32_Linux 4000 |
| 320 | #define __NR_O32_Linux_syscalls 283 | 336 | #define __NR_O32_Linux_syscalls 303 |
| 321 | 337 | ||
| 322 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 338 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 323 | 339 | ||
| @@ -571,16 +587,33 @@ | |||
| 571 | #define __NR_inotify_init (__NR_Linux + 243) | 587 | #define __NR_inotify_init (__NR_Linux + 243) |
| 572 | #define __NR_inotify_add_watch (__NR_Linux + 244) | 588 | #define __NR_inotify_add_watch (__NR_Linux + 244) |
| 573 | #define __NR_inotify_rm_watch (__NR_Linux + 245) | 589 | #define __NR_inotify_rm_watch (__NR_Linux + 245) |
| 590 | #define __NR_migrate_pages (__NR_Linux + 246) | ||
| 591 | #define __NR_openat (__NR_Linux + 247) | ||
| 592 | #define __NR_mkdirat (__NR_Linux + 248) | ||
| 593 | #define __NR_mknodat (__NR_Linux + 249) | ||
| 594 | #define __NR_fchownat (__NR_Linux + 250) | ||
| 595 | #define __NR_futimesat (__NR_Linux + 251) | ||
| 596 | #define __NR_newfstatat (__NR_Linux + 252) | ||
| 597 | #define __NR_unlinkat (__NR_Linux + 253) | ||
| 598 | #define __NR_renameat (__NR_Linux + 254) | ||
| 599 | #define __NR_linkat (__NR_Linux + 255) | ||
| 600 | #define __NR_symlinkat (__NR_Linux + 256) | ||
| 601 | #define __NR_readlinkat (__NR_Linux + 257) | ||
| 602 | #define __NR_fchmodat (__NR_Linux + 258) | ||
| 603 | #define __NR_faccessat (__NR_Linux + 259) | ||
| 604 | #define __NR_pselect6 (__NR_Linux + 260) | ||
| 605 | #define __NR_ppoll (__NR_Linux + 261) | ||
| 606 | #define __NR_unshare (__NR_Linux + 262) | ||
| 574 | 607 | ||
| 575 | /* | 608 | /* |
| 576 | * Offset of the last Linux 64-bit flavoured syscall | 609 | * Offset of the last Linux 64-bit flavoured syscall |
| 577 | */ | 610 | */ |
| 578 | #define __NR_Linux_syscalls 245 | 611 | #define __NR_Linux_syscalls 262 |
| 579 | 612 | ||
| 580 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 613 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 581 | 614 | ||
| 582 | #define __NR_64_Linux 5000 | 615 | #define __NR_64_Linux 5000 |
| 583 | #define __NR_64_Linux_syscalls 242 | 616 | #define __NR_64_Linux_syscalls 262 |
| 584 | 617 | ||
| 585 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 618 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 586 | 619 | ||
| @@ -838,16 +871,33 @@ | |||
| 838 | #define __NR_inotify_init (__NR_Linux + 247) | 871 | #define __NR_inotify_init (__NR_Linux + 247) |
| 839 | #define __NR_inotify_add_watch (__NR_Linux + 248) | 872 | #define __NR_inotify_add_watch (__NR_Linux + 248) |
| 840 | #define __NR_inotify_rm_watch (__NR_Linux + 249) | 873 | #define __NR_inotify_rm_watch (__NR_Linux + 249) |
| 874 | #define __NR_migrate_pages (__NR_Linux + 250) | ||
| 875 | #define __NR_openat (__NR_Linux + 251) | ||
| 876 | #define __NR_mkdirat (__NR_Linux + 252) | ||
| 877 | #define __NR_mknodat (__NR_Linux + 253) | ||
| 878 | #define __NR_fchownat (__NR_Linux + 254) | ||
| 879 | #define __NR_futimesat (__NR_Linux + 255) | ||
| 880 | #define __NR_newfstatat (__NR_Linux + 256) | ||
| 881 | #define __NR_unlinkat (__NR_Linux + 257) | ||
| 882 | #define __NR_renameat (__NR_Linux + 258) | ||
| 883 | #define __NR_linkat (__NR_Linux + 259) | ||
| 884 | #define __NR_symlinkat (__NR_Linux + 260) | ||
| 885 | #define __NR_readlinkat (__NR_Linux + 261) | ||
| 886 | #define __NR_fchmodat (__NR_Linux + 262) | ||
| 887 | #define __NR_faccessat (__NR_Linux + 263) | ||
| 888 | #define __NR_pselect6 (__NR_Linux + 264) | ||
| 889 | #define __NR_ppoll (__NR_Linux + 265) | ||
| 890 | #define __NR_unshare (__NR_Linux + 266) | ||
| 841 | 891 | ||
| 842 | /* | 892 | /* |
| 843 | * Offset of the last N32 flavoured syscall | 893 | * Offset of the last N32 flavoured syscall |
| 844 | */ | 894 | */ |
| 845 | #define __NR_Linux_syscalls 249 | 895 | #define __NR_Linux_syscalls 266 |
| 846 | 896 | ||
| 847 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 897 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 848 | 898 | ||
| 849 | #define __NR_N32_Linux 6000 | 899 | #define __NR_N32_Linux 6000 |
| 850 | #define __NR_N32_Linux_syscalls 246 | 900 | #define __NR_N32_Linux_syscalls 266 |
| 851 | 901 | ||
| 852 | #ifndef __ASSEMBLY__ | 902 | #ifndef __ASSEMBLY__ |
| 853 | 903 | ||
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h index accb80c9a339..aacaabd28ac1 100644 --- a/include/asm-powerpc/compat.h +++ b/include/asm-powerpc/compat.h | |||
| @@ -126,6 +126,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) | |||
| 126 | return (void __user *)(unsigned long)uptr; | 126 | return (void __user *)(unsigned long)uptr; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | ||
| 130 | { | ||
| 131 | return (u32)(unsigned long)uptr; | ||
| 132 | } | ||
| 133 | |||
| 129 | static inline void __user *compat_alloc_user_space(long len) | 134 | static inline void __user *compat_alloc_user_space(long len) |
| 130 | { | 135 | { |
| 131 | struct pt_regs *regs = current->thread.regs; | 136 | struct pt_regs *regs = current->thread.regs; |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index 67cdaf3ae9fc..c044ec16a879 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
| @@ -37,7 +37,7 @@ struct thread_info { | |||
| 37 | int preempt_count; /* 0 => preemptable, | 37 | int preempt_count; /* 0 => preemptable, |
| 38 | <0 => BUG */ | 38 | <0 => BUG */ |
| 39 | struct restart_block restart_block; | 39 | struct restart_block restart_block; |
| 40 | void *nvgprs_frame; | 40 | void __user *nvgprs_frame; |
| 41 | /* low level flags - has atomic operations done on it */ | 41 | /* low level flags - has atomic operations done on it */ |
| 42 | unsigned long flags ____cacheline_aligned_in_smp; | 42 | unsigned long flags ____cacheline_aligned_in_smp; |
| 43 | }; | 43 | }; |
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index be104f21c70a..0b7c0ca4c3d7 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) | 61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) |
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | static inline int __access_ok(const void *addr, unsigned long size) | 64 | static inline int __access_ok(const void __user *addr, unsigned long size) |
| 65 | { | 65 | { |
| 66 | return 1; | 66 | return 1; |
| 67 | } | 67 | } |
| @@ -208,25 +208,25 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
| 208 | case 1: { \ | 208 | case 1: { \ |
| 209 | unsigned char __x; \ | 209 | unsigned char __x; \ |
| 210 | __get_user_asm(__x, ptr, __gu_err); \ | 210 | __get_user_asm(__x, ptr, __gu_err); \ |
| 211 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 211 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
| 212 | break; \ | 212 | break; \ |
| 213 | }; \ | 213 | }; \ |
| 214 | case 2: { \ | 214 | case 2: { \ |
| 215 | unsigned short __x; \ | 215 | unsigned short __x; \ |
| 216 | __get_user_asm(__x, ptr, __gu_err); \ | 216 | __get_user_asm(__x, ptr, __gu_err); \ |
| 217 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 217 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
| 218 | break; \ | 218 | break; \ |
| 219 | }; \ | 219 | }; \ |
| 220 | case 4: { \ | 220 | case 4: { \ |
| 221 | unsigned int __x; \ | 221 | unsigned int __x; \ |
| 222 | __get_user_asm(__x, ptr, __gu_err); \ | 222 | __get_user_asm(__x, ptr, __gu_err); \ |
| 223 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 223 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
| 224 | break; \ | 224 | break; \ |
| 225 | }; \ | 225 | }; \ |
| 226 | case 8: { \ | 226 | case 8: { \ |
| 227 | unsigned long long __x; \ | 227 | unsigned long long __x; \ |
| 228 | __get_user_asm(__x, ptr, __gu_err); \ | 228 | __get_user_asm(__x, ptr, __gu_err); \ |
| 229 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 229 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
| 230 | break; \ | 230 | break; \ |
| 231 | }; \ | 231 | }; \ |
| 232 | default: \ | 232 | default: \ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 23fe746a1d51..18cf1f3e1184 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -82,6 +82,7 @@ struct elevator_queue | |||
| 82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | 82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); |
| 83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); |
| 84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); |
| 85 | extern void elv_insert(request_queue_t *, struct request *, int); | ||
| 85 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 86 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); |
| 86 | extern void elv_merge_requests(request_queue_t *, struct request *, | 87 | extern void elv_merge_requests(request_queue_t *, struct request *, |
| 87 | struct request *); | 88 | struct request *); |
diff --git a/include/linux/ioc3.h b/include/linux/ioc3.h index e7906a72a4f1..da7c09e4ede6 100644 --- a/include/linux/ioc3.h +++ b/include/linux/ioc3.h | |||
| @@ -27,7 +27,7 @@ struct ioc3_driver_data { | |||
| 27 | int id; /* IOC3 sequence number */ | 27 | int id; /* IOC3 sequence number */ |
| 28 | /* PCI mapping */ | 28 | /* PCI mapping */ |
| 29 | unsigned long pma; /* physical address */ | 29 | unsigned long pma; /* physical address */ |
| 30 | struct __iomem ioc3 *vma; /* pointer to registers */ | 30 | struct ioc3 __iomem *vma; /* pointer to registers */ |
| 31 | struct pci_dev *pdev; /* PCI device */ | 31 | struct pci_dev *pdev; /* PCI device */ |
| 32 | /* IRQ stuff */ | 32 | /* IRQ stuff */ |
| 33 | int dual_irq; /* set if separate IRQs are used */ | 33 | int dual_irq; /* set if separate IRQs are used */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 92a619ba163f..7a61ccdcbc4b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -1832,6 +1832,7 @@ | |||
| 1832 | #define PCI_VENDOR_ID_AFAVLAB 0x14db | 1832 | #define PCI_VENDOR_ID_AFAVLAB 0x14db |
| 1833 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 | 1833 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 |
| 1834 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 | 1834 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 |
| 1835 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 | ||
| 1835 | 1836 | ||
| 1836 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 1837 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
| 1837 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 1838 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b23be44cbea8..5208b12d5550 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -549,7 +549,7 @@ struct v4l2_framebuffer | |||
| 549 | struct v4l2_clip | 549 | struct v4l2_clip |
| 550 | { | 550 | { |
| 551 | struct v4l2_rect c; | 551 | struct v4l2_rect c; |
| 552 | struct v4l2_clip *next; | 552 | struct v4l2_clip __user *next; |
| 553 | }; | 553 | }; |
| 554 | 554 | ||
| 555 | struct v4l2_window | 555 | struct v4l2_window |
| @@ -336,7 +336,7 @@ EXPORT_SYMBOL(slab_reclaim_pages); | |||
| 336 | 336 | ||
| 337 | #ifdef CONFIG_SMP | 337 | #ifdef CONFIG_SMP |
| 338 | 338 | ||
| 339 | void *__alloc_percpu(size_t size, size_t align) | 339 | void *__alloc_percpu(size_t size) |
| 340 | { | 340 | { |
| 341 | int i; | 341 | int i; |
| 342 | struct percpu_data *pdata = kmalloc(sizeof (*pdata), GFP_KERNEL); | 342 | struct percpu_data *pdata = kmalloc(sizeof (*pdata), GFP_KERNEL); |
