1. 03 11月, 2015 1 次提交
  2. 05 9月, 2015 25 次提交
    • R
      CRISv10: delete unused lib/dmacopy.c · 254a0f41
      Rabin Vincent 提交于
      This file is never built.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jespern@axis.com>
      254a0f41
    • R
      CRISv10: delete unused lib/old_checksum.c · c2ffc68a
      Rabin Vincent 提交于
      This file is never built.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      c2ffc68a
    • R
      CRIS: fix switch_mm() lockdep splat · 7f0144e7
      Rabin Vincent 提交于
      With lockdep support implemented on CRISv32, we get the following splat.
      switch_mm() can be called both from the scheduler() (with interrupts
      disabled) and from flush_old_exec (via activate_mm()), with interrupts
      enabled.  Fix it by disabling interrupts in activate_mm(), similar to
      powerpc and hexagon.
      
       t======================================================
       [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
       3.19.0-08802-g20bc9f1-dirty #323 Not tainted
       ------------------------------------------------------
       init/1 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
        (mmu_context_lock){+.+...}, at: [<c0009290>] switch_mm+0x22/0xc6
      
       and this task is already holding:
        (&rq->lock){-.-.-.}, at: [<c01a0756>] __schedule+0x5e/0x648
       which would create a new lock dependency:
        (&rq->lock){-.-.-.} -> (mmu_context_lock){+.+...}
      
       but this new dependency connects a HARDIRQ-irq-safe lock:
        (&rq->lock){-.-.-.}
       ... which became HARDIRQ-irq-safe at:
         [<c002b03c>] scheduler_tick+0x28/0x5e
         [<c0007c6c>] timer_interrupt+0x4e/0x6a
         [<c0043ac4>] handle_irq_event_percpu+0x54/0x13c
         [<c004343c>] generic_handle_irq+0x2a/0x36
      
       to a HARDIRQ-irq-unsafe lock:
        (mmu_context_lock){+.+...}
       ... which became HARDIRQ-irq-unsafe at:
       ...  [<c0039e60>] __lock_acquire+0x8f8/0x1d9c
         [<c0009290>] switch_mm+0x22/0xc6
         [<c009c260>] flush_old_exec+0x500/0x5d4
         [<c00da4c6>] load_elf_phdrs+0x7a/0x84
         [<c00dbdb0>] load_elf_binary+0x21c/0x13b4
         [<c009cdb6>] do_execve+0x22/0x2c
         [<c001dcf2>] ____call_usermodehelper+0x0/0x154
         [<c000581e>] ret_from_kernel_thread+0xe/0x14
      
       other info that might help us debug this:
      
        Possible interrupt unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(mmu_context_lock);
                                      local_irq_disable();
                                      lock(&rq->lock);
                                      lock(mmu_context_lock);
         <Interrupt>
           lock(&rq->lock);
      
        *** DEADLOCK ***
      
       1 lock held by init/1:
        #0:  (&rq->lock){-.-.-.}, at: [<c01a0756>] __schedule+0x5e/0x648
      
       Call Trace:
       [<c019fe9e>] printk+0x0/0x4e
       [<c00368f8>] print_shortest_lock_dependencies+0x0/0x15c
       [<c0048628>] print_stack_trace+0x0/0x88
       [<c0038912>] __lock_is_held+0x3e/0x5e
       [<c003b894>] lock_acquire+0x8a/0xcc
       [<c01a50c4>] _raw_spin_lock+0x44/0x7a
       [<c0009290>] switch_mm+0x22/0xc6
       [<c01a06f8>] __schedule+0x0/0x648
       [<c01a0d76>] schedule+0x36/0x7c
       [<c0037d04>] trace_hardirqs_on+0x0/0x1e
       [<c0004e18>] do_work_pending+0x30/0xd4
       [<c000591a>] _work_pending+0xe/0x12
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      7f0144e7
    • R
      CRISv32: enable LOCKDEP_SUPPORT · 94c5c115
      Rabin Vincent 提交于
      Now that we have stack tracing and irq flags tracing support,
      we can also enable lockdep support
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      94c5c115
    • R
      CRIS: add STACKTRACE_SUPPORT · aa6f4d2b
      Rabin Vincent 提交于
      Add stacktrace support, which is required for lockdep and tracing.  The
      stack tracing simply looks at all kernel text symbols found on the
      stack, similar to the trap stack dumping code, which can also be
      converted to use this.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      aa6f4d2b
    • R
      CRISv32: annotate irq enable in idle loop · 3fffa23e
      Rabin Vincent 提交于
      Use a call to local_irq_enable() instead of incline asm so that the
      irqsoff latency tracer knows that interrupts are enabled here.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      3fffa23e
    • R
      CRISv32: add support for irqflags tracing · 444e0c28
      Rabin Vincent 提交于
      Add support irqflags tracing, which is required for things like lockdep
      and ftrace.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      444e0c28
    • R
      CRIS: UAPI: use generic types.h · 20ae2473
      Rabin Vincent 提交于
      CRIS' types.h is functionally identical to the asm-generic version.
      
      Effective diff:
      
       +#ifndef _ASM_GENERIC_TYPES_H
       +#define _ASM_GENERIC_TYPES_H
       +
        #include <asm-generic/int-ll64.h>
       +
       +#endif
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      20ae2473
    • R
      CRIS: UAPI: use generic shmbuf.h · 258a9ff6
      Rabin Vincent 提交于
      CRIS' shmbuf.h is equivalent to the asm-generic verison.
      
      Effective diff:
      
       -#ifndef _CRIS_SHMBUF_H
       -#define _CRIS_SHMBUF_H
       +#ifndef __ASM_GENERIC_SHMBUF_H
       +#define __ASM_GENERIC_SHMBUF_H
       +
       +#include <asm/bitsperlong.h>
      
        	struct ipc64_perm	shm_perm;
        	size_t			shm_segsz;
        	__kernel_time_t		shm_atime;
       +#if __BITS_PER_LONG != 64
        	unsigned long		__unused1;
       +#endif
        	__kernel_time_t		shm_dtime;
       +#if __BITS_PER_LONG != 64
        	unsigned long		__unused2;
       +#endif
        	__kernel_time_t		shm_ctime;
       +#if __BITS_PER_LONG != 64
        	unsigned long		__unused3;
       +#endif
        	__kernel_pid_t		shm_cpid;
        	__kernel_pid_t		shm_lpid;
       -	unsigned long		shm_nattch;
       -	unsigned long		__unused4;
       -	unsigned long		__unused5;
       +	__kernel_ulong_t	shm_nattch;
       +	__kernel_ulong_t	__unused4;
       +	__kernel_ulong_t	__unused5;
        };
      
        struct shminfo64 {
       -	unsigned long	shmmax;
       -	unsigned long	shmmin;
       -	unsigned long	shmmni;
       -	unsigned long	shmseg;
       -	unsigned long	shmall;
       -	unsigned long	__unused1;
       -	unsigned long	__unused2;
       -	unsigned long	__unused3;
       -	unsigned long	__unused4;
       +	__kernel_ulong_t	shmmax;
       +	__kernel_ulong_t	shmmin;
       +	__kernel_ulong_t	shmmni;
       +	__kernel_ulong_t	shmseg;
       +	__kernel_ulong_t	shmall;
       +	__kernel_ulong_t	__unused1;
       +	__kernel_ulong_t	__unused2;
       +	__kernel_ulong_t	__unused3;
       +	__kernel_ulong_t	__unused4;
        };
      
        #endif
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      258a9ff6
    • R
      CRIS: UAPI: use generic msgbuf.h · 74d94adb
      Rabin Vincent 提交于
      CRIS' msgbuf.h is equivalent to the asm-generic version.
      
      Effective diff:
      
       -#ifndef _CRIS_MSGBUF_H
       -#define _CRIS_MSGBUF_H
       -
       -
       +#ifndef __ASM_GENERIC_MSGBUF_H
       +#define __ASM_GENERIC_MSGBUF_H
      
       +#include <asm/bitsperlong.h>
      
        struct msqid64_ds {
        	struct ipc64_perm msg_perm;
        	__kernel_time_t msg_stime;
       +#if __BITS_PER_LONG != 64
        	unsigned long	__unused1;
       +#endif
        	__kernel_time_t msg_rtime;
       +#if __BITS_PER_LONG != 64
        	unsigned long	__unused2;
       +#endif
        	__kernel_time_t msg_ctime;
       +#if __BITS_PER_LONG != 64
        	unsigned long	__unused3;
       -	unsigned long  msg_cbytes;
       -	unsigned long  msg_qnum;
       -	unsigned long  msg_qbytes;
       +#endif
       +	__kernel_ulong_t msg_cbytes;
       +	__kernel_ulong_t msg_qnum;
       +	__kernel_ulong_t msg_qbytes;
        	__kernel_pid_t msg_lspid;
        	__kernel_pid_t msg_lrpid;
       -	unsigned long  __unused4;
       -	unsigned long  __unused5;
       +	__kernel_ulong_t __unused4;
       +	__kernel_ulong_t __unused5;
        };
      
        #endif
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      74d94adb
    • R
      CRIS: UAPI: use generic socket.h · 45266922
      Rabin Vincent 提交于
      CRIS' socket.h is equivalent to the asm-generic version.
      
      Effective diff:
      
       -#ifndef _ASM_SOCKET_H
       -#define _ASM_SOCKET_H
       -
       -
       +#ifndef __ASM_GENERIC_SOCKET_H
       +#define __ASM_GENERIC_SOCKET_H
      
        #include <asm/sockios.h>
      
        #define SO_LINGER	13
        #define SO_BSDCOMPAT	14
        #define SO_REUSEPORT	15
       +#ifndef SO_PASSCRED
        #define SO_PASSCRED	16
        #define SO_PEERCRED	17
        #define SO_RCVLOWAT	18
        #define SO_SNDLOWAT	19
        #define SO_RCVTIMEO	20
        #define SO_SNDTIMEO	21
       +#endif
      
       #define SO_SECURITY_AUTHENTICATION		22
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      45266922
    • R
      CRIS: UAPI: use generic sembuf.h · 53789d25
      Rabin Vincent 提交于
      CRIS's sembuf.h is equivalent to the asm-generic version.
      Effective diff:
      
       -#ifndef _CRIS_SEMBUF_H
       -#define _CRIS_SEMBUF_H
       +#ifndef __ASM_GENERIC_SEMBUF_H
       +#define __ASM_GENERIC_SEMBUF_H
      
       +#include <asm/bitsperlong.h>
      
        struct semid64_ds {
        	struct ipc64_perm sem_perm;
        	__kernel_time_t	sem_otime;
       +#if __BITS_PER_LONG != 64
        	unsigned long	__unused1;
       +#endif
        	__kernel_time_t	sem_ctime;
       +#if __BITS_PER_LONG != 64
        	unsigned long	__unused2;
       +#endif
        	unsigned long	sem_nsems;
        	unsigned long	__unused3;
        	unsigned long	__unused4;
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      53789d25
    • R
      CRIS: UAPI: use generic sockios.h · c823b970
      Rabin Vincent 提交于
      CRIS' sockios.h is equivalent to the asm-generic version.
      
      Effective diff:
      
       -#ifndef __ARCH_CRIS_SOCKIOS__
       -#define __ARCH_CRIS_SOCKIOS__
       +#ifndef __ASM_GENERIC_SOCKIOS_H
       +#define __ASM_GENERIC_SOCKIOS_H
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      c823b970
    • R
      CRIS: UAPI: use generic auxvec.h · 889d74a4
      Rabin Vincent 提交于
      CRIS's auxvec.h is empty just like the asm-generic version.
      
      Effective diff:
      
       -#ifndef __ASMCRIS_AUXVEC_H
       -#define __ASMCRIS_AUXVEC_H
       +#ifndef __ASM_GENERIC_AUXVEC_H
       +#define __ASM_GENERIC_AUXVEC_H
       +
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      889d74a4
    • R
      CRIS: UAPI: use generic headers via Kbuild · 0c02fa2f
      Rabin Vincent 提交于
      Use Kbuild magic to include the generic headers.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      0c02fa2f
    • R
      CRIS: UAPI: fix elf.h export · 2493d3e2
      Rabin Vincent 提交于
      CRIS userspace (uClibc for one) expects asm/elf.h to be exported but
      this header appears to have gone missing at some point.  Move it to
      uapi/ and export it.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      2493d3e2
    • R
      CRIS: don't make asm/elf.h depend on asm/user.h · 3a79a075
      Rabin Vincent 提交于
      We're going to export asm/elf.h; remove its dependencies on the
      non-exported asm/user.h and the unused asm/system.h include.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      3a79a075
    • R
      CRIS: UAPI: fix ptrace.h · 835e4177
      Rabin Vincent 提交于
      The exported ptrace.h header on CRIS references an "arch" directory
      which does not exist.  Fix this by having the variants in the same
      directory and including them conditionally, similar to other
      architectures.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      835e4177
    • J
      4b867157
    • J
      CRISv32: Add GPIO driver to the default configs · 939b83fb
      Jesper Nilsson 提交于
      Fix a number of small issues visible when GPIO is enabled:
      
      - Correct missing default for !ETRAXFS in Kconfig
      - Remove information on number of bits for some Kconfigs
        related to the GPIO, they are different in ETRAX FS and ARTPEC-3
      - Fix compile warning in ARTPEC-3 GPIO driver
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      939b83fb
    • J
      CRISv32: ETRAX FS: Squash warnings in pinmux driver · 94230178
      Jesper Nilsson 提交于
      Squash the followng warnings
      
      arch/cris/arch-v32/mach-fs/pinmux.c: In function 'crisv32_pinmux_alloc_fixed':
      arch/cris/arch-v32/mach-fs/pinmux.c:104:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      arch/cris/arch-v32/mach-fs/pinmux.c: In function 'crisv32_pinmux_dealloc_fixed':
      arch/cris/arch-v32/mach-fs/pinmux.c:238:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      arch/cris/arch-v32/mach-fs/pinmux.c: In function '__crisv32_pinmux_alloc':
      arch/cris/arch-v32/mach-fs/pinmux.c:49:1: warning: control reaches end of non-void function [-Wreturn-type]
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      94230178
    • C
      CRIS: Wire up missing syscalls · ee59843c
      Chen Gang 提交于
      The related warnings:
      
          CALL    scripts/checksyscalls.sh
        <stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
        <stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
        <stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
        <stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
        <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
        <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
        <stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
        <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NJesper Nilsson <jespern@axis.com>
      ee59843c
    • R
      CRISv32: allow CONFIG_DEBUG_BUGVERBOSE · f59625a8
      Rabin Vincent 提交于
      Support for verbose BUG reporting already exists, but the HAVE flag that
      allows the option to be enabled is missing.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jespern@axis.com>
      f59625a8
    • R
      CRISv32: add unreachable() to BUG() · 98a725a5
      Rabin Vincent 提交于
      Add an unreachable() in the BUG() implementations, to get rid of
      several warnings similar to the one below:
      
       kernel/sched/core.c: In function 'pick_next_task':
       kernel/sched/core.c:2690:1: warning: control reaches end of non-void function [-Wreturn-type]
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NJesper Nilsson <jespern@axis.com>
      98a725a5
    • C
      cris: arch-v32: gpio: Use kzalloc instead of kmalloc/memset · 6a4756f6
      Christophe Jaillet 提交于
      Turn a kmalloc/memset into an equivalent kzalloc.
      Doing so also move the zero'ing of the memory outside of a mutex.
      Signed-off-by: NChristophe Jaillet <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NJesper Nilsson <jespern@axis.com>
      6a4756f6
  3. 10 8月, 2015 1 次提交
  4. 18 7月, 2015 1 次提交
  5. 09 7月, 2015 2 次提交
  6. 25 6月, 2015 1 次提交
    • L
      mm: new mm hook framework · 2ae416b1
      Laurent Dufour 提交于
      CRIU is recreating the process memory layout by remapping the checkpointee
      memory area on top of the current process (criu).  This includes remapping
      the vDSO to the place it has at checkpoint time.
      
      However some architectures like powerpc are keeping a reference to the
      vDSO base address to build the signal return stack frame by calling the
      vDSO sigreturn service.  So once the vDSO has been moved, this reference
      is no more valid and the signal frame built later are not usable.
      
      This patch serie is introducing a new mm hook framework, and a new
      arch_remap hook which is called when mremap is done and the mm lock still
      hold.  The next patch is adding the vDSO remap and unmap tracking to the
      powerpc architecture.
      
      This patch (of 3):
      
      This patch introduces a new set of header file to manage mm hooks:
      - per architecture empty header file (arch/x/include/asm/mm-arch-hooks.h)
      - a generic header (include/linux/mm-arch-hooks.h)
      
      The architecture which need to overwrite a hook as to redefine it in its
      header file, while architecture which doesn't need have nothing to do.
      
      The default hooks are defined in the generic header and are used in the
      case the architecture is not defining it.
      
      In a next step, mm hooks defined in include/asm-generic/mm_hooks.h should
      be moved here.
      Signed-off-by: NLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2ae416b1
  7. 17 6月, 2015 2 次提交
    • P
      cris: don't use module_init for non-modular core eeprom.c code · 84c3e5bf
      Paul Gortmaker 提交于
      The eeprom.c code is compiled based on the Kconfig setting
      ETRAX_I2C_EEPROM, which is bool.  So the code is either built in
      or absent.  It will never be modular, so using module_init as an
      alias for __initcall is rather misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Direct use of __initcall is discouraged, vs prioritized ones.
      Use of device_initcall is consistent with what __initcall
      maps onto, and hence does not change the init order, making the
      impact of this change zero.   Should someone with real hardware
      for boot testing want to change it later to arch_initcall or
      something different, they can do that at a later date.
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: linux-cris-kernel@axis.com
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      84c3e5bf
    • P
      cris: don't use module_init for non-modular core intmem.c code · 73de14e8
      Paul Gortmaker 提交于
      The intmem.c code is always built in.  It will never be modular,
      so using module_init as an alias for __initcall is rather
      misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Direct use of __initcall is discouraged, vs prioritized ones.
      Use of device_initcall is consistent with what __initcall
      maps onto, and hence does not change the init order, making the
      impact of this change zero.   Should someone with real hardware
      for boot testing want to change it later to arch_initcall or
      something different, they can do that at a later date.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: linux-cris-kernel@axis.com
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      73de14e8
  8. 19 5月, 2015 2 次提交
  9. 06 5月, 2015 1 次提交
  10. 16 4月, 2015 2 次提交
  11. 13 4月, 2015 1 次提交
  12. 25 3月, 2015 1 次提交