All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-arch@vger.kernel.org
Subject: Re: (resend) Converting architectures to 4 level page tables
Date: Wed, 26 Jan 2005 15:25:33 -0800	[thread overview]
Message-ID: <20050126152533.63e43c58.davem@davemloft.net> (raw)
In-Reply-To: <1106781719.5158.7.camel@npiggin-nld.site>

On Thu, 27 Jan 2005 10:21:59 +1100
Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> It looks like the following condition may do the trick, do you think?
> Seems to do the right thing in a simple test file, anyway.
> 
> #if !defined(PTRS_PER_XXX) || (PTRS_PER_XXX != 1)

It doesn't work, try the following which matches quite
precisely the sparc64 case.

extern int __get_ptrs_per_pmd(void);

#define PTRS_PER_PMD	__get_ptrs_per_pmd()

int main(void)
{
#if !defined(PTRS_PER_PMD) || (PTRS_PER_PMD != 1)
	return 1;
#endif
	return 0;
}

It will warn like this:

foo.c:7:6: missing binary operator before token "("
foo.c:10:32: missing binary operator before token "("

Which looks exactly like the kind of warnings mm/memory.c was
producing for me on sparc64.

Let's just face it that this is not a compile time test in
any way.  We could make it so by creating some kind of
PTRS_PER_PMD_MIGHT_BE_GREATER_THAN_ONE macro platforms can
define but this is getting really rediculious :-)

  reply	other threads:[~2005-01-26 23:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23  0:08 (resend) Converting architectures to 4 level page tables Nick Piggin
2005-01-26  3:50 ` David S. Miller
2005-01-26  5:07   ` David S. Miller
2005-01-26 11:51     ` Nick Piggin
2005-01-26 11:47   ` Nick Piggin
2005-01-26 20:26     ` David S. Miller
2005-01-26 23:21       ` Nick Piggin
2005-01-26 23:25         ` David S. Miller [this message]
2005-01-26 23:39           ` Nick Piggin
2005-01-26 23:41             ` David S. Miller

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=20050126152533.63e43c58.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.