Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp324809lql; Mon, 11 Mar 2024 04:07:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrF5HmyToM+EZ2Cc4+H50XhP6TMOqHVh+yPny0TZFamVj7X4bzpg/tosCGi1NDhVKHj7a9gJauivIME/x7U7rcsFtVs0D3FfRnwe+K/w== X-Google-Smtp-Source: AGHT+IH4fVOIyxWicCJX23gY9qu3yv5VNyzemj5qfy4yvXg6KVs6Q9RHnWcYCMG8m5M/MaDxTgqK X-Received: by 2002:a17:902:f542:b0:1dd:8a51:7b17 with SMTP id h2-20020a170902f54200b001dd8a517b17mr5104379plf.8.1710155244647; Mon, 11 Mar 2024 04:07:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710155244; cv=pass; d=google.com; s=arc-20160816; b=ZZN9AeLwyTl/uXZsTQEYCzd2vgdZQl6pUaO0s8oPi24x8QIQyI/2bOy9XVEKvXShRW V+KvY++W15wFhKv2AMR8lr3lGJAxxiDSuhQ36FcbRqjh1shNy5FtszFBCyis7zIGiP33 nkIaI65CszzRM1Z7KBwrASECWA7CgL7FuXvLqcREr+RntcX+x6jiB3ogjSv5qU1zael6 qSOng1zJlD5wwJDJ2rQJS1CMFbbHFznWbtK2aMEhSAEVyD28j2wW/lYImpXgBGf9IJXn WGSERUeBSPuw8DIOBdidL3NmtbCeE94On3x1RPAQSqhw/iv8Dsl/YDIihzqSpvxMUu0W ++yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=M/U246wolXDSM1/ZcSZeXGHTTK2nDt0fXBaa0zSz5qY=; fh=KdNTUAs7q//odPXEGMnVo6YCCmicZg2bCMCGV1lHh/8=; b=vfb1b3Pu9kcpIiMTaB+oSG7XD2jvE2s61sHMpVMeVyt//KkfkYUAHLDwAyDbf9Dbf/ fzyOGaEDd6DDgBdEN+Qdu7cGPx5jvo69lGLVafY+gg8xPpe3DFZ8Dc6/72D8/nAh5DX2 Csf9YU03ajgPaiBsZDfF+3oXRIMgXNCHeeIq33hShnt4jzTcACDTbQ2Oe+m7zrc6LfoJ 4m/pSLPkKJDbvIK7YgEppma1rhB2kAEKG7dUpLa4RXQnEM/4Wj+oS1qI80XffADI6YLr wylexMM7GF4xZ7+0enqrbMii+yra1sK9RyGxRWfpkoENijhrS3D0BrZbDaZ2iJqCMNbT EhOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=syi7ZpMy; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-98738-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98738-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u5-20020a170902e80500b001dd996c546dsi2014334plg.287.2024.03.11.04.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98738-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=syi7ZpMy; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-98738-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98738-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 42C11282179 for ; Mon, 11 Mar 2024 11:07:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 447CF38DEC; Mon, 11 Mar 2024 11:07:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="syi7ZpMy" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC0D617578 for ; Mon, 11 Mar 2024 11:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155236; cv=none; b=cokNiGwel3rdZfBnGlFWXiphTO6nDwb51wjOOyVqEepcghmJQwnG0dHtnk+CaqEuuCKnBCH49jox4KaeItiy2Zs9e/LsAh6UNpnF5YddjL6J/nlAhDMbO5ipDy8bE5zN+wN1QvTPNKjBRRM+ibOp45o5YLPCfADD3YNbaYNUMG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155236; c=relaxed/simple; bh=W91ZrmkUCWxCeZ+4LJQ7adpppMkeWqBS7Bc3hAOZz70=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=cGu9beDGTmLr+bKgCKE10p7VC7DGUGmVlgBpH1X9EPu4lxBEN95kjTt78EyyN2xBrLI48IWe6c05x3t1zK61NSq1cJfj39ul4DWaockNmz5msBIXOt5BUvzNEcLDHmm7F3CvpK0EfZx8SVOwfsHHc1GzhZ3fkwu9OK2SBYGi6Y0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=syi7ZpMy; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5684c3313cdso1519015a12.3 for ; Mon, 11 Mar 2024 04:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710155233; x=1710760033; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=M/U246wolXDSM1/ZcSZeXGHTTK2nDt0fXBaa0zSz5qY=; b=syi7ZpMyi4haWZoR8QnvDcU55YsKvq5CQ+0PUUhFRHjcK3Ojao7vv8pIVnF3lnn0CY ybTX3k1ei6L6TkKdLC3tMVMFCAoDCpEoeYj+3pQFaTXjw2UnEh5rXqukOST1SrJcUrqy LXLLdZ5x1lCdM6LcfwfL0+LpSYX/6gLyW8NFfyZNd5QTDH5aPZ0cFP6SvUGKqjxtUKn/ lXv2UHoFZ65TMK8g/n39oANLYe+/lj5DdNS4342qjLjpFjGglWt6TCOKPB8RqZ3O8ENT v5yGPdqS5HT4i6FzdZgu+8adaDXlydX1EXiNP9cpdgdaU1sVfVTCiOkEN7ae9VOLQ8jr z7HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710155233; x=1710760033; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M/U246wolXDSM1/ZcSZeXGHTTK2nDt0fXBaa0zSz5qY=; b=qhac2DXc0Q4JwKHAPFu3MWGvz6jbQXyNmnchiJKvIv6yMR3vQr6JelR7POuP/8l0K5 qbrdy2eOR1fmPncZVU2knEgxpqzXiWTnKu8VsKahLt4vJnro9fec7UE3JwLwWJGdO0vU XJb8xC1MriyWsWza8JYVsojYLt3KwIey5fZbcWSz4FGEVs4mmFxj+ECz0MrxX1aqw3lu vO9nt7o8NKNbhlRaXUPQZpJmkUyhsmIyBSUazXYUBRS+l7IQfDlxF7LRQdW1zZhllqF9 UEfOaDL60XJDbNwJ8450dFlQ7efoK6c9yJy1DjDLZ8976FGkqaq60yZ+rHqFBSMmgEVU JoYg== X-Gm-Message-State: AOJu0YyInaOs09Jd95me92C+/Qyhn0WTqR57vOFiuWOYJ6YvRUkgbsz2 3NZwCycUuq4m+aeMrhIOZ8nfSJtdM/gN+dlcgD6Ndlih5WHmKID0y1yB+j4owAlJPg521P9HdWh e X-Received: by 2002:a50:a45a:0:b0:568:32cc:f808 with SMTP id v26-20020a50a45a000000b0056832ccf808mr4328969edb.15.1710155232283; Mon, 11 Mar 2024 04:07:12 -0700 (PDT) Received: from localhost.localdomain (h-217-31-164-171.A175.priv.bahnhof.se. [217.31.164.171]) by smtp.gmail.com with ESMTPSA id r24-20020aa7d158000000b00568525ab2e8sm1436581edo.55.2024.03.11.04.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:07:11 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla Cc: Marc Bonnici , Olivier Deprez , Lorenzo Pieralisi , Jens Wiklander Subject: [PATCH v2] firmware: arm_ffa: fix ffa_notification_info_get() Date: Mon, 11 Mar 2024 12:07:00 +0100 Message-Id: <20240311110700.2367142-1-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit FFA_NOTIFICATION_INFO_GET retrieves information about pending notifications. Notifications can be either global or per VCPU. Global notifications are reported with the partition ID only in the list of endpoints with pending notifications. ffa_notification_info_get() incorrectly expect no ID at all for global notifications. Fix this by checking for 1 ID instead of 0. Fixes: 3522be48d82b ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface") Signed-off-by: Jens Wiklander Reviewed-by: Lorenzo Pieralisi --- drivers/firmware/arm_ffa/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index f2556a8e9401..9bc2e10381af 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -790,7 +790,7 @@ static void ffa_notification_info_get(void) part_id = packed_id_list[ids_processed++]; - if (!ids_count[list]) { /* Global Notification */ + if (ids_count[list] == 1) { /* Global Notification */ __do_sched_recv_cb(part_id, 0, false); continue; } -- 2.34.1