1. 15 May, 2007 21 commits
    • Bartlomiej Zolnierkiewicz's avatar
      pdc202xx_new: use ide_tune_dma() · 7f86723a
      Bartlomiej Zolnierkiewicz authored
      * remove code enabling IORDY and prefetch from config_chipset_for_dma(),
        as the comment states it has no real effect because these settings are
        overriden when the PIO mode is set (and for this driver ->autotune == 1
        so PIO mode is always programmed)
      
      * use ide_tune_dma() in pdcnew_config_drive_xfer_rate() and remove no longer
        needed config_chipset_for_dma()
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7f86723a
    • Bartlomiej Zolnierkiewicz's avatar
      alim15x3: use ide_tune_dma() · 38ff8a74
      Bartlomiej Zolnierkiewicz authored
      Use ide_tune_dma() in ali15x3_config_drive_for_dma() and remove all the open
      coded DMA tuning code and also config_chipset_for_dma().  Set ->atapi_dma flag
      correctly in init_hwif_common_ali15x3() so ide_tune_dma() can take care of
      checking if ATAPI DMA is allowed and remove open coded ATAPI DMA check from
      ali15x3_config_drive_for_dma().
      
      There should be no functionality changes caused by this patch.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      38ff8a74
    • Bartlomiej Zolnierkiewicz's avatar
      sis5513: PIO mode setup fixes · 6b8cf772
      Bartlomiej Zolnierkiewicz authored
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to program PIO5 by config_art_rwp_pio() could result in incorrect PIO
        timings being programmed and possibly the data corruption (for < ATA100
        family chipsets PIO0 timings were used, for ATA100 and ATA100a - the random
        content of test1 variable was used, for ATA133 - MWDMA0 timings were used)
      
      * BUG() in sis5513_tune_chipset() if somebody tries to force unsupported PIO5,
        also cleanup this function a bit while at it
      
      * add comment about PIO0 timings for < ATA100 family chipsets
      
      * remove open-coded best PIO mode selection from config_art_rwp_pio(),
        it contained numerous bugs:
      
        - it didn't check for validity of id->eide_pio_modes and id->eide_pio_iordy
          before using them
      
        - it tried to found out maximum PIO mode basing on minimum IORDY cycle time
          (moreover wrong cycle times were used for PIO1/5)
      
        - it was overriding PIO blacklist and conservative PIO "downgrade" done
          by ide_get_best_pio_mode()
      
      * use sis5513_tune_drive() instead of config_art_rwp_pio()
        in sis5513_config_xfer_rate() so the correct PIO mode is also set
        on drive even if the device is not IORDY/DMA capable
      
      * config_art_rwp_pio() was always setting the best possible mode and not
        the wanted one - fix it and move ide_get_best_pio_mode() call to
        config_chipset_for_pio()
      
      * don't use ide_find_best_mode() in config_chipset_for_pio(), it was being
        overriden by config_art_rwp_pio() for the host timings anyway + we need to
        set the same PIO mode on the device and the host
      
      * pass correct "pio" argument (255 instead of 5) to sis5513_tune_drive() call
        in sis5513_config_xfer_rate() so the best PIO mode is set on the drive
        and not PIO4
      
      * rename sis5513_tune_drive() to sis5513_tuneproc()
        and config_chipset_for_pio() to sis5513_tune_driver()
      
      * bump driver version
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6b8cf772
    • Bartlomiej Zolnierkiewicz's avatar
      serverworks: PIO mode setup fixes · 9445de76
      Bartlomiej Zolnierkiewicz authored
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to program PIO5 by svwks_tune_chipset() could result in incorrect PIO
        timings being programmed and possibly the data corruption (it seems that
        the minimum possible values were used but I lack the datasheets to be sure)
      
      * select best PIO mode in svwks_tune_drive() and not in svwks_tune_chipset()
        when doing PIO autotuning (pio == 255)
      
      * don't try to tune PIO in config_chipset_for_dma() as ide_dma_enable() could
        return 1 if DMA was previously enabled (svwks_config_drive_xfer_rate()
        takes care of PIO tuning if no suitable DMA mode is found)
      
      * remove config_chipset_for_pio() and use svwks_tune_drive() instead,
        config_chipset_for_pio() contained numerous bugs when selecting PIO mode
        (luckily it was only used for devices limited to PIO by capabilities/BIOS):
      
        - it didn't check for validity of id->eide_pio_modes and id->eide_pio_iordy
          before using them
      
        - it tried to found out maximum PIO mode basing on minimum IORDY cycle time
          (moreover wrong cycle times were used for PIO0/1/5)
      
        - it was overriding PIO blacklist and conservative PIO "downgrade" done
          by ide_get_best_pio_mode()
      
        - if the max drive PIO was PIO5 then XFER_PIO_0/XFER_PIO_SLOW was selected
          (XFER_PIO_SLOW is not supported by svwks_tune_chipset() so the result
           was the same as if using XFER_PIO_5 => wrong PIO timings were set)
      
        - it was overriding drive->current_speed
      
      * bump driver version
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9445de76
    • Bartlomiej Zolnierkiewicz's avatar
      pdc202xx_old: rewrite mode programming code (v2) · 4fce3164
      Bartlomiej Zolnierkiewicz authored
      This patch is based on the documentation (I would like to thank Promise
      for it) and also partially on the older vendor driver.
      
      Rewrite mode programming code:
      
      * disable 66MHz clock in pdc202xx_tune_chipset() so it is correctly disabled
        even if both devices on the channel are not DMA capable and after reset
      
      * enable/disable IORDY and PREFETCH bits in pdc202xx_tune_chipset()
        as they need to be setup correctly also for PIO only devices, plus IORDY
        wasn't disabled for non-IORDY devices and PREFETCH wasn't disabled for
        ATAPI devices
      
      * remove dead code for setting SYNC_ERDDY_EN bits from config_chipset_for_dma()
        (driver sets ->autotune to 1 so PIO modes are always programmed => lower
         nibble of register A never equals 4 => "chipset_is_set" is always true)
      
      * enable PIO mode programming for all ATAPI devices
        (it was limited to ->media == ide_cdrom devices)
      
      * remove extra reads of registers A/B/C, don't read register D et all
      
      * do clearing / programming of registers A/B/C in one go
        (gets rid of extra PCI config space read/write cycle)
      
      * set initial values of drive_conf/AP/BP/CP variables to zero
        (paranoia for the case when PCI reads fail)
      
      * remove XFER_UDMA6 to XFER_UDMA5 remapping case - it can't happen
        (ide_rate_filter() takes care of it)
      
      * fix XFER_MW_DMA0 timings (they were overclocked, use the official ones)
      
      * fix bitmasks for clearing bits of register B:
      
        - when programming DMA mode bit 0x10 of register B was cleared which
          resulted in overclocked PIO timing setting (iff PIO0 was used)
      
        - when programming PIO mode bits 0x18 weren't cleared so suboptimal
          timings were used for PIO1-4 if PIO0 was previously set (bit 0x10)
          and for PIO0/3/4 if PIO1/2 was previously set (bit 0x08)
      
      * add FIXME comment about missing locking for 66MHz clock register
      
      Also while at it:
      
      * remove unused defines
      
      * do a few cosmetic / CodingStyle fixes
      
      * bump driver version
      
      v2:
      * in pdc202xx_tune_chipset() the old content of drive configuration
        registers is used only by the debugging code so cover "drive_conf"
        PCI registers read by #if PDC202XX_DEBUG_DRIVE_INFO
        (Noticed by Sergei Shtylyov)
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4fce3164
    • Jens Axboe's avatar
      ll_rw_blk: fix gcc 4.2 warning on current_io_context() · f653c34d
      Jens Axboe authored
      current_io_context() is both static and exported with EXPORT_SYMBOL().
      As there are no users outside of ll_rw_blk.c itself, just kill the
      export.
      
      Problem reported by Martin Michlmayr <tbm@cyrius.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f653c34d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband · de7860c3
      Linus Torvalds authored
      * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
        IPoIB/cm: Optimize stale connection detection
        IB/mthca: Set cleaned CQEs back to HW ownership when cleaning CQ
        IB/mthca: Fix posting >255 recv WRs for Tavor
        RDMA/cma: Add check to validate that cm_id is bound to a device
        RDMA/cma: Fix synchronization with device removal in cma_iw_handler
        RDMA/cma: Simplify device removal handling code
        IB/ehca: Disable scaling code by default, bump version number
        IB/ehca: Beautify sysfs attribute code and fix compiler warnings
        IB/ehca: Remove _irqsave, move #ifdef
        IB/ehca: Fix AQP0/1 QP number
        IB/ehca: Correctly set GRH mask bit in ehca_modify_qp()
        IB/ehca: Serialize hypervisor calls in ehca_register_mr()
        IB/ipath: Shadow the gpio_mask register
        IB/mlx4: Fix uninitialized spinlock for 32-bit archs
        mlx4_core: Remove unused doorbell_lock
        net: Trivial MLX4_DEBUG dependency fix.
      de7860c3
    • Christoph Lameter's avatar
      SLUB: CONFIG_LARGE_ALLOCS must consider MAX_ORDER limit · cfbf07f2
      Christoph Lameter authored
      Take MAX_ORDER into consideration when determining KMALLOC_SHIFT_HIGH.
      Otherwise we may run into a situation where we attempt to create general
      slabs larger than MAX_ORDER.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cfbf07f2
    • Jeremy Fitzhardinge's avatar
      i386: fix voyager build · 6a3ee3d5
      Jeremy Fitzhardinge authored
      This adds an smp_ops for voyager, and hooks things up appropriately.  This is
      the first baby-step to making subarch runtime switchable.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6a3ee3d5
    • Jeremy Fitzhardinge's avatar
      i386: move common parts of smp into their own file · 297d9c03
      Jeremy Fitzhardinge authored
      Several parts of kernel/smp.c and smpboot.c are generally useful for other
      subarchitectures and paravirt_ops implementations, so make them available for
      reuse.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Acked-by: default avatarChris Wright <chrisw@sous-sol.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      297d9c03
    • Prarit Bhargava's avatar
      Remove cpu hotplug defines for __INIT & __INITDATA · 838c4118
      Prarit Bhargava authored
      After examining what was checked in and the code base I discovered that most
      of 86c0baf1 wasn't necessary anymore....
      
      So here's a patch that reverts the last part of that changeset:
      
      Revert part of 86c0baf1.
      
      The kernel has moved forward to a state where the original change is not
      necessary.  After porting forward, this final version of the patch was
      applied and broke non-x86 architectures.
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      838c4118
    • Stephen Rothwell's avatar
      Revert "MAINTAINERS: remove invalid list address for TPM" · 3bd2aad2
      Stephen Rothwell authored
      This reverts commit b6d1c9a4.
      
      Others tell me that this address has worked for them, so I can only
      assume that I hit a glitch in the sourceforge mail system.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Kylene Hall <kjhall@us.ibm.com>
      Cc: Marcel Selhorst <tpm@selhorst.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3bd2aad2
    • Thomas Gleixner's avatar
      clocksource: fix lock order in the resume path · 8f89441b
      Thomas Gleixner authored
      lockdep complains about the lock nesting of clocksource and watchdog lock
      in the resume path.
      
      Change the resume marker to a bit operation and remove the lock from this
      path.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8f89441b
    • Geert Uytterhoeven's avatar
      m68k: implement __clear_user() · 3c46bdca
      Geert Uytterhoeven authored
      m68k: implement __clear_user(), which is needed by fs/signalfd.c
      
      Since we always let the MMU do all checking, clear_user() and __clear_user()
      are identical. The old clear_user() is renamed to __clear_user() for
      consistency.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c46bdca
    • Simon Horman's avatar
      alpha: fix hard_smp_processor_id compile error · 0fcdf96c
      Simon Horman authored
      "Remove hardcoding of hard_smp_processor_id on UP systems",
      2f4dfe20 in Linus' tree, moved
      the definition of hard_smp_processor_id linux/smp.h to asm/smp.h
      for UP systems. This causes a regression on Alpha.
      
      cc1: warnings being treated as errors
      arch/alpha/kernel/setup.c: In function 'setup_arch':
      arch/alpha/kernel/setup.c:506: warning: implicit declaration of function 'hard_smp_processor_id'
      make[1]: *** [arch/alpha/kernel/setup.o] error 1
      make: *** [arch/alpha/kernel] error 2
      
      By including asm/smp.h non-conditionally in asm/mmu_context.h
      the problem appears to be resolved.
      
      Cc: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0fcdf96c
    • Yoshinori Sato's avatar
      h8300 atomic.h update · b67405bb
      Yoshinori Sato authored
      add atomic_sub_and_test define.
      Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b67405bb
    • Paul Mundt's avatar
      nommu: add ioremap_page_range() · 218f0aae
      Paul Mundt authored
      lib/ioremap.c is presently only built in if CONFIG_MMU is set.  While this
      is reasonable, platforms that support both CONFIG_MMU=y or n need to be
      able to call in to this regardless.
      
      As none of the current nommu platforms do anything special with ioremap(),
      we assume that it's always successful.
      
      This fixes the SH-4 build with CONFIG_MMU=n.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      218f0aae
    • Davide Libenzi's avatar
      epoll: move kfree inside ep_free · f0ee9aab
      Davide Libenzi authored
      Move the kfree() call inside the ep_free() function.
      Signed-off-by: default avatarDavide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f0ee9aab
    • Davide Libenzi's avatar
      epoll: fix some comments · 67647d0f
      Davide Libenzi authored
      Fixes some epoll code comments.
      Signed-off-by: default avatarDavide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      67647d0f
    • Davide Libenzi's avatar
      epoll locks changes and cleanups · c7ea7630
      Davide Libenzi authored
      Changes the rwlock to a spinlock, and drops the use-count variable.
      Operations are always bound by the mutex now, so the use-count is no more
      needed.  For the same reason, the rwlock can become a simple spinlock.
      Signed-off-by: default avatarDavide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c7ea7630
    • Davide Libenzi's avatar
      fix epoll single pass code and add wait-exclusive flag · d47de16c
      Davide Libenzi authored
      Fixes the epoll single pass code.  During the unlocked event delivery (to
      userspace) code, the poll callback can re-issue new events, and we must
      receive them correctly.  Since we loop in a lockless fashion, we want to be
      O(nready), and we don't want to flash on/off the spinlock for every event, we
      have the poll callback to use a secondary list to queue events while we're
      inside the event delivery loop.  The rw_semaphore has been turned into a
      mutex.  This patch also adds the wait-exclusive flag, as suggested by Davi
      Arnaut.
      Signed-off-by: default avatarDavide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d47de16c
  2. 14 May, 2007 19 commits