mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Make gtaskqueue compatible with drm-next such that they can be used with the
linuxkpi tasklets. Submitted by: mmacy@nextbsd.org Reported by: hps
This commit is contained in:
parent
19b60f70c0
commit
d945ed6472
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314502
@ -52,6 +52,8 @@ static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues");
|
||||
static void gtaskqueue_thread_enqueue(void *);
|
||||
static void gtaskqueue_thread_loop(void *arg);
|
||||
|
||||
TASKQGROUP_DEFINE(softirq, mp_ncpus, 1);
|
||||
|
||||
struct gtaskqueue_busy {
|
||||
struct gtask *tb_running;
|
||||
TAILQ_ENTRY(gtaskqueue_busy) tb_link;
|
||||
|
@ -480,7 +480,6 @@ MODULE_VERSION(iflib, 1);
|
||||
MODULE_DEPEND(iflib, pci, 1, 1, 1);
|
||||
MODULE_DEPEND(iflib, ether, 1, 1, 1);
|
||||
|
||||
TASKQGROUP_DEFINE(if_io_tqg, mp_ncpus, 1);
|
||||
TASKQGROUP_DEFINE(if_config_tqg, 1, 1);
|
||||
|
||||
#ifndef IFLIB_DEBUG_COUNTERS
|
||||
@ -3922,7 +3921,7 @@ iflib_device_deregister(if_ctx_t ctx)
|
||||
if (ctx->ifc_led_dev != NULL)
|
||||
led_destroy(ctx->ifc_led_dev);
|
||||
/* XXX drain any dependent tasks */
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) {
|
||||
callout_drain(&txq->ift_timer);
|
||||
callout_drain(&txq->ift_db_check);
|
||||
@ -4552,7 +4551,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
|
||||
q = &ctx->ifc_txqs[qid];
|
||||
info = &ctx->ifc_txqs[qid].ift_filter_info;
|
||||
gtask = &ctx->ifc_txqs[qid].ift_task;
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
fn = _task_fn_tx;
|
||||
GROUPTASK_INIT(gtask, 0, fn, q);
|
||||
break;
|
||||
@ -4560,7 +4559,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
|
||||
q = &ctx->ifc_rxqs[qid];
|
||||
info = &ctx->ifc_rxqs[qid].ifr_filter_info;
|
||||
gtask = &ctx->ifc_rxqs[qid].ifr_task;
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
fn = _task_fn_rx;
|
||||
GROUPTASK_INIT(gtask, 0, fn, q);
|
||||
break;
|
||||
@ -4611,13 +4610,13 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, int rid, iflib_intr_type_t type, void
|
||||
case IFLIB_INTR_TX:
|
||||
q = &ctx->ifc_txqs[qid];
|
||||
gtask = &ctx->ifc_txqs[qid].ift_task;
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
fn = _task_fn_tx;
|
||||
break;
|
||||
case IFLIB_INTR_RX:
|
||||
q = &ctx->ifc_rxqs[qid];
|
||||
gtask = &ctx->ifc_rxqs[qid].ifr_task;
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
fn = _task_fn_rx;
|
||||
break;
|
||||
case IFLIB_INTR_IOV:
|
||||
@ -4661,7 +4660,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int *
|
||||
q = &ctx->ifc_rxqs[0];
|
||||
info = &rxq[0].ifr_filter_info;
|
||||
gtask = &rxq[0].ifr_task;
|
||||
tqg = qgroup_if_io_tqg;
|
||||
tqg = qgroup_softirq;
|
||||
tqrid = irq->ii_rid = *rid;
|
||||
fn = _task_fn_rx;
|
||||
|
||||
@ -4678,7 +4677,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int *
|
||||
taskqgroup_attach(tqg, gtask, q, tqrid, name);
|
||||
|
||||
GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq);
|
||||
taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, tqrid, "tx");
|
||||
taskqgroup_attach(qgroup_softirq, &txq->ift_task, txq, tqrid, "tx");
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -4728,7 +4727,7 @@ void
|
||||
iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name)
|
||||
{
|
||||
|
||||
taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, -1, name);
|
||||
taskqgroup_attach_cpu(qgroup_softirq, gt, uniq, cpu, -1, name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -119,5 +119,6 @@ SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \
|
||||
#endif /* EARLY_AP_STARTUP */
|
||||
|
||||
TASKQGROUP_DECLARE(net);
|
||||
TASKQGROUP_DECLARE(softirq);
|
||||
|
||||
#endif /* !_SYS_GTASKQUEUE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user