07 Jan, 2006

40 commits

  • There are some more places where the use of cputime_t instead of an integer
    type and the associated macros is necessary for the virtual cputime accounting
    on s390. Affected are the s390 specific appldata code and BSD process
    accounting.

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

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

    Martin Schwidefsky
     
  • Check return code of do_sigaltstack and force a SIGSEGV if it is -EFAULT.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cedric Le Goater
     
  • Convert __access_ok to an inline C function and change __get_user primitive to
    avoid uaccess compiler warnings.

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

    Martin Schwidefsky
     
  • Hugh Dickins

    Fix the broken atomic_cmpxchg primitive. Add atomic_sub_and_test,
    atomic64_sub_return, atomic64_sub_and_test, atomic64_cmpxchg,
    atomic64_add_unless and atomic64_inc_not_zero. Replace old style
    atomic_compare_and_swap by atomic_cmpxchg. Shorten the whole header by
    defining most primitives with the two inline functions atomic_add_return and
    atomic_sub_return.

    In addition this patch contains the s390 related fixes of Hugh's "mm: fill
    arch atomic64 gaps" patch.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • Free the network IRQ when closing down the network devices at shutdown.
    Delete the device from the opened devices list on close.

    These prevent an -EBADF when later disabling SIGIO on all extant descriptors
    and a complaint from free_irq about freeing the IRQ twice.

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

    Jeff Dike
     
  • Fix up some bogus spacing in the mconsole driver. Also delete the
    emacs formatting comment at the end.

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

    Jeff Dike
     
  • Pass sysrq output back to the mconsole client using the mechanism
    introduced for stack output.

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

    Jeff Dike
     
  • The stack command now sends the printk output back to the mconsole client.
    This is done by registering a special console for the mconsole driver. This
    receives all printk output. Normally, it is ignored, but when a stack command
    is issued, any printk output will be sent back to the client.

    This will capture any printk output, whether it is stack output or not, since
    we can't tell the difference.

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

    Jeff Dike
     
  • This is needed for the console output patch, since we have a possibly
    non-NULL-terminated string there. So, the new interface takes a string and a
    length, and the old interface calls strlen on its string and calls the new
    interface with the length.

    There's also a bit of whitespace cleanup.

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

    Jeff Dike
     
  • Produce a compile-time error if both MODE_SKAS and MODE_TT are disabled.

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

    Jeff Dike
     
  • Code cleanup - unregister_winch and winch_cleanup had some duplicate code.
    This is now abstracted out into free_winch.

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

    Jeff Dike
     
  • This patch cleans up the umid code:

    - The only_if_set argument to get_umid is gone.

    - get_umid returns an empty string rather than NULL if there is no umid.

    - umid_is_random is gone since its users went away.

    - Some printfs were turned into printks because the code runs late enough
    that printk is working.

    - Error paths were cleaned up.

    - Some functions now return an error and let the caller print the error
    message rather than printing it themselves. This eliminates the practice of
    passing a pointer to printf or printk in, depending on where in the boot
    process we are.

    - Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
    explaining why it doesn't react to errors the way you might expect.

    - Calls to os_* interfaces that were moved under os are changed back to
    their native libc forms.

    - snprintf, strlcpy, and their bounds-checking friends are used more often,
    replacing by-hand bounds checking in some places.

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

    Jeff Dike
     
  • I reworked Gennady's umid OS abstraction patch because the code shouldn't
    be moved entirely to os. As it turns out, I moved most of it anyway. This
    patch is the minimal one needed to move the code and have it work.
    It turns out that the concept of the umid is OS-independent, but
    almost everything else about the implementation is OS-dependent.

    This is code movement without cleanup - a follow-on patch tidies
    everything up without shuffling code around.

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

    Jeff Dike
     
  • This patch adds support for throttling and unthrottling input when the tty
    driver can't handle it.

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

    Jeff Dike
     
  • When the tty flip_buf is full, it's a good idea to delay the input processing
    for a jiffy, rather than just scheduling the tasklet immediately.

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

    Jeff Dike
     
  • This patch simplifies the opening and closing of host console devices and the
    registration and deregistration of IRQs. The intent is to make it obvious
    that an IRQ can't exist without an open file descriptor.

    chan_enable will now open the channel, and when both opening and IRQ
    registration are desired, this should be used. Opening only is done for the
    initial console, so that interface still needs to exist.

    The free_irqs_later interface is now gone. It was intended to avoid freeing
    an IRQ while it was being processed. It did this, but it didn't eliminate the
    possiblity of free_irq being called from an interrupt, which is bad. In its
    place is a list of irqs to be freed, which is processed by the signal handler
    just before exiting. close_one_chan now disables irqs.

    When a host device disappears, it is just closed, and that disables IRQs.

    The device id registered with the IRQ is now the chan structure, not the tty.
    This is because the interrupt arrives on a descriptor associated with the
    channel. This caused equivalent changes in the arguments to line_timer_cb.
    line_disable is gone since it is not used any more.

    The count field in the line structure is gone. tty->count is used instead.

    The complicated logic in sigio_handler with freeing IRQs when necessary and
    making sure its idea of the next irq is correct is now much simpler. The irq
    list can't be rearranged underneath it, so it is now a simple list walk.

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

    Jeff Dike
     
  • This patch changes when console devices are configured in order to prepare the
    ground for the next patch.

    parse_chan_pair is now done earlier, when initcalls are run, rather than when
    the device is opened.

    When a host device disappears, the channel list is closed, but not freed.
    This is required by the previous change. line_config now takes the options
    structure as an argument, and line_open doesn't.

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

    Jeff Dike
     
  • line_setup is changed to return the device which it set up, rather than just
    success or failure. This will be important in the line-config patch.

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

    Jeff Dike
     
  • Some structure fields were being dynamically initialized when they could be
    initialized at compile-time instead. This also makes some declarations static
    (in the C sense).

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

    Jeff Dike
     
  • A bit of restructuring which eliminates the all_allowed argument (which is
    mconsole-specific) to line_setup. That logic is moved to the mconsole
    callback.

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

    Jeff Dike
     
  • This removes a structure field which turned out to be pointless, and
    references to it.

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

    Jeff Dike
     
  • This patch replaces instances of "sizeof(foo)/sizeof(foo[0])" with
    ARRAY_SIZE(foo), which expands to the same thing.

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

    Jeff Dike
     
  • This patch makes a bunch of non-functional changes -
    return(foo); becomes return foo;
    some statements are broken across lines for readability
    some trailing whitespace is cleaned up
    open_one_chan took four arguments, three of which could be
    deduced from the first. Accordingly, they were eliminated.
    some examples of "} else {" had a newline added
    some whitespace cleanup in the indentation
    lines_init got some control flow cleanup
    some long lines were broken
    removed another emacs-specific C formatting comment

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

    Jeff Dike
     
  • There are a few functions which are declared to return something, but don't.
    These are actually infinite loops which are forced to be declared as non-void.
    This makes them all return 0.

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

    Jeff Dike
     
  • There were a bunch of calls to uml_strdup dating from before kstrdup was
    introduced. This changes those calls. It doesn't eliminate the definition
    since there is still a couple of calls in userspace code (which should
    probably call the libc strdup).

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

    Jeff Dike
     
  • Doesn't make much sense and unused.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Adrian Bunk
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • mach_enable_irq/mach_disable_irq are never actually set, so let's remove
    them.

    Signed-off-by: Christoph Hellwig
    Cc: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • This patch removes unnecessary struct icu_data_t definitions of
    arch/m32r/kernel/setup_*.c.

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

    Hirokazu Takata
     
  • This patch fixes cache memory parameter setting for the M32104 target. So
    far, its performance seemed to have been degraded due to incorrect cache
    parameter setting.

    * arch/m32r/boot/setup.S: Set SFR(Special Fuction Registers) region
    to be non-cachable explicitly.
    * arch/m32r/mm/cache.c: Fix cache flushing routines not to switch off
    the M32104 cache.

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

    Hirokazu Takata
     
  • Modify _port2addr*() routines in arch/m32r/kernel/io_*.c to use
    NONCACHE_OFFSET instead of hard-coding of a constant address.

    This modification is also required to support an M3A-ZA36 FPGA eva board in
    case an MMU-less synthesizable m32r core is used.

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

    Hirokazu Takata
     
  • This patch is for supporting a new target platform, Renesas M32104UT
    evaluation board.

    The M32104UT is an eval board based on an uT-Engine specification. This board
    has an MMU-less M32R family processor, M32104.
    http://www-wa0.personal-media.co.jp/pmc/archive/te/te_m32104_e.pdf

    This board is one of the most popular M32R platform, so we have ported
    Linux/M32R to it.

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

    Hirokazu Takata
     
  • A trivial fix to remove unused instructions.

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

    Hirokazu Takata
     
  • Kconfig tweaks and tons of deletions.

    Signed-off-by: Ivan Kokshaysky
    Cc: Christoph Hellwig
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     
  • With physical CPU hotplug, the CPU is hot removed and it should not receive
    any interrupts. Disabling interrupt is much safer. This basically is what we
    do in ia64 & x86.

    Signed-off-by: Shaohua Li
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • Signed-off-by: Ben Collins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Collins
     
  • o Currently, during kexec reboot, IOAPIC is re-programmed back to virtual
    wire mode if there was an i8259 connected to it. This enables getting
    timer interrupts in second kernel in legacy mode.

    o After putting into virtual wire mode, IOAPIC delivers the i8259 interrupts
    to CPU0. This works well for kexec but not for kdump as we might crash
    on a different CPU and second kernel will not see timer interrupts.

    o This patch modifies the redirection table entry to deliver the timer
    interrupts to the cpu we are rebooting (instead of hardcoding to zero).
    This ensures that second kernel receives timer interrupts even on a
    non-boot cpu.

    Signed-off-by: Vivek Goyal
    Cc: Andi Kleen
    Cc: "Seth, Rohit"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • When we re-calibrate the frequency, it is likely that an interrupt (as for
    example the main system clock) will be triggered by the system. Therefore
    the calibration may not be accurate. This will also provide a fix to bug
    #5266.

    Many thanks to Larry Finger for helping resolving this issue.

    Signed-off-by: Bruno Ducrot
    Cc: john stultz
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Larry Finger
     
  • - Fix screen blanking on BIOSes that return APM_NOT_ENGAGED when APM enabled
    screen blanking is not turned on.

    The original code only tried to set the state on device 0x100, and then
    0x1FF, and I added 0x101 to the mix too.

    - Clean up logic in apm_console_blank().

    - Prevent the error message from printing out twice.

    Cc: Jordan Crouse
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jordan Crouse
     
  • Provide basic support for the AMD Geode GX and LX processors.

    Signed-off-by: Jordan Crouse
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jordan Crouse