linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: David Miller <davem@davemloft.net>
Cc: f.fainelli@gmail.com, netdev@vger.kernel.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	sfr@canb.auug.org.au
Subject: Re: [PATCH] kexec: Export kexec_in_progress to modules
Date: Fri, 21 Oct 2016 13:37:26 -0500	[thread overview]
Message-ID: <87wph1eeft.fsf@xmission.com> (raw)
In-Reply-To: <20161021.101343.1389577512803674816.davem@davemloft.net> (David Miller's message of "Fri, 21 Oct 2016 10:13:43 -0400 (EDT)")

David Miller <davem@davemloft.net> writes:

> From: ebiederm@xmission.com (Eric W. Biederman)
> Date: Fri, 21 Oct 2016 00:26:55 -0500
>
>> So as far as I can tell you are advocating for a change to support a
>> driver doing something that is completely pointless.  So no let's not
>> export this symbol.  Please fix the driver to do something less
>> pointless instead.
>
> FLorian explained his reasoning for doing what he is doing in this
> specific driver and it made sense to me.

What doesn't make sense to me is not doing that for any other kind of
reboot.

Of the 3 uses of kexec_in_progres in the kernel (not counting this one)
I think there is only one of them that is really valid.   And that one
is only valid because it is the least horrible thing the pci layer can
do.  (AKA it is a hack even there).

It really is nonsense having methods do different things depending on
context and that is why kexec_in_progress is not exeported.

As far as I can tell the use of kexec_in_progress winds up being
a fragile hack that will just cause more problems later on.

Florian is there a good readon why you don't just do?

static void bcm_sf2_sw_shutdown(struct platform_device *pdev)
{
        struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);

	/* For a kernel about to be kexec'd we want to keep the GPHY on for a
         * successful MDIO bus scan to occur. If we did turn off the GPHY
	 * before (e.g: port_disable), this will also power it back on.
	 */
	if (priv->hw_params.num_gphy == 1)
		bcm_sf2_gphy_enable_set(priv->dev->ds, true);
}

I certainly don't see anything in the changelog to explain why that
isn't done.

Eric

  reply	other threads:[~2016-10-21 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  1:15 [PATCH] kexec: Export kexec_in_progress to modules Florian Fainelli
2016-10-21  1:54 ` David Miller
2016-10-21  5:26   ` Eric W. Biederman
2016-10-21 14:13     ` David Miller
2016-10-21 18:37       ` Eric W. Biederman [this message]
2016-10-21 18:48         ` Florian Fainelli

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=87wph1eeft.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).