View | Details | Raw Unified | Return to bug 44290 | Differences between
and this patch

Collapse All | Expand All | Context: (Patch / File /
)

(-)linux-2.6.34.orig/include/linux/compiler-gcc4.h (+4 lines)
 Lines 48-53    Link Here 
48
 * unreleased.  Really, we need to have autoconf for the kernel.
48
 * unreleased.  Really, we need to have autoconf for the kernel.
49
 */
49
 */
50
#define unreachable() __builtin_unreachable()
50
#define unreachable() __builtin_unreachable()
51
52
/* Mark a function definition as prohibited from being cloned. */
53
#define __noclone	__attribute__((__noclone__))
54
51
#endif
55
#endif
52
56
53
#endif
57
#endif
(-)linux-2.6.34.orig/include/linux/compiler-gcc.h (-1 / +10 lines)
 Lines 58-65    Link Here 
58
 * naked functions because then mcount is called without stack and frame pointer
58
 * naked functions because then mcount is called without stack and frame pointer
59
 * being set up and there is no chance to restore the lr register to the value
59
 * being set up and there is no chance to restore the lr register to the value
60
 * before mcount was called.
60
 * before mcount was called.
61
 *
62
 * The asm() bodies of naked functions often depend on standard calling conventions,
63
 * therefore they must be noinline and noclone.  GCC 4.[56] currently fail to enforce
64
 * this, so we must do so ourselves.  See GCC PR44290.
61
 */
65
 */
62
#define __naked				__attribute__((naked)) notrace
66
#define __naked				__attribute__((naked)) noinline __noclone notrace
63
67
64
#define __noreturn			__attribute__((noreturn))
68
#define __noreturn			__attribute__((noreturn))
65
69
 Lines 85-87    Link Here 
