diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
| commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
| tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /arch/powerpc/mm/hugetlbpage.c | |
| parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
| parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) | |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
[POWERPC] remove kernel module option for booke wdt
[POWERPC] Avoid putting cpu node twice
[POWERPC] Spinlock initializer cleanup
[POWERPC] ppc4xx_sgdma needs dma-mapping.h
[POWERPC] arch/powerpc/sysdev/timer.c build fix
[POWERPC] get_property cleanups
[POWERPC] Remove the unused HTDMSOUND driver
[POWERPC] cell: cbe_cpufreq cleanup and crash fix
[POWERPC] Declare enable_kernel_spe in a header
[POWERPC] Add dt_xlate_addr() to bootwrapper
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
[POWERPC] Add uartlite boot console driver for the zImage wrapper
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
[POWERPC] Merge common virtex header files
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
[POWERPC] Clean up cpufreq Kconfig dependencies
...
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
| -rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index f6ffaaa7a5bf..8508f973d9cc 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
| @@ -316,12 +316,11 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | |||
| 316 | { | 316 | { |
| 317 | if (pte_present(*ptep)) { | 317 | if (pte_present(*ptep)) { |
| 318 | /* We open-code pte_clear because we need to pass the right | 318 | /* We open-code pte_clear because we need to pass the right |
| 319 | * argument to hpte_update (huge / !huge) | 319 | * argument to hpte_need_flush (huge / !huge). Might not be |
| 320 | * necessary anymore if we make hpte_need_flush() get the | ||
| 321 | * page size from the slices | ||
| 320 | */ | 322 | */ |
| 321 | unsigned long old = pte_update(ptep, ~0UL); | 323 | pte_update(mm, addr & HPAGE_MASK, ptep, ~0UL, 1); |
| 322 | if (old & _PAGE_HASHPTE) | ||
| 323 | hpte_update(mm, addr & HPAGE_MASK, ptep, old, 1); | ||
| 324 | flush_tlb_pending(); | ||
| 325 | } | 324 | } |
| 326 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | 325 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
| 327 | } | 326 | } |
| @@ -329,12 +328,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | |||
| 329 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | 328 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |
| 330 | pte_t *ptep) | 329 | pte_t *ptep) |
| 331 | { | 330 | { |
| 332 | unsigned long old = pte_update(ptep, ~0UL); | 331 | unsigned long old = pte_update(mm, addr, ptep, ~0UL, 1); |
| 333 | |||
| 334 | if (old & _PAGE_HASHPTE) | ||
| 335 | hpte_update(mm, addr & HPAGE_MASK, ptep, old, 1); | ||
| 336 | *ptep = __pte(0); | ||
| 337 | |||
| 338 | return __pte(old); | 332 | return __pte(old); |
| 339 | } | 333 | } |
| 340 | 334 | ||
