From edf6844ebf4d66546caf2a75e9d05e579990678c Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Mon, 4 Nov 2013 09:30:18 +0100 Subject: microblaze: Remove unused NO_MMU Kconfig parameter This removes the NO_MMU Kconfig parameter, which was no longer used anywhere in the source code and Makefiles. This also updates a comment refering to this parameter. Signed-off-by: Michael Opdenacker Signed-off-by: Michal Simek --- arch/microblaze/Kconfig | 5 ----- arch/microblaze/kernel/hw_exception_handler.S | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index b82f82b74319..d8ec74b4d1ee 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -82,11 +82,6 @@ config MMU bool "MMU support" default n -config NO_MMU - bool - depends on !MMU - default y - comment "Boot options" config CMDLINE_BOOL diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 61b3a1fed46f..fc6b89f4dd31 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S @@ -193,8 +193,8 @@ * - W S REG EXC * * - * STACK FRAME STRUCTURE (for NO_MMU) - * --------------------------------- + * STACK FRAME STRUCTURE (for CONFIG_MMU=n) + * ---------------------------------------- * * +-------------+ + 0 * | MSR | -- cgit v1.2.3 From 7f15a256b556bf26780d7a0bd03c88914a852022 Mon Sep 17 00:00:00 2001 From: Michal Simek 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 --- arch/microblaze/Kconfig | 4 ---- arch/microblaze/kernel/head.S | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index d8ec74b4d1ee..655e1cadf692 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 fcc797feb9db..817b7eec95b6 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 */ -- cgit v1.2.3 From db2a7df0343a0fb166d369e58bcfe605162dc857 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 20 Aug 2013 16:45:36 +0200 Subject: microblaze: Remove deprecated IRQF_DISABLED Removed IRQF_DISABLED as it's no-op and should be removed. Signed-off-by: Michal Simek --- arch/microblaze/kernel/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index e4b3f33ef34c..d7abb71abf61 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c @@ -148,7 +148,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = IRQF_TIMER, .name = "timer", .dev_id = &clockevent_xilinx_timer, }; -- cgit v1.2.3 From 176195e757df0044623b2086527ad5b5cfde9488 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 16 Sep 2013 07:45:29 +0200 Subject: microblaze: Use predefined SYSCALL_DEFINE macro Use standard syscall definition. Signed-off-by: Michal Simek --- arch/microblaze/kernel/sys_microblaze.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index f905b3ae68c7..e80a6c02ac31 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c @@ -33,9 +33,9 @@ #include #include -asmlinkage long sys_mmap(unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, off_t pgoff) +SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, + unsigned long, prot, unsigned long, flags, unsigned long, fd, + off_t, pgoff) { if (pgoff & ~PAGE_MASK) return -EINVAL; -- cgit v1.2.3 From 99399545d62533b4ae742190b5c6b11f7a5826d9 Mon Sep 17 00:00:00 2001 From: Michal Simek 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 Signed-off-by: Michal Simek --- arch/microblaze/kernel/sys_microblaze.c | 11 +++++++++++ arch/microblaze/kernel/syscall_table.S | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index e80a6c02ac31..f1e1f666ddde 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 4fca56cf02f6..b882ad50535b 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 */ -- cgit v1.2.3 From 63d7bd1b171d5e7190c50dd3e48b1c561d7803d8 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 14 Jun 2013 09:53:53 +0200 Subject: microblaze: Remove incorrect file path Trivial. Signed-off-by: Michal Simek --- arch/microblaze/boot/dts/Makefile | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile index c3b3a5d67b89..c4982d16e555 100644 --- a/arch/microblaze/boot/dts/Makefile +++ b/arch/microblaze/boot/dts/Makefile @@ -1,6 +1,4 @@ # -# arch/microblaze/boot/Makefile -# obj-y += linked_dtb.o -- cgit v1.2.3