lkml.org 
[lkml]   [2021]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/31] EDAC/amd64: Define functions for DramOffset
On Wed, Jun 30, 2021 at 07:27:07PM +0200, Borislav Petkov wrote:
> On Wed, Jun 23, 2021 at 07:19:38PM +0000, Yazen Ghannam wrote:

...

> > struct data_fabric_ops {
> > + u64 (*get_hi_addr_offset)(struct addr_ctx *ctx);
> > };
> >
> > +static u64 get_hi_addr_offset_df2(struct addr_ctx *ctx)
> > +{
> > + return (ctx->reg_dram_offset & GENMASK_ULL(31, 20)) << 8;
> > +}
> > +
> > struct data_fabric_ops df2_ops = {
>
> Those "df2" ops are for UMC v2?
>

No, Data Fabric 2 is used in the first Zen products (Ryzen, Naples,
etc.)

> > + .get_hi_addr_offset = &get_hi_addr_offset_df2,
> ^
>
> No need for the "&".
>

Okay.

> Also, if you define a member ->get_hi_addr_offset in df2_ops, then you
> need to define that member in *every* df_ops structure you have so that
> there's no NULL pointers.
>
> I guess that's coming...
>

Yes, a function goes into df_ops only when details change between Data
Fabric versions, i.e. different bitfields, registers, etc., but the flow
is otherwise the same.

I'll give the NULL pointer concern more thought. I've tried to cover all
code paths and use cases testing on real hardware. But it's possible
something can be missed with how configurable our systems can be.

Thanks,
Yazen

\
 
 \ /
  Last update: 2021-07-08 22:09    [W:1.813 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site