Unverified Commit 1d4ddaa5 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15330 [OLK-5.10]:update patches for sw64 architecture

Merge Pull Request from: @guzitao 
 
These patches generally cover the following tasks:

1.optimize kernel cores, remove unused codes, fix compile errors
2.fixes for perf, iommu, kvm, cpufreq, stack trace, ftrace, acpi, selftest, numa, kexec, bpf, kprobe
3.reorganize code structure
4.optimize C4 code  
 
Link:https://gitee.com/openeuler/kernel/pulls/15330

 

Reviewed-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Reviewed-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarYihang Li <liyihang9@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
parents 8c45ad1b 4902d4d2
Loading
Loading
Loading
Loading
+55 −45
Original line number Diff line number Diff line
@@ -3,7 +3,10 @@ config SW64
	bool
	default y
	select ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_MCFG if (ACPI && PCI)
	select ACPI_REDUCED_HARDWARE_ONLY
	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_PHYS_TO_DMA
	select ARCH_HAS_PMEM_API
@@ -99,12 +102,16 @@ config SW64
	select HAVE_RELIABLE_STACKTRACE if STACKTRACE
	select HAVE_RSEQ
	select HAVE_SYSCALL_TRACEPOINTS
	select IRQ_DOMAIN
	select IRQ_FORCED_THREADING
	select MEMORY_HOTPLUG_SPARSE if MEMORY_HOTPLUG
	select MODULES_USE_ELF_RELA
	select NO_BOOTMEM
	select OF_EARLY_FLATTREE if OF
	select OF
	select OF_EARLY_FLATTREE
	select OLD_SIGSUSPEND
	select PCI_DOMAINS_GENERIC if PCI
	select PCI_ECAM if (ACPI && PCI)
	select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
	select PCI_SW64 if PCI
	select SET_FS
@@ -178,7 +185,6 @@ config NONCACHE_PAGE
	depends on SW64
	default y


config AUDIT_ARCH
	bool

@@ -228,7 +234,6 @@ config PLATFORM_XUELANG
	depends on UNCORE_XUELANG
	select SPARSE_IRQ
	select SYS_HAS_EARLY_PRINTK
	select SW64_INTC_V2
	select I2C_SUNWAY if I2C
	help
	  Sunway board chipset for C3B
@@ -238,6 +243,7 @@ config PLATFORM_JUNZHANG
	depends on UNCORE_JUNZHANG
	select SPARSE_IRQ
	select SYS_HAS_EARLY_PRINTK
	select I2C_SUNWAY if I2C
	help
	  Sunway board chipset for C4

@@ -281,6 +287,9 @@ config ISA_DMA_API
config PCI_DOMAINS
	def_bool PCI

config PCI_DOMAINS_GENERIC
	def_bool PCI

config PCI_SYSCALL
	def_bool PCI

@@ -388,12 +397,13 @@ config SCHED_SMT
	  places. If unsure say N here.

config NR_CPUS
	int "Maximum number of CPUs (2-256)"
	range 2 256
	int "Maximum number of CPUs (2-512)"
	range 2 512
	depends on SMP
	default "64" if UNCORE_XUELANG
	default "512" if UNCORE_JUNZHANG
	help
	  SW6 support can handle a maximum of 256 CPUs.
	  SW64 support can handle a maximum of 512 CPUs.

config HOTPLUG_CPU
	bool "Support for hot-pluggable CPUs"
@@ -415,6 +425,7 @@ source "kernel/livepatch/Kconfig"
config NUMA
	bool "NUMA Support"
	depends on SMP && !FLATMEM
	select ACPI_NUMA if ACPI
	help
	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
	  Access). This option is for configuring high-end multiprocessor
@@ -497,13 +508,6 @@ endmenu

menu "Boot options"

config USE_OF
	bool "Flattened Device Tree support"
	select OF
	select IRQ_DOMAIN
	help
	  Include support for flattened device tree machine descriptions.

config BUILTIN_DTB
	bool "Embed DTB in kernel image"
	depends on OF
@@ -520,8 +524,10 @@ config BUILTIN_DTB_NAME

config EFI
	bool "UEFI runtime support"
	depends on OF
	select UCS2_STRING
	select EFI_RUNTIME_WRAPPERS
	select EFI_PARAMS_FROM_FDT
	default y
	help
	  This option provides support for runtime services provided
@@ -547,48 +553,52 @@ config DMI
	  firmware need to be enabled. This would require the DMI subsystem
	  to be enabled much earlier than we do on ARM, which is non-trivial.

config CMDLINE_BOOL
	bool "Built-in kernel command line"
