From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 09/11 v2] RDMA/cxgb4: Support on-chip SQs.
Date: Tue, 28 Sep 2010 10:57:35 -0700 [thread overview]
Message-ID: <adad3rx699s.fsf@cisco.com> (raw)
In-Reply-To: <20100913162357.20948.28267.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org> (Steve Wise's message of "Mon, 13 Sep 2010 11:23:57 -0500")
As I said, I applied this, but I wonder:
> +static inline pgprot_t t4_pgprot_wc(pgprot_t prot)
> +{
> +#if defined(__i386__) || defined(__x86_64__)
> + return pgprot_writecombine(prot);
> +#elif defined(CONFIG_PPC64)
> + return __pgprot((pgprot_val(prot) | _PAGE_NO_CACHE) &
> + ~(pgprot_t)_PAGE_GUARDED);
> +#else
> + return pgprot_noncached(prot);
> +#endif
> +}
> +
> +static inline int t4_ocqp_supported(void)
> +{
> +#if defined(__i386__) || defined(__x86_64__) || defined(CONFIG_PPC64)
> + return 1;
> +#else
> + return 0;
> +#endif
> +}
Is there any way to avoid this ifdef-ery? It seems at least the powerpc
case should be wrapped up in an arch/powerpc version of pgprot_writecombine.
Also doing this by hand as here leaves out for example ia64, which seems
to have a definition of pgrprot_writecombine.
However I don't know what (if anything) we should do for the
ocqp_supported test ...
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-09-28 17:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 16:23 [PATCH 09/11 v2] RDMA/cxgb4: Support on-chip SQs Steve Wise
[not found] ` <20100913162357.20948.28267.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2010-09-28 17:57 ` Roland Dreier [this message]
[not found] ` <adad3rx699s.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-09-28 18:05 ` Steve Wise
[not found] ` <4CA22E84.404-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-09-29 3:41 ` Roland Dreier
[not found] ` <adatyl943ob.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-09-29 17:14 ` Steve Wise
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=adad3rx699s.fsf@cisco.com \
--to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.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