diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
commit | 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d (patch) | |
tree | 357efc7b93f8f5102110d20d293f41360ec212fc /arch/alpha | |
parent | aea27b2e18d69af87e673972246e66657b4fa274 (diff) |
Merge with Linux 2.3.21.
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/alpha_ksyms.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/core_apecs.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_cia.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_lca.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_mcpcia.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_polaris.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_pyxis.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_t2.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/core_tsunami.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/pci.c | 8 | ||||
-rw-r--r-- | arch/alpha/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_dp264.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_rawhide.c | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_sio.c | 1 | ||||
-rw-r--r-- | arch/alpha/lib/strlen_user.S | 30 |
15 files changed, 37 insertions, 15 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index d8e1082d8..f280e4541 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -139,7 +139,7 @@ EXPORT_SYMBOL(alpha_fp_emul); EXPORT_SYMBOL_NOVERS(__copy_user); EXPORT_SYMBOL_NOVERS(__do_clear_user); EXPORT_SYMBOL(__strncpy_from_user); -EXPORT_SYMBOL(__strlen_user); +EXPORT_SYMBOL(__strnlen_user); /* * The following are specially called from the semaphore assembly stubs. diff --git a/arch/alpha/kernel/core_apecs.c b/arch/alpha/kernel/core_apecs.c index 46378b762..6a402a3e1 100644 --- a/arch/alpha/kernel/core_apecs.c +++ b/arch/alpha/kernel/core_apecs.c @@ -18,7 +18,6 @@ #include <asm/system.h> #include <asm/ptrace.h> #include <asm/smp.h> -#include <asm/pci.h> #define __EXTERN_INLINE inline #include <asm/io.h> diff --git a/arch/alpha/kernel/core_cia.c b/arch/alpha/kernel/core_cia.c index 5821db09d..4e773862b 100644 --- a/arch/alpha/kernel/core_cia.c +++ b/arch/alpha/kernel/core_cia.c @@ -19,7 +19,6 @@ #include <asm/system.h> #include <asm/ptrace.h> -#include <asm/pci.h> #define __EXTERN_INLINE inline #include <asm/io.h> diff --git a/arch/alpha/kernel/core_lca.c b/arch/alpha/kernel/core_lca.c index 13172b708..8b87f8afa 100644 --- a/arch/alpha/kernel/core_lca.c +++ b/arch/alpha/kernel/core_lca.c @@ -17,7 +17,6 @@ #include <asm/ptrace.h> #include <asm/system.h> #include <asm/smp.h> -#include <asm/pci.h> #define __EXTERN_INLINE inline #include <asm/io.h> diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index ac86d5255..1222556d3 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c @@ -15,7 +15,6 @@ #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/pci.h> #include <asm/hwrpb.h> #define __EXTERN_INLINE inline diff --git a/arch/alpha/kernel/core_polaris.c b/arch/alpha/kernel/core_polaris.c index 39ae36f8e..a6b1a70c7 100644 --- a/arch/alpha/kernel/core_polaris.c +++ b/arch/alpha/kernel/core_polaris.c @@ -12,7 +12,6 @@ #include <asm/system.h> #include <asm/ptrace.h> -#include <asm/pci.h> #define __EXTERN_INLINE inline #include <asm/io.h> diff --git a/arch/alpha/kernel/core_pyxis.c b/arch/alpha/kernel/core_pyxis.c index 88a3e37c9..4f9dd9a81 100644 --- a/arch/alpha/kernel/core_pyxis.c +++ b/arch/alpha/kernel/core_pyxis.c @@ -14,7 +14,6 @@ #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/pci.h> #define __EXTERN_INLINE inline #include <asm/io.h> diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c index 43103f8eb..6028e4e58 100644 --- a/arch/alpha/kernel/core_t2.c +++ b/arch/alpha/kernel/core_t2.c @@ -17,7 +17,6 @@ #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/pci.h> #define __EXTERN_INLINE #include <asm/io.h> diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c index c0d7c867d..b27298bd5 100644 --- a/arch/alpha/kernel/core_tsunami.c +++ b/arch/alpha/kernel/core_tsunami.c @@ -14,7 +14,6 @@ #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/pci.h> #include <asm/smp.h> #define __EXTERN_INLINE inline diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index a81ba4093..39d6b759f 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -10,7 +10,6 @@ #include <linux/pci.h> #include <linux/init.h> #include <linux/ioport.h> -#include <asm/pci.h> #include <asm/machvec.h> #include "proto.h" @@ -81,6 +80,13 @@ pcibios_assign_special(void) for (dev = pci_devices; dev; dev = dev->next) { if (dev->class >> 8 != PCI_CLASS_STORAGE_IDE) continue; + /* Resource 1 of IDE controller is the address of HD_CMD + register which actually occupies a single byte (0x3f6 + for ide0) in reported 0x3f4-3f7 range. We have to fix + that to avoid resource conflict with AT-style floppy + controller. */ + dev->resource[1].start += 2; + dev->resource[1].end = dev->resource[1].start; for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (dev->resource[i].flags) pci_claim_resource(dev, i); diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 47a86c9fe..9bb21671c 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -40,7 +40,6 @@ #include <asm/hwrpb.h> #include <asm/dma.h> #include <asm/io.h> -#include <asm/pci.h> #include "proto.h" #include "pci_impl.h" diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index a5806275f..9959aad33 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -22,7 +22,6 @@ #include <asm/bitops.h> #include <asm/mmu_context.h> #include <asm/io.h> -#include <asm/pci.h> #include <asm/pgtable.h> #include <asm/core_tsunami.h> #include <asm/hwrpb.h> diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index 1b5e1c3cf..4561c4046 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c @@ -19,7 +19,6 @@ #include <asm/system.h> #include <asm/dma.h> #include <asm/irq.h> -#include <asm/pci.h> #include <asm/mmu_context.h> #include <asm/io.h> #include <asm/pgtable.h> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index 8e7fdb85f..a6575de9c 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c @@ -28,7 +28,6 @@ #include <asm/pgtable.h> #include <asm/core_apecs.h> #include <asm/core_lca.h> -#include <asm/pci.h> #include "proto.h" #include "irq_impl.h" diff --git a/arch/alpha/lib/strlen_user.S b/arch/alpha/lib/strlen_user.S index 1f4fb07f5..80094e18a 100644 --- a/arch/alpha/lib/strlen_user.S +++ b/arch/alpha/lib/strlen_user.S @@ -3,6 +3,13 @@ * * Return the length of the string including the NUL terminator * (strlen+1) or zero if an error occurred. + * + * In places where it is critical to limit the processing time, + * and the data is not trusted, strnlen_user() should be used. + * It will return a value greater than its second argument if + * that limit would be exceeded. This implementation is allowed + * to access memory beyond the limit, but will not cross a page + * boundary when doing so. */ #include <alpha/regdef.h> @@ -27,6 +34,14 @@ .align 3 __strlen_user: + ldah a1, 32767(zero) # do not use plain strlen_user() for strings + # that might be almost 2 GB long; you should + # be using strnlen_user() instead + + .globl __strnlen_user + + .align 3 +__strnlen_user: ldgp $29,0($27) # we do exceptions -- we need the gp. .prologue 1 @@ -37,9 +52,17 @@ __strlen_user: or t1, t0, t0 subq a0, 1, a0 # get our +1 for the return cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0 + subq a1, 7, t2 + subq a0, v0, t0 bne t1, $found -$loop: EX( ldq t0, 8(v0) ) + addq t2, t0, t2 + addq a1, 1, a1 + + .align 3 +$loop: ble t2, $limit + EX( ldq t0, 8(v0) ) + subq t2, 8, t2 addq v0, 8, v0 # addr += 8 cmpbge zero, t0, t1 beq t1, $loop @@ -61,4 +84,9 @@ $found: negq t1, t2 # clear all but least set bit $exception: ret + .align 3 # currently redundant +$limit: + subq a1, t2, v0 + ret + .end __strlen_user |