We don't need explicit dependency of Goldfish kconfig option on various
architectures. Instead, the Goldfish kconfig option should only depend
on HAS_IOMEM and HAS_DMA which is sufficient for all Goldfish devices.
Signed-off-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>