Skip to content

Commit 3070da3

Browse files
author
Peter Zijlstra
committed
sched,spi: Convert to sched_set_fifo*()
Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. No effective change. Cc: [email protected] Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Reviewed-by: Guenter Roeck <[email protected]>
1 parent f8ec806 commit 3070da3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

drivers/platform/chrome/cros_ec_spi.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,6 @@ static void cros_ec_spi_high_pri_release(void *worker)
709709
static int cros_ec_spi_devm_high_pri_alloc(struct device *dev,
710710
struct cros_ec_spi *ec_spi)
711711
{
712-
struct sched_param sched_priority = {
713-
.sched_priority = MAX_RT_PRIO / 2,
714-
};
715712
int err;
716713

717714
ec_spi->high_pri_worker =
@@ -728,8 +725,7 @@ static int cros_ec_spi_devm_high_pri_alloc(struct device *dev,
728725
if (err)
729726
return err;
730727

731-
err = sched_setscheduler_nocheck(ec_spi->high_pri_worker->task,
732-
SCHED_FIFO, &sched_priority);
728+
err = sched_set_fifo(ec_spi->high_pri_worker->task);
733729
if (err)
734730
dev_err(dev, "Can't set cros_ec high pri priority: %d\n", err);
735731
return err;

drivers/spi/spi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,11 +1592,9 @@ EXPORT_SYMBOL_GPL(spi_take_timestamp_post);
15921592
*/
15931593
static void spi_set_thread_rt(struct spi_controller *ctlr)
15941594
{
1595-
struct sched_param param = { .sched_priority = MAX_RT_PRIO / 2 };
1596-
15971595
dev_info(&ctlr->dev,
15981596
"will run message pump with realtime priority\n");
1599-
sched_setscheduler(ctlr->kworker_task, SCHED_FIFO, &param);
1597+
sched_set_fifo(ctlr->kworker_task);
16001598
}
16011599

16021600
static int spi_init_queue(struct spi_controller *ctlr)

0 commit comments

Comments
 (0)