config CMDLINE
	string "Built-in kernel command line"
	default ""
	help
	  Allow for specifying boot arguments to the kernel at
	  build time. On some systems (e.g. embedded ones), it is
	  necessary or convenient to provide some or all of the
	  kernel boot arguments with the kernel itself (that is,
	  to not rely on the boot loader to provide them.)
	  Allow for specifying boot arguments to the kernel at build
	  time. On some systems (e.g. embedded ones), it is necessary
	  or convenient to provide some or all of the kernel boot
	  arguments with the kernel itself (that is, to not rely on
	  firmware to provide them.)

	  To compile command line arguments into the kernel,
	  set this option to 'Y', then fill in the
	  boot arguments in CONFIG_CMDLINE.
	  Enter arguments here that should be compiled into the kernel
	  image. And choose how the kernel should use it later on.

	  Systems with fully functional boot loaders (i.e. non-embedded)
	  should leave this option set to 'N'.
	  In most cases, the command line (whether built-in or provided
	  by firmware) should specify the device for the root file system.

config CMDLINE
	string "Built-in kernel command string"
	depends on CMDLINE_BOOL
	default ""
choice
	prompt "Built-in kernel command line usage" if CMDLINE != ""
	default CMDLINE_FROM_FIRMWARE
	help
	  Enter arguments here that should be compiled into the kernel
	  image and used at boot time. If the boot loader provides a
	  command line at boot time, it is appended to this string to
	  form the full kernel command line, when the system boots.
	  Choose how the kernel will handle the provided built-in kernel
	  command line.

	  However, you can use the CONFIG_CMDLINE_OVERRIDE option to
	  change this behavior.
config CMDLINE_FROM_FIRMWARE
	bool "Use kernel command line provided by firmware"
	help
	  Use kernel command line provided by firmware. If the firmware
	  doesn't provide any, the built-in kernel command line provided
	  in CMDLINE will be used.

	  In most cases, the command line (whether built-in or provided
	  by the boot loader) should specify the device for the root
	  file system.
config CMDLINE_EXTEND
	bool "Extend kernel command line"
	help
	  The built-in kernel command line will be appended to the command
	  line provided by firmware. This is useful in cases where the
	  command line provided by firmware is insufficient and you don't
	  want to or cannot modify them.

config CMDLINE_OVERRIDE
	bool "Built-in command line overrides boot loader arguments"
	depends on CMDLINE_BOOL
config CMDLINE_FORCE
	bool "Always use built-in kernel command line"
	help
	  Set this option to 'Y' to have the kernel ignore the boot loader
	  command line, and use ONLY the built-in command line.
	  Always use built-in kernel command line, even if we get one
	  from firmware. This is useful in some cases. For example,
	  you need to work around broken boot loaders.

	  This is used to work around broken boot loaders. This should
	  be set to 'N' under normal conditions.
endchoice

config FORCE_MAX_ZONEORDER
	int
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ endif
CHECKFLAGS	+= -D__sw__
cflags-y	:= -pipe -ffixed-8 -mno-fp-regs #-msmall-data
ifeq ($(CONFIG_SUBARCH_C4),y)
	cflags-y += -fsw-rev
	cflags-y += -fsw-rev -fno-sw-unalign-byte
endif
cflags-y	+= $(call cc-option, -fno-jump-tables)

+35 −33
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
	#address-cells = <2>;
	#size-cells = <2>;

	chosen {
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <2>;
@@ -32,9 +35,14 @@

		};

		intc: interrupt-controller {
			compatible = "sw64,sw6_irq_controller";
		pintc: interrupt-controller {
			compatible = "sw64,pintc", "sw64,sw6_irq_controller";
			interrupt-controller;
			sw64,node = <0>;
			sw64,irq-num = <8>;
			sw64,ver = <1>;
			reg = <0x802a 0x0 0x0 0x1680>,
			      <0x8030 0x0 0x0 0x8f00>;
			#interrupt-cells = <1>;
		};

@@ -42,8 +50,11 @@
			compatible = "sw64,lpc_intc";
			reg = <0x8037 0x40000000 0x0 0x8000>;
			interrupt-controller;
			sw64,node = <0>;
			sw64,irq-num = <16>;
			sw64,ver = <1>;
			#interrupt-cells = <1>;
			interrupt-parent = <&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <2>;
		};

@@ -52,7 +63,7 @@
			#size-cells = <2>;
			compatible = "sw6,sunway-apb-uart";
			reg = <0x8033 0x0 0x0 0x1000>;
			interrupt-parent=<&intc>;
			interrupt-parent=<&pintc>;
			interrupts = <3>;
			reg-shift = <9>;
			reg-io-width = <4>;
