Skip to content
Snippets Groups Projects
  1. Feb 06, 2019
    • Matthew Wilcox's avatar
      XArray: Add cyclic allocation · 2fa044e5
      Matthew Wilcox authored
      
      This differs slightly from the IDR equivalent in five ways.
      
      1. It can allocate up to UINT_MAX instead of being limited to INT_MAX,
         like xa_alloc().  Also like xa_alloc(), it will write to the 'id'
         pointer before placing the entry in the XArray.
      2. The 'next' cursor is allocated separately from the XArray instead
         of being part of the IDR.  This saves memory for all the users which
         do not use the cyclic allocation API and suits some users better.
      3. It returns -EBUSY instead of -ENOSPC.
      4. It will attempt to wrap back to the minimum value on memory allocation
         failure as well as on an -EBUSY error, assuming that a user would
         rather allocate a small ID than suffer an ID allocation failure.
      5. It reports whether it has wrapped, which is important to some users.
      
      Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
      2fa044e5
    • Matthew Wilcox's avatar
      XArray: Add support for 1s-based allocation · 3ccaf57a
      Matthew Wilcox authored
      
      A lot of places want to allocate IDs starting at 1 instead of 0.
      While the xa_alloc() API supports this, it's not very efficient if lots
      of IDs are allocated, due to having to walk down to the bottom of the
      tree to see if ID 1 is available, then all the way over to the next
      non-allocated ID.  This method marks ID 0 as being occupied which wastes
      one slot in the XArray, but preserves xa_empty() as working.
      
      Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
      3ccaf57a
    • Matthew Wilcox's avatar
      XArray: Change xa_insert to return -EBUSY · fd9dc93e
      Matthew Wilcox authored
      
      Userspace translates EEXIST to "File exists" which isn't a very good
      error message for the problem.  "Device or resource busy" is a better
      indication of what went wrong.
      
      Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
      fd9dc93e
  2. Jan 07, 2019
  3. Jan 03, 2019
  4. Dec 20, 2018
  5. Dec 10, 2018
    • Andy Shevchenko's avatar
      lib/vsprintf: Print time and date in human readable format via %pt · 4d42c447
      Andy Shevchenko authored
      
      There are users which print time and date represented by content of
      struct rtc_time in human readable format.
      
      Instead of open coding that each time introduce %ptR[dt][r] specifier.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      4d42c447
  6. Dec 06, 2018
  7. Nov 20, 2018
  8. Nov 05, 2018
  9. Oct 31, 2018
    • Mike Rapoport's avatar
      docs/boot-time-mm: remove bootmem documentation · 530d4c0c
      Mike Rapoport authored
      Link: http://lkml.kernel.org/r/1536927045-23536-31-git-send-email-rppt@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Serge Semin <fancer.lancer@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      530d4c0c
  10. Oct 21, 2018
  11. Oct 15, 2018
  12. Oct 12, 2018
  13. Oct 07, 2018
  14. Sep 20, 2018
  15. Sep 11, 2018
  16. Aug 24, 2018
  17. Aug 02, 2018
  18. Jul 23, 2018
    • Arnd Bergmann's avatar
      Documentation: document ktime_get_*() APIs · 0e3fd810
      Arnd Bergmann authored
      As Dave Chinner points out, we don't have a proper documentation for the
      ktime_get() family of interfaces, making it rather unclear which of the
      over 30 (!) interfaces one should actually use in a driver or elsewhere
      in the kernel.
      
      I wrote up an explanation from how I personally see the interfaces,
      documenting what each of the functions do and hopefully making it a bit
      clearer which should be used where.
      
      This is the first time I tried writing .rst format documentation, so
      in addition to any mistakes in the content, I probably also introduce
      nonstandard formatting ;-)
      
      I first tried to add an extra section to
      Documentation/timers/timekeeping.txt, but this is currently not included
      in the generated API, and it seems useful to have the API docs as part
      of what gets generated in
      https://www.kernel.org/doc/html/latest/core-api/index.html#core-utilities
      
      
      instead, so I started a new file there.
      
      I also considered adding the documentation inline in the
      include/linux/timekeeping.h header, but couldn't figure out how to do
      that in a way that would result both in helpful inline comments as
      well as readable html output, so I settled for the latter, with
      a small note pointing to it from the header.
      
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      0e3fd810
  19. Jul 17, 2018
  20. Jun 30, 2018
  21. Jun 18, 2018
Loading