Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/linux-milkymist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e3c7b2c4ddd1
Choose a base ref
...
head repository: m-labs/linux-milkymist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d55278032321
Choose a head ref
  • 9 commits
  • 14 files changed
  • 1 contributor

Commits on Aug 24, 2012

  1. lm32: Slightly optimize the syscall handling

    We can get rid of the null-pointer check in the syscall handler if we make sure
    that every syscall table entry is initialized.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    5c2d8db View commit details
  2. lib: Add a generic sys_call_table

    Most of the new architectures use identical sys call tables definitions. This
    patch adds a generic sys call table implementation which can be used by these
    architectures.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    chris-huxtable Chris Huxtable
    Copy the full SHA
    e55aef4 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e6dceda View commit details
  4. lm32: Speedup clearing the bbs section a bit

    We currently do two branch, one add and one store instruction per word in the
    bss section. Change this to one branch, one add and 8 stores per 8 words.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    8ac8a56 View commit details
  5. Copy the full SHA
    b8dfe7c View commit details
  6. asm-generic/mmu.h: Remove unused vmlist field from mm_context_t

    Nothing is using the vmlist field in mm_context_t anymore. It has been removed
    from the non-generic versions over 3 years ago 8feae13 ("NOMMU: Make VMAs per
    MM as for MMU-mode linux").
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    dbd629c View commit details
  7. asm-generic/mmu.h: Add support for FDPIC

    No-MMU architectures often have support for FDPIC binaries. FDPIC support
    requires two additional fields in the mm_context_t struct. This patch adds these
    fields to the generic mm_context_t definition if support for FDPIC binaries is
    enabled. This allows to use the generic mmu.h for a few more architectures.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    082b2e2 View commit details
  8. lm32: Use generic mmu.h

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    c6976f2 View commit details
  9. lm32: Use generic tlb.h

    We do have some custom definitions in our tlb.h, but those are all for
    defines/functions which are only used in the MMU case.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Aug 24, 2012
    Copy the full SHA
    d552780 View commit details
1 change: 1 addition & 0 deletions arch/lm32/Kconfig
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ config LM32
select GENERIC_HARDIRQS_NO_DEPRECATED
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
select GENERIC_SYSCALL_TABLE
select ARCH_REQUIRE_GPIOLIB
select OF
select OF_EARLY_FLATTREE
3 changes: 3 additions & 0 deletions arch/lm32/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ generic-y += errno.h
generic-y += exec.h
generic-y += fb.h
generic-y += fcntl.h
generic-y += ftrace.h
generic-y += futex.h
generic-y += hardirq.h
generic-y += hw_irq.h
@@ -34,6 +35,7 @@ generic-y += linkage.h
generic-y += local.h
generic-y += mman.h
generic-y += mmu_context.h
generic-y += mmu.h
generic-y += module.h
generic-y += msgbuf.h
generic-y += param.h
@@ -60,6 +62,7 @@ generic-y += swab.h
generic-y += syscalls.h
generic-y += termbits.h
generic-y += termios.h
generic-y += tlb.h
generic-y += tlbflush.h
generic-y += topology.h
generic-y += types.h
1 change: 0 additions & 1 deletion arch/lm32/include/asm/ftrace.h

This file was deleted.

37 changes: 0 additions & 37 deletions arch/lm32/include/asm/mmu.h

This file was deleted.

20 changes: 0 additions & 20 deletions arch/lm32/include/asm/tlb.h

This file was deleted.

4 changes: 4 additions & 0 deletions arch/lm32/include/asm/unistd.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,8 @@

#undef __NR_mmap

#define sys_vfork sys_ni_syscall
#define sys_mmap sys_ni_syscall
#define sys_mmap2 sys_mmap_pgoff

#endif /* _ASM_LM32_UNISTD_H */
3 changes: 1 addition & 2 deletions arch/lm32/kernel/Makefile
Original file line number Diff line number Diff line change
@@ -6,8 +6,7 @@ extra-y := head.o vmlinux.lds
obj-y := \
sys_lm32.o setup.o traps.o signal.o time.o \
ptrace.o irq.o process.o entry.o \
flat.o sys_call_table.o cpuinfo.o prom.o \
platform.o
flat.o cpuinfo.o prom.o platform.o

obj-$(CONFIG_MODULES) += module.o

1 change: 0 additions & 1 deletion arch/lm32/kernel/entry.S
Original file line number Diff line number Diff line change
@@ -112,7 +112,6 @@ ENTRY(system_call)
sli r10, r8, 2 /* TODO: only works with shifter enabled */
add r9, r9, r10 /* add offset of syscall no to address */
lw r9, (r9+0) /* fetch address of syscall function */
be r9, r0, .badsyscall
call r9 /* execute syscall */

ENTRY(syscall_tail)
13 changes: 9 additions & 4 deletions arch/lm32/kernel/head.S
Original file line number Diff line number Diff line change
@@ -22,11 +22,16 @@ ENTRY(_start)
mvhi r11, hi(__bss_stop)
ori r11, r11, lo(__bss_stop)
1:
be r10, r11, 2f
sw (r10+0), r0
addi r10, r10, 4
bi 1b
2:
sw (r10+4), r0
sw (r10+8), r0
sw (r10+12), r0
sw (r10+16), r0
sw (r10+20), r0
sw (r10+24), r0
sw (r10+28), r0
addi r10, r10, 32
bne r10, r11, 1b

/*
* XXX: this will go away, if we have proper fdt support.
2 changes: 1 addition & 1 deletion arch/lm32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ SECTIONS
EXCEPTION_TABLE(256)
NOTES

BSS_SECTION(0, 0 ,0)
BSS_SECTION(4, 4, 32)
_end = .;

STABS_DEBUG
6 changes: 5 additions & 1 deletion include/asm-generic/mmu.h
Original file line number Diff line number Diff line change
@@ -7,8 +7,12 @@
*/
#ifndef __ASSEMBLY__
typedef struct {
struct vm_list_struct *vmlist;
unsigned long end_brk;

#ifdef CONFIG_BINFMT_ELF_FDPIC
unsigned long exec_fdpic_loadmap;
unsigned long interp_fdpic_loadmap;
#endif
} mm_context_t;
#endif

3 changes: 3 additions & 0 deletions lib/Kconfig
Original file line number Diff line number Diff line change
@@ -39,6 +39,9 @@ config GENERIC_IO
boolean
default n

config GENERIC_SYSCALL_TABLE
bool

config STMP_DEVICE
bool

2 changes: 2 additions & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
@@ -130,6 +130,8 @@ obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o

obj-$(CONFIG_STMP_DEVICE) += stmp_device.o

obj-$(CONFIG_GENERIC_SYSCALL_TABLE) += sys_call_table.o

hostprogs-y := gen_crc32table
clean-files := crc32table.h

1 change: 1 addition & 0 deletions arch/lm32/kernel/sys_call_table.c → lib/sys_call_table.c
Original file line number Diff line number Diff line change
@@ -12,5 +12,6 @@
#define __SYSCALL(nr, call) [nr] = (call),

void *sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls-1] = sys_ni_syscall,
#include <asm/unistd.h>
};