1. 30 1月, 2014 1 次提交
    • I
      xen: swiotlb: handle sizeof(dma_addr_t) != sizeof(phys_addr_t) · e17b2f11
      Ian Campbell 提交于
      The use of phys_to_machine and machine_to_phys in the phys<=>bus conversions
      causes us to lose the top bits of the DMA address if the size of a DMA address is not the same as the size of the phyiscal address.
      
      This can happen in practice on ARM where foreign pages can be above 4GB even
      though the local kernel does not have LPAE page tables enabled (which is
      totally reasonable if the guest does not itself have >4GB of RAM). In this
      case the kernel still maps the foreign pages at a phys addr below 4G (as it
      must) but the resulting DMA address (returned by the grant map operation) is
      much higher.
      
      This is analogous to a hardware device which has its view of RAM mapped up
      high for some reason.
      
      This patch makes I/O to foreign pages (specifically blkif) work on 32-bit ARM
      systems with more than 4GB of RAM.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      e17b2f11
  2. 24 1月, 2014 1 次提交
  3. 22 1月, 2014 1 次提交
    • R
      Fix select-induced Kconfig warning for ZBOOT_ROM · 10968131
      Russell King 提交于
      warning: (ARCH_MULTIPLATFORM && ARCH_CLPS711X && ARCH_PXA &&
       SOC_EXYNOS5440 && ARCH_EMEV2) selects AUTO_ZRELADDR which
       has unmet direct dependencies (!ZBOOT_ROM)
      
      This is because it's possible to have ZBOOT_ROM enabled, but at the
      same time have another option enabled which selects AUTO_ZRELADDR
      overriding the !ZBOOT_ROM dependency.  Fix this by reversing the
      dependencies between ZBOOT_ROM and the options which depend on
      !ZBOOT_ROM.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      10968131
  4. 09 1月, 2014 1 次提交
  5. 29 12月, 2013 4 次提交
  6. 23 12月, 2013 1 次提交
  7. 21 12月, 2013 3 次提交
    • L
      ARM: s3c64xx: get rid of custom <mach/gpio.h> · 41c3548e
      Linus Walleij 提交于
      This isolates the custom S3C64xx GPIO definition table to
      <linux/platform_data/gpio-samsung-s3x64xx.h> as this is
      used in a few different places in the kernel, removing the
      need to depend on the implicit inclusion of <mach/gpio.h>
      from <linux/gpio.h> and thus getting rid of a few nasty
      cross-dependencies.
      
      Also delete the CONFIG_SAMSUNG_GPIO_EXTRA stuff. Instead
      roof the number of GPIOs for this platform:
      First sum up all the GPIO banks from A to Q: 187 GPIOs.
      Add the 16 "board GPIOs" and the roof for SAMSUNG_GPIO_EXTRA,
      128, so in total maximum 187+16+128 = 331 GPIOs, so let's
      take the same roof as for S3C24XX: 512. This way we can do
      away with the GPIO calculation macros for GPIO_BOARD_START,
      BOARD_NR_GPIOS and the definition of ARCH_NR_GPIOS.
      
      Cc: Mark Brown <broonie@kernel.org>
      [on Mini6410 board]
      Tested-by: NTomasz Figa <t.figa@samsung.com>
      [for changes in mach-s3c64xx]
      Acked-by: NTomasz Figa <t.figa@samsung.com>
      Tested-by: NMark Brown <broonie@linaro.org>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      41c3548e
    • L
      ARM: s3c24xx: get rid of custom <mach/gpio.h> · c67d0f29
      Linus Walleij 提交于
      This isolates the custom S3C24xx GPIO definition table to
      <linux/platform_data/gpio-samsung-s3x24xx.h> as this is
      used in a few different places in the kernel, removing the
      need to depend on the implicit inclusion of <mach/gpio.h>
      from <linux/gpio.h> and thus getting rid of a few nasty
      cross-dependencies.
      
      We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff.
      The biggest this can ever be for the S3C24XX is
      CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or
      CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512
      is the absolute roof value on this platform. So we set
      the size of ARCH_NR_GPIO to this and the GPIOs array will
      fit any S3C24XX platform, as per pattern from other archs.
      
      ChangeLog v2->v3:
      - Move the movement of the S3C64XX gpio.h file out of
        this patch and into the follow-up patch where it belongs.
      ChangeLog v1->v2:
      - Added an #ifdef ARCH_S3C24XX around the header inclusion
        in drivers/gpio/gpio-samsung.c as we would otherwise
        have colliding definitions when compiling S3C64XX.
      - Rename inclusion guard in the header file.
      
      Cc: Tomasz Figa <tomasz.figa@gmail.com>
      Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: linux-samsung-soc@vger.kernel.org
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Acked-by: NHeiko Stuebner <heiko@sntech.de>
      Tested-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c67d0f29
    • H
      ARM: hisi: rename hi3xxx to hisi · 389ee0c2
      Haojian Zhuang 提交于
      Since some new Hisilicon SoCs are not named as hi3xxx, rename mach-hi3xxx
      to mach-hisi instead. And the pronounciation of "hisi" is similar to the
      chinese pronounciation of Hisilicon. So Hisilicon guys like this name.
      
      ARCH_HI3xxx will be renamed later since other drivers are using it and
      they are still in linux-next git tree. So rename ARCH_HI3xxx later.
      Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      389ee0c2
  8. 20 12月, 2013 1 次提交
    • K
      stackprotector: Unify the HAVE_CC_STACKPROTECTOR logic between architectures · 19952a92
      Kees Cook 提交于
      Instead of duplicating the CC_STACKPROTECTOR Kconfig and
      Makefile logic in each architecture, switch to using
      HAVE_CC_STACKPROTECTOR and keep everything in one place. This
      retains the x86-specific bug verification scripts.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-arch@vger.kernel.org
      Link: http://lkml.kernel.org/r/1387481759-14535-2-git-send-email-keescook@chromium.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      19952a92
  9. 18 12月, 2013 1 次提交
  10. 17 12月, 2013 1 次提交
  11. 16 12月, 2013 1 次提交
  12. 14 12月, 2013 1 次提交
  13. 13 12月, 2013 1 次提交
  14. 12 12月, 2013 1 次提交
  15. 10 12月, 2013 2 次提交
  16. 04 12月, 2013 1 次提交
    • P
      ARM: integrator: Default enable ARM_PATCH_PHYS_VIRT, AUTO_ZRELADDR · fe989145
      panchaxari 提交于
      ARM_PATCH_PHYS_VIRT and AUTO_ZRELADDR has been enabled as default configs
      to integrator platform.
      
      Introduction of PHYS_VIRT config as default would enable phy-to-virt and
      virt-to-phy translation function at boot and module loading time
      and enforce dynamic reallocation of memory. AUTO_ZRELADDR config would
      enable calculation of kernel load address at run time.
      
      PHYS_VIRT config is mutually exclusive to XIP_KERNEL, XIP_KERNEL is used in
      systems with NOR flash devices, and ZRELADDR config is mutually exclusive
      to ZBOOT_ROM.
      
      Requesting maintainers of Integrator platform to evaluate the changes on the
      board and comment, as I dont have the board for testing and also requesting
      an ACK.
      Signed-off-by: Npanchaxari <panchaxari.prasannamurthy@linaro.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fe989145
  17. 24 11月, 2013 2 次提交
    • T
      ARM: s3c64xx: Add support for DMA using generic amba-pl08x driver · 1db0287a
      Tomasz Figa 提交于
      This patch adds all required platform-specific data and initialization
      code to support the generic amba-pl08x driver on S3C64xx SoCs.
      
      Also some compatibility definitions are added to make the transition
      from legacy API to DMA engine easier. The biggest hack here is passing
      const char * pointers through DMA resource, casted to unsigned long,
      but this is how Samsung DMA wrappers (used to support both s3c-dma and
      DMA engine in drivers) are designed.
      Signed-off-by: NTomasz Figa <tomasz.figa@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      1db0287a
    • S
      ARM: mm: Remove bootmem code and switch to NO_BOOTMEM · 84f452b1
      Santosh Shilimkar 提交于
      Now with dma_mask series merged and max*pfn has consistent meaning on ARM
      as rest of the arch's thanks to RMK's mega series, lets switch ARM code
      to NO_BOOTMEM. With NO_BOOTMEM change, now we use memblock allocator to
      reserve space for crash kernel to have one less dependency with nobootmem
      allocator wrapper.
      
      Tested with both flat memory and sparse (faked) memory models with highmem
      enabled.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      84f452b1
  18. 21 11月, 2013 1 次提交
  19. 15 11月, 2013 1 次提交
  20. 14 11月, 2013 2 次提交
  21. 09 11月, 2013 1 次提交
    • S
      arm: make SWIOTLB available · fbd989b1
      Stefano Stabellini 提交于
      IOMMU_HELPER is needed because SWIOTLB calls iommu_is_span_boundary,
      provided by lib/iommu_helper.c.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: will.deacon@arm.com
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      
      Changes in v9:
      - remove uneeded include asm/cacheflush.h;
      - just return 0 if !dev->dma_mask in dma_capable.
      
      Changes in v8:
      - use __phys_to_pfn and __pfn_to_phys.
      
      Changes in v7:
      - dma_mark_clean: empty implementation;
      - in dma_capable use coherent_dma_mask if dma_mask hasn't been
        allocated.
      
      Changes in v6:
      - check for dev->dma_mask being NULL in dma_capable.
      
      Changes in v5:
      - implement dma_mark_clean using dmac_flush_range.
      
      Changes in v3:
      - dma_capable: do not treat dma_mask as a limit;
      - remove SWIOTLB dependency on NEED_SG_DMA_LENGTH.
      fbd989b1
  22. 29 10月, 2013 4 次提交
  23. 24 10月, 2013 1 次提交
  24. 20 10月, 2013 1 次提交
    • B
      ARM: fix ARCH_IXP4xx usage of ARCH_SUPPORTS_BIG_ENDIAN · d10d2d48
      Ben Dooks 提交于
      The Kconfig for arch/arm/mach-ixp4xx has a local definition
      of ARCH_SUPPORTS_BIG_ENDIAN which could be used elsewhere.
      This means that if IXP4xx is selected and this symbol is
      selected eleswhere then an warning is produced.
      
      Clean the following error up by making the symbol be
      selected by the main ARCH_IXP4XX definition and have a
      common definition in arch/arm/mm/Kconfig
      
      warning: (ARCH_xxx) selects ARCH_SUPPORTS_BIG_ENDIAN which has unmet direct dependencies (ARCH_IXP4XX)
      warning: (ARCH_xxx) selects ARCH_SUPPORTS_BIG_ENDIAN which has unmet direct dependencies (ARCH_IXP4XX)
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      d10d2d48
  25. 16 10月, 2013 1 次提交
  26. 10 10月, 2013 1 次提交
    • S
      xen/arm,arm64: enable SWIOTLB_XEN · 83862ccf
      Stefano Stabellini 提交于
      Xen on arm and arm64 needs SWIOTLB_XEN: when running on Xen we need to
      program the hardware with mfns rather than pfns for dma addresses.
      Remove SWIOTLB_XEN dependency on X86 and PCI and make XEN select
      SWIOTLB_XEN on arm and arm64.
      
      At the moment always rely on swiotlb-xen, but when Xen starts supporting
      hardware IOMMUs we'll be able to avoid it conditionally on the presence
      of an IOMMU on the platform.
      
      Implement xen_create_contiguous_region on arm and arm64: for the moment
      we assume that dom0 has been mapped 1:1 (physical addresses == machine
      addresses) therefore we don't need to call XENMEM_exchange. Simply
      return the physical address as dma address.
      
      Initialize the xen-swiotlb from xen_early_init (before the native
      dma_ops are initialized), set xen_dma_ops to &xen_swiotlb_dma_ops.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      
      
      Changes in v8:
      - assume dom0 is mapped 1:1, no need to call XENMEM_exchange.
      
      Changes in v7:
      - call __set_phys_to_machine_multi from xen_create_contiguous_region and
      xen_destroy_contiguous_region to update the P2M;
      - don't call XENMEM_unpin, it has been removed;
      - call XENMEM_exchange instead of XENMEM_exchange_and_pin;
      - set nr_exchanged to 0 before calling the hypercall.
      
      Changes in v6:
      - introduce and export xen_dma_ops;
      - call xen_mm_init from as arch_initcall.
      
      Changes in v4:
      - remove redefinition of DMA_ERROR_CODE;
      - update the code to use XENMEM_exchange_and_pin and XENMEM_unpin;
      - add a note about hardware IOMMU in the commit message.
      
      Changes in v3:
      - code style changes;
      - warn on XENMEM_put_dma_buf failures.
      83862ccf
  27. 15 10月, 2013 1 次提交
    • S
      arm: make SWIOTLB available · 06e6295b
      Stefano Stabellini 提交于
      IOMMU_HELPER is needed because SWIOTLB calls iommu_is_span_boundary,
      provided by lib/iommu_helper.c.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: will.deacon@arm.com
      CC: linux@arm.linux.org.uk
      
      
      Changes in v8:
      - use __phys_to_pfn and __pfn_to_phys.
      
      Changes in v7:
      - dma_mark_clean: empty implementation;
      - in dma_capable use coherent_dma_mask if dma_mask hasn't been
        allocated.
      
      Changes in v6:
      - check for dev->dma_mask being NULL in dma_capable.
      
      Changes in v5:
      - implement dma_mark_clean using dmac_flush_range.
      
      Changes in v3:
      - dma_capable: do not treat dma_mask as a limit;
      - remove SWIOTLB dependency on NEED_SG_DMA_LENGTH.
      06e6295b
  28. 08 10月, 2013 1 次提交
  29. 06 10月, 2013 1 次提交