History

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM updates from Russell King: - remove a now unnecessary usage of the KERNEL_DS for sys_oabi_epoll_ctl() - update my email address in a number of drivers - decompressor EFI updates from Ard Biesheuvel - module unwind section handling updates - sparsemem Kconfig cleanups - make act_mm macro respect THREAD_SIZE * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8980/1: Allow either FLATMEM or SPARSEMEM on the multiplatform build ARM: 8979/1: Remove redundant ARCH_SPARSEMEM_DEFAULT setting ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE ARM: decompressor: run decompressor in place if loaded via UEFI ARM: decompressor: move GOT into .data for EFI enabled builds ARM: decompressor: defer loading of the contents of the LC0 structure ARM: decompressor: split off _edata and stack base into separate object ARM: decompressor: move headroom variable out of LC0 ARM: 8976/1: module: allow arch overrides for .init section names ARM: 8975/1: module: fix handling of unwind init sections ARM: 8974/1: use SPARSMEM_STATIC when SPARSEMEM is enabled ARM: 8971/1: replace the sole use of a symbol with its definition ARM: 8969/1: decompressor: simplify libfdt builds Update rmk's email address in various drivers ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()

Linus Torvalds committed 6 years ago

Commit c2b0fc82 parents 533b220 fb597f224 files · +122 −170Browse files

Unified · Split

24 files
  1. arch/arm/Kconfig +10 −3
  2. arch/arm/boot/compressed/.gitignore +0 −9
  3. arch/arm/boot/compressed/Makefile +15 −23
  4. arch/arm/boot/compressed/atags_to_fdt.c +1 −0
  5. arch/arm/boot/compressed/fdt.c +2 −0
  6. arch/arm/boot/compressed/fdt_ro.c +2 −0
  7. arch/arm/boot/compressed/fdt_rw.c +2 −0
  8. arch/arm/boot/compressed/fdt_wip.c +2 −0
  9. arch/arm/boot/compressed/head.S +32 −48
  10. arch/arm/boot/compressed/libfdt_env.h +0 −24
  11. arch/arm/boot/compressed/vmlinux.lds.S +5 −0
  12. arch/arm/include/asm/assembler.h +1 −2
  13. arch/arm/kernel/module.c +19 −3
  14. arch/arm/kernel/sys_oabi-compat.c +5 −10
  15. arch/arm/mm/proc-macros.S +2 −1
  16. drivers/firmware/efi/libstub/arm32-stub.c +6 −39
  17. drivers/gpu/drm/armada/armada_drv.c +1 −1
  18. drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +1 −1
  19. drivers/gpu/drm/etnaviv/etnaviv_drv.c +1 −1
  20. drivers/media/cec/cec-notifier.c +1 −1
  21. drivers/net/phy/swphy.c +1 −1
  22. include/linux/moduleloader.h +5 −0
  23. include/media/cec-notifier.h +1 −1
  24. kernel/module.c +7 −2
