Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp198465yba; Fri, 12 Apr 2019 01:36:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/bIjZDVN6YLRr62Oj9RQ3HSnHk3W2cLQz95QH5DbAK+SLtzBimTelrQlbCY03tg/R7hFc X-Received: by 2002:a17:902:e01:: with SMTP id 1mr56271859plw.128.1555058190801; Fri, 12 Apr 2019 01:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555058190; cv=none; d=google.com; s=arc-20160816; b=ZMaHxb/f+fUufPCkU/mnCexm9jNBAaGyRJMOiUBEzo6rehtldXfrfn2PUChUKN56cU 6xVXO3jRKO4xO00q1uN5T84TqKaWP6QqmAF0RQgFqZeArzil/kmfeVSVR+5KZM4Ft+Ij gCd210gABCGPKhtiPujYcuuXgO10+IezvcrtgDl3kpLQPqP9meakZweJ37oovUJCrvlF ryitnKHGr49wpf3XYly0BJ6xQv5FYjPcTmr5VE9ggJ95gHz5iofy7LkqILMDDM8IIIKp Itn3KQFW+mCVKKeeP//5JxhLGF1GWSRPR5/2Z3baVYMD/vQO6qZq4qPjCnjrhsjHAiqm AVZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=tihGF5jurDcVNgTrzVPkP6FnaGR6og8OayLAp3RWDJ4=; b=F49fXmxC6dzxNOR1IqAqhEvjyLSbWVtRhfZzygzcX6AQZAcyQb1smFxGECyvgCvaGH uKAwk+ftzpJhSUa6Jseya8vH0RcKXIGmGeCdMkvkJPbu/LzbvQlqwlVNb2mlll//gvKO nM4DmZimeyOkZzXbAZvPVzMRbpOyiWc5r96v3WXI5svg+vX6v7ulDEg7LomvzmZa9xT+ 9ORVM+A2LIB8h/MlHZWHJtvziiHBu7/V6wPuguNXzM3qViquQoY5RMRrl0Bi8s99zxfG qL6/0Zj8NFepIfFiF3wLG1Vce9LklY3MyYlKUSTd547qT9Jp+UtdZTpVtqd5SeuuBLsT g2Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b="NuqG/CGr"; 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si39483182pfb.67.2019.04.12.01.36.15; Fri, 12 Apr 2019 01:36:30 -0700 (PDT) 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=@nxp.com header.s=selector1 header.b="NuqG/CGr"; 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727340AbfDLIf0 (ORCPT + 99 others); Fri, 12 Apr 2019 04:35:26 -0400 Received: from mail-eopbgr30068.outbound.protection.outlook.com ([40.107.3.68]:59521 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725973AbfDLIf0 (ORCPT ); Fri, 12 Apr 2019 04:35:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tihGF5jurDcVNgTrzVPkP6FnaGR6og8OayLAp3RWDJ4=; b=NuqG/CGrs6qHyZdxqJ45BT6h82zvXeyEmXuWj8LPojhlEJr7T50OK+ClQARKE5Ex03PK578W4/EXVBEMtxFP0wnYPIHkjjdkibviK51zMbX1ybYjJa1bDVLlm8c3tzf4JNlJVx0h/dlAOXzKNfbtwMRlynBoXqJKIT1lPVPVNmA= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB5926.eurprd04.prod.outlook.com (20.179.3.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.14; Fri, 12 Apr 2019 08:35:18 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::f9db:ed86:614e:460]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::f9db:ed86:614e:460%4]) with mapi id 15.20.1792.009; Fri, 12 Apr 2019 08:35:18 +0000 From: "Z.q. Hou" To: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv5 01/20] PCI: mobiveil: Unify register accessors Thread-Topic: [PATCHv5 01/20] PCI: mobiveil: Unify register accessors Thread-Index: AQHU8Qqo0Gg7x0A600WGswFC0azSXA== Date: Fri, 12 Apr 2019 08:35:17 +0000 Message-ID: <20190412083635.33626-2-Zhiqiang.Hou@nxp.com> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:202:2e::23) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6504bd16-5ecb-4110-ead7-08d6bf21ca21 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM6PR04MB5926; x-ms-traffictypediagnostic: AM6PR04MB5926: x-microsoft-antispam-prvs: x-forefront-prvs: 0005B05917 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(136003)(366004)(396003)(39860400002)(189003)(199004)(54534003)(478600001)(36756003)(305945005)(52116002)(6486002)(110136005)(186003)(7416002)(3846002)(7736002)(6436002)(50226002)(54906003)(316002)(6512007)(6116002)(25786009)(1076003)(26005)(86362001)(105586002)(8676002)(81166006)(386003)(106356001)(14454004)(2501003)(6506007)(81156014)(76176011)(5660300002)(102836004)(256004)(53936002)(71200400001)(71190400001)(2906002)(68736007)(476003)(66066001)(99286004)(2616005)(97736004)(4326008)(486006)(446003)(11346002)(8936002)(2201001)(14444005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB5926;H:AM6PR04MB5781.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: C/2teK21dTiB3plgh4J12QbicPMumCfrMoT+TZgchfERogqoQaUyohIRyMIyPt8I8+960JbvKdIUPQS8Wr/95y6y+vXeEeEKVHcUGs8RS4BvpcX6jFRMRlW1CtUCMETvxIBaYO2rKGH7n4zrXCp+7dw8dX8sNf4fHHyoIoXsmPERV+nxjFXuF/OkuVEIhT+TW918Ck0FEA43sQJBc4ijuuPNPSWgU5nDGJIeir+D+SYwm77RrYPldjmbIC0ym0+e7eQCUwGhcJgfFV3jWM/gK99odnUM1Aquk1FKRSikv/xdiojnA7R6XuM6obK3zEVJ2oP6Cr2qoT0yUfhYzzMorH1yilRHCeE3llKFWBbSrR2lK30bayZ/2imvXN8WazawzP7cHlVZbVVdbTwQaAtO/UkmdJdSH2EN3MrDW41X90U= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6504bd16-5ecb-4110-ead7-08d6bf21ca21 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2019 08:35:17.6358 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5926 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSG91IFpoaXFpYW5nIDxaaGlxaWFuZy5Ib3VAbnhwLmNvbT4NCg0KSXQncyBjb25mdXNl ZCB0aGF0IFIvVyBzb21lIHJlZ2lzdGVycyBieSBjc3JfcmVhZGwoKS9jc3Jfd3JpdGVsKCksDQp3 aGlsZSBvdGhlcnMgYnkgcmVhZF9wYWdlZF9yZWdpc3RlcigpL3dyaXRlX3BhZ2VkX3JlZ2lzdGVy KCkuDQpBY3R1YWxseSB0aGUgbG93ZXIgM0tCIG9mIDRLQiBQQ0llIGNvbmZpZ3VyZSBzcGFjZSBj YW4gYmUgYWNjZXNzZWQNCmRpcmVjdGx5IGFuZCBoaWdoZXIgMUtCIGlzIHBhZ2luZyBhcmVhLiB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