Kernel fault with simple UIO interrupt driver in

Frank Prepelica Frank.Prepelica at
Mon Aug 3 23:07:54 EST 2009

Hi all,

due to a new revision of our custimized board, i need to port our current kernel (2.6.24)
to the latest kernel version

Among other things the UIO interrupt driver makes some trouble. The driver runs
smoothly on 2.6.24 but I'll get kernel faults when running in

It's a very simple interrupt driver which will be register for a certain external 
cpu interrupt and informs our application via /dev/uioX when an interrupt occurs.

Is there anything that changed in the uio framework that could cause the
kernel fault with our uio driver?

Our driver looks like follow
#include <linux/uio_driver.h>
#include <linux/platform_device.h>
#include <linux/module.h>

static irqreturn_t interrupt_handler_irq4(int irq, struct uio_info *dev_info)
	return IRQ_HANDLED;

static struct uio_info uio_irq4_info = {
	.name = "IRQ4 Kernel Driver",
	.version = "1.0.1",
	.irq = 20,
	.handler= interrupt_handler_irq4,

static int uio_irq4_probe(struct device *dev)
	if (uio_register_device(dev, &uio_irq4_info)) {
		kfree((void *)uio_irq4_info.mem[0].addr);
		return -ENODEV;
		return 0;

static int uio_irq4_remove(struct device *dev)
	return 0;

static void uio_irq4_shutdown(struct device *dev)


static struct platform_device *uio_irq4_device;

static struct device_driver uio_irq4_driver = {
	.name		= "IRQ4",
	.bus		= &platform_bus_type,
	.probe		= uio_irq4_probe,
	.remove		= uio_irq4_remove,
	.shutdown	= uio_irq4_shutdown,

* Main initialization/remove routines
static int __init uio_irq4_init(void)
	uio_irq4_device = platform_device_register_simple("IRQ4", -1,
							   NULL, 0);
	if (IS_ERR(uio_irq4_device))
		return PTR_ERR(uio_irq4_device);

	return driver_register(&uio_irq4_driver);

static void __exit uio_irq4_exit(void)


MODULE_AUTHOR("Frank Prepelica, Ubidyne GmbH");
MODULE_DESCRIPTION("IRQ4 Interrupt Handler - CPLD Interrupts");

Any help is highly appreciated!

Kind Regards

Frank Prepelica
Software Design Engineer

Ubidyne GmbH
89081 Ulm - Germany

Phone:             +49 731 88 00 71 58
Fax:                 +49 731 88 00 71 99
Email:              frank.prepelica at
Registered office: Ulm
District court of Ulm: HRB 5295
Managing Directors:
Dipl. Ing. Ken Hawk
Dipl. Ing. Beat Müller
Dipl. Ing. Mike Levis

More information about the Linuxppc-dev mailing list