]> Git Repo - linux.git/commitdiff
riscv: Kconfig: Style cleanups
authorPalmer Dabbelt <[email protected]>
Fri, 1 Jul 2022 02:18:51 +0000 (19:18 -0700)
committerPalmer Dabbelt <[email protected]>
Fri, 1 Jul 2022 02:26:16 +0000 (19:26 -0700)
The majority of the Kconfig files use a single tab for basic indentation
and a single tab followed by two whitespaces for help text indentation.
Fix the lines that don't follow this convention.

While at it, add trailing comments to endif/endmenu statements for
better readability.

* 'riscv-kconfig_cleanups' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux:
  riscv: Kconfig.socs: Add comments
  riscv: Kconfig.erratas: Add comments
  riscv: Kconfig: Fix indentation and add comments

1  2 
arch/riscv/Kconfig
arch/riscv/Kconfig.erratas
arch/riscv/Kconfig.socs

diff --combined arch/riscv/Kconfig
index 32ffef9f6e5b4f116034fb1c65388e80d082c361,4507847d7c9c5a3b2883611c71b014459f5c3b26..b17fd4666b0c68d31190887b5615802e3cb16c31
@@@ -38,9 -38,7 +38,9 @@@ config RISC
        select ARCH_SUPPORTS_ATOMIC_RMW
        select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
        select ARCH_SUPPORTS_HUGETLBFS if MMU
 +      select ARCH_SUPPORTS_PAGE_TABLE_CHECK
        select ARCH_USE_MEMTEST
 +      select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
        select ARCH_WANT_FRAME_POINTERS
        select ARCH_WANT_GENERAL_HUGETLB
@@@ -78,7 -76,6 +78,7 @@@
        select HAVE_ARCH_KGDB if !XIP_KERNEL
        select HAVE_ARCH_KGDB_QXFER_PKT
        select HAVE_ARCH_MMAP_RND_BITS if MMU
 +      select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
@@@ -130,18 -127,12 +130,18 @@@ config ARCH_MMAP_RND_BITS_MI
        default 18 if 64BIT
        default 8
  
 +config ARCH_MMAP_RND_COMPAT_BITS_MIN
 +      default 8
 +
  # max bits determined by the following formula:
  #  VA_BITS - PAGE_SHIFT - 3
  config ARCH_MMAP_RND_BITS_MAX
        default 24 if 64BIT # SV39 based
        default 17
  
 +config ARCH_MMAP_RND_COMPAT_BITS_MAX
 +      default 17
 +
  # set if we run in machine mode, cleared if we run in supervisor mode
  config RISCV_M_MODE
        bool
@@@ -333,49 -324,16 +333,49 @@@ config NODES_SHIF
          Specify the maximum number of NUMA Nodes available on the target
          system.  Increases memory reserved to accommodate various tables.
  
 +config RISCV_ALTERNATIVE
 +      bool
 +      depends on !XIP_KERNEL
 +      help
 +        This Kconfig allows the kernel to automatically patch the
 +        errata required by the execution platform at run time. The
 +        code patching is performed once in the boot stages. It means
 +        that the overhead from this mechanism is just taken once.
 +
 +config RISCV_ALTERNATIVE_EARLY
 +      bool
 +      depends on RISCV_ALTERNATIVE
 +      help
 +        Allows early patching of the kernel for special errata
 +
  config RISCV_ISA_C
        bool "Emit compressed instructions when building Linux"
        default y
        help
-          Adds "C" to the ISA subsets that the toolchain is allowed to emit
-          when building Linux, which results in compressed instructions in the
-          Linux binary.
+         Adds "C" to the ISA subsets that the toolchain is allowed to emit
+         when building Linux, which results in compressed instructions in the
+         Linux binary.
  
