1. 12 Mar, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] mm/vmscan.c: remove unused priority argument. · 13095f7a
      Andrew Morton authored
      From: Nikita Danilov <Nikita@Namesys.COM>
      
      Now that decision to reclaim mapped memory is taken on the basis of
      zone->prev_priority, priority argument is no longer needed.
      13095f7a
    • Andrew Morton's avatar
      [PATCH] Narrow blk_congestion_wait races · c05d7ab9
      Andrew Morton authored
      From: Nick Piggin <piggin@cyberone.com.au>
      
      The addition of the smp_mb and the other change is to try to close the
      window for races a bit.  Obviously they can still happen, it's a racy
      interface and it doesn't matter much.
      c05d7ab9
    • Andrew Morton's avatar
      [PATCH] return remaining jiffies from blk_congestion_wait() · f3179458
      Andrew Morton authored
      Teach blk_congestion_wait() to return the number of jiffies remaining.  This
      is for debug, but it is also nicely consistent.
      f3179458
    • Andrew Morton's avatar
      [PATCH] vm: per-zone vmscan instrumentation · 760d95b5
      Andrew Morton authored
      To check on zone balancing, split the /proc/vmstat:pgsteal, pgreclaim pgalloc
      and pgscan stats into per-zone counters.
      
      Additionally, split the pgscan stats into pgscan_direct and pgscan_kswapd to
      see who's doing how much scanning.
      
      And add a metric for the number of slab objects which were scanned.
      760d95b5
    • Andrew Morton's avatar
      [PATCH] synclink.c update · bae30a3f
      Andrew Morton authored
      From: Paul Fulghum <paulkf@microgate.com>
      
      * track driver API changes
      * remove cast (kernel janitor)
      bae30a3f
    • Andrew Morton's avatar
      [PATCH] synclink_cs.c update · 208516ea
      Andrew Morton authored
      From: Paul Fulghum <paulkf@microgate.com>
      
      * Track driver API changes
      * Remove cast (kernel janitor)
      208516ea
    • Andrew Morton's avatar
      [PATCH] synclinkmp.c update · abc5e2bb
      Andrew Morton authored
      From: Paul Fulghum <paulkf@microgate.com>
      
      Patch for synclinkmp.c
      
      * Track driver API changes
      * Remove cast (kernel janitor)
      * Replace page_free call with kfree (to match kmalloc allocation)
      abc5e2bb
    • Andrew Morton's avatar
      [PATCH] Add barriers to avoid race in mempool_alloc/free · 66d1bbed
      Andrew Morton authored
      From: Chris Mason <mason@suse.com>
      
      mempool_alloc() and mempool_free() check pool->curr_nr without any locks
      held.  This can lead to skipping a wakeup when there are people waiting,
      and sleeping when there are free elements in the pool.
      
      I can't trigger this reliably, but sooner or later someone on ppc is
      probably going to hit it.
      66d1bbed
    • Andrew Morton's avatar
      [PATCH] m68k: interrupt management cleanups · e798a41d
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      M68k interrupt management: rename routines to not confuse them with
      syscalls
      
      - sys_{request,free}_irq() -> cpu_{request,free}_irq()
      
      - q40_sys_default_handler[] -> q40_default_handler
      
      - sys_default_handler() -> default_handler()
      e798a41d
    • Andrew Morton's avatar
      [PATCH] m68k: Macintosh IDE fixes · 4edbed7b
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Mac IDE: Make sure the core IDE driver doesn't try to request the MMIO
      ports a second time, since this will fail.
      4edbed7b
    • Andrew Morton's avatar
      [PATCH] Apollo fb sysfsification · d8059782
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Apollo fb: Add sysfs support (from James Simmons)
      d8059782
    • Andrew Morton's avatar
      [PATCH] m68k: Amiga Framemaster II fb sysfsification · 77375e79
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Amiga Framemaster II fb: Add sysfs support (from James Simmons)
      77375e79
    • Andrew Morton's avatar
      [PATCH] m68k: __test_and_set_bit() · c138cf43
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Add missing implementation for non-atomic __test_and_set_bit()
      c138cf43
    • Andrew Morton's avatar
      [PATCH] fbdev: monitor detection fixes · c42f7c1f
      Andrew Morton authored
      From: James Simmons <jsimmons@infradead.org>,
            Kronos <kronos@kronoz.cjb.net>
      
      Various fixes and enhancements to the monitor hardware detection code.  The
      only driver that uses it is the radeon driver.
      
      Old EDID parsing code was very verbose, half of the patch address this (ie.
      print lots of stuff iff DEBUG).  The other big change is the FB_MODE_IS_*
      stuff: we really need a way to know the origin of a video mode.  In this way
      we can select video mode that comes from EDID instead of VESA or GTF.
      
      Drivers other than radeonfb won't be affected because they cannot (yet) get
      EDID from the monitor and don't use EDID related code.
      c42f7c1f
    • Andrew Morton's avatar
      [PATCH] Fix NULL pointer dereference in blkmtd.c · 787bc776
      Andrew Morton authored
      From: Michel Marti <michel.marti@objectxp.com>
      
      The blkmtd driver oopses in add_device().  The following trivial patch
      fixes this.
      787bc776
    • Andrew Morton's avatar
      [PATCH] fix raid0 readahead size · 132a4161
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      Readahead of raid0 was suboptimal; it read only 1 stride ahead.  The
      problem with this is that while it will keep all spindles busy, it will not
      actually manage to make larger IO's, eg each disk would just do the chunk
      size IO.  Doing at least 2 chunks is more than appropriate so that each
      spindle will get a chance to merge IO's.
      
      (Neil fixed raid6 and raid6 too)
      132a4161
    • Andrew Morton's avatar
      [PATCH] module.h __attribute_used__ fix · ef3555ba
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Someone added __attribute_used__ throughout module.h, but didn't remove the
      ", unused".  Looks like some arch/gcc combos still consider it unused, and
      discard the fn.
      ef3555ba
    • Andrew Morton's avatar
      [PATCH] Fix CONFIG_NVRAM dependencies · b814dfb7
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Make CONFIG_NVRAM depend on the prerequisites that are explicitly checked
      for in drivers/char/nvram.c, or on CONFIG_GENERIC_NVRAM (for PPC).
      b814dfb7
    • Andrew Morton's avatar
      [PATCH] Applicom warning · 36f606d2
      Andrew Morton authored
      From: Geert Uytterhoeven <geert@linux-m68k.org>
      
      Add missing include (needed for struct inode)
      36f606d2
    • Andrew Morton's avatar
      [PATCH] Disable Macintosh device drivers for all but PPC || MAC · 72984282
      Andrew Morton authored
      From: Marc-Christian Petersen <m.c.p@wolk-project.de>
      
      The attached patch is needed to stop showing us "Macintosh device drivers"
      for all architectures via menuconfig || xconfig || gconfig.  It's only
      necessary for PPC and/or MAC.
      
      ACKed by benh.
      72984282
    • Andrew Morton's avatar
      [PATCH] add nowarn to a few pte chain allocators · a4fc9e26
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      Several of the pte_chain_alloc() allocators that use GFP_ATOMIC have a
      fallback for failure that sleeps; they thus need to not warn on failure..
      Seen during a big fork on a busy system.
      a4fc9e26
    • Andrew Morton's avatar
      [PATCH] cciss: init section fix · 6edcc434
      Andrew Morton authored
      From: "Randy.Dunlap" <rddunlap@osdl.org>
      
      cciss_scsi_detect() can be called after init (for TAPE support).
      6edcc434
    • Andrew Morton's avatar
      [PATCH] EDD: Get Legacy Parameters · 66b61a5c
      Andrew Morton authored
      From: Matt Domsch <Matt_Domsch@dell.com>
      
      Patch below from Patrick J. LoPresti and myself.  Patrick describes:
      
      Why this patch?  The problem is that the legacy BIOS interface
      (INT13/AH=3D08) for querying the disk geometry returns different values
      than the extended INT13 interface which the EDD code currently uses.  This
      is because the legacy interface only provides a 10-bit cylinder field, so
      modern BIOSes "lie" about the head/sector counts in order to make more of
      the disk visible within the first 1024 cylinders.
      
      Many non-Linux applications, including the stock Windows boot loader, DOS
      fdisk, etc., rely upon the legacy interface and geometry.  So it is useful
      to be able to obtain the legacy values from a running Linux kernel.
      
      What this patch does is to add new entries under
      /sys/firmware/edd/int13_devXX named "legacy_cylinders", "legacy_heads", and
      "legacy_sectors".  These provide the geometry given by the legacy
      INT13/AH=3D08 BIOS interface, just like the current "default_cylinders"
      etc.  provide the the geometry given by the INT13/AH=3D48 interface.
      
      Without this patch, I cannot use Linux to partition a drive and install
      Windows, which happens to be my application.
      
       - Pat
         http://unattended.sourceforge.net/
      
      In addition, this adds two buggy BIOS workarounds  in the EDD int13
      calls as suggested by Ralf Brown's interrupt list.
      
      I'm also interested in moving this code out of arch/i386/kernel/edd.c and
      include/asm-i386/edd.h, as I believe it is applicable on x86-64 as well.
      However, there's no good place under drivers/ to put edd.c when it's not
      tied to a bus, but to several CPU architectures and their firmwares...
      Maybe a new directory drivers/firmware?
      66b61a5c
    • Andrew Morton's avatar
      [PATCH] wavfront.c needs syscalls.h · e0ed9d75
      Andrew Morton authored
      sound/oss/wavfront.c: In function `wavefront_download_firmware':
      sound/oss/wavfront.c:2524: warning: implicit declaration of function `sys_open'
      sound/oss/wavfront.c:2533: warning: implicit declaration of function `sys_read'
      sound/oss/wavfront.c:2582: warning: implicit declaration of function `sys_close
      e0ed9d75
    • Andrew Morton's avatar
      [PATCH] Fix reading the last block on a bdev · f8ccec6c
      Andrew Morton authored
      From: Chris Mason <mason@suse.com>
      
      This patch fixes a problem we're hitting on ia64 with page sizes > 4k.
      
      When the page size is greater than the block size, and parts of the page
      fall past the end of the device, readpage will fail because
      blkdev_get_block returns -EIO for blocks past i_size.
      
      The attached patch changes blkdev_get_block to return holes when reading
      past the end of the device, which allows us to read that last valid 4k
      block and then fill the rest of the page with zeros.  Writes will still
      fail with -EIO.
      f8ccec6c
    • Andrew Morton's avatar
      [PATCH] Fix rootfs on ramdisk · 6def6a58
      Andrew Morton authored
      From: vda <vda@port.imtp.ilyichevsk.odessa.ua>
      
      Add a missing test for the "root=/dev/ram" kernel boot option.  It's just an
      alias for /dev/ram0, but it worked in 2.4...
      6def6a58
    • Andrew Morton's avatar
      [PATCH] current_is_keventd() speedup · 6551f0aa
      Andrew Morton authored
      From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
      
      current_is_keventd() doesn't need to search across all the CPUs to identify
      itself.
      6551f0aa
    • Andrew Morton's avatar
      [PATCH] Fix and harden validate_mm · 127419b1
      Andrew Morton authored
      From: Andi Kleen <ak@muc.de>
      
      I was debugging some code that corrupted the vma rb lists and for that I
      fixed validate_mm to not be recursive and do some more checks.
      
      It's slower now, but that shouldn't be a problem.
      
      Also make it non static to allow easier checks elsewhere.
      127419b1
    • Andrew Morton's avatar
      [PATCH] fadvise(POSIX_FADV_DONTNEED) fixups · 3745aa40
      Andrew Morton authored
      From: WU Fengguang <wfg@mail.ustc.edu.cn>
      
      - In sys_fadvise64_64(): if the start and/or end offsets do not fall on
        page boundaries, preserve the partial pages.  The thinking here is that it
        is better to preserve needed memory than to not shoot down unneeded memory.
      
      - In invalidate_mapping_pages(): we were invalidating an entire pagevec's
        worth of pages each time around, even if that went beyond the part of the
        file which the caller asked to be invalidated.  Fix that up.
      3745aa40
    • Andrew Morton's avatar
      [PATCH] AMD ELAN Kconfig fix · ddfd8f8d
      Andrew Morton authored
      From: Adrian Bunk <bunk@fs.tum.de>
      
      - remove an MELAN entry that was forgotten in the i386 processor
        selection menu
      
      - s/CONFIG_MELAN/CONFIG_X86_ELAN/ was missing in module.h
      ddfd8f8d
    • Andrew Morton's avatar
      [PATCH] watchdog: moduleparam-patches · 1c272552
      Andrew Morton authored
      From: Wim Van Sebroeck <wim@iguana.be>
      
      Convert last set of watchdog drivers to new moduleparam system.
      1c272552
    • Andrew Morton's avatar
      [PATCH] Remove arbitrary #acl entries limits on ext[23] when reading · 10658a35
      Andrew Morton authored
      From: Andreas Gruenbacher <agruen@suse.de>
      
      Remove the arbitrary limit of 32 ACL entries on ext[23] when reading from
      disk.  This change is backward compatible; we need to have this change in
      to be able to also allow writing big ACLs.
      
      The second patch that removes the ACL entry limit for writes is not
      included.  I don't want to push that patch now, because large ACLs would
      cause 2.4 and current 2.6 kernels to fail.  My plan is to remove the second
      limit later, in a half-year or year or so.
      10658a35
    • Andrew Morton's avatar
      [PATCH] Enable i810 fb on x86-64 · c833cc5a
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      i810fb most likely is needed on x86-64 too because there are Intel chipsets
      for it now.  So far it only linked on i386, fix this.
      c833cc5a
    • Andrew Morton's avatar
      [PATCH] /proc data corruption check · 08194fb2
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      If someone removes a /proc directory which still has subdirectories it will
      lead to very nasty things (dentries remaining on hash chains etc etc etc).
      The BUG_ON in the patch below will catch this nasty situation.
      08194fb2
    • Andrew Morton's avatar
      [PATCH] Remove unneeded unlock in ipc/sem.c · 644a73eb
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      sem_revalidate checks that a semaphore array didn't disappear while the
      code was running without the semaphore array spinlock.  If the array
      disappeared, then it will return without holding a lock.  find_undo calls
      sem_revalidate and then sem_unlock, even if sem_revalidate failed.  The
      sem_unlock call must be removed.
      
      Mingming Cao reported a spinlock deadlock with sysv semaphores.  A
      superflous unlock doesn't explain the deadlock, but it's obviously a bug.
      644a73eb
    • Andrew Morton's avatar
      [PATCH] kbuild: fix usage with directories containing '.o' · 2e83d38a
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      From: Daniel Mack <daniel@zonque.org>, me
      
      modpost unconditionally searched for ".o" assuming this is always the
      suffix of the module.  This fails in two cases:
      
      a) when building external modules where any directory include ".o" in
         the name.  One example is a directory named: .../cvs.alsa.org/...
      
      b) when someone names a kernel directory so it contains ".o".  One
         example is drivers/scsi/aic.ok/...
      
      case b) was triggered by renaming the directory for aic7xxx, and modifying
      Makefile and Kconfig.  This caused make modules to fail.
      2e83d38a
    • Andrew Morton's avatar
      [PATCH] loop setup race fix · 238a43a0
      Andrew Morton authored
      From: Chris Mason <mason@suse.com>
      
      There's a race in loopback setup, it's easiest to trigger with one or more
      procs doing loopback mounts at the same time.  The problem is that
      fs/block_dev.c:do_open() only calls bdev_set_size on the first open.
      Picture two procs:
      
      proc1: mount -o loop file1 mnt1
      proc2: mount -o loop file2 mnt2
      
      proc1                   proc2
      open /dev/loop0                         # bd_openers now 1
      do_open
       bd_set_size(bdev, 0)                   # loop unbound, so bdev size is 0
                              open /dev/loop0 # bd_openers now 2
      loop_set_fd                             # disk capacity now correct, but
      				        # bdev not updated
      mount /dev/loop0 /mnt
      do_open
      
      Because bd_openers != 0 for the last do_open, bd_set_size is not called
      again and a size of 0 is used.  This eventually leads to an oops when the
      loop device is unmounted, because fsync_bdev calls block_write_full_page
      who decides every page on the block device is outside i_size and unmaps
      them.
      
      When ext2 or reiserfs try to sync a metadata buffer, we get an oops on
      because the buffers are no longer mapped.
      
      The patch below changes loop_set_fd and loop_clr_fd to also manipulate the
      size of the block device, which fixes things for me.
      238a43a0
    • Andrew Morton's avatar
      [PATCH] LOOP_CHANGE_FD ioctl · 275da6a3
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      The patch below (written by Al Viro) solves a nasty chicken-and-egg issue
      for operating system installers (well at least anaconda but the problem
      domain is not exclusive to that)
      
      The basic problem is this:
      
      - The small first stage installer locates the image file of the second
        stage installer (which has X and all the graphical stuff); this image can
        be on the same CD, but it can come via NFS, http or ftp or ...  as well.
      
      - The first stage installer loop-back mounts this image and gives control
        to the second stage installer by calling some binary there.
      
      - The graphical installer then asks the user all those questions and
        starts installing packages.  Again the packages can come from the CD but
        also from NFS or http or ...
      
      Now in case of a CD install, once all requested packages from the first CD
      are installed, the installer wants to unmount and eject the CD and prompt
      the user to put CD 2 in.......  EXCEPT that the unmount can't work since
      the installer is actually running from a loopback mount of this cd.
      
      The solution is a "LOOP_CHANGE_FD" ioctl, where basically the installer
      copies the image to the harddisk (which can only be done late since only
      late the target harddisk is mkfs'd) and then magically switches the backing
      store FD from underneath the loop device to the one on the target harddisk
      (and thus unbusying the CD mount).
      
      This is obviously only allowed if the size of the new image is identical
      and if the loop image is read-only in the first place.  It's the
      responsibility of root to make sure the contents is the same (but that's of
      the give-root-enough-rope kind)
      275da6a3
    • Andrew Morton's avatar
      [PATCH] kbuild: Cause `make clean' to remove more files · 0c8846a5
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      Make the difference between 'make clean' and 'make distclean/mrproper' more
      explicit.
      
      make clean now removes all generated files except .config* and .version.
      The result is much easier to understand now.
      
      make clean deletes all generated files (except .config* and .version).
      make mrproper deletes configuration and all temporary files left by patch,
      editors and the like.
      
      Example output:
      > make mrproper
        CLEAN   init
        CLEAN   usr
        CLEAN   scripts/kconfig
        CLEAN   scripts
        CLEAN   .tmp_versions include/config
        CLEAN   include/asm-i386/asm_offsets.h include/linux/autoconf.h include/linux/version.h include/asm .tmp_versions
        CLEAN   .version .config
      
      Form the list of files/directories deleted during make clean, removed all
      references that is no longer relevant for the current kernel.
      0c8846a5
    • Andrew Morton's avatar
      [PATCH] Fix elf mapping of the zero page · 22a5dad8
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      Using PAGE_SIZE rather than 4096 so that mmap() granularity is honored by
      whatever non-i386 architectures use MMAP_PAGE_ZERO.
      22a5dad8