Re: [PATCH v3] ACPI, APEI: Cleanup alignment related codes for APEI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 16, 2013 at 03:19:06PM +0100, Borislav Petkov wrote:
> Date: Mon, 16 Dec 2013 15:19:06 +0100
> From: Borislav Petkov <bp@xxxxxxxxx>
> To: "Chen, Gong" <gong.chen@xxxxxxxxxxxxxxx>
> Cc: tony.luck@xxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v3] ACPI, APEI: Cleanup alignment related codes for APEI
> User-Agent: Mutt/1.5.21 (2010-09-15)
> 
> On Fri, Nov 15, 2013 at 12:45:56AM -0500, Chen, Gong wrote:
> > diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> > index 26311f2..bf30a12 100644
> > --- a/drivers/acpi/apei/erst.c
> > +++ b/drivers/acpi/apei/erst.c
> > @@ -611,7 +611,7 @@ static void __erst_record_id_cache_compact(void)
> >  		if (entries[i] == APEI_ERST_INVALID_RECORD_ID)
> >  			continue;
> >  		if (wpos != i)
> > -			memcpy(&entries[wpos], &entries[i], sizeof(entries[i]));
> > +			entries[wpos] = entries[i];
> 
> Why is it ok to drop the memcpy here and do a normal access?
> 
> __erst_record_id_cache_add_one still has a memcpy-like access.
> 
> What is the difference with all those accesses to erst_record_id_cache
> and why doesn't it need the unaligned helpers?
> 
> This all needs to be explained in detail in the commit message.
> 
> Thanks.
> 
erst record id cache is implemented in the memory to increase the access
speed via caching ERST content, so it doesn't matter with firmware access.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux