1
0
Fork 0
Commit Graph

14 Commits (2b27bdcc20958d644d04f9f12d683e52b37a5427)

Author SHA1 Message Date
Thomas Gleixner 2b27bdcc20 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 51 franklin st fifth floor boston ma 02110
  1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 246 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:07 +02:00
Souptick Joarder 70d52ba9e5 hsi: clients: Change return type to vm_fault_t
Use new return type vm_fault_t for fault handler. For
now, this is just documenting that the function returns
a VM_FAULT value rather than an errno. Once all instances
are converted, vm_fault_t will become a distinct type.

Reference id -> 1c8f422059 ("mm: change return type to
vm_fault_t")

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-04-17 16:05:26 +02:00
Linus Torvalds a9a08845e9 vfs: do bulk POLL* -> EPOLL* replacement
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
        L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
        for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
    done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do.  But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-02-11 14:34:03 -08:00
Linus Torvalds a9e89e5448 HSI changes for the v4.16 series
* Y2038 fix for cmt-speech
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlpx1osACgkQ2O7X88g7
 +pqVmQ/+NRwe7oc9NbGr4tM1bVrVTTOKZ2N186ZT8/ZcMfhy8Sk/Am+w8mZuV5TI
 1E15WCQHO66URrjtstr0kOO/KVY9TWnM0cFOIEf3Y+k3EDHWkCJcMobM9FOsDTiF
 GTGrIfwm2yVx7R9/raYiUXJLKAMyiXgHBGkrQ9mCqyE+rdooASJyI2SirnkRoOXL
 5VEvu0eOkoAVwY1ZIctQpmXB7qUWBjIuJDALDE7MUBhhO+gJmISFB+Fo7j2EBkqs
 qerbvWF06kXmNS0nS88XsqjZ8WpiGc2xzF9Npp6UoAXTN16WqZe+n+m1aFCixUKH
 N07MvWFpk4X6CtJzfuNyp4v4XXPoaR8c1xSdoXqRK9xJV2r5RoLKTR2YUS3ur6li
 7etaewFZYXQtZRlnCUlS4Ge17Wb+hB2+6593GPZQbkIfqd+5zqlJzTxvS5hWE3qi
 5pCVggBvKFxSB0+1/Nt2Z0n3JtwJ+G+3bStjfOPcbjtUkX9iAQuuQo9ifIWLS3AJ
 3uEQLvGky/mtwKonRBl9fm03C4kXLYFf3rM28YIsYSDVJqmFZ69epzvIe4V/LOwW
 gujJ/7L9Xr5SCUISqN56/GjV5QW5rtkdY9HjN1TXhgTgpQQFrEnH30zXc6cb+fXh
 GgTxY1Ws5PVZwNsVqXHrEoYtmAFP3FJDGuroCZeG1WVWUs2tQWA=
 =6r40
 -----END PGP SIGNATURE-----

Merge tag 'hsi-for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI update from Sebastian Reichel:
 "Y2038 fix for cmt-speech"

* tag 'hsi-for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: cmt_speech: use timespec64 instead of timespec
2018-01-31 12:54:05 -08:00
Arnd Bergmann b6dc80dbe6 HSI: cmt_speech: use timespec64 instead of timespec
struct timespec should no longer be used because of the y2038
overflow problem. This code does not suffer from the overflow,
but it's trivial to change it to use timespec64 without changing
the interface, so let's do that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-12-01 16:31:47 +01:00
Al Viro afc9a42b74 the rest of drivers/*: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-11-28 11:06:58 -05:00
Ingo Molnar 174cd4b1e5 sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:32 +01:00
Dave Jiang 11bac80004 mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to
take a vma and vmf parameter when the vma already resides in vmf.

Remove the vma parameter to simplify things.

[arnd@arndb.de: fix ARM build]
  Link: http://lkml.kernel.org/r/20170125223558.1451224-1-arnd@arndb.de
Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-24 17:46:54 -08:00
Iago Abal 3c13ab1d96 HSI: cmt_speech: Fix double spin_lock
Release &hi->lock before calling `cs_hsi_control_read_error' to avoid deadlock.

The bug was found using EBA (https://github.com/models-team/eba), which reported
the following:

    Double lock
    first at drivers/hsi/clients/cmt_speech.c:443
    second at drivers/hsi/clients/cmt_speech.c:447
    In cs_hsi_read_on_control_complete defined at drivers/hsi/clients/cmt_speech.c:438:
    (!) drivers/hsi/clients/cmt_speech.c:443: spin_lock(& hi->lock);
    (?) drivers/hsi/clients/cmt_speech.c:445: msg->status == 4 -> true
    (!) drivers/hsi/clients/cmt_speech.c:447: cs_hsi_control_read_error(hi, msg);
        (!) drivers/hsi/clients/cmt_speech.c:407: __cs_hsi_error_pre(hi, msg, "control read",
                       & hi->control_state);
            (!) drivers/hsi/clients/cmt_speech.c:382: spin_lock(& hi->lock);

Signed-off-by: Iago Abal <mail@iagoabal.eu>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-06-10 00:08:10 +02:00
Muhammad Falak R Wani f6004b7bc6 HSI: cmt_speech: use vma_pages().
Replace explicit computation of vma page count by a call to
vma_pages()

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-29 20:37:45 +02:00
Kirill A. Shutemov 7cbea8dc01 mm: mark most vm_operations_struct const
With two exceptions (drm/qxl and drm/radeon) all vm_operations_struct
structs should be constant.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-10 13:29:01 -07:00
Sebastian Reichel 5023a5ca8e HSI: cmt_speech: fix timestamp interface
The user interface for timestamps in the new cmt_speech
driver is broken in multiple ways:

- The layout is incompatible between 32-bit and 64-bit user
  space, because of the size differences in 'struct timespec'.
  This means that the driver can not work when used with 32-bit
  user space on a 64-bit kernel.

- As there are plans to change 32-bit user space to use
  a 64-bit time_t type in the future, it will also be
  incompatible with new 32-bit user space.

- It is using ktime_get_ts under it's deprecated alias
  (do_posix_clock_monotonic_gettime).

To keep support for the user space tools written for this driver (which
have lived many years out-of-tree), the interface has been hardened to
unsigned 32-bit values.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-06-23 02:40:03 +02:00
Julia Lawall 265ef3ee95 HSI: cmt_speech: fix error return code
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-04-05 14:45:27 +02:00
Kai Vehmanen 7f62fe8a58 HSI: cmt_speech: Add cmt-speech driver
Introduces the cmt-speech driver, which implements
a character device interface for transferring speech
data frames over HSI/SSI.

The driver is used to exchange voice/speech data between
the Nokia N900/N950/N9's modem and its cpu.

Signed-off-by: Kai Vehmanen <kai.vehmanen@nokia.com>
Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
Signed-off-by: Joni Lapilainen <joni.lapilainen@gmail.com>

Since the original driver has been written for 2.6.28 some
build fixes and general cleanups have been added by me:

 * fix build for 4.0 kernel
 * replace GFP_ATOMIC with GFP_KERNEL in cs_alloc_cmds()
 * add sanity check for CS_SET_WAKELINE ioctl
 * cleanup driver initialisation
 * rename driver to cmt-speech to be consistent with
   ssi-protocol driver
 * move cs-protocol.h to include/uapi/linux/hsi, since
   it describes a userspace API
 * replace hardcoded channels numbers with values provided
   via the HSI framework (e.g. coming from DT)

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-03-31 22:14:04 +02:00