lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector
On Tue, Apr 09, 2019 at 01:03:40PM +0200, Peter Zijlstra wrote:
> On Wed, Feb 27, 2019 at 08:05:15AM -0800, Ricardo Neri wrote:
> > diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h
> > index 4d559e0c746f..15dc3b576496 100644
> > --- a/arch/x86/include/asm/hpet.h
> > +++ b/arch/x86/include/asm/hpet.h
> > @@ -123,12 +123,24 @@ struct hpet_hld_data {
> > u32 num;
> > u32 flags;
> > u64 ticks_per_second;
> > + u32 handling_cpu;
> > + struct cpumask cpu_monitored_mask;
> > + struct msi_msg msi_msg;
> > };
>
> Please don't use struct cpumask unless you absolutely have to.
>
> The above is better written as:
>
>
> struct hpet_hld_data {
> ...
> unsigned long cpumask[0];
> };
>
> and allocated using:
>
> struct hpet_hld_data *hhd = kzalloc(sizeof(struct hpet_hld_data) + cpumask_size());
>
> and used as:
>
> to_cpumask(hhd->cpumask);

Thanks for your feedback, Peter!

Sure. I will make this change.

Thanks and BR,
Ricardo

\
 
 \ /
  Last update: 2019-04-10 03:07    [W:0.102 / U:3.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site