07 Jan, 2006

40 commits

  • 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
     
  • m68k, m68knommu and h8300 define this, but it's not actually used
    anywhere.

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

    Christoph Hellwig
     
  • 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 updating m32r's MMU-less support.

    Some legacy MMU-less m32r chips cannot return from a trap handler to the
    right-hand side 16-bit halfword code of a 32-bit instrucion code pair, because
    a "trap" instruction specification was expanded in M32R-II ISA.

    This modification forces "trap" instructions to be placed in word alignment
    location with a parallel "nop" code.

    Signed-off-by: Kazuhiro Inaoka
    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
     
  • We had a report from one loony user who tried out suspend to disk using a
    swap partition on a firewire drive. As the firewire thread was put to
    sleep it didn't work out too well.

    Signed-off-by: Dave Jones
    Cc: Pavel Machek
    Cc: Ben Collins
    Cc: Jody McIntyre
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • This makes the swsusp_info structure become the header of the image in the
    literal sense (ie. it is saved to the swap and read before any other image
    data with the help of the swsusp's swap map structure, so generally it is
    treated in the same way as the rest of the image).

    The main thing it does is to make swsusp_header contain the offset of the swap
    map used to track the image data pages rather than the offset of swsusp_info.
     Simultaneously, swsusp_info becomes the first image page written to the swap.

    The other changes are generally consequences of the above with a few
    exceptions (there's some consolidation in the image reading part as a few
    functions turn into trivial wrappers around something else).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This changes the handling of swap partitions by swsusp to avoid locking of the
    swap devices that are not used for suspend and, consequently, simplifies the
    code.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This adds the function get_swap_page_of_type() allowing us to specify an index
    in swap_info[] and select a swap_info_struct structure to be used for
    allocating a swap page.

    This function (or another one of similar functionality) will be necessary for
    implementing the image-writing part of swsusp in the user space.  It can also
    be used for simplifying the current in-kernel implementation of the
    image-writing part of swsusp.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Make the suspend image size limit tunable via /sys/power/image_size.

    It is necessary for systems on which there is a limited amount of swap
    available for suspend. It can also be useful for optimizing performance of
    swsusp on systems with 1 GB of RAM or more.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Limit the size of the suspend image to approx. 500 MB, which should
    improve the overall performance of swsusp on systems with more than 1 GB of
    RAM.

    It introduces the constant IMAGE_SIZE that can be set to the preferred size
    of the image (in MB) and modifies the memory-shrinking part of swsusp to
    take this constant into account (500 is the default value of IMAGE_SIZE).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • These two prototypes are already present in sched.h, remove duplicate
    version.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • This change removes the old, deprecated interface from the opl3sa2 driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This change removes the old, deprecated interface from the nm256 driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    Note that this driver has been obsoleted by an ALSA equivalent.

    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This change removes the old, deprecated interface from the maestro driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    The check_suspend() function and associated logic was not removed, even though
    it is now unnecessary.

    Note that this driver has been obsoleted by an ALSA equivalent.

    Acked-by: Zach Brown
    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This change removes the old, deprecated interface from the cs46xx driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    Note this driver has PCI PM hooks which are set properly. It also has the
    ability to trigger suspend/resume from an ioctl. This functionality was not
    touched, though it could use a serious review if this driver continues to
    persist in the mainline tree..

    Note that this driver has been obsoleted by an ALSA equivalent.

    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This change removes the old, deprecated interface from the cs4281 driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    Note that this driver has been obsoleted by an ALSA equivalent.

    Note that this driver has hooks for PCI power management, but does not
    implement the ->suspend()/->resume() methods.

    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This change removes the old, deprecated interface from the ad1848 driver,
    including the pm_{,un}register() calls, the local storage of the pmdev object
    and the reference to the old header files. This change is done to assist in
    eradicating the users of the legacy interface so as to help facilitate the
    removal of the interface itself.

    Signed-off-by: Patrick Mochel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Mochel
     
  • This patch fixes a problem with the function enough_free_mem() used by
    swsusp to verify if there is a sufficient number of memory pages available
    to it to create and save the suspend image.

    Namely, enough_free_mem() uses nr_free_pages() to obtain the number of free
    memory pages, which is incorrect, because this function returns the total
    number of free pages, including free highmem pages, and the highmem pages
    cannot be used by swsusp for storing the image data.

    The patch makes enough_free_mem() avoid counting the free highmem
    pages as available to swsusp.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This patch makes swsusp free only as much memory as needed to complete the
    suspend and not as much as possible.  In the most of cases this should speed
    up the suspend and make the system much more responsive after resume,
    especially if a GUI (eg. X Windows) is used.

    If needed, the old behavior (ie to free as much memory as possible during
    suspend) can be restored by unsetting FAST_FREE in power.h

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This patch introduces the swap map structure that can be used by swsusp for
    keeping tracks of data pages written to the swap.  The structure itself is
    described in a comment within the patch.

    The overall idea is to reduce the amount of metadata written to the swap and
    to write and read the image pages sequentially, in a file-alike way. This
    makes the swap-handling part of swsusp fairly independent of its
    snapshot-handling part and will hopefully allow us to completely separate
    these two parts in the future.

    This patch is needed to remove the suspend image size limit imposed by the
    limited size of the swsusp_info structure, which is essential for x86-64
    systems with more than 512 MB of RAM.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This patch removes the image encryption that is only used by swsusp instead of
    zeroing the image after resume in order to prevent someone from reading some
    confidential data from it in the future and it does not protect the image from
    being read by an unauthorized person before resume. The functionality it
    provides should really belong to the user space and will possibly be
    reimplemented after the swap-handling functionality of swsusp is moved to the
    user space.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • 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
     
  • Thanks to Christoph for doing most of the work.

    This allows automatic SMP IRQ affinity assignment other than default "all
    interrupts on all CPUs" which is rather expensive. This might be useful if
    the hardware can be programmed to distribute interrupts among different
    CPUs, like Alpha does.

    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
     
  • GCC 4.1 gives the following warning: include/asm/mpspec.h:79: warning:
    `packed' attribute ignored for field of type `unsigned char'

    The packed attribute isn't really necessary anyways so just remove it.

    Signed-off-by: Brian Gerst
    Acked-by: Dave Jones
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Gerst
     
  • 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
     
  • Add support to hw_random for the Geode LX HRNG device.

    Signed-off-by: Jordan Crouse
    Cc: Alan Cox
    Cc: Jeff Garzik
    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
     
  • Removed the unused variable "rv".

    Signed-off-by: Daniel Marjamaki
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Marjamaki
     
  • Removed the unused variable "rv".

    Signed-off-by: Daniel Marjamaki
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Marjamaki