MIPS: Replace setup_irq() by request_irq()
request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. Per tglx[1], setup_irq() existed in olden days when allocators were not ready by the time early interrupts were initialized. Hence replace setup_irq() by request_irq(). remove_irq() has been replaced by free_irq() as well. There were build error's during previous version, couple of which was reported by kbuild test robot <lkp@intel.com> of which one was reported by Thomas Bogendoerfer <tsbogend@alpha.franken.de> as well. There were a few more issues including build errors, those also have been fixed. [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:

committed by
Thomas Bogendoerfer

parent
792a402c28
commit
ac8fd122e0
@@ -110,12 +110,6 @@ static irqreturn_t fmn_message_handler(int irq, void *data)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
struct irqaction fmn_irqaction = {
|
||||
.handler = fmn_message_handler,
|
||||
.flags = IRQF_PERCPU,
|
||||
.name = "fmn",
|
||||
};
|
||||
|
||||
void xlr_percpu_fmn_init(void)
|
||||
{
|
||||
struct xlr_fmn_info *cpu_fmn_info;
|
||||
@@ -195,8 +189,9 @@ void nlm_setup_fmn_irq(void)
|
||||
{
|
||||
uint32_t flags;
|
||||
|
||||
/* setup irq only once */
|
||||
setup_irq(IRQ_FMN, &fmn_irqaction);
|
||||
/* request irq only once */
|
||||
if (request_irq(IRQ_FMN, fmn_message_handler, IRQF_PERCPU, "fmn", NULL))
|
||||
pr_err("Failed to request irq %d (fmn)\n", IRQ_FMN);
|
||||
|
||||
flags = nlm_cop2_enable_irqsave();
|
||||
nlm_fmn_setup_intr(IRQ_FMN, (1 << nlm_threads_per_core) - 1);
|
||||
|
Reference in New Issue
Block a user