Skip to content
Commit e6e76282 authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Deepak Kumar Mishra
Browse files

sched/cpupri: Remove pri_to_cpu[1]



pri_to_cpu[1] isn't used since cpupri_set(..., newpri) is
never called with newpri = 99.

The valid RT priorities RT1..RT99 (p->rt_priority = [1..99]) map into
p->prio = [98..0].

Currently this maps into cpupri (idx of pri_to_cpu[]) like:

p->rt_priority	p->prio	  cpupri

            1	     98	       2
	   ...
           49        50       49
           50        49       50
	   ...
           99         0      100

So cpupri = 1 isn't used.

Remove pri_to_cpu[1] and adapt the cpupri implementation accordingly.
This will save a useless loop with atomic_read's in
cpupri_find_fitness() -> __cpupri_find().

Signed-off-by: Dietmar Eggemann's avatarDietmar Eggemann <dietmar.eggemann@arm.com>
parent f0c637ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment