1. 10 7月, 2015 1 次提交
  2. 19 5月, 2015 1 次提交
  3. 17 4月, 2015 1 次提交
  4. 28 3月, 2015 1 次提交
  5. 11 12月, 2014 1 次提交
  6. 14 9月, 2014 2 次提交
  7. 09 8月, 2014 1 次提交
  8. 30 5月, 2014 1 次提交
  9. 10 2月, 2014 2 次提交
    • T
      locking/mcs: Allow architecture specific asm files to be used for contended case · ddf1d169
      Tim Chen 提交于
      This patch allows each architecture to add its specific assembly optimized
      arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for
      MCS lock and unlock functions.
      Signed-off-by: NTim Chen <tim.c.chen@linux.intel.com>
      Cc: Scott J Norton <scott.norton@hp.com>
      Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
      Cc: AswinChandramouleeswaran <aswin@hp.com>
      Cc: George Spelvin <linux@horizon.com>
      Cc: Rik vanRiel <riel@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: MichelLespinasse <walken@google.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Alex Shi <alex.shi@linaro.org>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "Figo.zhang" <figo1802@gmail.com>
      Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: Waiman Long <waiman.long@hp.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matthew R Wilcox <matthew.r.wilcox@intel.com>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESKSigned-off-by: NIngo Molnar <mingo@kernel.org>
      ddf1d169
    • T
      locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order · b119fa61
      Tim Chen 提交于
      We perform a clean up of the Kbuid files in each architecture.
      We order the files in each Kbuild in alphabetical order
      by running the below script.
      
      for i in arch/*/include/asm/Kbuild
      do
              cat $i | gawk '/^generic-y/ {
                      i = 3;
                      do {
                              for (; i <= NF; i++) {
                                      if ($i == "\\") {
                                              getline;
                                              i = 1;
                                              continue;
                                      }
                                      if ($i != "")
                                              hdr[$i] = $i;
                              }
                              break;
                      } while (1);
                      next;
              }
              // {
                      print $0;
              }
              END {
                      n = asort(hdr);
                      for (i = 1; i <= n; i++)
                              print "generic-y += " hdr[i];
              }' > ${i}.sorted;
              mv ${i}.sorted $i;
      done
      Signed-off-by: NTim Chen <tim.c.chen@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Matthew R Wilcox <matthew.r.wilcox@intel.com>
      Cc: AswinChandramouleeswaran <aswin@hp.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Scott J Norton <scott.norton@hp.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: "Figo.zhang" <figo1802@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Waiman Long <waiman.long@hp.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Alex Shi <alex.shi@linaro.org>
      Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: George Spelvin <linux@horizon.com>
      Cc: MichelLespinasse <walken@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      [ Fixed build bug. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      b119fa61
  10. 18 12月, 2013 1 次提交
  11. 04 10月, 2013 1 次提交
  12. 03 10月, 2013 1 次提交
  13. 25 9月, 2013 1 次提交
  14. 03 12月, 2012 1 次提交
  15. 14 11月, 2012 1 次提交
  16. 12 10月, 2012 1 次提交
  17. 20 9月, 2012 1 次提交
  18. 25 8月, 2012 3 次提交
    • R
      ARM: 7494/1: use generic termios.h · e780c452
      Rob Herring 提交于
      As pointed out by Arnd Bergmann, this fixes a couple of issues but will
      increase code size:
      
      The original macro user_termio_to_kernel_termios was not endian safe. It
      used an unsigned short ptr to access the low bits in a 32-bit word.
      
      Both user_termio_to_kernel_termios and kernel_termios_to_user_termio are
      missing error checking on put_user/get_user and copy_to/from_user.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e780c452
    • R
      ARM: 7493/1: use generic unaligned.h · d25c881a
      Rob Herring 提交于
      This moves ARM over to the asm-generic/unaligned.h header. This has the
      benefit of better code generated especially for ARMv7 on gcc 4.7+
      compilers.
      
      As Arnd Bergmann, points out: The asm-generic version uses the "struct"
      version for native-endian unaligned access and the "byteshift" version
      for the opposite endianess. The current ARM version however uses the
      "byteshift" implementation for both.
      
      Thanks to Nicolas Pitre for the excellent analysis:
      
      Test case:
      
      int foo (int *x) { return get_unaligned(x); }
      long long bar (long long *x) { return get_unaligned(x); }
      
      With the current ARM version:
      
      foo:
      	ldrb	r3, [r0, #2]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 2B], MEM[(const u8 *)x_1(D) + 2B]
      	ldrb	r1, [r0, #1]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 1B], MEM[(const u8 *)x_1(D) + 1B]
      	ldrb	r2, [r0, #0]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D)], MEM[(const u8 *)x_1(D)]
      	mov	r3, r3, asl #16	@ tmp154, MEM[(const u8 *)x_1(D) + 2B],
      	ldrb	r0, [r0, #3]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 3B], MEM[(const u8 *)x_1(D) + 3B]
      	orr	r3, r3, r1, asl #8	@, tmp155, tmp154, MEM[(const u8 *)x_1(D) + 1B],
      	orr	r3, r3, r2	@ tmp157, tmp155, MEM[(const u8 *)x_1(D)]
      	orr	r0, r3, r0, asl #24	@,, tmp157, MEM[(const u8 *)x_1(D) + 3B],
      	bx	lr	@
      
      bar:
      	stmfd	sp!, {r4, r5, r6, r7}	@,
      	mov	r2, #0	@ tmp184,
      	ldrb	r5, [r0, #6]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 6B], MEM[(const u8 *)x_1(D) + 6B]
      	ldrb	r4, [r0, #5]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 5B], MEM[(const u8 *)x_1(D) + 5B]
      	ldrb	ip, [r0, #2]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 2B], MEM[(const u8 *)x_1(D) + 2B]
      	ldrb	r1, [r0, #4]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 4B], MEM[(const u8 *)x_1(D) + 4B]
      	mov	r5, r5, asl #16	@ tmp175, MEM[(const u8 *)x_1(D) + 6B],
      	ldrb	r7, [r0, #1]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 1B], MEM[(const u8 *)x_1(D) + 1B]
      	orr	r5, r5, r4, asl #8	@, tmp176, tmp175, MEM[(const u8 *)x_1(D) + 5B],
      	ldrb	r6, [r0, #7]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 7B], MEM[(const u8 *)x_1(D) + 7B]
      	orr	r5, r5, r1	@ tmp178, tmp176, MEM[(const u8 *)x_1(D) + 4B]
      	ldrb	r4, [r0, #0]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D)], MEM[(const u8 *)x_1(D)]
      	mov	ip, ip, asl #16	@ tmp188, MEM[(const u8 *)x_1(D) + 2B],
      	ldrb	r1, [r0, #3]	@ zero_extendqisi2	@ MEM[(const u8 *)x_1(D) + 3B], MEM[(const u8 *)x_1(D) + 3B]
      	orr	ip, ip, r7, asl #8	@, tmp189, tmp188, MEM[(const u8 *)x_1(D) + 1B],
      	orr	r3, r5, r6, asl #24	@,, tmp178, MEM[(const u8 *)x_1(D) + 7B],
      	orr	ip, ip, r4	@ tmp191, tmp189, MEM[(const u8 *)x_1(D)]
      	orr	ip, ip, r1, asl #24	@, tmp194, tmp191, MEM[(const u8 *)x_1(D) + 3B],
      	mov	r1, r3	@,
      	orr	r0, r2, ip	@ tmp171, tmp184, tmp194
      	ldmfd	sp!, {r4, r5, r6, r7}
      	bx	lr
      
      In both cases the code is slightly suboptimal.  One may wonder why
      wasting r2 with the constant 0 in the second case for example.  And all
      the mov's could be folded in subsequent orr's, etc.
      
      Now with the asm-generic version:
      
      foo:
      	ldr	r0, [r0, #0]	@ unaligned	@,* x
      	bx	lr	@
      
      bar:
      	mov	r3, r0	@ x, x
      	ldr	r0, [r0, #0]	@ unaligned	@,* x
      	ldr	r1, [r3, #4]	@ unaligned	@,
      	bx	lr	@
      
      This is way better of course, but only because this was compiled for
      ARMv7. In this case the compiler knows that the hardware can do
      unaligned word access.  This isn't that obvious for foo(), but if we
      remove the get_unaligned() from bar as follows:
      
      long long bar (long long *x) {return *x; }
      
      then the resulting code is:
      
      bar:
      	ldmia	r0, {r0, r1}	@ x,,
      	bx	lr	@
      
      So this proves that the presumed aligned vs unaligned cases does have
      influence on the instructions the compiler may use and that the above
      unaligned code results are not just an accident.
      
      Still... this isn't fully conclusive without at least looking at the
      resulting assembly fron a pre ARMv6 compilation.  Let's see with an
      ARMv5 target:
      
      foo:
      	ldrb	r3, [r0, #0]	@ zero_extendqisi2	@ tmp139,* x
      	ldrb	r1, [r0, #1]	@ zero_extendqisi2	@ tmp140,
      	ldrb	r2, [r0, #2]	@ zero_extendqisi2	@ tmp143,
      	ldrb	r0, [r0, #3]	@ zero_extendqisi2	@ tmp146,
      	orr	r3, r3, r1, asl #8	@, tmp142, tmp139, tmp140,
      	orr	r3, r3, r2, asl #16	@, tmp145, tmp142, tmp143,
      	orr	r0, r3, r0, asl #24	@,, tmp145, tmp146,
      	bx	lr	@
      
      bar:
      	stmfd	sp!, {r4, r5, r6, r7}	@,
      	ldrb	r2, [r0, #0]	@ zero_extendqisi2	@ tmp139,* x
      	ldrb	r7, [r0, #1]	@ zero_extendqisi2	@ tmp140,
      	ldrb	r3, [r0, #4]	@ zero_extendqisi2	@ tmp149,
      	ldrb	r6, [r0, #5]	@ zero_extendqisi2	@ tmp150,
      	ldrb	r5, [r0, #2]	@ zero_extendqisi2	@ tmp143,
      	ldrb	r4, [r0, #6]	@ zero_extendqisi2	@ tmp153,
      	ldrb	r1, [r0, #7]	@ zero_extendqisi2	@ tmp156,
      	ldrb	ip, [r0, #3]	@ zero_extendqisi2	@ tmp146,
      	orr	r2, r2, r7, asl #8	@, tmp142, tmp139, tmp140,
      	orr	r3, r3, r6, asl #8	@, tmp152, tmp149, tmp150,
      	orr	r2, r2, r5, asl #16	@, tmp145, tmp142, tmp143,
      	orr	r3, r3, r4, asl #16	@, tmp155, tmp152, tmp153,
      	orr	r0, r2, ip, asl #24	@,, tmp145, tmp146,
      	orr	r1, r3, r1, asl #24	@,, tmp155, tmp156,
      	ldmfd	sp!, {r4, r5, r6, r7}
      	bx	lr
      
      Compared to the initial results, this is really nicely optimized and I
      couldn't do much better if I were to hand code it myself.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d25c881a
    • R
      ARM: 7491/1: use generic version of identical asm headers · 4a8052d8
      Rob Herring 提交于
      Inspired by the AArgh64 claim that it should be separate from ARM and one
      reason was being able to use more asm-generic headers. Doing a diff of
      arch/arm/include/asm and include/asm-generic there are numerous asm
      headers which are functionally identical to their asm-generic counterparts.
      Delete the ARM version and use the generic ones.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4a8052d8
  19. 17 10月, 2011 1 次提交
  20. 15 8月, 2010 1 次提交
  21. 15 1月, 2009 1 次提交
  22. 07 1月, 2009 1 次提交
  23. 03 8月, 2008 1 次提交
  24. 12 7月, 2007 1 次提交
  25. 18 6月, 2006 1 次提交