* linux-next: manual merge of the rust tree with the block tree
@ 2022-06-14 3:21 Stephen Rothwell
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2022-06-14 3:21 UTC (permalink / raw)
To: Miguel Ojeda, Jens Axboe
Cc: Adam Bratschi-Kaye, Alex Gaynor, Antonio Terceiro, Boqun Feng,
Boris-Chengbiao Zhou, Daniel Xu, Dariusz Sosnowski, David Gow,
Douglas Su, Finn Behrens, Gary Guo, Linux Kernel Mailing List,
Linux Next Mailing List, Michael Ellerman, Miguel Cano,
Miguel Ojeda, Sven Van Asbroeck, Wedson Almeida Filho
[-- Attachment #1: Type: text/plain, Size: 3475 bytes --]
Hi all,
Today's linux-next merge of the rust tree got a conflict in:
Makefile
between commit:
197c5e8c9541 ("io_uring: move to separate directory")
from the block tree and commit:
0ea4b9a1bece ("Kbuild: add Rust support")
from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc Makefile
index f4c1c37c0be6,ce17ec71f89b..000000000000
--- a/Makefile
+++ b/Makefile
@@@ -436,7 -445,7 +445,8 @@@ els
HOSTCC = gcc
HOSTCXX = g++
endif
+HOSTPKG_CONFIG = pkg-config
+ HOSTRUSTC = rustc
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
-O2 -fomit-frame-pointer -std=gnu11 \
@@@ -534,7 -580,23 +581,23 @@@ KBUILD_LDFLAGS_MODULE :
KBUILD_LDFLAGS :=
CLANG_FLAGS :=
+ ifeq ($(KBUILD_CLIPPY),1)
+ RUSTC_OR_CLIPPY_QUIET := CLIPPY
+ RUSTC_OR_CLIPPY = $(CLIPPY_DRIVER)
+ else
+ RUSTC_OR_CLIPPY_QUIET := RUSTC
+ RUSTC_OR_CLIPPY = $(RUSTC)
+ endif
+
+ ifdef RUST_LIB_SRC
+ export RUST_LIB_SRC
+ endif
+
+ export RUSTC_BOOTSTRAP := 1
+
-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
+export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
+ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO
+ export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
@@@ -788,9 -867,11 +868,12 @@@ stackp-flags-$(CONFIG_STACKPROTECTOR_ST
KBUILD_CFLAGS += $(stackp-flags-y)
KBUILD_CFLAGS-$(CONFIG_WERROR) += -Werror
+KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
+ KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
+ KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
+
ifdef CONFIG_CC_IS_CLANG
KBUILD_CPPFLAGS += -Qunused-arguments
# The kernel builds with '-std=gnu11' so use of GNU extensions is acceptable.
@@@ -806,11 -887,9 +889,12 @@@ endi
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
+# These result in bogus false positives
+KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)
+
ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y
else
# Some targets (ARM with Thumb2, for example), can't be built with frame
# pointers. For those, we don't have FUNCTION_TRACER automatically
@@@ -1097,7 -1180,7 +1186,8 @@@ export MODULES_NSDEPS := $(extmod_prefi
ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/
core-$(CONFIG_BLOCK) += block/
+core-$(CONFIG_IO_URING) += io_uring/
+ core-$(CONFIG_RUST) += rust/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* linux-next: manual merge of the rust tree with the block tree
@ 2024-07-09 7:52 Stephen Rothwell
2024-07-09 7:53 ` Miguel Ojeda
2024-07-23 23:19 ` Stephen Rothwell
0 siblings, 2 replies; 8+ messages in thread
From: Stephen Rothwell @ 2024-07-09 7:52 UTC (permalink / raw)
To: Miguel Ojeda, Jens Axboe
Cc: Alice Ryhl, Andreas Hindborg, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
Hi all,
Today's linux-next merge of the rust tree got a conflict in:
rust/bindings/bindings_helper.h
between commit:
5b026e341207 ("rust: block: fix generated bindings after refactoring of features")
from the block tree and commit:
ab44079e2869 ("rust: alloc: add __GFP_HIGHMEM flag")
from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc rust/bindings/bindings_helper.h
index 53c996e4bedf,f2bafb10f181..000000000000
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@@ -30,4 -26,4 +30,5 @@@ const gfp_t RUST_CONST_HELPER_GFP_KERNE
const gfp_t RUST_CONST_HELPER_GFP_KERNEL_ACCOUNT = GFP_KERNEL_ACCOUNT;
const gfp_t RUST_CONST_HELPER_GFP_NOWAIT = GFP_NOWAIT;
const gfp_t RUST_CONST_HELPER___GFP_ZERO = __GFP_ZERO;
+ const gfp_t RUST_CONST_HELPER___GFP_HIGHMEM = ___GFP_HIGHMEM;
+const blk_features_t RUST_CONST_HELPER_BLK_FEAT_ROTATIONAL = BLK_FEAT_ROTATIONAL;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: manual merge of the rust tree with the block tree
2024-07-09 7:52 linux-next: manual merge of the rust tree with the block tree Stephen Rothwell
@ 2024-07-09 7:53 ` Miguel Ojeda
2024-07-23 23:19 ` Stephen Rothwell
1 sibling, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2024-07-09 7:53 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Miguel Ojeda, Jens Axboe, Alice Ryhl, Andreas Hindborg,
Linux Kernel Mailing List, Linux Next Mailing List
On Tue, Jul 9, 2024 at 9:53 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Looks good to me, thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: manual merge of the rust tree with the block tree
2024-07-09 7:52 linux-next: manual merge of the rust tree with the block tree Stephen Rothwell
2024-07-09 7:53 ` Miguel Ojeda
@ 2024-07-23 23:19 ` Stephen Rothwell
1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2024-07-23 23:19 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Jens Axboe, Alice Ryhl, Andreas Hindborg,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
Hi all,
On Tue, 9 Jul 2024 17:52:55 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the rust tree got a conflict in:
>
> rust/bindings/bindings_helper.h
>
> between commit:
>
> 5b026e341207 ("rust: block: fix generated bindings after refactoring of features")
>
> from the block tree and commit:
>
> ab44079e2869 ("rust: alloc: add __GFP_HIGHMEM flag")
>
> from the rust tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc rust/bindings/bindings_helper.h
> index 53c996e4bedf,f2bafb10f181..000000000000
> --- a/rust/bindings/bindings_helper.h
> +++ b/rust/bindings/bindings_helper.h
> @@@ -30,4 -26,4 +30,5 @@@ const gfp_t RUST_CONST_HELPER_GFP_KERNE
> const gfp_t RUST_CONST_HELPER_GFP_KERNEL_ACCOUNT = GFP_KERNEL_ACCOUNT;
> const gfp_t RUST_CONST_HELPER_GFP_NOWAIT = GFP_NOWAIT;
> const gfp_t RUST_CONST_HELPER___GFP_ZERO = __GFP_ZERO;
> + const gfp_t RUST_CONST_HELPER___GFP_HIGHMEM = ___GFP_HIGHMEM;
> +const blk_features_t RUST_CONST_HELPER_BLK_FEAT_ROTATIONAL = BLK_FEAT_ROTATIONAL;
This is now a conflict between the rust tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* linux-next: manual merge of the rust tree with the block tree
@ 2025-09-16 13:13 ` Mark Brown
2025-09-17 7:35 ` Andreas Hindborg
0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2025-09-16 13:13 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Andreas Hindborg, Jens Axboe, Linux Kernel Mailing List,
Linux Next Mailing List, Tamir Duberstein
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Hi all,
Today's linux-next merge of the rust tree got a conflict in:
rust/kernel/block/mq.rs
between commit:
90d952fac8ac1 ("rust: block: add `GenDisk` private data support")
from the block tree and commit:
e0be3d34f1089 ("rust: block: use `kernel::{fmt,prelude::fmt!}`")
from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc rust/kernel/block/mq.rs
index c0ec06b843555,61ea35bba7d50..0000000000000
--- a/rust/kernel/block/mq.rs
+++ b/rust/kernel/block/mq.rs
@@@ -89,7 -82,7 +89,7 @@@
//! Arc::pin_init(TagSet::new(1, 256, 1), flags::GFP_KERNEL)?;
//! let mut disk = gen_disk::GenDiskBuilder::new()
//! .capacity_sectors(4096)
- //! .build(format_args!("myblk"), tagset, ())?;
-//! .build(fmt!("myblk"), tagset)?;
++//! .build(fmt!("myblk"), tagset, ())?;
//!
//! # Ok::<(), kernel::error::Error>(())
//! ```
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* linux-next: manual merge of the rust tree with the block tree
@ 2025-09-16 13:21 ` Mark Brown
2025-09-17 7:42 ` Andreas Hindborg
0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2025-09-16 13:21 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Andreas Hindborg, Jens Axboe, Linux Kernel Mailing List,
Linux Next Mailing List, Tamir Duberstein
[-- Attachment #1: Type: text/plain, Size: 1907 bytes --]
Hi all,
Today's linux-next merge of the rust tree got a conflict in:
rust/kernel/block/mq/gen_disk.rs
between commits:
f4b72f1558be1 ("rust: block: normalize imports for `gen_disk.rs`")
c3a54220b54a1 ("rust: block: use `NullTerminatedFormatter`")
90d952fac8ac1 ("rust: block: add `GenDisk` private data support")
from the block tree and commit:
e0be3d34f1089 ("rust: block: use `kernel::{fmt,prelude::fmt!}`")
from the rust tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc rust/kernel/block/mq/gen_disk.rs
index 46ec802699706,be92d0e5f0312..0000000000000
--- a/rust/kernel/block/mq/gen_disk.rs
+++ b/rust/kernel/block/mq/gen_disk.rs
@@@ -3,19 -3,12 +3,19 @@@
//! Generic disk abstraction.
//!
//! C header: [`include/linux/blkdev.h`](srctree/include/linux/blkdev.h)
- //! C header: [`include/linux/blk_mq.h`](srctree/include/linux/blk_mq.h)
+ //! C header: [`include/linux/blk-mq.h`](srctree/include/linux/blk-mq.h)
-use crate::block::mq::{raw_writer::RawWriter, Operations, TagSet};
-use crate::fmt::{self, Write};
-use crate::{bindings, error::from_err_ptr, error::Result, sync::Arc};
-use crate::{error, static_lock_class};
+use crate::{
+ bindings,
+ block::mq::{Operations, TagSet},
+ error::{self, from_err_ptr, Result},
++ fmt::{self, Write};
+ prelude::*,
+ static_lock_class,
+ str::NullTerminatedFormatter,
+ sync::Arc,
+ types::{ForeignOwnable, ScopeGuard},
+};
- use core::fmt::{self, Write};
/// A builder for [`GenDisk`].
///
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: manual merge of the rust tree with the block tree
2025-09-16 13:13 ` Mark Brown
@ 2025-09-17 7:35 ` Andreas Hindborg
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Hindborg @ 2025-09-17 7:35 UTC (permalink / raw)
To: Mark Brown, Miguel Ojeda
Cc: Jens Axboe, Linux Kernel Mailing List, Linux Next Mailing List,
Tamir Duberstein
"Mark Brown" <broonie@kernel.org> writes:
> Hi all,
>
> Today's linux-next merge of the rust tree got a conflict in:
>
> rust/kernel/block/mq.rs
>
> between commit:
>
> 90d952fac8ac1 ("rust: block: add `GenDisk` private data support")
>
> from the block tree and commit:
>
> e0be3d34f1089 ("rust: block: use `kernel::{fmt,prelude::fmt!}`")
>
> from the rust tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc rust/kernel/block/mq.rs
> index c0ec06b843555,61ea35bba7d50..0000000000000
> --- a/rust/kernel/block/mq.rs
> +++ b/rust/kernel/block/mq.rs
> @@@ -89,7 -82,7 +89,7 @@@
> //! Arc::pin_init(TagSet::new(1, 256, 1), flags::GFP_KERNEL)?;
> //! let mut disk = gen_disk::GenDiskBuilder::new()
> //! .capacity_sectors(4096)
> - //! .build(format_args!("myblk"), tagset, ())?;
> -//! .build(fmt!("myblk"), tagset)?;
> ++//! .build(fmt!("myblk"), tagset, ())?;
> //!
> //! # Ok::<(), kernel::error::Error>(())
> //! ```
Thanks, looks good to me.
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: manual merge of the rust tree with the block tree
2025-09-16 13:21 ` Mark Brown
@ 2025-09-17 7:42 ` Andreas Hindborg
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Hindborg @ 2025-09-17 7:42 UTC (permalink / raw)
To: Mark Brown, Miguel Ojeda
Cc: Jens Axboe, Linux Kernel Mailing List, Linux Next Mailing List,
Tamir Duberstein
"Mark Brown" <broonie@kernel.org> writes:
> Hi all,
>
> Today's linux-next merge of the rust tree got a conflict in:
>
> rust/kernel/block/mq/gen_disk.rs
>
> between commits:
>
> f4b72f1558be1 ("rust: block: normalize imports for `gen_disk.rs`")
> c3a54220b54a1 ("rust: block: use `NullTerminatedFormatter`")
> 90d952fac8ac1 ("rust: block: add `GenDisk` private data support")
>
> from the block tree and commit:
>
> e0be3d34f1089 ("rust: block: use `kernel::{fmt,prelude::fmt!}`")
>
> from the rust tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc rust/kernel/block/mq/gen_disk.rs
> index 46ec802699706,be92d0e5f0312..0000000000000
> --- a/rust/kernel/block/mq/gen_disk.rs
> +++ b/rust/kernel/block/mq/gen_disk.rs
> @@@ -3,19 -3,12 +3,19 @@@
> //! Generic disk abstraction.
> //!
> //! C header: [`include/linux/blkdev.h`](srctree/include/linux/blkdev.h)
> - //! C header: [`include/linux/blk_mq.h`](srctree/include/linux/blk_mq.h)
> + //! C header: [`include/linux/blk-mq.h`](srctree/include/linux/blk-mq.h)
>
> -use crate::block::mq::{raw_writer::RawWriter, Operations, TagSet};
> -use crate::fmt::{self, Write};
> -use crate::{bindings, error::from_err_ptr, error::Result, sync::Arc};
> -use crate::{error, static_lock_class};
> +use crate::{
> + bindings,
> + block::mq::{Operations, TagSet},
> + error::{self, from_err_ptr, Result},
> ++ fmt::{self, Write};
> + prelude::*,
> + static_lock_class,
> + str::NullTerminatedFormatter,
> + sync::Arc,
> + types::{ForeignOwnable, ScopeGuard},
> +};
> - use core::fmt::{self, Write};
>
> /// A builder for [`GenDisk`].
> ///
This looks good to me, thanks!
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-17 7:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 7:52 linux-next: manual merge of the rust tree with the block tree Stephen Rothwell
2024-07-09 7:53 ` Miguel Ojeda
2024-07-23 23:19 ` Stephen Rothwell
[not found] <tIE_kvneh6miIKUKHYGGt286j3LmCrKMfENd03aIk-ojsDOR1vkjVpf9RSrCM_ZheU65PMmUalkvqToq_Ttxew==@protonmail.internalid>
2025-09-16 13:21 ` Mark Brown
2025-09-17 7:42 ` Andreas Hindborg
[not found] <NPR3YlvOAsbhpBeoDGNoFA19ooiEuqrTmHWORPHaia9baa5oTQT9ZIeOn_U9cvByr0CSZ1L5XlX3UMWdVizKGQ==@protonmail.internalid>
2025-09-16 13:13 ` Mark Brown
2025-09-17 7:35 ` Andreas Hindborg
-- strict thread matches above, loose matches on Subject: below --
2022-06-14 3:21 Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox