Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5643234imm; Wed, 12 Sep 2018 08:58:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYLf4/SfUlqWPhTYW+rwRLTQltROnvsISNLwJIY/2G6gS2GMkskhKZxbgHKS1Q9hXh2tb6S X-Received: by 2002:a63:db15:: with SMTP id e21-v6mr3076562pgg.418.1536767920741; Wed, 12 Sep 2018 08:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536767920; cv=none; d=google.com; s=arc-20160816; b=cGVW7iUatojjiNENjd6HxuZk2G4fUlLyGQLmV+ef8SOcdnvmCn+xfTFEVCTO3bkbRb UD9UguNMoZHjVYfE5arEvm/KvfXdFr2vIFttYY7r/9kCmkKBtUaOkqiQxl/Cz6HiSi2i 8guRGetEtNccKDqMLcktNpEIC9+wSWMnrgv12yMhZng3LXEzvJalzElhB/9NGdGYXh+4 mjzlIT6PqjOwdxm9/LrA/DH0c84GLu6nIZ98Lra/yvU4dGpFdyaIAepiXBcXUTsu9Akx g0QHNq5FW8hoc5csTf+U+Pwoni4uknYORcsR2E77J1CAnHeJIM2mKpvPjjKQblLPHrLN KuNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=ycsP2z0XEFtOwqmha9Zo2aGJ8tw91jVK9dibHjh1rtQ=; b=NeOMZDeBaJVpINNmNVkxqh2ZO2qC4vf5e87D3Hjb0S3Wy8sCmOj56bekJ0IpOjDZOX cPqk3NY+eWazrTE77OGRsRvE3mddKPyqU4atm0bVFUf/sR5py39MN6wkktONf0uvIbaR yE2sjlnD7Jr5ZKea1V7JX5yIlkknKmLyhCJjb6twGAKYmo+LNYw6AMo/rg02SULFGWbE rDTERb3HLhk7a3pzrQ8Nipk+JBP0Npkb5EIiESy9DI0E8KtXTYtlXCF2UHbaAQ9At8Ld RzBCkB+O9THmB+0JO74XX3tmB3w8l0YhkiCw5ctpzooAnfL9E7vs3cfAwaILonWP1tjh C0xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Sri3OViW; dkim=pass header.i=@codeaurora.org header.s=default header.b=Sri3OViW; 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 31-v6si1406217pld.145.2018.09.12.08.58.23; Wed, 12 Sep 2018 08:58:40 -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=Sri3OViW; dkim=pass header.i=@codeaurora.org header.s=default header.b=Sri3OViW; 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 S1728027AbeILVCY (ORCPT + 99 others); Wed, 12 Sep 2018 17:02:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54638 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbeILVCY (ORCPT ); Wed, 12 Sep 2018 17:02:24 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A0BCA6031A; Wed, 12 Sep 2018 15:57:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536767835; bh=Dl55jdrfJuZK70jJZ0xffHrBxeRT+2bvmdfocXKtsYM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Sri3OViWGWB07E13sHiMbpOtAhYgCDwZz24o0wJ5nrzMiFDYSLGw261qwFuy8HiFp fF9/0IaWpGdcA1Yd73oEqal410Qyp658b4ts33MziaGmeVyER/LmItesVoiVEzRGri yVd4L3miC6UWxZD9DZ69pAHbhVVA4/mHOm/vVYk4= 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 [10.226.60.81] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 86E5E602A7; Wed, 12 Sep 2018 15:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536767835; bh=Dl55jdrfJuZK70jJZ0xffHrBxeRT+2bvmdfocXKtsYM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Sri3OViWGWB07E13sHiMbpOtAhYgCDwZz24o0wJ5nrzMiFDYSLGw261qwFuy8HiFp fF9/0IaWpGdcA1Yd73oEqal410Qyp658b4ts33MziaGmeVyER/LmItesVoiVEzRGri yVd4L3miC6UWxZD9DZ69pAHbhVVA4/mHOm/vVYk4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 86E5E602A7 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=jhugo@codeaurora.org Subject: Re: [PATCH] ACPI/PPTT: Handle architecturally unknown cache types To: Sudeep Holla , Jeremy Linton , rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, vkilari@codeaurora.org References: <1536694334-5811-1-git-send-email-jhugo@codeaurora.org> <98e2e6fa-7256-b5ac-7d2e-42c858c6e57c@codeaurora.org> <2873c62f-1bf9-5aa0-b3a2-07980ef61d35@arm.com> From: Jeffrey Hugo Message-ID: Date: Wed, 12 Sep 2018 09:57:14 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2873c62f-1bf9-5aa0-b3a2-07980ef61d35@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/12/2018 9:38 AM, Sudeep Holla wrote: > > > On 12/09/18 16:27, Sudeep Holla wrote: >> >> >> On 12/09/18 15:41, Jeffrey Hugo wrote: > > [...] > >>> >>> Correct.  However, what if you have a NOCACHE (not architecturally >>> specified), that is fully described in PPTT, as a non-unified cache >>> (data only)?  Unlikely?  Maybe.  Still seem possible though, therefore I >>> feel this assumption is suspect. >>> >> >> Yes, we have other issues if the architecturally not specified cache is >> not unified irrespective of what PPTT says. So we may need to review and >> see if that assumption is removed everywhere. >> >> Until then why can't a simple change fix the issue you have: >> >> -->8 >> >> diff --git i/drivers/acpi/pptt.c w/drivers/acpi/pptt.c >> index d1e26cb599bf..f74131201f5e 100644 >> --- i/drivers/acpi/pptt.c >> +++ w/drivers/acpi/pptt.c >> @@ -406,7 +406,8 @@ static void update_cache_properties(struct cacheinfo >> *this_leaf, >> * update the cache type as well. >> */ >> if (this_leaf->type == CACHE_TYPE_NOCACHE && >> - valid_flags == PPTT_CHECKED_ATTRIBUTES) >> + (valid_flags == PPTT_CHECKED_ATTRIBUTES || >> + found_cache->flags & ACPI_PPTT_CACHE_TYPE_VALID)) > > Looking at this again, if we are supporting just presence of cache type > and size(may be), then we can drop the whole valid_flags thing here. > >> this_leaf->type = CACHE_TYPE_UNIFIED; >> } >> Yes, this change fixes my usecase. I think it invalidates the comment, and really, the comment should probably mention that we assume unified type because there are other issues in supporting architecturally not specified inst/data only caches. Do you want a V2 with this? If so, do you want the fixes tag removed since you seem to view this as not a bug? I don't think I clearly understand the purpose of the valid flags, therefore I feel as though I'm not sure if it can be dropped or not. Is it fair to say that what the valid flags is accomplishing is identifying if we have a sufficient level of information to support this cache? If not, then should the cacheinfo driver not expose any sysfs information about the cache? -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.