Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp155669lql; Sun, 10 Mar 2024 19:37:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXvR5QWJhVcXI3ndETl9bb9JMbEooBeeVrRIXfoPz8jeJcPUEwQk9j3uBuburpqzLrDje0Dw1gecqYSGuvO2oTUONsGdox7jWOkg5UCAw== X-Google-Smtp-Source: AGHT+IFtMQAE4tzjOa7kogJHxExsvws+75zeOIvfL4XBvXxMgqdb78O7k3DouC3UIGobXLll4ipv X-Received: by 2002:a17:902:9a09:b0:1dc:6775:a350 with SMTP id v9-20020a1709029a0900b001dc6775a350mr4199354plp.58.1710124664210; Sun, 10 Mar 2024 19:37:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710124664; cv=pass; d=google.com; s=arc-20160816; b=bfpp8bkXsQO23zbzK2pS3B3139kpfa3hftMsrwO7mFVzubsO5ykAWm6aXqXi8ZfDpN 57tVuuSPgY5OBam15To0Ug2+EtPgwiXWlrtgMeiprKQbF2QVTMzXxBYEZw5mbKOjbLw1 f4LrPah8skjgxB5jsHNW9FTiUjOxloalYcPHicLR+kQt6L5wrd/Bqg/hYmBI86uKF/H7 bFqiNoyAdRAfIdTPEoGuPyPPU2BZFTKhdID/IGaz455iyYFobTDjTS8QYEWnXBtx/97T 07jFKRe9vKNWJEfCpk2kGqiiD+1TIQvgUXVMVuaJq1o+CUJTInbm6WT4klMqBwkX/3hD gmPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=wXfC3zDoqhhNFtAn+xUh+3FvDLkIZJva60FMTOFtRL8=; fh=A7h6n4mq5UtcDBTtvuH343c8CfJ2LpnMWArtbEuLRT8=; b=oxpXk4IeSOQ2K/zGIokC2xyuan8TwFHLdebQbLf9uCVzAFtaGT9OCZygSg9cMVkKbf +Oc67H/T5rvw+wJ47pDYnLRqii8G5F3nKh5G/YjHNhZoQUArDD5WGa6I1tQw9hn0xccC KWt8xVEjsUG3JkMCNPnltEFjvLtUKZ4imdr3Lnpm3hnSGmjFpQyzLmOcNDoWnlTWX2Ls HOic9Z+xQx8XnVDeHcESr1pvJJikE2ScPKJnw7RzA+vYS2IBi8r4fVH9NPuT/sIzTaYu L4n3Cbog++nsSmlEmB8RCTUsmMh6SK7AGAUyt+LHzrPnW603632/Tl2qJzS2rEpbgkUx e5Bg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-98422-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98422-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m1-20020a170902f64100b001dd8ff9701asi2043681plg.304.2024.03.10.19.37.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 19:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98422-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-98422-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98422-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DA1ED2817A6 for ; Mon, 11 Mar 2024 02:37:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9FEA23A0; Mon, 11 Mar 2024 02:37:36 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 61C491841; Mon, 11 Mar 2024 02:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710124656; cv=none; b=AgWy/Y6ryxstFtLX4bwUFpQl4PZ8rLBI2QJex0IpOQKtUF0mfOky8dFVYpdhIy5FW6JpOCMfZcPC2UrBnUDO49nxsUr9YYQjXYlxixVye1Aioi5j/pTLmb5OttfEep6EPd1rzP++qKmy1ZaRgFtQkMADgDZ5ydTfcBKGOk6ylrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710124656; c=relaxed/simple; bh=KkWPgs33qgoq499jSSM0dfHvg5p8RlHA+Lh4J5L3mKo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cJUI9zs+C9xpyjSTTEe8HyyZTc1lguZ9uQ9DHRerkNoabkQHVGHoC/0db5UsesbgHX0lTvpr+AxrBHV7JhXTbGHQTHaKudUoYhaNJWtmgI5I5QfE74y41W18NPVSSO2GXEYu9OWzzYmJPekLka4fCv+8Oj08VX7Or0aCpPcgymU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rjVXJ-0005rO-36; Mon, 11 Mar 2024 02:37:10 +0000 Date: Mon, 11 Mar 2024 02:37:07 +0000 From: Daniel Golle To: Richard Weinberger Cc: Miquel Raynal , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-mtd , devicetree , linux-kernel Subject: Re: [PATCH v7 7/7] mtd: ubi: provide NVMEM layer over UBI volumes Message-ID: References: <82ceb13954f7e701bf47c112333e7b15a57fc360.1702952891.git.daniel@makrotopia.org> <20240219120156.383a1427@xps-13> <1209094181.98490.1708899174329.JavaMail.zimbra@nod.at> <1754825522.38834.1710105437883.JavaMail.zimbra@nod.at> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1754825522.38834.1710105437883.JavaMail.zimbra@nod.at> Hi Richard, On Sun, Mar 10, 2024 at 10:17:17PM +0100, Richard Weinberger wrote: > Daniel, > > ----- Urspr?ngliche Mail ----- > > Von: "Daniel Golle" > >> Finally(!), I had enough time to look. > >> Thanks for addressing all my comments form the previous series. > >> Patches applied. > > > > It's an enourmous coicident that you are writing just now that I found > > a sizeof(int)-related problem which triggers a compiler warning when > > building the UBI NVMEM provider on 32-bit platforms. I was just about > > to prepare an updated series. Literally in this minute. > > Should I still send the whole updates series or only the final patch > > (as the necessary change is there) or a follow-up patch fixing the > > original patch? > > I have just merged your fixup patch. So all good. Thank you! > > >> > >> I have only one tiny request, can you share the lockdep spalt > >> you encountered in ubi_notify_add() regarding mtd_table_mutex > >> and ubi_devices_mutex? The solutions looks okay to me, but > >> if you have more details that would be great. > > > > I will setup a test build to reproduce the original warning and > > let you know shortly. > > Any news on that? I've tried for days now to reproduce this on recent kernels and fail to do so. Ie. when using regular mutex_lock() instead of mutex_lock_nested() I no longer see any lockdep warning with linux-next. It could be that I'm chasing a lockdep ghost... > BTW: Is there a nice way to test this with nandsim in qemu? > I'd love being able to test all ubi attach code paths on my test setup. From what I can tell 'nandsim' doesn't have a way to be defined in Device Tree, making it unsuitable to test the attachment of UBI in this way. However, QEMU does support emulating TI OMAP's OneNAND controller, eg. as part of the Nokia N810 hardware supported by qemu-system-arm, see https://www.qemu.org/docs/master/system/arm/nseries.html So we could use that and modify the device tree in Linux to have a MTD partition for UBI and 'compatible = "linux,ubi";' set therein: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi#n84 If you like I can prepare such a test setup. Is there a repository for MTD/UBI tests to be run on QEMU which I should contribute this to? Cheers Daniel