Received: by 10.192.165.156 with SMTP id m28csp2433648imm; Thu, 12 Apr 2018 14:18:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ALt9JJAKlN/SSL/cWpPoqgnZj10kQN4YHBnusxfRP8JwZB2tE+3vPLHDYwAp49VIp/u7d X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr2617499plp.243.1523567904045; Thu, 12 Apr 2018 14:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523567904; cv=none; d=google.com; s=arc-20160816; b=MZM5C+S63Y+aicB6OYCvmXqCyS51DEmlI8xr802f0o0VJ9DQ/bzHIwQ1/nxjjejlKP L01ZyCJOALUWIJtLRWgEdQjhQaqtKmEnCjiCJFN6Hl/N7igzQy2ZRzhacLfSB+OWVUm8 SehXp09r+xUNXPu9LZlNtzg87y6G8meCYRKi7DZ5yC6ZlZPD8BUOT1Hfx2ypoTcBxOER 8WmJSOUhlMI9gNHqGDb169MCfc6W9l1yLmLE3al4M4ZSm8BIcX4ost9N2Xd5ivE3DC+J zF80aoacoyu0YsGSmOUMPKvAkDl3BUaTRqIPmheBIIjQkP/YWUoCzYY6aI28Pld1XoPO N/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=XRVBGdVTWIKBibQlUYtfTaeBqwsVvQdj0V9Ngi07gjg=; b=p+Tv9HsGyA9hfjoRi6TpYb6v6ns3r38j4lGTQnQUZUNp6wLAHqvyBX8flXrG8DxaeB L42YUTUPGp0YEVJHCil58sgyQQmHmlINXhl9j9FTpmD84qJNoA8fgx2O0sRLzoT79nem Ez/RhM0Mli6HNKEyjwBNpCUvaoEFbHGlvcT+kYb4yBgjuFfeDBQZNO8OQuN/2yOn3TNu iQOSYfou6gKbv+EQJdTjFTMB40+6cgCwRhQEEikMXyKT7UZlDmmeN1NYJW411j7JrURx Domkyb0cnsFMaGejiAZQosRzOZtRVRTEE449cPuZcS4qx6OZoS8ttRvT+BnzS9icxZ3C wnSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZUKFFr9U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si4060755plo.389.2018.04.12.14.18.10; Thu, 12 Apr 2018 14:18:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZUKFFr9U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbeDLUz5 (ORCPT + 99 others); Thu, 12 Apr 2018 16:55:57 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:39583 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbeDLUzz (ORCPT ); Thu, 12 Apr 2018 16:55:55 -0400 Received: by mail-pl0-f68.google.com with SMTP id e7-v6so4717586plt.6 for ; Thu, 12 Apr 2018 13:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=XRVBGdVTWIKBibQlUYtfTaeBqwsVvQdj0V9Ngi07gjg=; b=ZUKFFr9UKUgKGbdditdNIt11OriWKjHUZCb8rPOxETZ65O6+lVLWGYxziaGWahdzdF 8Y1GUOzVWEGVKA+uZSH1tiv7yChgucO/Nuo2czXtBhgcSXGX7AddxO8m8FjqDWe9expj OGInXtL7WLy0ldwCxCcbYp14T0hMJ+t1OxQfI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=XRVBGdVTWIKBibQlUYtfTaeBqwsVvQdj0V9Ngi07gjg=; b=nf1oDptGbuwLjxpk+P7ViYjlAx8j1FJOLZqZw8i5Ag/NKkNetyT3Fj+TJFtnqxL3jB FY1bW4wRUVx29aSNdyATqqAVqaALlfDp0eTgtJC2Rrlzy2DIEkBC8mGnS1cq7N/nImZ3 wYVBiakaAt6i39M6N/CexbNSaprqUwEw5bbWT6G5dJU6adyPJykf1csypdvrV838kmRW NM0YF/KQ3avqWpshlVq8kt4qiK61OlxWwbKOR3JjaU12hxxMqTR3epDQFVO9spWEvyr9 MuEIIpmn5y6W5TS+CbZAcXra2uSdK+YuoD/W5Viat5/nXsBJ8olHcdKFPhDbaZ07wtgF HY2Q== X-Gm-Message-State: ALQs6tB6N6/4DMaAnaL6VGZunAumbckVEWZTTxiSkIGiCTr647nXxmDb rVo2gAlsTV3qu4x5wzWRUgD/eQ== X-Received: by 2002:a17:902:70c4:: with SMTP id l4-v6mr2606523plt.382.1523566554377; Thu, 12 Apr 2018 13:55:54 -0700 (PDT) Received: from localhost ([2620:0:1000:1511:d30e:62c6:f82c:ff40]) by smtp.gmail.com with ESMTPSA id n7sm7597436pff.58.2018.04.12.13.55.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 13:55:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Lina Iyer From: Stephen Boyd In-Reply-To: <20180410174629.GD19682@codeaurora.org> Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, dianders@chromium.org, Mahesh Sivasubramanian References: <20180406151356.7818-1-ilina@codeaurora.org> <20180406151356.7818-2-ilina@codeaurora.org> <152305699547.94378.15462587304123828477@swboyd.mtv.corp.google.com> <20180410174629.GD19682@codeaurora.org> Message-ID: <152356655313.37499.5720064569896132604@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v7 [RESEND] 1/2] drivers: qcom: add command DB driver Date: Thu, 12 Apr 2018 13:55:53 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2018-04-10 10:46:29) > On Fri, Apr 06 2018 at 17:23 -0600, Stephen Boyd wrote: > >Quoting Lina Iyer (2018-04-06 08:13:55) > >> From: Mahesh Sivasubramanian > >> > >> Command DB is a simple database in the shared memory of QCOM SoCs, that > >> provides information regarding shared resources. Some shared resources > >> in the SoC have properties that are probed dynamically at boot by the > >> remote processor. The information pertaining to the SoC and the platfo= rm > >> are made available in the shared memory. Drivers can query this > >> information using predefined strings. > >> > >> Signed-off-by: Mahesh Sivasubramanian > >> Signed-off-by: Lina Iyer > >> Reviewed-by: Bjorn Andersson > >> --- > > > >I have this patch on top to fix the endian stuff. Care to test it out > >and see if it still works? > > > >From: Stephen Boyd > >Subject: soc: qcom: cmd-db: Make endian-agnostic > > > >This driver deals with memory that is stored in little-endian format. > >Update the structures with the proper little-endian types and then > >do the proper conversions when reading the fields. Note that we compare > >the ids with a memcmp() because we already pad out the string 'id' field > >to exactly 8 bytes with the strncpy() onto the stack. > > > >Signed-off-by: Stephen Boyd > > > >diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c > >index b5172049f608..a56dc9edab82 100644 > >--- a/drivers/soc/qcom/cmd-db.c > >+++ b/drivers/soc/qcom/cmd-db.c > >@@ -13,18 +13,10 @@ > > > > #define NUM_PRIORITY 2 > > #define MAX_SLV_ID 8 > >-#define CMD_DB_MAGIC 0x0C0330DBUL > >+static const char CMD_DB_MAGIC[] =3D { 0xdb, 0x33, 0x03, 0x0c }; > This has to be { 0xdb, 0x30, 0x03, 0x0c } > = > Otherwise it works. > = Perfect! Thanks for catching that. I will resend with the typo fix.