From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B619C83000 for ; Wed, 29 Apr 2020 15:20:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 058632073E for ; Wed, 29 Apr 2020 15:20:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rNuFyPOT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 058632073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 462E2166D; Wed, 29 Apr 2020 17:19:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 462E2166D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588173612; bh=2QRl3oZahRP5mGFYmo9AiuTWLC5THPvEFSeRZPprMHs=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rNuFyPOTensjoJSUNR0OnHQ6dYLEDB4RLbDl+8DYcQA/LwEI1j8EixF9gP5v4KltJ Xlj8jeWVHI0us8u6KavvyscQlqZCLSv3NQUtr8rzS1mshS6mXxPi29ogukIZCEE25r 92kiA3e4zNfQRTD5cbltG2LJjbnN22I5UmGVtthU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B8C9AF800D2; Wed, 29 Apr 2020 17:19:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6E2CAF8022B; Wed, 29 Apr 2020 17:19:20 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2886AF80109 for ; Wed, 29 Apr 2020 17:19:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2886AF80109 IronPort-SDR: sSooOBhJxk7oEf52cUCocGcXzlxVUfVG+QUUNMT34Atq0kF5ACTIXJ0grfbOmy99ZKOhHlb+rM DQ97wpP25ipg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 08:19:09 -0700 IronPort-SDR: /yu9CjJYrcqU+eu/Fik6TgZ7B57IWCzt5+Wf3UnCw37D0tOkMr4KGflaUm8HMkCCYfL/IiLMJg vg5g5wIIIocg== X-IronPort-AV: E=Sophos;i="5.73,332,1583222400"; d="scan'208";a="432592548" Received: from aslawinx-mobl1.ger.corp.intel.com (HELO [10.249.130.47]) ([10.249.130.47]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 08:19:06 -0700 Subject: Re: [PATCH] ASoC: Intel: sst: ipc command timeout To: "Lu, Brent" , "Rojewski, Cezary" , Pierre-Louis Bossart , "alsa-devel@alsa-project.org" References: <1586506705-3194-1-git-send-email-brent.lu@intel.com> <4f495cf1-4740-cf3b-196f-cc850c503b43@linux.intel.com> <5e84c48c-a5d1-b2ff-c197-5efa478c5916@linux.intel.com> From: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= Message-ID: <9d003948-a651-9920-86b6-307e912dd8ed@linux.intel.com> Date: Wed, 29 Apr 2020 17:19:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Kate Stewart , Richard Fontana , Greg Kroah-Hartman , Jie Yang , Takashi Iwai , "linux-kernel@vger.kernel.org" , Liam Girdwood , "clang-built-linux@googlegroups.com" , Mark Brown , Thomas Gleixner , Allison Randal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 4/28/2020 7:29 PM, Lu, Brent wrote: >> >> I've looked at the code and byt_is_dsp_busy seems suspicious to me. >> Can you check if following change fixes problem for you:(...) >> >> We seem to treat SST_IPCX as 32 bit register instead of 64 one, which may >> explain wrong behaviour. (Specification says it is 64 bit register). >> >> Thanks, >> Amadeusz > > Hi Amadeusz, > > The patch does not work but I managed to create a workaround just for > reference. Still don't know why first read in sst_byt_irq_thread returns > incorrect value. > Hi, yes that seems bit weird. It is bit better as it does not modify common code, but still... Maybe going back to your original idea of replacing memcpy, try replacing it with readq? It should generate one instruction read (although it is only for x64_64, for 32 bit kernel we would still need to do something else). Thanks, Amadeusz