Skip to content

Commit

Permalink
Merge branch 'akpm' (Andrew's patch-bomb)
Browse files Browse the repository at this point in the history
Merge Andrew's remaining patches for 3.5:
 "Nine fixes"

* Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (9 commits)
  mm: fix lost kswapd wakeup in kswapd_stop()
  m32r: make memset() global for CONFIG_KERNEL_BZIP2=y
  m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
  m32r: consistently use "suffix-$(...)"
  m32r: fix 'fix breakage from "m32r: use generic ptrace_resume code"' fallout
  m32r: fix pull clearing RESTORE_SIGMASK into block_sigmask() fallout
  m32r: remove duplicate definition of PTRACE_O_TRACESYSGOOD
  mn10300: fix "pull clearing RESTORE_SIGMASK into block_sigmask()" fallout
  bootmem: make ___alloc_bootmem_node_nopanic() really nopanic
  • Loading branch information
Linus Torvalds committed Jul 17, 2012
2 parents a5e1351 + 1c7e7f6 commit de74646
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
6 changes: 3 additions & 3 deletions arch/m32r/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ endif

OBJCOPYFLAGS += -R .empty_zero_page

suffix_$(CONFIG_KERNEL_GZIP) = gz
suffix_$(CONFIG_KERNEL_BZIP2) = bz2
suffix_$(CONFIG_KERNEL_LZMA) = lzma
suffix-$(CONFIG_KERNEL_GZIP) = gz
suffix-$(CONFIG_KERNEL_BZIP2) = bz2
suffix-$(CONFIG_KERNEL_LZMA) = lzma

$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
$(call if_changed,ld)
12 changes: 11 additions & 1 deletion arch/m32r/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static unsigned long free_mem_ptr;
static unsigned long free_mem_end_ptr;

#ifdef CONFIG_KERNEL_BZIP2
static void *memset(void *s, int c, size_t n)
void *memset(void *s, int c, size_t n)
{
char *ss = s;

Expand All @@ -39,6 +39,16 @@ static void *memset(void *s, int c, size_t n)
#endif

#ifdef CONFIG_KERNEL_GZIP
void *memcpy(void *dest, const void *src, size_t n)
{
char *d = dest;
const char *s = src;
while (n--)
*d++ = *s++;

return dest;
}

#define BOOT_HEAP_SIZE 0x10000
#include "../../../../lib/decompress_inflate.c"
#endif
Expand Down
3 changes: 0 additions & 3 deletions arch/m32r/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ struct pt_regs {

#define PTRACE_OLDSETOPTIONS 21

/* options set using PTRACE_SETOPTIONS */
#define PTRACE_O_TRACESYSGOOD 0x00000001

#ifdef __KERNEL__

#include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */
Expand Down
7 changes: 3 additions & 4 deletions arch/m32r/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,17 +591,16 @@ void user_enable_single_step(struct task_struct *child)

if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
!= sizeof(insn))
return -EIO;
return;

compute_next_pc(insn, pc, &next_pc, child);
if (next_pc & 0x80000000)
return -EIO;
return;

if (embed_debug_trap(child, next_pc))
return -EIO;
return;

invalidate_cache();
return 0;
}

void user_disable_single_step(struct task_struct *child)
Expand Down
2 changes: 1 addition & 1 deletion arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
case -ERESTARTNOINTR:
regs->r0 = regs->orig_r0;
if (prev_insn(regs) < 0)
return -EFAULT;
return;
}
}

Expand Down
5 changes: 3 additions & 2 deletions arch/mn10300/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,11 @@ static int handle_signal(int sig,
else
ret = setup_frame(sig, ka, oldset, regs);
if (ret)
return;
return ret;

signal_delivered(sig, info, ka, regs,
test_thread_flag(TIF_SINGLESTEP));
test_thread_flag(TIF_SINGLESTEP));
return 0;
}

/*
Expand Down
4 changes: 4 additions & 0 deletions mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ void * __init ___alloc_bootmem_node_nopanic(pg_data_t *pgdat,
if (ptr)
return ptr;

/* do not panic in alloc_bootmem_bdata() */
if (limit && goal + size > limit)
limit = 0;

ptr = alloc_bootmem_bdata(pgdat->bdata, size, align, goal, limit);
if (ptr)
return ptr;
Expand Down
5 changes: 4 additions & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,10 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int order, int classzone_idx)
* them before going back to sleep.
*/
set_pgdat_percpu_threshold(pgdat, calculate_normal_threshold);
schedule();

if (!kthread_should_stop())
schedule();

set_pgdat_percpu_threshold(pgdat, calculate_pressure_threshold);
} else {
if (remaining)
Expand Down

0 comments on commit de74646

Please sign in to comment.