Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1113918ybg; Thu, 4 Jun 2020 01:06:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9vc+2/Mjz1ShrIuhNadiC54qfqw2p9SzAb6EyIcrD2jfcBD+voMbjiNC0L9lVsmVHU0Kp X-Received: by 2002:aa7:dc58:: with SMTP id g24mr3357477edu.136.1591257982329; Thu, 04 Jun 2020 01:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591257982; cv=none; d=google.com; s=arc-20160816; b=grKxrLTx+CnmVXWDPmTeN504wAjwGPN/kQijYggJtvYbQalLeNnkosCOxEVW8Uq4Fs mwQq3ujzVIJNSuPMP7SYmEXQcfywiYwqJEPrevkNUab4c9c3mN8Yt7JHudAEzA+c8Fru tLVAUYz+SfA4QV1ry68lPxJPoo1AZ43Fw0UOV8EL/ocHsI2Ztld2sRDJA17Tnvv61fht jHlSvnejVuawxlDiJ9hnGeQFCb++Y9p2ek/lG3vtSi36bqPp7yrlpwvXHHj+hidPmcUo OMrlEAsRMqrXE9vhAi+qCgk5vTHfPYMa7hfIXVT2A0vNbzaXiAQybnQ5/L86Be3AITBI YSMg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PTiPt0eASFWtTJtbLfkkvOk+F6XVglwV/gBrDeSnaHA=; b=WE0OPFAvgZE5y48t6xFkx9JpAPpfQoODW1wNZD6SoajD6gIVrRbvS5CjwRqAjquPWa xy1Y+NivIQn938tt6cwQme4EPlQAGgbpQwOzk6MbSvcuIYGcILurh/hOl/Sv8auKfBwq ybLhhg65CD26yoySTLNcXctAGLUllgL0D9DR3Wcjeuqp8Bz00Vd7Ltq1x10SC2bKzCGC Z9lX+Y0jYVomrFCpUkWrU2uD0D9wtLBlNncMuP2j2FqiGt3zNdQ7so6eZGYj+RQ+ghit hKpM1SPW5S22eIxp3U1w0OE252pLKvw6RKoBtFWjQ1Nn25RDeXE7ssSmlZqKOCemqbzI mwwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=cMNc4UTx; 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 h11si1217278ejc.87.2020.06.04.01.05.59; Thu, 04 Jun 2020 01:06:22 -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=cMNc4UTx; 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 S1726372AbgFDIB2 (ORCPT + 99 others); Thu, 4 Jun 2020 04:01:28 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:63815 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725950AbgFDIB2 (ORCPT ); Thu, 4 Jun 2020 04:01:28 -0400 X-UUID: 23c42885bc43477493215089ebc73e9a-20200604 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=PTiPt0eASFWtTJtbLfkkvOk+F6XVglwV/gBrDeSnaHA=; b=cMNc4UTx0vMHrdXBgLAdVyXYk2I9SFbEurepxOERT1dVpu2jWPEll+ah54uIJaXrFXqjtsK/4B18kVq1pjEPRGmySH3q6jt/jpWNbEh6JmreBdlQzYcuhDMgHRO8tkfetzHBLAHp2Fojg26t/e87P8zWJ8/fKiOYz7doqO6GI+s=; X-UUID: 23c42885bc43477493215089ebc73e9a-20200604 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 564593313; Thu, 04 Jun 2020 16:01:24 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Jun 2020 16:01:21 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Jun 2020 16:01:18 +0800 From: Miles Chen To: Joerg Roedel , Matthias Brugger CC: , , , , , Miles Chen , David Hildenbrand , Yong Wu , Chao Hao Subject: [PATCH] iommu/mediatek: Use totalram_pages to setup enable_4GB Date: Thu, 4 Jun 2020 16:01:20 +0800 Message-ID: <20200604080120.2628-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 302719ED3089E2DF6B542E554C0642AB15FA15964EDC318E0CE26D1C0920F5F82000: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 VG8gYnVpbGQgdGhpcyBkcml2ZXIgYXMgYSBrZXJuZWwgbW9kdWxlLCB3ZSBjYW5ub3QgdXNlDQp0 aGUgdW5leHBvcnRlZCBzeW1ib2wgIm1heF9wZm4iIHRvIHNldHVwIGVuYWJsZV80R0IuDQoNClVz ZSB0b3RhbHJhbV9wYWdlcygpIGluc3RlYWQgdG8gc2V0dXAgZW5hYmxlXzRHQ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