1. 20 10月, 2007 32 次提交
  2. 19 10月, 2007 8 次提交
    • I
      x86: fix global_flush_tlb() bug · 9a24d04a
      Ingo Molnar 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      9a24d04a
    • L
      Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 · 4fa4d23f
      Linus Torvalds 提交于
      * '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
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 · a9e82d3a
      Linus Torvalds 提交于
      * 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
    • B
      ide: set drive->autotune in ide_pci_setup_ports() · 85ad93ad
      Bartlomiej Zolnierkiewicz 提交于
      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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      85ad93ad
    • B
      triflex: always tune PIO · d7c526f7
      Bartlomiej Zolnierkiewicz 提交于
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d7c526f7
    • B
      opti621: always tune PIO · 912fb29a
      Bartlomiej Zolnierkiewicz 提交于
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      912fb29a
    • B
      cy82c693: always tune PIO · af1b3d5c
      Bartlomiej Zolnierkiewicz 提交于
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      af1b3d5c
    • B
      cs5520: always tune PIO · f0bb945c
      Bartlomiej Zolnierkiewicz 提交于
      Since cs5520 uses VDMA best PIO mode was tuned anyway by ide_dma_check()
      but only if DMA was successfully initialized.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f0bb945c