Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4315975imw; Tue, 12 Jul 2022 06:03:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vRiHz3ZYvb3rHLvpW3Sm/eoNJWsK7+p5sOG84E6e27xU4uKecqtsgV4nV25+NW+JvBeUKc X-Received: by 2002:a17:907:72c4:b0:726:9406:f760 with SMTP id du4-20020a17090772c400b007269406f760mr23502373ejc.247.1657630990376; Tue, 12 Jul 2022 06:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657630990; cv=none; d=google.com; s=arc-20160816; b=xS0QK9mLEJV/A+PRxVIT+C4hJndtjS3uBnLZI2rs3nSDAfl4+iL1Nz9iUJ+9/lTelz LkuO9YsjmtfcWio+mQnT4isyHRANXUw64eO+dudTMxKfeidRV5YmKmfEW4tt5d0xl1lF IWrgsFXDiilJC1rhPHQztKfLscrwYd3YE5oHhNVaXaSyj9O+UYLXknFRhq8ImbUBgr4B qW+BL0c/aUkj4GU865uF4LoM6wneWCiddn2HGFSsHGeFiJuLk6AjGQdYzpwBjU6nWFDY OUwlQ0XLg7QZNAX+aeyajtIEHEGCo33DvbPQaatd8F9/mk6Ybg7BOJDyNRvIsAVb9qyx /NMQ== 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; bh=S9kqIeJx2lSy3ZL/2uap8UB8DaZRFeichnAmAq0Qkrg=; b=CuqeSepl9t9+yjK8s4/azjZzY5qFp7U+2yvDkLmkrgcXT/DUkWG11pRNdFLWVJBfb8 TCYaVrYJ+N4i3mZ6ils1h2//Aunmdu7/PHdqyjHUn3qAeV9Pmi72j0Q0/ugU8mhxcL+Y X9fWq9Dm74UXgIQhvUjjY5GBXr0//KRQl8eFICsEJruGEhE5nED0S+4JrzZfiuYEAWAz D7cda9UKlUEk25l7ZREyOuOu5Vkcci8194QASS2GJZr4nGaK4uSQJADOgesgP8mWe2Yu R66qlH+cXkz5wk81T1sC0YHIYlmRdgAI0cFkogxM/1KHKga/FOfpplyGjMtq9km9jSI7 L1YQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg29-20020a056402289d00b004358145e6e1si11767705edb.209.2022.07.12.06.02.44; Tue, 12 Jul 2022 06:03:10 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232948AbiGLMLX (ORCPT + 99 others); Tue, 12 Jul 2022 08:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbiGLMLS (ORCPT ); Tue, 12 Jul 2022 08:11:18 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C09E85A474; Tue, 12 Jul 2022 05:11:17 -0700 (PDT) Received: from mail-yb1-f181.google.com ([209.85.219.181]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MUp8r-1o23la41Qn-00QjGg; Tue, 12 Jul 2022 14:11:16 +0200 Received: by mail-yb1-f181.google.com with SMTP id g4so13565730ybg.9; Tue, 12 Jul 2022 05:11:15 -0700 (PDT) X-Gm-Message-State: AJIora+1Lr1cvLsc4AlqV+YkOuCjky/g/o9+aVW+t4MQx27U6qeTzAyf giwRYNe+CCFUI1Lg9G7kftU9EkxFcMoBONCyQtk= X-Received: by 2002:a25:7c41:0:b0:66d:766a:4815 with SMTP id x62-20020a257c41000000b0066d766a4815mr22157231ybc.480.1657627874679; Tue, 12 Jul 2022 05:11:14 -0700 (PDT) MIME-Version: 1.0 References: <20220711122459.13773-1-me@linux.beauty> <20220711122459.13773-5-me@linux.beauty> <181efcca6ae.de84203d522625.7740936811073442334@linux.beauty> <181f1d88b64.e2eb2601586551.453778983551010212@linux.beauty> <181f20d0403.121f433c8600165.2068876337784123868@linux.beauty> In-Reply-To: <181f20d0403.121f433c8600165.2068876337784123868@linux.beauty> From: Arnd Bergmann Date: Tue, 12 Jul 2022 14:10:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] sample/reserved_mem: Introduce a sample of struct page and dio support to no-map rmem To: Li Chen Cc: Arnd Bergmann , Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Andrew Morton , Li Chen , Linux ARM , Linux Kernel Mailing List , DTML , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:+zjAhnLj95+ph1V+04ZyezVsXW3m6sCrtwFXluUV99lipKO4NdF mAEgpzpGlWFbao+AgoilRE37FQdcPyk1U9p/lYP1LlKPXLglU1lZkbRD/Vx/jPlaQLBKfF0 4Qr5xWbLaNuHwt2pPm0tv9hWCqowia+LZ1FMGawOwxvw3zSOVXqlFtRhmsacXrW50BGnJNG JYnO8FDLhy6mG46f8Qrmg== X-UI-Out-Filterresults: notjunk:1;V03:K0:tHoxLQUteDw=:YxduVIBuHjw2g/yDkWz0jq wn7FOoMuQ/UHM86DOKWpYBxULK+nrBmxGqAZ3bMVADZSSLubHQPnS0yf/TnF/heEU9O3aPZ88 ejzov7VWOyaQeLaEjqebEMirYsjrMm0PK2uBhCuFRjjhJeK4ij1tkI+Ggh6gbdDNNVngXG315 wueP3aMQd9eT/TcluiractUJukw4MVd92FY0JC0CDL9H3v2OHbXgBiqE8xhLfdqlRzGvePPfD g2JE763x0KFn2IN0yP8n3brE3JJsG1unMfc6TZCf7my8/Vv3I0FlB1yrXuANCK6XSAKWmeXvA MsfnzZUN7YZhdapNpHbLfa55Kve+sV9kJGJntlBx48VpPdS261zamq0GxaqNs+5opQ5wlL08M tXS5Q3vB0M9zrWQRPVQ3Z2R7sj/F7MTkn+mccArOjXYt/yJ+t5PgbJGqfcWoHXiAuVbz0hWNa tPMsbCg2VEwwduFAwNCsM8OlOqAIFJmEfASdMYSXm0B4HDX0E/BsOp71QGrBE+oJWldyaM2Mb 6lpIqXxaPXYm1mNAj+JlsDIhQnY8F6moBfK5eQ71TXpdDwKHuNfY7xv/QVxvTSF9KIecAB9Oq 6RysTxkdvnyu545cY5FpiDr0hgClhWb0BH5ys6KSBy2ydfmzEFoT9s/uTCfgjzs5C9d9NCUk4 6b5Rw4kgWKt6HAbvPhh5HBn7LS3njB/21l7y7wIpuvllE40a22VqfrPVJzKCMkeElpkQrDFaj levSiPr/NA61BGixZcJ/MHtu3WHCHto/9wdyww== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Tue, Jul 12, 2022 at 12:55 PM Li Chen wrote: > > > > This is a common limitation that gets handled automatically by setting > > the dma_mask of the device through the dma-ranges property in DT. > > When the driver does dma_alloc_coherent() or similar to gets its buffer, > > it will then allocate pages below this boundary. > > Thanks for the tip! I wasn't aware that dma-ranges can be used by devices other than PCIe controllers. You should actually have dma-ranges listed in the parent of any DMA master capable device, to list the exact DMA capabilities. Without this, devices fall back to the default 32-bit address limit, which would be correct for your video device but is often wrong in other devices. Arnd