1. 05 8月, 2008 1 次提交
  2. 27 7月, 2008 2 次提交
    • A
      [PATCH] kill altroot · 7f2da1e7
      Al Viro 提交于
      long overdue...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7f2da1e7
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  3. 26 7月, 2008 2 次提交
  4. 25 7月, 2008 1 次提交
    • A
      PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures · 27ac792c
      Andrea Righi 提交于
      On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit
      boundary. For example:
      
      	u64 val = PAGE_ALIGN(size);
      
      always returns a value < 4GB even if size is greater than 4GB.
      
      The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for
      example):
      
      #define PAGE_SHIFT      12
      #define PAGE_SIZE       (_AC(1,UL) << PAGE_SHIFT)
      #define PAGE_MASK       (~(PAGE_SIZE-1))
      ...
      #define PAGE_ALIGN(addr)       (((addr)+PAGE_SIZE-1)&PAGE_MASK)
      
      The "~" is performed on a 32-bit value, so everything in "and" with
      PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary.
      Using the ALIGN() macro seems to be the right way, because it uses
      typeof(addr) for the mask.
      
      Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in
      include/linux/mm.h.
      
      See also lkml discussion: http://lkml.org/lkml/2008/6/11/237
      
      [akpm@linux-foundation.org: fix drivers/media/video/uvc/uvc_queue.c]
      [akpm@linux-foundation.org: fix v850]
      [akpm@linux-foundation.org: fix powerpc]
      [akpm@linux-foundation.org: fix arm]
      [akpm@linux-foundation.org: fix mips]
      [akpm@linux-foundation.org: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c]
      [akpm@linux-foundation.org: fix drivers/mtd/maps/uclinux.c]
      [akpm@linux-foundation.org: fix powerpc]
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      27ac792c
  5. 24 7月, 2008 2 次提交
  6. 21 7月, 2008 1 次提交
  7. 15 7月, 2008 1 次提交
    • H
      atmel-mci: Driver for Atmel on-chip MMC controllers · 7d2be074
      Haavard Skinnemoen 提交于
      This is a driver for the MMC controller on the AP7000 chips from
      Atmel. It should in theory work on AT91 systems too with some
      tweaking, but since the DMA interface is quite different, it's not
      entirely clear if it's worth merging this with the at91_mci driver.
      
      This driver has been around for a while in BSPs and kernel sources
      provided by Atmel, but this particular version uses the generic DMA
      Engine framework (with the slave extensions) instead of an
      avr32-only DMA controller framework.
      
      This driver can also use PIO transfers when no DMA channels are
      available, and for transfers where using DMA may be difficult or
      impractical for some reason (e.g. the DMA setup overhead is usually
      not worth it for very short transfers, and badly aligned buffers or
      lengths are difficult to handle.)
      
      Currently, the driver only support PIO transfers. DMA support has been
      split out to a separate patch to hopefully make it easier to review.
      
      The driver has been tested using mmc-block and ext3fs on several SD,
      SDHC and MMC+ cards. Reads and writes work fine, with read transfer
      rates up to 3.5 MiB/s on fast cards with debugging disabled.
      
      The driver has also been tested using the mmc_test module on the same
      cards. All tests except 7, 9, 15 and 17 succeed. The first two are
      unsupported by all the cards I have, so I don't know if the driver
      handles this correctly. The last two fail because the hardware flags a
      Data CRC Error instead of a Data Timeout error. I'm not sure how to deal
      with that.
      
      Documentation for this controller can be found in many data sheets from
      Atmel, including the AT32AP7000 data sheet which can be found here:
      
      http://www.atmel.com/dyn/products/datasheets.asp?family_id=682Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      7d2be074
  8. 11 7月, 2008 1 次提交
  9. 09 7月, 2008 1 次提交
    • H
      dmaengine: Driver for the Synopsys DesignWare DMA controller · 3bfb1d20
      Haavard Skinnemoen 提交于
      This adds a driver for the Synopsys DesignWare DMA controller (aka
      DMACA on AVR32 systems.) This DMA controller can be found integrated
      on the AT32AP7000 chip and is primarily meant for peripheral DMA
      transfer, but can also be used for memory-to-memory transfers.
      
      This patch is based on a driver from David Brownell which was based on
      an older version of the DMA Engine framework. It also implements the
      proposed extensions to the DMA Engine API for slave DMA operations.
      
      The dmatest client shows no problems, but there may still be room for
      improvement performance-wise. DMA slave transfer performance is
      definitely "good enough"; reading 100 MiB from an SD card running at ~20
      MHz yields ~7.2 MiB/s average transfer rate.
      
      Full documentation for this controller can be found in the Synopsys
      DW AHB DMAC Databook:
      
      http://www.synopsys.com/designware/docs/iip/DW_ahb_dmac/latest/doc/dw_ahb_dmac_db.pdf
      
      The controller has lots of implementation options, so it's usually a
      good idea to check the data sheet of the chip it's intergrated on as
      well. The AT32AP7000 data sheet can be found here:
      
      http://www.atmel.com/dyn/products/datasheets.asp?family_id=682
      
      
      Changes since v4:
        * Use client_count instead of dma_chan_is_in_use()
        * Add missing include
        * Unmap buffers unless client told us not to
      
      Changes since v3:
        * Update to latest DMA engine and DMA slave APIs
        * Embed the hw descriptor into the sw descriptor
        * Clean up and update MODULE_DESCRIPTION, copyright date, etc.
      
      Changes since v2:
        * Dequeue all pending transfers in terminate_all()
        * Rename dw_dmac.h -> dw_dmac_regs.h
        * Define and use controller-specific dma_slave data
        * Fix up a few outdated comments
        * Define hardware registers as structs (doesn't generate better
          code, unfortunately, but it looks nicer.)
        * Get number of channels from platform_data instead of hardcoding it
          based on CONFIG_WHATEVER_CPU.
        * Give slave clients exclusive access to the channel
      
      Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>,
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      3bfb1d20
  10. 02 7月, 2008 7 次提交
    • H
      avr32: Power Management support ("standby" and "mem" modes) · 02a00cf6
      Haavard Skinnemoen 提交于
      Implement Standby support. In this mode, we'll suspend all drivers,
      put the SDRAM in self-refresh mode and switch off the HSB bus
      ("frozen" mode.)
      
      Implement Suspend-to-mem support. In this mode, we suspend all
      drivers, put the SDRAM into self-refresh mode and switch off all
      internal clocks except the 32 kHz oscillator ("stop" mode.)
      
      The lowest-level suspend code runs from a small portion of SRAM
      allocated at startup time. This gets rid of a small potential race
      with the SDRAM where we might try to enter self-refresh mode in the
      middle of an icache burst. We also relocate all interrupt and
      exception handlers to SRAM during the small window when we enter and
      exit the low-power modes.
      
      We don't need to do any special tricks to start and stop the PLL. The
      main clock is automatically gated by hardware until the PLL is stable.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      02a00cf6
    • H
      avr32: Add simple SRAM allocator · b83d6ee1
      Haavard Skinnemoen 提交于
      Add SRAM allocator for avr32, which is just a thin wrapper around
      genalloc.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      b83d6ee1
    • H
      avr32: Use a quicklist for PTE allocation as well · 38510754
      Haavard Skinnemoen 提交于
      Using a quicklist to allocate PTEs might be slightly faster than using
      the page allocator directly since we might avoid zeroing the page
      after each allocation.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      38510754
    • H
      avr32: Use a quicklist for PGD allocation · 5a4d5292
      Haavard Skinnemoen 提交于
      Use a quicklist to allocate process PGDs. This is expected to be
      slightly faster since we need to copy entries from swapper_pg_dir,
      which can stay around for pages on the PGD quick list.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      5a4d5292
    • H
      avr32: Cover the kernel page tables in the user PGDs · a9a934f2
      Haavard Skinnemoen 提交于
      Expand the per-process PGDs so that they cover the kernel virtual
      memory area as well. This simplifies the TLB miss handler fastpath
      since it doesn't have to check for kernel addresses anymore.
      
      If a TLB miss happens on a kernel address and a second-level page
      table can't be found, we check swapper_pg_dir and copy the PGD entry
      into the user PGD if it can be found there.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      a9a934f2
    • H
      avr32: Store virtual addresses in the PGD · cfd23e93
      Haavard Skinnemoen 提交于
      Instead of storing physical addresses along with page flags in the
      PGD, store virtual addresses and use NULL to indicate a not present
      second-level page table. A non-page-aligned page table indicates a bad
      PMD.
      
      This simplifies the TLB miss handler since it no longer has to check
      the Present bit and no longer has to convert the PGD entry from
      physical to virtual address. Instead, it has to check for a NULL
      entry, which is slightly cheaper than either.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      cfd23e93
    • H
      avr32: Clean up and optimize the TLB operations · b13d618b
      Haavard Skinnemoen 提交于
      This and the following patches aim to optimize the code dealing with
      page tables and TLB operations. Each patch reduces the time it takes
      to gzip a 16 MB file slightly, but I expect things like fork() and
      mmap() will improve somewhat more.
      
      This patch deals with the low-level TLB operations:
      
        * Remove unused _TLBEHI_I define
        * Use gcc builtins instead of inline assembly
        * Remove a few unnecessary pipeline flushes and nops
        * Introduce NR_TLB_ENTRIES define and use it instead of hardcoding it
          to 32 a few places throughout the code.
        * Use sysreg bitops instead of hardcoded shifts and masks
        * Make a few needlessly global functions static
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      b13d618b
  11. 28 6月, 2008 1 次提交
  12. 27 6月, 2008 5 次提交
  13. 07 6月, 2008 1 次提交
  14. 03 5月, 2008 1 次提交
  15. 29 4月, 2008 1 次提交
  16. 28 4月, 2008 1 次提交
    • N
      mm: introduce pte_special pte bit · 7e675137
      Nick Piggin 提交于
      s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
      model (which is more dynamic than most).  Instead, they had proposed to
      implement it with an additional path through vm_normal_page(), using a bit in
      the pte to determine whether or not the page should be refcounted:
      
      vm_normal_page()
      {
      	...
              if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) {
                      if (vma->vm_flags & VM_MIXEDMAP) {
      #ifdef s390
      			if (!mixedmap_refcount_pte(pte))
      				return NULL;
      #else
                              if (!pfn_valid(pfn))
                                      return NULL;
      #endif
                              goto out;
                      }
      	...
      }
      
      This is fine, however if we are allowed to use a bit in the pte to determine
      refcountedness, we can use that to _completely_ replace all the vma based
      schemes.  So instead of adding more cases to the already complex vma-based
      scheme, we can have a clearly seperate and simple pte-based scheme (and get
      slightly better code generation in the process):
      
      vm_normal_page()
      {
      #ifdef s390
      	if (!mixedmap_refcount_pte(pte))
      		return NULL;
      	return pte_page(pte);
      #else
      	...
      #endif
      }
      
      And finally, we may rather make this concept usable by any architecture rather
      than making it s390 only, so implement a new type of pte state for this.
      Unfortunately the old vma based code must stay, because some architectures may
      not be able to spare pte bits.  This makes vm_normal_page a little bit more
      ugly than we would like, but the 2 cases are clearly seperate.
      
      So introduce a pte_special pte state, and use it in mm/memory.c.  It is
      currently a noop for all architectures, so this doesn't actually result in any
      compiled code changes to mm/memory.o.
      
      BTW:
      I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
      The reason is that, regardless of where vm_normal_page is actually
      implemented, the *abstraction* is still exactly the same. Also, while it
      depends on whether the architecture has pte_special or not, that is the
      only two possible cases, and it really isn't an arch specific function --
      the role of the arch code should be to provide primitive functions and
      accessors with which to build the core code; pte_special does that. We do
      not want architectures to know or care about vm_normal_page itself, and
      we definitely don't want them being able to invent something new there
      out of sight of mm/ code. If we made vm_normal_page an arch function, then
      we have to make vm_insert_mixed (next patch) an arch function too. So I
      don't think moving it to arch code fundamentally improves any abstractions,
      while it does practically make the code more difficult to follow, for both
      mm and arch developers, and easier to misuse.
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-by: NCarsten Otte <cotte@de.ibm.com>
      Cc: Jared Hulbert <jaredeh@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7e675137
  17. 20 4月, 2008 8 次提交
    • A
      avr32: add include/asm-avr32/serial.h · 29a0c393
      Adrian Bunk 提交于
      On Mon, Apr 14, 2008 at 03:36:24PM +0100, Alan Cox wrote:
      > On Mon, 14 Apr 2008 17:17:21 +0300
      > Adrian Bunk <bunk@kernel.org> wrote:
      >
      > > This patch fixes the following build error:
      > >
      > > <--  snip  -->
      > >
      > > ...
      > >   CC [M]  drivers/serial/8250.o
      > > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/serial/8250.c:95:24: error: asm/serial.h: No such file or directory
      > > make[3]: *** [drivers/serial/8250.o] Error 1
      > >
      > > <--  snip  -->
      > >
      > > Signed-off-by: Adrian Bunk <bunk@kernel.org>
      > >
      > > ---
      > > 3cb4ef80d75e118ccfd44f7006aea3db54afb31c diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
      > > index b1bbaa0..b0e216d 100644
      > > --- a/drivers/serial/Kconfig
      > > +++ b/drivers/serial/Kconfig
      > > @@ -11,7 +11,7 @@ menu "Serial drivers"
      > >  # The new 8250/16550 serial drivers
      > >  config SERIAL_8250
      > >  	tristate "8250/16550 and compatible serial support"
      > > -	depends on (BROKEN || !SPARC)
      > > +	depends on (BROKEN || !SPARC) && !AVR32
      > >  	select SERIAL_CORE
      > >  	---help---
      >
      > NAK.
      >
      > Add an asm/serial.h to the platform as it has PCI so will have 8250 PCI
      > devices available to it. A copy of the MIPS one should be right.
      
      Patch below.
      
      > Alan
      
      cu
      Adrian
      
      <--  snip  -->
      
      This patch fixes the following build error with CONFIG_SERIAL_8250:
      
      <--  snip  -->
      
      ...
        CC [M]  drivers/serial/8250.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/serial/8250.c:95:24: error: asm/serial.h: No such file or directory
      make[3]: *** [drivers/serial/8250.o] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      29a0c393
    • A
      add include/asm-avr32/xor.h · 5e840eca
      Adrian Bunk 提交于
      This patch fixes the following compile error with CONFIG_MD_RAID456
      on avr32:
      
      <--  snip  -->
      
      ...
        CC [M]  crypto/xor.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:23:21: error: asm/xor.h: No such file or directory
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c: In function 'calibrate_xor_blocks':
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: 'XOR_TRY_TEMPLATES' undeclared (first use in this function)
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: (Each undeclared identifier is reported only once
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: for each function it appears in.)
      make[2]: *** [crypto/xor.o] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      5e840eca
    • D
      avr32: Generic clockevents support · e723ff66
      David Brownell 提交于
      This combines three patches from David Brownell:
        * avr32: tclib support
        * avr32: simplify clocksources
        * avr32: Turn count/compare into a oneshot clockevent device
      
      Register both TC blocks (instead of just the first one) so that
      the AT32/AT91 tclib code will pick them up (instead of just the
      avr32-only PIT-style clocksource).
      
      Rename the first one and its resources appropriately.
      
      More cleanups to the cycle counter clocksource code
      
       - Disable all the weak symbol magic; remove the AVR32-only TCB-based
         clocksource code (source and header).
      
       - Mark the __init code properly.
      
       - Don't forget to report IRQF_TIMER.
      
       - Make the system work properly with this clocksource, by preventing
         use of the CPU "idle" sleep state in the idle loop when it's used.
      
      Package the avr32 count/compare timekeeping support as a oneshot
      clockevent device, so it supports NO_HZ and high res timers.
      This means it also supports plugging in other clockevent devices
      and clocksources.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e723ff66
    • H
      avr32: Move sleep code into mach-at32ap · 7e59128f
      Haavard Skinnemoen 提交于
      Create a new file, pm-at32ap700x.S, in mach-at32ap and move the CPU
      idle sleep code there. Make it possible to disable the sleep code.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      7e59128f
    • H
      02f99d1c
    • H
      avr32: Delete mostly unused header asm/intc.h · 46acb55b
      Haavard Skinnemoen 提交于
      Move the only thing that was actually implemented and used in
      asm/intc.h, intc_get_pending(), into asm/irq.h and delete asm/intc.h
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      46acb55b
    • B
      avr32: pass i2c board info through at32_add_device_twi · 040b28fc
      Ben Nizette 提交于
      New-style I2C drivers require that motherboard-mounted I2C devices are
      registered with the I2C core, typically at arch_initcall time.  This
      can be done nice and neat by passing the struct i2c_board_info[]
      through at32_add_device_twi just like we do for the SPI board info.
      
      While we've got the hood up, remove a duplicate declaration of
      at32_add_device_twi() in board.h.
      
      [hskinnemoen@atmel.com: add missing i2c_board_info forward-declaration]
      Signed-Off-By: NBen Nizette <bn@niasdigital.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      040b28fc
    • C
      avr32: cleanup - use _AC macro to define PAGE_SIZE · e573ebb0
      Cyrill Gorcunov 提交于
      PAGE_SIZE is used both from assembly and C code. We want to have type
      specifiers when using it from C, but this will make the assembler
      confused, so we need to make it conditional.
      
      This is exactly what the _AC macro is for, so using it allows us to
      get rid of a few lines of cpp noise.
      Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e573ebb0
  18. 17 4月, 2008 1 次提交
  19. 07 4月, 2008 1 次提交
  20. 03 4月, 2008 1 次提交
    • C
      kvm: provide kvm.h for all architecture: fixes headers_install · dd135ebb
      Christian Borntraeger 提交于
      Currently include/linux/kvm.h is not considered by make headers_install,
      because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h.  This problem
      was introduced by
      
      commit fb56dbb3
      Author: Avi Kivity <avi@qumranet.com>
      Date:   Sun Dec 2 10:50:06 2007 +0200
      
          KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
      
          Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
          includes, not existing.  Rather than add a zillion <asm/kvm.h>s, export kvm.
          only if the arch actually supports it.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      
      which makes this an 2.6.25 regression.
      
      One way of solving the issue is to enhance Kbuild, but Avi and David conviced
      me, that changing headers_install is not the way to go.  This patch changes
      the definition for linux/kvm.h to unifdef-y.
      
      If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
      architectures without asm/kvm.h.  Therefore, this patch also provides
      asm/kvm.h on all architectures.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NAvi Kivity <avi@qumranet.com>
      Cc: Sam Ravnborg <sam@ravnborg.org
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd135ebb