lkml.org 
[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 04/17] x86/split_lock: Align x86_capability to unsigned long to avoid split locked access
    From
    Date
    On 3/1/19 6:44 PM, Fenghua Yu wrote:
    > diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
    > index 33051436c864..eb8ae701ef65 100644
    > --- a/arch/x86/include/asm/processor.h
    > +++ b/arch/x86/include/asm/processor.h
    > @@ -93,7 +93,9 @@ struct cpuinfo_x86 {
    > __u32 extended_cpuid_level;
    > /* Maximum supported CPUID level, -1=no CPUID: */
    > int cpuid_level;
    > - __u32 x86_capability[NCAPINTS + NBUGINTS];
    > + /* Unsigned long alignment to avoid split lock in atomic bitmap ops */
    > + __u32 x86_capability[NCAPINTS + NBUGINTS]
    > + __aligned(sizeof(unsigned long));

    I think this also warrants a comment in the changelog about the
    alignment of 'struct cpuinfo_x86'.

    \
     
     \ /
      Last update: 2019-03-04 19:52    [W:8.122 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site