1. 28 1月, 2016 1 次提交
  2. 21 1月, 2016 1 次提交
    • C
      dma-mapping: always provide the dma_map_ops based implementation · e1c7e324
      Christoph Hellwig 提交于
      Move the generic implementation to <linux/dma-mapping.h> now that all
      architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
      that everyone supports them.
      
      [valentinrothberg@gmail.com: remove leftovers in Kconfig]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1c7e324
  3. 17 1月, 2016 1 次提交
  4. 15 1月, 2016 1 次提交
    • D
      arm: mm: support ARCH_MMAP_RND_BITS · e0c25d95
      Daniel Cashman 提交于
      arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the random
      offset for the mmap base address.  This value represents a compromise
      between increased ASLR effectiveness and avoiding address-space
      fragmentation.  Replace it with a Kconfig option, which is sensibly
      bounded, so that platform developers may choose where to place this
      compromise.  Keep 8 as the minimum acceptable value.
      
      [arnd@arndb.de: ARM: avoid ARCH_MMAP_RND_BITS for NOMMU]
      Signed-off-by: NDaniel Cashman <dcashman@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Mark Salyzyn <salyzyn@android.com>
      Cc: Jeff Vander Stoep <jeffv@google.com>
      Cc: Nick Kralevich <nnk@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e0c25d95
  5. 09 1月, 2016 1 次提交
  6. 05 1月, 2016 2 次提交
  7. 23 12月, 2015 1 次提交
  8. 21 12月, 2015 1 次提交
  9. 18 12月, 2015 2 次提交
    • A
      ARM: realview: enable multiplatform · 2934167d
      Arnd Bergmann 提交于
      All obstacles are out of the way by now, so we can finally move realview
      to multiplatform.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      [Rebased Kconfig, fixed if $(X) to if X in Makefile]
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2934167d
    • A
      ARM: make default platform work for NOMMU · 70722803
      Arnd Bergmann 提交于
      Moving ARCH_VERSATILE into ARCH_MULTIPLATFORM means that it no longer
      works as the default target for MMU-less kernels. While we might
      want to get that working again in the future, it's also a rather
      bad default, and it makes sense to make ARM_SINGLE_V7M the default
      because that is what realistically all NOMMU users on ARM are using,
      and it actually is what gets selected by default in the absence of
      versatile in the choice statement.
      
      Related to this, 'allnoconfig' kernels fail to link with the new
      default, as they do not include a machine record:
      
      arm-linux-gnueabi-ld: no machine record defined
      
      For ARCH_MULTIPLATFORM kernels, we avoid this error by using a
      default machine descriptor that works for all trivial platforms,
      like ARCH_VIRT. The same reasoning applies for ARM_SINGLE_V7M,
      as that can also boot with empty machine descriptors both on
      qemu and on real hardware, as long as all the drivers are present.
      
      We could also follow up with a patch to remove the existing
      machine descriptors for the ARMv7M platforms, the only callback
      pointer the four platforms contain today is the armv7m_restart
      handler and we can simply make that the default for v7M with an
      add-on patch.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      70722803
  10. 17 12月, 2015 1 次提交
    • N
      ARM: 8477/1: runtime patch udiv/sdiv instructions into __aeabi_{u}idiv() · 42f25bdd
      Nicolas Pitre 提交于
      The ARM compiler inserts calls to __aeabi_idiv() and
      __aeabi_uidiv() when it needs to perform division on signed and
      unsigned integers. If a processor has support for the sdiv and
      udiv instructions, the kernel may overwrite the beginning of those
      functions with those instructions and a "bx lr" to get better
      performance.
      
      To ensure that those functions are aligned to a 32-bit word for easier
      patching (which might not always be the case in Thumb mode) and that
      the two patched instructions end up in the same cache line, a 8-byte
      alignment is enforced when ARM_PATCH_IDIV is selected.
      
      This was heavily inspired by a previous patch from Stephen Boyd.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      42f25bdd
  11. 16 12月, 2015 2 次提交
    • R
      ARM: versatile: convert to multi-platform · a29da136
      Rob Herring 提交于
      Now that all the prerequisites are in place, we can enable Versatile
      boards for multi-platform kernels.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      a29da136
    • R
      ARM: versatile: switch to DT only booting and remove legacy code · 16956fed
      Rob Herring 提交于
      With DT support for clocks, irqchips, timers, and PCI now in place, DT
      based booting has feature parity with non-DT legacy boot. The final
      piece is actually enabling common clock support on Versatile. Enabling
      full DT support requires either removing the old Versatile clock code,
      updating the legacy boot to use the common clock code, or making DT and
      legacy boot mutually exclusive. Given that removing legacy boot code is
      the goal anyway, I am going with the 1st option.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      16956fed
  12. 15 12月, 2015 2 次提交
  13. 14 12月, 2015 2 次提交
  14. 08 12月, 2015 5 次提交
  15. 03 12月, 2015 3 次提交
    • A
      ARM: 8456/1: code patching only works on MMU · 437682ee
      Arnd Bergmann 提交于
      There is no __set_fixmap implementation for NOMMU kernels, so
      we cannot link the kernel/patch.c file:
      
      arch/arm/kernel/built-in.o: In function `patch_map':
      :(.text+0x257e): undefined reference to `__set_fixmap'
      arch/arm/kernel/built-in.o: In function `__patch_text_real':
      :(.text+0x2618): undefined reference to `__set_fixmap'
      :(.text+0x262e): undefined reference to `__set_fixmap'
      
      To work around that, this adds dependencies for all features
      that rely on code patching.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      437682ee
    • P
      ARM: 8463/1: Enable GICv2m on 32-bit virt machine · 0e2f91e9
      Pavel Fedin 提交于
      Modern qemu includes GICv2m support for both 64 and 32 bits, therefore
      32-bit guests may also use MSI.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0e2f91e9
    • A
      ARM: 8458/1: bL_switcher: add GIC dependency · 6c044fec
      Arnd Bergmann 提交于
      It is not possible to build the bL_switcher code if the GIC
      driver is disabled, because it relies on calling into some
      gic specific interfaces, and that would result in this build
      error:
      
      arch/arm/common/built-in.o: In function `bL_switch_to':
      :(.text+0x1230): undefined reference to `gic_get_sgir_physaddr'
      :(.text+0x1244): undefined reference to `gic_send_sgi'
      :(.text+0x1268): undefined reference to `gic_migrate_target'
      arch/arm/common/built-in.o: In function `bL_switcher_enable.part.4':
      :(.text.unlikely+0x2f8): undefined reference to `gic_get_cpu_id'
      
      This adds a Kconfig dependency to ensure we only build the big-little
      switcher if the GIC driver is present as well.
      
      Almost all ARMv7 platforms come with a GIC anyway, but it is possible
      to build a kernel that disables all platforms.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6c044fec
  16. 02 12月, 2015 4 次提交
  17. 29 11月, 2015 1 次提交
    • A
      ARM: 8454/1: OF implies OF_FLATTREE · aa7d5f18
      Arnd Bergmann 提交于
      On the ARM architecture, individual platforms select CONFIG_USE_OF if they
      need it, but all device tree code is keyed off CONFIG_OF. When building
      a platform without DT support and manually enabling CONFIG_OF, we now
      get a number of build errors, e.g.
      
      arch/arm/kernel/devtree.c: In function 'setup_machine_fdt':
      arch/arm/kernel/devtree.c:215:19: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration]
      
      We could now try to separate the use case of booting from DT vs. the
      case of using the dynamic implementation, but that seems more complicated
      than it can gain us.
      
      This simply changes the ARM Kconfig file to always enable OF_RESERVED_MEM
      and OF_EARLY_FLATTREE when CONFIG_OF is enabled. These options add a little
      extra code when we just want the dynamic OF implementation, but that seems
      like a rather obscure case, and this version solves all CONFIG_OF related
      randconfig regressions.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 0166dc11 ("of: make CONFIG_OF user selectable")
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      aa7d5f18
  18. 14 10月, 2015 1 次提交
  19. 10 10月, 2015 1 次提交
  20. 03 10月, 2015 3 次提交
  21. 28 9月, 2015 1 次提交
    • R
      ARM: make RiscPC depend on MMU · 868e87cc
      Russell King 提交于
      RiscPC fails to build if MMU is disabled:
      
      arch/arm/mach-rpc/ecard.c: In function 'ecard_init_pgtables':
      arch/arm/mach-rpc/ecard.c:229:2: error: implicit declaration of function 'pgd_offset' [-Werror=implicit-function-declaration]
      
      arrange for RiscPC to depend on MMU.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      868e87cc
  22. 14 9月, 2015 1 次提交
  23. 11 9月, 2015 1 次提交
    • D
      kexec: split kexec_load syscall from kexec core code · 2965faa5
      Dave Young 提交于
      There are two kexec load syscalls, kexec_load another and kexec_file_load.
       kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
      split kexec_load syscall code to kernel/kexec.c.
      
      And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
      use kexec_file_load only, or vice verse.
      
      The original requirement is from Ted Ts'o, he want kexec kernel signature
      being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
      kexec_load syscall can bypass the checking.
      
      Vivek Goyal proposed to create a common kconfig option so user can compile
      in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
      KEXEC_CORE so that old config files still work.
      
      Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
      architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
      KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
      kexec_load syscall.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Petr Tesarik <ptesarik@suse.cz>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2965faa5
  24. 27 8月, 2015 1 次提交
    • R
      ARM: software-based priviledged-no-access support · a5e090ac
      Russell King 提交于
      Provide a software-based implementation of the priviledged no access
      support found in ARMv8.1.
      
      Userspace pages are mapped using a different domain number from the
      kernel and IO mappings.  If we switch the user domain to "no access"
      when we enter the kernel, we can prevent the kernel from touching
      userspace.
      
      However, the kernel needs to be able to access userspace via the
      various user accessor functions.  With the wrapping in the previous
      patch, we can temporarily enable access when the kernel needs user
      access, and re-disable it afterwards.
      
      This allows us to trap non-intended accesses to userspace, eg, caused
      by an inadvertent dereference of the LIST_POISON* values, which, with
      appropriate user mappings setup, can be made to succeed.  This in turn
      can allow use-after-free bugs to be further exploited than would
      otherwise be possible.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a5e090ac