* [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT
@ 2016-10-27 20:42 Steve Ellcey
2016-11-07 16:42 ` Steve Ellcey
2016-11-07 20:09 ` Andreas Schwab
0 siblings, 2 replies; 3+ messages in thread
From: Steve Ellcey @ 2016-10-27 20:42 UTC (permalink / raw)
To: libc-alpha, ynorov
[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]
Yury,
I took a look at your __ASSUME_ST_INO_64_BIT patch at:
        https://sourceware.org/ml/libc-alpha/2016-09/msg00075.html
I think that, rather than ifdef'ing the setting of
__ASSUME_ST_INO_64_BIT in sysdeps/unix/sysv/linux/kernel-features.h,
the setting should be left as unconditional and then sh and alpha can
undef and re-define it to zero after including linux/kernel-features.h.
Here is my modified version of your patch, I tested it on x86 just toÂ
make sure I didn't break anything obvious, but I don't have hardware to
test sh or alpha.
Can someone approve this for checkin?
Steve Ellcey
sellcey@caviumnetworks.com
2016-10-27  Yury Norov  <ynorov@caviumnetworks.com>
            Steve Ellcey <sellcey@caviumnetworks.com>
        * sysdeps/unix/sysv/linux/alpha/kernel-features.h: #define
          __ASSUME_ST_INO_64_BIT as 0
        * sysdeps/unix/sysv/linux/sh/kernel-features.h: Likewise.
        * sysdeps/unix/sysv/linux/fxstat64.c: Replace #ifdef with #if
          over the code where __ASSUME_ST_INO_64_BIT is used.
        * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
        * sysdeps/unix/sysv/linux/xstat64.c: Likewise.
        * sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
[-- Attachment #2: assume.patch --]
[-- Type: text/x-patch, Size: 3216 bytes --]
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 732749e..f09222d 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -23,6 +23,7 @@
#include_next <kernel-features.h>
#undef __ASSUME_ST_INO_64_BIT
+#define __ASSUME_ST_INO_64_BIT 0
/* There never has been support for fstat64. */
#undef __ASSUME_STATFS64
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index 5468dd6..8d10282 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -33,7 +33,7 @@ ___fxstat64 (int vers, int fd, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (fstat64, 2, fd, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index 09a678a..4d8c0a6 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -32,7 +32,7 @@ ___lxstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (lstat64, 2, name, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index c5240fa..ea4fdbc 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -44,6 +44,7 @@
/* SH does not have a 64-bit inode field. */
#undef __ASSUME_ST_INO_64_BIT
+#define __ASSUME_ST_INO_64_BIT 0
/* SH4 ABI does not really require argument alignment for 64-bits, but
the kernel interface for p{read,write}64 adds a dummy long argument
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index 2075383..00a4459 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -33,7 +33,7 @@ ___xstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (stat64, 2, name, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c
index c5fbf3d..27b528c 100644
--- a/sysdeps/unix/sysv/linux/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/xstatconv.c
@@ -190,7 +190,7 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
buf->__pad1 = 0;
#endif
#ifdef _HAVE_STAT64___ST_INO
-# ifndef __ASSUME_ST_INO_64_BIT
+# if !__ASSUME_ST_INO_64_BIT
if (kbuf->st_ino == 0)
buf->st_ino = kbuf->__st_ino;
else
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT
2016-10-27 20:42 [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT Steve Ellcey
@ 2016-11-07 16:42 ` Steve Ellcey
2016-11-07 20:09 ` Andreas Schwab
1 sibling, 0 replies; 3+ messages in thread
From: Steve Ellcey @ 2016-11-07 16:42 UTC (permalink / raw)
To: libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
Ping.
On Thu, 2016-10-27 at 13:41 -0700, Steve Ellcey wrote:
> Yury,
>
> I took a look at your __ASSUME_ST_INO_64_BIT patch at:
>
> Â Â Â Â Â Â Â Â https://sourceware.org/ml/libc-alpha/2016-09/msg00075.html
>
> I think that, rather than ifdef'ing the setting of
> __ASSUME_ST_INO_64_BIT in sysdeps/unix/sysv/linux/kernel-features.h,
> the setting should be left as unconditional and then sh and alpha can
> undef and re-define it to zero after including linux/kernel-
> features.h.
>
> Here is my modified version of your patch, I tested it on x86 just toÂ
> make sure I didn't break anything obvious, but I don't have hardware to
> test sh or alpha.
>
> Can someone approve this for checkin?
>
> Steve Ellcey
> sellcey@caviumnetworks.com
>
>
> 2016-10-27  Yury Norov  <ynorov@caviumnetworks.com>
> Â Â Â Â Â Â Â Â Â Â Â Â Steve Ellcey <sellcey@caviumnetworks.com>
>
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/alpha/kernel-features.h: #define
> Â Â Â Â Â Â Â Â Â Â __ASSUME_ST_INO_64_BIT as 0
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/sh/kernel-features.h: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/fxstat64.c: Replace #ifdef with #if
> Â Â Â Â Â Â Â Â Â Â over the code where __ASSUME_ST_INO_64_BIT is used.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/xstat64.c: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
[-- Attachment #2: assume.patch --]
[-- Type: text/x-patch, Size: 3216 bytes --]
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 732749e..f09222d 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -23,6 +23,7 @@
#include_next <kernel-features.h>
#undef __ASSUME_ST_INO_64_BIT
+#define __ASSUME_ST_INO_64_BIT 0
/* There never has been support for fstat64. */
#undef __ASSUME_STATFS64
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index 5468dd6..8d10282 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -33,7 +33,7 @@ ___fxstat64 (int vers, int fd, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (fstat64, 2, fd, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index 09a678a..4d8c0a6 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -32,7 +32,7 @@ ___lxstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (lstat64, 2, name, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index c5240fa..ea4fdbc 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -44,6 +44,7 @@
/* SH does not have a 64-bit inode field. */
#undef __ASSUME_ST_INO_64_BIT
+#define __ASSUME_ST_INO_64_BIT 0
/* SH4 ABI does not really require argument alignment for 64-bits, but
the kernel interface for p{read,write}64 adds a dummy long argument
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index 2075383..00a4459 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -33,7 +33,7 @@ ___xstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
result = INLINE_SYSCALL (stat64, 2, name, buf);
-#if defined _HAVE_STAT64___ST_INO && !defined __ASSUME_ST_INO_64_BIT
+#if defined _HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
#endif
diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c
index c5fbf3d..27b528c 100644
--- a/sysdeps/unix/sysv/linux/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/xstatconv.c
@@ -190,7 +190,7 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
buf->__pad1 = 0;
#endif
#ifdef _HAVE_STAT64___ST_INO
-# ifndef __ASSUME_ST_INO_64_BIT
+# if !__ASSUME_ST_INO_64_BIT
if (kbuf->st_ino == 0)
buf->st_ino = kbuf->__st_ino;
else
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT
2016-10-27 20:42 [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT Steve Ellcey
2016-11-07 16:42 ` Steve Ellcey
@ 2016-11-07 20:09 ` Andreas Schwab
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2016-11-07 20:09 UTC (permalink / raw)
To: Steve Ellcey; +Cc: libc-alpha, ynorov
On Okt 27 2016, Steve Ellcey <sellcey@caviumnetworks.com> wrote:
> 2016-10-27  Yury Norov  <ynorov@caviumnetworks.com>
> Â Â Â Â Â Â Â Â Â Â Â Â Steve Ellcey <sellcey@caviumnetworks.com>
>
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/alpha/kernel-features.h: #define
> Â Â Â Â Â Â Â Â Â Â __ASSUME_ST_INO_64_BIT as 0
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/sh/kernel-features.h: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/fxstat64.c: Replace #ifdef with #if
> Â Â Â Â Â Â Â Â Â Â over the code where __ASSUME_ST_INO_64_BIT is used.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/xstat64.c: Likewise.
> Â Â Â Â Â Â Â Â * sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
Ok.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-07 20:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 20:42 [PATCH] Updated version of define for __ASSUME_ST_INO_64_BIT Steve Ellcey
2016-11-07 16:42 ` Steve Ellcey
2016-11-07 20:09 ` Andreas Schwab
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 read-only IMAP folder(s) and NNTP newsgroup(s).