Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4102204imj; Tue, 19 Feb 2019 15:33:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IbmZWgg8gqaUqAoetXrKDYCPbDg2cUnit0VSAkO/Od2oNP4irz1/v8DeNW0jv3QDsSUfr2a X-Received: by 2002:a62:574d:: with SMTP id l74mr26545973pfb.9.1550619188528; Tue, 19 Feb 2019 15:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550619188; cv=none; d=google.com; s=arc-20160816; b=qEYdtAOVxWQUa/sHGhtcdEtF+dKXavlRCPBR/kJDdUpZiKHwOq+rkwS1WFyqG+YyiR wR03ysY2zBaFnRhwx9jVMAIErDFSUMXKGvxLvJf8Ur74Doy3bq3lAK2qzMTj1zP8Y/4A Bu9p5NEVRHoLxnhkQwsPyzu/JaNvsY265s4alWYwMu3yeqFDn9W+S6RA9OS42Xf/V/VL vwMCcmRRpZlUq8b0FIZMGA8RYUUwqrE4yqmWvAwBGP5d99Dq75JHBIGdWsGC+MZxENCc idtG3PbjCM8tTqaLFnJnEjymxWcHI6uJRHNdZZhrKCOoTER5oWf5awTLCApMze6K2a2m IDrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kIE35RsfAdfmPvEPcsGzl5k3eOYcySsNWpC7InGPXK8=; b=OlXK02i6WbEU4oqZbM/gziF3U18HjxhHZ661+XXVPDieRMtFfYLq7xkbNLvt4Md6J0 YSrWpO18IRYnaWQQZ9nuHbIKI9J64pntH8IBDDa7AxEgRHcbOBtp/LkrXDMxdYjYuFaW Ubjt7BqhYAkOfKdMtssvNID/XahsscFnSrHeW0RMFD71MR6lKpdK3KCnQfcMzE8vVTIV bR8LhCY47Z05U9UZKFYHshAlTAfJ629Ko0dp6+runBVP5RXKqOWduQ2SVApCbQqo8fBO v8QTC3v/5Nl/JdU326P3zehUhCpLcGzBQD1NZ4xiMAzPK52pggqOdAdDsjOD8v6PlDys qhXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="EMCiJmt/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 187si16790581pgj.348.2019.02.19.15.32.53; Tue, 19 Feb 2019 15:33:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="EMCiJmt/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729983AbfBSXbI (ORCPT + 99 others); Tue, 19 Feb 2019 18:31:08 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34205 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbfBSXbI (ORCPT ); Tue, 19 Feb 2019 18:31:08 -0500 Received: by mail-lj1-f196.google.com with SMTP id l5so15734588lje.1 for ; Tue, 19 Feb 2019 15:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kIE35RsfAdfmPvEPcsGzl5k3eOYcySsNWpC7InGPXK8=; b=EMCiJmt/ma++GI5luHEWAweINLW5BeG+23iPS+q4Rf/Xop3Rat0n9vgaRuiLL2XzGR jMTnTlMySwyLHogYwZHrJZ7qaa8+iEHNb8NfquvcSpIsUjZ0Jxab4ktsfq4KLQ8InTh6 ZB45N2QX4b1PifPwyCPbtWzppk6c/fEdB7yn4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kIE35RsfAdfmPvEPcsGzl5k3eOYcySsNWpC7InGPXK8=; b=ShTrjESwj4drdb3InEfJuO+2oMwRxpV1WwHK0Ab0tBIuuGSbwphqzMpTvGz5Bo7wIg 2IuKWYqGr5MbOsKwes0QkFHLhHl+lZr1jzXDkEPq7BhKP0LdmKBobCtNdlHPyLUaDLrF TuQdOhKi2tBUEcVP6jfWGq10ehlNCNHoZ0tuhbOJQDphnTP8l4V7rppzv5WBSPpT0bRo 9bSYc5dSeMSPqT8bibDsZQRI4Dvh/fptkJ9z6ZIsYOOHOBARLzloGNb2GGtHgpX9Jefv zMT9QAHgNyUxEhsdhcD7Na9lHMK2chYXXsFjyNyed2q1bvhfDl9ePxhEgZ4Ud/2HTdB6 mIBA== X-Gm-Message-State: AHQUAub5BbWoVEQAleVnng9SpDZh+xHQUugekXgK5+28uUujJ7ERO0zi lZimw6mA17W+/ygk7gLVX+xT+vLeEi0= X-Received: by 2002:a2e:9cda:: with SMTP id g26mr17416423ljj.48.1550619065766; Tue, 19 Feb 2019 15:31:05 -0800 (PST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id q123-v6sm4676716ljb.60.2019.02.19.15.31.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 15:31:05 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id l5so15734550lje.1 for ; Tue, 19 Feb 2019 15:31:04 -0800 (PST) X-Received: by 2002:a2e:6a18:: with SMTP id f24mr19628484ljc.97.1550619064118; Tue, 19 Feb 2019 15:31:04 -0800 (PST) MIME-Version: 1.0 References: <1550394300-17420-1-git-send-email-yong.wu@mediatek.com> <1550394300-17420-10-git-send-email-yong.wu@mediatek.com> In-Reply-To: <1550394300-17420-10-git-send-email-yong.wu@mediatek.com> From: Evan Green Date: Tue, 19 Feb 2019 15:30:27 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 09/22] iommu/mediatek: Refine protect memory definition To: Yong Wu Cc: Joerg Roedel , Matthias Brugger , Robin Murphy , Rob Herring , Tomasz Figa , Will Deacon , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, yingjoe.chen@mediatek.com, youlin.pei@mediatek.com, Nicolas Boichat , anan.sun@mediatek.com, Matthias Kaehlcke Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 17, 2019 at 1:08 AM Yong Wu wrote: > > The protect memory setting is a little different in the different SoCs. > In the register REG_MMU_CTRL_REG(0x110), the TF_PROT(translation fault > protect) shift bit is normally 4 while it shift 5 bits only in the > mt8173. This patch delete the complex MACRO and use a common if-else > instead. > > Signed-off-by: Yong Wu Reviewed-by: Evan Green