This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Tue May 21 04:51:43 2024 >From spaans Tue Mar 1 18:05:02 2016 Envelope-to: lkml@grols.ch Delivery-date: Tue, 01 Mar 2016 18:02:23 +0100 Received: from srv.grols.ch [2a00:d10:4002:1::101] by squeeze.vs19.net with IMAP (fetchmail-6.3.21) for (single-drop); Tue, 01 Mar 2016 18:05:02 +0100 (CET) Received: from vger.kernel.org ([209.132.180.67]) by home.grols.ch with esmtp (Exim 4.84) (envelope-from ) id 1aangj-00010V-3h for lkml@grols.ch; Tue, 01 Mar 2016 18:02:23 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbcCARCT (ORCPT ); Tue, 1 Mar 2016 12:02:19 -0500 Received: from g4t3427.houston.hp.com ([15.201.208.55]:51994 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbcCARCS (ORCPT ); Tue, 1 Mar 2016 12:02:18 -0500 Received: from g9t2301.houston.hp.com (g9t2301.houston.hp.com [16.216.185.78]) by g4t3427.houston.hp.com (Postfix) with ESMTP id 01DBB69; Tue, 1 Mar 2016 17:02:16 +0000 (UTC) Received: from misato.fc.hp.com (misato.fc.hp.com [16.78.168.61]) by g9t2301.houston.hp.com (Postfix) with ESMTP id 7B44CA41; Tue, 1 Mar 2016 16:44:13 +0000 (UTC) Message-Id: <1456853819.15454.45.camel@hpe.com> Subject: Re: [PATCH v2 1/3] ACPI/NFIT: Update Control Region Structure to comply ACPI 6.1 From: Toshi Kani To: "Moore, Robert" , "rjw@rjwysocki.net" , "Williams, Dan J" Cc: "Zheng, Lv" , "elliott@hpe.com" , "linux-nvdimm@lists.01.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dev Date: Tue, 01 Mar 2016 10:36:59 -0700 In-Reply-To: <94F2FBAB4432B54E8AACC7DFDE6C92E37E44D6E1@ORSMSX110.amr.corp.intel.com> References: <1456178130-26468-1-git-send-email-toshi.kani@hpe.com> <1456178130-26468-2-git-send-email-toshi.kani@hpe.com> <94F2FBAB4432B54E8AACC7DFDE6C92E37E44D64B@ORSMSX110.amr.corp.intel.com> <1456850284.15454.23.camel@hpe.com> <94F2FBAB4432B54E8AACC7DFDE6C92E Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org Received-SPF: none client-ip=209.132.180.67; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org X-Spam-Score: -5.9 X-Spam-Score-Bar: ----- X-Spam-Report: Content analysis details: (-5.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high On Tue, 2016-03-01 at 16:03 +0000, Moore, Robert wrote: > We have a bunch of macros in include/acmacros.h -- like this: > > ACPI_MOVE_16_TO_16(d, s) There is a problem in using the ACPICA byte-swap macros.  ACPI is little- endian arch, so the macros are set to perform byte-swappings when the CPU arch is big-endian.  This case, however, is the other way around.  The fields in question are defined & stored as arrays of bytes.  If you treat them as multi-bytes numeric values, then you need to byte-swap them when the CPU arch is little-endian because arrays of bytes have the same addressing as big-endian. Another issue is that it is not clear who needs to perform the byte- swapping among ACPICA and drivers.  If ACPICA, drivers must agree that these fields are always treated as multi-bytes numeric values despite of the spec.  If drivers, we need to make sure that only a single driver performs this byte-swapping one time as ACPI tables are global structures. I think it is much clearer to define the structure according to the ACPI spec. Thanks, -Toshi > > -----Original Message----- > > From: Toshi Kani [mailto:toshi.kani@hpe.com] > > Sent: Tuesday, March 01, 2016 8:38 AM > > To: Moore, Robert; rjw@rjwysocki.net; Williams, Dan J > > Cc: Zheng, Lv; elliott@hpe.com; linux-nvdimm@lists.01.org; linux- > > acpi@vger.kernel.org; linux-kernel@vger.kernel.org; devel@acpica.org > > Subject: Re: [PATCH v2 1/3] ACPI/NFIT: Update Control Region Structure > > to > > comply ACPI 6.1 > > > > On Tue, 2016-03-01 at 15:13 +0000, Moore, Robert wrote: > > > > > > > -----Original Message----- > > > > From: Toshi Kani [mailto:toshi.kani@hpe.com] > > > > Sent: Monday, February 22, 2016 1:55 PM > > > > To: rjw@rjwysocki.net; Williams, Dan J > > > > Cc: Moore, Robert; Zheng, Lv; elliott@hpe.com; > > > > linux-nvdimm@lists.01.or g; linux-acpi@vger.kernel.org; > > > > linux-kernel@vger.kernel.org; devel@acpica.org; Toshi Kani > > > > Subject: [PATCH v2 1/3] ACPI/NFIT: Update Control Region Structure > > > > to comply ACPI 6.1 > > > > > > > > ACPI 6.1, Table 5-133, updates NVDIMM Control Region Structure as > > > > follows. > > > >  - Valid Fields, Manufacturing Location, and Manufacturing Date > > > >    are added from reserved range.  No change in the structure size. > > > >  - IDs defined as SPD values are arrays of bytes.  The spec > > > >    clarified that they need to be represented as arrays of bytes > > > >    as well. > > > > > > > > This patch makes the following changes to support this update. > > > >  - Change 'struct acpi_nfit_control_region' to reflect the update. > > > >    SPD IDs are defined as arrays of bytes, so that they can be > > > >    treated in the same way regardless of CPU endianness and are > > > >    not miss-treated as little-endian numeric values. > > > > > > > > > I don't think we are going to start changing the ACPI tables defined > > > in the ACPICA headers because of this. We do in fact have macros for > > > this purpose. > > > > Can you elaborate what macros you suggest to use for this purpose? > > > > Thanks, > > -Toshi > N�����r��y���b�X��ǧv�^�)޺{.n�+����{�i�b�{ay�ʇڙ�,j��f���h���z��w��� > ���j:+v���w�j�m��������zZ+�����ݢj"��!�i