linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* request_irq in a module casues kernel crash
@ 2001-03-23  5:50 Subodh Nijsure
  2001-03-23  6:01 ` Cort Dougan
  0 siblings, 1 reply; 3+ messages in thread
From: Subodh Nijsure @ 2001-03-23  5:50 UTC (permalink / raw)
  To: linuxppc-embedded


I am trying to write a module where I am trying to register an interrupt
handler using request_irq() sample code for which appears below, when
I try to load this module, I am getting kernel panic. Anybody knows reason
why?
I have compiled the kernel with  CONFIG_MODULES=y CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

I am using  2.4.2-pre3 on a 860 platform.


void handler(int irq, void *dev_id, struct pt_regs * regs)
{
    printk("Interrupt handler invoked for irq %d \n",irq);
}

/* load the module */
int init_module(void)
{
    int result;
    result = request_irq (SIU_IRQ7, my_handler,SA_INTERRUPT,
		"cxeHandler",NULL);
    if ( result )
        printk("Interrupt not assigned");
    else
        printk("Interrupt  assigned");
    return 0;
}

/* remove the module */
void cleanup_module(void)
{
    return;
}

/Subodh Nijsure

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: request_irq in a module casues kernel crash
  2001-03-23  5:50 request_irq in a module casues kernel crash Subodh Nijsure
@ 2001-03-23  6:01 ` Cort Dougan
  0 siblings, 0 replies; 3+ messages in thread
From: Cort Dougan @ 2001-03-23  6:01 UTC (permalink / raw)
  To: Subodh Nijsure; +Cc: linuxppc-embedded


Try request_8xxirq, not request_irq.  The 8xx has its own name for
request_irq.

} I am trying to write a module where I am trying to register an interrupt
} handler using request_irq() sample code for which appears below, when
} I try to load this module, I am getting kernel panic. Anybody knows reason
} why?
} I have compiled the kernel with  CONFIG_MODULES=y CONFIG_MODVERSIONS=y
} CONFIG_KMOD=y
}
} I am using  2.4.2-pre3 on a 860 platform.
}
}
} void handler(int irq, void *dev_id, struct pt_regs * regs)
} {
}     printk("Interrupt handler invoked for irq %d \n",irq);
} }
}
} /* load the module */
} int init_module(void)
} {
}     int result;
}     result = request_irq (SIU_IRQ7, my_handler,SA_INTERRUPT,
} 		"cxeHandler",NULL);
}     if ( result )
}         printk("Interrupt not assigned");
}     else
}         printk("Interrupt  assigned");
}     return 0;
} }
}
} /* remove the module */
} void cleanup_module(void)
} {
}     return;
} }
}
} /Subodh Nijsure
}

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* request_irq in a module casues kernel crash
@ 2006-07-12  6:47 brijesh.chodavadiya
  0 siblings, 0 replies; 3+ messages in thread
From: brijesh.chodavadiya @ 2006-07-12  6:47 UTC (permalink / raw)
  To: linuxppc-embedded

please rewrite handler function with,

 void handler(int irq, void *dev_id, struct pt_regs * regs)
 {
	printk("Interrupt handler invoked for irq %d \n",irq);
	return IRQ_HANDLED;
 }



eInfochips Business Disclaimer:
This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by eInfochips Limited and/or eInfochips Inc("eInfochips") unless sent with that express intent and with due authority of eInfochips. eInfochips has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-12  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-23  5:50 request_irq in a module casues kernel crash Subodh Nijsure
2001-03-23  6:01 ` Cort Dougan
  -- strict thread matches above, loose matches on Subject: below --
2006-07-12  6:47 brijesh.chodavadiya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).