From patchwork Mon Mar 11 11:07:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 13588590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DFD4C5475B for ; Mon, 11 Mar 2024 11:07:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GjrJQGmz5MBJT4/UqsNtce53nsZ0Umn/cTLcFYJfYWQ=; b=IQjt6p/fco7RmE Vnt3u3bb1A3U1UC+FshxiDZi79t0c+0WXvmLID1fjbOc+qNlqgzDbAMjTR0m/x7Fz6l4T9ceGDtYf aeAYtPl71M6LxUPzCH3pK9Pxl6uXfpvxBkrV3bJDlq9WaPJrFxIQMFY17wanuNQQa2xJleMrpUMvm pF46o3w2Q8Wc3Xpt3JbTzwe/J3iBeOXC5aswj/+wNrOpY0lSmJYxm/ADo6p059FoPewzEE3bYw9CW w2Cu4I6lpz4NaqAso2QwRWVkCtmBsTmuQihUgyus0JG1uG/YnLx3kyWYN0mKbLSsGOwMniiI8EVGC xi8x7rzAUxMWmhbk5CXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdV0-00000001CTw-1mY2; Mon, 11 Mar 2024 11:07:18 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdUy-00000001CTM-0wn8 for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:07:17 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-56829f41f81so4304673a12.2 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=lists.infradead.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=BFJm13pkRjwOCso3PDIxCRq00Rsooqy1/L5Lkr3igwTukWwIgPQwzhqPOlqUL1PtOr erjqKmQC1FDTa5WaI8JsSCtqqQ5dvIJK1VtX1b/GLCNpNKAJ3zGDAhJyUkZgHZqP95zf ZXpV8znIIZUkyx12MOcVY7AWuVdst6dTF5dNM4yEYSkVCKGEs8CThGyAAVbpvN8cxHuK +aV6FiUwUkWVbFyGMgkxj6UbYw5rfJeF5JdYDJ3nxIQdcELlwI8SKjXsAbzLzHuS1FBT 7uEYjWixoCpM2QvU/I+u8gD0qZslDwX5k63Kf2dppr4NFZzT5R9YeKfHAEVhShC9hHCB /6mA== 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=csFREaGrOD5hB+/WNgZGUfL5eWmbL+G835nIOM/Ks6l3JdGeEANjV0eq52aqYRoLCF fbrpS9M3PqYIyBu4ZF+o7AeKx6BKvNsB1FJDXzqcxFZvgiYDsC0e6w4q+5NgKFZD7/nS GcSY2cYSQ9eag0KTr6IuTa18rx4eogpoADqG5BrO3kmBOUmd0lkmZC1fUumJsGDCyb1E Qgv9TxcPSGRbWvHwW1ql+GHl33EpClxKNbgrv0ovCCBdsRMiJ8PX79T8jXc2sL/Zxxtq JjJZ7UY1U5HX3/neSMVieSWHQKJE4s1z6gEzMjJp/VoVddV4H+Bv8kHGvLELx6DqTPRl C5DA== X-Forwarded-Encrypted: i=1; AJvYcCWJywosJtg1p76Cj/HrLugZ/spKRte+g74Zzth6lIBn7xXQOFOYPeCfwQFZsZoHkNMJmpla08fLW0zrQ2ShYDAP45yVsSvEkeokdk1plmckT2GMwbk= X-Gm-Message-State: AOJu0YxYdUwFJw6jooXvZqSM25JOl003wFEn1a7YfH1fBSrnq76I7hN/ /abWe09p8bbppzZJ26qPo032JxbFHR/hXjgEZSuBGN/pwFh1NGoA7g9/VZO4M5Y= X-Google-Smtp-Source: AGHT+IHkT/8COS7ltQFjrA4huqIOhMcomaTyFCwkuAWJsY2EJsLFmGtgTZsvrj0L3/jdm88MJ6WGkg== 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240311_040716_295047_016358B0 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; }