Re: [PATCH] print_dev_t for 2.6.0-test1-mm

From: H. Peter Anvin (hpa@zytor.com)
Date: Sun Jul 20 2003 - 09:33:29 EST


> On Wed, Jul 16, 2003 at 07:54:36PM -0700, H. Peter Anvin wrote:
>
>> > 16-bit only: 8:8, otherwise 32-bit only: 16:16, otherwise 32:32.
>>
>> I would still recommend the arrangement for 64-bit dev_t that I posted
>> a while ago:
>>
>> dev_t<63:40> := major<31:8>
>> dev_t<39:16> := minor<31:8>
>> dev_t<15:8> := major<7:0>
>> dev_t<7:0> := minor<7:0>
>
> Yes, but we we also need to handle 32-bit dev_t incarnations.
>
>> If you want, you can even make it 32-bit-friendly, although it makes
>> it more complex; for example, this version would implement 32-bit with
>> a 12:20 split:
>>
>> dev_t<63:44> := major<31:12>
>> dev_t<43:32> := minor<31:20>
>> dev_t<31:28> := major<11:8>
>> dev_t<27:16> := minor<19:8>
>> dev_t<15:8> := major<7:0>
>> dev_t<7:0> := minor<7:0>
>
> Too messy. But you are right - no conditionals involved.

It's only necessary, though, if we require that dev32_t is a pure
truncation of dev_t, which is nice but not necessary.

No aliasing is a *very* good thing.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:40 EST