Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1675160rwb; Thu, 8 Dec 2022 13:52:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lBDFh2dfr+gjXTdUa4XggvZCqzgF8J1c+jMupyCdAY3OwQH/sMjvx+OBj5ErjOF1og0bk X-Received: by 2002:aa7:c841:0:b0:45d:2a5:2db8 with SMTP id g1-20020aa7c841000000b0045d02a52db8mr69739450edt.105.1670536329161; Thu, 08 Dec 2022 13:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670536329; cv=none; d=google.com; s=arc-20160816; b=x49nv5AUJxGwS6rKZsGCTl4+V+ST/rd7T2X+qTxUFBBAHtMU+NrP6FdbLWEAcCqTis OO+DWuHYYJKpq8ugmrOU5d7gkFkPtCnFubOjmCjcs6y0RtaITsh/LAIYfrhe/BBTOm4e 41d9/4ABvnWKQioytXgYbqcvFmN7HAwfyABqt7o/li03bOW3SO24sl19N4fL8IPgyFCm s1EeuXWc8cEmaKuVLZophxXrxOjjEQujX3cYXvpx4lY4G/eYAq4QyYmln062F/LvxYHm tx7QngRV4udR8ID3E3ZJwP0QvMiSoLHG5Axyh/rHXduK+VK3baO+MPvGEIuelKNLvsNT ZjUQ== 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=tlFUfNslInmoKrVXkH1lhTSHZIbojnQ8pkFmtckc3GY=; b=n08bys0zWaiWwUwAkogRmEYNhDS1SlbLGK/6gWyUd4LnPeljGVvxd6Jj5scCxpLuwI KKBe0IqXXNgwk8FgN6xmUyGVBxmlQxTn1+YJ/OOqqkRcxy0MwRAhbKQ05BKlhug2O9A7 lCRPRWegeCIRun+1DWeVNBAoyVd6Wx7UEUNkFPOIVHtMlXp+ZOPjdZj3VTMbPhpG7rno ZuXAN7ugJObAUEGZnukNI1kfqGb0/qBff6eW/VivrUb76Gw68m95nAb2ldoEafsQQNn7 Qsb5ifzb2/IBOfFOH2GSdzVjKNL5sJkaD9/scsFL1ZJF6pFikopCxf3yocPgd6dzXC7l mfdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K30+WCfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg3-20020a17090705c300b007c10ac9ca41si7784322ejb.95.2022.12.08.13.51.49; Thu, 08 Dec 2022 13:52:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K30+WCfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiLHVfc (ORCPT + 73 others); Thu, 8 Dec 2022 16:35:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbiLHVf3 (ORCPT ); Thu, 8 Dec 2022 16:35:29 -0500 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F54B78B9A for ; Thu, 8 Dec 2022 13:35:28 -0800 (PST) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-3704852322fso29396057b3.8 for ; Thu, 08 Dec 2022 13:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tlFUfNslInmoKrVXkH1lhTSHZIbojnQ8pkFmtckc3GY=; b=K30+WCfX8giduPvnrjcW4mf0ZRHkFyzYUFp5Xw7Zjv/oHUrV8dMXoacaTfnJxSLDwV pVeAN6CSxR/O/Vx40v4erwGSsTiSXe3BI/bCWsHnatqvqmAYi2FqyUlAzRP5W0y2p5aE zAMj6D1W7oNBlX+83qRGtrT5KuxtIXTavxGMWCCNE4DdR8cS0J3wu80gRV6T992+pMA4 hmoUbprlR34I2rGMsgz46+y2PEb9RfKy+swqPIFvY9MPPF985zvYmfUFrwWlSjxOyf9M WI2I3nsrrptkAptuLcZe9jRb6RKZya66wgPG4LDdLz5f79U48zqo0n1oOC6z22UMXm/O /38A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tlFUfNslInmoKrVXkH1lhTSHZIbojnQ8pkFmtckc3GY=; b=dwWARQdhv7Sxj/5dsyF4bG8ntaCRB4FyZV6pPeihlsRv2asJwP48ZBATtrN8Y9Qjnk RnEglsNriT11aJSkH5x/98hLtlmbPI3Uuzij6GT9i4pDIVfy3kkypXVGx8go+Ul8S7Nd Br2h7M97NugOSCma2+p8KykXkCRGdEjFoxJDOaOzVrI8+AlyOLLaAOn06iXuGyKWBNsX HaFXFPaYHIr0S842cYWtgVWvwkTTubUW0xucIDCynbkCWZv5g/VgdH6W+c+Yx1fTLS8h y2B0g4pnDq02Pv4pChphBuKKvEphbCK7zNgmWyZhg7wHDLMtcW380sVIQ7VMQH5qRoEp JPlQ== X-Gm-Message-State: ANoB5pnXFwpOjj9GUnk9WpZA6izuxtolT32ZDPljj1S7wGfn5nMdAMFq Gtvwy1YZQNwoF83upQX9zs3+5gH9JCyAFnq1aK1yaA== X-Received: by 2002:a81:b45:0:b0:3c8:b520:2fa6 with SMTP id 66-20020a810b45000000b003c8b5202fa6mr48364581ywl.411.1670535327801; Thu, 08 Dec 2022 13:35:27 -0800 (PST) MIME-Version: 1.0 References: <20221205105931.410686-1-vadym.kochan@plvision.eu> <20221205105931.410686-4-vadym.kochan@plvision.eu> In-Reply-To: From: Linus Walleij Date: Thu, 8 Dec 2022 22:35:16 +0100 Message-ID: Subject: Re: [EXT] Re: [PATCH v3 3/3] mmc: xenon: Fix 2G limitation on AC5 SoC To: Elad Nachman Cc: Vadym Kochan , Hu Ziji , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Adrian Hunter , "linux-mmc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Chris Packham Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Elad, I get it, I think. I was a bit confused by the 3G/4G terminology. On Thu, Dec 8, 2022 at 11:20 AM Elad Nachman wrote: > The lower 31-bits of the address placed in the ADMA is passed through the interconnect, and remapped to the base of the DDR. > > Hence only addressing of the lower 2GB of the DDR memory is supported for eMMC in this device family (AC5/X). > > So the quirk needs to kick in above 2GB of physical memory accessed from the base of the DDR. How "clever" to skip bit 32. This should be in the patch description. > This is why a quirk which only kicks in above 4GB is not sufficient. So the author of the patch should create a new quirk that kicks in above 2GB, devised to be similar in style of the 4GB quirk we already have. > Furthermore, SDHCI_QUIRK_32BIT_DMA_ADDR is checked in sdhci_prepare_data() as a way to > disable DMA when the offset of the scatter-list DMA address is not 32-bit aligned. If the address is > aligned, this quirk does not disable the DMA, and will not solve our problem. That's right. Let's just create a new quirk: SDHCI_QUIRK_31BIT_DMA_ROOF Define the semantics such that this will allow DMA for buffers that are below the 31st bit, but does not have the semantics to limit scatter-gather buffers to be 32-bit aligned. Yours, Linus Walleij