summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@xilinx.com>2014-10-10 17:32:52 +1000
committerNathan Rossi <nathan.rossi@xilinx.com>2014-10-27 17:58:51 +1000
commit482199188dca59a9d80548758a2bb81a11a2847d (patch)
treeae8963029e59dd289bc920a1d1bd3ee8bb057b5c
parent9f886df3cbea38fa4d33d39a929050047e0bdb4e (diff)
downloadmeta-xilinx-482199188dca59a9d80548758a2bb81a11a2847d.tar.gz
linux-yocto_3.10: Backport patches for MicroBlaze
* The linux-yocto 3.10 kernel is missing a patch that should be in 3.10, backport the patch from mainline * Backport some patches from mainline to fix issues with MicroBlaze Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
-rw-r--r--recipes-kernel/linux/linux-yocto/218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch32
-rw-r--r--recipes-kernel/linux/linux-yocto/7f15a256b556bf26780d7a0bd03c88914a852022.patch44
-rw-r--r--recipes-kernel/linux/linux-yocto/99399545d62533b4ae742190b5c6b11f7a5826d9.patch46
-rw-r--r--recipes-kernel/linux/linux-yocto_3.10.bbappend7
4 files changed, 128 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-yocto/218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch b/recipes-kernel/linux/linux-yocto/218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch
new file mode 100644
index 00000000..9f113815
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch
@@ -0,0 +1,32 @@
1From 218a12f1f41f6fdce18d084e5ddd3c6439db0983 Mon Sep 17 00:00:00 2001
2From: Graeme Smecher <gsmecher@threespeedlogic.com>
3Date: Sat, 8 Jun 2013 09:52:08 -0700
4Subject: microblaze: Don't mark arch_kgdb_ops as const.
5
6Other architectures don't do it, and it conflicts with the extern'd definition
7in include/linux/kgdb.h.
8
9The patch fails checkpatch but it reflects current
10functions declaration and solved compilation error.
11
12Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
13CC: Michal Simek <monstr@monstr.eu>
14CC: linux-kernel@vger.kernel.org
15Signed-off-by: Michal Simek <michal.simek@xilinx.com>
16Upstream-Status: Backport
17---
18diff --git a/arch/microblaze/kernel/kgdb.c b/arch/microblaze/kernel/kgdb.c
19index 8adc9244..09a5e82 100644
20--- a/arch/microblaze/kernel/kgdb.c
21+++ b/arch/microblaze/kernel/kgdb.c
22@@ -141,7 +141,7 @@ void kgdb_arch_exit(void)
23 /*
24 * Global data
25 */
26-const struct kgdb_arch arch_kgdb_ops = {
27+struct kgdb_arch arch_kgdb_ops = {
28 #ifdef __MICROBLAZEEL__
29 .gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */
30 #else
31--
32
diff --git a/recipes-kernel/linux/linux-yocto/7f15a256b556bf26780d7a0bd03c88914a852022.patch b/recipes-kernel/linux/linux-yocto/7f15a256b556bf26780d7a0bd03c88914a852022.patch
new file mode 100644
index 00000000..509b1f17
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/7f15a256b556bf26780d7a0bd03c88914a852022.patch
@@ -0,0 +1,44 @@
1From 7f15a256b556bf26780d7a0bd03c88914a852022 Mon Sep 17 00:00:00 2001
2From: Michal Simek <michal.simek@xilinx.com>
3Date: Wed, 6 Nov 2013 16:36:08 +0100
4Subject: microblaze: Calculate kernel pad automatically
5
6The kernel needs to setup the first two tlbs with pad
7which is used for early page allocation which is used
8by mapin_ram() to allocate tables for lowmem memory
9before memory initialisation is done.
10Calculate pad directly from lowmem size.
11
12Signed-off-by: Michal Simek <michal.simek@xilinx.com>
13Upstream-Status: Backport
14---
15diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
16index d8ec74b..655e1ca 100644
17--- a/arch/microblaze/Kconfig
18+++ b/arch/microblaze/Kconfig
19@@ -245,10 +245,6 @@ config MICROBLAZE_64K_PAGES
20
21 endchoice
22
23-config KERNEL_PAD
24- hex "Kernel PAD for unpacking" if ADVANCED_OPTIONS
25- default "0x80000" if MMU
26-
27 endmenu
28
29 source "mm/Kconfig"
30diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
31index fcc797f..817b7ee 100644
32--- a/arch/microblaze/kernel/head.S
33+++ b/arch/microblaze/kernel/head.S
34@@ -176,7 +176,7 @@ _invalidate:
35 /* start to do TLB calculation */
36 addik r12, r0, _end
37 rsub r12, r3, r12
38- addik r12, r12, CONFIG_KERNEL_PAD /* that's the pad */
39+ addik r12, r12, CONFIG_LOWMEM_SIZE >> PTE_SHIFT /* that's the pad */
40
41 or r9, r0, r0 /* TLB0 = 0 */
42 or r10, r0, r0 /* TLB1 = 0 */
43--
44
diff --git a/recipes-kernel/linux/linux-yocto/99399545d62533b4ae742190b5c6b11f7a5826d9.patch b/recipes-kernel/linux/linux-yocto/99399545d62533b4ae742190b5c6b11f7a5826d9.patch
new file mode 100644
index 00000000..e81caf11
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/99399545d62533b4ae742190b5c6b11f7a5826d9.patch
@@ -0,0 +1,46 @@
1From 99399545d62533b4ae742190b5c6b11f7a5826d9 Mon Sep 17 00:00:00 2001
2From: Michal Simek <michal.simek@xilinx.com>
3Date: Mon, 16 Sep 2013 07:46:23 +0200
4Subject: microblaze: Fix bug with mmap2 syscall MB implementation
5
6Fix mmap2 behaviour which incorrectly works with pgoff
7not in 4k units.
8
9Reported-by: Rich Felker <dalias@aerifal.cx>
10Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11Upstream-Status: Backport
12---
13diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
14index e80a6c0..f1e1f66 100644
15--- a/arch/microblaze/kernel/sys_microblaze.c
16+++ b/arch/microblaze/kernel/sys_microblaze.c
17@@ -42,3 +42,14 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
18
19 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
20 }
21+
22+SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
23+ unsigned long, prot, unsigned long, flags, unsigned long, fd,
24+ unsigned long, pgoff)
25+{
26+ if (pgoff & (~PAGE_MASK >> 12))
27+ return -EINVAL;
28+
29+ return sys_mmap_pgoff(addr, len, prot, flags, fd,
30+ pgoff >> (PAGE_SHIFT - 12));
31+}
32diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
33index 4fca56c..b882ad5 100644
34--- a/arch/microblaze/kernel/syscall_table.S
35+++ b/arch/microblaze/kernel/syscall_table.S
36@@ -192,7 +192,7 @@ ENTRY(sys_call_table)
37 .long sys_ni_syscall /* reserved for streams2 */
38 .long sys_vfork /* 190 */
39 .long sys_getrlimit
40- .long sys_mmap_pgoff /* mmap2 */
41+ .long sys_mmap2
42 .long sys_truncate64
43 .long sys_ftruncate64
44 .long sys_stat64 /* 195 */
45--
46
diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend
index a8b72e04..03a5da7d 100644
--- a/recipes-kernel/linux/linux-yocto_3.10.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -3,4 +3,9 @@ require linux-xilinx-configs.inc
3require linux-xilinx-machines.inc 3require linux-xilinx-machines.inc
4 4
5FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" 5FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
6SRC_URI_append_microblaze += "file://ec2eba55f0c0e74dd39aca14dcc597583cf1eb67.patch" 6SRC_URI_append_microblaze += " \
7 file://ec2eba55f0c0e74dd39aca14dcc597583cf1eb67.patch \
8 file://218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch \
9 file://7f15a256b556bf26780d7a0bd03c88914a852022.patch \
10 file://99399545d62533b4ae742190b5c6b11f7a5826d9.patch \
11 "