From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757124AbbJVKNF (ORCPT ); Thu, 22 Oct 2015 06:13:05 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:63524 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754669AbbJVKND (ORCPT ); Thu, 22 Oct 2015 06:13:03 -0400 From: Arnd Bergmann To: Eric Auger Cc: eric.auger@st.com, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: Re: [PATCH v2 2/6] vfio: platform: reset: add vfio_platform_reset_private.h Date: Thu, 22 Oct 2015 12:12:23 +0200 Message-ID: <4144159.DC8Yilf9Tr@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1445506922-6005-3-git-send-email-eric.auger@linaro.org> References: <1445506922-6005-1-git-send-email-eric.auger@linaro.org> <1445506922-6005-3-git-send-email-eric.auger@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:1Ntm4khsIs/aaj/utF1pPl2s3bt8lX/BrQFij1kLG9qWWQueMCb 8FkB0iuW6hQFtXW11thqKSclywTkD1e8f2kd/CcOhIvEEmbdy/+AqEFF1dvfT1K/ssUC53e GU08KkIuvBZAVoFMcICHKelvvUJlCQVNu9QBt4j4XQPR+0mp8gRzO+vGQDUjSlA/jOSJw6p 5bZDaDaqtVQUOyQCxykSg== X-UI-Out-Filterresults: notjunk:1;V01:K0:2zpVSPf3xSU=:GrmB5o4WOib6oVhviLzKxQ FMg6rbpEg+3jQ5YbF1FF+pHelS/jpSnMdsT2N1oQWMt6TDJt9XVZMzQenHY0tBplOYfNd7A1g e5y5TNZxhNKkCHBhnwtR/yhnwE7jEZYGQCHfV5Wxkt/hr6ToND3cQNOz1LT+eLIphxcnsV9g6 3ZMf2WiLXt9bsvkvFqMp9939lRcfUc37e7TGsTA0VKh3FdskiSiTatXWxIkXWV52ClsSCQ4lU VL6KOenJbCeWV22FFMmX0054E/3BY/bJRFB24oNFZodPxBYrPCY35rLwoZ5Inx110vVt3t+oE zCPwh3JrH3YB2CUbsyCLU6gTXhAI525z3zck0OMaAk43zCaLZAKyhb9dbPGi5fZyQIReEsd8g O309I4ffoDWeiU5B6Ms8PNx+FgH/Or13ASrc6KjWKeRKA30S/GorLlsZPmRzegJ/ealnumRu9 EhkaYFNnc5ww7c6UkH8EnbTqjEowGQx+Uhbnn4DBpgfTK01IfRbcbaTOJwfTH8bGk7o7rX1HD Juy4mi2MYKda85mtYbEq/ax4YOrpgzea8EaDyw9wQWaITXGJCxgaoDu93IDb2EKWaR8QnmJJr RxsW/r4JEY/j+iaD3Bf+yTrFnmq2LlgxgsjAkWwHQRmxSl3Y+PkejD2tqFLkw/MgTbKs0PKyA vnHccoreA1BIA3odJbqq4JRtDQZi3y5aDWtMTAUg+l4h++Oyu0M0mGcpAyReNkmCmywd6mQO6 ZTu5p1AJ/senas89 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 22 October 2015 11:41:58 Eric Auger wrote: > v2: creation > - this defines the module_vfio_reset_handler macro as suggested by Arnd > > Although Arnd suggested me to remove the vfio_platform_register_reset > symbol_get (since the module manager can handle the case where the > vfio-platform driver is not loaded), I prefered to keep it while > introducing the macro. The rationale is, when using symbol_get/put > we are able to release the hold from the reset module on vfio-platform > as soon as the registration is complete and I think this makes sense. This makes it highly unusual. I can't think of a good reason to allow unloading the vfio platform module while a reset module is registered, that just causes a memory leak (or possibly a crash) when you do unload the core module while it's used by a reset driver, it prevents the reset module from getting loaded without loading the vfio module first (because the autoloading doesn't work), and it means we don't catch build errors in invalid configurations where you have only the reset driver but not the vfio driver enabled. Arnd