-          If you don't know what to do here, say Y.
+         If you don't know what to do here, say Y.
  
 +config RISCV_ISA_SVPBMT
 +      bool "SVPBMT extension support"
 +      depends on 64BIT && MMU
 +      select RISCV_ALTERNATIVE
 +      default y
 +      help
 +         Adds support to dynamically detect the presence of the SVPBMT
 +         ISA-extension (Supervisor-mode: page-based memory types) and
 +         enable its usage.
 +
 +         The memory type for a page contains a combination of attributes
 +         that indicate the cacheability, idempotency, and ordering
 +         properties for access to that page.
 +
 +         The SVPBMT extension is only available on 64Bit cpus.
 +
 +         If you don't know what to do here, say Y.
 +
  config FPU
        bool "FPU support"
        default y
  
          If you don't know what to do here, say Y.
  
- endmenu
+ endmenu # "Platform type"
  
  menu "Kernel features"
  
@@@ -401,7 -359,7 +401,7 @@@ config RISCV_SBI_V0
  config RISCV_BOOT_SPINWAIT
        bool "Spinwait booting method"
        depends on SMP
 -      default y
 +      default y if RISCV_SBI_V01 || RISCV_M_MODE
        help
          This enables support for booting Linux via spinwait method. In the
          spinwait method, all cores randomly jump to Linux. One of the cores
          rely on ordered booting via SBI HSM extension which gets chosen
          dynamically at runtime if the firmware supports it.
  
 +        Since spinwait is incompatible with sparse hart IDs, it requires
 +        NR_CPUS be large enough to contain the physical hart ID of the first
 +        hart to enter Linux.
 +
 +        If unsure what to do here, say N.
 +
  config KEXEC
        bool "Kexec system call"
        select KEXEC_CORE
  
          The name comes from the similarity to the exec system call.
  
 +config KEXEC_FILE
 +      bool "kexec file based systmem call"
 +      select KEXEC_CORE
 +      select KEXEC_ELF
 +      select HAVE_IMA_KEXEC if IMA
 +      depends on 64BIT
 +      help
 +        This is new version of kexec system call. This system call is
 +        file based and takes file descriptors as system call argument
 +        for kernel and initramfs as opposed to list of segments as
 +        accepted by previous system call.
 +
 +        If you don't know what to do here, say Y.
 +
 +config ARCH_HAS_KEXEC_PURGATORY
 +      def_bool KEXEC_FILE
 +      select BUILD_BIN2C
 +      depends on CRYPTO=y
 +      depends on CRYPTO_SHA256=y
 +
  config CRASH_DUMP
        bool "Build kdump crash kernel"
        help
  
          For more details see Documentation/admin-guide/kdump/kdump.rst
  
- endmenu
 +config COMPAT
 +      bool "Kernel support for 32-bit U-mode"
 +      default 64BIT
 +      depends on 64BIT && MMU
 +      help
 +        This option enables support for a 32-bit U-mode running under a 64-bit
 +        kernel at S-mode. riscv32-specific components such as system calls,
 +        the user helper functions (vdso), signal rt_frame functions and the
 +        ptrace interface are handled appropriately by the kernel.
 +
 +        If you want to execute 32-bit userspace applications, say Y.
 +
+ endmenu # "Kernel features"
  
  menu "Boot options"
  
@@@ -510,7 -430,6 +510,6 @@@ config CMDLINE_EXTEN
          cases where the provided arguments are insufficient and
          you don't want to or cannot modify them.
  
  config CMDLINE_FORCE
        bool "Always use the default kernel command string"
        help
@@@ -548,7 -467,7 +547,7 @@@ config CC_HAVE_STACKPROTECTOR_TL
  
  config STACKPROTECTOR_PER_TASK
        def_bool y
 -      depends on !GCC_PLUGIN_RANDSTRUCT
 +      depends on !RANDSTRUCT
        depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
  
  config PHYS_RAM_BASE_FIXED
@@@ -602,7 -521,7 +601,7 @@@ config XIP_PHYS_ADD
          be linked for and stored to.  This address is dependent on your
          own flash usage.
  
- endmenu
+ endmenu # "Boot options"
  
  config BUILTIN_DTB
        bool
@@@ -613,12 -532,12 +612,12 @@@ menu "Power management options
  
  source "kernel/power/Kconfig"
  
