Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6283060pxb; Thu, 27 Jan 2022 10:13:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeYrj6sD9kTLKettlVsJ3qNwp/BaV/EGwjeJbGtxFQ5PmbW2G7/a4GjRyMUM+iEybC92QU X-Received: by 2002:aa7:c14a:: with SMTP id r10mr4723290edp.292.1643307230457; Thu, 27 Jan 2022 10:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643307230; cv=none; d=google.com; s=arc-20160816; b=aTX87No0Zwy7pyKPx2Cs0OZahYDONawadMiCuTzaJb6Such4/2PTFSWE9fnC82zAjx 062vaKzJqPIMuntnmt20plF1c7jiKAPAc3j5VeUMOUSJY7L3gez1srcYWeuoDmZDE5Q9 HrigPhEIyY3Kh776qTYi2UkLmcqvuHU0EV9NCha9cl9oNDHinBhjJPhFp0d2tsjKHMf/ ETnJGvoRcAtVhtZqifapa/wAKyZb/ABNXS2zvZuaEYjosja2QwqlzQ2GfJVe5u21c98Y lwjlzMhlJ37jIqokJ/9/t/Po8BbSnfJzauGYhvBroKJaut3a5O6if2s4bWPZuMf2dgWT BJlw== 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:from:references :cc:to:subject:dkim-signature; bh=TvKzfJZNdFjkTaOu+DqiwPcIRUugFDG0nAdnZHF4+wY=; b=zX8FwgPYSeNtE1HyJnYmo8gwSmD659Wfoz/tzy3ZXsvs33l3+XGU2Cr3OKI6WDqBoG L+WgbhQg0U9ITWlFYVohWR+w2H4LNqRzugmYJicZsGQLglVLLkWdwANqQ9yRN7dmh2V4 v+/BAaqm5MIjTM/nUl9bOniS+25+L/OYRBhgFC8W54tGeEB2ZPsDi9IeMmXxE8IYo90w B0eMmBMlrSr9N39VOei3fBAUogdP87w1BPH4UZQ3xmG6X7+xP2Bpckn2GBy2moZ8yv7Q SsL7VJswzbyiW2uX2orfJRFK3GM8VZlJPtWmrNbqTlV3CY7yBx2ZulfxjQQl6MldC3oC eP9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nnr3GMbF; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si1617439ejy.248.2022.01.27.10.13.23; Thu, 27 Jan 2022 10:13:50 -0800 (PST) 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=@collabora.com header.s=mail header.b=nnr3GMbF; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240002AbiA0LIV (ORCPT + 99 others); Thu, 27 Jan 2022 06:08:21 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51300 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239985AbiA0LIS (ORCPT ); Thu, 27 Jan 2022 06:08:18 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id B3DAE1F4508E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643281697; bh=pD9noCDXkcqAB6AAEiwPfDWrkWdMpDGOBwLRXgaqv88=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=nnr3GMbFnt1x0OVs6l9kutbE+Fhxml6aliTz565q+5SVqy4sw+hWTa4e4tIJ7s8KK 7OZQktfsBd+vF8FQWQ387uWoUXxBhkhIU7Xgvp4cd0OR/GNnhR/+Mt77PYInVxSos5 u8ADJBg9wKFE2heP+yjGZnaaanYyDUvVVHwvkEZvyShsYdGMru/z2Mgavi26kH+2Vv O5LAfbiimj56jRKhqv7szsvodmnHcIBpvCrt2A7F6PSbJzKkOvcaLWWnjiRahNbVft QJ+mZ0S4t6tlmmF12a4tRo5mZMbG9w3uHFbJNN5VReFFx/V0ty2femMGdtr+6z++kI FSUugopXN6eeQ== Subject: Re: [PATCH v4 08/35] iommu/mediatek: Use kmalloc for protect buffer To: Yong Wu , Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon Cc: Robin Murphy , Krzysztof Kozlowski , Tomasz Figa , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Hsin-Yi Wang , youlin.pei@mediatek.com, anan.sun@mediatek.com, xueqi.zhang@mediatek.com, yen-chang.chen@mediatek.com, mingyuan.ma@mediatek.com, yf.wang@mediatek.com, libo.kang@mediatek.com, chengci.xu@mediatek.com References: <20220125085634.17972-1-yong.wu@mediatek.com> <20220125085634.17972-9-yong.wu@mediatek.com> From: AngeloGioacchino Del Regno Message-ID: Date: Thu, 27 Jan 2022 12:08:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20220125085634.17972-9-yong.wu@mediatek.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 25/01/22 09:56, Yong Wu ha scritto: > No need zero for the protect buffer that is only accessed by the IOMMU HW > translation fault happened. > > Signed-off-by: Yong Wu I would rather keep this a devm_kzalloc instead... the cost is very minimal and this will be handy when new hardware will be introduced, as it may require a bigger buffer: in that case, "older" platforms will use only part of it and we may get garbage data at the end. Regards, Angelo