x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops
authorMike Travis <mike.travis@hpe.com>
Tue, 10 Sep 2019 14:58:47 +0000 (09:58 -0500)
committerIngo Molnar <mingo@kernel.org>
Mon, 7 Oct 2019 11:42:11 +0000 (13:42 +0200)
commit4fb7d08707565d27ec84a364d011043ade8c38b4
tree92cb4ef32e7b33f8cd4ef5d6a01387e9840dcca5
parentdf55029f7ea65d8c653a79dd728918dfe25b1356
x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops

The references in the is_uvX_hub() function uses the hub_info pointer
which will be NULL when the system is hubless.  This change avoids
that NULL dereference.  It is also an optimization in performance.

Signed-off-by: Mike Travis <mike.travis@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hedi Berriche <hedi.berriche@hpe.com>
Cc: Justin Ernst <justin.ernst@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <russ.anderson@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190910145840.294981941@stormcage.eag.rdlabs.hpecorp.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/uv/uv_hub.h