Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1021918lqb; Wed, 29 May 2024 19:24:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSfhNuC/hvTSBinYU0A5zoK+Dlen4kXkeTsqaUER9u33dkD/gunaPSL6OK93ZaWMVAE69E1Ff4OanfDcLCfbC2AUh6khi7n2ZsDmRDYg== X-Google-Smtp-Source: AGHT+IEPtlGRgAJlHR2qJTRexTXiZ2zvnaN9Zn7z9Kqbwk/xxVwmKdJxEiX5sQ1tR+JJmhzJeizD X-Received: by 2002:a05:6a21:6d97:b0:1ad:7e4d:2ea2 with SMTP id adf61e73a8af0-1b26451a0damr1305181637.4.1717035845104; Wed, 29 May 2024 19:24:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717035845; cv=pass; d=google.com; s=arc-20160816; b=KVzKxyX8gl20Uc6F3kU3pvqhCbpc3I+1ZV6XPf0StwUI/ZO/lGuB2PzHUjKNWRNDfW v5O5Gb/xLmzagG39o6WyOurryymsnK8KrsDzwkKN+/cyBBoZlw2ATXXLUVAzRU3qqs5w reeKdirvBKA73aAlvfZUzM/Vmamcp0fIPBH4ZXlMumZy4HQrzSt+BWVf4s2u1pyzV1A5 e7BC3GYZvDYC97Jqw0MH7SmkouqeAHviZW262etV+1rE8n9kILSVwGKomH4RWHb4+aWt sO6+TXrsSqCuMuL8A4a1Oj7R73ePBS+BLc+zsh6FJsCDXa/zx9+NOphomOPjKhXG/Npx 0ayg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:to :from:date; bh=xNscyXFccFPd8zDtIvfbQmzBIjob2Ws3b/KCDVuppK4=; fh=PTscWTIHcoR2vyQtw5VESTy9e97dUqI8eGwoqj4vbiM=; b=ZL+3J0Qmn/9UwW/Yzwh3M1GL5NjZ5fN76FicClsN4Fi7FAp/5AyIwpKsQF9R3QFp2i klziLcyyK/znK45PG3alqHF2UDGK9h8hCssi0dVcvxD96NWguDwI0gjoypTRhU3JseXH fAMQUvu8Bntam3/KkanhNztUg14sCvWfNvPBS5radabIrI0ggINX8YSjKm8Py4CTN1aD CYRdXIQqRAUqiQrptkZnLDJ1EqQ2blT/nF+6D6rb1GXOpx7QdRKy//kNbgvlgwm01M23 UpWvfn5iiNKtYdPgNOd5mrsfLumBTyTHaYeAnBxWmzX8EHSwlhesL5LkOBM+Ck6SgkMJ rtsA==; 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-194880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194880-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a777cf4asi682619a91.50.2024.05.29.19.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 19:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-194880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194880-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2CA01B24DE5 for ; Thu, 30 May 2024 02:15:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96CEB210FB; Thu, 30 May 2024 02:15:04 +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 AF298208A9; Thu, 30 May 2024 02:15:02 +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=1717035304; cv=none; b=MeSXI0NV0E5q37jCEe/SoY+qWJzXnn47eOcXNxW3Ef6yFHvM33uk0VYTSAAchnlpRdpF090uNSWg/B2gUsANFY9+m8Xf8jGFbVxXCeGYlzYTeMzqNVRLYZBAwRpaLj5MhF45JmaLPIr4Deps+tddPIozGiZUZzQCiwAEms8TEkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717035304; c=relaxed/simple; bh=3/qKbynN3yd31VH9tB9RkMiH7LQj1z+unggA4X0foD0=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QdU6DsmWlVHt6mJd4uCBilVY4dvkqo8L0oCik/mmYK/XNUQ4pZTnl/EmF7bCuGWrS9x6pWiMGRdG20aMLH718hy06seGvmminJNUfjxjlGgIPX5ES1fUush/+Ld0INk6xqacTmE+wu6UGiUKtLy8uo0YjXcD6DOCVqJmOSmk0Hs= 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.97.1) (envelope-from ) id 1sCVJd-000000004gC-060q; Thu, 30 May 2024 02:14:53 +0000 Date: Thu, 30 May 2024 03:14:49 +0100 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Srinivas Kandagatla , Daniel Golle , Dave Chinner , Jan Kara , Christian Brauner , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Al Viro , Li Lingfeng , Christian Heusel , Min Li , Avri Altman , Adrian Hunter , Hannes Reinecke , Mikko Rapeli , Yeqi Fu , Victor Shih , Christophe JAILLET , Li Zhijian , "Ricardo B. Marliere" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH v2 4/9] block: add new genhd flag GENHD_FL_NVMEM Message-ID: <991e1dc3d7a08355a0e746129ecad18df5aa2405.1717031992.git.daniel@makrotopia.org> References: 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=us-ascii Content-Disposition: inline In-Reply-To: Add new flag to destinguish block devices which may act as an NVMEM provider. Signed-off-by: Daniel Golle --- include/linux/blkdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0a8c3478a462..c3365856e67b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -81,11 +81,13 @@ struct partition_meta_info { * ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not * scan for partitions from add_disk, and users can't add partitions manually. * + * ``GENHD_FL_NVMEM``: the block device should be considered as NVMEM provider. */ enum { GENHD_FL_REMOVABLE = 1 << 0, GENHD_FL_HIDDEN = 1 << 1, GENHD_FL_NO_PART = 1 << 2, + GENHD_FL_NVMEM = 1 << 3, }; enum { -- 2.45.1