diff options
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 @@ +From 218a12f1f41f6fdce18d084e5ddd3c6439db0983 Mon Sep 17 00:00:00 2001 +From: Graeme Smecher <gsmecher@threespeedlogic.com> +Date: Sat, 8 Jun 2013 09:52:08 -0700 +Subject: microblaze: Don't mark arch_kgdb_ops as const. + +Other architectures don't do it, and it conflicts with the extern'd definition +in include/linux/kgdb.h. + +The patch fails checkpatch but it reflects current +functions declaration and solved compilation error. + +Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com> +CC: Michal Simek <monstr@monstr.eu> +CC: linux-kernel@vger.kernel.org +Signed-off-by: Michal Simek <michal.simek@xilinx.com> +Upstream-Status: Backport +--- +diff --git a/arch/microblaze/kernel/kgdb.c b/arch/microblaze/kernel/kgdb.c +index 8adc9244..09a5e82 100644 +--- a/arch/microblaze/kernel/kgdb.c ++++ b/arch/microblaze/kernel/kgdb.c +@@ -141,7 +141,7 @@ void kgdb_arch_exit(void) + /* + * Global data + */ +-const struct kgdb_arch arch_kgdb_ops = { ++struct kgdb_arch arch_kgdb_ops = { + #ifdef __MICROBLAZEEL__ + .gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */ + #else +-- + 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 @@ +From 7f15a256b556bf26780d7a0bd03c88914a852022 Mon Sep 17 00:00:00 2001 +From: Michal Simek <michal.simek@xilinx.com> +Date: Wed, 6 Nov 2013 16:36:08 +0100 +Subject: microblaze: Calculate kernel pad automatically + +The kernel needs to setup the first two tlbs with pad +which is used for early page allocation which is used +by mapin_ram() to allocate tables for lowmem memory +before memory initialisation is done. +Calculate pad directly from lowmem size. + +Signed-off-by: Michal Simek <michal.simek@xilinx.com> +Upstream-Status: Backport +--- +diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig +index d8ec74b..655e1ca 100644 +--- a/arch/microblaze/Kconfig ++++ b/arch/microblaze/Kconfig +@@ -245,10 +245,6 @@ config MICROBLAZE_64K_PAGES + + endchoice + +-config KERNEL_PAD +- hex "Kernel PAD for unpacking" if ADVANCED_OPTIONS +- default "0x80000" if MMU +- + endmenu + + source "mm/Kconfig" +diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S +index fcc797f..817b7ee 100644 +--- a/arch/microblaze/kernel/head.S ++++ b/arch/microblaze/kernel/head.S +@@ -176,7 +176,7 @@ _invalidate: + /* start to do TLB calculation */ + addik r12, r0, _end + rsub r12, r3, r12 +- addik r12, r12, CONFIG_KERNEL_PAD /* that's the pad */ ++ addik r12, r12, CONFIG_LOWMEM_SIZE >> PTE_SHIFT /* that's the pad */ + + or r9, r0, r0 /* TLB0 = 0 */ + or r10, r0, r0 /* TLB1 = 0 */ +-- + 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 @@ +From 99399545d62533b4ae742190b5c6b11f7a5826d9 Mon Sep 17 00:00:00 2001 +From: Michal Simek <michal.simek@xilinx.com> +Date: Mon, 16 Sep 2013 07:46:23 +0200 +Subject: microblaze: Fix bug with mmap2 syscall MB implementation + +Fix mmap2 behaviour which incorrectly works with pgoff +not in 4k units. + +Reported-by: Rich Felker <dalias@aerifal.cx> +Signed-off-by: Michal Simek <michal.simek@xilinx.com> +Upstream-Status: Backport +--- +diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c +index e80a6c0..f1e1f66 100644 +--- a/arch/microblaze/kernel/sys_microblaze.c ++++ b/arch/microblaze/kernel/sys_microblaze.c +@@ -42,3 +42,14 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, + + return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); + } ++ ++SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, ++ unsigned long, prot, unsigned long, flags, unsigned long, fd, ++ unsigned long, pgoff) ++{ ++ if (pgoff & (~PAGE_MASK >> 12)) ++ return -EINVAL; ++ ++ return sys_mmap_pgoff(addr, len, prot, flags, fd, ++ pgoff >> (PAGE_SHIFT - 12)); ++} +diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S +index 4fca56c..b882ad5 100644 +--- a/arch/microblaze/kernel/syscall_table.S ++++ b/arch/microblaze/kernel/syscall_table.S +@@ -192,7 +192,7 @@ ENTRY(sys_call_table) + .long sys_ni_syscall /* reserved for streams2 */ + .long sys_vfork /* 190 */ + .long sys_getrlimit +- .long sys_mmap_pgoff /* mmap2 */ ++ .long sys_mmap2 + .long sys_truncate64 + .long sys_ftruncate64 + .long sys_stat64 /* 195 */ +-- + 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 require linux-xilinx-machines.inc FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" -SRC_URI_append_microblaze += "file://ec2eba55f0c0e74dd39aca14dcc597583cf1eb67.patch" +SRC_URI_append_microblaze += " \ + file://ec2eba55f0c0e74dd39aca14dcc597583cf1eb67.patch \ + file://218a12f1f41f6fdce18d084e5ddd3c6439db0983.patch \ + file://7f15a256b556bf26780d7a0bd03c88914a852022.patch \ + file://99399545d62533b4ae742190b5c6b11f7a5826d9.patch \ + " |