21 Jan, 2016

2 commits

  • Move the generic implementation to now that all
    architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
    that everyone supports them.

    [valentinrothberg@gmail.com: remove leftovers in Kconfig]
    Signed-off-by: Christoph Hellwig
    Cc: "David S. Miller"
    Cc: Aurelien Jacquiot
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Geert Uytterhoeven
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Helge Deller
    Cc: James Hogan
    Cc: Jesper Nilsson
    Cc: Koichi Yasutake
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Mikael Starvik
    Cc: Steven Miao
    Cc: Vineet Gupta
    Cc: Christian Borntraeger
    Cc: Joerg Roedel
    Cc: Sebastian Ott
    Signed-off-by: Valentin Rothberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Signed-off-by: Christoph Hellwig
    Cc: Steven Miao
    Cc: Christian Borntraeger
    Cc: Joerg Roedel
    Cc: Sebastian Ott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

19 Jan, 2016

1 commit

  • Pull virtio barrier rework+fixes from Michael Tsirkin:
    "This adds a new kind of barrier, and reworks virtio and xen to use it.

    Plus some fixes here and there"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (44 commits)
    checkpatch: add virt barriers
    checkpatch: check for __smp outside barrier.h
    checkpatch.pl: add missing memory barriers
    virtio: make find_vqs() checkpatch.pl-friendly
    virtio_balloon: fix race between migration and ballooning
    virtio_balloon: fix race by fill and leak
    s390: more efficient smp barriers
    s390: use generic memory barriers
    xen/events: use virt_xxx barriers
    xen/io: use virt_xxx barriers
    xenbus: use virt_xxx barriers
    virtio_ring: use virt_store_mb
    sh: move xchg_cmpxchg to a header by itself
    sh: support 1 and 2 byte xchg
    virtio_ring: update weak barriers to use virt_xxx
    Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb"
    asm-generic: implement virt_xxx memory barriers
    x86: define __smp_xxx
    xtensa: define __smp_xxx
    tile: define __smp_xxx
    ...

    Linus Torvalds
     

13 Jan, 2016

2 commits

  • Pull misc vfs updates from Al Viro:
    "All kinds of stuff. That probably should've been 5 or 6 separate
    branches, but by the time I'd realized how large and mixed that bag
    had become it had been too close to -final to play with rebasing.

    Some fs/namei.c cleanups there, memdup_user_nul() introduction and
    switching open-coded instances, burying long-dead code, whack-a-mole
    of various kinds, several new helpers for ->llseek(), assorted
    cleanups and fixes from various people, etc.

    One piece probably deserves special mention - Neil's
    lookup_one_len_unlocked(). Similar to lookup_one_len(), but gets
    called without ->i_mutex and tries to avoid ever taking it. That, of
    course, means that it's not useful for any directory modifications,
    but things like getting inode attributes in nfds readdirplus are fine
    with that. I really should've asked for moratorium on lookup-related
    changes this cycle, but since I hadn't done that early enough... I
    *am* asking for that for the coming cycle, though - I'm going to try
    and get conversion of i_mutex to rwsem with ->lookup() done under lock
    taken shared.

    There will be a patch closer to the end of the window, along the lines
    of the one Linus had posted last May - mechanical conversion of
    ->i_mutex accesses to inode_lock()/inode_unlock()/inode_trylock()/
    inode_is_locked()/inode_lock_nested(). To quote Linus back then:

    -----
    | This is an automated patch using
    |
    | sed 's/mutex_lock(&\(.*\)->i_mutex)/inode_lock(\1)/'
    | sed 's/mutex_unlock(&\(.*\)->i_mutex)/inode_unlock(\1)/'
    | sed 's/mutex_lock_nested(&\(.*\)->i_mutex,[ ]*I_MUTEX_\([A-Z0-9_]*\))/inode_lock_nested(\1, I_MUTEX_\2)/'
    | sed 's/mutex_is_locked(&\(.*\)->i_mutex)/inode_is_locked(\1)/'
    | sed 's/mutex_trylock(&\(.*\)->i_mutex)/inode_trylock(\1)/'
    |
    | with a very few manual fixups
    -----

    I'm going to send that once the ->i_mutex-affecting stuff in -next
    gets mostly merged (or when Linus says he's about to stop taking
    merges)"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
    nfsd: don't hold i_mutex over userspace upcalls
    fs:affs:Replace time_t with time64_t
    fs/9p: use fscache mutex rather than spinlock
    proc: add a reschedule point in proc_readfd_common()
    logfs: constify logfs_block_ops structures
    fcntl: allow to set O_DIRECT flag on pipe
    fs: __generic_file_splice_read retry lookup on AOP_TRUNCATED_PAGE
    fs: xattr: Use kvfree()
    [s390] page_to_phys() always returns a multiple of PAGE_SIZE
    nbd: use ->compat_ioctl()
    fs: use block_device name vsprintf helper
    lib/vsprintf: add %*pg format specifier
    fs: use gendisk->disk_name where possible
    poll: plug an unused argument to do_poll
    amdkfd: don't open-code memdup_user()
    cdrom: don't open-code memdup_user()
    rsxx: don't open-code memdup_user()
    mtip32xx: don't open-code memdup_user()
    [um] mconsole: don't open-code memdup_user_nul()
    [um] hostaudio: don't open-code memdup_user()
    ...

    Linus Torvalds
     
  • This defines __smp_xxx barriers for blackfin,
    for use by virtualization.

    smp_xxx barriers are removed as they are
    defined correctly by asm-generic/barriers.h

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Arnd Bergmann
    Acked-by: Peter Zijlstra (Intel)

    Michael S. Tsirkin
     

04 Jan, 2016

1 commit


04 Dec, 2015

1 commit

  • It seems that commit 5dc12ddee93 ("Remove tas()") missed some files.
    Correct this and fully drop this macro, for which we should be using
    cmpxchg() like calls.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Peter Zijlstra (Intel)
    Cc:
    Cc: Andrew Morton
    Cc: Aurelien Jacquiot
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Steven Miao
    Cc: Thomas Gleixner
    Cc: dave@stgolabs.net
    Link: http://lkml.kernel.org/r/1445975631-17047-2-git-send-email-dave@stgolabs.net
    Signed-off-by: Ingo Molnar

    Davidlohr Bueso
     

04 Oct, 2015

1 commit

  • Pull strscpy string copy function implementation from Chris Metcalf.

    Chris sent this during the merge window, but I waffled back and forth on
    the pull request, which is why it's going in only now.

    The new "strscpy()" function is definitely easier to use and more secure
    than either strncpy() or strlcpy(), both of which are horrible nasty
    interfaces that have serious and irredeemable problems.

    strncpy() has a useless return value, and doesn't NUL-terminate an
    overlong result. To make matters worse, it pads a short result with
    zeroes, which is a performance disaster if you have big buffers.

    strlcpy(), by contrast, is a mis-designed "fix" for strlcpy(), lacking
    the insane NUL padding, but having a differently broken return value
    which returns the original length of the source string. Which means
    that it will read characters past the count from the source buffer, and
    you have to trust the source to be properly terminated. It also makes
    error handling fragile, since the test for overflow is unnecessarily
    subtle.

    strscpy() avoids both these problems, guaranteeing the NUL termination
    (but not excessive padding) if the destination size wasn't zero, and
    making the overflow condition very obvious by returning -E2BIG. It also
    doesn't read past the size of the source, and can thus be used for
    untrusted source data too.

    So why did I waffle about this for so long?

    Every time we introduce a new-and-improved interface, people start doing
    these interminable series of trivial conversion patches.

    And every time that happens, somebody does some silly mistake, and the
    conversion patch to the improved interface actually makes things worse.
    Because the patch is mindnumbing and trivial, nobody has the attention
    span to look at it carefully, and it's usually done over large swatches
    of source code which means that not every conversion gets tested.

    So I'm pulling the strscpy() support because it *is* a better interface.
    But I will refuse to pull mindless conversion patches. Use this in
    places where it makes sense, but don't do trivial patches to fix things
    that aren't actually known to be broken.

    * 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: use global strscpy() rather than private copy
    string: provide strscpy()
    Make asm/word-at-a-time.h available on all architectures

    Linus Torvalds
     

16 Sep, 2015

1 commit

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

27 Jul, 2015

3 commits


18 Jul, 2015

1 commit

  • Commit 2ae416b142b6 ("mm: new mm hook framework") introduced an empty
    header file (mm-arch-hooks.h) for every architecture, even those which
    doesn't need to define mm hooks.

    As suggested by Geert Uytterhoeven, this could be cleaned through the use
    of a generic header file included via each per architecture
    asm/include/Kbuild file.

    The PowerPC architecture is not impacted here since this architecture has
    to defined the arch_remap MM hook.

    Signed-off-by: Laurent Dufour
    Suggested-by: Geert Uytterhoeven
    Acked-by: Geert Uytterhoeven
    Acked-by: Vineet Gupta
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laurent Dufour
     

09 Jul, 2015

1 commit

  • Added the x86 implementation of word-at-a-time to the
    generic version, which previously only supported big-endian.

    Omitted the x86-specific load_unaligned_zeropad(), which in
    any case is also not present for the existing BE-only
    implementation of a word-at-a-time, and is only used under
    CONFIG_DCACHE_WORD_ACCESS.

    Added as a "generic-y" to the Kbuilds of all architectures
    that didn't previously have it.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

27 Jun, 2015

1 commit

  • Pull tty/serial driver updates from Greg KH:
    "Here's the tty and serial driver patches for 4.2-rc1.

    A number of individual driver updates, some code cleanups, and other
    minor things, full details in the shortlog.

    All have been in linux-next for a while with no reported issues"

    * tag 'tty-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (152 commits)
    Doc: serial-rs485.txt: update RS485 driver interface
    Doc: tty.txt: remove mention of the BKL
    MAINTAINERS: tty: add serial docs directory
    serial: sprd: check for NULL after calling devm_clk_get
    serial: 8250_pci: Correct uartclk for xr17v35x expansion chips
    serial: 8250_pci: Add support for 12 port Exar boards
    serial: 8250_uniphier: add bindings document for UniPhier UART
    serial: core: cleanup in uart_get_baud_rate()
    serial: stm32-usart: Add STM32 USART Driver
    tty/serial: kill off set_irq_flags usage
    tty: move linux/gsmmux.h to uapi
    doc: dt: add documentation for nxp,lpc1850-uart
    serial: 8250: add LPC18xx/43xx UART driver
    serial: 8250_uniphier: add UniPhier serial driver
    serial: 8250_dw: support ACPI platforms with integrated DMA engine
    serial: of_serial: check the return value of clk_prepare_enable()
    serial: of_serial: use devm_clk_get() instead of clk_get()
    serial: earlycon: Add support for big-endian MMIO accesses
    serial: sirf: use hrtimer for data rx
    serial: sirf: correct the fifo empty_bit
    ...

    Linus Torvalds
     

26 Jun, 2015

1 commit


25 Jun, 2015

1 commit

  • 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: Laurent Dufour
    Suggested-by: Andrew Morton
    Cc: "Kirill A. Shutemov"
    Cc: Hugh Dickins
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: Pavel Emelyanov
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laurent Dufour
     

11 Jun, 2015

