mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
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: broonie@kernel.org Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org>
This commit is contained in:
parent
f8ec806be1
commit
3070da3340
@ -709,9 +709,6 @@ static void cros_ec_spi_high_pri_release(void *worker)
|
|||||||
static int cros_ec_spi_devm_high_pri_alloc(struct device *dev,
|
static int cros_ec_spi_devm_high_pri_alloc(struct device *dev,
|
||||||
struct cros_ec_spi *ec_spi)
|
struct cros_ec_spi *ec_spi)
|
||||||
{
|
{
|
||||||
struct sched_param sched_priority = {
|
|
||||||
.sched_priority = MAX_RT_PRIO / 2,
|
|
||||||
};
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
ec_spi->high_pri_worker =
|
ec_spi->high_pri_worker =
|
||||||
@ -728,8 +725,7 @@ static int cros_ec_spi_devm_high_pri_alloc(struct device *dev,
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = sched_setscheduler_nocheck(ec_spi->high_pri_worker->task,
|
err = sched_set_fifo(ec_spi->high_pri_worker->task);
|
||||||
SCHED_FIFO, &sched_priority);
|
|
||||||
if (err)
|
if (err)
|
||||||
dev_err(dev, "Can't set cros_ec high pri priority: %d\n", err);
|
dev_err(dev, "Can't set cros_ec high pri priority: %d\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1592,11 +1592,9 @@ EXPORT_SYMBOL_GPL(spi_take_timestamp_post);
|
|||||||
*/
|
*/
|
||||||
static void spi_set_thread_rt(struct spi_controller *ctlr)
|
static void spi_set_thread_rt(struct spi_controller *ctlr)
|
||||||
{
|
{
|
||||||
struct sched_param param = { .sched_priority = MAX_RT_PRIO / 2 };
|
|
||||||
|
|
||||||
dev_info(&ctlr->dev,
|
dev_info(&ctlr->dev,
|
||||||
"will run message pump with realtime priority\n");
|
"will run message pump with realtime priority\n");
|
||||||
sched_setscheduler(ctlr->kworker_task, SCHED_FIFO, ¶m);
|
sched_set_fifo(ctlr->kworker_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spi_init_queue(struct spi_controller *ctlr)
|
static int spi_init_queue(struct spi_controller *ctlr)
|
||||||
|
Loading…
Reference in New Issue
Block a user