x86/platform/uv: Add deprecated messages to /proc info leaves
authorMike Travis <mike.travis@hpe.com>
Sat, 28 Nov 2020 03:42:26 +0000 (21:42 -0600)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Dec 2020 19:03:09 +0000 (20:03 +0100)
Add "deprecated" message to any access to old /proc/sgi_uv/* leaves.

 [ bp: Do not have a trailing function opening brace and the arguments
   continuing on the next line and align them on the opening brace. ]

Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lkml.kernel.org/r/20201128034227.120869-5-mike.travis@hpe.com
arch/x86/kernel/apic/x2apic_uv_x.c

index 48746031b39ac779c965c00e114bc7b9ee75cceb..d75e1d98fa7cf58c3f475d8c52341b629c636593 100644 (file)
@@ -1615,21 +1615,30 @@ static void check_efi_reboot(void)
                reboot_type = BOOT_ACPI;
 }
 
-/* Setup user proc fs files */
+/*
+ * User proc fs file handling now deprecated.
+ * Recommend using /sys/firmware/sgi_uv/... instead.
+ */
 static int __maybe_unused proc_hubbed_show(struct seq_file *file, void *data)
 {
+       pr_notice_once("%s: using deprecated /proc/sgi_uv/hubbed, use /sys/firmware/sgi_uv/hub_type\n",
+                      current->comm);
        seq_printf(file, "0x%x\n", uv_hubbed_system);
        return 0;
 }
 
 static int __maybe_unused proc_hubless_show(struct seq_file *file, void *data)
 {
+       pr_notice_once("%s: using deprecated /proc/sgi_uv/hubless, use /sys/firmware/sgi_uv/hubless\n",
+                      current->comm);
        seq_printf(file, "0x%x\n", uv_hubless_system);
        return 0;
 }
 
 static int __maybe_unused proc_archtype_show(struct seq_file *file, void *data)
 {
+       pr_notice_once("%s: using deprecated /proc/sgi_uv/archtype, use /sys/firmware/sgi_uv/archtype\n",
+                      current->comm);
        seq_printf(file, "%s/%s\n", uv_archtype, oem_table_id);
        return 0;
 }