From: "Thierry Fauck@linux.vnet.ibm.com" <thierry@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: avagin@openvz.org, paulmck@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Some systems have a dynamic PAGE_SIZE value and do not add a definition for PAGE_SIZE. This value will have to be retrieved using getpagesize() or sysconf().
Date: Thu, 07 Aug 2014 17:37:17 +0200 [thread overview]
Message-ID: <53E39D2D.1060202@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140806130647.5f94c95c9621dc7d69501641@linux-foundation.org>
On 08/06/2014 10:06 PM, Andrew Morton wrote:
> On Wed, 6 Aug 2014 13:34:26 +0200 Thierry FAUCK - IBM LTC <thierry@linux.vnet.ibm.com> wrote:
>
>> --- a/tools/testing/selftests/ptrace/peeksiginfo.c
>> +++ b/tools/testing/selftests/ptrace/peeksiginfo.c
>> @@ -31,6 +31,10 @@ static int sys_ptrace(int request, pid_t pid, void *addr, void *data)
>> #define TEST_SICODE_PRIV -1
>> #define TEST_SICODE_SHARE -2
>>
>> +#ifndef PAGE_SIZE
>> +#define PAGE_SIZE sysconf(_SC_PAGESIZE)
>> +#endif
>> +
>> #define err(fmt, ...) \
>> fprintf(stderr, \
>> "Error (%s:%d): " fmt, \
> More details, please. What are "some systems"?
>
Sorry, about that "common description".
A more appropriate one could be : On IBM powerpc where multiple page
size value are supported, current ppc64 and ppc64el distro don't define
the PAGE_SIZE variable in /usr/include as this is a dynamic value
retrieved by the getpagesize() or sysconf() defined in unistd.h. The
PAGE_SIZE variable sounds defined when only one value is supported by
the kernel.
As such, when the PAGE_SIZE definition doesn't exist system should
retrieve the dynamic value.
Is that a better explanation ?
--
Thierry Fauck @ linux.vnet.ibm
prev parent reply other threads:[~2014-08-07 15:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 11:34 [PATCH] Some systems have a dynamic PAGE_SIZE value and do not add a definition for PAGE_SIZE. This value will have to be retrieved using getpagesize() or sysconf() Thierry FAUCK - IBM LTC
2014-08-06 20:06 ` Andrew Morton
2014-08-07 15:37 ` Thierry Fauck@linux.vnet.ibm.com [this message]
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=53E39D2D.1060202@linux.vnet.ibm.com \
--to=thierry@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.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