From owner-dev-commits-src-main@freebsd.org Mon Apr 26 17:43:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B4055E9D2A; Mon, 26 Apr 2021 17:43:58 +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 4FTXM22BcDz3txh; Mon, 26 Apr 2021 17:43:58 +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 3E2F63B22; Mon, 26 Apr 2021 17:43:58 +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 13QHhwlr073060; Mon, 26 Apr 2021 17:43:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13QHhwlp073059; Mon, 26 Apr 2021 17:43:58 GMT (envelope-from git) Date: Mon, 26 Apr 2021 17:43:58 GMT Message-Id: <202104261743.13QHhwlp073059@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: 099919b76dce - main - newbus: remove support for SINGLETON 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: 099919b76dce8ae118fea8bc950d2a7157a9c28b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 17:43:58 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=099919b76dce8ae118fea8bc950d2a7157a9c28b commit 099919b76dce8ae118fea8bc950d2a7157a9c28b Author: Warner Losh AuthorDate: 2021-04-26 17:04:15 +0000 Commit: Warner Losh CommitDate: 2021-04-26 17:41:08 +0000 newbus: remove support for SINGLETON Revert rest of de8dd262c43b since it's now unused. jhibbits@ introduced this to give powerpc MMU functions IFUNC like performance while retaining the kobj interface, speeding up operations 10-20%. Since there was only ever one instance of the mmu interface active at any given time, we could cache the looked up results more agressively. powerpc migrated to using IFUNCs to get an even larger performance boost in 45b69dd63e, deleting the two files it was added to in de8dd262c43b. However, there's few, if any, other potential applications of this to the tree today. It's now unused and undocumented. Retire it to eliminate this wart and to preclude the need to document it. Should a simmilar case arise in the future, the code is in git... Discusssed with: jhibbits@ Reviewed by: jhb@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29997 --- sys/tools/makeobjops.awk | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk index c0fb8db10f3e..5a4ccf759960 100644 --- a/sys/tools/makeobjops.awk +++ b/sys/tools/makeobjops.awk @@ -325,18 +325,13 @@ function handle_method (static, doc) line_width, length(prototype))); } printh("{"); - if (singleton) - printh("\tstatic kobjop_t _m;"); - else - printh("\tkobjop_t _m;"); + printh("\tkobjop_t _m;"); if (ret != "void") printh("\t" ret " rc;"); if (!static) firstvar = "((kobj_t)" firstvar ")"; if (prolog != "") printh(prolog); - if (singleton) - printh("\tif (_m == NULL)"); printh("\tKOBJOPLOOKUP(" firstvar "->ops," mname ");"); rceq = (ret != "void") ? "rc = " : ""; printh("\t" rceq "((" mname "_t *) _m)(" varname_list ");"); @@ -458,7 +453,6 @@ for (file_i = 0; file_i < num_files; file_i++) { lastdoc = ""; prolog = ""; epilog = ""; - singleton = 0; while (!error && (getline < src) > 0) { lineno++; @@ -503,8 +497,6 @@ for (file_i = 0; file_i < num_files; file_i++) { prolog = handle_code(); else if (/^EPILOG[ ]*{$/) epilog = handle_code(); - else if (/^SINGLETON/) - singleton = 1; else { debug($0); warnsrc("Invalid line encountered");