From: Stephen Rothwell Date: Thu, 6 May 2021 00:54:03 +0000 (+1000) Subject: Merge remote-tracking branch 'rust/rust-next' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a498d6c142fd9e550d28564f95e4a18556627156;p=users%2Fjedix%2Flinux-maple.git Merge remote-tracking branch 'rust/rust-next' # Conflicts: # Makefile # include/uapi/linux/android/binder.h # kernel/printk/printk.c --- a498d6c142fd9e550d28564f95e4a18556627156 diff --cc MAINTAINERS index 36898df34f0b3,de32aaa5cabdd..36f93b55f4dde --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -15870,9 -15547,22 +15870,23 @@@ L: linux-rdma@vger.kernel.or S: Maintained F: drivers/infiniband/ulp/rtrs/ + RUST + M: Miguel Ojeda + M: Alex Gaynor + M: Wedson Almeida Filho + L: rust-for-linux@vger.kernel.org + S: Maintained + W: https://github.com/Rust-for-Linux/linux + B: https://github.com/Rust-for-Linux/linux/issues + T: git https://github.com/Rust-for-Linux/linux.git rust-next + F: rust/ + F: samples/rust/ + F: Documentation/rust/ + K: \b(?i:rust)\b + RXRPC SOCKETS (AF_RXRPC) M: David Howells +M: Marc Dionne L: linux-afs@lists.infradead.org S: Supported W: https://www.infradead.org/~dhowells/kafs/ diff --cc Makefile index 15b6476d0f89c,62b3bba386355..bb50a5ac2e132 --- a/Makefile +++ b/Makefile @@@ -263,11 -270,7 +270,11 @@@ no-dot-config-targets := $(clean-target cscope gtags TAGS tags help% %docs check% coccicheck \ $(version_h) headers headers_% archheaders archscripts \ %asm-generic kernelversion %src-pkg dt_binding_check \ - outputmakefile + outputmakefile rustfmt rustfmtcheck +# Installation targets should not require compiler. Unfortunately, vdso_install +# is an exception where build artifacts may be updated. This must be fixed. +no-compiler-targets := $(no-dot-config-targets) install dtbs_install \ + headers_install modules_install kernelrelease image_name no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \ image_name single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/ @@@ -567,24 -588,31 +596,29 @@@ ifdef building_out_of_srctre { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif - # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. - # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. - # CC_VERSION_TEXT is referenced from Kconfig (so it needs export), - # and from include/config/auto.conf.cmd to detect the compiler upgrade. - CC_VERSION_TEXT = $(subst $(pound),,$(shell $(CC) --version 2>/dev/null | head -n 1)) + TENTATIVE_CLANG_FLAGS := -Werror=unknown-warning-option - ifneq ($(findstring clang,$(CC_VERSION_TEXT)),) ifneq ($(CROSS_COMPILE),) - CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) + TENTATIVE_CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) -TENTATIVE_CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) -GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) -endif -ifneq ($(GCC_TOOLCHAIN),) -TENTATIVE_CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif -ifneq ($(LLVM_IAS),1) +ifeq ($(LLVM_IAS),1) - CLANG_FLAGS += -integrated-as ++TENTATIVE_CLANG_FLAGS += -integrated-as +else - CLANG_FLAGS += -no-integrated-as + TENTATIVE_CLANG_FLAGS += -no-integrated-as +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) - CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) ++TENTATIVE_CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) endif - CLANG_FLAGS += -Werror=unknown-warning-option + + export TENTATIVE_CLANG_FLAGS + + # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. + # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. + # CC_VERSION_TEXT is referenced from Kconfig (so it needs export), + # and from include/config/auto.conf.cmd to detect the compiler upgrade. + CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed 's/\#//g') + + ifneq ($(findstring clang,$(CC_VERSION_TEXT)),) + CLANG_FLAGS += $(TENTATIVE_CLANG_FLAGS) KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS) export CLANG_FLAGS diff --cc include/uapi/linux/android/binder.h index 20e435fe657a1,7b13c9e9aa2f6..9fca291e01324 --- a/include/uapi/linux/android/binder.h +++ b/include/uapi/linux/android/binder.h @@@ -217,31 -217,18 +217,33 @@@ struct binder_node_info_for_ref __u32 reserved3; }; +struct binder_freeze_info { + __u32 pid; + __u32 enable; + __u32 timeout_ms; +}; + +struct binder_frozen_status_info { + __u32 pid; + __u32 sync_recv; + __u32 async_recv; +}; + - #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) - #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) - #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) - #define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) - #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) - #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) - #define BINDER_VERSION _IOWR('b', 9, struct binder_version) - #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) - #define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) - #define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object) - #define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info) - #define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info) - #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32) + enum { + BINDER_WRITE_READ = _IOWR('b', 1, struct binder_write_read), + BINDER_SET_IDLE_TIMEOUT = _IOW('b', 3, __s64), + BINDER_SET_MAX_THREADS = _IOW('b', 5, __u32), + BINDER_SET_IDLE_PRIORITY = _IOW('b', 6, __s32), + BINDER_SET_CONTEXT_MGR = _IOW('b', 7, __s32), + BINDER_THREAD_EXIT = _IOW('b', 8, __s32), + BINDER_VERSION = _IOWR('b', 9, struct binder_version), + BINDER_GET_NODE_DEBUG_INFO = _IOWR('b', 11, struct binder_node_debug_info), + BINDER_GET_NODE_INFO_FOR_REF = _IOWR('b', 12, struct binder_node_info_for_ref), + BINDER_SET_CONTEXT_MGR_EXT = _IOW('b', 13, struct flat_binder_object), ++ BINDER_FREEZE = _IOW('b', 14, struct binder_freeze_info), ++ BINDER_GET_FROZEN_INFO = _IOWR('b', 15, struct binder_frozen_status_info), ++ BINDER_ENABLE_ONEWAY_SPAM_DETECTION = _IOW('b', 16, __u32), + }; /* * NOTE: Two special error codes you should check for when calling diff --cc kernel/printk/printk.c index 421c35571797e,d13be89530c44..114e9963f903f --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@@ -394,11 -411,8 +394,12 @@@ static struct latched_seq clear_seq = #define PREFIX_MAX 32 #endif +/* the maximum size of a formatted record (i.e. with prefix added per line) */ +#define CONSOLE_LOG_MAX 1024 + +/* the maximum size allowed to be reserved for a record */ + /* Keep in sync with rust/kernel/print.rs */ -#define LOG_LINE_MAX (1024 - PREFIX_MAX) +#define LOG_LINE_MAX (CONSOLE_LOG_MAX - PREFIX_MAX) #define LOG_LEVEL(v) ((v) & 0x07) #define LOG_FACILITY(v) ((v) >> 3 & 0xff)