Skip to content

Commit

Permalink
Merge branch 'akpm' (updates from Andrew Morton)
Browse files Browse the repository at this point in the history
Merge second patch-bomb from Andrew Morton:
 - misc fixes
 - audit stuff
 - fanotify/inotify/dnotify things
 - most of the rest of MM.  The new cache shrinker code from Glauber and
   Dave Chinner probably isn't quite stabilized yet.
 - ptrace
 - ipc
 - partitions
 - reboot cleanups
 - add LZ4 decompressor, use it for kernel compression

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (118 commits)
  lib/scatterlist: error handling in __sg_alloc_table()
  scsi_debug: fix do_device_access() with wrap around range
  crypto: talitos: use sg_pcopy_to_buffer()
  lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()
  lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()
  crypto: add lz4 Cryptographic API
  lib: add lz4 compressor module
  arm: add support for LZ4-compressed kernel
  lib: add support for LZ4-compressed kernel
  decompressor: add LZ4 decompressor module
  lib: add weak clz/ctz functions
  reboot: move arch/x86 reboot= handling to generic kernel
  reboot: arm: change reboot_mode to use enum reboot_mode
  reboot: arm: prepare reboot_mode for moving to generic kernel code
  reboot: arm: remove unused restart_mode fields from some arm subarchs
  reboot: unicore32: prepare reboot_mode for moving to generic kernel code
  reboot: x86: prepare reboot_mode for moving to generic kernel code
  reboot: checkpatch.pl the new kernel/reboot.c file
  reboot: move shutdown/reboot related functions to kernel/reboot.c
  reboot: remove -stable friendly PF_THREAD_BOUND define
  ...
  • Loading branch information
Linus Torvalds committed Jul 9, 2013
2 parents 899dd38 + 27daabd commit a82a729
Show file tree
Hide file tree
Showing 238 changed files with 4,461 additions and 1,691 deletions.
14 changes: 11 additions & 3 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2681,9 +2681,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Run specified binary instead of /init from the ramdisk,
used for early userspace startup. See initrd.

reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
Format: <reboot_mode>[,<reboot_mode2>[,...]]
See arch/*/kernel/reboot.c or arch/*/kernel/process.c
reboot= [KNL]
Format (x86 or x86_64):
[w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \
[[,]s[mp]#### \
[[,]b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \
[[,]f[orce]
Where reboot_mode is one of warm (soft) or cold (hard) or gpio,
reboot_type is one of bios, acpi, kbd, triple, efi, or pci,
reboot_force is either force or not specified,
reboot_cpu is s[mp]#### with #### being the processor
to be used for rebooting.

relax_domain_level=
[KNL, SMP] Set scheduler's default relax_domain_level.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ Specify "[Dd]efault" to request automatic configuration. Autoconfiguration
will select "node" order in following case.
(1) if the DMA zone does not exist or
(2) if the DMA zone comprises greater than 50% of the available memory or
(3) if any node's DMA zone comprises greater than 60% of its local memory and
(3) if any node's DMA zone comprises greater than 70% of its local memory and
the amount of local memory is big enough.

Otherwise, "zone" order will be selected. Default order is recommended unless
Expand Down
4 changes: 2 additions & 2 deletions Documentation/vm/transhuge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ By default kernel tries to use huge zero page on read page fault.
It's possible to disable huge zero page by writing 0 or enable it
back by writing 1:

echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
echo 0 >/sys/kernel/mm/transparent_hugepage/use_zero_page
echo 1 >/sys/kernel/mm/transparent_hugepage/use_zero_page

khugepaged will be automatically started when
transparent_hugepage/enabled is set to "always" or "madvise, and it'll
Expand Down
7 changes: 4 additions & 3 deletions Documentation/x86/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,10 @@ Protocol: 2.08+
uncompressed data should be determined using the standard magic
numbers. The currently supported compression formats are gzip
(magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA
(magic number 5D 00), and XZ (magic number FD 37). The uncompressed
payload is currently always ELF (magic number 7F 45 4C 46).

(magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number
02 21). The uncompressed payload is currently always ELF (magic
number 7F 45 4C 46).

Field name: payload_length
Type: read
Offset/size: 0x24c/4
Expand Down
13 changes: 13 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9268,6 +9268,13 @@ F: Documentation/networking/z8530drv.txt
F: drivers/net/hamradio/*scc.c
F: drivers/net/hamradio/z8530.h

ZBUD COMPRESSED PAGE ALLOCATOR
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
L: linux-mm@kvack.org
S: Maintained
F: mm/zbud.c
F: include/linux/zbud.h

ZD1211RW WIRELESS DRIVER
M: Daniel Drake <dsd@gentoo.org>
M: Ulrich Kunitz <kune@deine-taler.de>
Expand All @@ -9290,6 +9297,12 @@ M: "Maciej W. Rozycki" <macro@linux-mips.org>
S: Maintained
F: drivers/tty/serial/zs.*

ZSWAP COMPRESSED SWAP CACHING
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
L: linux-mm@kvack.org
S: Maintained
F: mm/zswap.c

THE REST
M: Linus Torvalds <torvalds@linux-foundation.org>
L: linux-kernel@vger.kernel.org
Expand Down
6 changes: 4 additions & 2 deletions arch/arc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address)
}
up_read(&mm->mmap_sem);

if (user_mode(regs))
do_group_exit(SIGKILL); /* This will never return */
if (user_mode(regs)) {
pagefault_out_of_memory();
return;
}

goto no_context;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config ARM
select HAVE_IDE if PCI || ISA || PCMCIA
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZ4
select HAVE_KERNEL_LZMA
select HAVE_KERNEL_LZO
select HAVE_KERNEL_XZ
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/compressed/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ piggy.gzip
piggy.lzo
piggy.lzma
piggy.xzkern
piggy.lz4
vmlinux
vmlinux.lds

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
suffix_$(CONFIG_KERNEL_LZO) = lzo
suffix_$(CONFIG_KERNEL_LZMA) = lzma
suffix_$(CONFIG_KERNEL_XZ) = xzkern
suffix_$(CONFIG_KERNEL_LZ4) = lz4

# Borrowed libfdt files for the ATAG compatibility mode

Expand All @@ -115,7 +116,7 @@ targets := vmlinux vmlinux.lds \
font.o font.c head.o misc.o $(OBJS)

# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \
hyp-stub.S

Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/compressed/decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ extern char * strstr(const char * s1, const char *s2);
#include "../../../../lib/decompress_unxz.c"
#endif

#ifdef CONFIG_KERNEL_LZ4
#include "../../../../lib/decompress_unlz4.c"
#endif

int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return decompress(input, len, NULL, NULL, output, NULL, error);
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/compressed/piggy.lz4.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.section .piggydata,#alloc
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.lz4"
.globl input_data_end
input_data_end:
3 changes: 2 additions & 1 deletion arch/arm/include/asm/hardware/iop3xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void);
#ifndef __ASSEMBLY__

#include <linux/types.h>
#include <linux/reboot.h>

void iop3xx_map_io(void);
void iop_init_cp6_handler(void);
void iop_init_time(unsigned long tickrate);
void iop3xx_restart(char, const char *);
void iop3xx_restart(enum reboot_mode, const char *);

static inline u32 read_tmr0(void)
{
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/include/asm/mach/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/types.h>

#ifndef __ASSEMBLY__
#include <linux/reboot.h>

struct tag;
struct meminfo;
Expand Down Expand Up @@ -43,7 +44,7 @@ struct machine_desc {
unsigned char reserve_lp0 :1; /* never has lp0 */
unsigned char reserve_lp1 :1; /* never has lp1 */
unsigned char reserve_lp2 :1; /* never has lp2 */
char restart_mode; /* default restart mode */
enum reboot_mode reboot_mode; /* default restart mode */
struct smp_operations *smp; /* SMP operations */
bool (*smp_init)(void);
void (*fixup)(struct tag *, char **,
Expand All @@ -58,7 +59,7 @@ struct machine_desc {
#ifdef CONFIG_MULTI_IRQ_HANDLER
void (*handle_irq)(struct pt_regs *);
#endif
void (*restart)(char, const char *);
void (*restart)(enum reboot_mode, const char *);
};

/*
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/include/asm/system_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/irqflags.h>
#include <linux/reboot.h>

extern void cpu_init(void);

void soft_restart(unsigned long);
extern void (*arm_pm_restart)(char str, const char *cmd);
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
extern void (*arm_pm_idle)(void);

#define UDBG_UNDEFINED (1 << 0)
Expand Down
15 changes: 3 additions & 12 deletions arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/cpuidle.h>
#include <linux/leds.h>
#include <linux/reboot.h>

#include <asm/cacheflush.h>
#include <asm/idmap.h>
Expand Down Expand Up @@ -113,7 +114,7 @@ void soft_restart(unsigned long addr)
BUG();
}

static void null_restart(char mode, const char *cmd)
static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
{
}

Expand All @@ -123,7 +124,7 @@ static void null_restart(char mode, const char *cmd)
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);

void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart);

/*
Expand Down Expand Up @@ -175,16 +176,6 @@ void arch_cpu_idle(void)
default_idle();
}

static char reboot_mode = 'h';

int __init reboot_setup(char *str)
{
reboot_mode = str[0];
return 1;
}

__setup("reboot=", reboot_setup);

/*
* Called by kexec, immediately prior to machine_kexec().
*
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,20 +886,12 @@ long arch_ptrace(struct task_struct *child, long request,

#ifdef CONFIG_HAVE_HW_BREAKPOINT
case PTRACE_GETHBPREGS:
if (ptrace_get_breakpoints(child) < 0)
return -ESRCH;

ret = ptrace_gethbpregs(child, addr,
(unsigned long __user *)data);
ptrace_put_breakpoints(child);
break;
case PTRACE_SETHBPREGS:
if (ptrace_get_breakpoints(child) < 0)
return -ESRCH;

ret = ptrace_sethbpregs(child, addr,
(unsigned long __user *)data);
ptrace_put_breakpoints(child);
break;
#endif

Expand Down
6 changes: 3 additions & 3 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ __setup("fpe=", fpe_setup);

extern void paging_init(struct machine_desc *desc);
extern void sanity_check_meminfo(void);
extern void reboot_setup(char *str);
extern enum reboot_mode reboot_mode;
extern void setup_dma_zone(struct machine_desc *desc);

unsigned int processor_id;
Expand Down Expand Up @@ -861,8 +861,8 @@ void __init setup_arch(char **cmdline_p)

setup_dma_zone(mdesc);

if (mdesc->restart_mode)
reboot_setup(&mdesc->restart_mode);
if (mdesc->reboot_mode != REBOOT_HARD)
reboot_mode = mdesc->reboot_mode;

init_mm.start_code = (unsigned long) _text;
init_mm.end_code = (unsigned long) _etext;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-at91/at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/module.h>
#include <linux/reboot.h>

#include <asm/irq.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -304,7 +305,7 @@ static void at91rm9200_idle(void)
at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
}

static void at91rm9200_restart(char mode, const char *cmd)
static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
{
/*
* Perform a hardware reset with the use of the Watchdog timer.
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/mach-at91/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/reboot.h>

/* Map io */
extern void __init at91_map_io(void);
Expand Down Expand Up @@ -60,8 +61,8 @@ extern void at91sam9_idle(void);

/* reset */
extern void at91_ioremap_rstc(u32 base_addr);
extern void at91sam9_alt_restart(char, const char *);
extern void at91sam9g45_restart(char, const char *);
extern void at91sam9_alt_restart(enum reboot_mode, const char *);
extern void at91sam9g45_restart(enum reboot_mode, const char *);

/* shutdown */
extern void at91_ioremap_shdwc(u32 base_addr);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-bcm2835/bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void)
WARN(!wdt_regs, "failed to remap watchdog regs");
}

static void bcm2835_restart(char mode, const char *cmd)
static void bcm2835_restart(enum reboot_mode mode, const char *cmd)
{
u32 val;

Expand Down Expand Up @@ -91,7 +91,7 @@ static void bcm2835_power_off(void)
writel_relaxed(val, wdt_regs + PM_RSTS);

/* Continue with normal reset mechanism */
bcm2835_restart(0, "");
bcm2835_restart(REBOOT_HARD, "");
}

static struct map_desc io_map __initdata = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-clps711x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void __init clps711x_timer_init(void)
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
}

void clps711x_restart(char mode, const char *cmd)
void clps711x_restart(enum reboot_mode mode, const char *cmd)
{
soft_restart(0);
}
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-clps711x/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Common bits.
*/

#include <linux/reboot.h>

#define CLPS711X_NR_IRQS (33)
#define CLPS711X_NR_GPIO (4 * 8 + 3)
#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
Expand All @@ -12,5 +14,5 @@ extern void clps711x_map_io(void);
extern void clps711x_init_irq(void);
extern void clps711x_timer_init(void);
extern void clps711x_handle_irq(struct pt_regs *regs);
extern void clps711x_restart(char mode, const char *cmd);
extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
extern void clps711x_init_early(void);
4 changes: 3 additions & 1 deletion arch/arm/mach-cns3xxx/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef __CNS3XXX_CORE_H
#define __CNS3XXX_CORE_H

#include <linux/reboot.h>

extern void cns3xxx_timer_init(void);

#ifdef CONFIG_CACHE_L2X0
Expand All @@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {}
void __init cns3xxx_map_io(void);
void __init cns3xxx_init_irq(void);
void cns3xxx_power_off(void);
void cns3xxx_restart(char, const char *);
void cns3xxx_restart(enum reboot_mode, const char *);

#endif /* __CNS3XXX_CORE_H */
2 changes: 1 addition & 1 deletion arch/arm/mach-cns3xxx/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
}
EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);

void cns3xxx_restart(char mode, const char *cmd)
void cns3xxx_restart(enum reboot_mode mode, const char *cmd)
{
/*
* To reset, we hit the on-board reset register
Expand Down
Loading

0 comments on commit a82a729

Please sign in to comment.