1. 20 Jan, 2022 12 commits
  2. 19 Jan, 2022 11 commits
    • Alexandre Ghiti's avatar
      riscv: Get rid of MAXPHYSMEM configs · db1503d3
      Alexandre Ghiti authored
      CONFIG_MAXPHYSMEM_* are actually never used, even the nommu defconfigs
      selecting the MAXPHYSMEM_2GB had no effects on PAGE_OFFSET since it was
      preempted by !MMU case right before.
      
      In addition, the move of the kernel mapping at the end of the address
      space broke the use of MAXPHYSMEM_2G with MMU since it defines PAGE_OFFSET
      at the same address as the kernel mapping.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Fixes: 2bfc6cd8 ("riscv: Move kernel mapping outside of linear mapping")
      Signed-off-by: default avatarAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: default avatarConor Dooley <Conor.Dooley@microchip.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      db1503d3
    • Jisheng Zhang's avatar
      riscv: bpf: Fix eBPF's exception tables · fc839c6d
      Jisheng Zhang authored
      eBPF's exception tables needs to be modified to relative synchronously.
      Suggested-by: default avatarTong Tiangen <tongtiangen@huawei.com>
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Fixes: 1f77ed94 ("riscv: switch to relative extable and other improvements")
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      fc839c6d
    • Jisheng Zhang's avatar
      riscv: mm: init: try best to remove #ifdef CONFIG_XIP_KERNEL usage · 805a3ebe
      Jisheng Zhang authored
      Currently, the #ifdef CONFIG_XIP_KERNEL usage can be divided into the
      following three types:
      
      The first one is for functions/declarations only used in XIP case.
      
      The second one is for XIP_FIXUP case. Something as below:
      |foo_type foo;
      |#ifdef CONFIG_XIP_KERNEL
      |#define foo    (*(foo_type *)XIP_FIXUP(&foo))
      |#endif
      
      Usually, it's better to let the foo macro sit with the foo var
      together. But if various foos are defined adjacently, we can
      save some #ifdef CONFIG_XIP_KERNEL usage by grouping them together.
      
      The third one is for different implementations for XIP, usually, this
      is a #ifdef...#else...#endif case.
      
      This patch moves the pt_ops macro to adjacent #ifdef CONFIG_XIP_KERNEL
      and group first type usage cases into one.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      805a3ebe
    • Jisheng Zhang's avatar
      riscv: mm: init: try IS_ENABLED(CONFIG_XIP_KERNEL) instead of #ifdef · fe036db7
      Jisheng Zhang authored
      Try our best to replace the conditional compilation using
      "#ifdef CONFIG_XIP_KERNEL" with "IS_ENABLED(CONFIG_XIP_KERNEL)", to
      simplify the code and to increase compile coverage.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      fe036db7
    • Jisheng Zhang's avatar
      riscv: mm: init: remove _pt_ops and use pt_ops directly · 3274a6ef
      Jisheng Zhang authored
      Except "pt_ops", other global vars when CONFIG_XIP_KERNEL=y is defined
      as below:
      
      |foo_type foo;
      |#ifdef CONFIG_XIP_KERNEL
      |#define foo	(*(foo_type *)XIP_FIXUP(&foo))
      |#endif
      
      Follow the same way for pt_ops to unify the style and to simplify code.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      3274a6ef
    • Jisheng Zhang's avatar
      riscv: mm: init: try best to use IS_ENABLED(CONFIG_64BIT) instead of #ifdef · 07aabe8f
      Jisheng Zhang authored
      Try our best to replace the conditional compilation using
      "#ifdef CONFIG_64BIT" by a check for "IS_ENABLED(CONFIG_64BIT)", to
      simplify the code and to increase compile coverage.
      
      Now we can also remove the __maybe_unused used in max_mapped_addr
      declaration.
      
      We also remove the BUG_ON check of mapping the last 4K bytes of the
      addressable memory since this is always true for every kernel actually.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      07aabe8f
    • Jisheng Zhang's avatar
      riscv: mm: init: remove unnecessary "#ifdef CONFIG_CRASH_DUMP" · 902d6364
      Jisheng Zhang authored
      The is_kdump_kernel() returns false for !CRASH_DUMP case, so we don't
      need the #ifdef CONFIG_CRASH_DUMP for is_kdump_kernel() checking.
      Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
      Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      902d6364
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · f1b744f6
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Support for the DA9063 as used on the HiFive Unmatched.
      
       - Support for relative extables, which puts us in line with other
         architectures and save some space in vmlinux.
      
       - A handful of kexec fixes/improvements, including the ability to run
         crash kernels from PCI-addressable memory on the HiFive Unmatched.
      
       - Support for the SBI SRST extension, which allows systems that do not
         have an explicit driver in Linux to reboot.
      
       - A handful of fixes and cleanups, including to the defconfigs and
         device trees.
      
      * tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits)
        RISC-V: Use SBI SRST extension when available
        riscv: mm: fix wrong phys_ram_base value for RV64
        RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n
        riscv: head: remove useless __PAGE_ALIGNED_BSS and .balign
        riscv: errata: alternative: mark vendor_patch_func __initdata
        riscv: head: make secondary_start_common() static
        riscv: remove cpu_stop()
        riscv: try to allocate crashkern region from 32bit addressible memory
        riscv: use hart id instead of cpu id on machine_kexec
        riscv: Don't use va_pa_offset on kdump
        riscv: dts: sifive: fu540-c000: Fix PLIC node
        riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values
        riscv: dts: sifive: Group tuples in register properties
        riscv: dts: sifive: Group tuples in interrupt properties
        riscv: dts: microchip: mpfs: Group tuples in interrupt properties
        riscv: dts: microchip: mpfs: Fix clock controller node
        riscv: dts: microchip: mpfs: Fix reference clock node
        riscv: dts: microchip: mpfs: Fix PLIC node
        riscv: dts: microchip: mpfs: Drop empty chosen node
        riscv: dts: canaan: Group tuples in interrupt properties
        ...
      f1b744f6
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · fd6f57bf
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Add new kconfig target 'make mod2noconfig', which will be useful to
         speed up the build and test iteration.
      
       - Raise the minimum supported version of LLVM to 11.0.0
      
       - Refactor certs/Makefile
      
       - Change the format of include/config/auto.conf to stop double-quoting
         string type CONFIG options.
      
       - Fix ARCH=sh builds in dash
      
       - Separate compression macros for general purposes (cmd_bzip2 etc.) and
         the ones for decompressors (cmd_bzip2_with_size etc.)
      
       - Misc Makefile cleanups
      
      * tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
        kbuild: add cmd_file_size
        arch: decompressor: remove useless vmlinux.bin.all-y
        kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}
        kbuild: drop $(size_append) from cmd_zstd
        sh: rename suffix-y to suffix_y
        doc: kbuild: fix default in `imply` table
        microblaze: use built-in function to get CPU_{MAJOR,MINOR,REV}
        certs: move scripts/extract-cert to certs/
        kbuild: do not quote string values in include/config/auto.conf
        kbuild: do not include include/config/auto.conf from shell scripts
        certs: simplify $(srctree)/ handling and remove config_filename macro
        kbuild: stop using config_filename in scripts/Makefile.modsign
        certs: remove misleading comments about GCC PR
        certs: refactor file cleaning
        certs: remove unneeded -I$(srctree) option for system_certificates.o
        certs: unify duplicated cmd_extract_certs and improve the log
        certs: use $< and $@ to simplify the key generation rule
        kbuild: remove headers_check stub
        kbuild: move headers_check.pl to usr/include/
        certs: use if_changed to re-generate the key when the key type is changed
        ...
      fd6f57bf
    • Linus Torvalds's avatar
      Merge branch 'random-5.17-rc1-for-linus' of... · 0ed90597
      Linus Torvalds authored
      Merge branch 'random-5.17-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random
      
      Pull random number generator fixes from Jason Donenfeld:
      
       - Some Kconfig changes resulted in BIG_KEYS being unselectable, which
         Justin sent a patch to fix.
      
       - Geert pointed out that moving to BLAKE2s bloated vmlinux on little
         machines, like m68k, so we now compensate for this.
      
       - Numerous style and house cleaning fixes, meant to have a cleaner base
         for future changes.
      
      * 'random-5.17-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        random: simplify arithmetic function flow in account()
        random: selectively clang-format where it makes sense
        random: access input_pool_data directly rather than through pointer
        random: cleanup fractional entropy shift constants
        random: prepend remaining pool constants with POOL_
        random: de-duplicate INPUT_POOL constants
        random: remove unused OUTPUT_POOL constants
        random: rather than entropy_store abstraction, use global
        random: remove unused extract_entropy() reserved argument
        random: remove incomplete last_data logic
        random: cleanup integer types
        random: cleanup poolinfo abstraction
        random: fix typo in comments
        lib/crypto: sha1: re-roll loops to reduce code size
        lib/crypto: blake2s: move hmac construction into wireguard
        lib/crypto: add prompts back to crypto libraries
      0ed90597
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 39b419ea
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This contains a change to the stm32 hwspinlock driver to ensure that
        the hardware is operational even without CONFIG_PM"
      
      * tag 'hwlock-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        hwspinlock: stm32: enable clock at probe
      39b419ea
  3. 18 Jan, 2022 17 commits