Received: by 10.223.185.116 with SMTP id b49csp5325688wrg; Wed, 7 Mar 2018 09:52:27 -0800 (PST) X-Google-Smtp-Source: AG47ELv+ku9D388WY0SOTdWFyV1eMAdAfNm0ArwcMRPZsxiLNbfCuvZbLolIgCrGjWxFjGDR97kB X-Received: by 10.98.62.14 with SMTP id l14mr23622641pfa.206.1520445147626; Wed, 07 Mar 2018 09:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520445147; cv=none; d=google.com; s=arc-20160816; b=I8yflZD2Ybton5fauBcdiHVMLldx89+8D/SSy/4nIG4JErHCZn9rAYACbHIg3wBlOX IRMsxa73i2zGpe0DMXNPqJ0gS4eoY9ln86P6OntdGD8PzujpYyWsfCXYLgvfhqyqV46l /GDlW2aEleScoP8UBOL+5bwtCB134zU7BP2YwDqRoNui/kiVMvuaP8QZYei2Pphd1R00 xNPXM6TN7uKnvEBHMISyt0D43Gh7O31u8VHtULqVHIfdHyQe7aOso2n7F3tQi2ohi99N fV5dPV4NYFYKgWX2OyXCEj+chKFUihH3JcyPrBBWH7X8ZcTHtpD7ZGwR1pz9wQVOy/B8 pefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=53FdX7XV0fQRmCFJwoXWfUhOKmvd8cslLQLe1WkhmOM=; b=ykulGg6raLLru5tq/+44u0xdsTOQY9Axisq43d2Zqy/F9vWRZGl2LGSoLQEcEgeM2s jJkAZTSR/XuNgTQDwU8KtrgcnK6xqKHyM5PkM6JQxG/n8HW7nRBuZ6v8dHGPMWz9KHAO 11bPI50nf6t9ujPHSQwBME+gbGVsqF2yr3tHIAhgtED7Fd6cxO7klmHIpdq64HSlbdqS HjP/+4c4ak65chaeBK0p2eJUmlBE2eT8fmPCoF0J72UQPfWjTD9IOur3rQq/JMc6JAh8 HT+DS9vKAQd6oxqjkWM1CY84N7bhqmjfhta3h8IUZfphkJuvUyZfQEu2KPUe5nOjKzcr 4lfA== 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 i124si11611234pgc.589.2018.03.07.09.52.12; Wed, 07 Mar 2018 09:52:27 -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; 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 S1754507AbeCGRvQ (ORCPT + 99 others); Wed, 7 Mar 2018 12:51:16 -0500 Received: from anholt.net ([50.246.234.109]:39648 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754458AbeCGRvM (ORCPT ); Wed, 7 Mar 2018 12:51:12 -0500 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id E7D1C10A14F4; Wed, 7 Mar 2018 09:51:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id r5U0FrzloPp4; Wed, 7 Mar 2018 09:51:10 -0800 (PST) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id C06B210A0590; Wed, 7 Mar 2018 09:51:10 -0800 (PST) Received: by eliezer.anholt.net (Postfix, from userid 1000) id AE75C2FE2D33; Wed, 7 Mar 2018 09:51:09 -0800 (PST) From: Eric Anholt To: Phil Elwell , Stefan Wahren , Rob Herring , Florian Fainelli , Mark Rutland , Greg Kroah-Hartman , devicetree@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/5] staging: vc04_services: Remove cache-line-size property. In-Reply-To: <51dc71d7-e8f5-2785-ad13-a941bc9278ab@raspberrypi.org> References: <20180305202806.21219-1-eric@anholt.net> <20180305202806.21219-3-eric@anholt.net> <87muzl9ger.fsf@anholt.net> <638bd870-bb17-a0e1-d2aa-30a364b53279@raspberrypi.org> <1332781939.275857.1520424630939@email.1und1.de> <51dc71d7-e8f5-2785-ad13-a941bc9278ab@raspberrypi.org> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Wed, 07 Mar 2018 09:51:09 -0800 Message-ID: <87371bydte.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Phil Elwell writes: > On 07/03/2018 12:10, Stefan Wahren wrote: >> Hi Phil, > > > >>> It is the L2 cache line size that matters, but as long as you end up wi= th >>> the numbers Stefan mentioned - 32 on BCM2835, 64 on BCM2836 and BCM2837= - >>> I'm not too bothered how you get there. >>=20 >> i think a kernel with bcm2835_defconfig on RPi 2 could be such a corncas= e. >>=20 >> Am i right that the firmware doesn't rely on the existence of "cache-lin= e-size"? > > Because of the way partial cache lines are handled it is more important t= hat the > two sides agree than that the value is correct. As a result, the firmware= treats > the absence of a "cache_line_size" DT parameter (that sets the "cache-lin= e-size" > property) in the DTB as an indication that the kernel driver pre-dates th= e ability > to switch, and uses the old fixed value of 32 as a fallback. Otherwise it= sets the > parameter and the internal value used by the VPU-side VCHIQ to the correc= t value. > > There are a number of ways to fix this, the easiest of which is to assume= that the kernel > driver will either read the property or be able to work out the correct v= alue, so > the VPU should always use the correct value regardless of the success of = applying > the parameter/changing the property. Oh, interesting. So with my patch, we end up with a mismatch where VPU is treating things as 32, and the kernel is using 64. I wasn't seeing errors in vchiq_test in this state, which is a bit concerning. I'll go ahead and drop this patch and replace it with a comment in the code about this discussion. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlqgJo0ACgkQtdYpNtH8 nui7ThAAtLCQi7b6EfWvhcD/rnr01h1wRMmVpAEyVUozxYAqf9CaZ2BmUj/8OQgg mXfjSSghygbsUAvtsKYLXgUkkGwTZiKhneeGpL5uirtLmQYB5xsDxGck2YaG5yxH rPFRt7sMph9SSxqrKR0k3uUdSFlB9zqz3TkGzP2OBuAAI4aiaOZ8B1xKN9+UKbJC b/hftzvA97/T1Zfh+L2NWT2mo064CeX5f1B0Oy3j+BgdJfQLpdi19VBB+XPItfSa 9rdp8rz0wysijqxXSAo53NOK/S/m3e07naT8EvKvGt6QLQ5m0kPwBtU99Z9A4mOX g0r5tjVYJP8JOa4ISZVjq0gXiFe+Gofe/PjD4a+6AU9sWTntAAnLvcBl+XLOyWKU n6aS9/OKTmFcz9NEuCtE5wd4sSli64jUHaJ/T6DiII21d5qeyzI+7HduMmpEbFow 9GohhThqn3/YXQeKZwhV2DA8Dd3Ih8VICe1N8fWaHrP0qj6K7BrXhtCACMH3pJ/G ro9AW2dYkYzPqrxsLtnJo61cir6shh5URqcE4y3NRZkwpPFAkdj9ERA+gM6u7Dbk rN11aP/xeqVNr+TF/+FPKZMpSw3vIJq7R7p8JyKVtNc0wclXGAoBGL9nCy5vL+AV PZntlxaVGpGH4YDOXzW9vR3AkOF2hK8LfZ9d5GFIFBeZ2lG9RsQ= =D+hT -----END PGP SIGNATURE----- --=-=-=--