Commit 889bb743 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull nds32 updates from Greentime Hu:

 - Perf support

 - Power management support

 - FPU support

 - Hardware prefetcher support

 - Build error fixed

 - Performance enhancement

* tag 'nds32-for-linus-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux:
  nds32: support hardware prefetcher
  nds32: Fix the items of hwcap_str ordering issue.
  math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
  math-emu/op-2.h: Use statement expressions to prevent negative constant shift
  nds32: support denormalized result through FP emulator
  nds32: Support FP emulation
  nds32: nds32 FPU port
  nds32: Remove duplicated include from pm.c
  nds32: Power management for nds32
  nds32: Add document for NDS32 PMU.
  nds32: Add perf call-graph support.
  nds32: Perf porting
  nds32: Fix bug in bitfield.h
  nds32: Fix gcc 8.0 compiler option incompatible.
  nds32: Fill all TLB entries with kernel image mapping
  nds32: Remove the redundant assignment
parents 903b77c6 e2f3f8b4
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
* NDS32 Performance Monitor Units

NDS32 core have a PMU for counting cpu and cache events like cache misses.
The NDS32 PMU representation in the device tree should be done as under:

Required properties:

- compatible :
	"andestech,nds32v3-pmu"

- interrupts : The interrupt number for NDS32 PMU is 13.

Example:
pmu{
	compatible = "andestech,nds32v3-pmu";
	interrupts = <13>;
}
+12 −0
Original line number Diff line number Diff line
@@ -28,7 +28,9 @@ config NDS32
	select HANDLE_DOMAIN_IRQ
	select HAVE_ARCH_TRACEHOOK
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_EXIT_THREAD
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_PERF_EVENTS
	select IRQ_DOMAIN
	select LOCKDEP_SUPPORT
	select MODULES_USE_ELF_RELA
@@ -91,3 +93,13 @@ endmenu
menu "Kernel Features"
source "kernel/Kconfig.hz"
endmenu

menu "Power management options"
config SYS_SUPPORTS_APM_EMULATION
	bool

config ARCH_SUSPEND_POSSIBLE
	def_bool y

source "kernel/power/Kconfig"
endmenu
+41 −0
Original line number Diff line number Diff line
@@ -7,6 +7,40 @@ config CPU_LITTLE_ENDIAN
	bool "Little endian"
	default y

config FPU
	bool "FPU support"
	default n
	help
	  If FPU ISA is used in user space, this configuration shall be Y to
          enable required support in kerenl such as fpu context switch and
          fpu exception handler.

	  If no FPU ISA is used in user space, say N.

config LAZY_FPU
	bool "lazy FPU support"
	depends on FPU
	default y
	help
	  Say Y here to enable the lazy FPU scheme. The lazy FPU scheme can
          enhance system performance by reducing the context switch
	  frequency of the FPU register.

	  For nomal case, say Y.

config SUPPORT_DENORMAL_ARITHMETIC
	bool "Denormal arithmetic support"
	depends on FPU
	default n
	help
	  Say Y here to enable arithmetic of denormalized number. Enabling
	  this feature can enhance the precision for tininess number.
	  However, performance loss in float pointe calculations is
	  possibly significant due to additional FPU exception.

	  If the calculated tolerance for tininess number is not critical,
	  say N to prevent performance loss.

config HWZOL
	bool "hardware zero overhead loop support"
	depends on CPU_D10 || CPU_D15
@@ -143,6 +177,13 @@ config CACHE_L2
	  Say Y here to enable L2 cache if your SoC are integrated with L2CC.
	  If unsure, say N.

config HW_PRE
	bool "Enable hardware prefetcher"
	default y
	help
	  Say Y here to enable hardware prefetcher feature.
	  Only when CPU_VER.REV >= 0x09 can support.

menu "Memory configuration"

choice
+5 −0
Original line number Diff line number Diff line
@@ -5,10 +5,14 @@ KBUILD_DEFCONFIG := defconfig

comma = ,


ifdef CONFIG_FUNCTION_TRACER
arch-y += -malways-save-lp -mno-relax
endif

# Avoid generating FPU instructions
arch-y  += -mno-ext-fpu-sp -mno-ext-fpu-dp -mfloat-abi=soft

KBUILD_CFLAGS	+= $(call cc-option, -mno-sched-prolog-epilog)
KBUILD_CFLAGS	+= -mcmodel=large

@@ -26,6 +30,7 @@ export TEXTADDR

# If we have a machine-specific directory, then include it in the build.
core-y				+= arch/nds32/kernel/ arch/nds32/mm/
core-$(CONFIG_FPU)              += arch/nds32/math-emu/
libs-y				+= arch/nds32/lib/

ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
+5 −0
Original line number Diff line number Diff line
@@ -82,4 +82,9 @@
			interrupts = <18>;
		};
	};

	pmu {
		compatible = "andestech,nds32v3-pmu";
		interrupts= <13>;
	};
};
Loading