From patchwork Tue Sep 27 19:31:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 16090 Received: (qmail 117715 invoked by alias); 27 Sep 2016 19:31:28 -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 117700 invoked by uid 89); 27 Sep 2016 19:31:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Includes, outstanding X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: libc-alpha@sourceware.org Cc: munroesj@linux.vnet.ibm.com Subject: [PATCH] powerpc: Installed-header hygiene Date: Tue, 27 Sep 2016 16:31:11 -0300 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092719-0020-0000-0000-00000248F04D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092719-0021-0000-0000-00003048770F Message-Id: <1475004671-1053-1-git-send-email-tuliom@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-09-27_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609270349 Fix powerpc-specific headers: - Make it compatible to C89 by replace references to inline by __inline__. - Get the definition of sigset_t used by sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h. - Includes missing header file. 2016-09-27 Tulio Magno Quites Machado Filho * sysdeps/powerpc/sys/platform/ppc.h (__ppc_get_timebase): Replace inline by __inline__. (__ppc_yield, __ppc_mdoio, __ppc_mdoom, __ppc_set_ppr_med): Likewise. (__ppc_set_ppr_med_low, __ppc_set_ppr_low): Likewise. (__ppc_set_ppr_very_low, __ppc_set_ppr_med_high): Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Require sigset_t from signal.h. * sysdeps/unix/sysv/linux/powerpc/sys/user.h: Include stddef.h, which is already required. --- sysdeps/powerpc/sys/platform/ppc.h | 18 +++++++++--------- sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h | 1 + sysdeps/unix/sysv/linux/powerpc/sys/user.h | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sysdeps/powerpc/sys/platform/ppc.h b/sysdeps/powerpc/sys/platform/ppc.h index 4d8a411..bf6ee31 100644 --- a/sysdeps/powerpc/sys/platform/ppc.h +++ b/sysdeps/powerpc/sys/platform/ppc.h @@ -24,7 +24,7 @@ #include /* Read the Time Base Register. */ -static inline uint64_t +static __inline__ uint64_t __ppc_get_timebase (void) { #if __GNUC_PREREQ (4, 8) @@ -56,7 +56,7 @@ __ppc_get_timebase (void) /* Provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors. */ -static inline void +static __inline__ void __ppc_yield (void) { __asm__ volatile ("or 27,27,27"); @@ -66,7 +66,7 @@ __ppc_yield (void) resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed. */ -static inline void +static __inline__ void __ppc_mdoio (void) { __asm__ volatile ("or 29,29,29"); @@ -76,7 +76,7 @@ __ppc_mdoio (void) resources dedicated to the executing processor are released until all outstanding storage accesses to cacheable storage for which the data is not in the cache have been completed. */ -static inline void +static __inline__ void __ppc_mdoom (void) { __asm__ volatile ("or 30,30,30"); @@ -94,19 +94,19 @@ __ppc_mdoom (void) use unguarded. The default value is 'medium'. */ -static inline void +static __inline__ void __ppc_set_ppr_med (void) { __asm__ volatile ("or 2,2,2"); } -static inline void +static __inline__ void __ppc_set_ppr_med_low (void) { __asm__ volatile ("or 6,6,6"); } -static inline void +static __inline__ void __ppc_set_ppr_low (void) { __asm__ volatile ("or 1,1,1"); @@ -129,13 +129,13 @@ __ppc_set_ppr_low (void) #ifdef _ARCH_PWR8 -static inline void +static __inline__ void __ppc_set_ppr_very_low (void) { __asm__ volatile ("or 31,31,31"); } -static inline void +static __inline__ void __ppc_set_ppr_med_high (void) { __asm__ volatile ("or 5,5,5"); diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h index c4634f6..e40bced 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h @@ -19,6 +19,7 @@ #define _SYS_UCONTEXT_H 1 #include +#define __need_sigset_t #include /* We need the signal context definitions even if they are not exposed diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/user.h b/sysdeps/unix/sysv/linux/powerpc/sys/user.h index 97459fb..4f2ebc2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/user.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/user.h @@ -18,6 +18,7 @@ #ifndef _SYS_USER_H #define _SYS_USER_H 1 +#include #include #include