Commit 58d4fafd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull RISC-V updates from Paul Walmsley:
 "Add the following new features:

   - Generic CPU topology description support for DT-based platforms,
     including ARM64, ARM and RISC-V.

   - Sparsemem support

   - Perf callchain support

   - SiFive PLIC irqchip modifications, in preparation for M-mode Linux

  and clean up the code base:

   - Clean up chip-specific register (CSR) manipulation code, IPIs, TLB
     flushing, and the RISC-V CPU-local timer code

   - Kbuild cleanup from one of the Kbuild maintainers"

[ The CPU topology parts came in through the arm64 tree with a shared
  branch   - Linus ]

* tag 'riscv/for-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  irqchip/sifive-plic: set max threshold for ignored handlers
  riscv: move the TLB flush logic out of line
  riscv: don't use the rdtime(h) pseudo-instructions
  riscv: cleanup riscv_cpuid_to_hartid_mask
  riscv: optimize send_ipi_single
  riscv: cleanup send_ipi_mask
  riscv: refactor the IPI code
  riscv: Add support for libdw
  riscv: Add support for perf registers sampling
  riscv: Add perf callchain support
  riscv: add arch/riscv/Kbuild
  RISC-V: Implement sparsemem
  riscv: Using CSR numbers to access CSRs
parents dbcda58a 9ce06497
Loading
Loading
Loading
Loading

arch/riscv/Kbuild

0 → 100644
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

obj-y += kernel/ mm/ net/
+23 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ config RISCV
	select HAVE_DMA_CONTIGUOUS
	select HAVE_FUTEX_CMPXCHG if FUTEX
	select HAVE_PERF_EVENTS
	select HAVE_PERF_REGS
	select HAVE_PERF_USER_STACK_DUMP
	select HAVE_SYSCALL_TRACEPOINTS
	select IRQ_DOMAIN
	select SPARSE_IRQ
@@ -55,6 +57,7 @@ config RISCV
	select EDAC_SUPPORT
	select ARCH_HAS_GIGANTIC_PAGE
	select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
	select SPARSEMEM_STATIC if 32BIT

config MMU
	def_bool y
@@ -63,12 +66,32 @@ config ZONE_DMA32
	bool
	default y if 64BIT

config VA_BITS
	int
	default 32 if 32BIT
	default 39 if 64BIT

config PA_BITS
	int
	default 34 if 32BIT
	default 56 if 64BIT

config PAGE_OFFSET
	hex
	default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB

config ARCH_FLATMEM_ENABLE
	def_bool y

config ARCH_SPARSEMEM_ENABLE
	def_bool y
	select SPARSEMEM_VMEMMAP_ENABLE

config ARCH_SELECT_MEMORY_MODEL
	def_bool ARCH_SPARSEMEM_ENABLE

config ARCH_WANT_GENERAL_HUGETLB
	def_bool y

+4 −1
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ endif
ifeq ($(CONFIG_MODULE_SECTIONS),y)
	KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/riscv/kernel/module.lds
endif
ifeq ($(CONFIG_PERF_EVENTS),y)
        KBUILD_CFLAGS += -fno-omit-frame-pointer
endif

KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)

@@ -72,7 +75,7 @@ KBUILD_IMAGE := $(boot)/Image.gz

head-y := arch/riscv/kernel/head.o

core-y += arch/riscv/kernel/ arch/riscv/mm/ arch/riscv/net/
core-y += arch/riscv/

libs-y += arch/riscv/lib/

+2 −0
Original line number Diff line number Diff line
@@ -110,8 +110,10 @@ extern unsigned long min_low_pfn;
#define page_to_bus(page)	(page_to_phys(page))
#define phys_to_page(paddr)	(pfn_to_page(phys_to_pfn(paddr)))

#ifdef CONFIG_FLATMEM
#define pfn_valid(pfn) \
	(((pfn) >= pfn_base) && (((pfn)-pfn_base) < max_mapnr))
#endif

#define ARCH_PFN_OFFSET		(pfn_base)

+13 −0
Original line number Diff line number Diff line
@@ -83,6 +83,19 @@ extern pgd_t swapper_pg_dir[];
#define __S110	PAGE_SHARED_EXEC
#define __S111	PAGE_SHARED_EXEC

/*
 * Roughly size the vmemmap space to be large enough to fit enough
 * struct pages to map half the virtual address space. Then
 * position vmemmap directly below the VMALLOC region.
 */
#define VMEMMAP_SHIFT \
	(CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT)
#define VMEMMAP_SIZE	BIT(VMEMMAP_SHIFT)
#define VMEMMAP_END	(VMALLOC_START - 1)
#define VMEMMAP_START	(VMALLOC_START - VMEMMAP_SIZE)

#define vmemmap		((struct page *)VMEMMAP_START)

/*
 * ZERO_PAGE is a global shared page that is always zero,
 * used for zero-mapped memory areas, etc.
Loading