From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Smirl Date: Fri, 24 Jun 2005 14:12:19 +0000 Subject: sysdev_class use from DRM Message-Id: <9e473391050624071263dfbea7@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org DRM has a model where it runs without attaching to the PCI device. It is doing this because the framebuffer devices are already attached to the device. Some developers want to add power manager support to the DRM drivers. Since the normal pm hooks are occupied they are doing this by creating a sysdev_class. static struct sysdev_class drm_sysdev_class =3D { set_kset_name("drm"), .resume =3D drm_resume, .suspend =3D drm_suspend, }; If I rmmod the modules before reboot I can reboot cleanly. But if the modules are still loaded at reboot I get the following trap in sysdev. I suspect this is because the kernel has already wiped out the loadable drivers when sysdev shut down is happening. Can anyone explain what is happening? I could unregister the sysdev device via _exitcall() but the kernel doesn't call _exitcall() in current builds. Meanwhile it just occurred to me to mark these routines and structures _exit, I'll try that while wait for a reply to this. Don't tell me to merge DRM/fbdev, that fight has been going on for two years now. --=20 Jon Smirl jonsmirl@gmail.com EIP: 0060:[] Not tainted VLI EFLAGS: 00010246 (2.6.12) EIP is at sysdev_shutdown+0xbd/0xd2 eax: 6b6b6b47 ebx: f9a904c0 ecx: 00000000 edx: 6b6b6b6b esi: f9a904c0 edi: 6b6b6b47 ebp: f65e8e8c esp: f65e8e7c ds: 007b es: 007b ss: 0068 Process reboot (pid: 8899, threadinfo=F65e8000 task=C1a7e520) Stack: f9a904dc c03280fc c03281cc 4f51bff4 f65e8e9c c01ffa64 28121969 01234= 567 f65e8fb4 c01272ce f7490d84 f7fa5180 00010800 f7fa5180 00000000 f65e8e= d4 c0140f08 f1ea4a5c f7f68d80 00030800 f7f68d80 00000000 f65e8f00 c01423= 21 Call Trace: [] show_stack+0x7c/0x92 [] show_registers+0x152/0x1ca [] die+0xf4/0x16f [] do_page_fault+0x42f/0x654 [] error_code+0x4f/0x54 [] device_shutdown+0x74/0x78 [] sys_reboot+0xf8/0x20f [] sysenter_past_esp+0x54/0x75 Code: 8d 42 bc 89 c6 eb 86 f0 ff 05 64 82 32 c0 0f 8e 3f 02 00 00 83 c4 04 = 5b 5e 5f 5d c3 8b 56 08 85 d2 75 17 8b 57 24 8d 42 dc 89 c7 <8b> 40 24 0f 18 00 = 90 3b 55 f0 e9 77 ff ff ff 89 f8 ff d2 eb e3 INIT: no more processes left in this runlevel ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=CCk _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel