Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3833322rdb; Mon, 11 Dec 2023 00:53:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IExN+3TmTpMpxvO9V8xvQEI4Kk0b1zuIj3YtCqTLNhmk9nAtxikPaDsoqKvmi72xtLHgbBA X-Received: by 2002:a17:903:245:b0:1cc:6cc3:d9ba with SMTP id j5-20020a170903024500b001cc6cc3d9bamr2169289plh.4.1702284810281; Mon, 11 Dec 2023 00:53:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702284810; cv=none; d=google.com; s=arc-20160816; b=vSeC3UQmFn5ugA6Oup7R2AnAS8WyrgnzwLrKyZYgF2anmhWZLRB/6onEXcayNX7V8a bgg9HtIBHR8p7sHXr71mdW9YDrvCuU/vZuUqvNAKyAPudyziV1GN2mMTPlpxWm22DZ5w vTf1uF4UIDm5VdxUxOUC0yVAbtKlVnxTdt14/1SlyAn4w1sG1Epq5ZlkdzLBDPHAWKtI 2tsu1ve12YJhVXKY4Kj8G9T6fc+9Ni7dM3H1iqdlBfRk7Q2xp0vWU2HrnAvr7sk+eTdX AqqJiBNPpauuipFeKVE2Is5GOMibW/mGg3uxKMkL/q83E/2gozlbIf+jDEDJCk5IxEZH 5aeQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=S8Q7Mv3mUGNGzzvuC/1WOIYCEeIgNGLe2Uxin8KDTig=; fh=VQY2xGP/Vx0Vc3JkeltFPICnzdoMBg2uKSjoSFfJNNE=; b=Ga4hKYEn8EDjEGnjD3oHqNTPJshiqf6zkY8YhFw37E4d7jUlOzcIDziw3dV4A5NstY NvN3y8D8uKS566gW2wQJyKt1D+TWN2mF+tzNw8LC335CV2DB2Z1E8GuL7EwXKy9iPa9q 9vpO0EuINOzFTTu6WY3yVEVvhCnar/fvf5NJH1gxAXRqI+D5uFLqfs93RyOclp6SsVnZ PydC3o03/KLD2ymJ8iZgnNxXA5Ko9JkBeZcbr1MSj5wlTg1KnY3ynkGf/2C7BHfgLFTP f9K85dNr1enJB+X9gJt710QYgenNMOUAdFj59yq1zeCxC/IuF4gFpM8nEx5w6eVUdGvl L98w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=JHJTPgOu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bh8-20020a170902a98800b001cc23d2bb92si5539315plb.650.2023.12.11.00.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:53:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=JHJTPgOu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3B06D8077581; Mon, 11 Dec 2023 00:53:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231877AbjLKIxQ (ORCPT + 99 others); Mon, 11 Dec 2023 03:53:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjLKIxN (ORCPT ); Mon, 11 Dec 2023 03:53:13 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2879BCF; Mon, 11 Dec 2023 00:53:15 -0800 (PST) X-UUID: b469c76c980211eeba30773df0976c77-20231211 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=S8Q7Mv3mUGNGzzvuC/1WOIYCEeIgNGLe2Uxin8KDTig=; b=JHJTPgOuYIt1ikFYTXlsJD4WRlmRJZZ5/+qQKKGqY8Meolo+fJ+J+dW0fkwmGMwFoRBMYEfibULHW5dECRMCT/swoCPUJL7HT8fZHDmT9E/x51eh5REZhVuogb4/pawnf6HPiVNOaA+IxaRvUvjw1Dlk2LHBPpQjj0U4yzUGST8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:4ae37146-c255-4ae2-9f69-ec06d7ccaa37,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:1a700e61-c89d-4129-91cb-8ebfae4653fc,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: b469c76c980211eeba30773df0976c77-20231211 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 116807410; Mon, 11 Dec 2023 16:53:07 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 11 Dec 2023 16:53:06 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 11 Dec 2023 16:53:05 +0800 From: Jianjun Wang To: Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Matthias Brugger , AngeloGioacchino Del Regno , Marc Zyngier CC: Ryder Lee , Jianjun Wang , , , , , , , , , Subject: [PATCH v2 0/3] PCI: mediatek: Allocate MSI address with dmam_alloc_coherent() Date: Mon, 11 Dec 2023 16:52:53 +0800 Message-ID: <20231211085256.31292-1-jianjun.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,RDNS_NONE,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Dec 2023 00:53:29 -0800 (PST) These series of patches change the allocation of MSI address on MediaTek platform, which uses dmam_alloc_coherent() to allocate the MSI address. Changes in v2: 1. Add a separate patch for pcie-mediatek-gen3.c to prevent break the probe flow when MSI init fails. 2. Change the location of allocate the MSI address to prevent break the probe flow. Jianjun Wang (3): PCI: mediatek: Allocate MSI address with dmam_alloc_coherent() PCI: mediatek-gen3: Do not break probe flow when MSI init fails PCI: mediatek-gen3: Allocate MSI address with dmam_alloc_coherent() drivers/pci/controller/pcie-mediatek-gen3.c | 126 +++++++++++--------- drivers/pci/controller/pcie-mediatek.c | 24 ++-- 2 files changed, 83 insertions(+), 67 deletions(-) -- 2.18.0