From: Thierry Reding Date: Mon, 21 Oct 2013 11:32:12 +0000 (+0200) Subject: Merge remote-tracking branch 'tip/auto-latest' X-Git-Tag: next-20131021~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1e65adf30064c59f4a5ffc23fa92b184ffbfb4d0;p=karo-tx-linux.git Merge remote-tracking branch 'tip/auto-latest' Conflicts: arch/h8300/include/asm/Kbuild include/linux/wait.h mm/mprotect.c --- 1e65adf30064c59f4a5ffc23fa92b184ffbfb4d0 diff --cc arch/arm/include/asm/Kbuild index a6395c027715,4e6838d4ddf6..c38b58c80202 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild @@@ -32,4 -31,6 +32,5 @@@ generic-y += termbits. generic-y += termios.h generic-y += timex.h generic-y += trace_clock.h -generic-y += types.h generic-y += unaligned.h + generic-y += preempt.h diff --cc arch/powerpc/Kconfig index 875d815a8e7f,b365d5cbb722..4b50d2417572 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@@ -138,10 -138,8 +138,11 @@@ config PP select OLD_SIGSUSPEND select OLD_SIGACTION if PPC32 select HAVE_DEBUG_STACKOVERFLOW + select HAVE_IRQ_EXIT_ON_IRQ_STACK +config GENERIC_CSUM + def_bool CPU_LITTLE_ENDIAN + config EARLY_PRINTK bool default y diff --cc include/linux/wait.h index d9eff54c69cf,a2726c7dd244..039598504d3a --- a/include/linux/wait.h +++ b/include/linux/wait.h @@@ -253,59 -275,9 +275,45 @@@ do { __ret; \ }) +#define __wait_event_cmd(wq, condition, cmd1, cmd2) \ +do { \ + DEFINE_WAIT(__wait); \ + \ + for (;;) { \ + prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ + if (condition) \ + break; \ + cmd1; \ + schedule(); \ + cmd2; \ + } \ + finish_wait(&wq, &__wait); \ +} while (0) + +/** + * wait_event_cmd - sleep until a condition gets true + * @wq: the waitqueue to wait on + * @condition: a C expression for the event to wait for + * cmd1: the command will be executed before sleep + * cmd2: the command will be executed after sleep + * + * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the + * @condition evaluates to true. The @condition is checked each time + * the waitqueue @wq is woken up. + * + * wake_up() has to be called after changing any variable that could + * change the result of the wait condition. + */ +#define wait_event_cmd(wq, condition, cmd1, cmd2) \ +do { \ + if (condition) \ + break; \ + __wait_event_cmd(wq, condition, cmd1, cmd2); \ +} while (0) + - #define __wait_event_interruptible(wq, condition, ret) \ - do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \ - if (condition) \ - break; \ - if (!signal_pending(current)) { \ - schedule(); \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - finish_wait(&wq, &__wait); \ - } while (0) + #define __wait_event_interruptible(wq, condition) \ + ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \ + schedule()) /** * wait_event_interruptible - sleep until a condition gets true diff --cc mm/mprotect.c index a3af058f68e4,a0302ac0be98..a597f2ffcd6f --- a/mm/mprotect.c +++ b/mm/mprotect.c @@@ -100,12 -89,11 +90,13 @@@ static unsigned long change_pte_range(s * just be safe and disable write */ make_migration_entry_read(&entry); - set_pte_at(mm, addr, pte, - swp_entry_to_pte(entry)); + newpte = swp_entry_to_pte(entry); + if (pte_swp_soft_dirty(oldpte)) + newpte = pte_swp_mksoft_dirty(newpte); + set_pte_at(mm, addr, pte, newpte); + + pages++; } - pages++; } } while (pte++, addr += PAGE_SIZE, addr != end); arch_leave_lazy_mmu_mode();