diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
| commit | ff877ea80efa2015b6263766f78ee42c2a1b32f9 (patch) | |
| tree | 85205005c611ab774702148558321c6fb92f1ccd /include/asm-generic | |
| parent | 30821fee4f0cb3e6d241d9f7ddc37742212e3eb7 (diff) | |
| parent | d37e6bf68fc1eb34a4ad21d9ae8890ed37ea80e7 (diff) | |
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/pgtable.h | 57 | ||||
| -rw-r--r-- | include/asm-generic/topology.h | 3 | ||||
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 33 |
3 files changed, 92 insertions, 1 deletions
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 | |||
| 199 | static 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 | |||
| 211 | static 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 | */ | ||
| 237 | static 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 | */ | ||
| 248 | static 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) { \ |