- endmenu
+ endmenu # "Power management options"
  
  menu "CPU Power Management"
  
  source "drivers/cpuidle/Kconfig"
  
- endmenu
+ endmenu # "CPU Power Management"
  
  source "arch/riscv/kvm/Kconfig"
index 457ac72c9b36d6296064201a4bfd5318095c644a,076005c5dad598c85d7eb91548778cf0c4a4763b..f62b62807e853a7a608bb47a516c02220b25f64b
@@@ -1,9 -1,18 +1,9 @@@
  menu "CPU errata selection"
  
 -config RISCV_ERRATA_ALTERNATIVE
 -      bool "RISC-V alternative scheme"
 -      depends on !XIP_KERNEL
 -      default y
 -      help
 -        This Kconfig allows the kernel to automatically patch the
 -        errata required by the execution platform at run time. The
 -        code patching is performed once in the boot stages. It means
 -        that the overhead from this mechanism is just taken once.
 -
  config ERRATA_SIFIVE
        bool "SiFive errata"
 -      depends on RISCV_ERRATA_ALTERNATIVE
 +      depends on !XIP_KERNEL
 +      select RISCV_ALTERNATIVE
        help
          All SiFive errata Kconfig depend on this Kconfig. Disabling
          this Kconfig will disable all SiFive errata. Please say "Y"
@@@ -33,26 -42,4 +33,26 @@@ config ERRATA_SIFIVE_CIP_120
  
          If you don't know what to do here, say "Y".
  
- endmenu
 +config ERRATA_THEAD
 +      bool "T-HEAD errata"
 +      depends on !XIP_KERNEL
 +      select RISCV_ALTERNATIVE
 +      help
 +        All T-HEAD errata Kconfig depend on this Kconfig. Disabling
 +        this Kconfig will disable all T-HEAD errata. Please say "Y"
 +        here if your platform uses T-HEAD CPU cores.
 +
 +        Otherwise, please say "N" here to avoid unnecessary overhead.
 +
 +config ERRATA_THEAD_PBMT
 +      bool "Apply T-Head memory type errata"
 +      depends on ERRATA_THEAD && 64BIT
 +      select RISCV_ALTERNATIVE_EARLY
 +      default y
 +      help
 +        This will apply the memory type errata to handle the non-standard
 +        memory type bits in page-table-entries on T-Head SoCs.
 +
 +        If you don't know what to do here, say "Y".
 +
+ endmenu # "CPU errata selection"
diff --combined arch/riscv/Kconfig.socs
index 85670dc9fe95d5779df78b733668429cb3bc9775,6a4ab7fdbcc6e4d7e1ae824eaa20ef275a6a13e8..69774bb362d6a7f34950de06756469d20f63e206
@@@ -14,6 -14,7 +14,6 @@@ config SOC_SIFIV
        select CLK_SIFIVE
        select CLK_SIFIVE_PRCI
        select SIFIVE_PLIC
 -      select RISCV_ERRATA_ALTERNATIVE if !XIP_KERNEL
        select ERRATA_SIFIVE if !XIP_KERNEL
        help
          This enables support for SiFive SoC platform hardware.
@@@ -37,7 -38,7 +37,7 @@@ config SOC_VIR
        select SIFIVE_PLIC
        select PM_GENERIC_DOMAINS if PM
        select PM_GENERIC_DOMAINS_OF if PM && OF
 -      select RISCV_SBI_CPUIDLE if CPU_IDLE
 +      select RISCV_SBI_CPUIDLE if CPU_IDLE && RISCV_SBI
        help
          This enables support for QEMU Virt Machine.
  
@@@ -78,6 -79,6 +78,6 @@@ config SOC_CANAAN_K210_DTB_SOURC
          for the DTS file that will be used to produce the DTB linked into the
          kernel.
  
- endif
+ endif # SOC_CANAAN
  
- endmenu
+ endmenu # "SoC selection"
This page took 0.084079 seconds and 4 git commands to generate.