@@ -75,11 +86,11 @@
		i2c0@0x8031 {
			#address-cells = <2>;
			#size-cells = <2>;
			compatible = "snps,designware-i2c";
			compatible = "sunway,suntai-i2c", "snps,designware-i2c";
			reg = <0x8031 0x0 0x0 0x8000>;
			clock-frequency = <100000>;
			clocks = <&i2cclk>;
			interrupt-parent=<&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <5>;
			status = "okay";
		};
@@ -87,11 +98,11 @@
		i2c1@0x8034 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "snps,designware-i2c";
			compatible = "sunway,suntai-i2c", "snps,designware-i2c";
			reg = <0x8034 0x0 0x0 0x8000>;
			clock-frequency = <100000>;
			clocks = <&i2cclk>;
			interrupt-parent=<&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <6>;
			status = "okay";
		};
@@ -99,11 +110,11 @@
		i2c2@0x8035 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "snps,designware-i2c";
			compatible = "sunway,suntai-i2c", "snps,designware-i2c";
			reg = <0x8035 0x0 0x0 0x8000>;
			clock-frequency = <100000>;
			clocks = <&i2cclk>;
			interrupt-parent=<&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <7>;
			status = "okay";

@@ -127,24 +138,20 @@
			};

		spi: spi@0x8032 {
			#address-cells = <2>;
			#size-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "sunway,chip3-spi";
			reg = <0x8032 0x0 0x0 0x8000>;
			clocks = <&spiclk>;
			interrupt-parent=<&intc>;
			interrupts = <4>;
			poll_mode = <1>;    /* poll_mode:1  interrupt mode: 0 */
			reg-io-width = <2>;
			status = "okay";

			flash@0 {
				compatible = "winbond,w25q32dw", "jedec,spi-flash";
				compatible = "winbond,w25q32dw", "jedec,spi-nor";
				spi-max-frequency = <25000000>;
				m25p,fast-read;
				spi-cpha;
				spi-cpol;
				poll_mode = <1>; /* poll_mode:1  interrupt mode: 0 */
				reg-io-width = <2>;
				reg = <0 0 0 0 >; /* 0: flash chip selected bit */
				reg = <0>; /* 0: flash chip selected bit */

				partitions {
					compatible = "fixed-partitions";
@@ -159,14 +166,10 @@
			};

			flash@1 {
				compatible = "winbond,w25q32dw", "jedec,spi-flash";
				compatible = "winbond,w25q32dw", "jedec,spi-nor";
				spi-max-frequency = <25000000>;
				m25p,fast-read;
				spi-cpha;
				spi-cpol;
				poll_mode = <1>; /* poll_mode:1  interrupt mode: 0 */
				reg-io-width = <2>;
				reg = <1 0 0 0 >; /* 1: flash chip selected bit */
				reg = <1>; /* 1: flash chip selected bit */

				partitions {
					compatible = "fixed-partitions";
@@ -231,8 +234,7 @@
				reg = <0 0 0 0>;
				interrupt-controller;
				#interrupt-cells = <2>;
				interrupt-parent=<&intc>;
				interrupts = <0>;
				interrupts-extended = <&pintc 0>, <&pintc 1>;
			};
		};

+16 −8
Original line number Diff line number Diff line
@@ -10,15 +10,21 @@
	#address-cells = <2>;
	#size-cells = <2>;

	chosen {
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		intc: interrupt-controller{
			compatible = "sw64,sw6_irq_vt_controller";
		pintc: interrupt-controller {
			compatible = "sw64,pintc_vt", "sw64,sw6_irq_vt_controller";
			interrupt-controller;
			sw64,node = <0>;
			sw64,irq-num = <16>;
			sw64,ver = <1>;
			#interrupt-cells = <1>;
		};

@@ -27,25 +33,27 @@
			#size-cells = <2>;
			compatible = "ns16550a";
			reg = <0x8801 0x3f8 0x0 0x10>;
			interrupt-parent=<&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <12>;
			reg-shift = <0>;
			reg-io-width = <1>;
			clock-frequency = <24000000>;
			status = "okay";
		};

		misc: misc0@8036 {
			#address-cells = <2>;
			#size-cells = <2>;
			compatible = "sw6,sunway-ged";
			reg = <0x8036 0x0 0x0 0x20>;
			interrupt-parent=<&intc>;
			interrupt-parent = <&pintc>;
			interrupts = <13>;
			reg-shift = <0>;
			reg-io-width = <8>;
			clock-frequency = <24000000>;
			status = "okay";
		};

		fw_cfg: fw_cfg@8049 {
			dma-coherent;
			reg = <0x8049 0x20000000 0x0 0x18>;
+7 −4
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
	#address-cells = <2>;
	#size-cells = <2>;

	chosen {
	};

	soc {
	};
};
Loading