1. 27 4月, 2008 20 次提交
    • G
      KVM: paravirtualized clocksource: host part · 18068523
      Glauber de Oliveira Costa 提交于
      This is the host part of kvm clocksource implementation. As it does
      not include clockevents, it is a fairly simple implementation. We
      only have to register a per-vcpu area, and start writing to it periodically.
      
      The area is binary compatible with xen, as we use the same shadow_info
      structure.
      
      [marcelo: fix bad_page on MSR_KVM_SYSTEM_TIME]
      [avi: save full value of the msr, even if enable bit is clear]
      [avi: clear previous value of time_page]
      Signed-off-by: NGlauber de Oliveira Costa <gcosta@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      18068523
    • H
      KVM: Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier · 31bb117e
      Hollis Blanchard 提交于
      This allows kvm_host.h to be #included even when struct preempt_notifier is
      undefined. This is needed to build ppc asm-offsets.h.
      Signed-off-by: NHollis Blanchard <hollisb@us.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      31bb117e
    • Y
      x86_64/mm: check and print vmemmap allocation continuous · c2b91e2e
      Yinghai Lu 提交于
      On big systems with lots of memory, don't print out too much during
      bootup, and make it easy to find if it is continuous.
      
      on 256G 8 sockets system will get
       [ffffe20000000000-ffffe20002bfffff] PMD -> [ffff810001400000-ffff810003ffffff] on node 0
      [ffffe2001c700000-ffffe2001c7fffff] potential offnode page_structs
       [ffffe20002c00000-ffffe2001c7fffff] PMD -> [ffff81000c000000-ffff8100255fffff] on node 0
      [ffffe20038700000-ffffe200387fffff] potential offnode page_structs
       [ffffe2001c800000-ffffe200387fffff] PMD -> [ffff810820200000-ffff81083c1fffff] on node 1
       [ffffe20040000000-ffffe2007fffffff] PUD ->ffff811027a00000 on node 2
       [ffffe20038800000-ffffe2003fffffff] PMD -> [ffff811020200000-ffff8110279fffff] on node 2
      [ffffe20054700000-ffffe200547fffff] potential offnode page_structs
       [ffffe20040000000-ffffe200547fffff] PMD -> [ffff811027c00000-ffff81103c3fffff] on node 2
      [ffffe20070700000-ffffe200707fffff] potential offnode page_structs
       [ffffe20054800000-ffffe200707fffff] PMD -> [ffff811820200000-ffff81183c1fffff] on node 3
       [ffffe20080000000-ffffe200bfffffff] PUD ->ffff81202fa00000 on node 4
       [ffffe20070800000-ffffe2007fffffff] PMD -> [ffff812020200000-ffff81202f9fffff] on node 4
      [ffffe2008c700000-ffffe2008c7fffff] potential offnode page_structs
       [ffffe20080000000-ffffe2008c7fffff] PMD -> [ffff81202fc00000-ffff81203c3fffff] on node 4
      [ffffe200a8700000-ffffe200a87fffff] potential offnode page_structs
       [ffffe2008c800000-ffffe200a87fffff] PMD -> [ffff812820200000-ffff81283c1fffff] on node 5
       [ffffe200c0000000-ffffe200ffffffff] PUD ->ffff813037a00000 on node 6
       [ffffe200a8800000-ffffe200bfffffff] PMD -> [ffff813020200000-ffff8130379fffff] on node 6
      [ffffe200c4700000-ffffe200c47fffff] potential offnode page_structs
       [ffffe200c0000000-ffffe200c47fffff] PMD -> [ffff813037c00000-ffff81303c3fffff] on node 6
       [ffffe200c4800000-ffffe200e07fffff] PMD -> [ffff813820200000-ffff81383c1fffff] on node 7
      
      instead of a very long print out...
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      c2b91e2e
    • B
      ide: constify struct ide_dma_ops · f37afdac
      Bartlomiej Zolnierkiewicz 提交于
      * Export ide_dma_exec_cmd() and __ide_dma_test_irq().
      
      * Constify struct ide_dma_ops.
      
      * Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
        (it is later overriden by ide_init_port() if needed) and drop
        'const struct ide_port_info *d' argument.
      
      While at it:
      
      * Rename __ide_dma_test_irq() to ide_dma_test_irq().
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f37afdac
    • B
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz 提交于
      Add struct ide_dma_ops and convert core code + drivers to use it.
      
      While at it:
      
      * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
      
      * Drop "ide_" "infixes" from DMA methods.
      
      * au1xxx-ide.c:
        - use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
      
      * pdc202xx_old.c:
        - drop "old_" "infixes" from DMA methods
      
      * siimage.c:
        - add siimage_dma_test_irq() helper
        - print SATA warning in siimage_init_one()
      
      * Remove no longer needed ->init_hwif implementations.
      
      v2:
      * Changes based on review from Sergei:
        - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
        - s/drive->hwif/hwif/ in idefloppy_pc_intr().
        - fix patch description w.r.t. au1xxx-ide changes
        - fix au1xxx-ide build
        - fix naming for cmd64*_dma_ops
        - drop "ide_" and "old_" infixes
        - s/hpt3xxx_dma_ops/hpt37x_dma_ops/
        - s/hpt370x_dma_ops/hpt370_dma_ops/
        - use correct DMA ops for HPT302/N, HPT371/N and HPT374
        - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
      
      v3:
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e37bdc0
    • B
      ide: add IDE_HFLAG_SERIALIZE_DMA host flag · 1fd18905
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_SERIALIZE_DMA host flag to serialize ports
        if DMA is available and handle it in ide_init_port().
      
      * Convert sl82c105 host driver to use this new flag.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1fd18905
    • B
      ide: do complete DMA setup in ->init_dma method (take 2) · b123f56e
      Bartlomiej Zolnierkiewicz 提交于
      * Make ide_hwif_setup_dma() return an error value.
      
      * Pass 'const struct ide_port_info *d' instead of 'unsigned long dmabase'
        to ->init_dma method and make it return an error value.
      
      * Rename ide_get_or_set_dma_base() to ide_pci_dma_base(),
        change ordering of its arguments and then export it.
      
      * Export ide_pci_set_master().
      
      * Do complete DMA setup inside ->init_dma method and update ->init_dma
        users accordingly.
      
      * Sanitize code for DMA setup in ide_init_port().
      
      v2:
      * Fix for CONFIG_BLK_DEV_IDEDMA_PCI=n configs
        (from Jiri Slaby <jirislaby@gmail.com>):
      
        Fix following compiler warning by returning EINVAL:
      
        In file included from ANYTHING-INCLUDING-IDE.H:45:
        include/linux/ide.h: In function ‘ide_hwif_setup_dma’:
        include/linux/ide.h:1022: warning: no return statement in function returning non-void
      
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b123f56e
    • B
      ide: export ide_allocate_dma_engine() · b8e73fba
      Bartlomiej Zolnierkiewicz 提交于
      Export ide_allocate_dma_engine() and use it in trm290 host driver.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b8e73fba
    • B
      ide: remove ->cds field from ide_hwif_t (take 2) · 5e59c236
      Bartlomiej Zolnierkiewicz 提交于
      * Use hwif->name instead of cds->name in ide_allocate_dma_engine().
      
      * Use pci_name(dev) instead of cds->name in init_dma_pdc202xx().
      
      * Remove no longer needed ->cds field from ide_hwif_t.
      
      v2:
      
      * scc_pata.c also needs to be updated now (noticed by Stephen Rothwell).
      
      There should be no functional changes caused by this patch.
      
      Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e59c236
    • B
      ide: remove ->extra field from struct ide_port_info · 21a3387d
      Bartlomiej Zolnierkiewicz 提交于
      Always setup hwif->extra_base in ide_iomio_dma() and remove
      no longer needed ->extra field from struct ide_port_info.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      21a3387d
    • B
      ide: remove ide_hwif_request_regions() · 5add2224
      Bartlomiej Zolnierkiewicz 提交于
      Remove no longer used ide_hwif_request_regions() and hwif_request_region().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5add2224
    • B
      ide: manage resources for PCI devices in ide_pci_enable() (take 3) · 0d1bad21
      Bartlomiej Zolnierkiewicz 提交于
      * Reserve PCI BARs 0-3 (0-1 for single port controllers) in
        ide_pci_enable() and remove ide_hwif_request_regions() call
        from ide_device_add_all() (also cleanup resource management
        in scc_pata host driver).
      
      * Fix handling of PCI BAR 4 in ide_pci_enable(), then cleanup
        ide_iomio_dma() (+ init_hwif_trm290() in trm290 host driver)
        and remove ide_release[_iomio]_dma().
      
      v2:
      * Fixup trm290 host driver.
      
      v3:
      * Because of scc_pata host driver changes we need to call
        pci_request_selected_regions() also in setup_mmio_scc().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d1bad21
    • B
      ide: remove ide_hwif_release_regions() · d083c03f
      Bartlomiej Zolnierkiewicz 提交于
      All host drivers using ide_unregister()/module_exit() have been fixed
      to manage resources themselves so this function can be removed now.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d083c03f
    • B
      ide: use ide_legacy_device_add() for qd65xx (take 2) · 0bfeee7d
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'unsigned long config' argument to ide_legacy_device_add()
        for setting hwif->config_data.
      
      * Use ide_find_port_slot() instead of ide_find_port() in
        ide_legacy_device_add().
      
      * Handle IDE_HFLAG_QD_2ND_PORT and IDE_HFLAG_SINGLE host flags in
        ide_legacy_device_add().
      
      * Convert qd65xx host driver to use ide_legacy_device_add().
      
      v2:
      * Update ali14xx, dtc2278, ht6560b and umc8672 host drivers.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0bfeee7d
    • B
      ide: add ide_legacy_device_add() helper · 3b36f66b
      Bartlomiej Zolnierkiewicz 提交于
      Add ide_legacy_device_add() helper for use by legacy VLB host drivers
      (+ convert them to use it).
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3b36f66b
    • B
      ide: remove ->noprobe field from ide_hwif_t · e53cd458
      Bartlomiej Zolnierkiewicz 提交于
      Update IDE PMAC host driver to use drive->noprobe instead of hwif->noprobe
      and remove hwif->noprobe completely (it is always set to zero now).
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e53cd458
    • B
      ide: add struct ide_port_ops (take 2) · ac95beed
      Bartlomiej Zolnierkiewicz 提交于
      * Move hooks for port/host specific methods from ide_hwif_t to
        'struct ide_port_ops'.
      
      * Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
        and ide_hwif_t.
      
      * Update host drivers and core code accordingly.
      
      While at it:
      
      * Rename ata66_*() cable detect functions to *_cable_detect() to match
        the standard naming. (Suggested by Sergei Shtylyov)
      
      v2:
      * Fix build for bast-ide. (Noticed by Andrew Morton)
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ac95beed
    • A
      x86: optimize find_first_bit for small bitmaps · 3a483050
      Alexander van Heukelum 提交于
      Avoid a call to find_first_bit if the bitmap size is know at
      compile time and small enough to fit in a single long integer.
      Modeled after an optimization in the original x86_64-specific
      code.
      Signed-off-by: NAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a483050
    • A
      x86: generic versions of find_first_(zero_)bit, convert i386 · 77b9bd9c
      Alexander van Heukelum 提交于
      Generic versions of __find_first_bit and __find_first_zero_bit
      are introduced as simplified versions of __find_next_bit and
      __find_next_zero_bit. Their compilation and use are guarded by
      a new config variable GENERIC_FIND_FIRST_BIT.
      
      The generic versions of find_first_bit and find_first_zero_bit
      are implemented in terms of the newly introduced __find_first_bit
      and __find_first_zero_bit.
      
      This patch does not remove the i386-specific implementation,
      but it does switch i386 to use the generic functions by setting
      GENERIC_FIND_FIRST_BIT=y for X86_32.
      Signed-off-by: NAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      77b9bd9c
    • A
      x86, generic: optimize find_next_(zero_)bit for small constant-size bitmaps · 64970b68
      Alexander van Heukelum 提交于
      This moves an optimization for searching constant-sized small
      bitmaps form x86_64-specific to generic code.
      
      On an i386 defconfig (the x86#testing one), the size of vmlinux hardly
      changes with this applied. I have observed only four places where this
      optimization avoids a call into find_next_bit:
      
      In the functions return_unused_surplus_pages, alloc_fresh_huge_page,
      and adjust_pool_surplus, this patch avoids a call for a 1-bit bitmap.
      In __next_cpu a call is avoided for a 32-bit bitmap. That's it.
      
      On x86_64, 52 locations are optimized with a minimal increase in
      code size:
      
      Current #testing defconfig:
      	146 x bsf, 27 x find_next_*bit
         text    data     bss     dec     hex filename
         5392637  846592  724424 6963653  6a41c5 vmlinux
      
      After removing the x86_64 specific optimization for find_next_*bit:
      	94 x bsf, 79 x find_next_*bit
         text    data     bss     dec     hex filename
         5392358  846592  724424 6963374  6a40ae vmlinux
      
      After this patch (making the optimization generic):
      	146 x bsf, 27 x find_next_*bit
         text    data     bss     dec     hex filename
         5392396  846592  724424 6963412  6a40d4 vmlinux
      
      [ tglx@linutronix.de: build fixes ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      64970b68
  2. 26 4月, 2008 14 次提交
  3. 25 4月, 2008 6 次提交