diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-27 20:28:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-27 20:28:40 -0400 |
commit | d2b35e0042681791815a2fa90213fd4d21992c56 (patch) | |
tree | efee5906ba6730952ddd4852b4eb3675fadfe143 | |
parent | fd9adc402b3d897709f56914702f243efa434c76 (diff) | |
parent | 1b8837b61714c3743fadb3a6bbb57ffd53839e7c (diff) |
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
"A small number of small fixes for ARM, mostly for some build issues.
One fix for a regression caused by the cpu hotplug conversion from a
few kernel versions ago"
* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 8750/1: deflate_xip_data.sh: minor fixes
ARM: 8748/1: mm: Define vdso_start, vdso_end as array
ARM: 8747/1: make CONFIG_DEBUG_WX depend on MMU
ARM: 8746/1: vfp: Go back to clearing vfp_current_hw_state[]
-rw-r--r-- | arch/arm/Kconfig.debug | 1 | ||||
-rwxr-xr-x | arch/arm/boot/deflate_xip_data.sh | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/vdso.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/vdso.c | 12 | ||||
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 2 |
5 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 78a647080ebc..199ebc1c4538 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -22,6 +22,7 @@ config ARM_PTDUMP_DEBUGFS | |||
22 | 22 | ||
23 | config DEBUG_WX | 23 | config DEBUG_WX |
24 | bool "Warn on W+X mappings at boot" | 24 | bool "Warn on W+X mappings at boot" |
25 | depends on MMU | ||
25 | select ARM_PTDUMP_CORE | 26 | select ARM_PTDUMP_CORE |
26 | ---help--- | 27 | ---help--- |
27 | Generate a warning if any W+X mappings are found at boot. | 28 | Generate a warning if any W+X mappings are found at boot. |
diff --git a/arch/arm/boot/deflate_xip_data.sh b/arch/arm/boot/deflate_xip_data.sh index 1189598a25eb..5e7d758ebdd6 100755 --- a/arch/arm/boot/deflate_xip_data.sh +++ b/arch/arm/boot/deflate_xip_data.sh | |||
@@ -30,7 +30,7 @@ esac | |||
30 | 30 | ||
31 | sym_val() { | 31 | sym_val() { |
32 | # extract hex value for symbol in $1 | 32 | # extract hex value for symbol in $1 |
33 | local val=$($NM "$VMLINUX" | sed -n "/ $1$/{s/ .*$//p;q}") | 33 | local val=$($NM "$VMLINUX" 2>/dev/null | sed -n "/ $1\$/{s/ .*$//p;q}") |
34 | [ "$val" ] || { echo "can't find $1 in $VMLINUX" 1>&2; exit 1; } | 34 | [ "$val" ] || { echo "can't find $1 in $VMLINUX" 1>&2; exit 1; } |
35 | # convert from hex to decimal | 35 | # convert from hex to decimal |
36 | echo $((0x$val)) | 36 | echo $((0x$val)) |
@@ -48,12 +48,12 @@ data_end=$(($_edata_loc - $base_offset)) | |||
48 | file_end=$(stat -c "%s" "$XIPIMAGE") | 48 | file_end=$(stat -c "%s" "$XIPIMAGE") |
49 | if [ "$file_end" != "$data_end" ]; then | 49 | if [ "$file_end" != "$data_end" ]; then |
50 | printf "end of xipImage doesn't match with _edata_loc (%#x vs %#x)\n" \ | 50 | printf "end of xipImage doesn't match with _edata_loc (%#x vs %#x)\n" \ |
51 | $(($file_end + $base_offset)) $_edata_loc 2>&1 | 51 | $(($file_end + $base_offset)) $_edata_loc 1>&2 |
52 | exit 1; | 52 | exit 1; |
53 | fi | 53 | fi |
54 | 54 | ||
55 | # be ready to clean up | 55 | # be ready to clean up |
56 | trap 'rm -f "$XIPIMAGE.tmp"' 0 1 2 3 | 56 | trap 'rm -f "$XIPIMAGE.tmp"; exit 1' 1 2 3 |
57 | 57 | ||
58 | # substitute the data section by a compressed version | 58 | # substitute the data section by a compressed version |
59 | $DD if="$XIPIMAGE" count=$data_start iflag=count_bytes of="$XIPIMAGE.tmp" | 59 | $DD if="$XIPIMAGE" count=$data_start iflag=count_bytes of="$XIPIMAGE.tmp" |
diff --git a/arch/arm/include/asm/vdso.h b/arch/arm/include/asm/vdso.h index 9c99e817535e..5b85889f82ee 100644 --- a/arch/arm/include/asm/vdso.h +++ b/arch/arm/include/asm/vdso.h | |||
@@ -12,8 +12,6 @@ struct mm_struct; | |||
12 | 12 | ||
13 | void arm_install_vdso(struct mm_struct *mm, unsigned long addr); | 13 | void arm_install_vdso(struct mm_struct *mm, unsigned long addr); |
14 | 14 | ||
15 | extern char vdso_start, vdso_end; | ||
16 | |||
17 | extern unsigned int vdso_total_pages; | 15 | extern unsigned int vdso_total_pages; |
18 | 16 | ||
19 | #else /* CONFIG_VDSO */ | 17 | #else /* CONFIG_VDSO */ |
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index a4d6dc0f2427..f4dd7f9663c1 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c | |||
@@ -39,6 +39,8 @@ | |||
39 | 39 | ||
40 | static struct page **vdso_text_pagelist; | 40 | static struct page **vdso_text_pagelist; |
41 | 41 | ||
42 | extern char vdso_start[], vdso_end[]; | ||
43 | |||
42 | /* Total number of pages needed for the data and text portions of the VDSO. */ | 44 | /* Total number of pages needed for the data and text portions of the VDSO. */ |
43 | unsigned int vdso_total_pages __ro_after_init; | 45 | unsigned int vdso_total_pages __ro_after_init; |
44 | 46 | ||
@@ -197,13 +199,13 @@ static int __init vdso_init(void) | |||
197 | unsigned int text_pages; | 199 | unsigned int text_pages; |
198 | int i; | 200 | int i; |
199 | 201 | ||
200 | if (memcmp(&vdso_start, "\177ELF", 4)) { | 202 | if (memcmp(vdso_start, "\177ELF", 4)) { |
201 | pr_err("VDSO is not a valid ELF object!\n"); | 203 | pr_err("VDSO is not a valid ELF object!\n"); |
202 | return -ENOEXEC; | 204 | return -ENOEXEC; |
203 | } | 205 | } |
204 | 206 | ||
205 | text_pages = (&vdso_end - &vdso_start) >> PAGE_SHIFT; | 207 | text_pages = (vdso_end - vdso_start) >> PAGE_SHIFT; |
206 | pr_debug("vdso: %i text pages at base %p\n", text_pages, &vdso_start); | 208 | pr_debug("vdso: %i text pages at base %p\n", text_pages, vdso_start); |
207 | 209 | ||
208 | /* Allocate the VDSO text pagelist */ | 210 | /* Allocate the VDSO text pagelist */ |
209 | vdso_text_pagelist = kcalloc(text_pages, sizeof(struct page *), | 211 | vdso_text_pagelist = kcalloc(text_pages, sizeof(struct page *), |
@@ -218,7 +220,7 @@ static int __init vdso_init(void) | |||
218 | for (i = 0; i < text_pages; i++) { | 220 | for (i = 0; i < text_pages; i++) { |
219 | struct page *page; | 221 | struct page *page; |
220 | 222 | ||
221 | page = virt_to_page(&vdso_start + i * PAGE_SIZE); | 223 | page = virt_to_page(vdso_start + i * PAGE_SIZE); |
222 | vdso_text_pagelist[i] = page; | 224 | vdso_text_pagelist[i] = page; |
223 | } | 225 | } |
224 | 226 | ||
@@ -229,7 +231,7 @@ static int __init vdso_init(void) | |||
229 | 231 | ||
230 | cntvct_ok = cntvct_functional(); | 232 | cntvct_ok = cntvct_functional(); |
231 | 233 | ||
232 | patch_vdso(&vdso_start); | 234 | patch_vdso(vdso_start); |
233 | 235 | ||
234 | return 0; | 236 | return 0; |
235 | } | 237 | } |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 03c6a3c72f9c..4c375e11ae95 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -648,7 +648,7 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, | |||
648 | */ | 648 | */ |
649 | static int vfp_dying_cpu(unsigned int cpu) | 649 | static int vfp_dying_cpu(unsigned int cpu) |
650 | { | 650 | { |
651 | vfp_force_reload(cpu, current_thread_info()); | 651 | vfp_current_hw_state[cpu] = NULL; |
652 | return 0; | 652 | return 0; |
653 | } | 653 | } |
654 | 654 | ||