litmus: Fix build error (implicit declaration of read_current_timer()) on ARM

Signed-off-by: Roy Spliet <rspliet@mpi-sws.org>
Fix litmus_admit_task() error path

Don't try to release slab objects that were never allocated.
Fix: Set litmus timestamp in ftrace records.

Patch updates ftrace.h to record a litmus_clock() time stamp
in ftrace records.
litmus/ctrldev: Fix stale readouts on ARMv7

For ARMv7 __S011 only declares the access bits, not the caching
policy. As a result the userspace mapping would bypass the cache,
causing the kernel to occasionally read stale entries from the cache.
Switch to using PAGE_SHARED instead, which assumes correct caching
defaults.

[With kind assistance by Alexander Zuepke <alexander.zuepke@hs-rm.de>,
who pointed out the correct direction to look for the caching bug.]

Signed-off-by: Roy Spliet <rspliet@mpi-sws.org>
Add task_cleanup() to scheduler plugin interface
Force LITMUS^RT tasks to become regular Linux tasks before exiting

This reduces the number of ways in which a real-time task can exit to
one (via sched_setscheduler), which makes it easier to avoid nasty
corner cases.
Reimplement sporadic release support

The way the synchronous release code used to set up sporadic releases
is racy. This patch changes the implementation to postpone the
fiddling with the ->release parameter until prepare_for_next_period(),
which is called with the appropriate plugin-specific locks held.
Remove dont_requeue flag

The flag was a hack that never really worked. It shortened the race
window, but didn't close it. With the new sporadic release support, it
should now be superfluous.
Make LITMUS^RT the highest-priority scheduling class again

The existing LITMUS^RT code assumes that it is called as the
highest-priority scheduling class (this was true before stock Linux
gained stop_sched_class). The port to 3.10 changed this, which can
result in rare crashes. This patch makes LITMUS^RT the top scheduling
class again.

Having higher priority than stop_sched_class makes no real sense, but
this was the case in 3.0 also and is required for the existing code to
work correctly.
Postpone deallocation of LITMUS^RT per-task state in sched_setscheduler()
Add config option for linking to local CPU in GSN-EDF

Make it possible to turn of the "always link locally if possible"
latency optimization.

This patch also fixes a bug when local linking is used together with
release master support.

Based on a patch by Felipe Cerqueira (felipec@mpi-sws.org).
C-EDF: add support for CONFIG_PREFER_LOCAL_LINKING

Port the "link locally if possible" latency optimization from GSN-EDF
to C-EDF.
/proc/litmus: Export info. on CPU <-> cluster

This patch adds a framework by which plugins can
export information about CPU <-> cluster (aka
scheduling domain) per cluster.

/proc/litmus/domains/<domain#>: This file contains a CPU
mask describing the CPUs scheduled/managed by that domain.
Files are named by index. For example, the first scheduling
domain would be '0'.

/proc/litmus/cpus/<cpus#>: This file contains a domain
mask describing which domains manage this CPU. Normally,
only one bit will be set in this mask, but overlapping clusters
can also be expressed by setting multiple bits.
sched_plgn: Add fn. for reporting CPU/cluster maps

This patch adds the plugin interface "get_domain_proc_info()".
Plugins use this function to report their cpu/clustering configuration
to the user via /proc/litmus/domains and /proc/litmus/cpus.
Set /proc/litmus/cpus (and domains) on plg activ.

This patch updates the plugin activation routine.
Prior to deactivation, a plugin's data for /proc/litmus/cpus
and /proc/litmus/domains is deactivated/removed.
After successful plugin activation, get_domain_proc_info()
is called on the activated plugin, and the resulting info
is used to configure /proc/litmus/cpus and /proc/litmus/domains.
C-EDF: Export cluster configuration to /proc.

This patch updates C-EDF to support get_domain_proc_info().
G-EDF: Export cluster configuration to /proc

This patch updates G-EDF to support get_domain_proc_info().
PSN-EDF: Export cluster configuration to /proc.

This patch updated PSN-EDF to support get_domain_proc_info().
P-FP: Export cluster configuration to /proc.

This patch updated P-FP to support get_domain_proc_info().
PFAIR: Export cluster configuration to /proc.

This patch updated PFAIR to support get_domain_proc_info().