Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2010285lqb; Mon, 27 May 2024 05:13:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGcJG/Yp192b1pU2ykf33DY/O6DdouXB25+PkpHIbc5B4ZC7Hz3m/oxed+uySQC5a+/hpT0126jpYhRV+hUWu4UF8kFLsu7P/QjdHoQg== X-Google-Smtp-Source: AGHT+IG9/dc/Ku+YJo8MdCpXygy2a2pGw9IRYE1M/bqwv4d+j8vkr+zJ6DEd03ctvS3VCFsm5JlH X-Received: by 2002:a05:6358:904e:b0:18f:81e1:e557 with SMTP id e5c5f4694b2df-197e50cafaamr1161085255d.1.1716812004066; Mon, 27 May 2024 05:13:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716812004; cv=pass; d=google.com; s=arc-20160816; b=ljoRtb2STnRMMzv0hZ5UXob9z1Lp00L1uUN6NL+HLVdJUGQ5dkcVY9jjygJ7mV8mY+ Ks2FGE/JOaSISDUO4X9/Zr/SisKhi5Nm34hp0Z3XKhD5fiC6D0nTLqZUCZsJAUsC4Kp0 xJw1Ym9kgxygT9kjCF9SBWfQYwm3ICCOIR6Yt2MOt72X+2ZOlSWoX6w6LCsu4pE3KnqL 05P5+nB6mvNMrzwNbMlVw03mzsLmb5Ml71hPEoU1faM8nnp7z/bXxL8agFAHqvH6pC0r 85h/0jkO70uQRSXTIS8Z0UL7PWLoGmPM2YHdfUs2afUxV34VSm3s+lDjlDYm0z3z9KqX OjNQ== 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=tYCLFPjb0h1yqm7vG5Katct+n4zb6R84jNY6wsw0ugw=; fh=JZGFg8bQ/Qod1Vbzhly2JRf89Ajwo+ypvcRVmf8H8BM=; b=cO6mqA+w7j2mxrL7yv0rndRz22MCUHkVQkn1gcufDhxvPLAEr0biPADF4NSeTezsjo Jyj48zdZTeqvu6Ksy2JvaEHRCTFFvJZ+iy1e4LdyCIr8L0FIe+SVw/k77uES7tCOHTt8 /3RKVKwGf4eee+U9xa3uceRt91JN5ikXVgtfa5uCKd6WW+jNSkDQ0tgHQQPyv0Al02LA 7RxD8a9qqrdp0IuIo5vMdmvvZ9k7C+jt1XXhxs2rYfPd5fJLi9fJOdNUJg2hrSns1vwM AujLgFx99KDeRl2XgWhCXeKWBBahBXAcakMV9/lJYd5B3+1bT0ZRDXkCN+RNKgS5VfvQ hKKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@habana.ai header.s=default header.b=oiOfkJPX; arc=pass (i=1 spf=pass spfdomain=habana.ai dkim=pass dkdomain=habana.ai dmarc=pass fromdomain=habana.ai); spf=pass (google.com: domain of linux-kernel+bounces-190539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=habana.ai Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd51f38si754579985a.674.2024.05.27.05.13.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:13:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@habana.ai header.s=default header.b=oiOfkJPX; arc=pass (i=1 spf=pass spfdomain=habana.ai dkim=pass dkdomain=habana.ai dmarc=pass fromdomain=habana.ai); spf=pass (google.com: domain of linux-kernel+bounces-190539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=habana.ai 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C2E931C21371 for ; Mon, 27 May 2024 12:13:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5BAF15E5AF; Mon, 27 May 2024 12:13:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=habana.ai header.i=@habana.ai header.b="oiOfkJPX" Received: from mail02.habana.ai (habanamailrelay02.habana.ai [62.90.112.121]) (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 8A9A415DBB9 for ; Mon, 27 May 2024 12:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.90.112.121 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811993; cv=none; b=C2qUVoY77lBiDu+iuujXSV9nKShcPCAsCB5EhJ+EE4nPT7+hveMHMXmPrEshUBzytVUU0/bCVgk6L+sZ9hiTsR7liOYlP2ybLYZnmWDtpvudjtZLIUdS+xxHwdeSeIlCYtzMmGUlv5b9xQk6/3O8D3aw7KSxt0aw6//oZ/qGyxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811993; c=relaxed/simple; bh=jEOjfncRnHrY/GOzNXLpivOmaWg+BBdNPnztm7r0mH8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=SSbwEm3ylyO7Jb/2KdCOePcX8mGI5GrqRNNGCzVE7/igI9AXUIat0dz9LX7czdoimoMzAeVBcu12+y/g5zqBhqvF/0Toj2K6/NHTXgK5fjg8a0XQMbBkdvoaEVUrFuCofbmtZ4e3bujZCbWvxXBMtZtASa/MA0qUB00gh7dPoU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=habana.ai; spf=pass smtp.mailfrom=habana.ai; dkim=pass (2048-bit key) header.d=habana.ai header.i=@habana.ai header.b=oiOfkJPX; arc=none smtp.client-ip=62.90.112.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=habana.ai Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=habana.ai Received: internal info suppressed DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=habana.ai; s=default; t=1716811982; bh=jEOjfncRnHrY/GOzNXLpivOmaWg+BBdNPnztm7r0mH8=; h=From:To:Cc:Subject:Date:From; b=oiOfkJPX8EvLromWEhc+OBGh0jTo6HhFUurBbH+ItJWBQgulfLoxrTNFWkPllmHzC 4f5nPBaR4/YBIhEb++Z7iaQLecrROgCM2Q5zOsXJgEw1+kjP2EHyzmKz7w6se1/lq+ SJw4kMmWLt/U1UObkRwM3Q4gyzCHXB7aOtkVhXr/7vnssqQySbrH1SCB/s2F3+51Vt xTeG4KJOX7rdjMbooNAWbMDc2mQthgkI8pACSov7e0l8pMymF1C5VMTS6ZmeYfzhS/ B9N1U5T2Edvr9Km/Q8CNoUxdUA9oRTIjuYZCUJYvyC0bse39D5BGJUaEQgn9XlWzMA 30wkqU2xwtH9w== Received: from obitton-vm-u22.habana-labs.com (localhost [127.0.0.1]) by obitton-vm-u22.habana-labs.com (8.15.2/8.15.2/Debian-22ubuntu3) with ESMTP id 44RCCuar1921351; Mon, 27 May 2024 15:12:57 +0300 From: Ofir Bitton To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Igal Zeltser Subject: [PATCH 1/8] accel/habanalabs: use msg_header instead of desc_header Date: Mon, 27 May 2024 15:12:47 +0300 Message-Id: <20240527121254.1921306-1-obitton@habana.ai> 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 From: Igal Zeltser Struct comms_desc_header is deprecated and replaced by struct comms_msg_header. As a preparation for removing comms_desc_header from FW, all it's usage in code is replaced by comms_msg_header. Signed-off-by: Igal Zeltser Reviewed-by: Ofir Bitton --- drivers/accel/habanalabs/common/firmware_if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/accel/habanalabs/common/firmware_if.c b/drivers/accel/habanalabs/common/firmware_if.c index d1a1d601bde9..886b3c07503d 100644 --- a/drivers/accel/habanalabs/common/firmware_if.c +++ b/drivers/accel/habanalabs/common/firmware_if.c @@ -2093,7 +2093,7 @@ static int hl_fw_dynamic_validate_descriptor(struct hl_device *hdev, * note that no alignment/stride address issues here as all structures * are 64 bit padded. */ - data_ptr = (u8 *)fw_desc + sizeof(struct comms_desc_header); + data_ptr = (u8 *)fw_desc + sizeof(struct comms_msg_header); data_size = le16_to_cpu(fw_desc->header.size); data_crc32 = hl_fw_compat_crc32(data_ptr, data_size); @@ -2247,11 +2247,11 @@ static int hl_fw_dynamic_read_and_validate_descriptor(struct hl_device *hdev, memcpy_fromio(fw_desc, src, sizeof(struct lkd_fw_comms_desc)); fw_data_size = le16_to_cpu(fw_desc->header.size); - temp_fw_desc = vzalloc(sizeof(struct comms_desc_header) + fw_data_size); + temp_fw_desc = vzalloc(sizeof(struct comms_msg_header) + fw_data_size); if (!temp_fw_desc) return -ENOMEM; - memcpy_fromio(temp_fw_desc, src, sizeof(struct comms_desc_header) + fw_data_size); + memcpy_fromio(temp_fw_desc, src, sizeof(struct comms_msg_header) + fw_data_size); rc = hl_fw_dynamic_validate_descriptor(hdev, fw_loader, (struct lkd_fw_comms_desc *) temp_fw_desc); -- 2.34.1