Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbbGMVGH (ORCPT ); Mon, 13 Jul 2015 17:06:07 -0400 Received: from mout.gmx.net ([212.227.17.22]:61318 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbbGMVGF (ORCPT ); Mon, 13 Jul 2015 17:06:05 -0400 From: Peter =?iso-8859-15?q?H=FCwe?= To: "Hon Ching(Vicky) Lo" Subject: Re: [PATCH v4 1/2] vTPM: support little endian guests Date: Mon, 13 Jul 2015 23:08:00 +0200 User-Agent: KMail/1.13.7 (Linux/4.1.0-rc8-dirty; KDE/4.14.8; x86_64; ; ) Cc: tpmdd-devel@lists.sourceforge.net, Ashley Lai , Vicky Lo , linux-kernel@vger.kernel.org, Joy Latten References: <1434579429-29449-1-git-send-email-honclo@linux.vnet.ibm.com> In-Reply-To: <1434579429-29449-1-git-send-email-honclo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201507132308.00824.PeterHuewe@gmx.de> X-Provags-ID: V03:K0:k44cy0P16QPNAEGT6Y0qoF/eD4Cw9aQSU5mlIHFTo9/B2XDuxxS vOZfydCNwZPuJA6ye+x9wGhoKK80N7IgxX//AyR12rjJ8/y5Wx1cavER+7WnIWP6orAJD42 lSROosfZDggnR8ioxpmBQB2eXRhPVlabDIcN1lSJI+PJFHRT4YoK7uag43dF0K1giSkV7h8 kjk/uLB3JKPdn9xPnzgHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:VSrxvDV+leg=:FxXPFcBCWVZtfWMOAVh1zB qUNMAeuiuvn39lfwu+ONPGivEg17qVYLDf7ITmEJ1SnRp1zZ457M71+V9+okZ3KkigE/zga8d iDAfkTBBoMnC7yqNHHWMda39Mm3YZmdaSmItPEKkWqovkj3Fg6+VWIU/75XCPKc/79L7UisMF P0/RbQuAfDVkFJ4Se705vWxkCQmGJ51t5V/c8Zzv/IUDQSJZZ/nxvQ0Nggdkvs0unnyKSO3Ge itGgdA48rkBh7gCsw0Md9X3Mpwhb1GVaMWf9wB9SYSICMNovbN4hJinfgT7MsmX+TY7DGs0fS FrVjx+qrp+zbaZ2EI62vpFtcnsMNGtcJeUMpsEFISJS1QjRiLBcH0AD4cRheNYQUdVlh9JxYX T+AbW74OMGV6ACGbFyuAxm2NlI0msRKrafxRx7dCrnei/pBpPNRHCsvsGPpuEQgZxFplx0cu3 JEXYnoNGcHAv/fATQDjFZHVdIilexM+rDXHMLwwNeRyur6derU2khCYLsk1jCuEvVEmZvUuDv uzmd91L63Jk34szpLFV0ai3v5jDWJZbEq+503nCdqypLQSwImULwbQS0LzHnzjmh3d0Vf9335 /m4ckAPT19QPNvqr//dtjK/kWZ1KgyoFXm8EVvCM5YHlSqdJ6x6pyba1a6zsfq/1OI8GclUS7 sBEA+AohxABOTbg5uqc42BJIVqYzogXRZc6FJsuSkjiJPFHVPBMdKCKoQjXXQcAEAPxo= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1222 Lines: 39 Hi Vicky, sorry for the late reply > This patch makes the code endianness independent. We defined a > macro do_endian_conversion to apply endianness to raw integers > in the event entries so that they will be displayed properly. > tpm_binary_bios_measurements_show() is modified for the display. > > Signed-off-by: Hon Ching(Vicky) Lo > Signed-off-by: Joy Latten > b/drivers/char/tpm/tpm_eventlog.h index e7da086..267bfbd 100644 > --- a/drivers/char/tpm/tpm_eventlog.h > +++ b/drivers/char/tpm/tpm_eventlog.h > @@ -6,6 +6,12 @@ > #define MAX_TEXT_EVENT 1000 /* Max event string length */ > #define ACPI_TCPA_SIG "TCPA" /* 0x41504354 /'TCPA' */ > > +#ifdef CONFIG_PPC64 > +#define do_endian_conversion(x) be32_to_cpu(x) > +#else > +#define do_endian_conversion(x) x > +#endif Why is this macro needed? shouldn't the be32_to_cpu macro already do correct thing? Or am I missing something here? Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/