Skip to content
  • Qais Yousef's avatar
    sched_tp: fix compilation error on SMP systems with NR_CPUS=2 · bac3fc0e
    Qais Yousef authored and Ionela Voinescu's avatar Ionela Voinescu committed
    
    
    SPAN_SIZE was being set to 0 when NR_CPUS was 2; which triggererd
    a compile time assertion. Which exposed a bug in the logic where we
    where rounding down instead of up. Fix it by using round_up() to ensure
    we get the correct span size for the NR_CPUS.
    
    Ensure as well that we don't use a spansize greather than 128. The trace
    str can't take arbitrarly large size. It's limited to 256 but be more
    conservative and cap it to 128.
    
    Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
    bac3fc0e