From nobody Mon Feb 9 02:14:40 2026 Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3548C6CDC2 for ; Wed, 3 Apr 2024 08:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712132830; cv=none; b=EIEI4ElgnPzzOVBhRHIzWfDT/1o9nHExe2I4M4nAXxXDB+rF3apSaVTu9kjTwQqDpYIpiwTJjc3U10qrMOHuLz0vHwpcx3u3z13X3aHlGfkHVsXlCDORQzp6vbEE61NLLBDq8gzgS7xHAAhCjNL3xZ3VX/vvT/ESrun/Vry3JBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712132830; c=relaxed/simple; bh=5Zgoa/lTop3pWi0GPKnDlpM7KZeP+t9NWazbbQD3v/k=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BsCu8mI07c7xPQSiS6zSL9hYAZri+oRyV1KM/Qj1/FcteVrqELdgS/nOJc1U9+EytSEmaLaCBp9j4yTqx3hEw/KydbceaEZIWAM7Nnjdk1pwHn2rpsAXu73mOGe74a50aQbZ0f5tjcpjZ2jJiwsa9If+aV/Wv7tysbFCIQZG1co= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4V8d7y2YQxz1R8dx; Wed, 3 Apr 2024 16:24:14 +0800 (CST) Received: from kwepemm600004.china.huawei.com (unknown [7.193.23.242]) by mail.maildlp.com (Postfix) with ESMTPS id 52D0918001A; Wed, 3 Apr 2024 16:27:00 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 3 Apr 2024 16:26:59 +0800 From: Huisong Li To: CC: , , , , , Subject: [PATCH 1/2] soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute Date: Wed, 3 Apr 2024 16:19:34 +0800 Message-ID: <20240403081935.24308-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20240403081935.24308-1-lihuisong@huawei.com> References: <20240403081935.24308-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) Content-Type: text/plain; charset="utf-8" The hccs_get_all_port_attr() is used to obtained the attribute of all ports on a specified DIE from firmware. However, this interface doesn't ensure whether firmware reports the complete attribute of all ports or not. So this patch adds the check for this. Signed-off-by: Huisong Li --- drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/k= unpeng_hccs.c index 9ff70b38e5e9..bb69a95b5f2d 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -556,6 +556,12 @@ static int hccs_get_all_port_attr(struct hccs_dev *hde= v, start_id =3D rsp_head.next_id; } =20 + if (left_buf_len !=3D 0) { + dev_err(hdev->dev, "do not get the expected port number(%u) attribute.\n= ", + size); + return -EINVAL; + } + return 0; } =20 --=20 2.22.0 From nobody Mon Feb 9 02:14:40 2026 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CD3F6CDC2 for ; Wed, 3 Apr 2024 08:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712132826; cv=none; b=AFdhHAR26Y1g4XXXiW2PwMdedlIke86B7fkoWm1r8CbVCe9K3QHpufqt4kwOggecFHvyDNIRxt3RDnveaJQY9tkGnQmVG3KpNjo3j1HpKIcRzGviOSlnh3SGfaKAMPMj7dGEkLteKBbjDUCslSx2q2f+O2z/KcW9m/5DJ8+xrbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712132826; c=relaxed/simple; bh=kugs8ESmC1pdY+BI2C3ANeHjBPI72ZntlRu16FxY+qk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s4gXZ9LpVudKzvvQF0j2N+UafAU4iChuuoZ2Il/j1ToUSVHd/T8Bmu1KprC2kdzKkozFe/K1jcDJn4tOB3+Ydc4UGfY5HXmHHQOiZPa6VRm4Bp4jnZSTZCN9+yqU7/ce6ISPFNF7gbjJQG9cOLJ8pb1Gu4eRZFsGecU6tnLDVfY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4V8d7z1mhcz1h5X0; Wed, 3 Apr 2024 16:24:15 +0800 (CST) Received: from kwepemm600004.china.huawei.com (unknown [7.193.23.242]) by mail.maildlp.com (Postfix) with ESMTPS id AC148140133; Wed, 3 Apr 2024 16:27:00 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 3 Apr 2024 16:27:00 +0800 From: Huisong Li To: CC: , , , , , Subject: [PATCH 2/2] soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC Date: Wed, 3 Apr 2024 16:19:35 +0800 Message-ID: <20240403081935.24308-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20240403081935.24308-1-lihuisong@huawei.com> References: <20240403081935.24308-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) Content-Type: text/plain; charset="utf-8" The kunpeng_hccs driver depands on Platform Communication Channel Driver. If PCC driver is not enabled, this driver fails to probe. Seeing as how PCC driver depands on MAILBOX. so replace MAILBOX dependency with PCC. Signed-off-by: Huisong Li --- drivers/soc/hisilicon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/Kconfig b/drivers/soc/hisilicon/Kconfig index 0ab688af308f..4b0a099b28cc 100644 --- a/drivers/soc/hisilicon/Kconfig +++ b/drivers/soc/hisilicon/Kconfig @@ -6,7 +6,7 @@ menu "Hisilicon SoC drivers" config KUNPENG_HCCS tristate "HCCS driver on Kunpeng SoC" depends on ACPI - depends on MAILBOX + depends on PCC depends on ARM64 || COMPILE_TEST help The Huawei Cache Coherence System (HCCS) is a multi-chip --=20 2.22.0