From: Greg Kroah-Hartman Date: Mon, 2 Feb 2015 23:01:51 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.18.6~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db6aed32e9eb00407bc6b18d497c2ebab04a3fda;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: spi-dw-mid-fix-fifo-size.patch x86-build-replace-perl-script-with-shell-script.patch --- diff --git a/queue-3.14/spi-dw-mid-fix-fifo-size.patch b/queue-3.14/spi-dw-mid-fix-fifo-size.patch new file mode 100644 index 00000000000..871e475f655 --- /dev/null +++ b/queue-3.14/spi-dw-mid-fix-fifo-size.patch @@ -0,0 +1,32 @@ +From 67bf9cda4b498b8cea4a40be67a470afe57d2e88 Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko +Date: Fri, 2 Jan 2015 17:48:51 +0200 +Subject: spi: dw-mid: fix FIFO size + +From: Andy Shevchenko + +commit 67bf9cda4b498b8cea4a40be67a470afe57d2e88 upstream. + +The FIFO size is 40 accordingly to the specifications, but this means 0x40, +i.e. 64 bytes. This patch fixes the typo and enables FIFO size autodetection +for Intel MID devices. + +Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support) +Signed-off-by: Andy Shevchenko +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/spi/spi-dw-mid.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/spi/spi-dw-mid.c ++++ b/drivers/spi/spi-dw-mid.c +@@ -222,7 +222,6 @@ int dw_spi_mid_init(struct dw_spi *dws) + iounmap(clk_reg); + + dws->num_cs = 16; +- dws->fifo_len = 40; /* FIFO has 40 words buffer */ + + #ifdef CONFIG_SPI_DW_MID_DMA + dws->dma_priv = kzalloc(sizeof(struct mid_dma), GFP_KERNEL); diff --git a/queue-3.14/x86-build-replace-perl-script-with-shell-script.patch b/queue-3.14/x86-build-replace-perl-script-with-shell-script.patch new file mode 100644 index 00000000000..0c04c4df669 --- /dev/null +++ b/queue-3.14/x86-build-replace-perl-script-with-shell-script.patch @@ -0,0 +1,131 @@ +From d69911a68c865b152a067feaa45e98e6bb0f655b Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Mon, 26 Jan 2015 12:58:35 -0800 +Subject: x86, build: replace Perl script with Shell script + +From: Kees Cook + +commit d69911a68c865b152a067feaa45e98e6bb0f655b upstream. + +Commit e6023367d779 ("x86, kaslr: Prevent .bss from overlaping initrd") +added Perl to the required build environment. This reimplements in +shell the Perl script used to find the size of the kernel with bss and +brk added. + +Signed-off-by: Kees Cook +Reported-by: Rob Landley +Acked-by: Rob Landley +Cc: Anca Emanuel +Cc: Fengguang Wu +Cc: Junjie Mao +Cc: Kees Cook +Cc: Thomas Gleixner +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/boot/compressed/Makefile | 2 - + arch/x86/tools/calc_run_size.pl | 39 ----------------------------------- + arch/x86/tools/calc_run_size.sh | 42 ++++++++++++++++++++++++++++++++++++++ + 3 files changed, 43 insertions(+), 40 deletions(-) + +--- a/arch/x86/boot/compressed/Makefile ++++ b/arch/x86/boot/compressed/Makefile +@@ -76,7 +76,7 @@ suffix-$(CONFIG_KERNEL_LZO) := lzo + suffix-$(CONFIG_KERNEL_LZ4) := lz4 + + RUN_SIZE = $(shell $(OBJDUMP) -h vmlinux | \ +- perl $(srctree)/arch/x86/tools/calc_run_size.pl) ++ $(CONFIG_SHELL) $(srctree)/arch/x86/tools/calc_run_size.sh) + quiet_cmd_mkpiggy = MKPIGGY $@ + cmd_mkpiggy = $(obj)/mkpiggy $< $(RUN_SIZE) > $@ || ( rm -f $@ ; false ) + +--- a/arch/x86/tools/calc_run_size.pl ++++ /dev/null +@@ -1,39 +0,0 @@ +-#!/usr/bin/perl +-# +-# Calculate the amount of space needed to run the kernel, including room for +-# the .bss and .brk sections. +-# +-# Usage: +-# objdump -h a.out | perl calc_run_size.pl +-use strict; +- +-my $mem_size = 0; +-my $file_offset = 0; +- +-my $sections=" *[0-9]+ \.(?:bss|brk) +"; +-while (<>) { +- if (/^$sections([0-9a-f]+) +(?:[0-9a-f]+ +){2}([0-9a-f]+)/) { +- my $size = hex($1); +- my $offset = hex($2); +- $mem_size += $size; +- if ($file_offset == 0) { +- $file_offset = $offset; +- } elsif ($file_offset != $offset) { +- # BFD linker shows the same file offset in ELF. +- # Gold linker shows them as consecutive. +- next if ($file_offset + $mem_size == $offset + $size); +- +- printf STDERR "file_offset: 0x%lx\n", $file_offset; +- printf STDERR "mem_size: 0x%lx\n", $mem_size; +- printf STDERR "offset: 0x%lx\n", $offset; +- printf STDERR "size: 0x%lx\n", $size; +- +- die ".bss and .brk are non-contiguous\n"; +- } +- } +-} +- +-if ($file_offset == 0) { +- die "Never found .bss or .brk file offset\n"; +-} +-printf("%d\n", $mem_size + $file_offset); +--- /dev/null ++++ b/arch/x86/tools/calc_run_size.sh +@@ -0,0 +1,42 @@ ++#!/bin/sh ++# ++# Calculate the amount of space needed to run the kernel, including room for ++# the .bss and .brk sections. ++# ++# Usage: ++# objdump -h a.out | sh calc_run_size.sh ++ ++NUM='\([0-9a-fA-F]*[ \t]*\)' ++OUT=$(sed -n 's/^[ \t0-9]*.b[sr][sk][ \t]*'"$NUM$NUM$NUM$NUM"'.*/\1\4/p') ++if [ -z "$OUT" ] ; then ++ echo "Never found .bss or .brk file offset" >&2 ++ exit 1 ++fi ++ ++OUT=$(echo ${OUT# }) ++sizeA=$(printf "%d" 0x${OUT%% *}) ++OUT=${OUT#* } ++offsetA=$(printf "%d" 0x${OUT%% *}) ++OUT=${OUT#* } ++sizeB=$(printf "%d" 0x${OUT%% *}) ++OUT=${OUT#* } ++offsetB=$(printf "%d" 0x${OUT%% *}) ++ ++run_size=$(( $offsetA + $sizeA + $sizeB )) ++ ++# BFD linker shows the same file offset in ELF. ++if [ "$offsetA" -ne "$offsetB" ] ; then ++ # Gold linker shows them as consecutive. ++ endB=$(( $offsetB + $sizeB )) ++ if [ "$endB" != "$run_size" ] ; then ++ printf "sizeA: 0x%x\n" $sizeA >&2 ++ printf "offsetA: 0x%x\n" $offsetA >&2 ++ printf "sizeB: 0x%x\n" $sizeB >&2 ++ printf "offsetB: 0x%x\n" $offsetB >&2 ++ echo ".bss and .brk are non-contiguous" >&2 ++ exit 1 ++ fi ++fi ++ ++printf "%d\n" $run_size ++exit 0