Skip to content

Commit a82a729

Browse files
committed
Merge branch 'akpm' (updates from Andrew Morton)
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 <[email protected]>: (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 ...
2 parents 899dd38 + 27daabd commit a82a729

File tree

238 files changed

+4461
-1691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+4461
-1691
lines changed

Documentation/kernel-parameters.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2681,9 +2681,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
26812681
Run specified binary instead of /init from the ramdisk,
26822682
used for early userspace startup. See initrd.
26832683

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

26882696
relax_domain_level=
26892697
[KNL, SMP] Set scheduler's default relax_domain_level.

Documentation/sysctl/vm.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ Specify "[Dd]efault" to request automatic configuration. Autoconfiguration
510510
will select "node" order in following case.
511511
(1) if the DMA zone does not exist or
512512
(2) if the DMA zone comprises greater than 50% of the available memory or
513-
(3) if any node's DMA zone comprises greater than 60% of its local memory and
513+
(3) if any node's DMA zone comprises greater than 70% of its local memory and
514514
the amount of local memory is big enough.
515515

516516
Otherwise, "zone" order will be selected. Default order is recommended unless

Documentation/vm/transhuge.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ By default kernel tries to use huge zero page on read page fault.
120120
It's possible to disable huge zero page by writing 0 or enable it
121121
back by writing 1:
122122

123-
echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
124-
echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
123+
echo 0 >/sys/kernel/mm/transparent_hugepage/use_zero_page
124+
echo 1 >/sys/kernel/mm/transparent_hugepage/use_zero_page
125125

126126
khugepaged will be automatically started when
127127
transparent_hugepage/enabled is set to "always" or "madvise, and it'll

Documentation/x86/boot.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,10 @@ Protocol: 2.08+
657657
uncompressed data should be determined using the standard magic
658658
numbers. The currently supported compression formats are gzip
659659
(magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA
660-
(magic number 5D 00), and XZ (magic number FD 37). The uncompressed
661-
payload is currently always ELF (magic number 7F 45 4C 46).
662-
660+
(magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number
661+
02 21). The uncompressed payload is currently always ELF (magic
662+
number 7F 45 4C 46).
663+
663664
Field name: payload_length
664665
Type: read
665666
Offset/size: 0x24c/4

MAINTAINERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9268,6 +9268,13 @@ F: Documentation/networking/z8530drv.txt
92689268
F: drivers/net/hamradio/*scc.c
92699269
F: drivers/net/hamradio/z8530.h
92709270

9271+
ZBUD COMPRESSED PAGE ALLOCATOR
9272+
M: Seth Jennings <[email protected]>
9273+
9274+
S: Maintained
9275+
F: mm/zbud.c
9276+
F: include/linux/zbud.h
9277+
92719278
ZD1211RW WIRELESS DRIVER
92729279
M: Daniel Drake <[email protected]>
92739280
M: Ulrich Kunitz <[email protected]>
@@ -9290,6 +9297,12 @@ M: "Maciej W. Rozycki" <[email protected]>
92909297
S: Maintained
92919298
F: drivers/tty/serial/zs.*
92929299

9300+
ZSWAP COMPRESSED SWAP CACHING
9301+
M: Seth Jennings <[email protected]>
9302+
9303+
S: Maintained
9304+
F: mm/zswap.c
9305+
92939306
THE REST
92949307
M: Linus Torvalds <[email protected]>
92959308

arch/arc/mm/fault.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address)
207207
}
208208
up_read(&mm->mmap_sem);
209209

210-
if (user_mode(regs))
211-
do_group_exit(SIGKILL); /* This will never return */
210+
if (user_mode(regs)) {
211+
pagefault_out_of_memory();
212+
return;
213+
}
212214

213215
goto no_context;
214216

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ config ARM
4141
select HAVE_IDE if PCI || ISA || PCMCIA
4242
select HAVE_IRQ_TIME_ACCOUNTING
4343
select HAVE_KERNEL_GZIP
44+
select HAVE_KERNEL_LZ4
4445
select HAVE_KERNEL_LZMA
4546
select HAVE_KERNEL_LZO
4647
select HAVE_KERNEL_XZ

arch/arm/boot/compressed/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ piggy.gzip
66
piggy.lzo
77
piggy.lzma
88
piggy.xzkern
9+
piggy.lz4
910
vmlinux
1011
vmlinux.lds
1112

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
9191
suffix_$(CONFIG_KERNEL_LZO) = lzo
9292
suffix_$(CONFIG_KERNEL_LZMA) = lzma
9393
suffix_$(CONFIG_KERNEL_XZ) = xzkern
94+
suffix_$(CONFIG_KERNEL_LZ4) = lz4
9495

9596
# Borrowed libfdt files for the ATAG compatibility mode
9697

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

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

arch/arm/boot/compressed/decompress.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ extern char * strstr(const char * s1, const char *s2);
5151
#include "../../../../lib/decompress_unxz.c"
5252
#endif
5353

54+
#ifdef CONFIG_KERNEL_LZ4
55+
#include "../../../../lib/decompress_unlz4.c"
56+
#endif
57+
5458
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
5559
{
5660
return decompress(input, len, NULL, NULL, output, NULL, error);

arch/arm/boot/compressed/piggy.lz4.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.section .piggydata,#alloc
2+
.globl input_data
3+
input_data:
4+
.incbin "arch/arm/boot/compressed/piggy.lz4"
5+
.globl input_data_end
6+
input_data_end:

arch/arm/include/asm/hardware/iop3xx.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void);
223223
#ifndef __ASSEMBLY__
224224

225225
#include <linux/types.h>
226+
#include <linux/reboot.h>
226227

227228
void iop3xx_map_io(void);
228229
void iop_init_cp6_handler(void);
229230
void iop_init_time(unsigned long tickrate);
230-
void iop3xx_restart(char, const char *);
231+
void iop3xx_restart(enum reboot_mode, const char *);
231232

232233
static inline u32 read_tmr0(void)
233234
{

arch/arm/include/asm/mach/arch.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/types.h>
1212

1313
#ifndef __ASSEMBLY__
14+
#include <linux/reboot.h>
1415

1516
struct tag;
1617
struct meminfo;
@@ -43,7 +44,7 @@ struct machine_desc {
4344
unsigned char reserve_lp0 :1; /* never has lp0 */
4445
unsigned char reserve_lp1 :1; /* never has lp1 */
4546
unsigned char reserve_lp2 :1; /* never has lp2 */
46-
char restart_mode; /* default restart mode */
47+
enum reboot_mode reboot_mode; /* default restart mode */
4748
struct smp_operations *smp; /* SMP operations */
4849
bool (*smp_init)(void);
4950
void (*fixup)(struct tag *, char **,
@@ -58,7 +59,7 @@ struct machine_desc {
5859
#ifdef CONFIG_MULTI_IRQ_HANDLER
5960
void (*handle_irq)(struct pt_regs *);
6061
#endif
61-
void (*restart)(char, const char *);
62+
void (*restart)(enum reboot_mode, const char *);
6263
};
6364

6465
/*

arch/arm/include/asm/system_misc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
#include <linux/compiler.h>
77
#include <linux/linkage.h>
88
#include <linux/irqflags.h>
9+
#include <linux/reboot.h>
910

1011
extern void cpu_init(void);
1112

1213
void soft_restart(unsigned long);
13-
extern void (*arm_pm_restart)(char str, const char *cmd);
14+
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
1415
extern void (*arm_pm_idle)(void);
1516

1617
#define UDBG_UNDEFINED (1 << 0)

arch/arm/kernel/process.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <linux/hw_breakpoint.h>
3333
#include <linux/cpuidle.h>
3434
#include <linux/leds.h>
35+
#include <linux/reboot.h>
3536

3637
#include <asm/cacheflush.h>
3738
#include <asm/idmap.h>
@@ -113,7 +114,7 @@ void soft_restart(unsigned long addr)
113114
BUG();
114115
}
115116

116-
static void null_restart(char mode, const char *cmd)
117+
static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
117118
{
118119
}
119120

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

126-
void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
127+
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
127128
EXPORT_SYMBOL_GPL(arm_pm_restart);
128129

129130
/*
@@ -175,16 +176,6 @@ void arch_cpu_idle(void)
175176
default_idle();
176177
}
177178

178-
static char reboot_mode = 'h';
179-
180-
int __init reboot_setup(char *str)
181-
{
182-
reboot_mode = str[0];
183-
return 1;
184-
}
185-
186-
__setup("reboot=", reboot_setup);
187-
188179
/*
189180
* Called by kexec, immediately prior to machine_kexec().
190181
*

arch/arm/kernel/ptrace.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -886,20 +886,12 @@ long arch_ptrace(struct task_struct *child, long request,
886886

887887
#ifdef CONFIG_HAVE_HW_BREAKPOINT
888888
case PTRACE_GETHBPREGS:
889-
if (ptrace_get_breakpoints(child) < 0)
890-
return -ESRCH;
891-
892889
ret = ptrace_gethbpregs(child, addr,
893890
(unsigned long __user *)data);
894-
ptrace_put_breakpoints(child);
895891
break;
896892
case PTRACE_SETHBPREGS:
897-
if (ptrace_get_breakpoints(child) < 0)
898-
return -ESRCH;
899-
900893
ret = ptrace_sethbpregs(child, addr,
901894
(unsigned long __user *)data);
902-
ptrace_put_breakpoints(child);
903895
break;
904896
#endif
905897

arch/arm/kernel/setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ __setup("fpe=", fpe_setup);
7474

7575
extern void paging_init(struct machine_desc *desc);
7676
extern void sanity_check_meminfo(void);
77-
extern void reboot_setup(char *str);
77+
extern enum reboot_mode reboot_mode;
7878
extern void setup_dma_zone(struct machine_desc *desc);
7979

8080
unsigned int processor_id;
@@ -861,8 +861,8 @@ void __init setup_arch(char **cmdline_p)
861861

862862
setup_dma_zone(mdesc);
863863

864-
if (mdesc->restart_mode)
865-
reboot_setup(&mdesc->restart_mode);
864+
if (mdesc->reboot_mode != REBOOT_HARD)
865+
reboot_mode = mdesc->reboot_mode;
866866

867867
init_mm.start_code = (unsigned long) _text;
868868
init_mm.end_code = (unsigned long) _etext;

arch/arm/mach-at91/at91rm9200.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/module.h>
14+
#include <linux/reboot.h>
1415

1516
#include <asm/irq.h>
1617
#include <asm/mach/arch.h>
@@ -304,7 +305,7 @@ static void at91rm9200_idle(void)
304305
at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
305306
}
306307

307-
static void at91rm9200_restart(char mode, const char *cmd)
308+
static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
308309
{
309310
/*
310311
* Perform a hardware reset with the use of the Watchdog timer.

arch/arm/mach-at91/generic.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/clkdev.h>
1212
#include <linux/of.h>
13+
#include <linux/reboot.h>
1314

1415
/* Map io */
1516
extern void __init at91_map_io(void);
@@ -60,8 +61,8 @@ extern void at91sam9_idle(void);
6061

6162
/* reset */
6263
extern void at91_ioremap_rstc(u32 base_addr);
63-
extern void at91sam9_alt_restart(char, const char *);
64-
extern void at91sam9g45_restart(char, const char *);
64+
extern void at91sam9_alt_restart(enum reboot_mode, const char *);
65+
extern void at91sam9g45_restart(enum reboot_mode, const char *);
6566

6667
/* shutdown */
6768
extern void at91_ioremap_shdwc(u32 base_addr);

arch/arm/mach-bcm2835/bcm2835.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void)
5353
WARN(!wdt_regs, "failed to remap watchdog regs");
5454
}
5555

56-
static void bcm2835_restart(char mode, const char *cmd)
56+
static void bcm2835_restart(enum reboot_mode mode, const char *cmd)
5757
{
5858
u32 val;
5959

@@ -91,7 +91,7 @@ static void bcm2835_power_off(void)
9191
writel_relaxed(val, wdt_regs + PM_RSTS);
9292

9393
/* Continue with normal reset mechanism */
94-
bcm2835_restart(0, "");
94+
bcm2835_restart(REBOOT_HARD, "");
9595
}
9696

9797
static struct map_desc io_map __initdata = {

arch/arm/mach-clps711x/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void __init clps711x_timer_init(void)
384384
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
385385
}
386386

387-
void clps711x_restart(char mode, const char *cmd)
387+
void clps711x_restart(enum reboot_mode mode, const char *cmd)
388388
{
389389
soft_restart(0);
390390
}

arch/arm/mach-clps711x/common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Common bits.
55
*/
66

7+
#include <linux/reboot.h>
8+
79
#define CLPS711X_NR_IRQS (33)
810
#define CLPS711X_NR_GPIO (4 * 8 + 3)
911
#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
@@ -12,5 +14,5 @@ extern void clps711x_map_io(void);
1214
extern void clps711x_init_irq(void);
1315
extern void clps711x_timer_init(void);
1416
extern void clps711x_handle_irq(struct pt_regs *regs);
15-
extern void clps711x_restart(char mode, const char *cmd);
17+
extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
1618
extern void clps711x_init_early(void);

arch/arm/mach-cns3xxx/core.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#ifndef __CNS3XXX_CORE_H
1212
#define __CNS3XXX_CORE_H
1313

14+
#include <linux/reboot.h>
15+
1416
extern void cns3xxx_timer_init(void);
1517

1618
#ifdef CONFIG_CACHE_L2X0
@@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {}
2224
void __init cns3xxx_map_io(void);
2325
void __init cns3xxx_init_irq(void);
2426
void cns3xxx_power_off(void);
25-
void cns3xxx_restart(char, const char *);
27+
void cns3xxx_restart(enum reboot_mode, const char *);
2628

2729
#endif /* __CNS3XXX_CORE_H */

arch/arm/mach-cns3xxx/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
8989
}
9090
EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
9191

92-
void cns3xxx_restart(char mode, const char *cmd)
92+
void cns3xxx_restart(enum reboot_mode mode, const char *cmd)
9393
{
9494
/*
9595
* To reset, we hit the on-board reset register

0 commit comments

Comments
 (0)