Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3312135pxv; Mon, 28 Jun 2021 01:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkikeYWkngkPcjk5O053sbzk8xMtn37lDgNQqQNEWI4phcwSbyoa4HFxNFqDQO+jhYjnnP X-Received: by 2002:a17:906:3755:: with SMTP id e21mr23492506ejc.0.1624869133033; Mon, 28 Jun 2021 01:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624869133; cv=none; d=google.com; s=arc-20160816; b=KPey4ubbCzteEfiHGI53M8U4jQMVXN73oEf6yQuQNVfdcE5j/ifgAGmIjNS3oFnNCo EI5ZE/hva6mpIG6cGJ8G/P5tKF+/IqziSjODbwbC0rvTiO/cWuygt52R/ckQL4L0ckrE 6JrAybqHc+zz6UZdQ8NxK4TaYkOK4PlSmpQu/WASp5UVeBH/ZFvtEM7C51T8N3I6g1N+ 7dizDA2Ua5nwaMve/8fha1WPx1OCcNYR2/+RBLyRuizOxpmxR9BQJ3QnfABbb5rTVHDE WD+wgOutS/9EGJfO0tT900CX8hJdSuHBVAoB9FwP+lLoHzyZxs3HpNzvbLacRlguI2Ac MIpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=jO+3RGr+y6NVVh1FqaniB3igkozK5F2rs2J9PP1CIIA=; b=mfYdp7hUcoGkhMKYlISJ6tXdaPBeUuA+TIh94BllFMhgqaUUpjia3Co0GDZfChOYfP 9R3b3VMgfVyRa2Ya3NucRZ6+0TxttkZgPQ7zepTC1NS5sEd8yiSSW6rWqcMPVeEf8Diz jAL1sOojnyC3BJqYR+RLQWRJYm8HMG6L/2sKdwNrLOby8oo8lmRkO0GXgUGDoft9fnw5 UywopDuuA+hAohE4J4QJ0Rf/fimP5/avwfNihtWk5yemtfLYxXWmMA9ILBA1Hy2vnHsT dD9XeNExNVPDa4fhdEGX6DNVJ3pBGRh8qsl5RhNHy/b+UuosEHPMoTN9bE/WbuzDIpC/ BPtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=YguKwKN4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hg1si1778188ejc.13.2021.06.28.01.31.49; Mon, 28 Jun 2021 01:32:13 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=YguKwKN4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232460AbhF1Ias (ORCPT + 99 others); Mon, 28 Jun 2021 04:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232391AbhF1Iar (ORCPT ); Mon, 28 Jun 2021 04:30:47 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94FE1C061766 for ; Mon, 28 Jun 2021 01:28:21 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id o33-20020a05600c5121b02901e360c98c08so11366827wms.5 for ; Mon, 28 Jun 2021 01:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jO+3RGr+y6NVVh1FqaniB3igkozK5F2rs2J9PP1CIIA=; b=YguKwKN4a0V3L/TLOfpJP1B3B6i+xqV5e7RLVQFpql2LuKNaEqRvcFBD9J6wCnfDq7 utpq0mMnfNWMNktbKTGdnJDEFWvxy2d0Ceoy7AT1C/fVnMFjtIdSeKducvG4xjteOqaR jyOX4A6d5uq+uWGtR88h/i4eWFUhqQbbjDx6lAvj5fyFnSEyMbTTYGl14PKh6H++WV9n 7zXPbQRW/HuO55VRdfFgtOYd2nbZU5MEFUpLYNmmQTxkCz0O6xHj/seObTua1QO/vIVY t7vW1Yzh7KTyLVJqf7iEcwT0wC1yxZ00ZC818eXdLCN2RtqKZbOX/qrsKseWaLH6mwOa 2bRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=jO+3RGr+y6NVVh1FqaniB3igkozK5F2rs2J9PP1CIIA=; b=Ns7Sc4rXEt+fN7O0Xrm+ulwtgHQHRJqn9iDGFO18hxo3nZPSLOpBZkgv0v+SYl8u8W oyqppwFC5cE9WmvLhNyzP02ITGRC9PSYaibtRNwy2oXNv3wl3OivGNRtZz8be93fDfKH LZ37qDQl486PCsFVwGUqOuX3pwm6Ci5zjvBiObgdC+FNUVQhVKiYJxKmhaj87ecJNlu4 fREGkTrkH48hHwVB9PeWJ1rv7kOrY9+Zee3sKRg/YdOF6aYGRP+DzTrpiu+J/XdQb1+G LtVuPrpeMw3NdZ+6Xbq78wCDMvM1/pvpU2zGKkSRlVdENvHVnen2NeeMSJPjU0uFA2Oc kDGQ== X-Gm-Message-State: AOAM531RSRlezaLbmJaKZr3mzX5wzd/Bt8qF8H8/zzQ19W2Iya82HnZf 3iYIjiBTY2Xokb+rkp+QDAubGg== X-Received: by 2002:a1c:f70d:: with SMTP id v13mr24238017wmh.183.1624868900140; Mon, 28 Jun 2021 01:28:20 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:e503:e76:4043:c4f7? ([2001:861:44c0:66c0:e503:e76:4043:c4f7]) by smtp.gmail.com with ESMTPSA id l5sm15996476wmq.9.2021.06.28.01.28.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 01:28:19 -0700 (PDT) Subject: Re: [GIT PULL] MMC fixes for v5.13-rc8 To: Ulf Hansson , Linus Torvalds Cc: linux-mmc , Linux Kernel Mailing List , Robin Murphy References: <20210624123251.191299-1-ulf.hansson@linaro.org> From: Neil Armstrong Organization: Baylibre Message-ID: Date: Mon, 28 Jun 2021 10:28:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 28/06/2021 09:49, Ulf Hansson wrote: > + Neil, Robin > > On Thu, 24 Jun 2021 at 20:00, Linus Torvalds > wrote: >> >> On Thu, Jun 24, 2021 at 5:32 AM Ulf Hansson wrote: >>> >>> Neil Armstrong (1): >>> mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk >> >> Ugh. How horribly ugly. >> >> Why is that 'host->dram_access_quirk' test _inside_ the loop, rather >> than be something like >> >> if (host->dram_access_quirk) >> return sg_copy_to_buffer(data->sg, data->sg_len, >> host->bounce_buf, xfer_bytes); >> >> at the top of the function, with meson_mmc_copy_buffer() then only >> handling the mmio case? >> >> No, I don't know this code, I'm just looking at the patch and going >> "that looks really ugly". >> >> Anyway, I've pulled it, but I thought I'd voice my reaction to it.. > > Thanks, good point! > > Robin and Neil did discuss some cleanup that could be made on top [1], > but it looks like that was targeting a different part. Yes this was a quick hack (and obviously not the optimal way to) to address the fatal system crash. > > In any case, Neil, would you mind sending a cleanup according to the > comment from Linus? Sure, as discussed with Robin, the plan is to introduce sg_copy_to_buffer_to/fromio and remove this crappy hack, but this requires multiple subsystems involved. > > Kind regards > Uffe Thanks, Neil > > [1] > https://www.spinics.net/lists/arm-kernel/msg901045.html >