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 66 config ZONE_DMA 67 67 def_bool y 68 68 69 - config QUICKLIST 70 - def_bool X86_32 71 - 72 69 config SBUS 73 70 bool 74 71
+8 -1
arch/x86/kernel/ptrace.c
··· 1055 1055 R32(esi, si); 1056 1056 R32(ebp, bp); 1057 1057 R32(eax, ax); 1058 - R32(orig_eax, orig_ax); 1059 1058 R32(eip, ip); 1060 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; 1061 1068 1062 1069 case offsetof(struct user32, regs.eflags): 1063 1070 return set_flags(child, value);
+33 -5
arch/x86/kernel/signal_64.c
··· 311 311 } 312 312 313 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 + /* 314 343 * OK, we're invoking a handler 315 344 */ 316 345 ··· 356 327 #endif 357 328 358 329 /* Are we from a system call? */ 359 - if ((long)regs->orig_ax >= 0) { 330 + if (current_syscall(regs) >= 0) { 360 331 /* If so, check system call restarting.. */ 361 - switch (regs->ax) { 332 + switch (current_syscall_ret(regs)) { 362 333 case -ERESTART_RESTARTBLOCK: 363 334 case -ERESTARTNOHAND: 364 335 regs->ax = -EINTR; ··· 455 426 } 456 427 457 428 /* Did we come from a system call? */ 458 - if ((long)regs->orig_ax >= 0) { 429 + if (current_syscall(regs) >= 0) { 459 430 /* Restart the system call - no handlers present */ 460 - long res = regs->ax; 461 - switch (res) { 431 + switch (current_syscall_ret(regs)) { 462 432 case -ERESTARTNOHAND: 463 433 case -ERESTARTSYS: 464 434 case -ERESTARTNOINTR:
-2
arch/x86/mm/ioremap.c
··· 134 134 return NULL; 135 135 } 136 136 137 - WARN_ON_ONCE(page_is_ram(pfn)); 138 - 139 137 switch (mode) { 140 138 case IOR_MODE_UNCACHED: 141 139 default:
+9 -9
arch/x86/mm/pgtable_32.c
··· 342 342 343 343 pgd_t *pgd_alloc(struct mm_struct *mm) 344 344 { 345 - pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor); 345 + pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); 346 346 347 - mm->pgd = pgd; /* so that alloc_pd can use it */ 347 + /* so that alloc_pd can use it */ 348 + mm->pgd = pgd; 349 + if (pgd) 350 + pgd_ctor(pgd); 348 351 349 352 if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { 350 - quicklist_free(0, pgd_dtor, pgd); 353 + pgd_dtor(pgd); 354 + free_page((unsigned long)pgd); 351 355 pgd = NULL; 352 356 } 353 357 ··· 361 357 void pgd_free(struct mm_struct *mm, pgd_t *pgd) 362 358 { 363 359 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); 360 + pgd_dtor(pgd); 361 + free_page((unsigned long)pgd); 370 362 } 371 363 372 364 void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
+2 -3
include/asm-x86/pgtable_32.h
··· 26 26 struct vm_area_struct; 27 27 28 28 extern pgd_t swapper_pg_dir[1024]; 29 - extern struct kmem_cache *pmd_cache; 30 - void check_pgt_cache(void); 31 29 32 - static inline void pgtable_cache_init(void) {} 30 + static inline void pgtable_cache_init(void) { } 31 + static inline void check_pgt_cache(void) { } 33 32 void paging_init(void); 34 33 35 34