* [PATCH] Export new char dev functions
@ 2003-09-16 18:18 Jonathan Corbet
2003-09-16 23:57 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Corbet @ 2003-09-16 18:18 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds
Nobody told me that the failure to export these (like their block
counterparts) was anything but an oversight; modules will not be able to
use larger device numbers without them. So...this patch exports the new
char device functions.
jon
Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net
--- test5-vanilla/kernel/ksyms.c Wed Sep 17 01:58:05 2003
+++ test5/kernel/ksyms.c Wed Sep 17 02:05:29 2003
@@ -42,6 +42,7 @@
#include <linux/highuid.h>
#include <linux/fs.h>
#include <linux/fs_struct.h>
+#include <linux/cdev.h>
#include <linux/uio.h>
#include <linux/tty.h>
#include <linux/in6.h>
@@ -355,6 +356,16 @@
EXPORT_SYMBOL(tty_register_driver);
EXPORT_SYMBOL(tty_unregister_driver);
EXPORT_SYMBOL(tty_std_termios);
+EXPORT_SYMBOL(register_chrdev_region);
+EXPORT_SYMBOL(unregister_chrdev_region);
+EXPORT_SYMBOL(alloc_chrdev_region);
+EXPORT_SYMBOL(cdev_init);
+EXPORT_SYMBOL(cdev_alloc);
+EXPORT_SYMBOL(cdev_get);
+EXPORT_SYMBOL(cdev_put);
+EXPORT_SYMBOL(cdev_del);
+EXPORT_SYMBOL(cdev_add);
+EXPORT_SYMBOL(cdev_unmap);
/* block device driver support */
EXPORT_SYMBOL(bmap);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-16 18:18 [PATCH] Export new char dev functions Jonathan Corbet
@ 2003-09-16 23:57 ` Greg KH
2003-09-17 2:36 ` Jonathan Corbet
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2003-09-16 23:57 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel, torvalds
On Tue, Sep 16, 2003 at 12:18:02PM -0600, Jonathan Corbet wrote:
> Nobody told me that the failure to export these (like their block
> counterparts) was anything but an oversight; modules will not be able to
> use larger device numbers without them. So...this patch exports the new
> char device functions.
How about just exporting them in the files where they are declared? I
do not think we want the ksyms.c file to grow anymore.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-16 23:57 ` Greg KH
@ 2003-09-17 2:36 ` Jonathan Corbet
2003-09-17 2:46 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jonathan Corbet @ 2003-09-17 2:36 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg KH, torvalds
> How about just exporting them in the files where they are declared? I
> do not think we want the ksyms.c file to grow anymore.
Hmm, I figured somebody would say something like that...grumble...mutter...
...complain...gripe...moan...new patch appended...
Of course, there are other exports from that file (i.e. register_chrdev());
are we actively trying to shrink ksyms.c?
jon
Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net
--- test5-vanilla/fs/char_dev.c Mon Sep 8 13:50:01 2003
+++ test5/fs/char_dev.c Wed Sep 17 10:19:18 2003
@@ -445,3 +445,16 @@
kset_register(&kset_dynamic);
cdev_map = kobj_map_init(base_probe, &cdev_subsys);
}
+
+
+/* Let modules do char dev stuff */
+EXPORT_SYMBOL(register_chrdev_region);
+EXPORT_SYMBOL(unregister_chrdev_region);
+EXPORT_SYMBOL(alloc_chrdev_region);
+EXPORT_SYMBOL(cdev_init);
+EXPORT_SYMBOL(cdev_alloc);
+EXPORT_SYMBOL(cdev_get);
+EXPORT_SYMBOL(cdev_put);
+EXPORT_SYMBOL(cdev_del);
+EXPORT_SYMBOL(cdev_add);
+EXPORT_SYMBOL(cdev_unmap);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 2:36 ` Jonathan Corbet
@ 2003-09-17 2:46 ` Arnaldo Carvalho de Melo
2003-09-17 2:49 ` John Levon
2003-09-17 17:22 ` Greg KH
2 siblings, 0 replies; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2003-09-17 2:46 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel, Greg KH, torvalds
Em Tue, Sep 16, 2003 at 08:36:30PM -0600, Jonathan Corbet escreveu:
> > How about just exporting them in the files where they are declared? I
> > do not think we want the ksyms.c file to grow anymore.
>
> Hmm, I figured somebody would say something like that...grumble...mutter...
> ...complain...gripe...moan...new patch appended...
>
> Of course, there are other exports from that file (i.e. register_chrdev());
> are we actively trying to shrink ksyms.c?
Linus call, perhaps, but I for one would love to see it just die, having it
in the files that actually implement the functions exported is IMHO more
maintainer friendly, not that ksyms.c is that much touched but...
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 2:36 ` Jonathan Corbet
2003-09-17 2:46 ` Arnaldo Carvalho de Melo
@ 2003-09-17 2:49 ` John Levon
2003-09-17 16:36 ` Jonathan Corbet
2003-09-17 17:22 ` Greg KH
2 siblings, 1 reply; 10+ messages in thread
From: John Levon @ 2003-09-17 2:49 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel
On Tue, Sep 16, 2003 at 08:36:30PM -0600, Jonathan Corbet wrote:
> Of course, there are other exports from that file (i.e. register_chrdev());
> are we actively trying to shrink ksyms.c?
I think we are, yes. ksyms.c just makes life harder.
regards
john
--
Khendon's Law:
If the same point is made twice by the same person, the thread is over.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 2:49 ` John Levon
@ 2003-09-17 16:36 ` Jonathan Corbet
2003-09-17 22:45 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Corbet @ 2003-09-17 16:36 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds
> John Levon sez:
> > Of course, there are other exports from that file (i.e. register_chrdev());
> > are we actively trying to shrink ksyms.c?
>
> I think we are, yes. ksyms.c just makes life harder.
OK, here is a version that evacutates all of fs/char_dev.c's functions out
of ksyms.c. And that, probably, is about all the bandwidth this little
patch is worth...
jon
diff -urN -X dontdiff test5-vanilla/fs/char_dev.c test5/fs/char_dev.c
--- test5-vanilla/fs/char_dev.c Mon Sep 8 13:50:01 2003
+++ test5/fs/char_dev.c Wed Sep 17 10:45:46 2003
@@ -445,3 +445,18 @@
kset_register(&kset_dynamic);
cdev_map = kobj_map_init(base_probe, &cdev_subsys);
}
+
+
+/* Let modules do char dev stuff */
+EXPORT_SYMBOL(register_chrdev_region);
+EXPORT_SYMBOL(unregister_chrdev_region);
+EXPORT_SYMBOL(alloc_chrdev_region);
+EXPORT_SYMBOL(cdev_init);
+EXPORT_SYMBOL(cdev_alloc);
+EXPORT_SYMBOL(cdev_get);
+EXPORT_SYMBOL(cdev_put);
+EXPORT_SYMBOL(cdev_del);
+EXPORT_SYMBOL(cdev_add);
+EXPORT_SYMBOL(cdev_unmap);
+EXPORT_SYMBOL(register_chrdev);
+EXPORT_SYMBOL(unregister_chrdev);
diff -urN -X dontdiff test5-vanilla/kernel/ksyms.c test5/kernel/ksyms.c
--- test5-vanilla/kernel/ksyms.c Wed Sep 17 01:58:05 2003
+++ test5/kernel/ksyms.c Wed Sep 17 10:45:46 2003
@@ -348,8 +348,6 @@
EXPORT_SYMBOL(unlock_page);
/* device registration */
-EXPORT_SYMBOL(register_chrdev);
-EXPORT_SYMBOL(unregister_chrdev);
EXPORT_SYMBOL(register_blkdev);
EXPORT_SYMBOL(unregister_blkdev);
EXPORT_SYMBOL(tty_register_driver);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 2:36 ` Jonathan Corbet
2003-09-17 2:46 ` Arnaldo Carvalho de Melo
2003-09-17 2:49 ` John Levon
@ 2003-09-17 17:22 ` Greg KH
2 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-09-17 17:22 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel, torvalds
On Tue, Sep 16, 2003 at 08:36:30PM -0600, Jonathan Corbet wrote:
> > How about just exporting them in the files where they are declared? I
> > do not think we want the ksyms.c file to grow anymore.
>
> Hmm, I figured somebody would say something like that...grumble...mutter...
> ...complain...gripe...moan...new patch appended...
>
> Of course, there are other exports from that file (i.e. register_chrdev());
> are we actively trying to shrink ksyms.c?
I just think we aren't trying to grow it at this time :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 16:36 ` Jonathan Corbet
@ 2003-09-17 22:45 ` Jeff Garzik
2003-09-17 23:03 ` Jonathan Corbet
0 siblings, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2003-09-17 22:45 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel, torvalds
On Wed, Sep 17, 2003 at 10:36:28AM -0600, Jonathan Corbet wrote:
> > John Levon sez:
> > > Of course, there are other exports from that file (i.e. register_chrdev());
> > > are we actively trying to shrink ksyms.c?
> >
> > I think we are, yes. ksyms.c just makes life harder.
>
> OK, here is a version that evacutates all of fs/char_dev.c's functions out
> of ksyms.c. And that, probably, is about all the bandwidth this little
> patch is worth...
>
> jon
>
> diff -urN -X dontdiff test5-vanilla/fs/char_dev.c test5/fs/char_dev.c
> --- test5-vanilla/fs/char_dev.c Mon Sep 8 13:50:01 2003
> +++ test5/fs/char_dev.c Wed Sep 17 10:45:46 2003
Need to modify export-objs line in fs/Makefile too.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 22:45 ` Jeff Garzik
@ 2003-09-17 23:03 ` Jonathan Corbet
2003-09-17 23:09 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Corbet @ 2003-09-17 23:03 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, torvalds
> Need to modify export-objs line in fs/Makefile too.
I do? In 2.5?? I thought that was old, obsolete stuff?
I sure don't find any export-objs lines in -test5...
jon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Export new char dev functions
2003-09-17 23:03 ` Jonathan Corbet
@ 2003-09-17 23:09 ` Jeff Garzik
0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2003-09-17 23:09 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-kernel, torvalds
On Wed, Sep 17, 2003 at 05:03:53PM -0600, Jonathan Corbet wrote:
> > Need to modify export-objs line in fs/Makefile too.
>
> I do? In 2.5?? I thought that was old, obsolete stuff?
>
> I sure don't find any export-objs lines in -test5...
Nope, you're correct. I was looking at 2.4...
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-09-17 23:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-16 18:18 [PATCH] Export new char dev functions Jonathan Corbet
2003-09-16 23:57 ` Greg KH
2003-09-17 2:36 ` Jonathan Corbet
2003-09-17 2:46 ` Arnaldo Carvalho de Melo
2003-09-17 2:49 ` John Levon
2003-09-17 16:36 ` Jonathan Corbet
2003-09-17 22:45 ` Jeff Garzik
2003-09-17 23:03 ` Jonathan Corbet
2003-09-17 23:09 ` Jeff Garzik
2003-09-17 17:22 ` Greg KH
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.