fault.c (f86268549f424f83b9eb0963989270e14fbfc3de) | fault.c (a79e53d85683c6dd9f99c90511028adc2043031f) |
---|---|
1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. 4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar 5 */ 6#include <linux/magic.h> /* STACK_END_MAGIC */ 7#include <linux/sched.h> /* test_thread_flag(), ... */ 8#include <linux/kdebug.h> /* oops_begin/end, ... */ --- 215 unchanged lines hidden (view full) --- 224 unsigned long address; 225 226 if (SHARED_KERNEL_PMD) 227 return; 228 229 for (address = VMALLOC_START & PMD_MASK; 230 address >= TASK_SIZE && address < FIXADDR_TOP; 231 address += PMD_SIZE) { | 1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. 4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar 5 */ 6#include <linux/magic.h> /* STACK_END_MAGIC */ 7#include <linux/sched.h> /* test_thread_flag(), ... */ 8#include <linux/kdebug.h> /* oops_begin/end, ... */ --- 215 unchanged lines hidden (view full) --- 224 unsigned long address; 225 226 if (SHARED_KERNEL_PMD) 227 return; 228 229 for (address = VMALLOC_START & PMD_MASK; 230 address >= TASK_SIZE && address < FIXADDR_TOP; 231 address += PMD_SIZE) { |
232 233 unsigned long flags; | |
234 struct page *page; 235 | 232 struct page *page; 233 |
236 spin_lock_irqsave(&pgd_lock, flags); | 234 spin_lock(&pgd_lock); |
237 list_for_each_entry(page, &pgd_list, lru) { 238 spinlock_t *pgt_lock; 239 pmd_t *ret; 240 | 235 list_for_each_entry(page, &pgd_list, lru) { 236 spinlock_t *pgt_lock; 237 pmd_t *ret; 238 |
239 /* the pgt_lock only for Xen */ |
|
241 pgt_lock = &pgd_page_get_mm(page)->page_table_lock; 242 243 spin_lock(pgt_lock); 244 ret = vmalloc_sync_one(page_address(page), address); 245 spin_unlock(pgt_lock); 246 247 if (!ret) 248 break; 249 } | 240 pgt_lock = &pgd_page_get_mm(page)->page_table_lock; 241 242 spin_lock(pgt_lock); 243 ret = vmalloc_sync_one(page_address(page), address); 244 spin_unlock(pgt_lock); 245 246 if (!ret) 247 break; 248 } |
250 spin_unlock_irqrestore(&pgd_lock, flags); | 249 spin_unlock(&pgd_lock); |
251 } 252} 253 254/* 255 * 32-bit: 256 * 257 * Handle a fault on the vmalloc or module mapping area 258 */ --- 909 unchanged lines hidden --- | 250 } 251} 252 253/* 254 * 32-bit: 255 * 256 * Handle a fault on the vmalloc or module mapping area 257 */ --- 909 unchanged lines hidden --- |