From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57D6FC38159 for ; Wed, 18 Jan 2023 13:28:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CB5C82FE7; Wed, 18 Jan 2023 14:28:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="Ala9xdHn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E59558481F; Wed, 18 Jan 2023 14:28:26 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2044.outbound.protection.outlook.com [40.107.95.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F3B98091A for ; Wed, 18 Jan 2023 14:28:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NMsawhywYfmfHBWDCHVzvza5ATTbd8gE1LwOMAeUGh9GXyVwglC8THos6VljkL/YmkB5yk1SGkEO9/GVof0WCV6pPI2p5s7BUpUIDQYBcZIiLMtGMSNsoOF3O8HuYWxyxiHXYrGUggVFTSok1GYRQsUy6j8i8GZSbEivwnk1vbHb0i8P7Y0HLDuQAKFUHMdvWAszhkUIw5++xDtX7Swu++UpwYqzwiW9A2Cy6i/IezVcGHOcy14KzvnrIPKzsiGc2KqHboRZdQ+MTQEQNDUwmb4c1z6Cde+rKd5x9XEIwXL6tr97CwmZReKMcK9YpNaZBT+DEbPO7qkJu3iovpakZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vpLzLSY1JdseauXpxYlradRrsGdhg4Y/AwAv6YfduOw=; b=YVw5xvSUYtCpwkTtKPIQ4SX4INSEyzrf+8R/lj7+V3ZfnMPxqAScK27HFmFB36XaOFkfZ/hMLmuJ8H2KC5nJ1RB2qkjLLAramO4FOA7/lAL73nFOdgQ0LQfIcs7wSyQQC67HiD25WYiuNrJjJK1opTWpFi+EdbaI08U3p1oS/YPaZXmogDK2SKUg9zTUJV8ix3t2wWHMl8/vN1cpqt2ZV3v93xuGUuPe4tesSfS9uATFI6tuuGonmybGNAgOnnUjbeEEVN9EqtBr4FrOKA5WMuekQy1bFMLoSqQ4S1yquBcoBqz4py7dZiiad+ItMFCSL5ju4EsnOxGl8lrE2afmjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vpLzLSY1JdseauXpxYlradRrsGdhg4Y/AwAv6YfduOw=; b=Ala9xdHn11qUAYgppdOlP+bth2tfRNEGsi2S1JnyHNG8y8wl5ca75a2EJPx97QRTOwCydGI00wypVCYk+t69G/arY8sSCmxQxxWETyN167o80wXr+QRe6caz2n3aGZtRXpyDepdjjIZpjeN6PktEIZ+LVG+ivI83DPfBaILaAKs= Received: from DM6PR14CA0072.namprd14.prod.outlook.com (2603:10b6:5:18f::49) by CY5PR12MB6346.namprd12.prod.outlook.com (2603:10b6:930:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 13:28:21 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:5:18f:cafe::98) by DM6PR14CA0072.outlook.office365.com (2603:10b6:5:18f::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 13:28:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.13 via Frontend Transport; Wed, 18 Jan 2023 13:28:20 +0000 Received: from [10.254.241.50] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 18 Jan 2023 07:28:17 -0600 Message-ID: Date: Wed, 18 Jan 2023 14:28:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: Jassi Brar , CC: , , , , , , , , Jassi Brar References: <20230102182532.2411125-1-jaswinder.singh@linaro.org> From: Michal Simek Subject: Re: [PATCHv3 0/5] FWU: Handle meta-data in common code In-Reply-To: <20230102182532.2411125-1-jaswinder.singh@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT022:EE_|CY5PR12MB6346:EE_ X-MS-Office365-Filtering-Correlation-Id: bcab51f3-6605-4c8c-6f43-08daf957de12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RtygQhdToEt9p62X3Hl0I+m8mYqcJ3CSTSdJh6MesZk9R7tnZcb98wRZ0kIT5xbZHkkNx6EMt27uHdOAsrp3bbMstaq/uM7e/QH6dNUcHSD3w1HlPZ9Jz4gL4x46x/fDGo6IJyE4FoIu5SIz/5wYe0L55tJT8Y07JZJhevlq82W04dGPdLib7BF/d9DDP/Q+t21DbqWBe9RA02wVJTdWIEh3ZGAkXQXvxXMizbWrg2W/c6rSCPIKS+MIV7qk8hi0434av0XcJi4yqvYDGV0tRBQH/rEr4SvhynF8Z1KxpVOAXa8u7k9AdKXkve06wWbOmctuGWGII3hAXUB785VLf1zVKj0hRz6IDHAeoOpJdhLOXoTmWG/fV7i70pCCtA7FDeDdXdjaLXtY4ngWDdfV6dOBUg7WshpWwEgxsBtyABXYoNupU80f2/X9ea+QOT3tj+elmD+5WdrGmbX+fCTgzo0NQ/4mjRXty9WzGFCQd+iPioQOlf2Xn3Ow1qXdiDo8QMYIVcKCzWvW0zA/t0L3qkTERpcUXI9nUtM4YmF6zu4aFyNWJ7Y/GJG7IM9J5fdkWyuLRYg9nA17cyN+HB0Bgw6XxQhhtbOtH+mQAkz5xWgxbInVv4xfC2uFt1eJOfIZR+/dex6i0rhF6+zOr50rVQFlOZb0qeGb0ZNPptZk1+fAWKVQCmoIMXokqKjgz2sSZY6qE95lgBaNW3a2y14ElDcQeRJn9g3DBBZcUWwV6u92DClfmF1jr6tKv0LOMB+vJj0OmZJ/+XCYINYwdGtne8iBW+waO2t2UVC1WHvjPlA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199015)(36840700001)(40470700004)(46966006)(70586007)(70206006)(110136005)(54906003)(336012)(16576012)(356005)(47076005)(316002)(81166007)(2616005)(426003)(44832011)(7416002)(82740400003)(40460700003)(40480700001)(36860700001)(2906002)(5660300002)(41300700001)(8676002)(4326008)(8936002)(83380400001)(86362001)(966005)(478600001)(186003)(26005)(16526019)(6666004)(53546011)(82310400005)(31686004)(36756003)(31696002)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 13:28:20.8942 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcab51f3-6605-4c8c-6f43-08daf957de12 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6346 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi, On 1/2/23 19:25, Jassi Brar wrote: > The patchset reduces ~400 lines of code, while keeping the functionality same and making > meta-data operations much faster (by using cached structures). > > Issue: > meta-data copies (primary and secondary) are being handled by the backend/storage layer > instead of the common core in fwu.c (as also noted by Ilias) that is, gpt_blk.c manages > meta-data and similarly raw_mtd.c will have to do the same when it arrives. The code > could by make smaller, cleaner and optimised. > > Basic idea: > Introduce .read_mdata() and .write_mdata() in fwu_mdata_ops that simply read/write > meta-data copy. The core code takes care of integrity and redundancy of the meta-data, > as a result we can get rid of every other callback .get_mdata() .update_mdata() > .get_mdata_part_num() .read_mdata_partition() .write_mdata_partition() and the > corresponding wrapper functions thereby making the code 100s of LOC smaller. > > Get rid of fwu_check_mdata_validity() and fwu_mdata_check() which expected underlying > layer to manage and verify mdata copies. > Implement fwu_get_verified_mdata(struct fwu_mdata *mdata) public function that reads, > verifies and, if needed, fixes the meta-data copies. > > Verified copy of meta-data is now cached as 'g_mdata' in fwu.c, which avoids multiple > low-level expensive read and parse calls. > gpt meta-data partition numbers are now cached in gpt_blk.c, so that we don't have to do expensive part_get_info() and uid ops. First of all I have strong suspicious that this series are pretty much two series at once. You can look at https://lore.kernel.org/all/20230102182532.2411125-1-jaswinder.singh@linaro.org/#r Where two 3/5 patches are listed [PATCHv3 3/5] fwu: gpt: implement read_mdata and write_mdata callbacks [PATCHv3 3/5] dt: fwu: developerbox: enable fwu banks and mdata regions I think you are maybe updating the same cover letter with previous IDs. I would recommend you to use patman to handle this properly. The second issue is that you are sending patches from Jassi Brar but SOB is Signed-off-by: Jassi Brar And Tom said in past that they should match. There is a hook for it to check it which everybody should be using. That's why please fix this in the next series. I will comment other things in the particular patch. Thanks, Michal