From patchwork Wed Jul 26 14:48:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangjin Wu X-Patchwork-Id: 12653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp477770vqo; Wed, 26 Jul 2023 08:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlEyTshvFq7OrBj8xwo8MEPGmPuucaZePKrYRS3jSzfl5si9naKjw7Hw8SMjjRgZmmAzgl71 X-Received: by 2002:a05:6a20:3952:b0:138:2fb8:6aab with SMTP id r18-20020a056a20395200b001382fb86aabmr2249603pzg.8.1690385051552; Wed, 26 Jul 2023 08:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690385051; cv=none; d=google.com; s=arc-20160816; b=0XTyZRwYPOrFNZWPfw7eUoNW2n660j0ChS/0XGc9m4PzHmJwlKAEEZ0VXKPkyEmTPu MkO9aXnu/V+VE9O8GLXAEzwjsmOSv/kAqZAGzuholI/RO3fGRAohZ9dH8gbHaOAco9lq ncSu5SKWCsqu+gT+SWNo7gQSyVJ5yZah9+rdSKhgUmWSH/wwy0gMkeDLi20+xcWMIXsa JQgQ6doBGmJ34yYlFKIbRsrmXXJl/V7086YLmWhmOegjB7t4WUiEeOtB4gPEg5Ez6LQ4 eS1i+7Ca7txUk/huq1dx6ykjUENIHCZxFBkAoe/gIxKmJHpjVj73SyS4y5vz1aMVNI57 glrg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a637705000000b00563f2ec3cb5si318371pgc.631.2023.07.26.08.23.57; Wed, 26 Jul 2023 08:24:11 -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 S233064AbjGZOsq (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772497195873605932 X-GMAIL-MSGID: 1772497195873605932 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