Received: by 10.223.185.116 with SMTP id b49csp6730072wrg; Wed, 28 Feb 2018 14:35:08 -0800 (PST) X-Google-Smtp-Source: AH8x227mvOcPWExKwpc9RlUak6u4Tl6tnCwhfXEggxivNcvrJBzujG06BsGJphzofHjqpkfYpAGg X-Received: by 10.99.97.7 with SMTP id v7mr15821208pgb.239.1519857308393; Wed, 28 Feb 2018 14:35:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519857308; cv=none; d=google.com; s=arc-20160816; b=E5lEwT/kuPDrFNKGRTvJm9549SpjTny7e0nIaYSjuz/EJuRETsuBll8nDvimat+MLx DUESHTxKu1mvrOOhQQRfyujX3+NCjp10iqZVzoMUJ5UMiViM1KMbkFjGOdYfDEK2Un4j TJXQHW85JSX1mnPKvkA5ClsW/nKYbAaw3gP68lfeqV7AQeEcI7aYeM6nlmMOS8qC0uyK l+FTyaPpU1P7uqQ95llKRjJk0s4TtKz36SMlzlrxmuco37r3fkiFHnCfa+T5oF9F57MH 3cLrHhPefU4vf0hQYgBAFWRIIC6hALUyMQ5tftFOYTFBDdJJvzkkjabe9NSQs5X/KjqK Nuww== 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:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=t9PdOXwyqL/0093DG3Z/I02XxbD8MAWewqdxmCxCI2o=; b=qdckIAynLvK+mdUGeW+lzvS4ztlyzosSxij3ewvouD2j+3oYB8JwnFiHwfdPFYmUce AjivkuOwQ+lD9vzZSs8qw4hbwpMRZRUCPn6G1yYd1dlnJtPFr1PXiQvH18MQCWbJX08X QLFpU9o/vahlYU2LxgZUQ1MZqbNmNHzadI9Ry+7qSOzD0aZP3NWEReUd9X3v4bdsfngN S/tGzF4rJuA2JoOJCaZkm3bhEtzf2c6dV5fXpOqDxuLf236/3wgaWR6MQg3MQ1e8/sqg unYCOM3WUV7hYiw0slEKfiYlgaDj90NQGb3Gv3t8Vrw4U+/uPhs39W7b8vUrc1Qev+SF BV8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=dsD+9Rq8; 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 g14si1572432pgu.112.2018.02.28.14.34.53; Wed, 28 Feb 2018 14:35:08 -0800 (PST) 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=@sifive.com header.s=google header.b=dsD+9Rq8; 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 S935493AbeB1WeR (ORCPT + 99 others); Wed, 28 Feb 2018 17:34:17 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:39519 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935361AbeB1WeP (ORCPT ); Wed, 28 Feb 2018 17:34:15 -0500 Received: by mail-pg0-f67.google.com with SMTP id w16so614811pgv.6 for ; Wed, 28 Feb 2018 14:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=t9PdOXwyqL/0093DG3Z/I02XxbD8MAWewqdxmCxCI2o=; b=dsD+9Rq8uRCrS2VuFbwmOdDwtAR9ssr200Umx8KnFL63nMuVXZ+2C/w/GUZMUoCzGP PqeNBpOLntPvwi4GFWyOIvschfICaLeUl13V5201nirxnyKc9cYGlTk0IAyEXnukMO3Z syU6F2aAIKWuprjTC1Kufostv5a1KHItP9OphxkWgVmMhaeU9dXUk9Gjj0tYAWGv3XD0 b6Y6NQoEs3zfVtx3kE5MSTGJR+u/Ko5Q/jLV6k3BussA/9xVbSF6AJBsLfjJtAUqFNTR t1HECFQ1jQYZxCEaMfngSvQddzJOY8DzXZt1sD9vbdqa2W4ZAf0lWh+FNCCcNkkGwu3L soPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=t9PdOXwyqL/0093DG3Z/I02XxbD8MAWewqdxmCxCI2o=; b=YRmkf5LoQ2I6YGqa1isEsGVm9CFJB9fl6tbvzbupkD/n7KS4z8b7MGtM//TVZjvx1L VKzm+8z4ie102jvlL51aSBr2o8/7R06k1ZCd1mZS0Is59R9s/8um6sFDyY/91ZEDXcmj n+/uqCUcEUMrhWXpazNSKhZo7IhKJF9Lw/q7CgDDnjqZEz/wxRjnU74h8P+3borxFioy RmxLNdLN2fhBUhM8g8tOnNaSTFP7IZbqo/bVcFgcIItSWYvY+poI5JyOjGjWeCgX2M1a Z9eYmB5WU8OA3jWe/S+/U7MAA3E7SavaY1EFRSm2FGad9DBn9A4bdsynTZYrpMHmDPGs bASQ== X-Gm-Message-State: APf1xPBzc+EtHtR//h3ROgrqkWTS31E9RLfh6HUYkvr046tL79yPijcg uP8tLHiuqjWJ72NZE0zFSDaLLg== X-Received: by 10.99.151.74 with SMTP id d10mr15497640pgo.350.1519857255296; Wed, 28 Feb 2018 14:34:15 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id y18sm4857398pfl.146.2018.02.28.14.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 14:34:14 -0800 (PST) Date: Wed, 28 Feb 2018 14:34:14 -0800 (PST) X-Google-Original-Date: Wed, 28 Feb 2018 14:32:22 PST (-0800) Subject: Re: [PATCH v7 02/13] drivers: base: cacheinfo: setup DT cache properties early In-Reply-To: <20180228220619.6992-3-jeremy.linton@arm.com> CC: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org, rjw@rjwysocki.net, Will Deacon , catalin.marinas@arm.com, Greg KH , mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, wangxiongfeng2@huawei.com, vkilari@codeaurora.org, ahs3@redhat.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, lenb@kernel.org, john.garry@huawei.com, austinwc@codeaurora.org, tnowicki@caviumnetworks.com, jeremy.linton@arm.com From: Palmer Dabbelt To: jeremy.linton@arm.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Feb 2018 14:06:08 PST (-0800), jeremy.linton@arm.com wrote: > The original intent in cacheinfo was that an architecture > specific populate_cache_leaves() would probe the hardware > and then cache_shared_cpu_map_setup() and > cache_override_properties() would provide firmware help to > extend/expand upon what was probed. Arm64 was really > the only architecture that was working this way, and > with the removal of most of the hardware probing logic it > became clear that it was possible to simplify the logic a bit. > > This patch combines the walk of the DT nodes with the > code updating the cache size/line_size and nr_sets. > cache_override_properties() (which was DT specific) is > then removed. The result is that cacheinfo.of_node is > no longer used as a temporary place to hold DT references > for future calls that update cache properties. That change > helps to clarify its one remaining use (matching > cacheinfo nodes that represent shared caches) which > will be used by the ACPI/PPTT code in the following patches. > > Signed-off-by: Jeremy Linton > --- > arch/riscv/kernel/cacheinfo.c | 1 - > drivers/base/cacheinfo.c | 65 +++++++++++++++++++------------------------ > 2 files changed, 29 insertions(+), 37 deletions(-) > > diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c > index 10ed2749e246..0bc86e5f8f3f 100644 > --- a/arch/riscv/kernel/cacheinfo.c > +++ b/arch/riscv/kernel/cacheinfo.c > @@ -20,7 +20,6 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, > struct device_node *node, > enum cache_type type, unsigned int level) > { > - this_leaf->of_node = node; > this_leaf->level = level; > this_leaf->type = type; > /* not a sector cache */ > diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c > index 09ccef7ddc99..a872523e8951 100644 > --- a/drivers/base/cacheinfo.c > +++ b/drivers/base/cacheinfo.c > @@ -71,7 +71,7 @@ static inline int get_cacheinfo_idx(enum cache_type type) > return type; > } This looks good as far as RISC-V is concerned, though that's such a trivial part of the changeset it's not worth that much :). Thanks!