Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1155443rwb; Wed, 26 Jul 2023 08:19:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaDnOcWCJMYevcHSppVFVTqqlBqL1MVDTNsmuFcsawX61pcoyRgt+XGYDIGwOw6uYliNfU X-Received: by 2002:a05:6a21:35c9:b0:133:c9d0:75ff with SMTP id ba9-20020a056a2135c900b00133c9d075ffmr1892637pzc.42.1690384781014; Wed, 26 Jul 2023 08:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690384780; cv=none; d=google.com; s=arc-20160816; b=IbEqvYoC+sJPHg/+FzEfcokt7Kqdxk+62WJ2rdRkibmoQK1/xTTZKwwdkwkevZjU4+ GObCujvjewqE4g4at9+BoewdHsMHDgH8kQdrb3sZ978ZittpWvcDJJX2tYUDQfuj7JC1 VkLcOZJOKKLuJQ2Mav3X/BfrWJyWR7zgW88ef/Imi0pi4awJ/ACUD83hNtpEmm0JegEU kCWYT3xyeYg3QSC1/jBTeZ1kQoL7GBjAalZewOdrYFCP/ceOs+fM1gAS3yHWK2gZ8TWZ 2a8w9IUo+z5sP6fYlWzxvDH4WaEYrKIK2etZj+WGouf2oU29rlZApRJp9LmC/xj4x5Jz XH5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=+iomne71NHh9WUgk8Fqrb+kQU3b6S0j1k3zQro8GP0E=; fh=kgRNfNE6xRCHBUX3iUlrLhv5pQPglsdZFzOkxo2Fhpc=; b=X3yV0058SlpOyAUh+3eM6DtpXtrk/78W0ZDdEUAV8GXoXmewVbkHOdpDBM6ml5N4sI sFNOYYYjKs162g97jUBKMFhFDmB0mnoSFsYJNHn68zleQIBQJfr6idEBvxzQM7NmS4M2 YYmFJAhVkROU4/JrDOoGLNkPsKv4AcbcsqrjqkgUOcZVg0BfXRpkc0mE8f+TIgSW+vHC rw75sPn0/8c2t/dwTKoIMWW13xzAapXQ2b/PAxJRXj84XiqX+fIj1n00Di38I19R+QYH twMthsuH3tdJhLm8Y4XrKrO1fEK1k0+oD2eTIY6ZE6FXwkzh+bgPAklt3K200XcYLZbc kCZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s28-20020a63525c000000b0055c8d14df3asi12978816pgl.799.2023.07.26.08.19.27; Wed, 26 Jul 2023 08:19:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231574AbjGZOsq (ORCPT + 99 others); Wed, 26 Jul 2023 10:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233184AbjGZOsg (ORCPT ); Wed, 26 Jul 2023 10:48:36 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67E131FD5; Wed, 26 Jul 2023 07:48:32 -0700 (PDT) X-QQ-mid: bizesmtp62t1690382901tdqnmwb9 Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 26 Jul 2023 22:48:20 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: PS/N6jJLnDbWPzOemGr4bNmLGhOlX8aAHcyd+lhmPOqpMTHAYgJ0sP+uX6rbD RU2EPCx7QW/LeX1uDe7xJp+tu3TGz3E+j6x9+p/w7djS4qrd5CMs4nB07UBDchlnYvYkCDz J8yU/f1u0goeJBi8sod/tpVuZmTDaWQ7RK+pc6hEmoL+S3opG/qONZ8C6NKYTjmQln2PqRN r4VNW5A8CSbXVgq5BTBk4PL6HOGX8cLlyWAmC1q4J/v/blS+mCdiDNOGlS6CDI2T6H+9Qk5 9tYb8TP2+ufpWkFhQR3G8qGwNcmGA2/tzWGf0IHYNkGTlNV/yJQi7zcqWPCNix4Uj4IhyqB ncWNOd5Ogfmfd8j+LqN7Fuyb81D2Fg5CahmVVmFJtbItIzyw6uyMoKxiZmytg== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 18036633287261470269 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, thomas@t-8ch.de Subject: [PATCH v2 0/7] tools/nolibc: add 32/64-bit powerpc support Date: Wed, 26 Jul 2023 22:48:11 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Willy, Thomas The suggestions of v1 nolibc powerpc patchset [1] from you have been applied, here is v2. Testing results: - run with tinyconfig arch/board | result ------------|------------ ppc/g3beige | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. ppc/ppce500 | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. ppc64le/pseries | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. ppc64le/powernv | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. ppc64/pseries | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. ppc64/powernv | 165 test(s): 158 passed, 7 skipped, 0 failed => status: warning. - run-user (Tested with -Os, -O0 and -O2) // for 32-bit PowerPC $ for arch in powerpc ppc; do make run-user ARCH=$arch CROSS_COMPILE=powerpc-linux-gnu- ; done | grep status 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning // for 64-bit big-endian PowerPC and 64-bit little-endian PowerPC $ for arch in ppc64 ppc64le; do make run-user ARCH=$arch CROSS_COMPILE=powerpc64le-linux-gnu- ; done | grep status 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning Changes from v1 --> v2: - tools/nolibc: add support for powerpc Add missing arch-powerpc.h lines to arch.h Align with the other arch-.h, naming the variables with more meaningful words, such as _ret, _num, _arg1 ... Clean up the syscall instructions No line from musl now. Suggestons from Thomas * tools/nolibc: add support for pppc64 No change * selftests/nolibc: add extra configs customize support To reduce complexity, merge the commands from the new extraconfig target to defconfig target and drop the extconfig target completely. Derived from Willy's suggestion of the tinyconfig patchset * selftests/nolibc: add XARCH and ARCH mapping support To reduce complexity, let's use XARCH internally and only reserve ARCH as the input variable. Derived from Willy's suggestion * selftests/nolibc: add test support for powerpc Add ppc as the default 32-bit variant for powerpc target, allow pass ARCH=ppc or ARCH=powerpc to test 32-bit powerpc Derived from Willy's suggestion * selftests/nolibc: add test support for pppc64le Rename powerpc64le to ppc64le Suggestion from Willy * selftests/nolibc: add test support for pppc64 Rename powerpc64 to ppc64 Suggestion from Willy Best regards, Zhangjin --- [1]: https://lore.kernel.org/lkml/cover.1689713175.git.falcon@tinylab.org/ Zhangjin Wu (7): tools/nolibc: add support for powerpc tools/nolibc: add support for powerpc64 selftests/nolibc: add extra configs customize support selftests/nolibc: add XARCH and ARCH mapping support selftests/nolibc: add test support for ppc selftests/nolibc: add test support for ppc64le selftests/nolibc: add test support for ppc64 tools/include/nolibc/arch-powerpc.h | 202 ++++++++++++++++++++++++ tools/include/nolibc/arch.h | 2 + tools/testing/selftests/nolibc/Makefile | 48 +++++- 3 files changed, 244 insertions(+), 8 deletions(-) create mode 100644 tools/include/nolibc/arch-powerpc.h -- 2.25.1