Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp156304pxk; Wed, 16 Sep 2020 00:25:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza7upUSHdReLpzQQPDfMSfZKnZsJgyx0AqhvWVaDVleQO8MtZ9/eRJthsm9sZKvI3v2vjS X-Received: by 2002:a50:fe82:: with SMTP id d2mr25382848edt.86.1600241118135; Wed, 16 Sep 2020 00:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600241118; cv=none; d=google.com; s=arc-20160816; b=RpxDlYNVMNbleYrTH+cIZa2SLuHuhGHrc8BxyYa0GSaLvTEgX3lOY1StYQGcfile18 wgvFiNE8lVruIpuI+OMfn7YdsUKLKuL6EcKqTDKM6hRrM9YtMVScq4LgnDjk8CTHagPN /AyFpcX2JFkgTel89DFA9oPcSt5my8NYIq3vHaQLV/OOVDmsmOm3a20UAonfO/8Is34K jAmcRzUa4KgXfvC6OGgGPmt/ACGwXcvSyzy9e2/aA79H+bEoeOzu4Nzaau2LyZrmMFEU RTUMNzHfkOeIb0Bl24NT5FprLbu6wxmXiVvxoXbMXdXTcIh7sjk30P/CtoYiGYGnuGRz GCHA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=vdwmOxjXadac1jyLHZrPCTrO5x1Edd+RZbD6GV3fJf8=; b=usB4RJV/poMPfAEqN/4k7mdCG1W+JDoijRVRtwC+5VLF7pVXiCEg54RtrRCRG+AeIA hfkD9qtZFRC1MdLQwxOFdE3LavuASJO6tvUdqSxMWkOSM2DQ2AWQEbpS5Up0sMEMCuak bueb471losFEvHjqztBmPv8Of5J3HRHtMYCe+Vpw9T0KP2tOTArFRbvEBOk5NU2BEwmb VV0vupsk2a14up1IM7DRp5wZblBZYdzYtnIZ5Nf4u2BBG4ynbuGUPRlV4hAxd/gCoVoP afcb+FtcLQLfNA1zxlHrkZzHRZeGjIxXyNa6ruf5FOcLZbobz0WgiZ2/WwD53De8bD1H UEiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QefXceX3; 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 i88si12304195edd.601.2020.09.16.00.24.54; Wed, 16 Sep 2020 00:25:18 -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=QefXceX3; 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 S1726317AbgIPHWQ (ORCPT + 99 others); Wed, 16 Sep 2020 03:22:16 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:29791 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726196AbgIPHWO (ORCPT ); Wed, 16 Sep 2020 03:22:14 -0400 X-UUID: fea3a34fe0f34ebfaa90116f6a91b4b9-20200916 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:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=vdwmOxjXadac1jyLHZrPCTrO5x1Edd+RZbD6GV3fJf8=; b=QefXceX3i4jv/DdyqDskT86AqK5aXSRzqHyHgRZbkPN0/8T1KgaKw73W1fMgmEuUXJD5WXr5/tmA/R9yON3UBesSdxdGTuFt4yySoaISr85k6TDgxU0LJu+QrD1fS8blZcCGmvItnAjjkudWPNjDA2R/aMJwaqo4uag9lt50J8A=; X-UUID: fea3a34fe0f34ebfaa90116f6a91b4b9-20200916 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 672357538; Wed, 16 Sep 2020 15:22:10 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 15:22:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Sep 2020 15:22:07 +0800 From: Phil Chang To: CC: Jonathan Corbet , Catalin Marinas , Will Deacon , Mauro Carvalho Chehab , Mark Rutland , Anshuman Khandual , Phil Chang , YJ Chiang , Alix Wu , Mike Rapoport , , , Subject: [PATCH] [PATCH] ARM64: Setup DMA32 zone size by bootargs Date: Wed, 16 Sep 2020 15:22:06 +0800 Message-ID: <20200916072206.27499-1-phil.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200915150855.24825-1-phil.chang@mediatek.com> References: <20200915150855.24825-1-phil.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 dGhpcyBwYXRjaCBhbGxvd2luZyB0aGUgRE1BMzIgem9uZSBiZSBjb25maWd1cmFibGUgaW4gQVJN NjQuDQoNClNpZ25lZC1vZmYtYnk6IEFsaXggV3UgPGFsaXgud3VAbWVkaWF0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