| From f0b0e0a120bb3531dbbbcfe1b8870b0666dd1ca9 Mon Sep 17 00:00:00 2001 |
| From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
| Date: Fri, 4 Aug 2017 17:40:42 +0200 |
| Subject: [PATCH] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT |
| archs |
| |
| Upstream uses arch_spinlock_t within spinlock_t and requests that |
| spinlock_types.h header file is included first. |
| On -RT we have the rt_mutex with its raw_lock wait_lock which needs |
| architectures' spinlock_types.h header file for its definition. However |
| we need rt_mutex first because it is used to build the spinlock_t so |
| that check does not work for us. |
| Therefore I am dropping that check. |
| |
| Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
| |
| diff --git a/arch/alpha/include/asm/spinlock_types.h b/arch/alpha/include/asm/spinlock_types.h |
| index 54c2afce0a1d..8e08a6146dce 100644 |
| --- a/arch/alpha/include/asm/spinlock_types.h |
| +++ b/arch/alpha/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ALPHA_SPINLOCK_TYPES_H |
| #define _ALPHA_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int lock; |
| } arch_spinlock_t; |
| diff --git a/arch/arm/include/asm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h |
| index 47663fcb10ad..45f4f509a431 100644 |
| --- a/arch/arm/include/asm/spinlock_types.h |
| +++ b/arch/arm/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __ASM_SPINLOCK_TYPES_H |
| #define __ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| #define TICKET_SHIFT 16 |
| |
| typedef struct { |
| diff --git a/arch/arm64/include/asm/spinlock_types.h b/arch/arm64/include/asm/spinlock_types.h |
| index 55be59a35e3f..ba0cf1361f65 100644 |
| --- a/arch/arm64/include/asm/spinlock_types.h |
| +++ b/arch/arm64/include/asm/spinlock_types.h |
| @@ -16,10 +16,6 @@ |
| #ifndef __ASM_SPINLOCK_TYPES_H |
| #define __ASM_SPINLOCK_TYPES_H |
| |
| -#if !defined(__LINUX_SPINLOCK_TYPES_H) && !defined(__ASM_SPINLOCK_H) |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| #include <linux/types.h> |
| |
| #define TICKET_SHIFT 16 |
| diff --git a/arch/blackfin/include/asm/spinlock_types.h b/arch/blackfin/include/asm/spinlock_types.h |
| index 1a33608c958b..103b34d3dcf6 100644 |
| --- a/arch/blackfin/include/asm/spinlock_types.h |
| +++ b/arch/blackfin/include/asm/spinlock_types.h |
| @@ -7,10 +7,6 @@ |
| #ifndef __ASM_SPINLOCK_TYPES_H |
| #define __ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| #include <asm/rwlock.h> |
| |
| typedef struct { |
| diff --git a/arch/hexagon/include/asm/spinlock_types.h b/arch/hexagon/include/asm/spinlock_types.h |
| index 7a906b5214a4..d8f596fec022 100644 |
| --- a/arch/hexagon/include/asm/spinlock_types.h |
| +++ b/arch/hexagon/include/asm/spinlock_types.h |
| @@ -21,10 +21,6 @@ |
| #ifndef _ASM_SPINLOCK_TYPES_H |
| #define _ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int lock; |
| } arch_spinlock_t; |
| diff --git a/arch/ia64/include/asm/spinlock_types.h b/arch/ia64/include/asm/spinlock_types.h |
| index e2b42a52a6d3..0a511f277107 100644 |
| --- a/arch/ia64/include/asm/spinlock_types.h |
| +++ b/arch/ia64/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_IA64_SPINLOCK_TYPES_H |
| #define _ASM_IA64_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int lock; |
| } arch_spinlock_t; |
| diff --git a/arch/m32r/include/asm/spinlock_types.h b/arch/m32r/include/asm/spinlock_types.h |
| index 92e27672661f..4be1eaef684c 100644 |
| --- a/arch/m32r/include/asm/spinlock_types.h |
| +++ b/arch/m32r/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_M32R_SPINLOCK_TYPES_H |
| #define _ASM_M32R_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile int slock; |
| } arch_spinlock_t; |
| diff --git a/arch/metag/include/asm/spinlock_types.h b/arch/metag/include/asm/spinlock_types.h |
| index b76391405fea..7c4ed51345b6 100644 |
| --- a/arch/metag/include/asm/spinlock_types.h |
| +++ b/arch/metag/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_METAG_SPINLOCK_TYPES_H |
| #define _ASM_METAG_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int lock; |
| } arch_spinlock_t; |
| diff --git a/arch/mips/include/asm/spinlock_types.h b/arch/mips/include/asm/spinlock_types.h |
| index 9b2528e612c0..ba8def153b8c 100644 |
| --- a/arch/mips/include/asm/spinlock_types.h |
| +++ b/arch/mips/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_SPINLOCK_TYPES_H |
| #define _ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| #include <linux/types.h> |
| |
| #include <asm/byteorder.h> |
| diff --git a/arch/mn10300/include/asm/spinlock_types.h b/arch/mn10300/include/asm/spinlock_types.h |
| index 653dc519b405..b3c3c9a5c906 100644 |
| --- a/arch/mn10300/include/asm/spinlock_types.h |
| +++ b/arch/mn10300/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_SPINLOCK_TYPES_H |
| #define _ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct arch_spinlock { |
| unsigned int slock; |
| } arch_spinlock_t; |
| diff --git a/arch/powerpc/include/asm/spinlock_types.h b/arch/powerpc/include/asm/spinlock_types.h |
| index 2351adc4fdc4..e24b225bab55 100644 |
| --- a/arch/powerpc/include/asm/spinlock_types.h |
| +++ b/arch/powerpc/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef _ASM_POWERPC_SPINLOCK_TYPES_H |
| #define _ASM_POWERPC_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int slock; |
| } arch_spinlock_t; |
| diff --git a/arch/s390/include/asm/spinlock_types.h b/arch/s390/include/asm/spinlock_types.h |
| index fe755eec275f..d16d924d9393 100644 |
| --- a/arch/s390/include/asm/spinlock_types.h |
| +++ b/arch/s390/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __ASM_SPINLOCK_TYPES_H |
| #define __ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| int lock; |
| } __attribute__ ((aligned (4))) arch_spinlock_t; |
| diff --git a/arch/sh/include/asm/spinlock_types.h b/arch/sh/include/asm/spinlock_types.h |
| index 9b7560db06ca..01e48095fb40 100644 |
| --- a/arch/sh/include/asm/spinlock_types.h |
| +++ b/arch/sh/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __ASM_SH_SPINLOCK_TYPES_H |
| #define __ASM_SH_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int lock; |
| } arch_spinlock_t; |
| diff --git a/arch/sparc/include/asm/spinlock_types.h b/arch/sparc/include/asm/spinlock_types.h |
| index 9c454fdeaad8..019c0855bf8b 100644 |
| --- a/arch/sparc/include/asm/spinlock_types.h |
| +++ b/arch/sparc/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __SPARC_SPINLOCK_TYPES_H |
| #define __SPARC_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned char lock; |
| } arch_spinlock_t; |
| diff --git a/arch/tile/include/asm/spinlock_types.h b/arch/tile/include/asm/spinlock_types.h |
| index a71f59b49c50..9311c6ff2abc 100644 |
| --- a/arch/tile/include/asm/spinlock_types.h |
| +++ b/arch/tile/include/asm/spinlock_types.h |
| @@ -15,10 +15,6 @@ |
| #ifndef _ASM_TILE_SPINLOCK_TYPES_H |
| #define _ASM_TILE_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| #ifdef __tilegx__ |
| |
| /* Low 15 bits are "next"; high 15 bits are "current". */ |
| diff --git a/arch/xtensa/include/asm/spinlock_types.h b/arch/xtensa/include/asm/spinlock_types.h |
| index 7ec5ce10c9e9..d765cb2dec85 100644 |
| --- a/arch/xtensa/include/asm/spinlock_types.h |
| +++ b/arch/xtensa/include/asm/spinlock_types.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __ASM_SPINLOCK_TYPES_H |
| #define __ASM_SPINLOCK_TYPES_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| typedef struct { |
| volatile unsigned int slock; |
| } arch_spinlock_t; |
| diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h |
| index c09b6407ae1b..b0243ba07fb7 100644 |
| --- a/include/linux/spinlock_types_up.h |
| +++ b/include/linux/spinlock_types_up.h |
| @@ -1,10 +1,6 @@ |
| #ifndef __LINUX_SPINLOCK_TYPES_UP_H |
| #define __LINUX_SPINLOCK_TYPES_UP_H |
| |
| -#ifndef __LINUX_SPINLOCK_TYPES_H |
| -# error "please don't include this file directly" |
| -#endif |
| - |
| /* |
| * include/linux/spinlock_types_up.h - spinlock type definitions for UP |
| * |
| -- |
| 2.1.4 |
| |