Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp209279pxf; Thu, 11 Mar 2021 01:49:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxC6b6O4MuTzt6DJwmtoRrM9S0cP0yAoD9cIXVI//qT36/Rpf5I+kWu33b2NCe55+1fbtLn X-Received: by 2002:a05:6402:1383:: with SMTP id b3mr7647823edv.374.1615456196405; Thu, 11 Mar 2021 01:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615456196; cv=none; d=google.com; s=arc-20160816; b=dCsLrTJR32CDbF+GXcR96Ia1lTy+3/OJgbO5ZrMq+Q0kS6ohmQpoZRvo4fBoJtgKJV CykbPUGSzjg3DggpqpAdW/OgfutT2xmIRUxFGluiRiGypnbOg82LuPxi/bfG0Kk7E+GO GINpJb3Y80J7zmOTqUgp8RdDX5G2/DYRyZAnFO+SDUfMSPiOh4j8ViickTi5MXv2ld75 PYgm34puPAbw0U5sUeSa6F0jS2grvtiBYI893RBZyEbFS6P3QiTYnbiQyGi7PWw1wJO/ IkoBCmTjFR/qxl1ojj7PiNqdwgaE/4FciGfoTH+jhFp+Ov6Bf/zTTdSgqcM8Ti1v3phI JUNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=RNnASkbqhv8ODVj5ReFqDIzkkJKHV9MWUz02H5UDhV0=; b=odRneIdHCSddNKHgKZZEHlVytbbo04TbSwnxPxRIrNFHUN0TSoiOp20BkV1sBVVni/ Gz1GXASZvQBJ/5QYMjm+wz3ARVLobjeHud3ZaVyibG2A8eLvRPbLUePAViNLjqH2RcHg 4SdsSffQjFeQqzoXaKLPTR+X4Om5HhaQoYCZxHailsWVUyGfndAIG/qcblrTPZVS0TvE Nfea1+WOGZGSs6I0Q/TtgeEOVaYHsljSAEhZIc7QaT3IblGaw23aN7D1LP1mlG4QQWG5 v4XndPlYKLCOveMthMPwdw5jclIuiGY4EQUZAexzxBd4av7SdrZBHaWR1up6d36gQG54 00Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QjgGCaYJ; 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 dg2si915573edb.136.2021.03.11.01.49.34; Thu, 11 Mar 2021 01:49:56 -0800 (PST) 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=QjgGCaYJ; 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 S232097AbhCKJsI (ORCPT + 99 others); Thu, 11 Mar 2021 04:48:08 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:22066 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232078AbhCKJr5 (ORCPT ); Thu, 11 Mar 2021 04:47:57 -0500 X-UUID: e815e2896fb546e58ba5ab0c1064d138-20210311 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=RNnASkbqhv8ODVj5ReFqDIzkkJKHV9MWUz02H5UDhV0=; b=QjgGCaYJOe1peZaZHiPDwcpAnJBubRkweCWEdGJ9NgJ8lRVB5LT7LycrhEQAAPUGyBT2mbKBfj5TEhjK+4bB6UxGkqSLu+DwzbNevXw0qoyf++g2qtBGhqRjNXxHGtJAfLNjfwPT74zjobpBqb8UulW40I4gkuL/MTgvxehrr4Q=; X-UUID: e815e2896fb546e58ba5ab0c1064d138-20210311 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 757726739; Thu, 11 Mar 2021 17:47:48 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Mar 2021 17:47:46 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 11 Mar 2021 17:47:45 +0800 Message-ID: <1615456065.25662.60.camel@mhfsdcap03> Subject: Re: [v8,5/7] PCI: mediatek-gen3: Add MSI support From: Jianjun Wang To: Marc Zyngier CC: Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Ryder Lee , Philipp Zabel , "Matthias Brugger" , , , , , , "Sj Huang" , , , , , , , Date: Thu, 11 Mar 2021 17:47:45 +0800 In-Reply-To: <87a6rbxs4w.wl-maz@kernel.org> References: <20210224061132.26526-1-jianjun.wang@mediatek.com> <20210224061132.26526-6-jianjun.wang@mediatek.com> <87pn08y3ja.wl-maz@kernel.org> <1615358929.25662.47.camel@mhfsdcap03> <87a6rbxs4w.wl-maz@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 75906D7FE3E9CB7C6B4B63E7D7430F2D0076DFB9B07E89AAFCC25501E7DC0BD72000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux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IGFuZCB0aGUNCmludGVycnVwdCBzdGF0dXMgd2lsbCByZW1haW4gdW50aWwg YWxsIHRoZSBzdGF0dXMgb2YgdGhlIGNvcnJlc3BvbmRpbmcNCnNldCBhcmUgY2xlYXJlZC4gVGhl cmUgaXMgYSB3aGlsZSBsb29wIGluIG10a19wY2llX21zaV9oYW5kbGVyKCkgd2hpY2gNCmlzIHVz ZWQgdG8gY29udGludW91c2x5IHBvbGxpbmcgYW5kIEFDSyB0aGUgc3RhdHVzIG9mIHRoZSBNU0kg c2V0LCBJDQp0aGluayB0aGUgTVNJIG1heSBub3QgYmUgbG9zZSBpbiB0aGlzIGNhc2UuDQogDQo+ IA0KPiA+IA0KPiA+ICAgICAgICAgICAgICAgICAgICstLS0tLSsNCj4gPiAgICAgICAgICAgICAg ICAgICB8IEdJQyB8DQo+ID4gICAgICAgICAgICAgICAgICAgKy0tLS0tKw0KPiA+ICAgICAgICAg ICAgICAgICAgICAgIF4NCj4gPiAgICAgICAgICAgICAgICAgICAgICB8DQo+ID4gICAgICAgICAg ICAgICAgICBwb3J0LT5pcnENCj4gPiAgICAgICAgICAgICAgICAgICAgICB8DQo+ID4gICAgICAg ICAgICAgICstKy0rLSstKy0rLSstKy0rDQo+ID4gICAgICAgICAgICAgIHwwfDF8MnwzfDR8NXw2 fDd8IChQQ0llIGludGMpDQo+ID4gICAgICAgICAgICAgICstKy0rLSstKy0rLSstKy0rDQo+ID4g ICAgICAgICAgICAgICBeIF4gICAgICAgICAgIF4NCj4gPiAgICAgICAgICAgICAgIHwgfCAgICAu Li4gICAgfA0KPiA+ICAgICAgICstLS0tLS0tKyArLS0tLS0tKyAgICArLS0tLS0tLS0tLS0rDQo+ ID4gICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwNCj4gPiArLSstKy0t LSstLSstLSsgICstKy0rLS0tKy0tKy0tKyAgKy0rLSstLS0rLS0rLS0rDQo+ID4gfDB8MXwuLi58 MzB8MzF8ICB8MHwxfC4uL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