arch/arm/Kconfig+10−3
@@ -313,6 +313,9 @@ choice · 312 unmodified lines
313config ARCH_MULTIPLATFORM313config ARCH_MULTIPLATFORM
314 bool "Allow multiple platforms to be selected"314 bool "Allow multiple platforms to be selected"
315 depends on MMU315 depends on MMU
316 select ARCH_FLATMEM_ENABLE
317 select ARCH_SPARSEMEM_ENABLE
318 select ARCH_SELECT_MEMORY_MODEL
316 select ARM_HAS_SG_CHAIN319 select ARM_HAS_SG_CHAIN
317 select ARM_PATCH_PHYS_VIRT320 select ARM_PATCH_PHYS_VIRT
318 select AUTO_ZRELADDR321 select AUTO_ZRELADDR
@@ -1516,11 +1519,15 @@ config OABI_COMPAT · 1197 unmodified lines
1516config ARCH_HAS_HOLES_MEMORYMODEL1519config ARCH_HAS_HOLES_MEMORYMODEL
1517 bool1520 bool
1518 1521
1519config ARCH_SPARSEMEM_ENABLE1522config ARCH_SELECT_MEMORY_MODEL
1523 bool
1524
1525config ARCH_FLATMEM_ENABLE
1520 bool1526 bool
1521 1527
1522config ARCH_SPARSEMEM_DEFAULT1528config ARCH_SPARSEMEM_ENABLE
1523 def_bool ARCH_SPARSEMEM_ENABLE1529 bool
1530 select SPARSEMEM_STATIC if SPARSEMEM
1524 1531
1525config HAVE_ARCH_PFN_VALID1532config HAVE_ARCH_PFN_VALID
1526 def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM1533 def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
arch/arm/boot/compressed/.gitignore+0−9
@@ -7,12 +7,3 @@ hyp-stub.S · 6 unmodified lines
7piggy_data7piggy_data
8vmlinux8vmlinux
9vmlinux.lds9vmlinux.lds
10
11# borrowed libfdt files
12fdt.c
13fdt.h
14fdt_ro.c
15fdt_rw.c
16fdt_wip.c
17libfdt.h
18libfdt_internal.h
arch/arm/boot/compressed/Makefile+15−23
@@ -76,29 +76,30 @@ compress-$(CONFIG_KERNEL_LZMA) = lzma · 75 unmodified lines
76compress-$(CONFIG_KERNEL_XZ) = xzkern76compress-$(CONFIG_KERNEL_XZ) = xzkern
77compress-$(CONFIG_KERNEL_LZ4) = lz477compress-$(CONFIG_KERNEL_LZ4) = lz4
78 78
79# Borrowed libfdt files for the ATAG compatibility mode79libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
80
81libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
82libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
83
84libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
85
86$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
87 $(call cmd,shipped)
88
89$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
90 $(addprefix $(obj)/,$(libfdt_hdrs))
91 80
92ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)81ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
93OBJS += $(libfdt_objs) atags_to_fdt.o82OBJS += $(libfdt_objs) atags_to_fdt.o
94endif83endif
95 84
85# -fstack-protector-strong triggers protection checks in this code,
86# but it is being used too early to link to meaningful stack_chk logic.
87nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
88$(foreach o, $(libfdt_objs) atags_to_fdt.o, \
89 $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt $(nossp-flags-y)))
90
91# These were previously generated C files. When you are building the kernel
92# with O=, make sure to remove the stale files in the output tree. Otherwise,
93# the build system wrongly compiles the stale ones.
94ifdef building_out_of_srctree
95$(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c))
96endif
97
96targets := vmlinux vmlinux.lds piggy_data piggy.o \98targets := vmlinux vmlinux.lds piggy_data piggy.o \
97 lib1funcs.o ashldi3.o bswapsdi2.o \99 lib1funcs.o ashldi3.o bswapsdi2.o \
98 head.o $(OBJS)100 head.o $(OBJS)
99 101
100clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \102clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
101 $(libfdt) $(libfdt_hdrs) hyp-stub.S
102 103
103KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING104KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
104 105
@@ -107,15 +108,6 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS) · 2 unmodified lines
107KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))108KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
108endif109endif
109 110
110# -fstack-protector-strong triggers protection checks in this code,
111# but it is being used too early to link to meaningful stack_chk logic.
112nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
113CFLAGS_atags_to_fdt.o := $(nossp-flags-y)
114CFLAGS_fdt.o := $(nossp-flags-y)
115CFLAGS_fdt_ro.o := $(nossp-flags-y)
116CFLAGS_fdt_rw.o := $(nossp-flags-y)
117CFLAGS_fdt_wip.o := $(nossp-flags-y)
118
119ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \111ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
120 -I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)112 -I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
121asflags-y := -DZIMAGE113asflags-y := -DZIMAGE
arch/arm/boot/compressed/atags_to_fdt.c+1−0
@@ -1,4 +1,5 @@
1// SPDX-License-Identifier: GPL-2.01// SPDX-License-Identifier: GPL-2.0
2#include <linux/libfdt_env.h>
2#include <asm/setup.h>3#include <asm/setup.h>
3#include <libfdt.h>4#include <libfdt.h>
4 5
arch/arm/boot/compressed/fdt.c+2−0
@@ -0,0 +1,2 @@
1// SPDX-License-Identifier: GPL-2.0-only
2#include "../../../../lib/fdt.c"
arch/arm/boot/compressed/fdt_ro.c+2−0
@@ -0,0 +1,2 @@
1// SPDX-License-Identifier: GPL-2.0-only
2#include "../../../../lib/fdt_ro.c"
arch/arm/boot/compressed/fdt_rw.c+2−0
@@ -0,0 +1,2 @@
1// SPDX-License-Identifier: GPL-2.0-only
2#include "../../../../lib/fdt_rw.c"
arch/arm/boot/compressed/fdt_wip.c+2−0
@@ -0,0 +1,2 @@
1// SPDX-License-Identifier: GPL-2.0-only
2#include "../../../../lib/fdt_wip.c"
arch/arm/boot/compressed/head.S+32−48
@@ -287,28 +287,22 @@ not_angel: · 286 unmodified lines
287 */287 */
288 mov r0, pc288 mov r0, pc
289 cmp r0, r4289 cmp r0, r4
290 ldrcc r0, LC0+28290 ldrcc r0, .Lheadroom
291 addcc r0, r0, pc291 addcc r0, r0, pc
292 cmpcc r4, r0292 cmpcc r4, r0
293 orrcc r4, r4, #1 @ remember we skipped cache_on293 orrcc r4, r4, #1 @ remember we skipped cache_on
294 blcs cache_on294 blcs cache_on
295 295
296restart: adr r0, LC0296restart: adr r0, LC1
297 ldmia r0, {r1, r2, r3, r6, r11, r12}297 ldr sp, [r0]
298 ldr sp, [r0, #24]298 ldr r6, [r0, #4]
299 299 add sp, sp, r0
300 /*300 add r6, r6, r0
301 * We might be running at a different address. We need
302 * to fix up various pointers.
303 */
304 sub r0, r0, r1 @ calculate the delta offset
305 add r6, r6, r0 @ _edata
306 301
307 get_inflated_image_size r9, r10, lr302 get_inflated_image_size r9, r10, lr
308 303
309#ifndef CONFIG_ZBOOT_ROM304#ifndef CONFIG_ZBOOT_ROM
310 /* malloc space is above the relocated stack (64k max) */305 /* malloc space is above the relocated stack (64k max) */
311 add sp, sp, r0
312 add r10, sp, #0x10000306 add r10, sp, #0x10000
313#else307#else
314 /*308 /*
@@ -322,9 +316,6 @@ restart: adr r0, LC0 · 7 unmodified lines
322 mov r5, #0 @ init dtb size to 0316 mov r5, #0 @ init dtb size to 0
323#ifdef CONFIG_ARM_APPENDED_DTB317#ifdef CONFIG_ARM_APPENDED_DTB
324/*318/*
325 * r0 = delta
326 * r2 = BSS start
327 * r3 = BSS end
328 * r4 = final kernel address (possibly with LSB set)319 * r4 = final kernel address (possibly with LSB set)
329 * r5 = appended dtb size (still unknown)320 * r5 = appended dtb size (still unknown)
330 * r6 = _edata321 * r6 = _edata
@@ -332,8 +323,6 @@ restart: adr r0, LC0 · 1 unmodified line
332 * r8 = atags/device tree pointer323 * r8 = atags/device tree pointer
333 * r9 = size of decompressed image324 * r9 = size of decompressed image
334 * r10 = end of this image, including bss/stack/malloc space if non XIP325 * r10 = end of this image, including bss/stack/malloc space if non XIP
335 * r11 = GOT start
336 * r12 = GOT end
337 * sp = stack pointer326 * sp = stack pointer
338 *327 *
339 * if there are device trees (dtb) appended to zImage, advance r10 so that the328 * if there are device trees (dtb) appended to zImage, advance r10 so that the
@@ -381,7 +370,6 @@ restart: adr r0, LC0 · 41 unmodified lines
381 /* temporarily relocate the stack past the DTB work space */370 /* temporarily relocate the stack past the DTB work space */
382 add sp, sp, r5371 add sp, sp, r5
383 372
384 stmfd sp!, {r0-r3, ip, lr}
385 mov r0, r8373 mov r0, r8
386 mov r1, r6374 mov r1, r6
387 mov r2, r5375 mov r2, r5
@@ -400,7 +388,6 @@ restart: adr r0, LC0 · 12 unmodified lines
400 mov r2, r5388 mov r2, r5
401 bleq atags_to_fdt389 bleq atags_to_fdt
402 390
403 ldmfd sp!, {r0-r3, ip, lr}
404 sub sp, sp, r5391 sub sp, sp, r5
405#endif392#endif
406 393
@@ -537,6 +524,10 @@ dtb_check_done: · 130 unmodified lines
537 mov pc, r0524 mov pc, r0
538 525
539wont_overwrite:526wont_overwrite:
527 adr r0, LC0
528 ldmia r0, {r1, r2, r3, r11, r12}
529 sub r0, r0, r1 @ calculate the delta offset
530
540/*531/*
541 * If delta is zero, we are running at the address we were linked at.532 * If delta is zero, we are running at the address we were linked at.
542 * r0 = delta533 * r0 = delta
@@ -660,13 +651,18 @@ not_relocated: mov r0, #0 · 117 unmodified lines
660LC0: .word LC0 @ r1651LC0: .word LC0 @ r1
661 .word __bss_start @ r2652 .word __bss_start @ r2
662 .word _end @ r3653 .word _end @ r3
663 .word _edata @ r6
664 .word _got_start @ r11654 .word _got_start @ r11
665 .word _got_end @ ip655 .word _got_end @ ip
666 .word .L_user_stack_end @ sp
667 .word _end - restart + 16384 + 1024*1024
668 .size LC0, . - LC0656 .size LC0, . - LC0
669 657
658 .type LC1, #object
659LC1: .word .L_user_stack_end - LC1 @ sp
660 .word _edata - LC1 @ r6
661 .size LC1, . - LC1
662
663.Lheadroom:
664 .word _end - restart + 16384 + 1024*1024
665
670.Linflated_image_size_offset:666.Linflated_image_size_offset:
671 .long (input_data_end - 4) - .667 .long (input_data_end - 4) - .
672 668
@@ -1434,38 +1430,26 @@ reloc_code_end: · 761 unmodified lines
1434 1430
1435#ifdef CONFIG_EFI_STUB1431#ifdef CONFIG_EFI_STUB
1436ENTRY(efi_enter_kernel)1432ENTRY(efi_enter_kernel)
1437 mov r7, r0 @ preserve image base1433 mov r4, r0 @ preserve image base
1438 mov r4, r1 @ preserve DT pointer1434 mov r8, r1 @ preserve DT pointer
1439 1435
1440 mov r0, r4 @ DT start1436 mrc p15, 0, r0, c1, c0, 0 @ read SCTLR
1441 add r1, r4, r2 @ DT end1437 tst r0, #0x1 @ MMU enabled?
1442 bl cache_clean_flush1438 orreq r4, r4, #1 @ set LSB if not
1443 1439
1444 mov r0, r7 @ relocated zImage1440 mov r0, r8 @ DT start
1445 ldr r1, =_edata @ size of zImage1441 add r1, r8, r2 @ DT end
1446 add r1, r1, r0 @ end of zImage
1447 bl cache_clean_flush1442 bl cache_clean_flush
1448 1443
1449 @ The PE/COFF loader might not have cleaned the code we are1444 adr r0, 0f @ switch to our stack
1450 @ running beyond the PoU, and so calling cache_off below from1445 ldr sp, [r0]
1451 @ inside the PE/COFF loader allocated region is unsafe unless1446 add sp, sp, r0
1452 @ we explicitly clean it to the PoC.
1453 ARM( adrl r0, call_cache_fn )
1454 THUMB( adr r0, call_cache_fn ) @ region of code we will
1455 adr r1, 0f @ run with MMU off
1456 bl cache_clean_flush
1457 bl cache_off
1458 1447
1459 @ Set parameters for booting zImage according to boot protocol1448 mov r5, #0 @ appended DTB size
1460 @ put FDT address in r2, it was returned by efi_entry()1449 mov r7, #0xFFFFFFFF @ machine ID
1461 @ r1 is the machine type, and r0 needs to be 01450 b wont_overwrite
1462 mov r0, #0
1463 mov r1, #0xFFFFFFFF
1464 mov r2, r4
1465 add r7, r7, #(__efi_start - start)
1466 mov pc, r7 @ no mode switch
1467ENDPROC(efi_enter_kernel)1451ENDPROC(efi_enter_kernel)
14680:14520: .long .L_user_stack_end - .
1469#endif1453#endif
1470 1454
1471 .align1455 .align
arch/arm/boot/compressed/libfdt_env.h+0−24
@@ -1,24 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ARM_LIBFDT_ENV_H
3#define _ARM_LIBFDT_ENV_H
4
5#include <linux/limits.h>
6#include <linux/types.h>
7#include <linux/string.h>
8#include <asm/byteorder.h>
9
10#define INT32_MAX S32_MAX
11#define UINT32_MAX U32_MAX
12
13typedef __be16 fdt16_t;
14typedef __be32 fdt32_t;
15typedef __be64 fdt64_t;
16
17#define fdt16_to_cpu(x) be16_to_cpu(x)
18#define cpu_to_fdt16(x) cpu_to_be16(x)
19#define fdt32_to_cpu(x) be32_to_cpu(x)
20#define cpu_to_fdt32(x) cpu_to_be32(x)
21#define fdt64_to_cpu(x) be64_to_cpu(x)
22#define cpu_to_fdt64(x) cpu_to_be64(x)
23
24#endif
arch/arm/boot/compressed/vmlinux.lds.S+5−0
@@ -63,9 +63,11 @@ SECTIONS · 62 unmodified lines
63 _etext = .;63 _etext = .;
64 64
65 .got.plt : { *(.got.plt) }65 .got.plt : { *(.got.plt) }
66#ifndef CONFIG_EFI_STUB
66 _got_start = .;67 _got_start = .;
67 .got : { *(.got) }68 .got : { *(.got) }
68 _got_end = .;69 _got_end = .;
70#endif
69 71
70 /* ensure the zImage file size is always a multiple of 64 bits */72 /* ensure the zImage file size is always a multiple of 64 bits */
71 /* (without a dummy byte, ld just ignores the empty section) */73 /* (without a dummy byte, ld just ignores the empty section) */
@@ -74,6 +76,9 @@ SECTIONS · 2 unmodified lines
74#ifdef CONFIG_EFI_STUB76#ifdef CONFIG_EFI_STUB
75 .data : ALIGN(4096) {77 .data : ALIGN(4096) {
76 __pecoff_data_start = .;78 __pecoff_data_start = .;
79 _got_start = .;
80 *(.got)
81 _got_end = .;
77 /*82 /*
78 * The EFI stub always executes from RAM, and runs strictly before the83 * The EFI stub always executes from RAM, and runs strictly before the
79 * decompressor, so we can make an exception for its r/w data, and keep it84 * decompressor, so we can make an exception for its r/w data, and keep it
arch/arm/include/asm/assembler.h+1−2
@@ -269,10 +269,9 @@ · 268 unmodified lines
269 .endif ;\269 .endif ;\
270 .popsection270 .popsection
271#define ALT_UP_B(label) \271#define ALT_UP_B(label) \
272 .equ up_b_offset, label - 9998b ;\
273 .pushsection ".alt.smp.init", "a" ;\272 .pushsection ".alt.smp.init", "a" ;\
274 .long 9998b ;\273 .long 9998b ;\
275 W(b) . + up_b_offset ;\274 W(b) . + (label - 9998b) ;\
276 .popsection275 .popsection
277#else276#else
278#define ALT_SMP(instr...)277#define ALT_SMP(instr...)
arch/arm/kernel/module.c+19−3
@@ -55,6 +55,13 @@ void *module_alloc(unsigned long size) · 54 unmodified lines
55}55}
56#endif56#endif
57 57
58bool module_init_section(const char *name)
59{
60 return strstarts(name, ".init") ||
61 strstarts(name, ".ARM.extab.init") ||
62 strstarts(name, ".ARM.exidx.init");
63}
64
58bool module_exit_section(const char *name)65bool module_exit_section(const char *name)
59{66{
60 return strstarts(name, ".exit") ||67 return strstarts(name, ".exit") ||
@@ -409,8 +416,17 @@ module_arch_cleanup(struct module *mod) · 348 unmodified lines
409#ifdef CONFIG_ARM_UNWIND416#ifdef CONFIG_ARM_UNWIND
410 int i;417 int i;
411 418
412 for (i = 0; i < ARM_SEC_MAX; i++)419 for (i = 0; i < ARM_SEC_MAX; i++) {
413 if (mod->arch.unwind[i])420 unwind_table_del(mod->arch.unwind[i]);
414 unwind_table_del(mod->arch.unwind[i]);421 mod->arch.unwind[i] = NULL;
422 }
423#endif
424}
425
426void __weak module_arch_freeing_init(struct module *mod)
427{
428#ifdef CONFIG_ARM_UNWIND
429 unwind_table_del(mod->arch.unwind[ARM_SEC_INIT]);
430 mod->arch.unwind[ARM_SEC_INIT] = NULL;
415#endif431#endif
416}432}
arch/arm/kernel/sys_oabi-compat.c+5−10
@@ -253,20 +253,15 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, · 252 unmodified lines
253{253{
254 struct oabi_epoll_event user;254 struct oabi_epoll_event user;
255 struct epoll_event kernel;255 struct epoll_event kernel;
256 mm_segment_t fs;
257 long ret;
258 256
259 if (op == EPOLL_CTL_DEL)257 if (ep_op_has_event(op) &&
260 return sys_epoll_ctl(epfd, op, fd, NULL);258 copy_from_user(&user, event, sizeof(user)))
261 if (copy_from_user(&user, event, sizeof(user)))
262 return -EFAULT;259 return -EFAULT;
260
263 kernel.events = user.events;261 kernel.events = user.events;
264 kernel.data = user.data;262 kernel.data = user.data;
265 fs = get_fs();263
266 set_fs(KERNEL_DS);264 return do_epoll_ctl(epfd, op, fd, &kernel, false);
267 ret = sys_epoll_ctl(epfd, op, fd, &kernel);
268 set_fs(fs);
269 return ret;
270}265}
271 266
272asmlinkage long sys_oabi_epoll_wait(int epfd,267asmlinkage long sys_oabi_epoll_wait(int epfd,
arch/arm/mm/proc-macros.S+2−1
@@ -5,6 +5,7 @@ · 4 unmodified lines
5 * VMA_VM_FLAGS5 * VMA_VM_FLAGS
6 * VM_EXEC6 * VM_EXEC
7 */7 */
8#include <linux/const.h>
8#include <asm/asm-offsets.h>9#include <asm/asm-offsets.h>
9#include <asm/thread_info.h>10#include <asm/thread_info.h>
10 11
@@ -30,7 +31,7 @@ · 19 unmodified lines
30 * act_mm - get current->active_mm31 * act_mm - get current->active_mm
31 */32 */
32 .macro act_mm, rd33 .macro act_mm, rd
33 bic \rd, sp, #812834 bic \rd, sp, #(THREAD_SIZE - 1) & ~63
34 bic \rd, \rd, #6335 bic \rd, \rd, #63
35 ldr \rd, [\rd, #TI_TASK]36 ldr \rd, [\rd, #TI_TASK]
36 .if (TSK_ACTIVE_MM > IMM12_MASK)37 .if (TSK_ACTIVE_MM > IMM12_MASK)
drivers/firmware/efi/libstub/arm32-stub.c+6−39
@@ -199,14 +199,8 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, · 198 unmodified lines
199 unsigned long kernel_base;199 unsigned long kernel_base;
200 efi_status_t status;200 efi_status_t status;
201 201
202 /*202 /* use a 16 MiB aligned base for the decompressed kernel */
203 * Verify that the DRAM base address is compatible with the ARM203 kernel_base = round_up(dram_base, SZ_16M) + TEXT_OFFSET;
204 * boot protocol, which determines the base of DRAM by masking
205 * off the low 27 bits of the address at which the zImage is
206 * loaded. These assumptions are made by the decompressor,
207 * before any memory map is available.
208 */
209 kernel_base = round_up(dram_base, SZ_128M);
210 204
211 /*205 /*
212 * Note that some platforms (notably, the Raspberry Pi 2) put206 * Note that some platforms (notably, the Raspberry Pi 2) put
@@ -215,41 +209,14 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, · 2 unmodified lines
215 * base of the kernel image is only partially used at the moment.209 * base of the kernel image is only partially used at the moment.
216 * (Up to 5 pages are used for the swapper page tables)210 * (Up to 5 pages are used for the swapper page tables)
217 */211 */
218 kernel_base += TEXT_OFFSET - 5 * PAGE_SIZE;212 status = reserve_kernel_base(kernel_base - 5 * PAGE_SIZE, reserve_addr,
219 213 reserve_size);
220 status = reserve_kernel_base(kernel_base, reserve_addr, reserve_size);
221 if (status != EFI_SUCCESS) {214 if (status != EFI_SUCCESS) {
222 efi_err("Unable to allocate memory for uncompressed kernel.\n");215 efi_err("Unable to allocate memory for uncompressed kernel.\n");
223 return status;216 return status;
224 }217 }
225 218
226 /*219 *image_addr = kernel_base;
227 * Relocate the zImage, so that it appears in the lowest 128 MB220 *image_size = 0;
228 * memory window.
229 */
230 *image_addr = (unsigned long)image->image_base;
231 *image_size = image->image_size;
232 status = efi_relocate_kernel(image_addr, *image_size, *image_size,
233 kernel_base + MAX_UNCOMP_KERNEL_SIZE, 0, 0);
234 if (status != EFI_SUCCESS) {
235 efi_err("Failed to relocate kernel.\n");
236 efi_free(*reserve_size, *reserve_addr);
237 *reserve_size = 0;
238 return status;
239 }
240
241 /*
242 * Check to see if we were able to allocate memory low enough
243 * in memory. The kernel determines the base of DRAM from the
244 * address at which the zImage is loaded.
245 */
246 if (*image_addr + *image_size > dram_base + ZIMAGE_OFFSET_LIMIT) {
247 efi_err("Failed to relocate kernel, no low memory available.\n");
248 efi_free(*reserve_size, *reserve_addr);
249 *reserve_size = 0;
250 efi_free(*image_size, *image_addr);
251 *image_size = 0;
252 return EFI_LOAD_ERROR;
253 }
254 return EFI_SUCCESS;221 return EFI_SUCCESS;
255}222}
drivers/gpu/drm/armada/armada_drv.c+1−1
@@ -311,7 +311,7 @@ static void __exit armada_drm_exit(void) · 310 unmodified lines
311}311}
312module_exit(armada_drm_exit);312module_exit(armada_drm_exit);
313 313
314MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");314MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
315MODULE_DESCRIPTION("Armada DRM Driver");315MODULE_DESCRIPTION("Armada DRM Driver");
316MODULE_LICENSE("GPL");316MODULE_LICENSE("GPL");
317MODULE_ALIAS("platform:armada-drm");317MODULE_ALIAS("platform:armada-drm");
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c+1−1
@@ -630,7 +630,7 @@ static struct platform_driver snd_dw_hdmi_driver = { · 629 unmodified lines
630 630
631module_platform_driver(snd_dw_hdmi_driver);631module_platform_driver(snd_dw_hdmi_driver);
632 632
633MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");633MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
634MODULE_DESCRIPTION("Synopsis Designware HDMI AHB ALSA interface");634MODULE_DESCRIPTION("Synopsis Designware HDMI AHB ALSA interface");
635MODULE_LICENSE("GPL v2");635MODULE_LICENSE("GPL v2");
636MODULE_ALIAS("platform:" DRIVER_NAME);636MODULE_ALIAS("platform:" DRIVER_NAME);
drivers/gpu/drm/etnaviv/etnaviv_drv.c+1−1
@@ -736,7 +736,7 @@ static void __exit etnaviv_exit(void) · 735 unmodified lines
736module_exit(etnaviv_exit);736module_exit(etnaviv_exit);
737 737
738MODULE_AUTHOR("Christian Gmeiner <christian.gmeiner@gmail.com>");738MODULE_AUTHOR("Christian Gmeiner <christian.gmeiner@gmail.com>");
739MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");739MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
740MODULE_AUTHOR("Lucas Stach <l.stach@pengutronix.de>");740MODULE_AUTHOR("Lucas Stach <l.stach@pengutronix.de>");
741MODULE_DESCRIPTION("etnaviv DRM Driver");741MODULE_DESCRIPTION("etnaviv DRM Driver");
742MODULE_LICENSE("GPL v2");742MODULE_LICENSE("GPL v2");
drivers/media/cec/cec-notifier.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2/*2/*
3 * cec-notifier.c - notify CEC drivers of physical address changes3 * cec-notifier.c - notify CEC drivers of physical address changes
4 *4 *
5 * Copyright 2016 Russell King <rmk+kernel@arm.linux.org.uk>5 * Copyright 2016 Russell King.
6 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.6 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
7 */7 */
8 8
drivers/net/phy/swphy.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2/*2/*
3 * Software PHY emulation3 * Software PHY emulation
4 *4 *
5 * Code taken from fixed_phy.c by Russell King <rmk+kernel@arm.linux.org.uk>5 * Code taken from fixed_phy.c by Russell King.
6 *6 *
7 * Author: Vitaly Bordug <vbordug@ru.mvista.com>7 * Author: Vitaly Bordug <vbordug@ru.mvista.com>
8 * Anton Vorontsov <avorontsov@ru.mvista.com>8 * Anton Vorontsov <avorontsov@ru.mvista.com>
include/linux/moduleloader.h+5−0
@@ -29,6 +29,11 @@ void *module_alloc(unsigned long size); · 28 unmodified lines
29/* Free memory returned from module_alloc. */29/* Free memory returned from module_alloc. */
30void module_memfree(void *module_region);30void module_memfree(void *module_region);
31 31
32/* Determines if the section name is an init section (that is only used during
33 * module loading).
34 */
35bool module_init_section(const char *name);
36
32/* Determines if the section name is an exit section (that is only used during37/* Determines if the section name is an exit section (that is only used during
33 * module unloading)38 * module unloading)
34 */39 */
include/media/cec-notifier.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2/*2/*
3 * cec-notifier.h - notify CEC drivers of physical address changes3 * cec-notifier.h - notify CEC drivers of physical address changes
4 *4 *
5 * Copyright 2016 Russell King <rmk+kernel@arm.linux.org.uk>5 * Copyright 2016 Russell King.
6 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.6 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
7 */7 */
8 8
kernel/module.c+7−2
@@ -2400,7 +2400,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 2399 unmodified lines
2400 if ((s->sh_flags & masks[m][0]) != masks[m][0]2400 if ((s->sh_flags & masks[m][0]) != masks[m][0]
2401 || (s->sh_flags & masks[m][1])2401 || (s->sh_flags & masks[m][1])
2402 || s->sh_entsize != ~0UL2402 || s->sh_entsize != ~0UL
2403 || strstarts(sname, ".init"))2403 || module_init_section(sname))
2404 continue;2404 continue;
2405 s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);2405 s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);
2406 pr_debug("\t%s\n", sname);2406 pr_debug("\t%s\n", sname);
@@ -2433,7 +2433,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 26 unmodified lines
2433 if ((s->sh_flags & masks[m][0]) != masks[m][0]2433 if ((s->sh_flags & masks[m][0]) != masks[m][0]
2434 || (s->sh_flags & masks[m][1])2434 || (s->sh_flags & masks[m][1])
2435 || s->sh_entsize != ~0UL2435 || s->sh_entsize != ~0UL
2436 || !strstarts(sname, ".init"))2436 || !module_init_section(sname))
2437 continue;2437 continue;
2438 s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)2438 s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)
2439 | INIT_OFFSET_MASK);2439 | INIT_OFFSET_MASK);
@@ -2768,6 +2768,11 @@ void * __weak module_alloc(unsigned long size) · 328 unmodified lines
2768 return vmalloc_exec(size);2768 return vmalloc_exec(size);
2769}2769}
2770 2770
2771bool __weak module_init_section(const char *name)
2772{
2773 return strstarts(name, ".init");
2774}
2775
2771bool __weak module_exit_section(const char *name)2776bool __weak module_exit_section(const char *name)
2772{2777{
2773 return strstarts(name, ".exit");2778 return strstarts(name, ".exit");