Skip to content

Commit 1d86f7a

Browse files
committed
Import Pro1-X kernel source code
1 parent 9606069 commit 1d86f7a

File tree

559 files changed

+90071
-7531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

559 files changed

+90071
-7531
lines changed

Makefile

+11-15
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ include scripts/subarch.include
319319
# Alternatively CROSS_COMPILE can be set in the environment.
320320
# Default value for CROSS_COMPILE is not to prefix executables
321321
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
322-
ARCH := arm64
322+
ARCH ?= $(SUBARCH)
323323

324324
# Architecture as present in compile.h
325325
UTS_MACHINE := $(ARCH)
@@ -366,7 +366,7 @@ HOSTCC = gcc
366366
HOSTCXX = g++
367367
endif
368368
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
369-
-fomit-frame-pointer -std=gnu89 -pipe $(HOST_LFS_CFLAGS) \
369+
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
370370
$(HOSTCFLAGS)
371371
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
372372
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
@@ -385,7 +385,7 @@ READELF = llvm-readelf
385385
OBJSIZE = llvm-size
386386
STRIP = llvm-strip
387387
else
388-
CC = $(CROSS_COMPILE)gcc
388+
REAL_CC = $(CROSS_COMPILE)gcc
389389
LD = $(CROSS_COMPILE)ld
390390
AR = $(CROSS_COMPILE)ar
391391
NM = $(CROSS_COMPILE)nm
@@ -409,7 +409,7 @@ CHECK = sparse
409409

410410
# Use the wrapper for the compiler. This wrapper scans for new
411411
# warnings and causes the build to stop upon encountering them
412-
# CC = $(PYTHON2) $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
412+
CC = $(PYTHON) $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
413413

414414
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
415415
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
@@ -439,7 +439,7 @@ LINUXINCLUDE := \
439439
$(USERINCLUDE)
440440

441441
KBUILD_AFLAGS := -D__ASSEMBLY__
442-
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -pipe \
442+
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
443443
-fno-strict-aliasing -fno-common -fshort-wchar \
444444
-Werror-implicit-function-declaration \
445445
-Wno-format-security \
@@ -688,18 +688,11 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
688688
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
689689
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
690690
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
691-
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
692-
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
693-
KBUILD_CFLAGS += $(call cc-disable-warning, psabi)
694-
KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
695-
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
696-
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
697-
KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
698691

699692
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
700693
KBUILD_CFLAGS += -Os
701694
else
702-
KBUILD_CFLAGS += -O3
695+
KBUILD_CFLAGS += -O2
703696
endif
704697

705698
# Tell gcc to never replace conditional load with a non-conditional one
@@ -961,6 +954,9 @@ KBUILD_CFLAGS += $(call cc-option,-fmerge-constants)
961954
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
962955
KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,)
963956

957+
# conserve stack if available
958+
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
959+
964960
# disallow errors like 'EXPORT_GPL(foo);' with missing header
965961
KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int)
966962

@@ -1349,7 +1345,7 @@ headers_install: __headers
13491345
$(error Headers not exportable for the $(SRCARCH) architecture))
13501346
$(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include
13511347
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst)
1352-
$(Q)$(MAKE) $(hdr-inst)=techpack/audio/include/uapi dst=techpack/audio/include
1348+
$(Q)$(MAKE) $(hdr-inst)=techpack
13531349

13541350
PHONY += headers_check_all
13551351
headers_check_all: headers_install_all
@@ -1359,7 +1355,7 @@ PHONY += headers_check
13591355
headers_check: headers_install
13601356
$(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1
13611357
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst) HDRCHECK=1
1362-
$(Q)$(MAKE) $(hdr-inst)=techpack/audio/include/uapi dst=techpack/audio/include HDRCHECK=1
1358+
$(Q)$(MAKE) $(hdr-inst)=techpack HDRCHECK=1
13631359

13641360
# ---------------------------------------------------------------------------
13651361
# Kernel selftest

arch/Kconfig

+1-12
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ config CFI_CLANG_SHADOW
563563

564564
config ARCH_SUPPORTS_SHADOW_CALL_STACK
565565
bool
566-
default y
567566
help
568567
An architecture should select this if it supports Clang's Shadow
569568
Call Stack, has asm/scs.h, and implements runtime support for shadow
@@ -944,16 +943,6 @@ config STRICT_MODULE_RWX
944943
config ARCH_HAS_PHYS_TO_DMA
945944
bool
946945

947-
config ARCH_HAS_REFCOUNT_FULL
948-
bool
949-
select ARCH_HAS_REFCOUNT
950-
help
951-
An architecture selects this when the optimized refcount_t
952-
implementation it provides covers all the cases that
953-
CONFIG_REFCOUNT_FULL covers as well, in which case it makes no
954-
sense to even offer CONFIG_REFCOUNT_FULL as a user selectable
955-
option.
956-
957946
config ARCH_HAS_REFCOUNT
958947
bool
959948
help
@@ -967,7 +956,7 @@ config ARCH_HAS_REFCOUNT
967956
against bugs in reference counts.
968957

969958
config REFCOUNT_FULL
970-
bool "Perform full reference count validation at the expense of speed" if !ARCH_HAS_REFCOUNT_FULL
959+
bool "Perform full reference count validation at the expense of speed"
971960
help
972961
Enabling this switches the refcounting infrastructure from a fast
973962
unchecked atomic_t implementation to a fully state checked

0 commit comments

Comments
 (0)