diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-03-24 06:15:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:15 -0500 |
commit | 3d1712c91df01d2573b934e972e231e8edb102c7 (patch) | |
tree | 71ed84ab8e8a59517ec1b7b1af082adc2beb1758 /include/asm-x86_64/pgtable.h | |
parent | 9b04c997b1120feefa1e6ee8e2902270bc055cd2 (diff) |
[PATCH] x86_64: {set,clear,test}_bit() related cleanup and pci_mmcfg_init() fix
While working on these patch set, I found several possible cleanup on x86-64
and ia64.
akpm: I stole this from Andi's queue.
Not only does it clean up bitops. It also unrelatedly changes the prototype
of pci_mmcfg_init() and removes its arch_initcall(). It seems that the wrong
two patches got joined together, but this is the one which has been tested.
This patch fixes the current x86_64 build error (the pci_mmcfg_init()
declaration in arch/i386/pci/pci.h disagrees with the definition in
arch/x86_64/pci/mmconfig.c)
This also means that x86_64's pci_mmcfg_init() gets called in the same (new)
manner as x86's: from arch/i386/pci/init.c:pci_access_init(), rather than via
initcall.
The bitops cleanups came along for free.
All this worked OK in -mm testing (since 2.6.16-rc4-mm1) because x86_64 was
tested with both patches applied.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Con Kolivas <kernel@kolivas.org>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/pgtable.h')
-rw-r--r-- | include/asm-x86_64/pgtable.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index a617d364d08d..def903287193 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -293,19 +293,19 @@ static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned | |||
293 | { | 293 | { |
294 | if (!pte_dirty(*ptep)) | 294 | if (!pte_dirty(*ptep)) |
295 | return 0; | 295 | return 0; |
296 | return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); | 296 | return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte); |
297 | } | 297 | } |
298 | 298 | ||
299 | static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) | 299 | static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) |
300 | { | 300 | { |
301 | if (!pte_young(*ptep)) | 301 | if (!pte_young(*ptep)) |
302 | return 0; | 302 | return 0; |
303 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); | 303 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte); |
304 | } | 304 | } |
305 | 305 | ||
306 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 306 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
307 | { | 307 | { |
308 | clear_bit(_PAGE_BIT_RW, ptep); | 308 | clear_bit(_PAGE_BIT_RW, &ptep->pte); |
309 | } | 309 | } |
310 | 310 | ||
311 | /* | 311 | /* |