aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 15:13:20 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 15:13:20 -0400
commitf6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c (patch)
treec5643fcdc884a8d0bfc3f1bc28039cab7394e5bc /include/asm-generic
parent323ec001c6bb98eeabb5abbdbb8c8055d9496554 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into core/generic-dma-coherent
Conflicts: kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/Kbuild.asm2
-rw-r--r--include/asm-generic/atomic.h2
-rw-r--r--include/asm-generic/pgtable.h57
-rw-r--r--include/asm-generic/topology.h3
-rw-r--r--include/asm-generic/vmlinux.lds.h33
5 files changed, 94 insertions, 3 deletions
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 92a6d91d0c1a..7cd25b8e7c9a 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,6 +1,6 @@
1header-y += kvm.h 1header-y += kvm.h
2 2
3ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) 3ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
4unifdef-y += a.out.h 4unifdef-y += a.out.h
5endif 5endif
6unifdef-y += auxvec.h 6unifdef-y += auxvec.h
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index 85fd0aa27a8c..4ec0a296bdec 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -2,7 +2,7 @@
2#define _ASM_GENERIC_ATOMIC_H 2#define _ASM_GENERIC_ATOMIC_H
3/* 3/*
4 * Copyright (C) 2005 Silicon Graphics, Inc. 4 * Copyright (C) 2005 Silicon Graphics, Inc.
5 * Christoph Lameter <clameter@sgi.com> 5 * Christoph Lameter
6 * 6 *
7 * Allows to provide arch independent atomic definitions without the need to 7 * Allows to provide arch independent atomic definitions without the need to
8 * edit all arch specific atomic.h files. 8 * edit all arch specific atomic.h files.
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 44ef329531c3..ef87f889ef62 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -195,6 +195,63 @@ static inline int pmd_none_or_clear_bad(pmd_t *pmd)
195 } 195 }
196 return 0; 196 return 0;
197} 197}
198
199static inline pte_t __ptep_modify_prot_start(struct mm_struct *mm,
200 unsigned long addr,
201 pte_t *ptep)
202{
203 /*
204 * Get the current pte state, but zero it out to make it
205 * non-present, preventing the hardware from asynchronously
206 * updating it.
207 */
208 return ptep_get_and_clear(mm, addr, ptep);
209}
210
211static inline void __ptep_modify_prot_commit(struct mm_struct *mm,
212 unsigned long addr,
213 pte_t *ptep, pte_t pte)
214{
215 /*
216 * The pte is non-present, so there's no hardware state to
217 * preserve.
218 */
219 set_pte_at(mm, addr, ptep, pte);
220}
221
222#ifndef __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
223/*
224 * Start a pte protection read-modify-write transaction, which
225 * protects against asynchronous hardware modifications to the pte.
226 * The intention is not to prevent the hardware from making pte
227 * updates, but to prevent any updates it may make from being lost.
228 *
229 * This does not protect against other software modifications of the
230 * pte; the appropriate pte lock must be held over the transation.
231 *
232 * Note that this interface is intended to be batchable, meaning that
233 * ptep_modify_prot_commit may not actually update the pte, but merely
234 * queue the update to be done at some later time. The update must be
235 * actually committed before the pte lock is released, however.
236 */
237static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,
238 unsigned long addr,
239 pte_t *ptep)
240{
241 return __ptep_modify_prot_start(mm, addr, ptep);
242}
243
244/*
245 * Commit an update to a pte, leaving any hardware-controlled bits in
246 * the PTE unmodified.
247 */
248static inline void ptep_modify_prot_commit(struct mm_struct *mm,
249 unsigned long addr,
250 pte_t *ptep, pte_t pte)
251{
252 __ptep_modify_prot_commit(mm, addr, ptep, pte);
253}
254#endif /* __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION */
198#endif /* CONFIG_MMU */ 255#endif /* CONFIG_MMU */
199 256
200/* 257/*
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index a6aea79bca4f..54bbf6e04ee8 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -60,7 +60,8 @@
60#ifndef node_to_cpumask_ptr 60#ifndef node_to_cpumask_ptr
61 61
62#define node_to_cpumask_ptr(v, node) \ 62#define node_to_cpumask_ptr(v, node) \
63 cpumask_t _##v = node_to_cpumask(node), *v = &_##v 63 cpumask_t _##v = node_to_cpumask(node); \
64 const cpumask_t *v = &_##v
64 65
65#define node_to_cpumask_ptr_next(v, node) \ 66#define node_to_cpumask_ptr_next(v, node) \
66 _##v = node_to_cpumask(node) 67 _##v = node_to_cpumask(node)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f054778e916c..729f6b0a60e9 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -67,6 +67,8 @@
67 *(.rodata1) \ 67 *(.rodata1) \
68 } \ 68 } \
69 \ 69 \
70 BUG_TABLE \
71 \
70 /* PCI quirks */ \ 72 /* PCI quirks */ \
71 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ 73 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
72 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ 74 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
@@ -84,6 +86,19 @@
84 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \ 86 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
85 *(.pci_fixup_resume) \ 87 *(.pci_fixup_resume) \
86 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \ 88 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
89 VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .; \
90 *(.pci_fixup_resume_early) \
91 VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .; \
92 VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .; \
93 *(.pci_fixup_suspend) \
94 VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \
95 } \
96 \
97 /* Built-in firmware blobs */ \
98 .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
99 VMLINUX_SYMBOL(__start_builtin_fw) = .; \
100 *(.builtin_fw) \
101 VMLINUX_SYMBOL(__end_builtin_fw) = .; \
87 } \ 102 } \
88 \ 103 \
89 /* RapidIO route ops */ \ 104 /* RapidIO route ops */ \
@@ -93,6 +108,8 @@
93 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \ 108 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
94 } \ 109 } \
95 \ 110 \
111 TRACEDATA \
112 \
96 /* Kernel symbol table: Normal symbols */ \ 113 /* Kernel symbol table: Normal symbols */ \
97 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ 114 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
98 VMLINUX_SYMBOL(__start___ksymtab) = .; \ 115 VMLINUX_SYMBOL(__start___ksymtab) = .; \
@@ -310,6 +327,7 @@
310 .stab.indexstr 0 : { *(.stab.indexstr) } \ 327 .stab.indexstr 0 : { *(.stab.indexstr) } \
311 .comment 0 : { *(.comment) } 328 .comment 0 : { *(.comment) }
312 329
330#ifdef CONFIG_GENERIC_BUG
313#define BUG_TABLE \ 331#define BUG_TABLE \
314 . = ALIGN(8); \ 332 . = ALIGN(8); \
315 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \ 333 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
@@ -317,6 +335,21 @@
317 *(__bug_table) \ 335 *(__bug_table) \
318 __stop___bug_table = .; \ 336 __stop___bug_table = .; \
319 } 337 }
338#else
339#define BUG_TABLE
340#endif
341
342#ifdef CONFIG_PM_TRACE
343#define TRACEDATA \
344 . = ALIGN(4); \
345 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
346 __tracedata_start = .; \
347 *(.tracedata) \
348 __tracedata_end = .; \
349 }
350#else
351#define TRACEDATA
352#endif
320 353
321#define NOTES \ 354#define NOTES \
322 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ 355 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \