--- zzzz-none-000/linux-2.6.39.4/kernel/irq/manage.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/kernel/irq/manage.c 2021-11-10 13:23:10.000000000 +0000 @@ -6,6 +6,12 @@ * * This file contains driver APIs to the irq subsystem. */ + +/* + * Includes Intel Corporation's changes/modifications dated: 2012. + * Changed/modified portions - Copyright © 2012 , Intel Corporation. + */ + #include #include @@ -462,6 +468,27 @@ } EXPORT_SYMBOL(enable_irq); +/** + * ack_irq - ACK handling of an irq + * @irq: Interrupt to ACK + * + * ACKs the selected interrupt line. + * + */ +void ack_irq(unsigned int irq) +{ + struct irq_desc *desc = irq_to_desc(irq); + + if (!desc) + { + return; + } + + irq_ack(desc); +} +EXPORT_SYMBOL(ack_irq); + + static int set_irq_wake_real(unsigned int irq, unsigned int on) { struct irq_desc *desc = irq_to_desc(irq); @@ -748,9 +775,13 @@ */ static int irq_thread(void *data) { +#ifndef CONFIG_INTEL_IRQ_THREAD_CHANGE_PRIORITY static const struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO/2, }; +#else + struct sched_param param = { 0, }; +#endif struct irqaction *action = data; struct irq_desc *desc = irq_to_desc(action->irq); void (*handler_fn)(struct irq_desc *desc, struct irqaction *action); @@ -761,8 +792,19 @@ handler_fn = irq_forced_thread_fn; else handler_fn = irq_thread_fn; - +#ifndef CONFIG_INTEL_IRQ_THREAD_CHANGE_PRIORITY sched_setscheduler(current, SCHED_FIFO, ¶m); +#else + if (desc->policy == SCHED_NORMAL) + { + set_user_nice(current, desc->sched_priority); + } + else + { + param.sched_priority = desc->sched_priority; + sched_setscheduler(current, desc->policy, ¶m); + } +#endif current->irqaction = action; while (!irq_wait_for_interrupt(action)) { @@ -858,7 +900,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) { struct irqaction *old, **old_ptr; - const char *old_name = NULL; + const char *old_name __attribute__((unused)) = NULL; unsigned long flags, thread_mask = 0; int ret, nested, shared = 0; cpumask_var_t mask;