sparc: Handle negative offsets in arch_jump_label_transform
authorJames Clarke <jrtc27@jrtc27.com>
Mon, 24 Oct 2016 18:49:25 +0000 (19:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Nov 2016 09:06:41 +0000 (10:06 +0100)
commit75931800733c68082c530f6c5421928e4288ee9e
treeefef2c06ba8022b4dfdaa3966f64bcceef7f7636
parent8fd11efa2140192d1788302017368878ae6d357b
sparc: Handle negative offsets in arch_jump_label_transform

[ Upstream commit 9d9fa230206a3aea6ef451646c97122f04777983 ]

Additionally, if the offset will overflow the immediate for a ba,pt
instruction, fall back on a standard ba to get an extra 3 bits.

Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/kernel/jump_label.c