From nobody Thu Dec 09 08:26:12 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D501218D9373; Thu, 9 Dec 2021 08:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J8nDh3dbyz3HDM; Thu, 9 Dec 2021 08:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C796238E6; Thu, 9 Dec 2021 08:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B98QC2S006585; Thu, 9 Dec 2021 08:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B98QCn9006584; Thu, 9 Dec 2021 08:26:12 GMT (envelope-from git) Date: Thu, 9 Dec 2021 08:26:12 GMT Message-Id: <202112090826.1B98QCn9006584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1d66269db393 - main - kboot: simplify _start List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d66269db39319ec1b22e48a5e56a15087aba0ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639038372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYak5kwd+aI8Vs02uMraNRg3w1Ufx0vjF6bUSrfWnzc=; b=eOynp8JQrQlKdyBwfIEdIds9DyXIrMaMbl9OdNcmlUkYusrRy7TrXlQPjxLxmJYSnowoEh ZaWyHkDZ9v8UxpL+2CaZ9XBWPdaHEVHEbXr2Rf1vMla5EbxxKT6cCnDoAkd1Vjlcfkwjj5 Whc/q7sdI2qhEvDue23gAXlQWoDGyv+Nud/lm4v7Zp8k4r5niSivx1zLMmdx4aj+QRjNxy IyMUnQVkE4ZCj/Kizt25GNi7Izkh7qUZqJf9irb+6oe0ntnPi18sMq1sOxjnNQFLCFup7o iVnC7+0aJiJ/jRR8b5hTdGgAVbYk3LF1PlGJGQ2ZhdWBtIb9BEbNr4SHc73cdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639038372; a=rsa-sha256; cv=none; b=tW37YeBXXkVaqmJTmaJlXWUJuFgFnXvjAJM9KNP6BE6/s5LjdL3lj/j8de2kHL0VhAElGK 298DY8Jh3xpUcHpjSyyOzUxW+c3xvsezfrzmh177cHl918jwTkng8sbJt8corjAnFUKjm/ BwNGpkKxuGrzqPKhw6Xx+0kiLcmLDnK4XLx+CeLasacZkuCi7XFeOPKc25I/4m/e4XFAA0 MgfOXB0La5H0eyjGd6EbZEyUKPib9LKnpI7sVeaLwsB0Emah9vPdapg5QwLLs/F5JkVaKO 8ti7ys4K18tITYRL611YwUZyv4sLhqI2rNj1psEE2wBoD/vFzizzvFvj0vPodA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d66269db39319ec1b22e48a5e56a15087aba0ae commit 1d66269db39319ec1b22e48a5e56a15087aba0ae Author: Warner Losh AuthorDate: 2021-12-09 08:16:51 +0000 Commit: Warner Losh CommitDate: 2021-12-09 08:25:40 +0000 kboot: simplify _start _start can be implemented directly like this. The code generated is identical. It's also portable. Reviewed by: md5 Sponsored by: Netflix --- stand/powerpc/kboot/main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c index d25b6216f421..9cb4cd2a68d7 100644 --- a/stand/powerpc/kboot/main.c +++ b/stand/powerpc/kboot/main.c @@ -482,18 +482,7 @@ kboot_kseg_get(int *nseg, void **ptr) void _start(int argc, const char **argv, char **env) { -// This makes error "variable 'sp' is uninitialized" be just a warning on clang. -// Initializing 'sp' is not desired here as it would overwrite "r1" original value -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic warning "-Wuninitialized" -#endif - register volatile void **sp asm("r1"); - main((int)sp[0], (const char **)&sp[1]); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - + main(argc, argv); } /*