[lkml]   [2002]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] linux-2.417 devfs 64bit portablility issue
Carsten Otte writes:
> In linux-2.4.17/fs/devfs/util.c, I found the following code:
> struct major_list
> {
> spinlock_t lock;
> __u32 bits[8];
> };
> static struct major_list block_major_list =
> {0xfffffb8f, /* Majors 0 to 31 */
> 0xffff0000} /* Majors 224 to 255 */
> };
> Afterwards, the block_major_list.bits is processed using
> find_first_zero_bit & set_bit out of asm/bitops.h.
> Since bitops are only defined for the datatype long, this does
> only work on 32-bit architectures (on 64 bit data gets
> incorrectly alligned -not on 8byte boundary & the ordering of
> the data is incorrect).
> I attached a patch that should fix it for all architectures.

Sorry, but I find your approach grotesque. Apart from basic warts such
as not declaring code+data as __init, the approach of populating the
bitfield from yet another list doesn't appeal to me. I'd much rather
see an approach which preserved the initialisation using bitmasks.

> (See attached file: linux-2.4.17-devfs_fixup.diff)

BTW: please don't send attachments. Send patches inline instead.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.128 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site