lkml.org 
[lkml]   [2019]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC 1/4] ACPI/AEST: Initial AEST driver
Date
Hello Shiju,

Thank you for the feedback!

On Thu, Jul 4, 2019 at 12:03 PM Shiju Jose <shiju.jose@huawei.com> wrote:
> >+struct ras_ext_regs {
> >+ u64 err_fr;
> >+ u64 err_ctlr;
> >+ u64 err_status;
> >+ u64 err_addr;
> >+ u64 err_misc0;
> >+ u64 err_misc1;
> >+ u64 err_misc2;
> >+ u64 err_misc3;
> err_misc2 and err_misc3 are not used. Are they for the future purpose?

Yes, these will be for future purpose once ARMv8.4 support is added. I'd like
to keep them in this structure define since that makes iterating through the
memory mapped error records easier. Regardless of ARMv8.2 or ARMv8.4 support,
each error record in memory mapped nodes are 64 bytes apart. Having these in
the structure make the structure 64 bytes long making it possible for me to
increment through error records with the increment ++ operation.

If folks don't agree with that, I can change this structure to just have a
reserved field at the end such as:

+ u64 res0[2];

or

+ u8 res0[8];


> >+ ppi_data = kcalloc(num_ppi, sizeof(struct aest_node_data *),
> >+ GFP_KERNEL);
> >+
> >+ for (i = 0; i < num_ppi; i++) {
> >+ ppi_data[i] = alloc_percpu(struct aest_node_data);
> >+ if (!ppi_data[i]) {
> >+ ret = -ENOMEM;
> >+ break;
> >+ }
> >+ }
> >+
> >+ if (ret) {
> >+ pr_err("Failed percpu allocation\n");
> >+ for (i = 0; i < num_ppi; i++)
> >+ free_percpu(ppi_data[i]);
> I think 'ppi_data' to be freed here?

Yes it should be! I'll add that in the next version.

Thanks,
Tyler
\
 
 \ /
  Last update: 2019-07-10 02:51    [W:0.069 / U:6.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site