Skip to content
Snippets Groups Projects
  1. Dec 01, 2020
    • Nathan Chancellor's avatar
      kbuild: Hoist '--orphan-handling' into Kconfig · 59612b24
      Nathan Chancellor authored
      Currently, '--orphan-handling=warn' is spread out across four different
      architectures in their respective Makefiles, which makes it a little
      unruly to deal with in case it needs to be disabled for a specific
      linker version (in this case, ld.lld 10.0.1).
      
      To make it easier to control this, hoist this warning into Kconfig and
      the main Makefile so that disabling it is simpler, as the warning will
      only be enabled in a couple places (main Makefile and a couple of
      compressed boot folders that blow away LDFLAGS_vmlinx) and making it
      conditional is easier due to Kconfig syntax. One small additional
      benefit of this is saving a call to ld-option on incremental builds
      because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN.
      
      To keep the list of supported architectures the same, introduce
      CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to
      gain this automatically after all of the sections are specified and size
      asserted. A special thanks to Kees Cook for the help text on this
      config.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1187
      
      
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Tested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      59612b24
  2. Oct 14, 2020
  3. Oct 08, 2020
  4. Sep 13, 2020
    • Marc Zyngier's avatar
      ARM: Allow IPIs to be handled as normal interrupts · 56afcd3d
      Marc Zyngier authored
      
      In order to deal with IPIs as normal interrupts, let's add
      a new way to register them with the architecture code.
      
      set_smp_ipi_range() takes a range of interrupts, and allows
      the arch code to request them as if the were normal interrupts.
      A standard handler is then called by the core IRQ code to deal
      with the IPI.
      
      This means that we don't need to call irq_enter/irq_exit, and
      that we don't need to deal with set_irq_regs either. So let's
      move the dispatcher into its own function, and leave handle_IPI()
      as a compatibility function.
      
      On the sending side, let's make use of ipi_send_mask, which
      already exists for this purpose.
      
      One of the major difference is that we end up, in some cases
      (such as when performing IRQ time accounting on the scheduler
      IPI), end up with nested irq_enter()/irq_exit() pairs.
      Other than the (relatively small) overhead, there should be
      no consequences to it (these pairs are designed to nest
      correctly, and the accounting shouldn't be off).
      
      Reviewed-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      56afcd3d
  5. Sep 09, 2020
  6. Aug 27, 2020
  7. Aug 20, 2020
  8. Aug 19, 2020
  9. Jul 29, 2020
  10. Jul 28, 2020
  11. Jul 22, 2020
  12. Jul 21, 2020
    • Mike Rapoport's avatar
      ARM: 8993/1: remove it8152 PCI controller driver · 6da5238f
      Mike Rapoport authored
      
      The it8152 PCI host controller was only used by cm-x2xx platforms.
      Since these platforms were removed, there is no point to keep it8152
      driver.
      
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      6da5238f
    • Stefan Agner's avatar
      ARM: 8991/1: use VFP assembler mnemonics if available · 2cbd1cc3
      Stefan Agner authored
      The integrated assembler of Clang 10 and earlier do not allow to access
      the VFP registers through the coprocessor load/store instructions:
      arch/arm/vfp/vfpmodule.c:342:2: error: invalid operand for instruction
              fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_DEX|FPEXC_FP2V|FPEXC_VV|FPEXC_TRAP_MASK));
              ^
      arch/arm/vfp/vfpinstr.h:79:6: note: expanded from macro 'fmxr'
              asm("mcr p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr   " #_vfp_ ", %0"
                  ^
      <inline asm>:1:6: note: instantiated into assembly here
              mcr p10, 7, r0, cr8, cr0, 0 @ fmxr      FPEXC, r0
                  ^
      
      This has been addressed with Clang 11 [0]. However, to support earlier
      versions of Clang and for better readability use of VFP assembler
      mnemonics still is preferred.
      
      Ideally we would replace this code with the unified assembler language
      mnemonics vmrs/vmsr on call sites along with .fpu assembler directives.
      The GNU assembler supports the .fpu directive at least since 2.17 (when
      documentation has been added). Since Linux requires binutils 2.21 it is
      safe to use .fpu directive. However, binutils does not allow to use
      FPINST or FPINST2 as an argument to vmrs/vmsr instructions up to
      binutils 2.24 (see binutils commit 16d02dc907c5):
      arch/arm/vfp/vfphw.S: Assembler messages:
      arch/arm/vfp/vfphw.S:162: Error: operand 0 must be FPSID or FPSCR pr FPEXC -- `vmsr FPINST,r6'
      arch/arm/vfp/vfphw.S:165: Error: operand 0 must be FPSID or FPSCR pr FPEXC -- `vmsr FPINST2,r8'
      arch/arm/vfp/vfphw.S:235: Error: operand 1 must be a VFP extension System Register -- `vmrs r3,FPINST'
      arch/arm/vfp/vfphw.S:238: Error: operand 1 must be a VFP extension System Register -- `vmrs r12,FPINST2'
      
      Use as-instr in Kconfig to check if FPINST/FPINST2 can be used. If they
      can be used make use of .fpu directives and UAL VFP mnemonics for
      register access.
      
      This allows to build vfpmodule.c with Clang and its integrated assembler.
      
      [0] https://reviews.llvm.org/D59733
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/905
      
      
      
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      2cbd1cc3
  13. Jul 19, 2020
  14. Jul 04, 2020
  15. Jun 13, 2020
    • Masahiro Yamada's avatar
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada authored
      
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
    • Chris Packham's avatar
      ARM: 8984/1: Kconfig: set default ZBOOT_ROM_TEXT/BSS value to 0x0 · 39c3e304
      Chris Packham authored
      
      ZBOOT_ROM_TEXT and ZBOOT_ROM_BSS are defined as 'hex' but had a default
      of "0". Kconfig will helpfully expand a text entry of 0 to 0x0 but
      because this is not the same as the default value it was treated as
      being explicitly set when running 'make savedefconfig' so most arm
      defconfigs have CONFIG_ZBOOT_ROM_TEXT=0x0 and CONFIG_ZBOOT_ROM_BSS=0x0.
      
      Change the default to 0x0 which will mean next time the defconfigs are
      re-generated the spurious config entries will be removed.
      
      Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      39c3e304
  16. May 26, 2020
  17. May 19, 2020
  18. May 15, 2020
  19. May 05, 2020
    • Stephen Boyd's avatar
      clk: Allow the common clk framework to be selectable · bbd7ffdb
      Stephen Boyd authored
      Enable build testing and configuration control of the common clk
      framework so that more code coverage and testing can be done on the
      common clk framework across various architectures. This also nicely
      removes the requirement that architectures must select the framework
      when they don't use it in architecture code.
      
      There's one snag with doing this, and that's making sure that randconfig
      builds don't select this option when some architecture or platform
      implements 'struct clk' outside of the common clk framework. Introduce a
      new config option 'HAVE_LEGACY_CLK' to indicate those platforms that
      haven't migrated to the common clk framework and therefore shouldn't be
      allowed to select this new config option. Also add a note that we hope
      one day to remove this config entirely.
      
      Based on a patch by Mark Brown <broonie@kernel.org>.
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
      Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: <linux-mips@vger.kernel.org>
      Cc: <linux-c6x-dev@linux-c6x.org>
      Cc: <linux-m68k@lists.linux-m68k.org>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: <linux-sh@vger.kernel.org>
      Link: https://lore.kernel.org/r/1470915049-15249-1-git-send-email-broonie@kernel.org
      
      
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      Link: https://lkml.kernel.org/r/20200409064416.83340-8-sboyd@kernel.org
      
      
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      bbd7ffdb
    • Stephen Boyd's avatar
      ARM: Remove redundant CLKDEV_LOOKUP selects · e8bd633b
      Stephen Boyd authored
      
      These platforms select COMMON_CLK indirectly through use of the
      ARCH_MULTIPLATFORM config option that they depend on implicitly via some
      V7/V6/V5 multi platform config option. The COMMON_CLK config option
      already selects CLKDEV_LOOKUP so it's redundant to have this selected
      again.
      
      Cc: Tony Prisk <linux@prisktech.co.nz>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lkml.kernel.org/r/20200409064416.83340-3-sboyd@kernel.org
      e8bd633b
  20. Apr 23, 2020
  21. Apr 16, 2020
  22. Apr 12, 2020
    • Andreas Färber's avatar
      ARM: Prepare Realtek RTD1195 · 86aeee4d
      Andreas Färber authored
      
      Introduce ARCH_REALTEK Kconfig option also for 32-bit Arm.
      
      Override the text offset to cope with boot ROM occupying first 0xa800
      bytes and further reservations up to 0xf4000 (compare Device Tree).
      
      Add a custom machine_desc to enforce memory carveout for I/O registers.
      
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
      86aeee4d
  23. Mar 24, 2020
  24. Feb 17, 2020
  25. Feb 14, 2020
    • Frederic Weisbecker's avatar
      arm: Remove TIF_NOHZ · 1acb2249
      Frederic Weisbecker authored
      
      Arm entry code calls context tracking from fast path. TIF_NOHZ is unused
      and can be safely removed.
      
      Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <linux@armlinux.org.uk>
      1acb2249
    • Frederic Weisbecker's avatar
      context-tracking: Introduce CONFIG_HAVE_TIF_NOHZ · 490f561b
      Frederic Weisbecker authored
      
      A few archs (x86, arm, arm64) don't rely anymore on TIF_NOHZ to call
      into context tracking on user entry/exit but instead use static keys
      (or not) to optimize those calls. Ideally every arch should migrate to
      that behaviour in the long run.
      
      Settle a config option to let those archs remove their TIF_NOHZ
      definitions.
      
      Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: David S. Miller <davem@davemloft.net>
      490f561b
  26. Feb 04, 2020
  27. Jan 25, 2020
    • Vincenzo Frascino's avatar
      ARM: 8952/1: Disable kmemleak on XIP kernels · bc420c6c
      Vincenzo Frascino authored
      
      Kmemleak relies on specific symbols to register the read only data
      during init (e.g. __start_ro_after_init).
      Trying to build an XIP kernel on arm results in the linking error
      reported below because when this option is selected read only data
      after init are not allowed since .data is read only (.rodata).
      
        arm-linux-gnueabihf-ld: mm/kmemleak.o: in function `kmemleak_init':
        kmemleak.c:(.init.text+0x148): undefined reference to `__end_ro_after_init'
        arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x14c):
           undefined reference to `__end_ro_after_init'
        arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x150):
           undefined reference to `__start_ro_after_init'
        arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x156):
           undefined reference to `__start_ro_after_init'
        arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x162):
           undefined reference to `__start_ro_after_init'
        arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x16a):
           undefined reference to `__start_ro_after_init'
        linux/Makefile:1078: recipe for target 'vmlinux' failed
      
      Fix the issue enabling kmemleak only on non XIP kernels.
      
      Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      bc420c6c
    • Vincenzo Frascino's avatar
      ARM: 8951/1: Fix Kexec compilation issue. · 76950f71
      Vincenzo Frascino authored
      
      To perform the reserve_crashkernel() operation kexec uses SECTION_SIZE to
      find a memblock in a range.
      SECTION_SIZE is not defined for nommu systems. Trying to compile kexec in
      these conditions results in a build error:
      
        linux/arch/arm/kernel/setup.c: In function ‘reserve_crashkernel’:
        linux/arch/arm/kernel/setup.c:1016:25: error: ‘SECTION_SIZE’ undeclared
           (first use in this function); did you mean ‘SECTIONS_WIDTH’?
                   crash_size, SECTION_SIZE);
                               ^~~~~~~~~~~~
                               SECTIONS_WIDTH
        linux/arch/arm/kernel/setup.c:1016:25: note: each undeclared identifier
           is reported only once for each function it appears in
        linux/scripts/Makefile.build:265: recipe for target 'arch/arm/kernel/setup.o'
           failed
      
      Make KEXEC depend on MMU to fix the compilation issue.
      
      Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      76950f71
  28. Jan 07, 2020
  29. Dec 13, 2019
  30. Nov 25, 2019
  31. Nov 11, 2019
    • Christoph Hellwig's avatar
      dma-direct: provide mmap and get_sgtable method overrides · 34dc0ea6
      Christoph Hellwig authored
      
      For dma-direct we know that the DMA address is an encoding of the
      physical address that we can trivially decode.  Use that fact to
      provide implementations that do not need the arch_dma_coherent_to_pfn
      architecture hook.  Note that we still can only support mmap of
      non-coherent memory only if the architecture provides a way to set an
      uncached bit in the page tables.  This must be true for architectures
      that use the generic remap helpers, but other architectures can also
      manually select it.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      34dc0ea6
Loading