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=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 BE2D8C83000 for ; Wed, 29 Apr 2020 15:19:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E43F20575 for ; Wed, 29 Apr 2020 15:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbgD2PTK (ORCPT ); Wed, 29 Apr 2020 11:19:10 -0400 Received: from mga11.intel.com ([192.55.52.93]:31671 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgD2PTK (ORCPT ); Wed, 29 Apr 2020 11:19:10 -0400 IronPort-SDR: dXZmd7RsbMk+XAuBd3eBmiOE2YjQEct2oeM8S0HspfUg8gF8iGL9asErcyNerVCZJA3pSObkK7 GW2dnbZ/aA9A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.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" Cc: Kate Stewart , "clang-built-linux@googlegroups.com" , Greg Kroah-Hartman , Jie Yang , Takashi Iwai , "linux-kernel@vger.kernel.org" , Liam Girdwood , Richard Fontana , Mark Brown , Thomas Gleixner , Allison Randal 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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