From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 71F9F175D50 for ; Wed, 22 Jan 2025 05:23:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737523430; cv=none; b=NDzHXl40ynZ0God+cme9hFhBuRn6+DzOEhxto3+ckPsZywh7AlMRNcWhpbKhT0N0mYHlh4SkZeR7HNf7JJkmhUxNakGzOfgY/ocyRAfSevBgLd4ii2tB6f/Po2hQ8kkGh0KAwGSS9WxW2Op7wD2IjX1vn4JDaVUJYaCu4wHzcr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737523430; c=relaxed/simple; bh=yF9WQy5jXc8VbAbwILi0h+1DMgYnT7ubCUNbcuq7u3w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=T5ih1uTHOcdvcFVnFpyPZRtOjIP1T6ppHGrXAeyBWoy2Q/+T/RL7kY1uShEOLNTEkEgZHhlC6Vs2foZYmNbALzqBW9jzuOSUj3H77lTA9Pke3RgCo3h2t6JpzwHZ6YNM5l5pY77uyoJL3s6J7hUgRKU4mGiyH33ldVHPYPHsZ2k= 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=UuyyCXxy; arc=none smtp.client-ip=209.85.214.174 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UuyyCXxy" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2165448243fso140700765ad.1 for ; Tue, 21 Jan 2025 21:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737523427; x=1738128227; 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=YntZz1Mt/wtlO4/vUgbqSz5D1yOoCBwe8qT49y3en44=; b=UuyyCXxyHPJB9JRCE1BYtWDdvITAtci2qw+LLtcGmNz0fHzXYBcgYa58Xz4UOcNNZt Fq1I+w0fQ8bWsgjwX+grtBVd5wscBUQuK/YAe+UaBtWLIopzl8GA/uajkq0n+OgjnG3U X55KVKIPaKUWnXD89ygU+fb2hZXPRwW+OMf+RGtFRrnfhCzDiHYR5WSf0zYCQWHzm7M9 E3WwKz/jRQIWX28rwzEVOJ0lOb4kPm8laYzrXgWJAPPmf1iNzg+aHkB0ss2KFOERzX9J 3PHkJlVgGobetOg0gHIIHNiV5JJWZ3L4V+dH1wmQO5VgCitD7lV0gofqPdq9HdIya+0K SE3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737523427; x=1738128227; 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=YntZz1Mt/wtlO4/vUgbqSz5D1yOoCBwe8qT49y3en44=; b=p614U4PIwyvS8ZlAUe5UT/ku8vzwrRQU+Qfvu7Ww3l7JZ81VG+QM6w1X4UUjS+hXiA t37FFciTzpoguEwRfgqEJxEfzrpIKOcB/Zj0lX9vfU61gTqCyQjPEBj1MqkbSWznKfka LhPUEQEfRQFlg7BTfQbKQK/cFnTBmY4OiATGr5Xz15+7BQzEU9EtKdVVlIvGNKrblMT9 Yysiw2c0vqB6KMpTxHPHMcprFWhK+vLDdPgOM5WUO+lbDbpX5xWnEE6jUfzImYFLYthe vn1g7poZgJoZ4FZlsdDhxzGYs5vZcWb+8puV1fDmRnsJAjTaBtPHe0cqkELGF1a6xVt/ NAdw== X-Forwarded-Encrypted: i=1; AJvYcCXBVg+y09zA3GFA526A7h20sFCf5tNeMDA0E8+EaZXhTK5Cz2Asj+9X2ZvqDFvGF8Olf2V1SC73Ie0LbAI=@vger.kernel.org X-Gm-Message-State: AOJu0YwWPE7SdtN54SB0ET/BE3keSdA7RZHwbS4rxIhhSTlFnT2psgGG pr+5XPVRBfVR+uCVnI+Cs0OzLWEUAdhP9EiavVxaILKOAxjz2v+92LVk8JjbzGI= X-Gm-Gg: ASbGnctmdCv/Dwm2QrcwI01LalcMXKoVoNNo9LSfOJb0enKDFNQMfy+ozk1cmqP2e1V oDcrGu2iQm0aJtELhCMTssXAP5URBiKeSYIge0ZwMyaNVb+d+tVrgANCasRmcktuB7v8RjyzVAv iUPnifUJAjvD4Vhpy41typW7zhtmrcqAFnJBS95yOImRB/iLo8y575fGFVXaegDDJ9mNuRd0r+N TVoFHq96aDPxxs/QqCCkwt2WL1oTu5cF1rG7+tD/V4QT/eB51NwPo9Q19Ei1QPPzjT/bjXX X-Google-Smtp-Source: AGHT+IF5NiznMvHmJ56DNofog6mUGrXroKcpo9h4kJw0sm/S7G5ZplEwIxWReVDfDx4BrGbiIDsDeA== X-Received: by 2002:a17:902:e88f:b0:216:48f4:4f20 with SMTP id d9443c01a7336-21c3551437emr302333535ad.16.1737523427653; Tue, 21 Jan 2025 21:23:47 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2cea073csm87367825ad.48.2025.01.21.21.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 21:23:47 -0800 (PST) From: Viresh Kumar To: Sudeep Holla Cc: Viresh Kumar , Vincent Guittot , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bill Mills , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] firmware: arm_ffa: Partition info can returns self as well Date: Wed, 22 Jan 2025 10:53:42 +0530 Message-Id: <0bc7e1754db0547c6c041ed178cf24ca326af2d1.1737522729.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Partition info may return self partition as well (specially with newer versions of FFA spec), skip adding it twice. Signed-off-by: Viresh Kumar --- Rebased over: 9967e35eb1cbdb8d0c0bae3f54401d806700e6b6.1732255888.git.viresh.kumar@linaro.org drivers/firmware/arm_ffa/driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index 34d9a54b6a77..b824c7c024fd 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -1424,6 +1424,9 @@ static int ffa_setup_partitions(void) xa_init(&drv_info->partition_info); for (idx = 0, tpbuf = pbuf; idx < count; idx++, tpbuf++) { + if (drv_info->vm_id == tpbuf->id) + continue; + /* Note that if the UUID will be uuid_null, that will require * ffa_bus_notifier() to find the UUID of this partition id * with help of ffa_device_match_uuid(). FF-A v1.1 and above -- 2.31.1.272.g89b43f80a514