Skip to content

Commit b20dcab

Browse files
committed
Merge tag 'llvmlinux-for-v3.16' of git://git.linuxfoundation.org/llvmlinux/kernel
Pull LLVM patches from Behan Webster: "Next set of patches to support compiling the kernel with clang. They've been soaking in linux-next since the last merge window. More still in the works for the next merge window..." * tag 'llvmlinux-for-v3.16' of git://git.linuxfoundation.org/llvmlinux/kernel: arm, unwind, LLVMLinux: Enable clang to be used for unwinding the stack ARM: LLVMLinux: Change "extern inline" to "static inline" in glue-cache.h all: LLVMLinux: Change DWARF flag to support gcc and clang net: netfilter: LLVMLinux: vlais-netfilter crypto: LLVMLinux: aligned-attribute.patch
2 parents ed81e78 + e6b8075 commit b20dcab

File tree

5 files changed

+32
-19
lines changed

5 files changed

+32
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ endif
671671

672672
ifdef CONFIG_DEBUG_INFO
673673
KBUILD_CFLAGS += -g
674-
KBUILD_AFLAGS += -Wa,--gdwarf-2
674+
KBUILD_AFLAGS += -Wa,-gdwarf-2
675675
endif
676676

677677
ifdef CONFIG_DEBUG_INFO_REDUCED

arch/arm/include/asm/glue-cache.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,22 @@
130130
#endif
131131

132132
#ifndef __ASSEMBLER__
133-
extern inline void nop_flush_icache_all(void) { }
134-
extern inline void nop_flush_kern_cache_all(void) { }
135-
extern inline void nop_flush_kern_cache_louis(void) { }
136-
extern inline void nop_flush_user_cache_all(void) { }
137-
extern inline void nop_flush_user_cache_range(unsigned long a,
133+
static inline void nop_flush_icache_all(void) { }
134+
static inline void nop_flush_kern_cache_all(void) { }
135+
static inline void nop_flush_kern_cache_louis(void) { }
136+
static inline void nop_flush_user_cache_all(void) { }
137+
static inline void nop_flush_user_cache_range(unsigned long a,
138138
unsigned long b, unsigned int c) { }
139139

140-
extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
141-
extern inline int nop_coherent_user_range(unsigned long a,
140+
static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
141+
static inline int nop_coherent_user_range(unsigned long a,
142142
unsigned long b) { return 0; }
143-
extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
143+
static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
144144

145-
extern inline void nop_dma_flush_range(const void *a, const void *b) { }
145+
static inline void nop_dma_flush_range(const void *a, const void *b) { }
146146

147-
extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
148-
extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
147+
static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
148+
static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
149149
#endif
150150

151151
#ifndef MULTI_CACHE

arch/arm/kernel/unwind.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#warning Your compiler does not have EABI support.
3232
#warning ARM unwind is known to compile only with EABI compilers.
3333
#warning Change compiler or disable ARM_UNWIND option.
34-
#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
34+
#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2) && !defined(__clang__)
3535
#warning Your compiler is too buggy; it is known to not compile ARM unwind support.
3636
#warning Change compiler or disable ARM_UNWIND option.
3737
#endif

crypto/shash.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ EXPORT_SYMBOL_GPL(crypto_shash_setkey);
6767
static inline unsigned int shash_align_buffer_size(unsigned len,
6868
unsigned long mask)
6969
{
70-
return len + (mask & ~(__alignof__(u8 __attribute__ ((aligned))) - 1));
70+
typedef u8 __attribute__ ((aligned)) u8_aligned;
71+
return len + (mask & ~(__alignof__(u8_aligned) - 1));
7172
}
7273

7374
static int shash_update_unaligned(struct shash_desc *desc, const u8 *data,

net/netfilter/xt_repldata.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,35 @@
55
* they serve as the hanging-off data accessed through repl.data[].
66
*/
77

8+
/* tbl has the following structure equivalent, but is C99 compliant:
9+
* struct {
10+
* struct type##_replace repl;
11+
* struct type##_standard entries[nhooks];
12+
* struct type##_error term;
13+
* } *tbl;
14+
*/
15+
816
#define xt_alloc_initial_table(type, typ2) ({ \
917
unsigned int hook_mask = info->valid_hooks; \
1018
unsigned int nhooks = hweight32(hook_mask); \
1119
unsigned int bytes = 0, hooknum = 0, i = 0; \
1220
struct { \
1321
struct type##_replace repl; \
14-
struct type##_standard entries[nhooks]; \
15-
struct type##_error term; \
16-
} *tbl = kzalloc(sizeof(*tbl), GFP_KERNEL); \
22+
struct type##_standard entries[]; \
23+
} *tbl; \
24+
struct type##_error *term; \
25+
size_t term_offset = (offsetof(typeof(*tbl), entries[nhooks]) + \
26+
__alignof__(*term) - 1) & ~(__alignof__(*term) - 1); \
27+
tbl = kzalloc(term_offset + sizeof(*term), GFP_KERNEL); \
1728
if (tbl == NULL) \
1829
return NULL; \
30+
term = (struct type##_error *)&(((char *)tbl)[term_offset]); \
1931
strncpy(tbl->repl.name, info->name, sizeof(tbl->repl.name)); \
20-
tbl->term = (struct type##_error)typ2##_ERROR_INIT; \
32+
*term = (struct type##_error)typ2##_ERROR_INIT; \
2133
tbl->repl.valid_hooks = hook_mask; \
2234
tbl->repl.num_entries = nhooks + 1; \
2335
tbl->repl.size = nhooks * sizeof(struct type##_standard) + \
24-
sizeof(struct type##_error); \
36+
sizeof(struct type##_error); \
2537
for (; hook_mask != 0; hook_mask >>= 1, ++hooknum) { \
2638
if (!(hook_mask & 1)) \
2739
continue; \

0 commit comments

Comments
 (0)