1 commit

  • Fix

    include/asm-generic/io.h: In function 'readb':
    include/asm-generic/io.h:113:2: error:
    implicit declaration of function 'bfin_read8'
    include/asm-generic/io.h: In function 'readw':
    include/asm-generic/io.h:121:2: error:
    implicit declaration of function 'bfin_read16'
    include/asm-generic/io.h: In function 'readl':
    include/asm-generic/io.h:129:2: error:
    implicit declaration of function 'bfin_read32'
    include/asm-generic/io.h: In function 'writeb':
    include/asm-generic/io.h:147:2: error:
    implicit declaration of function 'bfin_write8'
    include/asm-generic/io.h: In function 'writew':
    include/asm-generic/io.h:155:2: error:
    implicit declaration of function 'bfin_write16'
    include/asm-generic/io.h: In function 'writel':
    include/asm-generic/io.h:163:2: error:
    implicit declaration of function 'bfin_write32'

    Reported-by: Geert Uytterhoeven
    Fixes: 1a3372bc522ef ("blackfin: io: define __raw_readx/writex with
    bfin_readx/writex")
    Cc: Steven Miao
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

19 May, 2015

1 commit


07 May, 2015

1 commit


06 May, 2015

1 commit


24 Apr, 2015

2 commits

  • …realmz6/blackfin-linux

    Pull blackfin updates from Steven Miao.

    * tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux:
    eth: bf609 eth clock: add pclk clock for stmmac driver probe
    blackfin: Wire up missing syscalls
    arch: blackfin: kernel: kgdb: Remove unused function
    dma: fix build error after update to v3.19
    blackfin: io: define __raw_readx/writex with bfin_readx/writex
    bf609: add resources for lcd nl8048
    pm: sometimes wake up from suspend to RAM would fail
    debug-mmrs: Eliminate all traces of the USB_PHY_TEST MMR
    bf609: remove softswitch i2c configuration from adv7842 and adv7511 platform data
    bf609: add platform data for soft switch devices on the video extenders
    bf609: enable soft switch gpio driver by default
    bf609: add gpio soft switch platform data for mcp23017 i2c devices
    bf609: use new SND_BF6XX_PCM to choose audio pcm driver
    bug[220] kgdb: change the smp cross core function entry
    arch: blackfin: kernel: setup.c: Cleaning up missing null-terminate in conjunction with strncpy
    blackfin: defconfigs: cleanup unused CONFIG_MTD_CHAR, add MTD_SPI_NOR for BF537-STAMP

    Linus Torvalds
     
  • The related syscalls are below which may cause samples/kdbus building
    break in next-20150401 tree, the related information and error:

    CALL scripts/checksyscalls.sh
    :1223:2: warning: #warning syscall kcmp not implemented [-Wcpp]
    :1226:2: warning: #warning syscall finit_module not implemented [-Wcpp]
    :1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
    :1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
    :1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
    :1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
    :1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
    :1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
    :1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
    :1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
    [...]
    HOSTCC samples/kdbus/kdbus-workers
    samples/kdbus/kdbus-workers.c: In function ‘prime_new’:
    samples/kdbus/kdbus-workers.c:930:18: error: ‘__NR_memfd_create’ undeclared (first use in this function)
    p->fd = syscall(__NR_memfd_create, "prime-area", MFD_CLOEXEC);
    ^
    samples/kdbus/kdbus-workers.c:930:18: note: each undeclared identifier is reported only once for each function it appears in

    Signed-off-by: Chen Gang

    Chen Gang
     

23 Apr, 2015

2 commits


13 Apr, 2015

2 commits


22 Feb, 2015

1 commit

  • Pull more input updates from Dmitry Torokhov:
    "The second round of updates for the input subsystem.

    Updates to ALPS an bfin_roraty drivers and a couple oother fixups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: psmouse - use IS_ENABLED instead of homegrown code
    Input: bfin_rotary - introduce open and close methods
    Input: bfin_rotary - convert to use managed resources
    Input: bfin_rotary - use generic IO functions
    Input: bfin_rotary - move pin lists into into platform data
    Input: bfin_rotary - move platform header to linux/platform_data
    Input: bfin_rotary - mark suspend and resume code as __maybe_unused
    Input: bfin_rotary - fix potential oops in interrupt handler
    Input: ALPS - move v7 packet info to Documentation and v6 packet info
    Input: ALPS - fix confusing comment in protocol data
    Input: ALPS - do not mix trackstick and external PS/2 mouse data
    Input: ALPS - fix trackstick detection on some Dell Latitudes
    Input: ALPS - consolidate setting protocol parameters
    Input: ALPS - split protocol data from model info
    Input: ALPS - make Rushmore a separate protocol
    Input: ALPS - renumber protocol numbers
    Input: adi - remove an unnecessary check
    Input: pxa27x_keypad - remove an unneeded NULL check
    Input: soc_button_array - use "Windows" key for "Home"

    Linus Torvalds
     

19 Feb, 2015

1 commit

  • Pull asm-generic uaccess.h cleanup from Arnd Bergmann:
    "Like in 3.19, I once more have a multi-stage cleanup for one
    asm-generic header file, this time the work was done by Michael
    Tsirkin and cleans up the uaccess.h file in asm-generic, as well as
    all architectures for which the respective maintainers did not pick up
    his patches directly"

    * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (37 commits)
    sparc32: nocheck uaccess coding style tweaks
    sparc64: nocheck uaccess coding style tweaks
    xtensa: macro whitespace fixes
    sh: macro whitespace fixes
    parisc: macro whitespace fixes
    m68k: macro whitespace fixes
    m32r: macro whitespace fixes
    frv: macro whitespace fixes
    cris: macro whitespace fixes
    avr32: macro whitespace fixes
    arm64: macro whitespace fixes
    arm: macro whitespace fixes
    alpha: macro whitespace fixes
    blackfin: macro whitespace fixes
    sparc64: uaccess_64 macro whitespace fixes
    sparc32: uaccess_32 macro whitespace fixes
    avr32: whitespace fix
    sh: fix put_user sparse errors
    metag: fix put_user sparse errors
    ia64: fix put_user sparse errors
    ...

    Linus Torvalds
     

16 Feb, 2015

1 commit


13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

11 Feb, 2015

1 commit

  • We've replaced remap_file_pages(2) implementation with emulation. Nobody
    creates non-linear mapping anymore.

    Signed-off-by: Kirill A. Shutemov
    Cc: Steven Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

13 Jan, 2015

3 commits

  • While working on arch/blackfin/include/asm/uaccess.h, I noticed
    that some macros within this header are made harder to read because they
    violate a coding style rule: space is missing after comma.

    Fix it up.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • virtio wants to write bitwise types to userspace using put_user.
    At the moment this triggers sparse errors, since the value is passed
    through an integer.

    For example:

    __le32 __user *p;
    __le32 x;
    put_user(x, p);

    is safe, but currently triggers a sparse warning.

    Fix that up using __force.

    Note: this does not suppress any useful sparse checks since caller
    assigns x to typeof(*p), which in turn forces all the necessary type
    checks.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • virtio wants to read bitwise types from userspace using get_user. At the
    moment this triggers sparse errors, since the value is passed through an
    integer.

    Fix that up using __force.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Steven Miao

    Michael S. Tsirkin
     

15 Dec, 2014

1 commit

  • Pull tty/serial driver updates from Greg KH:
    "Here's the big tty/serial driver update for 3.19-rc1.

    There are a number of TTY core changes/fixes in here from Peter Hurley
    that have all been teted in linux-next for a long time now. There are
    also the normal serial driver updates as well, full details in the
    changelog below"

    * tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (219 commits)
    serial: pxa: hold port.lock when reporting modem line changes
    tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put"
    tty: Deletion of unnecessary checks before two function calls
    n_tty: Fix read_buf race condition, increment read_head after pushing data
    serial: of-serial: add PM suspend/resume support
    Revert "serial: of-serial: add PM suspend/resume support"
    Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
    serial: 8250: don't attempt a trylock if in sysrq
    serial: core: Add big-endian iotype
    serial: samsung: use port->fifosize instead of hardcoded values
    serial: samsung: prefer to use fifosize from driver data
    serial: samsung: fix style problems
    serial: samsung: wait for transfer completion before clock disable
    serial: icom: fix error return code
    serial: tegra: clean up tty-flag assignments
    serial: Fix io address assign flow with Fintek PCI-to-UART Product
    serial: mxs-auart: fix tx_empty against shift register
    serial: mxs-auart: fix gpio change detection on interrupt
    serial: mxs-auart: Fix mxs_auart_set_ldisc()
    serial: 8250_dw: Use 64-bit access for OCTEON.
    ...

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • This patch is meant to cleanup the handling of read_barrier_depends and
    smp_read_barrier_depends. In multiple spots in the kernel headers
    read_barrier_depends is defined as "do {} while (0)", however we then go
    into the SMP vs non-SMP sections and have the SMP version reference
    read_barrier_depends, and the non-SMP define it as yet another empty
    do/while.

    With this commit I went through and cleaned out the duplicate definitions
    and reduced the number of definitions down to 2 per header. In addition I
    moved the 50 line comments for the macro from the x86 and mips headers that
    defined it as an empty do/while to those that were actually defining the
    macro, alpha and blackfin.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     

11 Dec, 2014

1 commit

  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

26 Nov, 2014

1 commit

  • struct bfin_serial_port contains structs circ_buf, timer_list, and
    work_struct directly (not pointers). This means that these structures
    have to be defined completely to be inlined in struct
    bfin_serial_port.

    So instead of struct declarations, define the structures by including
    proper headers. They were pulled in by linux/serial_core.h or others
    until now. But experimenting with circ_buf removal from serial_core,
    struct circ_buf becomes undefined in bfin_serial:

    In file included from arch/blackfin/kernel/debug-mmrs.c:21:0:
    arch/blackfin/include/asm/bfin_serial.h:44:18: error: field 'rx_dma_buf' has incomplete type

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

15 Oct, 2014

1 commit

  • Pull percpu consistent-ops changes from Tejun Heo:
    "Way back, before the current percpu allocator was implemented, static
    and dynamic percpu memory areas were allocated and handled separately
    and had their own accessors. The distinction has been gone for many
    years now; however, the now duplicate two sets of accessors remained
    with the pointer based ones - this_cpu_*() - evolving various other
    operations over time. During the process, we also accumulated other
    inconsistent operations.

    This pull request contains Christoph's patches to clean up the
    duplicate accessor situation. __get_cpu_var() uses are replaced with
    with this_cpu_ptr() and __this_cpu_ptr() with raw_cpu_ptr().

    Unfortunately, the former sometimes is tricky thanks to C being a bit
    messy with the distinction between lvalues and pointers, which led to
    a rather ugly solution for cpumask_var_t involving the introduction of
    this_cpu_cpumask_var_ptr().

    This converts most of the uses but not all. Christoph will follow up
    with the remaining conversions in this merge window and hopefully
    remove the obsolete accessors"

    * 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (38 commits)
    irqchip: Properly fetch the per cpu offset
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix
    ia64: sn_nodepda cannot be assigned to after this_cpu conversion. Use __this_cpu_write.
    percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t
    Revert "powerpc: Replace __get_cpu_var uses"
    percpu: Remove __this_cpu_ptr
    clocksource: Replace __this_cpu_ptr with raw_cpu_ptr
    sparc: Replace __get_cpu_var uses
    avr32: Replace __get_cpu_var with __this_cpu_write
    blackfin: Replace __get_cpu_var uses
    tile: Use this_cpu_ptr() for hardware counters
    tile: Replace __get_cpu_var uses
    powerpc: Replace __get_cpu_var uses
    alpha: Replace __get_cpu_var
    ia64: Replace __get_cpu_var uses
    s390: cio driver &__get_cpu_var replacements
    s390: Replace __get_cpu_var uses
    mips: Replace __get_cpu_var uses
    MIPS: Replace __get_cpu_var uses in FPU emulator.
    arm: Replace __this_cpu_ptr with raw_cpu_ptr
    ...

    Linus Torvalds