linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@yahoo.com>
To: linux-hotplug@vger.kernel.org
Subject: registering same sysfs class in different drivers.
Date: Fri, 16 Jan 2004 06:42:33 +0000	[thread overview]
Message-ID: <20040116064233.78134.qmail@web14915.mail.yahoo.com> (raw)

The DRI drivers for each card type are indepenent from each other, but they all
exist in the same sysfs class. Right now when I try to load a second driver I'm
faulting in sysfs:create_dir with parent dentry NULL. create_dir() is called via
simple_add_class_device(). Either driver loads standalone without problem.

I suspect the fault is because each driver is registering it's own copy of the
'dri' class. Is there some mechanism to see if the class has already been
registered and use the preexisting copy? class_register() always returns 0.


[drm] Debug messages ON
sysfs:create_dir: kobject *f8b1cfb4, p dentry *f7fc5280, nstr dri, d dentry
*f2e47f44
sysfs:create_dir: kobject *f8b1d060, p dentry *f7fe6180, nstr radeon, d dentry
*f2e47f18
[drm:drm_probe]
[drm:radeon_stub_register]
sysfs:create_dir: kobject *f59ded00, p dentry *f7fc5a80, nstr drm, d dentry
*f2e47e1c
[drm:radeon_stub_register] calling inter_module_register
PCI: Enabling device 0000:01:00.0 (0080 -> 0083)
[drm:radeon_ctxbitmap_next] drm_ctxbitmap_next bit : 0
[drm:radeon_ctxbitmap_init] drm_ctxbitmap_init : 0
[drm] Initialized radeon 1.11.0 20040115 on minor 0: ATI Radeon If R250 9000
[drm:radeon_initmap]
[drm:radeon_initmap] initmap offset = 0xfe9e0000, size = 0x00010000, type = 1
[drm:radeon_initmap]
[drm:radeon_initmap] initmap offset = 0xf4000000, size = 0x04000000, type = 0
[drm:radeon_postinit] registering secondary video head
class_device_add: class_id card0
sysfs:create_dir: kobject *f5a56594, p dentry *f2e6fb80, nstr card0, d dentry
*f2e47e34
[drm:radeon_need_reset] Memmode is 0, if zero needs reset
[drm] Debug messages ON
sysfs:create_dir: kobject *f8b3b154, p dentry *f7fc5280, nstr dri, d dentry
*f2f33f44
sysfs:create_dir: kobject *f8b3b200, p dentry *f7fe6180, nstr r128, d dentry
*f2f33f18
[drm:drm_probe]
[drm:r128_stub_register]
[drm:r128_stub_register] already registered
[drm:r128_ctxbitmap_next] drm_ctxbitmap_next bit : 0
[drm:r128_ctxbitmap_init] drm_ctxbitmap_init : 0
[drm] Initialized r128 2.5.0 20030725 on minor 1: ATI Rage 128 Pro PD (PCI)
class_device_add: class_id card1
sysfs:create_dir: kobject *f510e514, p dentry *00000000, nstr card1, d dentry
*f2f33e34
Unable to handle kernel NULL pointer dereference at virtual address 0000000c
 printing eip:
c018d022
*pde = 00000000
Oops: 0000 [#1]
CPU:    1
EIP:    0060:[<c018d022>]    Not tainted
EFLAGS: 00010282
EIP is at create_dir+0x3f/0xc2
eax: 0000005b   ebx: f510e518   ecx: c02f19b4   edx: 0000ee04
esi: 00000000   edi: f2f33e34   ebp: f510e514   esp: f2f33dfc
ds: 007b   es: 007b   ss: 0068
Process insmod (pid: 2772, threadinfoòf32000 taskõf29940)
Stack: c02bd420 f510e514 00000000 f510e518 f2f33e34 f510e514 f510e514 c0327a40
       f8b3b140 c018d10f f510e514 00000000 f510e518 f2f33e34 00000000 00000000
       c01ba3dd f510e514 f510e514 f8b3b154 c01ba84d f510e514 00000000 f510e514
Call Trace:
 [<c018d10f>] sysfs_create_dir+0x40/0x73
 [<c01ba3dd>] create_dir+0x1f/0x4b
 [<c01ba84d>] kobject_add+0x99/0x11c
 [<c0202046>] class_device_add+0x79/0x122
 [<c0201fc0>] class_device_initialize+0x1d/0x2a
 [<c020250a>] simple_add_class_device+0x80/0xd7
 [<f8b26d5e>] drm_probe+0x215/0x262 [r128]
 [<c01c4162>] pci_device_probe_static+0x52/0x63
 [<c01c41ae>] __pci_device_probe+0x3b/0x4e
 [<c01c41ed>] pci_device_probe+0x2c/0x4a
 [<c0201463>] bus_match+0x3f/0x6a
 [<c0201575>] driver_attach+0x56/0x80
 [<c02017f8>] bus_add_driver+0x8c/0x9f
 [<c01c43b9>] pci_register_driver+0x6c/0x94
 [<f895b036>] drm_init+0x36/0x52 [r128]
 [<c0136083>] sys_init_module+0x11d/0x20e
 [<c010a84d>] sysenter_past_esp+0x52/0x71
 
Code: 8b 46 0c 8d 48 6c f0 ff 48 6c 0f 88 1b 03 00 00 89 34 24 89
  
[root@smirl drm]#



==Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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

             reply	other threads:[~2004-01-16  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16  6:42 Jon Smirl [this message]
2004-01-16 19:51 ` registering same sysfs class in different drivers Jon Smirl
2004-01-17  0:09 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040116064233.78134.qmail@web14915.mail.yahoo.com \
    --to=jonsmirl@yahoo.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).