All of lore.kernel.org
 help / color / mirror / Atom feed
* Kernel fault with simple UIO interrupt driver in 2.6.30.4
@ 2009-08-03 13:07 Frank Prepelica
  2009-08-04  2:31 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Prepelica @ 2009-08-03 13:07 UTC (permalink / raw)
  To: linuxppc-dev

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 2.6.30.4.

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 2.6.30.4.

It's a very simple interrupt driver which will be register for a certain =
external=20
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 =3D {
	.name =3D "IRQ4 Kernel Driver",
	.version =3D "1.0.1",
	.irq =3D 20,
	.irq_flags =3DIRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_FALLING,
	.handler=3D 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;
	}
	else
	{
		return 0;
	}
}


static int uio_irq4_remove(struct device *dev)
{
	uio_unregister_device(&uio_irq4_info);
	return 0;
}


static void uio_irq4_shutdown(struct device *dev)
{

}


static struct platform_device *uio_irq4_device;

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

/*
* Main initialization/remove routines
*/
static int __init uio_irq4_init(void)
{
	uio_irq4_device =3D 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)
{
	platform_device_unregister(uio_irq4_device);
	driver_unregister(&uio_irq4_driver);
}


module_init(uio_irq4_init);
module_exit(uio_irq4_exit);


MODULE_LICENSE("tbd");
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
Lise-Meitner-Str.-14
89081 Ulm - Germany

Phone:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +49 731 88 00 71 58
Fax:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +49 731 88 00 71 99
Email:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
frank.prepelica@ubidyne.com
Homepage:=A0=A0=A0=A0=A0=A0 www.ubidyne.com
=A0
Registered office: Ulm
District court of Ulm: HRB 5295
Managing Directors:
Dipl. Ing. Ken Hawk
Dipl. Ing. Beat M=FCller
Dipl. Ing. Mike Levis

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

* Re: Kernel fault with simple UIO interrupt driver in 2.6.30.4
  2009-08-03 13:07 Kernel fault with simple UIO interrupt driver in 2.6.30.4 Frank Prepelica
@ 2009-08-04  2:31 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2009-08-04  2:31 UTC (permalink / raw)
  To: Frank Prepelica; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

On Mon, 2009-08-03 at 15:07 +0200, Frank Prepelica wrote:
> 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 2.6.30.4.
> 
> 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 2.6.30.4.

You seem to have forgotten to post the log of the oops :)

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-08-04  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-03 13:07 Kernel fault with simple UIO interrupt driver in 2.6.30.4 Frank Prepelica
2009-08-04  2:31 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.