From patchwork Thu Jun 13 15:11:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raoni Fassina Firmino X-Patchwork-Id: 33108 Received: (qmail 43609 invoked by alias); 13 Jun 2019 15:11:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 43520 invoked by uid 89); 13 Jun 2019 15:11:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:4581 X-HELO: mx0a-001b2d01.pphosted.com From: Raoni Fassina Firmino To: libc-alpha@sourceware.org Subject: [PATCH 4/4] powerpc: Remove unused internal macros for vsyscall Date: Thu, 13 Jun 2019 12:11:45 -0300 In-Reply-To: <20190613151145.22243-1-raoni@linux.ibm.com> References: <20190613151145.22243-1-raoni@linux.ibm.com> MIME-Version: 1.0 x-cbid: 19061315-8235-0000-0000-00000EA7704D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011255; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01217420; UDB=6.00640188; IPR=6.00998531; MB=3.00027295; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-13 15:11:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061315-8236-0000-0000-00004601B303 Message-Id: <20190613151145.22243-5-raoni@linux.ibm.com> Macros INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK and INTERNAL_VSYSCALL_CALL_TYPE were only used for __get_timebase_freq. After its refactoring they are not needed anymore. Also, INTERNAL_VSYSCALL_CALL, that had become a wrapper over INTERNAL_VSYSCALL_CALL_TYPE, can be itself the whole implementation again. ChangeLog: 2019-06-13 Raoni Fassina Firmino * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INTERNAL_VSYSCALL_CALL): Move implementation. (INTERNAL_VSYSCALL_CALL_TYPE): Remove macro. (INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (INTERNAL_VSYSCALL_CALL): Move implementation. (INTERNAL_VSYSCALL_CALL_TYPE): Remove macro. (INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Likewise. --- .../sysv/linux/powerpc/powerpc32/sysdep.h | 21 ++--------------- .../sysv/linux/powerpc/powerpc64/sysdep.h | 23 ++----------------- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index bdbab8e41b..d493ec6222 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -43,7 +43,7 @@ function call, with the exception of LR (which is needed for the "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal an error return status). */ -# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, type, args...) \ +# define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ ({ \ register void *r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -56,7 +56,7 @@ register long int r10 __asm__ ("r10"); \ register long int r11 __asm__ ("r11"); \ register long int r12 __asm__ ("r12"); \ - register type rval __asm__ ("r3"); \ + register long int rval __asm__ ("r3"); \ LOADARGS_##nr (funcptr, args); \ __asm__ __volatile__ \ ("mtctr %0\n\t" \ @@ -70,9 +70,6 @@ rval; \ }) -#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, long int, args) - # undef INLINE_SYSCALL # define INLINE_SYSCALL(name, nr, args...) \ ({ \ @@ -133,20 +130,6 @@ # undef INTERNAL_SYSCALL_ERRNO # define INTERNAL_SYSCALL_ERRNO(val, err) (val) -# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ - ({ \ - type sc_ret = ENOSYS; \ - \ - __typeof (__vdso_##name) vdsop = __vdso_##name; \ - PTR_DEMANGLE (vdsop); \ - if (vdsop != NULL) \ - sc_ret = \ - INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, nr, type, ##args); \ - else \ - err = 1 << 28; \ - sc_ret; \ - }) - /* List of system calls which are supported as vsyscalls. */ # define HAVE_CLOCK_GETRES_VSYSCALL 1 # define HAVE_CLOCK_GETTIME_VSYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 294517e3f3..454554061b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -47,22 +47,6 @@ #endif /* __ASSEMBLER__ */ -/* This version is for internal uses when there is no desire - to set errno */ -#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ - ({ \ - type sc_ret = ENOSYS; \ - \ - __typeof (__vdso_##name) vdsop = __vdso_##name; \ - PTR_DEMANGLE (vdsop); \ - if (vdsop != NULL) \ - sc_ret = \ - INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, type, nr, ##args); \ - else \ - err = 1 << 28; \ - sc_ret; \ - }) - /* List of system calls which are supported as vsyscalls. */ #define HAVE_CLOCK_GETRES_VSYSCALL 1 #define HAVE_CLOCK_GETTIME_VSYSCALL 1 @@ -74,7 +58,7 @@ gave back in the non-error (CR0.SO cleared) case, otherwise (CR0.SO set) the negation of the return value in the kernel gets reverted. */ -#define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, type, nr, args...) \ +#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ ({ \ register void *r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -83,7 +67,7 @@ register long int r6 __asm__ ("r6"); \ register long int r7 __asm__ ("r7"); \ register long int r8 __asm__ ("r8"); \ - register type rval __asm__ ("r3"); \ + register long int rval __asm__ ("r3"); \ LOADARGS_##nr (funcptr, args); \ __asm__ __volatile__ \ ("mtctr %0\n\t" \ @@ -98,9 +82,6 @@ rval; \ }) -#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args) - #undef INLINE_SYSCALL /* This version is for kernels that implement system calls that