From patchwork Thu Mar 7 09:21:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 13585245 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 69CCCC54E49 for ; Thu, 7 Mar 2024 09:21:42 +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=HtnHyDONRTB+qJZZ0+IXkHz5s369fSJh1A7HsfLl8jw=; b=0scCGkV2Y5jQov s6E/YdAGUSeg5sUfw07Dp+DfPl7yJeZz5W0ea0gQByARLwIhQZbLqBra90xTLBVQrYkZB6wmp3y5W TB4LF0wZGW9UnjsaQkzauk9tyd+w/7PMYt+oNhHvXVOPLcw2TiVEekqvJ/BXNXKwIwjoaNBRCm/23 oJXZXYfP1O0KQ46EYL0YfzozMwJUgOFRF9OK9dmdnw6PZ02oLLOFTjVEgY4DQ83+0GF6zn3k0gwgt 2YuDF/lx70OGfRKcsCN/B0Ntq1WXyKd5bGKtCi2GjjGlTftURhz16AmZeDsI4TxUFbVq8Ue58G1Di c0toYIvRpil8PUF9mkbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9wL-00000003pQ6-0xz5; Thu, 07 Mar 2024 09:21:25 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9wH-00000003pNt-3XbB for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 09:21:23 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so881410a12.1 for ; Thu, 07 Mar 2024 01:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709803279; x=1710408079; 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=MSg3oiWFtppc35EPshcXwhJatcffMq34NPA9WcvRkJ4=; b=HzIK/1s45EDba3zSp0mtjouULu4G13DEGVENtRufCgm3DHPSwUEv83GxhvzLYnAvw0 eGZU2DQ3H17mykKuIdUge3TkDEqyPVck8DESXwR4/fiKq1OcnFp/Oqvy4JJbAbYOZTNE CYZtyXbYTskYHw/wFXxYweGrQDJh/oAg7/lCzAtri8fldnENp8ZLJeoENIDNwnEjvR6i p8ocYSU0xJXXnYZazG88roOD58YxRgAxe/gEGAhaaZq/rlfoi34o+lHKePPudGDK5BBX n8qHn392+UOMuMhrucg2RxdoncCf4HTZPwHMqeWEA/yDPKb8F5LmRr0nrhe2iWl3yhFQ XRcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709803279; x=1710408079; 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=MSg3oiWFtppc35EPshcXwhJatcffMq34NPA9WcvRkJ4=; b=LkJzLtpkIJ1CJcBRSfKvIYVY2VUD9uKqKcroD3YWlUH3jkijJxy157vTlj9CIGlOgs /OVIIiOoCpj1m1X2lHt0pCvRpTUZWaVwWcZxLRNDE+AE8GebLKxmFEnzZ1y4HDHW/+7O xqbL5Y4onLc7X1VTw94cdKw/E+L5xyR4QtI3TZGnC6EKAqgi/G2aIIpqbvt02OUqqUpb VG6aE+TvzW7S0ty4qLs0C6eTH5bjxXkpxUCJqSndLP7yA2yGFYN/xMDbHvLiMK3xwzTo Cr1ZICg4oZtdTTUgQo8e47XFO0U6LUvEAd24SeTrJcTnjgDwIMHdax6qUzGGopZn9giP pNTQ== X-Forwarded-Encrypted: i=1; AJvYcCVvY+/xTbqR2mlMsJs2rUZSyFW081gl5G+e5Ig9QOxd23tvvmzQXdOdFjhnjmCphtUAPqRnKWFIAZA+qnk1cs5VlLylaEiKXmvCrLJInx++tN3/tHc= X-Gm-Message-State: AOJu0Yx41YWaxd5EKboo/q/qMpc7C+yr9yM6HWpaBdBZdaZD0X2W1nr6 +aFxs19eDMyRFAqftcnrPJH25vz487OWguZFdSUv9Um+cvoVJQ5p4EsaVRee6MY= X-Google-Smtp-Source: AGHT+IFG49439I8OGhNKMiXoTIiwH2fo7jWvi0IkRLnDND242P5GtEZVZ/wFaS9l7pM8oL8DqWRjqg== X-Received: by 2002:a17:907:367:b0:a44:1ed2:64a3 with SMTP id rs7-20020a170907036700b00a441ed264a3mr12098018ejb.11.1709803278740; Thu, 07 Mar 2024 01:21:18 -0800 (PST) Received: from localhost.localdomain (h-217-31-164-171.A175.priv.bahnhof.se. [217.31.164.171]) by smtp.gmail.com with ESMTPSA id f26-20020a17090624da00b00a45c2b4f228sm1165342ejb.43.2024.03.07.01.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 01:21:18 -0800 (PST) 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] firmware: arm_ffa: fix ffa_notification_info_get() Date: Thu, 7 Mar 2024 10:21:04 +0100 Message-Id: <20240307092104.937440-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-20240307_012121_931186_76FD1B31 X-CRM114-Status: GOOD ( 12.94 ) 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 retries information about pending notifications. Notifications can be either global or per VCPU. Global notifications are represented by the VM ID only, or 0 in the absence of a hypervisor. 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 c183c7d39c0f..ff1f37a4b28c 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; }