revert fs/char_dev.c CONFIG_BASE_FULL change
PATCH 1/1 revert fs/char_dev.c CONFIG_BASE_FULL change
I tracked down a regression in PCMCIA (and other software) to a new bogus register_chrdev() behavior that got merged last month; a patch from Matt Mackall that misbehaves.
This patch just reverts Matt's, restoring the previous behavior but at the cost of about a Kbyte of static memory on 32bit CPUs. Someday a Real Fix(tm) would be good.
- Dave
This reverts a fs/char_dev.c patch that was merged into BK on March 3.
The problem is that it breaks things ... __register_chrdev_region() has a block of code, commented "temporary" for over two years now, which fails rudely during PCMCIA initialization or other register_chrdev() calls, because it doesn't "degrade to linked list". This keeps whole subsystems from working.
A real fix to that "temporary" code should be possible, using some better scheme to allocate major numbers, but it's not something I want to spend time on just now.
fs/char_dev.c +1 -2
@@ -26,8 +26,7 @@static struct kobj_map *cdev_map; -/* degrade to linked list for small systems */ -#define MAX_PROBE_HASH (CONFIG_BASE_SMALL ? 1 : 255) +#define MAX_PROBE_HASH 255/* random */ static DECLARE_MUTEX (chrdevs_lock);
Quoted 3 lines · David Brownell
I tracked down a regression in PCMCIA (and other software) to a new bogus
register_chrdev()behavior that got merged last month; a patch from Matt Mackall that misbehaves.
Thanks and sorry about that. I actually asked Linus to revert it right after Andrew pushed it to him, but I hadn't actually seen a problem report so I didn't pursue it.
Quoted 3 lines
This patch just reverts Matt's, restoring the previous behavior but at the cost of about a Kbyte of static memory on 32bit CPUs. Someday a Real Fix(tm) would be good.
I've got a Real Fix (a refactor of block and chardev name registration), will need to wait for .12.
Quoted 1 line
Signed-off-by David Brownell <[email protected]>
Signature · 1 line
Mathematics is the supreme nostalgia of our time.