Skip to content
  1. Oct 20, 2007
  2. Oct 19, 2007
    • Ingo Molnar's avatar
      x86: fix global_flush_tlb() bug · 9a24d04a
      Ingo Molnar authored
      While we were reviewing pageattr_32/64.c for unification,
      Thomas Gleixner noticed the following serious SMP bug in
      global_flush_tlb():
      
      	down_read(&init_mm.mmap_sem);
      	list_replace_init(&deferred_pages, &l);
      	up_read(&init_mm.mmap_sem);
      
      this is SMP-unsafe because list_replace_init() done on two CPUs in
      parallel can corrupt the list.
      
      This bug has been introduced about a year ago in the 64-bit tree:
      
             commit ea7322de
      
      
             Author: Andi Kleen <ak@suse.de>
             Date:   Thu Dec 7 02:14:05 2006 +0100
      
             [PATCH] x86-64: Speed and clean up cache flushing in change_page_attr
      
                      down_read(&init_mm.mmap_sem);
              -       dpage = xchg(&deferred_pages, NULL);
              +       list_replace_init(&deferred_pages, &l);
                      up_read(&init_mm.mmap_sem);
      
      the xchg() based version was SMP-safe, but list_replace_init() is not.
      So this "cleanup" introduced a nasty bug.
      
      why this bug never become prominent is a mystery - it can probably be
      explained with the (still) relative obscurity of the x86_64 architecture.
      
      the safe fix for now is to write-lock init_mm.mmap_sem.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9a24d04a
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 · 4fa4d23f
      Linus Torvalds authored
      * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
        pcnet32: remove private net_device_stats structure
        vortex_up should initialize "err"
        pcnet32: remove compile warnings in non-napi mode
        pcnet32: fix non-napi packet reception
        fix EMAC driver for proper napi_synchronize API
        sky2: shutdown cleanup
        napi_synchronize: waiting for NAPI
        forcedeth msi bugfix
        gianfar: fix obviously wrong #ifdef CONFIG_GFAR_NAPI placement
        fs_enet: Update for API changes
        gianfar: remove orphan struct.
        forcedeth: fix rx-work condition in nv_rx_process_optimized() too
      4fa4d23f
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 · a9e82d3a
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (37 commits)
        ide: set drive->autotune in ide_pci_setup_ports()
        triflex: always tune PIO
        opti621: always tune PIO
        cy82c693: always tune PIO
        cs5520: always tune PIO
        alim15x3: always tune PIO
        ide: add IDE_HFLAG_LEGACY_IRQS host flag
        ide: add IDE_HFLAG_SERIALIZE host flag
        ide: add IDE_HFLAG_ERROR_STOPS_FIFO host flag
        piix: add DECLARE_ICH_DEV() macro
        pdc202xx_old: add DECLARE_PDC2026X_DEV() macro
        pdc202xx_new: add DECLARE_PDCNEW_DEV() macro
        aec62xx: no need to disable UDMA in ->init_hwif method for ATP850UF
        ide: remove .init_setup from ide_pci_device_t
        serverworks: remove ->init_setup
        scc_pata: remove ->init_setup
        pdc202xx_old: remove ->init_setup
        pdc202xx_new: remove ->init_setup
        hpt366: remove ->init_setup
        cmd64x: remove ->init_setup
        ...
      a9e82d3a
    • Bartlomiej Zolnierkiewicz's avatar
      ide: set drive->autotune in ide_pci_setup_ports() · 85ad93ad
      Bartlomiej Zolnierkiewicz authored
      
      
      Majority of host drivers using IDE PCI layer set drive->autotune, the only
      exceptions are:
      
      generic.c
      ns87415.c
      rz1000.c
      trm290.c
      * no ->set_pio_mode method
      
      it821x.c:
      * if memory allocation fails drive->autotune won't be set
        (but there also won't be ->set_pio_mode method in such case)
      
      piix.c:
      * MPIIX controller (no ->init_hwif method so also no ->set_pio_mode method)
      
      However if there is no ->set_pio_mode method there are no changes in behavior
      w.r.t. PIO tuning so always set drive->autotune in ide_pci_setup_ports().
      
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      85ad93ad
    • Bartlomiej Zolnierkiewicz's avatar
      d7c526f7
    • Bartlomiej Zolnierkiewicz's avatar
      912fb29a
    • Bartlomiej Zolnierkiewicz's avatar
      af1b3d5c
    • Bartlomiej Zolnierkiewicz's avatar
      cs5520: always tune PIO · f0bb945c
      Bartlomiej Zolnierkiewicz authored
      
      
      Since cs5520 uses VDMA best PIO mode was tuned anyway by ide_dma_check()
      but only if DMA was successfully initialized.
      
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f0bb945c