Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5624967imm; Wed, 12 Sep 2018 08:41:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaXT3np3yxx96KjUegOBGBFxJv1/HESVN7cD2DQzxtMw+IXa6h2aQEyEWp5XWeTfIjBjWd9 X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr2990369plo.81.1536766874667; Wed, 12 Sep 2018 08:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536766874; cv=none; d=google.com; s=arc-20160816; b=Ei98GyZDBuug1gkGwG+7ws2Ykn0/yRCjfF2VmFvUiLElVbilEAhFMyqdqZl8zNJREn 4I91AzpWw/ZWg1jXWYYBZh63G9wUPW1p/Z4cYN0rNqt2Mbbv3Nfxcs1z9ZjVKMkJo2RZ yD1OdngjgwvlegzDRQPHfMumm4F4D8nROPg4zv4tWKcUOKbnJ2CZgdGdrHTVobkiV4Xw yZDZSbSP6Q8kg5819nS2DDylB/3Sqg9gbkFl5cNAzkA8GTXq/Ux0WF1nXjZK1l5nE8dt h7YdnFARBvXC7Z/56+KbFxGkBk1UxC/5muUu31qseabnNr805QvcuBkNksVpo7ROQ9RY 7fVQ== 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:organization:from:references:to:subject:cc; bh=nWp1y+mNqwXexhZdpQBGW608tZwKs7BdPAqv1+AYHp0=; b=bdMNl5d4LOEt5ywTufiGQRQ5XArzrVMwapfTU0kYZ7eHg7wVso5iwXA9dJd5uoMQh0 /6sSOKTHRhFAANdmWFKCnCOfVK8r2ww0DaQOARl2zEb9pWji5DhpkEBUb3HU0ftpeRHd Hvsp/hcoLLA3yghUW9yJQqC/L1MN5zYWPbB4rhFspKL6E/fXbLZit+XQeGLSHV2xKCJv F4qohJ2aOQ/TLzdllTcybV77BXK4SRV8oW6mLd9OEzqTHPs4U42X1ZAsTML1foBcKEQ2 zs7N/YhuEjyECqVpXyI13uesEprhlVnNzU5z4YwCoCBNtVinpaH9ysP9xAnxVMOPBQHS 17Hg== ARC-Authentication-Results: i=1; mx.google.com; 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 i7-v6si1312558pfk.146.2018.09.12.08.40.59; Wed, 12 Sep 2018 08:41:14 -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; 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 S1727277AbeILUns (ORCPT + 99 others); Wed, 12 Sep 2018 16:43:48 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33944 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbeILUnr (ORCPT ); Wed, 12 Sep 2018 16:43:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 48DDB7A9; Wed, 12 Sep 2018 08:38:44 -0700 (PDT) Received: from [10.4.12.116] (e107155-lin.emea.arm.com [10.4.12.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED4A53F5C0; Wed, 12 Sep 2018 08:38:42 -0700 (PDT) Cc: Sudeep Holla , linux-kernel@vger.kernel.org, vkilari@codeaurora.org Subject: Re: [PATCH] ACPI/PPTT: Handle architecturally unknown cache types To: Jeffrey Hugo , Jeremy Linton , rjw@rjwysocki.net, linux-acpi@vger.kernel.org References: <1536694334-5811-1-git-send-email-jhugo@codeaurora.org> <98e2e6fa-7256-b5ac-7d2e-42c858c6e57c@codeaurora.org> From: Sudeep Holla Organization: ARM Message-ID: <2873c62f-1bf9-5aa0-b3a2-07980ef61d35@arm.com> Date: Wed, 12 Sep 2018 16:38:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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 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; > } > -- Regards, Sudeep