85
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
89
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
86
#define gcc_header(x) _gcc_header(x)
90
#define gcc_header(x) _gcc_header(x)
87
#include gcc_header(__GNUC__)
91
#include gcc_header(__GNUC__)
92
93
#if !defined(__noclone)
94
#define __noclone	/* not needed */
95
#endif
96
(-)linux-2.6.34.orig/arch/arm/mm/copypage-v4wb.c (-2 / +2 lines)
 Lines 27-33   v4wb_copy_user_page(void *kto, const voi Link Here 
27
{
27
{
28
	asm("\
28
	asm("\
29
	stmfd	sp!, {r4, lr}			@ 2\n\
29
	stmfd	sp!, {r4, lr}			@ 2\n\
30
	mov	r2, %0				@ 1\n\
30
	mov	r2, %2				@ 1\n\
31
	ldmia	r1!, {r3, r4, ip, lr}		@ 4\n\
31
	ldmia	r1!, {r3, r4, ip, lr}		@ 4\n\
32
1:	mcr	p15, 0, r0, c7, c6, 1		@ 1   invalidate D line\n\
32
1:	mcr	p15, 0, r0, c7, c6, 1		@ 1   invalidate D line\n\
33
	stmia	r0!, {r3, r4, ip, lr}		@ 4\n\
33
	stmia	r0!, {r3, r4, ip, lr}		@ 4\n\
 Lines 44-50   v4wb_copy_user_page(void *kto, const voi Link Here 
44
	mcr	p15, 0, r1, c7, c10, 4		@ 1   drain WB\n\
44
	mcr	p15, 0, r1, c7, c10, 4		@ 1   drain WB\n\
45
	ldmfd	 sp!, {r4, pc}			@ 3"
45
	ldmfd	 sp!, {r4, pc}			@ 3"
46
	:
46
	:
47
	: "I" (PAGE_SIZE / 64));
47
	: "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
48
}
48
}
49
49
50
void v4wb_copy_user_highpage(struct page *to, struct page *from,
50
void v4wb_copy_user_highpage(struct page *to, struct page *from,
(-)linux-2.6.34.orig/arch/arm/mm/copypage-v4wt.c (-2 / +2 lines)
 Lines 25-31   v4wt_copy_user_page(void *kto, const voi Link Here 
25
{
25
{
26
	asm("\
26
	asm("\
27
	stmfd	sp!, {r4, lr}			@ 2\n\
27
	stmfd	sp!, {r4, lr}			@ 2\n\
28
	mov	r2, %0				@ 1\n\
28
	mov	r2, %2				@ 1\n\
29
	ldmia	r1!, {r3, r4, ip, lr}		@ 4\n\
29
	ldmia	r1!, {r3, r4, ip, lr}		@ 4\n\
30
1:	stmia	r0!, {r3, r4, ip, lr}		@ 4\n\
30
1:	stmia	r0!, {r3, r4, ip, lr}		@ 4\n\
31
	ldmia	r1!, {r3, r4, ip, lr}		@ 4+1\n\
31
	ldmia	r1!, {r3, r4, ip, lr}		@ 4+1\n\
 Lines 40-46   v4wt_copy_user_page(void *kto, const voi Link Here 
40
	mcr	p15, 0, r2, c7, c7, 0		@ flush ID cache\n\
40
	mcr	p15, 0, r2, c7, c7, 0		@ flush ID cache\n\
41
	ldmfd	sp!, {r4, pc}			@ 3"
41
	ldmfd	sp!, {r4, pc}			@ 3"
42
	:
42
	:
43
	: "I" (PAGE_SIZE / 64));
43
	: "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
44
}
44
}
45
45
46
void v4wt_copy_user_highpage(struct page *to, struct page *from,
46
void v4wt_copy_user_highpage(struct page *to, struct page *from,
(-)linux-2.6.34.orig/arch/arm/mm/copypage-feroceon.c (-2 / +2 lines)
 Lines 18-24   feroceon_copy_user_page(void *kto, const Link Here 
18
{
18
{
19
	asm("\
19
	asm("\
20
	stmfd	sp!, {r4-r9, lr}		\n\
20
	stmfd	sp!, {r4-r9, lr}		\n\
21
	mov	ip, %0				\n\
21
	mov	ip, %2				\n\
22
1:	mov	lr, r1				\n\
22
1:	mov	lr, r1				\n\
23
	ldmia	r1!, {r2 - r9}			\n\
23
	ldmia	r1!, {r2 - r9}			\n\
24
	pld	[lr, #32]			\n\
24
	pld	[lr, #32]			\n\
 Lines 64-70   feroceon_copy_user_page(void *kto, const Link Here 
64
	mcr	p15, 0, ip, c7, c10, 4		@ drain WB\n\
64
	mcr	p15, 0, ip, c7, c10, 4		@ drain WB\n\
65
	ldmfd	sp!, {r4-r9, pc}"
65
	ldmfd	sp!, {r4-r9, pc}"
66
	:
66
	:
67
	: "I" (PAGE_SIZE));
67
	: "r" (kto), "r" (kfrom), "I" (PAGE_SIZE));
68
}
68
}
69
69
70
void feroceon_copy_user_highpage(struct page *to, struct page *from,
70
void feroceon_copy_user_highpage(struct page *to, struct page *from,
(-)linux-2.6.34.orig/arch/arm/mm/copypage-xsc3.c (-2 / +2 lines)
 Lines 34-40   xsc3_mc_copy_user_page(void *kto, const Link Here 
34
{
34
{
35
	asm("\
35
	asm("\
36
	stmfd	sp!, {r4, r5, lr}		\n\
36
	stmfd	sp!, {r4, r5, lr}		\n\
37
	mov	lr, %0				\n\
37
	mov	lr, %2				\n\
38
						\n\
38
						\n\
39
	pld	[r1, #0]			\n\
39
	pld	[r1, #0]			\n\
40
	pld	[r1, #32]			\n\
40
	pld	[r1, #32]			\n\
 Lines 67-73   xsc3_mc_copy_user_page(void *kto, const Link Here 
67
						\n\
67
						\n\
68
	ldmfd	sp!, {r4, r5, pc}"
68
	ldmfd	sp!, {r4, r5, pc}"
69
	:
69
	:
70
	: "I" (PAGE_SIZE / 64 - 1));
70
	: "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1));
71
}
71
}
72
72
73
void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,
73
void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,

Return to bug 44290