1. 11 11月, 2016 1 次提交
  2. 14 10月, 2015 3 次提交
  3. 25 3月, 2015 1 次提交
    • H
      s390: remove 31 bit support · 5a79859a
      Heiko Carstens 提交于
      Remove the 31 bit support in order to reduce maintenance cost and
      effectively remove dead code. Since a couple of years there is no
      distribution left that comes with a 31 bit kernel.
      
      The 31 bit kernel also has been broken since more than a year before
      anybody noticed. In addition I added a removal warning to the kernel
      shown at ipl for 5 minutes: a960062e ("s390: add 31 bit warning
      message") which let everybody know about the plan to remove 31 bit
      code. We didn't get any response.
      
      Given that the last 31 bit only machine was introduced in 1999 let's
      remove the code.
      Anybody with 31 bit user space code can still use the compat mode.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5a79859a
  4. 01 4月, 2014 1 次提交
    • H
      s390/bitops,atomic: add missing memory barriers · 0ccc8b7a
      Heiko Carstens 提交于
      When reworking the bitops and atomic ops I missed that those instructions
      that got atomic behaviour only perform a "specific-operand-serialization"
      instead of a full "serialization".
      The compare-and-swap instruction used before performs a full serialization
      before and after the instruction is executed, which means it has full
      memory barrier semantics.
      In order to give the new bitops and atomic ops functions also full memory
      barrier semantics add a "bcr 14,0" before and after each of those new
      instructions which performs full serialization as well.
      
      This restores memory barrier semantics for bitops and atomic ops functions
      which return values, like e.g. atomic_add_return(), but not for functions
      which do not return a value, like e.g. atomic_add().
      This is consistent to other architectures and what common code requires.
      
      Cc: stable@vger.kernel.org # v3.13+
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0ccc8b7a
  5. 21 2月, 2014 1 次提交
  6. 24 10月, 2013 6 次提交
    • H
      s390/bitops: rename find_first_bit_left() to find_first_bit_inv() · 7d7c7b24
      Heiko Carstens 提交于
      find_first_bit_left() and friends have nothing to do with the normal
      LSB0 bit numbering for big endian machines used in Linux (least
      significant bit has bit number 0).
      Instead they use MSB0 bit numbering, where the most signficant bit has
      bit number 0. So rename find_first_bit_left() and friends to
      find_first_bit_inv(), to avoid any confusion.
      Also provide inv versions of set_bit, clear_bit and test_bit.
      
      This also removes the confusing use of e.g. set_bit() in airq.c which
      uses a "be_to_le" bit number conversion, which could imply that instead
      set_bit_le() could be used. But that is entirely wrong since the _le
      bitops variant uses yet another bit numbering scheme.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7d7c7b24
    • H
      s390/bitops: use flogr instruction to implement __ffs, ffs, __fls, fls and fls64 · b1cb7e2b
      Heiko Carstens 提交于
      Since z9 109 we have the flogr instruction which can be used to implement
      optimized versions of __ffs, ffs, __fls, fls and fls64.
      So implement and use them, instead of the generic variants.
      This reduces the size of the kernel image (defconfig, -march=z9-109)
      by 19,648 bytes.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b1cb7e2b
    • H
      s390/bitops: use generic find bit functions / reimplement _left variant · 746479cd
      Heiko Carstens 提交于
      Just like all other architectures we should use out-of-line find bit
      operations, since the inline variant bloat the size of the kernel image.
      And also like all other architecures we should only supply optimized
      variants of the __ffs, ffs, etc. primitives.
      
      Therefore this patch removes the inlined s390 find bit functions and uses
      the generic out-of-line variants instead.
      
      The optimization of the primitives follows with the next patch.
      
      With this patch also the functions find_first_bit_left() and
      find_next_bit_left() have been reimplemented, since logically, they are
      nothing else but a find_first_bit()/find_next_bit() implementation that
      use an inverted __fls() instead of __ffs().
      Also the restriction that these functions only work on machines which
      support the "flogr" instruction is gone now.
      
      This reduces the size of the kernel image (defconfig, -march=z9-109)
      by 144,482 bytes.
      Alone the size of the function build_sched_domains() gets reduced from
      7 KB to 3,5 KB.
      
      We also git rid of unused functions like find_first_bit_le()...
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      746479cd
    • H
      s390/bitops: optimize set_bit() for constant values · 4ae80325
      Heiko Carstens 提交于
      Since zEC12 we have the interlocked-access facility 2 which allows to
      use the instructions ni/oi/xi to update a single byte in storage with
      compare-and-swap semantics.
      So change set_bit(), clear_bit() and change_bit() to generate such code
      instead of a compare-and-swap loop (or using the load-and-* instruction
      family), if possible.
      This reduces the text segment by yet another 8KB (defconfig).
      
      Alternatively the long displacement variants niy/oiy/xiy could have
      been used, but the extended displacement field is usually not needed
      and therefore would only increase the size of the text segment again.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      4ae80325
    • H
      s390/bitops: remove CONFIG_SMP / simplify non-atomic bitops · 370b0b5f
      Heiko Carstens 提交于
      Remove CONFIG_SMP from bitops code. This reduces the C code significantly
      but also generates better code for the SMP case.
      
      This means that for !CONFIG_SMP set_bit() and friends now also have
      compare and swap semantics (read: more code). However nobody really cares
      for !CONFIG_SMP and this is the trade-off to simplify the SMP code which we
      do care about.
      
      The non-atomic bitops like __set_bit() now generate also better code
      because the old code did not have a __builtin_contant_p() check for the
      CONFIG_SMP case and therefore always generated the inline assembly variant.
      However the inline assemblies for the non-atomic case now got completely
      removed since gcc can produce better code, which accesses less memory
      operands.
      
      test_bit() got also a bit simplified since it did have a
      __builtin_constant_p() check, however two identical code pathes for each
      case (written differently).
      
      In result this mainly reduces the to be maintained code but is not very
      relevant for code generation, since there are not many non-atomic bitops
      usages that we care about.
      (code reduction defconfig kernel image before/after: 560 bytes).
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      370b0b5f
    • H
      s390/bitops: make use of interlocked-access facility 1 instructions · e344e52c
      Heiko Carstens 提交于
      Make use of the interlocked-access facility 1 that got added with the
      z196 architecure.
      This facilility added new instructions which can atomically update a
      storage location without a compare-and-swap loop. E.g. setting a bit
      within a "long" can be done with a single instruction.
      
      The size of the kernel image gets ~30kb smaller. Considering that there
      are appr. 1900 bitops call sites this means that each one saves about
      15-16 bytes per call site which is expected.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      e344e52c
  7. 22 8月, 2013 1 次提交
  8. 26 7月, 2013 1 次提交
    • M
      s390/bitops: fix find_next_bit_left · 3b0040a4
      Martin Schwidefsky 提交于
      The find_next_bit_left function is broken if used with an offset which
      is not a multiple of 64. The shift to mask the bits of a 64-bit word
      not to search is in the wrong direction, the result can be either a
      bit found smaller than the offset or failure to find a set bit.
      
      Cc: <stable@vger.kernel.org> # v3.8+
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3b0040a4
  9. 17 4月, 2013 2 次提交
  10. 30 11月, 2012 1 次提交
  11. 20 7月, 2012 1 次提交
    • H
      s390/comments: unify copyright messages and remove file names · a53c8fab
      Heiko Carstens 提交于
      Remove the file name from the comment at top of many files. In most
      cases the file name was wrong anyway, so it's rather pointless.
      
      Also unify the IBM copyright statement. We did have a lot of sightly
      different statements and wanted to change them one after another
      whenever a file gets touched. However that never happened. Instead
      people start to take the old/"wrong" statements to use as a template
      for new files.
      So unify all of them in one go.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      a53c8fab
  12. 24 5月, 2012 2 次提交
  13. 27 7月, 2011 1 次提交
  14. 27 5月, 2011 2 次提交
  15. 24 3月, 2011 3 次提交
  16. 27 2月, 2010 1 次提交
  17. 26 3月, 2009 2 次提交
  18. 22 8月, 2008 1 次提交
    • E
      [S390] fix ext2_find_next_bit · 152382af
      Eric Sandeen 提交于
      ext4 does not work on s390 because ext2_find_next_bit is broken. Fortunately
      this function is only used by ext4. The function uses ffs which does not work
      analog to ffz. The result of ffs has an offset of 1 which is not taken into
      account. To fix this use the low level __ffs_word function directly instead
      of the ill defined ffs.
      
      In addition the patch improves find_next_zero_bit and ext2_find_next_zero_bit
      by passing the bit offset into __ffz_word instead of adding it after the
      function call returned.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      152382af
  19. 02 8月, 2008 1 次提交
  20. 27 4月, 2008 1 次提交
  21. 19 2月, 2008 1 次提交
  22. 10 2月, 2008 1 次提交
  23. 05 2月, 2008 2 次提交
  24. 29 1月, 2008 1 次提交
  25. 20 10月, 2007 1 次提交
  26. 19 10月, 2007 1 次提交
    • N
      bitops: introduce lock ops · 26333576
      Nick Piggin 提交于
      Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
      Convert all architectures to use the generic implementation.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-By: NDavid Howells <dhowells@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Matthew Wilcox <willy@debian.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26333576