Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1979060lqg; Mon, 4 Mar 2024 09:10:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWSPiJx0Yl8Y3Ra5NIMHaGjxv7o9kaP8HY0tLBSH4yO65Eh4S6miGrith8RTdeWaejsGG2nyLr9h9ycp5qRc/UwdaNXPc5vhDUWozRoVA== X-Google-Smtp-Source: AGHT+IHsaep+ZWXkqRaA/W/YTS4IyHJVvNOkACpBShE1qv+0VwMMbtq8GFE+nBZ+4bQEwG+XH8DM X-Received: by 2002:a17:90a:c404:b0:29b:2779:2a69 with SMTP id i4-20020a17090ac40400b0029b27792a69mr7174890pjt.36.1709572232366; Mon, 04 Mar 2024 09:10:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709572232; cv=pass; d=google.com; s=arc-20160816; b=hjznyb789fRRecSc7KEEWat3mc0f2hKSIa2e6/UbYlkv4JxanxbiLU6skDyzS3BGix 3dycHlF+IvYsZod/bt3pZn5N69GIB5KExtA9aNgcZzPN1qOhhBm6rr5yMDahA9PCghjV IFxeXECXbIilmV6LzdUJ6ihc6gqBiOneEgbinA04tNRy0QoXaTs9w4LBc6hCRLTFxVBn IZLIU0SjFzFGeRwFgRv8QpHYvAdKiZQV9u35vfOnJ+E+E2pEoMQ8/8jbHHG16o0fUAoi IBu09Fz6eFSVD0BMNYfTWL7L8ADQa/eyNZHnEE/awC7C1xgfj89fTL1l0EA5npyla0gD viNg== 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:cc :to:from:date:dkim-signature; bh=PqRPKZNjHF6LQxTQzsZsR6mDKYqRIdKeBumiSD6Yt3g=; fh=FhDb9nm4o9ojrcM3mLNvO1+eSmY4sKGz432NSasjwpY=; b=sxvrPwzmshV8gB+d9OUAyO1N2drg9uIUWY/YRbYiP6E8KncuG1x5Y+jpplsDDW9pl4 YZ16fYSXvZv7rC90HEVRlbwSvbDMcX4nJWecXAtDA+ypvVyy7fa5jTdR4g4Aun4bncn3 rCZkcP4Ier7q5wvOcEEYwrDvbkfAi2Y0jQcs4hgQ33R5SlQWcXIXN9C9xzr6pD5bz62X 2362aHANaNcw42n9pd0vAr0cDnYAvl6UTaJ5npqHiXGn8UWn2vfj235qad4+YfJGj4vC 7tK+UOVkC+5IU+ui/4QamSfi/iINebM02823Doo5m8J5uHf2bP4cFqUh7RaPSX0lEtRI Elyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nIQXKEjQ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-90685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id sb13-20020a17090b50cd00b00299f2cf5bf1si8780635pjb.175.2024.03.04.09.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 09:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nIQXKEjQ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-90685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 3E16EB23FE6 for ; Mon, 4 Mar 2024 13:53:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E87A73EA78; Mon, 4 Mar 2024 13:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nIQXKEjQ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 A4EE73DB9A; Mon, 4 Mar 2024 13:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560410; cv=none; b=Mz5OnVoQy3zdSdrygKI+pvHPoW9pdB3jE5G5ad4+MuD/1stX3da8JAYQrkG+Az3OkCgBW5G2WBhq71e8buLvyeKMup3iUbfG6K0L4XXOV8PJGJYIsk1jV0Z7q0cs2babg6zZ+T1DMW1OqUl8SIrdPiNw4Um6jLkqnqHt3f27jfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560410; c=relaxed/simple; bh=ct6yeXiMSgF37VG2k47ZlEma0v/nfDSkmTtol+8MQnI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BDz4PTlDkvN0PEbFjIz/IoLE1zl95kSqF66Wyjf5GjqyiDLcyX1H/u5+2UZJBupAisjFDlXm6V50iR+vHyKCBMfBivj8yr4Ucpjw8UUOOMPkSWbdrf77Qid/19PXnJKJnlBXx2YMXJ3rkIP9IC+IxdNUwAnIxAo9//UXj+HUtD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nIQXKEjQ; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709560409; x=1741096409; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ct6yeXiMSgF37VG2k47ZlEma0v/nfDSkmTtol+8MQnI=; b=nIQXKEjQK/p9H+KmkyNSHPWuQFYnSAou8hozdJ65f/mmMbqOQuJ5rFJl /5Le7PlL5pQhzUffB6bbW2jdKMP1qnBVSojFzHs+EGdt2EbrM5LrmZPzH wX9KQZ6e4iKN/V6FF7cuJAP90lGFTCVjcvgMUF4/0G8nDRAXFNr9JpUCK vzYA2sc31p4unfkSp7neA/+FsOXWHy8oQPZ9yT8U/CMJFiDUWrU+f6YiM 2yxrKIm2ZQCX9i4DEpVS0YnvulEHjAG7+o8lXsvxTUFQK0NJDxBNhwNDg EfieTv+28Oc2g3wHjaiA1UuMKcrKlamsPadvSrwVbA2fLhkJvra1Rf98X A==; X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="26515948" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="26515948" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 05:53:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="13661839" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by orviesa004.jf.intel.com with ESMTP; 04 Mar 2024 05:53:25 -0800 Date: Mon, 4 Mar 2024 21:49:12 +0800 From: Xu Yilun To: Marco Pagani Cc: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , Jonathan Corbet , Greg Kroah-Hartman , Alan Tull , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fpga@vger.kernel.org Subject: Re: [RFC PATCH v5 1/1] fpga: add an owner and use it to take the low-level module's refcount Message-ID: References: <0720eb91-72f9-4781-8558-8a1b0a3691c2@redhat.com> <4aaa131a-4b64-4b86-9548-68aef63c87b3@redhat.com> <9a9d4018-fd65-49be-9e0a-1eecc9cbf15d@redhat.com> <08ba8bce-0ebf-4c8f-952d-a6665dc7fdf9@redhat.com> 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: <08ba8bce-0ebf-4c8f-952d-a6665dc7fdf9@redhat.com> > Just to be sure that I understood correctly, you want to split the > changes into two patches, like: > > a) add module owner to the manager struct and take it in > __fpga_mgr_get(); move put_device() from __fpga_mgr_get() to > fpga_mgr_get() and of_fpga_mgr_get(). > > b) add the mutex and the unregistered flag for protection against races. > > So that (b) can be reverted if try_module_get_safe() will be accepted? Yes, that's what I mean. > > > [...] > > Thanks, > Marco > >