Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: remove quicklists
x86: ia32 syscall restart fix
x86: ioremap, remove WARN_ON()

+52 -23
-3
arch/x86/Kconfig
··· 66 config ZONE_DMA 67 def_bool y 68 69 - config QUICKLIST 70 - def_bool X86_32 71 - 72 config SBUS 73 bool 74
··· 66 config ZONE_DMA 67 def_bool y 68 69 config SBUS 70 bool 71
+8 -1
arch/x86/kernel/ptrace.c
··· 1055 R32(esi, si); 1056 R32(ebp, bp); 1057 R32(eax, ax); 1058 - R32(orig_eax, orig_ax); 1059 R32(eip, ip); 1060 R32(esp, sp); 1061 1062 case offsetof(struct user32, regs.eflags): 1063 return set_flags(child, value);
··· 1055 R32(esi, si); 1056 R32(ebp, bp); 1057 R32(eax, ax); 1058 R32(eip, ip); 1059 R32(esp, sp); 1060 + 1061 + case offsetof(struct user32, regs.orig_eax): 1062 + /* 1063 + * Sign-extend the value so that orig_eax = -1 1064 + * causes (long)orig_ax < 0 tests to fire correctly. 1065 + */ 1066 + regs->orig_ax = (long) (s32) value; 1067 + break; 1068 1069 case offsetof(struct user32, regs.eflags): 1070 return set_flags(child, value);
+33 -5
arch/x86/kernel/signal_64.c
··· 311 } 312 313 /* 314 * OK, we're invoking a handler 315 */ 316 ··· 356 #endif 357 358 /* Are we from a system call? */ 359 - if ((long)regs->orig_ax >= 0) { 360 /* If so, check system call restarting.. */ 361 - switch (regs->ax) { 362 case -ERESTART_RESTARTBLOCK: 363 case -ERESTARTNOHAND: 364 regs->ax = -EINTR; ··· 455 } 456 457 /* Did we come from a system call? */ 458 - if ((long)regs->orig_ax >= 0) { 459 /* Restart the system call - no handlers present */ 460 - long res = regs->ax; 461 - switch (res) { 462 case -ERESTARTNOHAND: 463 case -ERESTARTSYS: 464 case -ERESTARTNOINTR:
··· 311 } 312 313 /* 314 + * Return -1L or the syscall number that @regs is executing. 315 + */ 316 + static long current_syscall(struct pt_regs *regs) 317 + { 318 + /* 319 + * We always sign-extend a -1 value being set here, 320 + * so this is always either -1L or a syscall number. 321 + */ 322 + return regs->orig_ax; 323 + } 324 + 325 + /* 326 + * Return a value that is -EFOO if the system call in @regs->orig_ax 327 + * returned an error. This only works for @regs from @current. 328 + */ 329 + static long current_syscall_ret(struct pt_regs *regs) 330 + { 331 + #ifdef CONFIG_IA32_EMULATION 332 + if (test_thread_flag(TIF_IA32)) 333 + /* 334 + * Sign-extend the value so (int)-EFOO becomes (long)-EFOO 335 + * and will match correctly in comparisons. 336 + */ 337 + return (int) regs->ax; 338 + #endif 339 + return regs->ax; 340 + } 341 + 342 + /* 343 * OK, we're invoking a handler 344 */ 345 ··· 327 #endif 328 329 /* Are we from a system call? */ 330 + if (current_syscall(regs) >= 0) { 331 /* If so, check system call restarting.. */ 332 + switch (current_syscall_ret(regs)) { 333 case -ERESTART_RESTARTBLOCK: 334 case -ERESTARTNOHAND: 335 regs->ax = -EINTR; ··· 426 } 427 428 /* Did we come from a system call? */ 429 + if (current_syscall(regs) >= 0) { 430 /* Restart the system call - no handlers present */ 431 + switch (current_syscall_ret(regs)) { 432 case -ERESTARTNOHAND: 433 case -ERESTARTSYS: 434 case -ERESTARTNOINTR:
-2
arch/x86/mm/ioremap.c
··· 134 return NULL; 135 } 136 137 - WARN_ON_ONCE(page_is_ram(pfn)); 138 - 139 switch (mode) { 140 case IOR_MODE_UNCACHED: 141 default:
··· 134 return NULL; 135 } 136 137 switch (mode) { 138 case IOR_MODE_UNCACHED: 139 default:
+9 -9
arch/x86/mm/pgtable_32.c
··· 342 343 pgd_t *pgd_alloc(struct mm_struct *mm) 344 { 345 - pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor); 346 347 - mm->pgd = pgd; /* so that alloc_pd can use it */ 348 349 if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { 350 - quicklist_free(0, pgd_dtor, pgd); 351 pgd = NULL; 352 } 353 ··· 361 void pgd_free(struct mm_struct *mm, pgd_t *pgd) 362 { 363 pgd_mop_up_pmds(mm, pgd); 364 - quicklist_free(0, pgd_dtor, pgd); 365 - } 366 - 367 - void check_pgt_cache(void) 368 - { 369 - quicklist_trim(0, pgd_dtor, 25, 16); 370 } 371 372 void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
··· 342 343 pgd_t *pgd_alloc(struct mm_struct *mm) 344 { 345 + pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); 346 347 + /* so that alloc_pd can use it */ 348 + mm->pgd = pgd; 349 + if (pgd) 350 + pgd_ctor(pgd); 351 352 if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { 353 + pgd_dtor(pgd); 354 + free_page((unsigned long)pgd); 355 pgd = NULL; 356 } 357 ··· 357 void pgd_free(struct mm_struct *mm, pgd_t *pgd) 358 { 359 pgd_mop_up_pmds(mm, pgd); 360 + pgd_dtor(pgd); 361 + free_page((unsigned long)pgd); 362 } 363 364 void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
+2 -3
include/asm-x86/pgtable_32.h
··· 26 struct vm_area_struct; 27 28 extern pgd_t swapper_pg_dir[1024]; 29 - extern struct kmem_cache *pmd_cache; 30 - void check_pgt_cache(void); 31 32 - static inline void pgtable_cache_init(void) {} 33 void paging_init(void); 34 35
··· 26 struct vm_area_struct; 27 28 extern pgd_t swapper_pg_dir[1024]; 29 30 + static inline void pgtable_cache_init(void) { } 31 + static inline void check_pgt_cache(void) { } 32 void paging_init(void); 33 34