linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Cc: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH][v2] powerpc/85xx: Move ePAPR paravirt initialization earlier
Date: Tue, 2 Jul 2013 12:55:40 -0500	[thread overview]
Message-ID: <1372787740.8183.113@snotra> (raw)
In-Reply-To: <1372769189-17864-1-git-send-email-Laurentiu.Tudor@freescale.com> (from Laurentiu.Tudor@freescale.com on Tue Jul  2 07:46:29 2013)

On 07/02/2013 07:46:29 AM, Laurentiu Tudor wrote:
> diff --git a/arch/powerpc/kernel/epapr_paravirt.c =20
> b/arch/powerpc/kernel/epapr_paravirt.c
> index d44a571..d05f9da 100644
> --- a/arch/powerpc/kernel/epapr_paravirt.c
> +++ b/arch/powerpc/kernel/epapr_paravirt.c
> @@ -30,38 +30,45 @@ extern u32 epapr_ev_idle_start[];
>=20
>  bool epapr_paravirt_enabled;
>=20
> -static int __init epapr_paravirt_init(void)
> +static int __init early_init_dt_scan_epapr(unsigned long node,
> +					   const char *uname,
> +					   int depth, void *data)
>  {
> -	struct device_node *hyper_node;
> -	const u32 *insts;
> -	int len, i;
> +	const u32 *instrs;
> +	unsigned long len;
> +	int i;
>=20
> -	hyper_node =3D of_find_node_by_path("/hypervisor");
> -	if (!hyper_node)
> -		return -ENODEV;
> +	if (!of_flat_dt_is_compatible(node, "epapr,hypervisor-1"))
> +		return 0;

QEMU doesn't set "epapr,hypervisor-1" but it still uses the same hcall =20
mechanism.  The compatible that QEMU sets is "linux,kvm".  Perhaps QEMU =20
should change, but we'd still like to be compatible with older QEMUs.

How is this change related to moving initialization earlier?

> -	insts =3D of_get_property(hyper_node, "hcall-instructions", &len);
> -	if (!insts)
> -		return -ENODEV;
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
> +	if (of_get_flat_dt_prop(node, "has-idle", NULL))
> +		ppc_md.power_save =3D epapr_ev_idle;
> +#endif

Why are you doing this before processing hcall-instructions?

-Scott=

  reply	other threads:[~2013-07-02 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 12:46 [PATCH][v2] powerpc/85xx: Move ePAPR paravirt initialization earlier Laurentiu Tudor
2013-07-02 17:55 ` Scott Wood [this message]
2013-07-03 12:29   ` Tudor Laurentiu
2013-07-03 14:52     ` Scott Wood
2013-07-03 15:13       ` Tudor Laurentiu

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=1372787740.8183.113@snotra \
    --to=scottwood@freescale.com \
    --cc=Laurentiu.Tudor@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).