diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bug.h | 8 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 50 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 31 |
3 files changed, 88 insertions, 1 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 12c07c1866b2..4c794d73fb84 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -8,9 +8,17 @@ | |||
8 | #ifdef CONFIG_GENERIC_BUG | 8 | #ifdef CONFIG_GENERIC_BUG |
9 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
10 | struct bug_entry { | 10 | struct bug_entry { |
11 | #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS | ||
11 | unsigned long bug_addr; | 12 | unsigned long bug_addr; |
13 | #else | ||
14 | signed int bug_addr_disp; | ||
15 | #endif | ||
12 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 16 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
17 | #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS | ||
13 | const char *file; | 18 | const char *file; |
19 | #else | ||
20 | signed int file_disp; | ||
21 | #endif | ||
14 | unsigned short line; | 22 | unsigned short line; |
15 | #endif | 23 | #endif |
16 | unsigned short flags; | 24 | unsigned short flags; |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index ef87f889ef62..72ebe91005a8 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -129,6 +129,10 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | 129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #ifndef pgprot_writecombine | ||
133 | #define pgprot_writecombine pgprot_noncached | ||
134 | #endif | ||
135 | |||
132 | /* | 136 | /* |
133 | * When walking page tables, get the address of the next boundary, | 137 | * When walking page tables, get the address of the next boundary, |
134 | * or the end address of the range if that comes earlier. Although no | 138 | * or the end address of the range if that comes earlier. Although no |
@@ -289,6 +293,52 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm, | |||
289 | #define arch_flush_lazy_cpu_mode() do {} while (0) | 293 | #define arch_flush_lazy_cpu_mode() do {} while (0) |
290 | #endif | 294 | #endif |
291 | 295 | ||
296 | #ifndef __HAVE_PFNMAP_TRACKING | ||
297 | /* | ||
298 | * Interface that can be used by architecture code to keep track of | ||
299 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
300 | * | ||
301 | * track_pfn_vma_new is called when a _new_ pfn mapping is being established | ||
302 | * for physical range indicated by pfn and size. | ||
303 | */ | ||
304 | static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, | ||
305 | unsigned long pfn, unsigned long size) | ||
306 | { | ||
307 | return 0; | ||
308 | } | ||
309 | |||
310 | /* | ||
311 | * Interface that can be used by architecture code to keep track of | ||
312 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
313 | * | ||
314 | * track_pfn_vma_copy is called when vma that is covering the pfnmap gets | ||
315 | * copied through copy_page_range(). | ||
316 | */ | ||
317 | static inline int track_pfn_vma_copy(struct vm_area_struct *vma) | ||
318 | { | ||
319 | return 0; | ||
320 | } | ||
321 | |||
322 | /* | ||
323 | * Interface that can be used by architecture code to keep track of | ||
324 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
325 | * | ||
326 | * untrack_pfn_vma is called while unmapping a pfnmap for a region. | ||
327 | * untrack can be called for a specific region indicated by pfn and size or | ||
328 | * can be for the entire vma (in which case size can be zero). | ||
329 | */ | ||
330 | static inline void untrack_pfn_vma(struct vm_area_struct *vma, | ||
331 | unsigned long pfn, unsigned long size) | ||
332 | { | ||
333 | } | ||
334 | #else | ||
335 | extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, | ||
336 | unsigned long pfn, unsigned long size); | ||
337 | extern int track_pfn_vma_copy(struct vm_area_struct *vma); | ||
338 | extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, | ||
339 | unsigned long size); | ||
340 | #endif | ||
341 | |||
292 | #endif /* !__ASSEMBLY__ */ | 342 | #endif /* !__ASSEMBLY__ */ |
293 | 343 | ||
294 | #endif /* _ASM_GENERIC_PGTABLE_H */ | 344 | #endif /* _ASM_GENERIC_PGTABLE_H */ |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 80744606bad1..c61fab1dd2f8 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -45,6 +45,22 @@ | |||
45 | #define MCOUNT_REC() | 45 | #define MCOUNT_REC() |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifdef CONFIG_TRACE_BRANCH_PROFILING | ||
49 | #define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \ | ||
50 | *(_ftrace_annotated_branch) \ | ||
51 | VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .; | ||
52 | #else | ||
53 | #define LIKELY_PROFILE() | ||
54 | #endif | ||
55 | |||
56 | #ifdef CONFIG_PROFILE_ALL_BRANCHES | ||
57 | #define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \ | ||
58 | *(_ftrace_branch) \ | ||
59 | VMLINUX_SYMBOL(__stop_branch_profile) = .; | ||
60 | #else | ||
61 | #define BRANCH_PROFILE() | ||
62 | #endif | ||
63 | |||
48 | /* .data section */ | 64 | /* .data section */ |
49 | #define DATA_DATA \ | 65 | #define DATA_DATA \ |
50 | *(.data) \ | 66 | *(.data) \ |
@@ -60,9 +76,12 @@ | |||
60 | VMLINUX_SYMBOL(__start___markers) = .; \ | 76 | VMLINUX_SYMBOL(__start___markers) = .; \ |
61 | *(__markers) \ | 77 | *(__markers) \ |
62 | VMLINUX_SYMBOL(__stop___markers) = .; \ | 78 | VMLINUX_SYMBOL(__stop___markers) = .; \ |
79 | . = ALIGN(32); \ | ||
63 | VMLINUX_SYMBOL(__start___tracepoints) = .; \ | 80 | VMLINUX_SYMBOL(__start___tracepoints) = .; \ |
64 | *(__tracepoints) \ | 81 | *(__tracepoints) \ |
65 | VMLINUX_SYMBOL(__stop___tracepoints) = .; | 82 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ |
83 | LIKELY_PROFILE() \ | ||
84 | BRANCH_PROFILE() | ||
66 | 85 | ||
67 | #define RO_DATA(align) \ | 86 | #define RO_DATA(align) \ |
68 | . = ALIGN((align)); \ | 87 | . = ALIGN((align)); \ |
@@ -269,6 +288,16 @@ | |||
269 | *(.kprobes.text) \ | 288 | *(.kprobes.text) \ |
270 | VMLINUX_SYMBOL(__kprobes_text_end) = .; | 289 | VMLINUX_SYMBOL(__kprobes_text_end) = .; |
271 | 290 | ||
291 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
292 | #define IRQENTRY_TEXT \ | ||
293 | ALIGN_FUNCTION(); \ | ||
294 | VMLINUX_SYMBOL(__irqentry_text_start) = .; \ | ||
295 | *(.irqentry.text) \ | ||
296 | VMLINUX_SYMBOL(__irqentry_text_end) = .; | ||
297 | #else | ||
298 | #define IRQENTRY_TEXT | ||
299 | #endif | ||
300 | |||
272 | /* Section used for early init (in .S files) */ | 301 | /* Section used for early init (in .S files) */ |
273 | #define HEAD_TEXT *(.head.text) | 302 | #define HEAD_TEXT *(.head.text) |
274 | 303 | ||