From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBEE3282F27 for ; Wed, 27 May 2026 05:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779861588; cv=none; b=MSsuWFBjLn6zxhLXBVgY4W4nJf1yStf5VfOyvXtlY2OFnohQiMPW1HPMevInTZU/wNygchsBIH2fXAmJmk64h3VKe3E7h6exobKCS4Pxsh3Ibr5Es5ZQ5e90bpCeZatxVu8xZCy8YFp+KBLr5x4ViTPER1NlXErJ9UPnXeNx88k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779861588; c=relaxed/simple; bh=uYSNtIPBdPAmo6t77BQul6Ldc+T8yPkkOv6hcDKrzNM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Qyayq58QYvx9jjAR0VueP17m5OgdN1fC98jE6z9p9dsP2a/jWZrzZv5LCiKH3aWkILoVjdtYm4qjqxIC9ejvyaVBTb0XF8O2yQORryd3x6vtBKJ+F37y/3JkqDcXX1nVeQAMpY0c2tifqrITYhVUG39PoOHb/IoHr5cc8w6gkXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Z++BhpPf; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Z++BhpPf" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-48fd396daedso62413735e9.0 for ; Tue, 26 May 2026 22:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1779861585; x=1780466385; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=c2hQNIjzUAzNKjF5a10PA5EGoBATFq7mHnm3HpuSFqE=; b=Z++BhpPfq/VfG293ucE/P8LE1JbANRLRCjjhX5EkkpDIfRLpqsIe3sfQwBBWb/Fnw6 l+fdh+XT69zmacX+MCFFOW30Eu2iiQFerFSwqr86uh0TbIMz/RmssjsortyHxM3K4ewo OVGtiv7KwEVSEhKgvhq0HMr4mpKtuAPXi3kUPcabUZcVqQO6R71u/Wdm2ePqIgV/y1aA BOTdPxUeGrRNxROaAgHcV6OTtzHbQfvcwktrcZWkv1uHounh5j9Rpkfr6XvDKa60suhv O2q0G+RzFVBcZyPO+Z0GxaE8WMerIvt6FMDUOFfwLJKC3dHfLjhg04BrdQmrUmC4NLLR dr6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779861585; x=1780466385; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c2hQNIjzUAzNKjF5a10PA5EGoBATFq7mHnm3HpuSFqE=; b=mYUZfZVJltYVwmamL41lCn8LDxxU80Z5GU0DILjCdv97FWXprTS2a5+4Tl3vaIysfM uymdfo/cSWwGKPvrFSI9K+cB7sCxB3+zCnBGXaOiRCgVXCoPCBU/CpBsGv2ZZxJc2jov nzjwYr9J2iIzbOG9goLPlZzj7pXKMJW04KeL2oOJFR5pSqWyFPDMBqeSLr9k0VPIeCim uiX4dKiEYyPydQqizxjegDveAiiIYfu6kI52p8/6tRr+/Tt44GH2rcFGadnIA7PblzSw pbDTsJUCvVleFROc4j0R3oJ+CQv4hV5IMqFX9can8sJ9rkkHO7NjLwydMuMwSLzvWEAv 1iUA== X-Forwarded-Encrypted: i=1; AFNElJ+F3vs7pupZAHUaozAsU9PBGojpjydAIORdrltdguXPT0scU/NVzE7WSxfdhxLjfsZPkt1rx+B8P6O6YY4=@vger.kernel.org X-Gm-Message-State: AOJu0YxM0RzR2YDNL+KbyuKAozOOEeP44E0uAqCtb5tNXIAv1i1E/cbu unjeAhLGzf8OM+i1br77XcE5gMTzgnf0D5WvXsw3E08LTva1SFDQ58Yoos6WtDWX2tVAMmm2uQC oGLJPJLvynH94XJdppg== X-Received: from wmbjs3.prod.google.com ([2002:a05:600c:5643:b0:490:3f7b:9cf2]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:45ce:b0:490:52c0:73f1 with SMTP id 5b1f17b1804b1-49052c07823mr270384815e9.9.1779861584952; Tue, 26 May 2026 22:59:44 -0700 (PDT) Date: Wed, 27 May 2026 05:59:43 +0000 In-Reply-To: <20260521165622.279953-5-japo@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260521165622.279953-1-japo@linux.ibm.com> <20260521165622.279953-5-japo@linux.ibm.com> Message-ID: Subject: Re: [PATCH v3 4/4] s390: Enable Rust support From: Alice Ryhl To: Jan Polensky Cc: hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, ojeda@kernel.org, peterz@infradead.org, jpoimboe@kernel.org, jbaron@akamai.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org, a.hindborg@kernel.org, tmgross@umich.edu, dakr@kernel.org, rostedt@goodmis.org, ardb@kernel.org, linux-s390@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Thu, May 21, 2026 at 06:56:22PM +0200, Jan Polensky wrote: > Enable building Rust code on s390 by wiring the architecture into the > kernel Rust infrastructure. > > Add s390 to the Rust arch support documentation, provide the s390 Rust > target and required compiler flags, and set the bindgen target for > arch/s390. Adjust the Rust target generation and minimum rustc version > gating so the s390 setup is handled explicitly. > > The Rust toolchain uses the "s390x" triple naming for the 64 bit target. > > Rust support is currently incompatible with CONFIG_EXPOLINE, which > relies on compiler support for the -mindirect-branch= and > -mfunction_return= options. Therefore, select HAVE_RUST only when > EXPOLINE is disabled. > > Signed-off-by: Jan Polensky > diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh > index b96ec2d379b6..296acf8f71aa 100755 > --- a/scripts/min-tool-version.sh > +++ b/scripts/min-tool-version.sh > @@ -31,7 +31,11 @@ llvm) > fi > ;; > rustc) > - echo 1.85.0 > + if [ "$SRCARCH" = "s390" ]; then > + echo 1.96.0 > + else > + echo 1.85.0 > + fi For other version constraints we have listed them in the Kconfig file to guard the select HAVE_RUST or similar annotations instead of here. Is this the best place to add this constraint? Alice