powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 2 Jun 2018 11:08:49 +0000 (21:08 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jun 2018 14:44:35 +0000 (16:44 +0200)
commita1bbe5eb6c01fa47ab7fb2688183fd11ebc3e2bb
treebadfb4c8c8576f0579400f3ff08cc34a92a63c85
parent98df74652bfa95856f3ad8cf7b220b01e4a39aaf
powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code

commit 1e2a9fc7496955faacbbed49461d611b704a7505 upstream.

rfi_flush_enable() includes a check to see if we're already
enabled (or disabled), and in that case does nothing.

But that means calling setup_rfi_flush() a 2nd time doesn't actually
work, which is a bit confusing.

Move that check into the debugfs code, where it really belongs.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/setup_64.c