1. 08 Mar, 2016 1 commit
    • Bogicevic Sasa's avatar
      PCI: Include pci/pcie/Kconfig directly from pci/Kconfig · 5f8fc432
      Bogicevic Sasa authored
      Include pci/pcie/Kconfig directly from pci/Kconfig, so arches don't
      have to source both pci/Kconfig and pci/pcie/Kconfig.
      Note that this effectively adds pci/pcie/Kconfig to the following
      arches, because they already sourced drivers/pci/Kconfig but they
      previously did not source drivers/pci/pcie/Kconfig:
      [bhelgaas: changelog, source pci/pcie/Kconfig at top of pci/Kconfig, whitespace]
      Signed-off-by: default avatarSasa Bogicevic <brutallesale@gmail.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
  2. 21 Jan, 2016 1 commit
    • Christoph Hellwig's avatar
      dma-mapping: always provide the dma_map_ops based implementation · e1c7e324
      Christoph Hellwig authored
      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: default avatarChristoph 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: default avatarValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  3. 16 Jan, 2016 1 commit
  4. 15 Jan, 2016 1 commit
    • Daniel Cashman's avatar
      arm: mm: support ARCH_MMAP_RND_BITS · e0c25d95
      Daniel Cashman authored
      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: default avatarDaniel Cashman <dcashman@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: default avatarKees 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: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  5. 09 Jan, 2016 1 commit
  6. 04 Jan, 2016 2 commits
  7. 22 Dec, 2015 1 commit
  8. 21 Dec, 2015 1 commit
  9. 18 Dec, 2015 1 commit
  10. 17 Dec, 2015 2 commits
    • Arnd Bergmann's avatar
      ARM: make default platform work for NOMMU · 70722803
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
    • Nicolas Pitre's avatar
      ARM: 8477/1: runtime patch udiv/sdiv instructions into __aeabi_{u}idiv() · 42f25bdd
      Nicolas Pitre authored
      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
      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: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  11. 15 Dec, 2015 4 commits
    • Rob Herring's avatar
      ARM: versatile: convert to multi-platform · a29da136
      Rob Herring authored
      Now that all the prerequisites are in place, we can enable Versatile
      boards for multi-platform kernels.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    • Rob Herring's avatar
      ARM: versatile: switch to DT only booting and remove legacy code · 16956fed
      Rob Herring authored
      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: default avatarRob 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: default avatarArnd Bergmann <arnd@arndb.de>
    • Arnd Bergmann's avatar
      ARM: realview: remove sparsemem hack · fd0053c9
      Arnd Bergmann authored
      The realview-pbx platform has an elaborate way of avoiding the use of highmem
      by redefining its phys_to_virt function. In practice this doesn't help all
      that much, and it gets in the way of doing multiplatform builds for
      This removes the feature and kills off the mach/memory.h file for realview.
      We also lose the ability to do sparsemem with this patch, but that should
      be put back into place for generic multiplatform configurations, to save
      a little memory on PBX.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    • Daniel Lezcano's avatar
      clocksource/drivers/pxa_timer: Move the Kconfig rule · 389d9b58
      Daniel Lezcano authored
      Instead of having the clocksource's Kconfig depending on the arch, let the
      arch to select the timer it needs.
      The CLKSRC_OF dependency is removed because already selected by the
      ARCH_PXA, and it is added for SA1100.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
  12. 14 Dec, 2015 1 commit
  13. 13 Dec, 2015 1 commit
  14. 08 Dec, 2015 1 commit
  15. 07 Dec, 2015 4 commits
  16. 03 Dec, 2015 3 commits
    • Arnd Bergmann's avatar
      ARM: 8456/1: code patching only works on MMU · 437682ee
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    • Pavel Fedin's avatar
      ARM: 8463/1: Enable GICv2m on 32-bit virt machine · 0e2f91e9
      Pavel Fedin authored
      Modern qemu includes GICv2m support for both 64 and 32 bits, therefore
      32-bit guests may also use MSI.
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    • Arnd Bergmann's avatar
      ARM: 8458/1: bL_switcher: add GIC dependency · 6c044fec
      Arnd Bergmann authored
      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
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  17. 01 Dec, 2015 4 commits
  18. 28 Nov, 2015 1 commit
    • Arnd Bergmann's avatar
      ARM: 8454/1: OF implies OF_FLATTREE · aa7d5f18
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 0166dc11
       ("of: make CONFIG_OF user selectable")
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  19. 14 Oct, 2015 1 commit
  20. 09 Oct, 2015 1 commit
  21. 03 Oct, 2015 3 commits
  22. 28 Sep, 2015 1 commit
    • Russell King's avatar
      ARM: make RiscPC depend on MMU · 868e87cc
      Russell King authored
      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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  23. 14 Sep, 2015 1 commit
  24. 10 Sep, 2015 1 commit
    • Dave Young's avatar
      kexec: split kexec_load syscall from kexec core code · 2965faa5
      Dave Young authored
      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: default avatarDave 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  25. 26 Aug, 2015 1 commit
    • Russell King's avatar
      ARM: software-based priviledged-no-access support · a5e090ac
      Russell King authored
      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
      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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>