Received: by 10.213.65.68 with SMTP id h4csp4204622imn; Tue, 10 Apr 2018 10:53:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YVdwBAgTAuwqrxCH3Ywh1Lg1vedqHM4RCWJoGhDK/onDrWUMKK0LOyBmvXKW/kKPtszR0 X-Received: by 10.98.10.23 with SMTP id s23mr1190496pfi.204.1523382824238; Tue, 10 Apr 2018 10:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523382824; cv=none; d=google.com; s=arc-20160816; b=kw5cx+mOGfTj2rq61b7keZTzqB+x/K39rsK+fa4bJnrhjAD3m6PXY0RHxOonRzNJ7x RwTpeYZUIwxX5+Egq5NrHlqAwLP5ubK+ZpD8lRgtj0QFrDZsuHSxCPsDpYhXzQeUNaaV 3bGGiar5j1lOeJASWvhrZ7KvyC53N68yI86jffCCw0SqcQinxfrIf6yGSmo4gzTybbo5 7MyOkCTm2lZUAy2JVpCyFI0YMZFy0pfUPiHnMcEIogfrq6Pa57ihs59O+tae+VuPL0an 9eYgUjBdbxJfQUWNvwKKltiugFhdFrtp2PivdVUCAvwPI7hFA/SpFtYQBUg8qHE7gb26 IhyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=a+i4wr+aINpyf2gxMkZE3ydSYYqByfuvbgQiknTF16Y=; b=Z70JLrKXfb7rfaEY8AjrEKD6mJag+zmZ0y2Lg05vSfqoLFRsPCwxrbkg3AVeQ+sLrj fpQYSgTC/b/fVus5l7ZBMIUCiPhP005q+7XRjmwOo9lhrArtUc/oDA8kwHE+3ECozOfx GD+k/PrQtP6cEJj8a4dwR6mhSFUgw/wzNF3YA88sO1o+mHwCdwnptqMzvlodRfhJuY43 123A97kU90ZCSGIWAh651uvFzPthgBUNkVV58847jl48zzMDGuaG8XAGKj6jy+6FNgNa 3jigiDO0bG4VWujufeO4sLZkTMJ5SyX6OtB2/tP3jJGjSueqOqir1A+nnY3aHGQ/u/GN P75g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=kR1sWDAL; dkim=pass header.i=@codeaurora.org header.s=default header.b=hWvpCk/G; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si2386288pfi.187.2018.04.10.10.53.07; Tue, 10 Apr 2018 10:53:44 -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=@codeaurora.org header.s=default header.b=kR1sWDAL; dkim=pass header.i=@codeaurora.org header.s=default header.b=hWvpCk/G; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbeDJRqe (ORCPT + 99 others); Tue, 10 Apr 2018 13:46:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52894 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751876AbeDJRqb (ORCPT ); Tue, 10 Apr 2018 13:46:31 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F228C6079B; Tue, 10 Apr 2018 17:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523382391; bh=Kfi7gjlcEo7Ua+VfWmELAqoTNB/LdeSxo0RiP8X3hWo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kR1sWDALSl1TSUe0rQ4+bYMydIoF3ozqptU4nYak0VqPwi+E95LyW51U2nmcViWWA kENOnW1XI3BnMOnDO3muOIGA3nHYh3IZC5T9883M8H2vMDU82/E2rBdFJiM0Tx8E2D gd4fNjztfD3t68ff4kV03VPVEfz58eRq0OGANKjo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 09D1960250; Tue, 10 Apr 2018 17:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523382390; bh=Kfi7gjlcEo7Ua+VfWmELAqoTNB/LdeSxo0RiP8X3hWo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hWvpCk/G3k46Pw5ZnZk/ARldZzuusFJucRWe0ORVhYaz90l95+DRNxmxSkhI9UzSr GGjgdbedFWEDBYYQY1L17Hu22OptacGLPOoBX+C0SlKArFW3JpcVOGsDdhUzMBqQNS ivaERTqEYEMA5Eg45Zgx/Qv7dz7udF76UR04lyyY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 09D1960250 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Tue, 10 Apr 2018 11:46:29 -0600 From: Lina Iyer To: Stephen Boyd 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 Subject: Re: [PATCH v7 [RESEND] 1/2] drivers: qcom: add command DB driver Message-ID: <20180410174629.GD19682@codeaurora.org> References: <20180406151356.7818-1-ilina@codeaurora.org> <20180406151356.7818-2-ilina@codeaurora.org> <152305699547.94378.15462587304123828477@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <152305699547.94378.15462587304123828477@swboyd.mtv.corp.google.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 platform >> 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[] = { 0xdb, 0x33, 0x03, 0x0c }; This has to be { 0xdb, 0x30, 0x03, 0x0c } Otherwise it works. Thanks, Lina