Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1507274pxb; Sun, 19 Sep 2021 20:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqU/nycuwRA4tohGKEoYuC0OITUfgybn/5wPrCIeKNPxfPoe6HLQkdouo3z9/PXyQwWmnO X-Received: by 2002:a05:6402:88e:: with SMTP id e14mr27663467edy.342.1632109126242; Sun, 19 Sep 2021 20:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632109126; cv=none; d=google.com; s=arc-20160816; b=hdLK4oHlVxAFAtFVhJRmfzFa0qW7kodTRauy6yKSK22d71OGAcBabYiDpocwhU/t23 WJZS0Ajo5VLWojgzhc1t7pOnFPNPBvzLOJrJpy2wmIu5cjYTokWKboj4OuXBarHsCR7P P1zSVwy1DA794JWc3+2I7hEc8ABEiyc3npYZznp7eXxNLRYk3AHBvZP+RMuTh2LGXXek P2t9By4fq8KDi8iQgH3DoEagVZQ2edmamUH1mrVvTK5+RZN1baFRJcla++ckMFkjiSBT pXJc8ytPN9vgz0wFKsJzsBhQdgM6Kll409PyyxDc2oS5tktoH0/13VZlvnJeBsXTt3fa 0uAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=j6dcfeSU/NOsGSKbPe3yVGjy+BHxzeNlCvBUbxrUC+I=; b=KSDRt6dpE1JFETi5ZiFwgdMo4HH9SqZ8tH1kvNHtDPGWNPB9CmJnv3arGkdn85T0v7 +pBtHPr6+0Joqhc1BjXUE9qQk4MxWHVWeu75U6Os4KKLrFT20THc2xPPR6hpX2So+5yb Vv2WekcvgaasYlFgjRnK/X06hru3nEuOR88775ldfzFgxDZxeGvDuVqjXSgLHPlnuivU TOQqHBGrPs/JF7/G/9dhbWkgN50PrxJr2GHh/04EtCCPW5wIjS2gYRI6DB8QjSbfV9l6 9Lu/CkiDkrANB5Q3E7jHWFaxJaYtvEtYae4/kAsUA6jAwSOUtqeeEV0t3vl+UVpnwmSa gx5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=eIEUGJFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si15293042ejg.73.2021.09.19.20.38.21; Sun, 19 Sep 2021 20:38:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=eIEUGJFp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbhISUFn (ORCPT + 99 others); Sun, 19 Sep 2021 16:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbhISUFn (ORCPT ); Sun, 19 Sep 2021 16:05:43 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E690C061574; Sun, 19 Sep 2021 13:04:17 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id t6so52399260edi.9; Sun, 19 Sep 2021 13:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j6dcfeSU/NOsGSKbPe3yVGjy+BHxzeNlCvBUbxrUC+I=; b=eIEUGJFpKqwaqe/BM2ipxcvnehHrJDzjyAepeocNa9a/QbsroK3efi7YIiCyEGTRZf JrqYvugCXMPfdCMBpi9t5NJlq8DIO0SQSKhEsv2i7upHyblhsEhfE4lIpLTkzVM5am59 36cZWoLGQn6wkEzu4V2W4y6ZqDGKOK8xVmY++3TgAaoQeTVEVbKzWvEMv/6r1/IYKaIS J9qVEC7P6etYjyeAQ6v2LB0ENIK2Ymy2abnCx7fqoYFvqJ8XmIDMhfm+N4WGDj7/Kjkv /wp+Ea0sY38dBMYHWDFWbo6P0X6DFz8sZ5KdSWvCqs64nosGKDh9DGxFzyplY/W8DEwq Hvwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j6dcfeSU/NOsGSKbPe3yVGjy+BHxzeNlCvBUbxrUC+I=; b=Akrp2AtWNmKPlfu2EeWB8er5lg4t+yoBtX3hzopycAj+1YFx4JicjqcClFc5O+sM3K NkhuaNRmQA7ZoAd7AZHBKa6wBFhGj3+cPFy+7qpXUFpwzIS2aPVmgM0TUsC7E7fodgBM WzJbV6E0R9ruBeWNRLgaTmlLPxjGm9xm3J2XJeet2DfWGHYHrztGKoUsyAsFbz0EbMY1 SEBhwNEj5E8Q94wDw4OWiqmX0r0lR+072uhBD8uWhgqqg8qGd0I5uM6npNrjM8dwhOZT s4YX2USwqxuALwOP/l+fZiTyUyuaN8m1imUlEBMcVHiF3hB5WDxXzCTOoHMn9LLxESeR aK2w== X-Gm-Message-State: AOAM532YXG5sWayRFA/GtpMEhhhvnOFzPYQs0jZzI4EicFjHEBzKaY8V 4J+V/WCWsJs/2/278AL+TT9QMaE6yImBVWNuSK6XfOrwYwc= X-Received: by 2002:a17:906:e105:: with SMTP id gj5mr24161655ejb.408.1632081855922; Sun, 19 Sep 2021 13:04:15 -0700 (PDT) MIME-Version: 1.0 References: <20210913080504.832521-1-narmstrong@baylibre.com> In-Reply-To: <20210913080504.832521-1-narmstrong@baylibre.com> From: Martin Blumenstingl Date: Sun, 19 Sep 2021 22:04:05 +0200 Message-ID: Subject: Re: [PATCH] mmc: meson-gx: do not use memcpy_to/fromio for dram-access-quirk To: Neil Armstrong Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Christian Hewitt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 10:05 AM Neil Armstrong wrote: > > The memory at the end of the controller only accepts 32bit read/write > accesses, but the arm64 memcpy_to/fromio implementation only uses 64bit > (which will be split into two 32bit access) and 8bit leading to incomplete > copies to/from this memory when the buffer is not multiple of 8bytes. > > Add a local copy using writel/readl accesses to make sure we use the right > memory access width. > > The switch to memcpy_to/fromio was done because of 285133040e6c > ("arm64: Import latest memcpy()/memmove() implementation"), but using memcpy > worked before since it mainly used 32bit memory acceses. > > Fixes: 103a5348c22c ("mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk") > Reported-by: Christian Hewitt > Suggested-by: Martin Blumenstingl > Signed-off-by: Neil Armstrong Tested-by: Martin Blumenstingl