From patchwork Wed Sep 12 16:42:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 10598077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 62CAE1575 for ; Wed, 12 Sep 2018 16:43:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5120A283BF for ; Wed, 12 Sep 2018 16:43:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 452E528B83; Wed, 12 Sep 2018 16:43:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C0AFF283BF for ; Wed, 12 Sep 2018 16:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gciXCe0DjLaK5a2QcMUi+BEGyMI5J0wlkx+ENVvL5bM=; b=OAi2I3WM4qJs3G eQvNonuYk5JtzmszMHhzO1WW7Twj9rkg+3eR/RUVx2Mh8LpL2w8CN/dxxexNmSiKFUi90B3xE04HP IW3v3LXNGtyCegl6zWWzfUUcwotK2g8CudtqM6gDs3gGDx5jFvP5GBZY+VUlOVarKcWkLt4eBg+nu OSyyl0ST1V2wzTssP0kAAaKuD7Ry/XDiv15oeXQFT3yQXqNLYNIGkBlGd1jPOg3BbZglq7b8LFGAQ cYrSCxHr08bVA/2a/yFHgMGhrmPW1GhjUyap484rcV/WuL0uooQHbMxrwdoFOL5B7Dkir+25Jm8CB fU4ovhKZ3NcooQHE2WmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g08Eo-00069N-Mi; Wed, 12 Sep 2018 16:43:34 +0000 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g08E8-0005ql-JW for linux-arm-kernel@lists.infradead.org; Wed, 12 Sep 2018 16:42:57 +0000 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8CGgeI6011088 for ; Wed, 12 Sep 2018 17:42:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : subject : date : message-id; s=pp; bh=65trAmSWpsABqWUNnto0wx7gxv+vWAtZaA4VrRb4nIE=; b=2NUnd4LmSidX5Bbm6otfQ/dD23R69PvUTEObcDxVlEys38jaugIAhbcQ2l2dQWgWkQUQ L5uWj0oNLhvE06H9c0FHbIKGwNgVPHJAJ00g0IsAju2tomAvijgUxjwDu5+mVo378XSs gOrbgjCpbUaAh8/XPq/pYHLiWO0bMuCmn8DgajEbGcO6OiO/IkkkOVg6OLu7K851Go+1 4bX/DGe3mfMBEyWvB3/EeRXYFV9a7ga0s5Zr7Z0xT2QKtZV21Ins76yKFyBqoJHnVYMo QGZudG7G1ENY1tgNg+s/+N0jmm9CrKUyoNsRSEDrvhzSOnljD6OOD58kFOOdDXHaUXpB hg== Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by mx07-00252a01.pphosted.com with ESMTP id 2mc3u0j2xu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 12 Sep 2018 17:42:40 +0100 Received: by mail-wr1-f69.google.com with SMTP id j6-v6so2453248wrr.15 for ; Wed, 12 Sep 2018 09:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; s=google; h=from:to:subject:date:message-id; bh=65trAmSWpsABqWUNnto0wx7gxv+vWAtZaA4VrRb4nIE=; b=XeTtnL5UYNHbkHNPzKlWsP4q99UCSEgt8Gqlu6cISohUZ9Agj8oW3TCBsd+zbLFG/8 Kwh3GFx8ezrgXIrj63Su3oQp7SQdxLuhLi5XmkQHLod3dykfiStLotzOlMk/pN7zs5ry Gdair8NRoa+cCyb3teknLOoGQxu47SDap2KbjXVSIlnxuARk6K9uj4sNcIphrm9orvY3 HczlkV2QSU++tW1M+Xk2rHfAb0xxOTLfgaoeaYsXlI2+xFuzwkA0GdNEp4xJIprUfveX NhJJg8iEWTEHO/ToPL3Ce+3NdJSri73fi3m+7c7xEzkTpQTsbsp1wpcfZ0YXJS+GFNOf KaSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=65trAmSWpsABqWUNnto0wx7gxv+vWAtZaA4VrRb4nIE=; b=j3ix5RP4C/LFXMNydE41PymRpGYb1iLuHnzKn0RKu96iw79mG//3y6iurTbS2IYvT0 jXemGjRL5RAhsHePqXZR0dDm4nuwFh8O8SJZs/98AGf9wQUUbQOPJ5xz5yLvs+5seM8u nbnCrKIQKIAX0oVYbmiow7nyhQ3teXoNVLvlV39VqBtCYRT49nzMzb51xnXkj8Ey8DfK D0nMHwVFlKSi/Imd4o5FVTC3UrtcR3zFxJV64VlZec+caLsXGeSjfzf4m/pq7DGDXqPZ IyKwxnWr6A4ZHnolLsrQCk+nS4YYOJySkqKs1pFQT77T95cESxS4GFu+tiqRc3rtJzsl CXSw== X-Gm-Message-State: APzg51CJXgyl+FfdIlOwnFK/IAn/STtpPtNYKtbbjDmLpcJQx70bhnm1 PQfRBDRU9gE7QG7eUYVIVlxshi/SvsUZPgvV2U1YRigpJA55UfCuNh+14c6cF2gVxlMVdFz74Zr TZn4vSr5Cx5eBjS8CmLXBh2BdEELeCT5imPI= X-Received: by 2002:adf:d20a:: with SMTP id g10-v6mr2334650wri.66.1536770560039; Wed, 12 Sep 2018 09:42:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaAPzW7nyWEXPhFebnwLhWkPDF4WF6jIWoEhKm9yJy2sQQx/rBmRBDq1343Tv9MJFC4hXMVgw== X-Received: by 2002:adf:d20a:: with SMTP id g10-v6mr2334622wri.66.1536770559709; Wed, 12 Sep 2018 09:42:39 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:e45c:95a2:cfa0:31e0]) by smtp.gmail.com with ESMTPSA id 75-v6sm3709420wml.21.2018.09.12.09.42.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Sep 2018 09:42:38 -0700 (PDT) From: Phil Elwell To: Rob Herring , Stefan Wahren , Greg Kroah-Hartman , Phil Elwell , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH 0/2] Improve VCHIQ cache line size handling Date: Wed, 12 Sep 2018 17:42:32 +0100 Message-Id: <1536770554-107314-1-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-12_09:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180912_094252_971111_8C726A1F X-CRM114-Status: GOOD ( 19.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Both sides of the VCHIQ communications mechanism need to agree on the cache line size. Using an incorrect value can lead to data corruption, but having the two sides using different values is usually worse. In the absence of an obvious convenient run-time method to determine the correct value in the ARCH=arm world, the downstream Raspberry Pi trees used a Device Tree property, written by the firmware, to configure the kernel driver. This method was vetoed during the upstreaming process, so a fixed value of 32 was used instead, and some corruptions ensued. This is take 2 at arriving at the correct value. Part one of the fix is deriving the correct value from the ARM's cpuid register. Part two is a (seemingly cosmetic) correction of the Device Tree reg declaration used by the driver, but it doubles as an indication to the Raspberry Pi firmware that the kernel driver is running a recent kernel driver that chooses the correct value. As such I would like very much for the DT patch not to be merged before the driver patch - just tell me what hoops I need to jump through. Phil Elwell (2): staging/vc04_services: Derive g_cache_line_size ARM: dts: bcm283x: Correct mailbox register sizes arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +- .../interface/vchiq_arm/vchiq_2835_arm.c | 24 +++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-)