1. 18 Feb, 2004 39 commits
    • Andrew Morton's avatar
      [PATCH] kNFSd: Fix possible scheduling_while_atomic in cache.c · 16b82dca
      Andrew Morton authored
      From: NeilBrown <neilb@cse.unsw.edu.au>
      
      We currently call cache_put, which can schedule(), under a spin_lock.  This
      patch moves that call outside the spinlock.
      16b82dca
    • Andrew Morton's avatar
      [PATCH] #if versus #ifdef cleanup · c65febbb
      Andrew Morton authored
      From: Valdis.Kletnieks@vt.edu
      
      15 changes of #if to #ifdef and 2 places CONFIG_FOO should be
      defined(CONFIG_FOO).  This gets rid of spurious warnings if you build with
      "-Wundef" so you get a warning if you have a preprocessor command like:
      
      #if CONFIG_ETRAX_DS1302_RSTBIT == 27
      
      and you'll be told if it's substituting a zero rather than silent
      weirdness and unexpected code generation.
      c65febbb
    • Andrew Morton's avatar
      [PATCH] MIPS: New 2.6 serial drivers · b7df53b3
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Three new MIPS-specific serial drivers.  ip22.c is derived from the sparc
      zilog driver; guess we should write a generic Zilog driver somewhen ...
      b7df53b3
    • Andrew Morton's avatar
      [PATCH] Enable coredumps > 2GB · 95b387a4
      Andrew Morton authored
      From: Andi Kleen <ak@muc.de>
      
      Some x86-64 users were complaining that coredumps >2GB don't work.
      
      This will enable large coredump for everybody.  Apparently the 32bit
      gdb/binutils cannot handle them, but I hear the binutils people are working
      on fixing that.  I doubt it will harm people - unreadable coredumps are not
      worse than no coredump and it won't make any difference in space usage if
      you get a 1.99GB or a 2.5GB coredump.  So just enable it unconditionally.
      If it should be really a problem for 32bit the rlimit defaults in
      resource.h could be changed.
      
      For file systems that don't support O_LARGEFILE you should just get an
      truncated coredumps for big address spaces.
      95b387a4
    • Andrew Morton's avatar
      [PATCH] devfs: race fixes and cleanup · bf98c406
      Andrew Morton authored
      From: Andrey Borzenkov <arvidjaar@mail.ru>
      
      - use struct nameidata in devfs_d_revalidate_wait to detect when it is
        called without i_sem hold; take i_sem on parent in this case.  This
        prevents both deadlock with devfs_lookup by allowing it to drop i_sem
        consistently and oops in d_instantiate by ensuring that it always runs
        protected
      
      - remove dead code that deals with major number allocation.  The only
        remaining user was devfs itself and patch changes it to
      
      - use register_chardev to get device number for internal /dev/.devfsd and
        /dev/.statd.
      
      - remove dead auto allocation flag as well
      
      - remove code that does module get on dev open - it is handled by fops_get.
         Use init_special_inode consistently
      
      - get rid of struct cdev_type and bdev_type - both have just single dev_t
        now
      bf98c406
    • Andrew Morton's avatar
      [PATCH] snprintf fixes · 01d1a791
      Andrew Morton authored
      From: Juergen Quade <quade@hsnr.de>
      
      Lots of places in the kernel are using [v]snprintf wrongly: they assume it
      returns the number of characters copied.  It doesn't.  It returns the
      number of characters which _would_ have been copied had the buffer not been
      filled up.
      
      So create new functions vscnprintf() and scnprintf() which have the
      expected (sane) semaptics, and migrate callers over to using them.
      01d1a791
    • Andrew Morton's avatar
      [PATCH] bd_set_size i_size handling · 53b15b86
      Andrew Morton authored
      We need to hold i_sem while running i_size_write().  But that seems like a
      lot of fuss and deadlock potential.  So just write the dang thing.
      53b15b86
    • Andrew Morton's avatar
      [PATCH] Mark intermezzo as broken · eaaec5b5
      Andrew Morton authored
      The NGROUPS changes broke it, and we're not sure how to fixit, and nobody
      appears to be working on or testing intermezzo.
      eaaec5b5
    • Andrew Morton's avatar
      [PATCH] NGROUPS 2.6.2rc2 + fixups · a937b06e
      Andrew Morton authored
      From: Tim Hockin <thockin@sun.com>,
            Neil Brown <neilb@cse.unsw.edu.au>,
            me
      
      New groups infrastructure.  task->groups and task->ngroups are replaced by
      task->group_info.  Group)info is a refcounted, dynamic struct with an array
      of pages.  This allows for large numbers of groups.  The current limit of
      32 groups has been raised to 64k groups.  It can be raised more by changing
      the NGROUPS_MAX constant in limits.h
      a937b06e
    • Andrew Morton's avatar
      [PATCH] bonding alias revert and documentation fix · 7e594425
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Jeff Garzik disliked the bonding driver knowing it was called "bond0".
      Remove that alias, and revert documentation.
      7e594425
    • Andrew Morton's avatar
      [PATCH] add some more MODULE_ALIASes · 69b848dd
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      New MODULE_ALIASes in:
      1) arch/i386/kernel/microcode.c
      2) drivers/char/genrtc.c
      3) drivers/ide/ide-tape.c
      4) drivers/net/bonding/bond_main.c
      5) drivers/net/bsd_comp.c
      6) drivers/net/ppp_deflate.c
      7) drivers/net/ppp_generic.c
      69b848dd
    • Andrew Morton's avatar
      [PATCH] Documentation: remove /etc/modules.conf refs · bf5e91d7
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Someone complained about the number of references to /etc/modules.conf in
      the documentation.  While fixing them up (and examples where changed),
      removed those which are redundant due to MODULE_ALIAS.
      bf5e91d7
    • Andrew Morton's avatar
      [PATCH] AMD Elan is a different subarch · 4aef2132
      Andrew Morton authored
      From: Adrian Bunk <bunk@fs.tum.de>
      
      - AMD Elan is a different subarch, you can't configure a kernel that runs
        on both the AMD Elan and other i386 CPUs
      
      - added optimizing CFLAGS for the AMD Elan
      4aef2132
    • Andrew Morton's avatar
      [PATCH] gcc 2.95 supports -march=k6 (no need for check_gcc) · b26c400f
      Andrew Morton authored
      From: Adrian Bunk <bunk@fs.tum.de>
      
      gcc 2.95 supports -march=k6 (no need for check_gcc)
      b26c400f
    • Andrew Morton's avatar
      [PATCH] add Pentium M and Pentium-4 M options · 53720dcf
      Andrew Morton authored
      From: Adrian Bunk <bunk@fs.tum.de>
      
      add Pentium M and Pentium-4 M options:
      
      - add MPENTIUMM (equivalent to PENTIUMIII except for a bigger
        X86_L1_CACHE_SHIFT)
      
      - document that MPENTIUM4 is the right choice for a Pentium-4 M
      53720dcf
    • Andrew Morton's avatar
      [PATCH] Limit hashtable sizes · 7453596a
      Andrew Morton authored
      From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      
      The issue of exceedingly large hash tables has been discussed on the
      mailing list a while back, but seems to slip through the cracks.
      
      What we found is it's not a problem for x86 (and most other
      architectures) because __get_free_pages won't be able to get anything
      beyond order MAX_ORDER-1 (10) which means at most those hash tables are
      4MB each (assume 4K page size).  However, on ia64, in order to support
      larger hugeTLB page size, the MAX_ORDER is bumped up to 18, which now
      means a 2GB upper limits enforced by the page allocator (assume 16K page
      size).  PPC64 is another example that bumps up MAX_ORDER.
      
      Last time I checked, the tcp ehash table is taking a whooping (insane!)
      2GB on one of our large machine.  dentry and inode hash tables also take
      considerable amount of memory.
      
      Setting the size of these tables is difficult: they need to be constrained on
      many-zone ia64 machines, but this could cause significant performance
      problems when there are (for example) 100 million dentries in cache.
      Large-memory machines which do not slice that memory up into huge numbers of
      zones do not need to run the risk of this slowdown.
      
      So the sizing algorithms remain essentially unchanged, and boot-time options
      are provided which permit the tables to be scaled down.
      7453596a
    • Andrew Morton's avatar
      [PATCH] Use CPU_UP_PREPARE properly · 86c1b9ae
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      The cpu hotplug code actually provides two notifiers: CPU_UP_PREPARE
      which preceeds the online and can fail, and CPU_ONLINE which can't.
      
      Current usage is only done at boot, so this distinction doesn't
      matter, but it's a bad example to set.  This also means that the
      migration threads do not have to be higher priority than the
      others, since they are ready to go before any CPU_ONLINE callbacks
      are done.
      
      This patch is experimental but fairly straight foward: I haven't been
      able to test it since extracting it from the hotplug cpu code, so it's
      possible I screwed something up.
      86c1b9ae
    • Andrew Morton's avatar
      [PATCH] Remove More Unneccessary CPU Notifiers · 79caa7d5
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Three more removed CPU notifiers extracted from the hotplug CPU patch.
      
      kernel/softirq.c: the tasklet cpu prepration callback is useless:
      the vectors are already initialized to NULL.  Even with the hotplug
      CPU patches, they're of little or no use.
      
      fs/buffer.c: once again, they are already initialized to zero.
      
      mm/page_alloc.c: once again, already initialized to zero.
      79caa7d5
    • Andrew Morton's avatar
      [PATCH] Minor workqueue.c cleanup · d01feda8
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Move duplicated code to __queue_work(), and don't set the CPU for
      queue_delayed_work() until the timer goes off.  The second one only has an
      effect on CONFIG_HOTPLUG_CPU where the CPU goes down and the timer goes off
      on a different CPU than it was scheduled on.
      d01feda8
    • Andrew Morton's avatar
      [PATCH] Remove kstat cpu notifiers · 35651c8c
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Some well-meaning person put a notifier in for CPUs to update the kstat
      structures in sched.c.  However, it does nothing, and even with the full
      hotplug CPU patch, it still does nothing.
      
      Simple counters very rarely need anything done when CPUs come up or go
      down.  If you have per-cpu caches, or per-cpu threads, you need to do
      something.  But very rarely for stats.
      35651c8c
    • Andrew Morton's avatar
      [PATCH] kthread primitive · 933ba102
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      These two patches provide the framework for stopping kernel threads to
      allow hotplug CPU.  This one just adds kthread.c and kthread.h, next
      one uses it.
      
      Most importantly, adds a Monty Python quote to the kernel.
      
      Details:
      
      The hotplug CPU code introduces two major problems:
      
      1) Threads which previously never stopped (migration thread,
         ksoftirqd, keventd) have to be stopped cleanly as CPUs go offline.
      2) Threads which previously never had to be created now have
         to be created when a CPU goes online.
      
      Unfortunately, stopping a thread is fairly baroque, involving memory
      barriers, a completion and spinning until the task is actually dead
      (for example, complete_and_exit() must be used if inside a module).
      
      There are also three problems in starting a thread:
      1) Doing it from a random process context risks environment contamination:
         better to do it from keventd to guarantee a clean environment, a-la
         call_usermodehelper.
      2) Getting the task struct without races is a hard: see kernel/sched.c
         migration_call(), kernel/workqueue.c create_workqueue_thread().
      3) There are races in starting a thread for a CPU which is not yet
         online: migration thread does a complex dance at the moment for
         a similar reason (there may be no migration thread to migrate us).
      
      Place all this logic in some primitives to make life easier:
      kthread_create() and kthread_stop().  These primitives require no
      extra data-structures in the caller: they operate on normal "struct
      task_struct"s.
      
      Other changes:
      
      - Expose keventd_up(), as keventd and migration threads will use kthread to
        launch, and kthread normally uses workqueues and must recognize this case.
      
      - Kthreads created at boot before "keventd" are spawned directly.  However,
        this means that they don't have all signals blocked, and hence can be
        killed.  The simplest solution is to always explicitly block all signals in
        the kthread.
      
      - Change over the migration threads, the workqueue threads and the
        ksoftirqd threads to use kthread.
      
      - module.c currently spawns threads directly to stop the machine, so a
        module can be atomically tested for removal.
      
      - Unfortunately, this means that the current task is manipulated (which
        races with set_cpus_allowed, for example), and it can't set its priority
        artificially high.  Using a kernel thread can solve this cleanly, and with
        kthread_run, it's simple.
      
      - kthreads use keventd, so they inherit its cpus_allowed mask.  Unset it.
        All current users set it explicity anyway, but it's nice to fix.
      
      - call_usermode_helper uses keventd, so the process created inherits its
        cpus_allowed mask.  Unset it.
      
      - Prevent errors in boot when cpus_possible() contains a cpu which is not
        online (ie.  a cpu didn't come up).  This doesn't happen on x86, since a
        boot failure makes that CPU no longer possible (hacky, but it works).
      
      - When the cpu fails to come up, some callbacks do kthread_stop(), which
        doesn't work without keventd (which hasn't started yet).  Call it directly,
        and take care that it restores signal state (note: do_sigaction does a
        flush on blocked signals, so we don't need to repeat it).
      933ba102
    • Andrew Morton's avatar
      [PATCH] ACPI PM timer · ad77865c
      Andrew Morton authored
      From: Dominik Brodowski <linux@dominikbrodowski.de>,
            John Stultz <johnstul@us.ibm.com>,
            Dmitry Torokhov
      
      Add the ACPI Powermanagement Timer as x86 kernel timing source.  Unlike the
      Time Stamp Counter, it is a reliable timing source which does not get
      affected by aggressive powermanagement features like CPU frequency scaling.
      
      Some ideas and some code are based on Arjan van de Ven's implementation for
      2.4, and on R.  Byron Moore's drivers/acpi/hardware/hwtimer.c.
      
      
      We also replace the loop based delay_pmtmr with a TSC based delay_pmtmr,
      which resolves a number of issues caused by the loop based delay.  Unsynced
      TSCs as well frequency changing TSCs will effect the length of __delay(), but
      it seems this method works best.
      ad77865c
    • Andrew Morton's avatar
      [PATCH] loop: remove redundant initialisation · ee6afa31
      Andrew Morton authored
      From: "Yury V. Umanets" <umka@namesys.com>
      
      This removes a redundant assignment in loop.
      ee6afa31
    • Andrew Morton's avatar
      [PATCH] loop.c doesn't fail init gracefully · 685eba2c
      Andrew Morton authored
      From: BlaisorBlade <blaisorblade_spam@yahoo.it>
      
      loop_init doesn't fail gracefully for two reasons:
      
      1) If initialization of loop driver fails, we have an call to
         devfs_add("loop") without any devfs_remove; I add that.
      
      2) On lwn.net 2.6 kernel docs, Jonathan Corbet says: "If you are calling
         add_disk() in your driver initialization routine, you should not fail
         the initialization process after the first call."
      
      So I make loop.c conform to this request by moving add_disk after all
      memory allocations.
      685eba2c
    • Andrew Morton's avatar
      [PATCH] loop: BIO handling fix · 56b63427
      Andrew Morton authored
      From: Ben Slusky <sluskyb@paranoiacs.org>
      
      One more patch --- this fixes a minor bio handling bug in the filebacked
      code path. I'd fixed it incidentally in the loop-recycle patch.
      
      I don't think you could actually see damage from this bug unless you
      run device mapper on top of loop devices, but still this is the correct
      behavior.
      56b63427
    • Andrew Morton's avatar
      [PATCH] remove useless highmem bounce from loop/cryptoloop · 3185e663
      Andrew Morton authored
      From: Ben Slusky <sluskyb@paranoiacs.org>
      
      The attached patch changes the loop device transfer functions (including
      cryptoloop transfers) to accept page/offset pairs instead of virtual
      addresses, and removes the redundant kmaps in do_lo_send, do_lo_receive,
      and loop_transfer_bio. Per Andrew Morton's request a while back.
      3185e663
    • Andrew Morton's avatar
      [PATCH] loop: remove the bio remapping capability · a34c0ae9
      Andrew Morton authored
      This patch removes the loop feature wherein we remap BIOs for block-backed
      loop.  So file-backed and block-backed loop are handled identically.
      
      It cleans up the code a lot and fixes the low-on-memory lockups which
      block-backed loop currently suffers.
      
      What we lose is the journalling ordering guarantees which
      exts-on-loop-on-blockdev had.  But dm-crypt provides that.
      a34c0ae9
    • Andrew Morton's avatar
      [PATCH] ppc64: iseries IRQ fix · 749e32b6
      Andrew Morton authored
      From: Stephen Rothwell <sfr@canb.auug.org.au>
      
      This patch lets 2.6.3-rc4 build and boot on an PPC64 iSeries box (at least
      for my configuration).  The veth.o bit in the networking Makefile got there
      by accident and should be removed anyway ...
      
      There is more to make it work properly (note the "Temporary hack"), but
      this gets us closer.
      749e32b6
    • Andrew Morton's avatar
      [PATCH] ppc64: fix debugger() warnings · 7f4afd7a
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      Fix compile warnings and add some type safety to debugger macros.
      7f4afd7a
    • Andrew Morton's avatar
      [PATCH] ppc64: fix saved_command_line/cmd_line lengths · 06c3f1d6
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      cmd_line was twice the size of saved_command_line but we did a strcpy from
      the larger into the smaller.  Create COMMAND_LINE_SIZE and use it.
      06c3f1d6
    • Andrew Morton's avatar
      [PATCH] ppc64: Fix prom.c warnings · 2115cc34
      Andrew Morton authored
      arch/ppc64/kernel/prom.c:200: warning: missing braces around initializer
      arch/ppc64/kernel/prom.c:200: warning: (near initialization for `hmt_thread_data[0]')
      arch/ppc64/kernel/prom.c: In function `prom_hold_cpus':
      arch/ppc64/kernel/prom.c:1090: warning: implicit declaration of function `_get_PIR'
      2115cc34
    • Andrew Morton's avatar
      [PATCH] msg.h needs list.h · 5434d62a
      Andrew Morton authored
      msg.h uses list_head.  (I'm not sure what config actually required this, but
      it is legit).
      5434d62a
    • Andrew Morton's avatar
      [PATCH] Remove BDEV_RAW and friends · b23c4682
      Andrew Morton authored
      These no longer do anything.
      
      This patch changes modules API.  It was acked by Arjan@RH and Hubert@Suse.
      b23c4682
    • Andrew Morton's avatar
      [PATCH] early printk tweaks · 80c085f9
      Andrew Morton authored
      - Use __pa() around the VGA base address: more friendly for the 4g/4g split.
      
      - Use cpu_relax() rather than open-coding rep_nop().
      
      - Default to 9600 baud
      
      - Move documentation to Documentation/kernel-parameters.txt
      
      - Make CONFIG_EARLY_PRINTK disableable if CONFIG_EMBEDDED
      80c085f9
    • Andrew Morton's avatar
      [PATCH] ia32 early printk · 6b2672bf
      Andrew Morton authored
      From: Andi Kleen <ak@muc.de>
      
      Implement VGA and serial early printk on x86.  We just include the x86_64
      version.
      6b2672bf
    • Andrew Morton's avatar
      [PATCH] Fix for PPP activ/passiv filter · cf4389cb
      Andrew Morton authored
      From: Karsten Keil <kkeil@suse.de>
      
      I found a bug in the PPPIOCSPASS PPPIOCSACTIVE IOCTL implementation in
      kernel 2.5/2.6.
      
      The current pppd code use a empty filter (uprog.len=0) to detach the filter
      in the kernel, but this code was removed in 2.5.71 while fixing a compiler
      warning.
      
      Here the new patch, also with better limit checking.
      
      The second patch check for flen == 0 in the filter check too, since later
      in this code a filter[flen - 1] access is done, which is not so funny with
      flen 0.  Maybe it's not really needed anymore, since with the first patch
      it would not longer called with flen=0.
      
      paulus says:
      
          It looks correct.  Previously we had (and in 2.4 we still have)
      
              if (uprog.len > 0 && uprog.len < 65536) {
      		...
      
          which gave warnings since uprog.len is unsigned short.  So someone
          decided that both parts of the condition were redundant.
      cf4389cb
    • Andrew Morton's avatar
      [PATCH] i4l: hisax deadlock fix · 93ab17e8
      Andrew Morton authored
      From: Karsten Keil <kkeil@suse.de>
      
      This patch fix a deadlock in HiSax (reported from David Woodhouse
      <dwmw2@infradead.org>).  upper layer was called back while holding the card
      lock fix is to move the wakeup call into BH handler to avoid direct
      callbacks.
      93ab17e8
    • Andrew Morton's avatar
      [PATCH] ISDN udpate · bb257be4
      Andrew Morton authored
      From: Karsten Keil <kkeil@suse.de>
      
      - new port of 2.4 I4L core to 2.6
      
      - new port of 2.4 I4L HiSax to 2.6
      
      - fixes for I4L CAPI subsystem to make it stable in 2.6
      
      - fix parameter handling of AVM ISA cards (calle)
      
      - cleanup ISDN config variables
      
      - SMP in act2000 and pcbit driver
      
      - remove check_region in act2000
      
      - mark hysdn, isdnloop and divert as BROKEN_ON_SMP
      bb257be4
    • Linus Torvalds's avatar
      Merge bk://linux-dj.bkbits.net/cpufreq · f7d6fe84
      Linus Torvalds authored
      into ppc970.osdl.org:/home/torvalds/v2.5/linux
      f7d6fe84
  2. 19 Feb, 2004 1 commit