[core/sched/cbs] Conditional compile CBS scheduling class

This patch add all the required compilation guards to conditionally compile
the support for CBS. When CBS is enabled, it places itself in between the
RT and the FAIR class.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Reset initialization after event tracing

The Burst FTrace event is generated after the task has completed its burst,
i.e. in the monitor_cbs_burst function.
This event reports the status of the re-initialization flag during last
burst assignment, thus this flag must be cleared after the burst completed.

This movement introduces a bit of run-time overhead since the flag is going
to be cleared even if the task was not re-initialized.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Bugfix div/mul macros to handle signed operands

These macros are used to multiply/divide signed numbers, thus operands are
now defined s32. Fitting into a s32 is check on the obtained result.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Bugfix round upper bound computation

The burst_max_ns must be converted in TQ units. Moreover, a signed integer
is used to better support the comparison with the old correction.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Add burst_stop attribute for each SE

Once a SE is scheduled, the burst end time is tracked so that it could be
used to properly preempts the task once its burst is out.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Add a burst end check function

If a SE has run out of its burst time, the NEED_RESCHED flag is set to trigger
a scheduling. This function is called at each task tick time.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Add support for Yield

CPU Yielding is managed in a pretty simple way: we just set the
NEED_RESCHEDULE flag to trigger the scheduler.

NOTE: yield_to is not yet supported

Signed-off-by: Patrick Bellasi <derkling@gmail.com>
[core/sched/cbs] Update scheduler params definition

The maximum number of tasks is not run-time computed based on round
latency and minimum burst parameters.

Signed-off-by: Patrick Bellasi <derkling@gmail.com>