linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Gong" <gong.chen@linux.intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: tony.luck@intel.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3] ACPI, APEI: Cleanup alignment related codes for APEI
Date: Mon, 16 Dec 2013 09:39:34 -0500	[thread overview]
Message-ID: <20131216143934.GB8397@gchen.bj.intel.com> (raw)
In-Reply-To: <20131216141906.GC4922@pd.tnic>

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

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@alien8.de>
> To: "Chen, Gong" <gong.chen@linux.intel.com>
> Cc: tony.luck@intel.com, linux-acpi@vger.kernel.org
> 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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-12-16 14:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  2:07 [PATCH V2] ACPI, APEI: Cleanup alignment related codes for APEI Chen, Gong
2013-11-14  1:49 ` Chen, Gong
2013-11-14 12:29   ` Borislav Petkov
2013-11-15  5:38     ` Chen, Gong
2013-11-15  5:45     ` [PATCH v3] " Chen, Gong
2013-11-16 11:48       ` Borislav Petkov
2013-12-14 13:41         ` Chen, Gong
2013-12-14 16:45           ` Borislav Petkov
2013-12-16 14:19       ` Borislav Petkov
2013-12-16 14:39         ` Chen, Gong [this message]
2013-12-16 17:55           ` Borislav Petkov
2013-12-17  5:34             ` Chen, Gong
2013-12-17 15:17               ` Borislav Petkov
2013-12-18  6:30               ` [PATCH v4] " Chen, Gong
2013-12-18 21:13                 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131216143934.GB8397@gchen.bj.intel.com \
    --to=gong.chen@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).