From: "Oliver O'Halloran" <oohall@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>,
Vaibhav Jain <vaibhav@linux.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v3 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails
Date: Thu, 27 Jun 2019 13:39:18 +1000 [thread overview]
Message-ID: <CAOSf1CEgrRcYHLyiktPUboxWD0MFws5PAxSTkBKMxe2yn4xL2g@mail.gmail.com> (raw)
In-Reply-To: <87h88bzqfd.fsf@linux.ibm.com>
On Thu, Jun 27, 2019 at 12:58 PM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> "Oliver O'Halloran" <oohall@gmail.com> writes:
>
> >> > + rc = drc_pmem_bind(p);
> >> > + }
> >> > +
> >> > if (rc)
> >> > goto err;
> >> >
> >>
> >> I am also not sure about the module reference count here. Should we
> >> increment the module reference count after a bind so that we can track
> >> failures in ubind and fail the module unload?
> >
> > I don't really get what you're concerned about here. The error
> > handling path calls drc_pmem_unbind() so if there's a bind error we
> > should never leave probe with memory still bound.
> >
>
> In the remove callback, if the ubind fail should we allow the module
> unload?
If the drc_pmem_unbind() in the driver's remove function fails the
driver will still be unbound from the platform device for that DRC.
You can try re-bind the driver to the platform device and it'll hit
the unbind-then-bind again error path this series introduces (which
might also fail), but that's fine. The only reasons I can think of for
drc_pmem_unbind() failing are bugs in the hypervisor or bugs in the
driver. Forcing the module to stay loaded doesn't help either case so
I'm not seeing the benefit.
Oliver
prev parent reply other threads:[~2019-06-27 3:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 14:04 [PATCH v3 0/3] powerpc/papr_scm: Workaround for failure of drc bind after kexec Vaibhav Jain
2019-06-26 14:04 ` [PATCH v3 1/3] powerpc/pseries: Update SCM hcall op-codes in hvcall.h Vaibhav Jain
2019-06-26 16:53 ` Aneesh Kumar K.V
2019-06-27 1:10 ` Oliver O'Halloran
2019-06-28 3:39 ` Michael Ellerman
2019-06-28 4:36 ` Oliver O'Halloran
2019-06-29 11:30 ` Michael Ellerman
2019-06-29 16:09 ` Vaibhav Jain
2019-06-26 14:04 ` [PATCH v3 2/3] powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL Vaibhav Jain
2019-06-26 15:41 ` Aneesh Kumar K.V
2019-06-27 14:40 ` Vaibhav Jain
2019-06-26 14:04 ` [PATCH v3 3/3] powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails Vaibhav Jain
2019-06-26 16:58 ` Aneesh Kumar K.V
2019-06-27 1:41 ` Oliver O'Halloran
2019-06-27 2:56 ` Aneesh Kumar K.V
2019-06-27 3:39 ` Oliver O'Halloran [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOSf1CEgrRcYHLyiktPUboxWD0MFws5PAxSTkBKMxe2yn4xL2g@mail.gmail.com \
--to=oohall@gmail.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vaibhav@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).