Age | Commit message (Collapse) | Author | Files | Lines |
|
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
To facilitate additional options to get_user_pages_fast() change the
singular write parameter to be gup_flags.
This patch does not change any functionality. New functionality will
follow in subsequent patches.
Some of the get_user_pages_fast() call sites were unchanged because they
already passed FOLL_WRITE or 0 for the write parameter.
NOTE: It was suggested to change the ordering of the get_user_pages_fast()
arguments to ensure that callers were converted. This breaks the current
GUP call site convention of having the returned pages be the final
parameter. So the suggestion was rejected.
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ira Weiny <[email protected]>
Reviewed-by: Mike Marshall <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
prefer 'help' over '---help---' for new help texts
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
of the user address range verification function since we got rid of the
old racy i386-only code to walk page tables by hand.
It existed because the original 80386 would not honor the write protect
bit when in kernel mode, so you had to do COW by hand before doing any
user access. But we haven't supported that in a long time, and these
days the 'type' argument is a purely historical artifact.
A discussion about extending 'user_access_begin()' to do the range
checking resulted this patch, because there is no way we're going to
move the old VERIFY_xyz interface to that model. And it's best done at
the end of the merge window when I've done most of my merges, so let's
just get this done once and for all.
This patch was mostly done with a sed-script, with manual fix-ups for
the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
There were a couple of notable cases:
- csky still had the old "verify_area()" name as an alias.
- the iter_iov code had magical hardcoded knowledge of the actual
values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
really used it)
- microblaze used the type argument for a debug printout
but other than those oddities this should be a total no-op patch.
I tried to fix up all architectures, did fairly extensive grepping for
access_ok() uses, and the changes are trivial, but I may have missed
something. Any missed conversion should be trivially fixable, though.
Signed-off-by: Linus Torvalds <[email protected]>
|
|
checkpacth: Missing a blank line after declarations
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This casting is not required.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Undo effects of misc_register if driver's init fails after
misc_register.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
into the driver state
This is the last patch in the series of patches to move file-scope
variables into the driver state. This change will help to introduce
another version of the pipe driver (with different state) for the
older host interface or having several instances of this device.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
into the driver state
This is a series of patches to move mutable file-scope variables
into the driver state. This change will help to introduce another
version of the pipe driver (with different state) for the older
host interface or having several instances of this device.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
variable into the driver state
This is a series of patches to move mutable file-scope variables
into the driver state. This change will help to introduce another
version of the pipe driver (with different state) for the older
host interface or having several instances of this device.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes the following sparse warning:
drivers/platform/goldfish/goldfish_pipe.c:214:26: warning:
symbol 'goldfish_pipe_dev' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
No symbols were used from this header.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
goldfish_pipe_command is defines just after declaration and
nothing refers to goldfish_pipe before it is defined.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The blank line is not required there.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
writing to the same variable
Move the "pages" buffer into "struct goldfish_pipe". Since we are
locking the mutex on the pipe in transfer_max_buffers, other threads
willnot be able to write into it, but other pipe instances could be
served because they have its own buffer.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The boilerplate license is not necessary when the SPDX line is
present.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Comparison to NULL could be written "!x"
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Logical continuations should be on the previous line
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Alignment should match open parenthesis.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Lines should not end with a '(' or '['
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add "pipe" to the pipe related function names.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Casting to (void) is no-op.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Avoid CamelCase
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Casting to u32 is not required here.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Two function calls look cleaner because the function introduces
takes case of all bit shifting and casting.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The variable was not very useful.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
To improve readability and to be consistent with other
struct members.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
dev_ is preferred if struct device is available.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There is no reason to have an array of 1.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since the driver provides no workaround prevent in cases if structs do
no fit into a memory page, it is better to fail complation to find about
the issue earlt instead of returning errors at runtime.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Provide an explanation why GFP_ATOMIC is needed to prevent changing it to
other values.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These are several enums that must kept in sync with the host side.
This change explicitly separates them into a dedicated header file.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
checkpatch: Function's opening brace has to be at the
beginning of the next line.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
goldfish_pipe is distributed under GPL v2.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some comment lines are longer than 80 symbols.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Not used by goldfish.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
At over 4000 #includes, <linux/platform_device.h> is the 9th most
#included header file in the Linux kernel. It does not need
<linux/mod_devicetable.h>, so drop that header and explicitly add
<linux/mod_devicetable.h> to source files that need it.
4146 #include <linux/platform_device.h>
After this patch, there are 225 files that use <linux/mod_devicetable.h>,
for a reduction of around 3900 times that <linux/mod_devicetable.h>
does not have to be read & parsed.
225 #include <linux/mod_devicetable.h>
This patch was build-tested on 20 different arch-es.
It also makes these drivers SubmitChecklist#1 compliant.
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: kbuild test robot <[email protected]> # drivers/media/platform/vimc/
Reported-by: kbuild test robot <[email protected]> # drivers/pinctrl/pinctrl-u300.c
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Tasklet goldfish_interrupt_tasklet is local to the source and
does not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'goldfish_interrupt_tasklet' was not declared. Should it be static?
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Al Viro <[email protected]>
|
|
We want the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The function get_free_pipe_id_locked() is called from
goldfish_pipe_open() with a lock is held, so we should
use GFP_ATOMIC instead of GFP_KERNEL.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Make this static as it's only referenced in this source and
it does not need global scope.
Cleans up a sparse warning:
drivers/platform/goldfish/goldfish_pipe.c: warning: symbol
'pipe_dev' was not declared. Should it be static?
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The new goldfish_pipe code used too much stack space in the
transfer_max_buffers() call. As the function is serialized with a lock,
let's make the buffer static to not use the stack for the large buffer.
Reported-by: kbuild test robot <[email protected]>
Cc: Yurii Zubrytskyi <[email protected]>
Cc: Jin Qian <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This is a driver code for a redesigned android pipe.
Currently it works for x86 and x64 emulators with the following
performance results:
ADB push to /dev/null,
Ubuntu,
400 MB file,
times are for (1 / 10 / 100) parallel adb commands
x86 adb push: (4.4s / 11.5s / 2m10s) -> (2.8s / 6s / 51s)
x64 adb push: (7s / 15s / (too long, 6m+) -> (2.7s / 6.2s / 52s)
ADB pull and push to /data/ have the same %% of speedup
More importantly, I don't see any signs of slowdowns when
run in parallel with Antutu benchmark, so it is definitely
making much better job at multithreading.
Signed-off-by: Yurii Zubrytskyi <[email protected]>
Signed-off-by: Jin Qian <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This interrupt handler is broken in several ways:
- It loops forever when the op code is not decodeable
- It never returns IRQ_HANDLED because the only way to exit the loop
returns IRQ_NONE unconditionally.
The whole concept of this is broken. Creating devices in an interrupt
handler is beyond any point of sanity.
Make it at least behave halfways sane so accidental users do not have to
deal with a hard to debug lockup.
Fixes: e809c22b8fb028 ("goldfish: add the goldfish virtual bus")
Reported-by: Gabriel C <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code
and takes advantage of VM_FAULT_RETRY functionality when faulting in pages.
Signed-off-by: Lorenzo Stoakes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This removes the 'write' and 'force' from get_user_pages() and replaces
them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers
as use of this flag can result in surprising behaviour (and hence bugs)
within the mm subsystem.
Signed-off-by: Lorenzo Stoakes <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Jesper Nilsson <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Commit d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to
not pass tsk/mm") switched get_user_pages() callers to the simpler model
where they no longer pass in the thread and mm pointer. But since then
we've merged changes to a few drivers that re-introduce use of the old
interface. Let's fix them up.
They continued to work fine (thanks to the truly disgusting macros
introduced in commit cde70140fed8: "mm/gup: Overload get_user_pages()
functions"), but cause unnecessary build noise.
Signed-off-by: Linus Torvalds <[email protected]>
|