Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1178843ybg; Thu, 4 Jun 2020 03:10:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhjYaJPAfqVaPg9113AdfzQ2Fr7oRgq3hqKar75CO4yj1DHOrI1fPef37jIvvAfhUE9HyL X-Received: by 2002:aa7:d5c7:: with SMTP id d7mr3626249eds.11.1591265415848; Thu, 04 Jun 2020 03:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591265415; cv=none; d=google.com; s=arc-20160816; b=APkoHL68nuwYZ/7BoTACIdsUR9waZzu4qxdnUk2eKrpEog0ebj/ci6OTKtIi0Od57x Z8V+8SJz5/t8s1ZciLvEDoUueoPDT1dQTqVgPCQA5y/H0s28g3UE4JV0eAMyRsTn8Axr gsTOysmfjs1C1XE5neqQNbQUIiJ3/k1aJJQftfp0nd+HzPY4tvTy8JHY0NS6tk4GYlLE 4V36OaguN6/ZAZX1F/NpR63inVRJZVC3Rg7eWlvdvKB22Wj5izGCm1iwrn8rkLpVP7zv QyDbdE0orqQM8/LfU8Aw6a2yBNuq6jfPNENS31/Z/q9PfMkAdEXKfemzJ/TKMdfYZFYd 1Ihg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=lBI82O8bEEPgYlNHvOkibX3qdLSsdkxzL1E3PQQA8b0=; b=XTChk5fxuAhyir85+t36zpVf71HqQFTMZ1fzgHvtEum+PDb1Gw7pHvd6T79ymG0pwb +ftmbY0XvsuOt+Kf0TTGZNRpxNsCoJUf5n+ad2eqoqDAP+Wshh1kjVpW080WPnOQlBYX RiwFS+J74VrZn3c58J3R68jJVIshUY3bsArjkAoir0f8blWnpXA+m+bz8xWogtBANitL uWPbM7KfWW/s+OL0/3w255kWmbtAsG9mm3eojlO9w0ctMtjYj8Ws4HgNqVmMjWoK6GgZ 9/KaYwNLZlbOSlLCgY0jCKoPaANH3eyVKdc2Wv2Hk42ajKnxsOTWxxIboC+bmMETVuQ5 S0Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=l5cznZQy; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si1425532edp.92.2020.06.04.03.09.52; Thu, 04 Jun 2020 03:10:15 -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=@mediatek.com header.s=dk header.b=l5cznZQy; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728235AbgFDJtl (ORCPT + 99 others); Thu, 4 Jun 2020 05:49:41 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38274 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727993AbgFDJtk (ORCPT ); Thu, 4 Jun 2020 05:49:40 -0400 X-UUID: 579acaf2148b49c6b7566c730229f003-20200604 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=lBI82O8bEEPgYlNHvOkibX3qdLSsdkxzL1E3PQQA8b0=; b=l5cznZQyeF0t8PUXtBPHL8pk3AnSmztorPMyyTSrjhlLqv1+LiJ4TE/ssnITNp2aCsHzYTShTvLxmFL0OjobwAJ8z1zHj8Y1J53i/m96VhNfj5XrWfF2BAQKrUi1kO3GNsTfxg+SvQTp5toCtYcObnVp8pue0TxUoz4GFTToRcM=; X-UUID: 579acaf2148b49c6b7566c730229f003-20200604 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1162007422; Thu, 04 Jun 2020 17:49:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Jun 2020 17:49:32 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Jun 2020 17:49:32 +0800 Message-ID: <1591264174.12661.17.camel@mtkswgap22> Subject: Re: [PATCH] iommu/mediatek: Use totalram_pages to setup enable_4GB From: Miles Chen To: David Hildenbrand CC: Joerg Roedel , Matthias Brugger , , , , , , Yong Wu , Chao Hao , Date: Thu, 4 Jun 2020 17:49:34 +0800 In-Reply-To: <55820901-430b-14c4-9426-7a4991ca0eed@redhat.com> References: <20200604080120.2628-1-miles.chen@mediatek.com> <55820901-430b-14c4-9426-7a4991ca0eed@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: AE948E482C29CD5898F27E00F7D8367EA04E36796E3DBBED3FBA94C5849F28092000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIwLTA2LTA0IGF0IDEwOjI1ICswMjAwLCBEYXZpZCBIaWxkZW5icmFuZCB3cm90 ZToNCj4gT24gMDQ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