newbus: remove support for SINGLETON

Revert rest of de8dd262c4 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 de8dd262c4.

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
This commit is contained in:
Warner Losh 2021-04-26 11:04:15 -06:00
parent 5eb9c93a20
commit 099919b76d

View File

@ -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");