Re: [PATCH V2 5/8] x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files

From: Mike Travis
Date: Wed Sep 11 2019 - 12:05:32 EST

On 9/10/2019 11:04 PM, Ingo Molnar wrote:

* Mike Travis <mike.travis@xxxxxxx> wrote:

@@ -1596,7 +1687,7 @@ static void __init uv_system_init_hub(vo
- proc_mkdir("sgi_uv", NULL);
+ uv_setup_proc_files(0);

This slipped through previously: platform drivers have absolutely no
business mucking in /proc.

Please describe the hardware via sysfs as pretty much everyone else does.



If I was doing it now I definitely would put it in the sysfs realm. The problem is Jack did it back in (I think) 2007. The earliest commit I could find:

commit a3d732f93785da17e0137210deadb4616f5536fc
Author: Cliff Wickman <cpw@xxxxxxx>
Date: Mon Nov 10 16:16:31 2008 -0600

x86, UV: fix redundant creation of sgi_uv

Impact: fix double entry creation in /proc

And in the past 12 years probably a hundred user programs are now keying of the presence of /proc/sgi_uv to signal this is indeed a UV system. Changing the location of this node also affects all the UV utilities including those not written by us.