Merge tag 'riscv-for-linus-6.5-mw1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Jun 2023 16:37:26 +0000 (09:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Jun 2023 16:37:26 +0000 (09:37 -0700)
Pull RISC-V updates from Palmer Dabbelt:

 - Support for ACPI

 - Various cleanups to the ISA string parsing, including making them
   case-insensitive

 - Support for the vector extension

 - Support for independent irq/softirq stacks

 - Our CPU DT binding now has "unevaluatedProperties: false"

* tag 'riscv-for-linus-6.5-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (78 commits)
  riscv: hibernate: remove WARN_ON in save_processor_state
  dt-bindings: riscv: cpus: switch to unevaluatedProperties: false
  dt-bindings: riscv: cpus: add a ref the common cpu schema
  riscv: stack: Add config of thread stack size
  riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK
  riscv: stack: Support HAVE_IRQ_EXIT_ON_IRQ_STACK
  RISC-V: always report presence of extensions formerly part of the base ISA
  dt-bindings: riscv: explicitly mention assumption of Zicntr & Zihpm support
  RISC-V: remove decrement/increment dance in ISA string parser
  RISC-V: rework comments in ISA string parser
  RISC-V: validate riscv,isa at boot, not during ISA string parsing
  RISC-V: split early & late of_node to hartid mapping
  RISC-V: simplify register width check in ISA string parsing
  perf: RISC-V: Limit the number of counters returned from SBI
  riscv: replace deprecated scall with ecall
  riscv: uprobes: Restore thread.bad_cause
  riscv: mm: try VMA lock-based page fault handling first
  riscv: mm: Pre-allocate PGD entries for vmalloc/modules area
  RISC-V: hwprobe: Expose Zba, Zbb, and Zbs
  RISC-V: Track ISA extensions per hart
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
MAINTAINERS
arch/riscv/Kconfig
arch/riscv/configs/defconfig
arch/riscv/kernel/Makefile
arch/riscv/mm/fault.c
arch/riscv/mm/init.c
include/uapi/linux/elf.h

diff --cc MAINTAINERS
@@@ -406,6 -406,19 +406,13 @@@ L:       linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/acpi/arm64
  
 -ACPI SERIAL MULTI INSTANTIATE DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 -L:    platform-driver-x86@vger.kernel.org
 -S:    Maintained
 -F:    drivers/platform/x86/serial-multi-instantiate.c
 -
+ ACPI FOR RISC-V (ACPI/riscv)
+ M:    Sunil V L <sunilvl@ventanamicro.com>
+ L:    linux-acpi@vger.kernel.org
+ L:    linux-riscv@lists.infradead.org
+ S:    Maintained
+ F:    drivers/acpi/riscv/
  ACPI PCC(Platform Communication Channel) MAILBOX DRIVER
  M:    Sudeep Holla <sudeep.holla@arm.com>
  L:    linux-acpi@vger.kernel.org
Simple merge
Simple merge
Simple merge
@@@ -295,11 -274,54 +283,41 @@@ void handle_page_fault(struct pt_regs *
                flags |= FAULT_FLAG_WRITE;
        else if (cause == EXC_INST_PAGE_FAULT)
                flags |= FAULT_FLAG_INSTRUCTION;
+ #ifdef CONFIG_PER_VMA_LOCK
+       if (!(flags & FAULT_FLAG_USER))
+               goto lock_mmap;
+       vma = lock_vma_under_rcu(mm, addr);
+       if (!vma)
+               goto lock_mmap;
+       if (unlikely(access_error(cause, vma))) {
+               vma_end_read(vma);
+               goto lock_mmap;
+       }
+       fault = handle_mm_fault(vma, addr, flags | FAULT_FLAG_VMA_LOCK, regs);
+       vma_end_read(vma);
+       if (!(fault & VM_FAULT_RETRY)) {
+               count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
+               goto done;
+       }
+       count_vm_vma_lock_event(VMA_LOCK_RETRY);
+       if (fault_signal_pending(fault, regs)) {
+               if (!user_mode(regs))
+                       no_context(regs, addr);
+               return;
+       }
+ lock_mmap:
+ #endif /* CONFIG_PER_VMA_LOCK */
  retry:
 -      mmap_read_lock(mm);
 -      vma = find_vma(mm, addr);
 +      vma = lock_mm_and_find_vma(mm, addr, regs);
        if (unlikely(!vma)) {
                tsk->thread.bad_cause = cause;
 -              bad_area(regs, mm, code, addr);
 -              return;
 -      }
 -      if (likely(vma->vm_start <= addr))
 -              goto good_area;
 -      if (unlikely(!(vma->vm_flags & VM_GROWSDOWN))) {
 -              tsk->thread.bad_cause = cause;
 -              bad_area(regs, mm, code, addr);
 -              return;
 -      }
 -      if (unlikely(expand_stack(vma, addr))) {
 -              tsk->thread.bad_cause = cause;
 -              bad_area(regs, mm, code, addr);
 +              bad_area_nosemaphore(regs, code, addr);
                return;
        }
  
Simple merge
Simple merge