lkml.org 
[lkml]   [2024]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [patch v5 06/19] x86/cpu: Provide a sane leaf 0xb/0x1f parser
    Date
    On Mon, Feb 12 2024 at 16:00, Borislav Petkov wrote:
    > On Mon, Feb 12, 2024 at 03:17:45PM +0100, Thomas Gleixner wrote:
    >> Especially x2apic_shift is horrible and the comments of EBX are visually
    >> impaired while with the C++ comments x2apic_shift looks natural and the
    >> EBX comments are just open to the right and therefore simpler.
    >
    > I'd say, put comments *above* the member versus on the side. We don't
    > like side comments, if you remember. :-)

    In code, no. For struct definitions if they are strictly tabular
    formatted, they are actually nice as they are more compact and take less
    space than the above member variant.

    // eax
    u32 x2apic_shift : 5, // Number of bits to shift APIC ID right
    // for the topology ID at the next level
    : 27; // Reserved
    // ebx
    u32 num_processors : 16, // Number of processors at current level
    : 16; // Reserved

    versus:

    /* eax */
    /*
    * Number of bits to shift APIC ID right for the topology ID
    * at the next level
    */
    u32 x2apic_shift : 5,
    /* Reserved */
    : 27;

    /* ebx */
    /* Number of processors at current level */
    u32 num_processors : 16,
    /* Reserved */
    : 16;

    This really makes my eyes bleed.

    \
     
     \ /
      Last update: 2024-05-27 14:58    [W:3.757 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site