11 Apr, 2006

40 commits

  • While cleaning up parisc_ksyms.c earlier, I noticed that strpbrk wasn't
    being exported from lib/string.c. Investigating further, I noticed a
    changeset that removed its export and added it to _ksyms.c on a few more
    architectures. The justification was that "other arches do it."

    I think this is wrong, since no architecture currently defines
    __HAVE_ARCH_STRPBRK, there's no reason for any of them to be exporting it
    themselves. Therefore, consolidate the export to lib/string.c.

    Signed-off-by: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for
    each arch. Its definition is sometimes configurable. Indeed, ia64 defines 5
    NODES_SHIFT values in the current git tree. But it looks a bit messy.

    SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has
    been changeable by config. Suitable node's number may be changed in the
    future even if it is other architecture. So, I wrote configurable node's
    number.

    This patch set defines just default value for each arch which needs multi
    nodes except ia64. But, it is easy to change to configurable if necessary.

    On ia64 the number of nodes can be already configured in generic ia64 and SN2
    config. But, NODES_SHIFT is defined for DIG64 and HP'S machine too. So, I
    changed it so that all platforms can be configured via CONFIG_NODES_SHIFT. It
    would be simpler.

    See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2

    Signed-off-by: Yasunori Goto
    Cc: Hirokazu Takata
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Kyle McMartin
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Jack Steiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • This adds support for my Thinkpad R52, which for some reason is not matched
    by the "ThinkPad R52" line.

    Signed-off-by: Frank Gevaerts
    Cc: Robert Love
    Cc: Dmitry Torokhov
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frank Gevaerts
     
  • include/asm/atomic.h:94: warning: implicit declaration of function 'unlikely'
    include/asm/atomic.h:97: warning: implicit declaration of function 'likely'

    Signed-off-by: Dave Jones
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • -finline-limit might have been required for older compilers, but nowadays
    it does no longer make sense.

    Signed-off-by: Adrian Bunk
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Cleanup of minor bugs found by a source code checker.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     
  • The proc_mkdir calls in the dasd driver are not check for NULL pointers. Add
    code to check the pointers and bail out if one of the proc entries could not
    be created.

    Signed-off-by: Horst Hummel
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Horst Hummel
     
  • Using the fail-fast flag in i/o requests on a dasd disk which has been
    quiesced leads to kernel panics. Modify the request start function to only
    work on requests in a valid state.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     
  • The dasd driver sometimes print the misleading message "Can't offline dasd
    device with open count = 0". The reason why it can't offline the device in
    this case is that the device is still in the startup phase. Print a more
    meaningful message.

    Signed-off-by: Horst Hummel
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Horst Hummel
     
  • Debugging events in cio_trace/hex_ascii are truncated for some trace entries.
    Increase trace event size to 16 bytes to cover longer text events, make
    CIO_HEX_EVENT an inline function that loops to cover bigger hex events.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     
  • cio_ignore_proc_init() returns 1 in case of success and 0 in case of failure.
    The caller tests for != 0, so better return 0 in case of success and -ENOENT
    in case of failure.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cornelia Huck
     
  • Typo. After the call to kzalloc() for kdb->key_maps the test for NULL checks
    the wrong variable.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     
  • Make the length of ebcdicascii conversion arrays known. This avoid
    warnings with source code checking tools.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     
  • Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • Since on some 64-bit systems __u64 is rightfully defined to unsigned long and
    GCC recognizes anyway unsigned long and unsigned long long as different, fix
    some types back to being unsigned long long to avoid warnings and errors (for
    prototype mismatch) on those systems.

    Thanks to the report by Wesley Emeneker wesleyemeneker (at) google (dot) com

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Parallel make failed once for me - fix this by adding the appropriate command
    (mkdir before creating a link in that dir).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Acked-by: Sam Ravnborg
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • The call to local_save_flags seems bogus since it is followed by
    local_irq_restore, and it's intended to lock the list from concurrent
    mconsole_interrupt invocations.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Switch this proc from storing 4k of data (a whole path) on the stack to
    keeping it on the heap.

    Maybe it's not called in process context but only in early boot context (where
    in UML you have a normal process stack on the host) but just to be safe, fix
    it.

    While at it some little readability simplifications.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Little fix for error paths in this code.

    - Some bug come from conversion to os-Linux (open() doesn't follow the
    kernel -errno return convention, while the old code called os_open_file()
    which followed it). This caused the wrong return code to be printed.

    - Then be more precise about what happened and do some whitespace fixes.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Fix an hang on a pipe when run_helper() fails when called by change_tramp()
    (i.e. when calling uml_net) - reproduced the bug and verified this fixes it.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Move a call to kfree on a local variable out of a spinlock - there's no need
    to have it in. Done on a just merged patch.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Make sparse checker work for userspace files - it normally gets -nostdinc
    separately, so avoid having it for userspace files. Also, add -D$(SUBARCH)
    for multiarch hosts (i.e. AMD64 with compatibility headers).

    It works, the only problem is a bit of bogus warnings for system headers, but
    they're not too many.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Noticed this for a compilation-time warning, so I'm fixing it even for TT mode
    - this is not put_user, but copy_to_user, so we need a pointer to sp, not sp
    itself (we're trying to write the word pointed to by the "sp" var.).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Move the prototype from arch-generic to arch-specific includes because on
    x86_64 these functions are two static inlines.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Some functions are exported twice in current code - remove the excess export.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Now that GCC warns about format errors, fix them. Nothing able to cause a
    crash, however.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Add the format attribute to prototypes so GCC warns about improper usage.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for
    now because of a missing __attribute((format)) for cow_printf, but next
    patches fix that).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • - Correct the layout of all header versions - make all them well-specified
    for any external event. As we don't have 1-byte or 2-byte wide fields, the
    32-bit layout (historical one) has no extra padding, so we can safely add
    __attribute__((packed)).

    - Add detection and reading of the broken 64-bit COW format which has been
    around for a while - to allow safe migration to the correct 32-bit format.
    Safe detection is possible, thanks to some luck with the existing format,
    and it works in practice.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • This is the minimal fix to make 64-bit UML binaries create 32-bit compatible
    COW files and read them. I've indeed tested that current code doesn't do this
    - the code gets SIGFPE for a division by a value read at the wrong place,
    where 0 is found.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Change memory hotplug to use GFP_NOWAIT instead of GFP_ATOMIC, so that it
    will grab memory without sleeping, but doesn't try to use the emergency
    pools.

    A small list initialization suggested by Daniel Phillips - don't initialize
    lists which are just about to be list_add-ed.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Introduce GFP_NOWAIT, as an alias for GFP_ATOMIC & ~__GFP_HIGH.

    This also changes XFS, which is the only in-tree user of this idiom that I
    could find. The XFS piece is compile-tested only.

    Signed-off-by: Jeff Dike
    Acked-by: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Two small TLS fixes -

    arch/um/os-Linux/sys-i386/tls.c uses errno and -E* so it should include
    errno.h
    __setup_host_supports_tls returns 1, but as an initcall, it should return 0

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Remove multi-exported symbols from arch/m32r/kernel/m32r_ksyms.c.

    WARNING: vmlinux: 'enable_irq' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'disable_irq' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'disable_irq_nosync' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'synchronize_irq' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'memchr' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'memmove' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strncat' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strncpy' exported twice. Previous export was in vmlinux
    WARNING: vmlinux: 'strcpy' exported twice. Previous export was in vmlinux

    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Remove unused prepare_to_switch() macros.

    Signed-off-by: Hirokazu Takata
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Miles Bader
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Update {get,put}_user macros for m32r kernel.
    - Modify get_user to use __get_user_asm macro, instead of __get_user_x macro.
    - Remove arch/m32r/lib/{get,put}user.S.
    - Some cosmetic updates.

    I would like to thank NIIBE Yutaka for his reporting about the m32r kernel's
    security problem in {get,put}_user macros.

    There were no address checking for user space access in {get,put}_user macros.
    ;-)

    Signed-off-by: Hirokazu Takata
    Cc: NIIBE Yutaka
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
    later.

    In this patch, cpu_possible_map is statically initialized, and cpu_present_map
    is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
    architecture has not supported CPU hotplug yet.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • I've encountered two problems with 2.6.16 and newer kernels on my API CS20
    (dual 833MHz Alpha 21264b processors). The first is the kernel OOPSing
    because of a NULL pointer dereference while trying to populate SysFS with the
    CPU information. The other is that only one processor was being brought up.
    I've included a small Alpha-specific patch that fixes both problems.

    The first problem was caused by the CPUs never being properly registered using
    register_cpu(), the way it's done on other architectures.

    The second problem has to do with the removal of hwrpb_cpu_present_mask in
    arch/alpha/kernel/smp.c. In setup_smp() in the 2.6.15 kernel sources,
    hwrpb_cpu_present_mask has a bit set for each processor that is probed, and
    afterwards cpu_present_mask is set to the cpumask for the boot CPU. In the
    same function of the same file in the 2.6.16 sources, instead of
    hwrpb_cpu_present_mask being set, cpu_possible_map is updated for each probed
    CPU. cpu_present_mask is still set to the cpumask of the boot CPU afterwards.
    The problem lies in include/asm-alpha/smp.h, where cpu_possible_map is
    #define'd to be cpu_present_mask.

    Cleanups from: Ivan Kokshaysky

    - cpu_present_mask and cpu_possible_map are essentially the same thing
    on alpha, as it doesn't support CPU hotplug;
    - allocate "struct cpu" only for present CPUs, like sparc64 does.
    Static array of "struct cpu" is just a waste of memory.

    Signed-off-by: Brian Uhrain
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Uhrain says
     
  • Geode GX/LX should enable X86_TSC. Pointed out by Adrian Bunk.

    Signed-off-by: Jordan Crouse
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jordan Crouse
     
  • Since several subarchs depend on SMP, the SMP option should be above the
    subarch selection.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk