{"id":2225672,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2225672/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260421120958.190430-5-mkchauras@gmail.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/1.2/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20260421120958.190430-5-mkchauras@gmail.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20260421120958.190430-5-mkchauras@gmail.com/","date":"2026-04-21T12:09:58","name":"[V12,4/4] powerpc: Enable Rust for ppc64le","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"02708c7c39018663cac037376bc28bf806ad39b9","submitter":{"id":92575,"url":"http://patchwork.ozlabs.org/api/1.2/people/92575/?format=json","name":"Mukesh Kumar Chaurasiya","email":"mkchauras@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260421120958.190430-5-mkchauras@gmail.com/mbox/","series":[{"id":500787,"url":"http://patchwork.ozlabs.org/api/1.2/series/500787/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=500787","date":"2026-04-21T12:09:54","name":"Rust support for powerpc","version":12,"mbox":"http://patchwork.ozlabs.org/series/500787/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225672/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225672/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linuxppc-dev+bounces-19885-incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=DL5qCsV8;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19885-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)","lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:f8b0:4864:20::531\"","lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=DL5qCsV8;\n\tdkim-atps=neutral","lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com\n (client-ip=2607:f8b0:4864:20::531; helo=mail-pg1-x531.google.com;\n envelope-from=mkchauras@gmail.com; receiver=lists.ozlabs.org)"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0Lm86mM9z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 22:10:48 +1000 (AEST)","from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g0Lm85kSjz2yvH;\n\tTue, 21 Apr 2026 22:10:48 +1000 (AEST)","from mail-pg1-x531.google.com (mail-pg1-x531.google.com\n [IPv6:2607:f8b0:4864:20::531])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g0Lm80VLYz2ySW\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 21 Apr 2026 22:10:47 +1000 (AEST)","by mail-pg1-x531.google.com with SMTP id\n 41be03b00d2f7-c79467f128cso1505634a12.3\n        for <linuxppc-dev@lists.ozlabs.org>;\n Tue, 21 Apr 2026 05:10:47 -0700 (PDT)","from li-1a3e774c-28e4-11b2-a85c-acc9f2883e29.bl1-in.ibm.com\n ([129.41.58.4])\n        by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c797701d9bfsm10045274a12.16.2026.04.21.05.10.37\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 21 Apr 2026 05:10:45 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1776773448;\n\tcv=none;\n b=LZq2h453VCf5KEsyHH/kZ8UOPAsSmNwc1s2zPVvVAie0ArUr7JxGPPO0VTYzHioJy9YZSVECHjckD8BaaEVwuS0wC3oz1vshpSGZikKzKXv+fsjfA3BHRVyrgxOISA5ddtntaZSAB6hk2B544ZkZbXGH/0NJi1twVHZ+UtnPGyjqFCMa26xegwIIILj7BczGEM+505jBnWHb4ZWk8cYD9YLHPxSAjyz1gL4Ut+EskQq1bXkqJSmDvgi8jr3J+tAqTTAwWdmAPBMA7lCF4y2cIrMiNtVukKLje5oUSXyLXOFVSINA6kFFAafKzSTXvZMWCFUV3eypX9B2JyVU6VojLg==","ARC-Message-Signature":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1776773448; c=relaxed/relaxed;\n\tbh=pFBtEobc7yIaM1eVkOtXcJsieQCaSzPZbTXZ7JIsJxk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=hCefQEniFw1HOA69Mdj3oJNnWOtq9kduQUQPS5SRjaRUbsB4+hw0p9ox5ihg4hz34sWlCiFDDQHnf9Pqy7erXEzxbbzNhDB65Cekdb4/l8fUnEXI8wIdd+UAW6SZCfGH8/bGwRBacuKj3yGLMATkm4dEqGV5PGXBKYY8ucQHGMihT9CT7spQo98geQId74GgNlXkpOavnyB/FORKhkdMI1ZbN2YgFok5fvSTA6ToP5QQadPY0e9D0f2DvUmv1UHWmza6Fx52y0PDcEJKhy8jDxCQDONlYju+hVAPNPX2AENo1kg0ECkCNmgRJUITsUUJdvhvPyp5tRPk0d84ObGwsA==","ARC-Authentication-Results":"i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=DL5qCsV8; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::531; helo=mail-pg1-x531.google.com;\n envelope-from=mkchauras@gmail.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776773446; x=1777378246;\n darn=lists.ozlabs.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=pFBtEobc7yIaM1eVkOtXcJsieQCaSzPZbTXZ7JIsJxk=;\n        b=DL5qCsV8opD6HXxisI/A7cPONmyn4jm/SeQQs4XSdhJfhwRMhTjaQrnM+0gewKDhnk\n         RT/QNS/nqiIJCY7k92uofeh3YZ0eS8dYLVInL/Zip50GNxaxEM4dkd+XCserefu3VsPa\n         5R/oBt2KSW6WwUnM5inaCts1cTzTS7Wvc/ZrOpidw7s7lfzBNgxMoSuDQz5W1SYocsn2\n         iQvHOhIgKZnM4yhSMU85y0WLXtGqEF4KKb/C3lW+yGqzR3KRWOwHeXNF3seGevH5ALgS\n         1/VXsXrftOapJ153tK1ubTpVteaXMdFZt79F1lEmLdLXJgjHTTugKgXsFs1nRBinU96z\n         bhyQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776773446; x=1777378246;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=pFBtEobc7yIaM1eVkOtXcJsieQCaSzPZbTXZ7JIsJxk=;\n        b=NIplPfpjV89MXQvnMu6EHzSU6vQPujtYyqaI3f5Tis7d4OSxP3re2mlSroWgh6Qr0r\n         DZVx8Yxv/RcZaYO+bmLFhi89kPLOQX9MBEXkpNzCa/eg4FnPM/dZ8yXU6rgfAo0+6L9l\n         Jywxlext7rTGUo44X0sL0mzSDUVVvtyNS2skdObUnnnFpzHvThfxqvwU80zuYwOzF7T5\n         /3D50QlVv4iRiQ8+4gBmpEkF+wzDHGxaZR6bKxJYz3OYZkEY2vxtzXIHfXxFvopug4if\n         ahnkYBSqWA53o6NTRayq3A59vp57SYCvFTtrEN2YIWMW5KRaiAbTtXa1NDeVS7R/Kx82\n         4DcQ==","X-Forwarded-Encrypted":"i=1;\n AFNElJ96fJ6s5+ll16FQkogzsoNCf3ajITly23t0IC/8/7KEt4ANkXL1yQYSKifr34A/cMUFHdb8FbX68HeVdAY=@lists.ozlabs.org","X-Gm-Message-State":"AOJu0Yz4v83QrmqNUXnrpJ7Auz2QQq7B3bBtB81JKN+WIrxiqoaPBcJJ\n\t4FTflAmUyyYX6ZwmC4ffi4VS1EkEedUX/Ch9Tupb8x2w3ta4AAcGjEeL","X-Gm-Gg":"AeBDievp+W2R3lhD92RvT+ds40ZhBl2vOlHYSIpzgZ35Lt6qHZ5NwIvBUJEStnVR1yR\n\tSOkqCFTAJhfi0Lm8947ivAUNfftdvqqUv9DIfntV6n/4ihxR17hHPBUbPO/HXi2UZw1Jz4kNesu\n\tecWKgZgg430kQZ++mPcRcc91Q1ThzVN0jhEQgwn8151QoYTh8Nks8T1Btuc+EYdeYJGbg+K0ZWY\n\tvEPhF1qJ+vNRPBEgnrxOAIV8BscU0NoWW5LWljrcCovbLeO/4M1G5k9EA9aYScK9DkVeyXZtGPO\n\tjP8SpFUIkGRVEicXMqvYUs2uPTExUOuXzAB6yVhYKjCDC7IRgfIMkIc0/w0FuPQvpg3JPbz5jW+\n\tKtbFYeYxVSZ+YeaJ5R3t41hRaCWNMQXVzuWH/4E05HykzQHrFLYGpDbONcfE2z7rO87xhBL9N2c\n\tiHAs79Y2g6wBlLLCjMtZ744iuXVHpnhtiCXo6wx6MhDX1iUloJG1emrX6BoSaFwuCp2HfAfvBbX\n\toIPPxvUGUWNnfwRTSOl50uWwA==","X-Received":"by 2002:a05:6a20:918b:b0:3a0:b9d8:966 with SMTP id\n adf61e73a8af0-3a0b9d83334mr11249808637.55.1776773445911;\n        Tue, 21 Apr 2026 05:10:45 -0700 (PDT)","From":"\"Mukesh Kumar Chaurasiya (IBM)\" <mkchauras@gmail.com>","To":"maddy@linux.ibm.com,\n\tmpe@ellerman.id.au,\n\tnpiggin@gmail.com,\n\tchleroy@kernel.org,\n\tpeterz@infradead.org,\n\tjpoimboe@kernel.org,\n\tjbaron@akamai.com,\n\taliceryhl@google.com,\n\trostedt@goodmis.org,\n\tardb@kernel.org,\n\tojeda@kernel.org,\n\tboqun@kernel.org,\n\tgary@garyguo.net,\n\tbjorn3_gh@protonmail.com,\n\tlossin@kernel.org,\n\ta.hindborg@kernel.org,\n\ttmgross@umich.edu,\n\tdakr@kernel.org,\n\tnathan@kernel.org,\n\tnick.desaulniers+lkml@gmail.com,\n\tmorbo@google.com,\n\tjustinstitt@google.com,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org,\n\trust-for-linux@vger.kernel.org,\n\tllvm@lists.linux.dev","Cc":"\"Mukesh Kumar Chaurasiya (IBM)\" <mkchauras@gmail.com>,\n\tLink Mauve <linkmauve@linkmauve.fr>,\n\tVenkat Rao Bagalkote <venkat88@linux.ibm.com>","Subject":"[PATCH V12 4/4] powerpc: Enable Rust for ppc64le","Date":"Tue, 21 Apr 2026 17:39:58 +0530","Message-ID":"<20260421120958.190430-5-mkchauras@gmail.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260421120958.190430-1-mkchauras@gmail.com>","References":"<20260421120958.190430-1-mkchauras@gmail.com>","X-Mailing-List":"linuxppc-dev@lists.ozlabs.org","List-Id":"<linuxppc-dev.lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev+help@lists.ozlabs.org>","List-Owner":"<mailto:linuxppc-dev+owner@lists.ozlabs.org>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Archive":"<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Subscribe":"<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>","List-Unsubscribe":"<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>","Precedence":"list","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Spam-Status":"No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 OzLabs 8","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"},"content":"Enabling rust support for ppc64le.\n\nTested on pseries Power11:\n╰─❯ dmesg | grep rust\n[    0.225728] Initialise system trusted keyrings\n[    0.270961] rust_minimal: Rust minimal sample (init)\n[    0.270968] rust_minimal: Am I built-in? true\n[    0.270974] rust_minimal: test_parameter: 1\n[    0.270983] rust_misc_device: Initialising Rust Misc Device Sample\n[    0.271012] rust_print: Rust printing macros sample (init)\n[    0.271019] rust_print: Emergency message (level 0) without args\n[    0.271023] rust_print: Alert message (level 1) without args\n[    0.271026] rust_print: Critical message (level 2) without args\n[    0.271030] rust_print: Error message (level 3) without args\n[    0.271033] rust_print: Warning message (level 4) without args\n[    0.271037] rust_print: Notice message (level 5) without args\n[    0.271040] rust_print: Info message (level 6) without args\n[    0.271043] rust_print: A line that is continued without args\n[    0.271054] rust_print: Emergency message (level 0) with args\n[    0.271064] rust_print: Alert message (level 1) with args\n[    0.271072] rust_print: Critical message (level 2) with args\n[    0.271077] rust_print: Error message (level 3) with args\n[    0.271083] rust_print: Warning message (level 4) with args\n[    0.271091] rust_print: Notice message (level 5) with args\n[    0.271097] rust_print: Info message (level 6) with args\n[    0.271102] rust_print: A line that is continued with args\n[    0.271110] rust_print: 1\n[    0.271113] rust_print: \"hello, world\"\n[    0.271121] rust_print: [samples/rust/rust_print_main.rs:35:5] c = \"hello, world\"\n[    0.271129] rust_print: Arc<dyn Display> says 42\n[    0.271130] rust_print: Arc<dyn Display> says hello, world\n[    0.271136] rust_print: \"hello, world\"\n[    0.271198] usbcore: registered new interface driver rust_driver_usb\n[    0.271207] rust_faux_driver: Initialising Rust Faux Device Sample\n[    0.271227] faux_driver rust-faux-sample-device: Hello from faux device!\n[    0.271297] rust_configfs: Rust configfs sample (init)\n\nReviewed-by: Link Mauve <linkmauve@linkmauve.fr>\nTested-by: Link Mauve <linkmauve@linkmauve.fr>\nReviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>\nTested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>\nLink: https://github.com/Rust-for-Linux/linux/issues/105\nLink: https://github.com/linuxppc/issues/issues/451\nSigned-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>\n---\n arch/powerpc/Kconfig  | 1 +\n arch/powerpc/Makefile | 7 ++++++-\n rust/Makefile         | 6 ++++++\n 3 files changed, 13 insertions(+), 1 deletion(-)","diff":"diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig\nindex 4ac897b650d4..2e3065bce9cd 100644\n--- a/arch/powerpc/Kconfig\n+++ b/arch/powerpc/Kconfig\n@@ -286,6 +286,7 @@ config PPC\n \tselect HAVE_RELIABLE_STACKTRACE\n \tselect HAVE_RSEQ\n \tselect HAVE_RUST\t\t\tif PPC32\n+\tselect HAVE_RUST\t\t\tif PPC64 && CPU_LITTLE_ENDIAN\n \tselect HAVE_SAMPLE_FTRACE_DIRECT\tif HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS\n \tselect HAVE_SAMPLE_FTRACE_DIRECT_MULTI\tif HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS\n \tselect HAVE_SETUP_PER_CPU_AREA\t\tif PPC64\ndiff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile\nindex 589613eaa5dc..9385db478c59 100644\n--- a/arch/powerpc/Makefile\n+++ b/arch/powerpc/Makefile\n@@ -61,7 +61,12 @@ else\n KBUILD_LDFLAGS_MODULE += $(objtree)/arch/powerpc/lib/crtsavres.o\n endif\n \n-KBUILD_RUSTFLAGS \t+= --target=powerpc-unknown-linux-gnu\n+ifdef CONFIG_PPC64\n+KBUILD_RUSTFLAGS\t+= --target=powerpc64le-unknown-linux-gnu\n+KBUILD_RUSTFLAGS\t+= -Ctarget-feature=-mma,-vsx,-hard-float,-altivec\n+else\n+KBUILD_RUSTFLAGS\t+= --target=powerpc-unknown-linux-gnu\n+endif\n \n ifdef CONFIG_CPU_LITTLE_ENDIAN\n KBUILD_CPPFLAGS\t+= -mlittle-endian\ndiff --git a/rust/Makefile b/rust/Makefile\nindex c90811a2f564..846fe1a45056 100644\n--- a/rust/Makefile\n+++ b/rust/Makefile\n@@ -408,7 +408,13 @@ BINDGEN_TARGET_x86\t:= x86_64-linux-gnu\n BINDGEN_TARGET_arm64\t:= aarch64-linux-gnu\n BINDGEN_TARGET_arm\t:= arm-linux-gnueabi\n BINDGEN_TARGET_loongarch\t:= loongarch64-linux-gnusf\n+\n+ifdef CONFIG_PPC64\n+BINDGEN_TARGET_powerpc\t:= powerpc64le-linux-gnu\n+else\n BINDGEN_TARGET_powerpc\t:= powerpc-linux-gnu\n+endif\n+\n BINDGEN_TARGET_um\t:= $(BINDGEN_TARGET_$(SUBARCH))\n BINDGEN_TARGET\t\t:= $(BINDGEN_TARGET_$(SRCARCH))\n \n","prefixes":["V12","4/4"]}