]> git.baikalelectronics.ru Git - kernel.git/commit
x86/platform/uv: Fix copied UV5 output archtype
authorMike Travis <mike.travis@hpe.com>
Wed, 11 Nov 2020 01:04:18 +0000 (19:04 -0600)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 12 Nov 2020 23:00:31 +0000 (00:00 +0100)
commite385a5a0e0439065114bdd0ed3775f093fe4ea9d
treeb11caf557336ac049a26b8ef440778fa32bd4f59
parent31dee570c422ff6f1619fa56f316312525f1805e
x86/platform/uv: Fix copied UV5 output archtype

A test shows that the output contains a space:
    # cat /proc/sgi_uv/archtype
    NSGI4 U/UVX

Remove that embedded space by copying the "trimmed" buffer instead of the
untrimmed input character list.  Use sizeof to remove size dependency on
copy out length.  Increase output buffer size by one character just in case
BIOS sends an 8 character string for archtype.

Fixes: 9675ba9639ee ("Add and decode Arch Type in UVsystab")
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20201111010418.82133-1-mike.travis@hpe.com
arch/x86/kernel/apic/x2apic_uv_x.c