context_tracking: Generalize context tracking APIs to support user and guest
authorRik van Riel <riel@redhat.com>
Tue, 10 Feb 2015 20:27:50 +0000 (15:27 -0500)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 9 Mar 2015 14:42:52 +0000 (15:42 +0100)
commit3aab4f50bff89bdea5066a05d4f3c5fa25bc37c7
treebb83901091481a72fbd5327718e8cbb079a91d3e
parentc467ea763fd5d8795b7d1b5a78eb94b6ad8f66ad
context_tracking: Generalize context tracking APIs to support user and guest

Generalize the context tracking APIs to support various nature of
contexts. This is performed by splitting out the mechanism from
context_tracking_user_enter and context_tracking_user_exit into
context_tracking_enter and context_tracking_exit.

The nature of the context we track is now detailed in a ctx_state
parameter pushed to these APIs, allowing the same functions to not just
track kernel <> user space switching, but also kernel <> guest transitions.

But leave the old functions in order to avoid breaking ARM, which calls
these functions from assembler code, and cannot easily use C enum
parameters.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will deacon <will.deacon@arm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
include/linux/context_tracking.h
kernel/context_tracking.c