linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl@pobox.com>
To: Tony Breeds <tony@bakeyournoodle.com>
Cc: Johansson <olof@lixom.net>,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
	Olof, Jan-Bernd Themann <themann@de.ibm.com>
Subject: Re: [PATCH 2/2] Force 4K IOPages when eHEA is present in the machine.
Date: Thu, 20 Mar 2008 02:18:58 -0500	[thread overview]
Message-ID: <20080320071858.GS4712@localdomain> (raw)
In-Reply-To: <262bc32afdde978922b9500c2a83f7c7ed6e4043.1205987625.git.tony@bakeyournoodle.com>

Tony Breeds wrote:
> 
> +#if defined(CONFIG_PPC_PSERIES) && defined(CONFIG_PPC_64K_PAGES)
> +static int __init scan_dt_for_ehea(unsigned long node, const char *uname,
> +                                  int depth, void *data)
> +{
> +	if (depth != 0)
> +		return 0;
> +
> +	if (of_flat_dt_search(node, "HEA ", "ibm,drc-names"))
> +		return 1;
> +
> +	return 0;
> +}
> +#endif

Searching ibm,drc-names is necessary, but is it sufficient?  That is,
can there be a system that has an HEA adapter without that property
being present?  Thinking in particular about single-partition systems
that run without an HMC attached.


>  static void __init htab_init_page_sizes(void)
>  {
>  	int rc;
> +#ifdef CONFIG_PPC_64K_PAGES
> +	int has_ehea = 0;
> +#endif
>  
>  	/* Default to 4K pages only */
>  	memcpy(mmu_psize_defs, mmu_psize_defaults_old,
>  	       sizeof(mmu_psize_defaults_old));
>  
> +#if defined(CONFIG_PPC_PSERIES) && defined(CONFIG_PPC_64K_PAGES)
> +	/* Scan to see if this system can have an EHEA, if so we'll
> +	 * demote io_psize to 4K */
> +	has_ehea = of_scan_flat_dt(scan_dt_for_ehea, NULL);
> +#endif

I'm wondering if some of the ifdef stuff could be avoided if you used
a firmware feature bit to signify the limitation (or the lack of it).
The bit could be set during pSeries_probe.  Just an idea; I don't feel
that strongly about it.

  reply	other threads:[~2008-03-20  7:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20  4:33 [PATCH 1/2] Implement of_flat_dt_search() and use it for of_flat_dt_is_compatible Tony Breeds
2008-03-20  4:33 ` [PATCH 2/2] Force 4K IOPages when eHEA is present in the machine Tony Breeds
2008-03-20  7:18   ` Nathan Lynch [this message]
2008-03-20  9:23     ` Paul Mackerras
2008-03-20  9:41 ` [PATCH 1/2] Implement of_flat_dt_search() and use it for of_flat_dt_is_compatible Benjamin Herrenschmidt

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=20080320071858.GS4712@localdomain \
    --to=ntl@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=themann@de.ibm.com \
    --cc=tony@bakeyournoodle.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).