Everyone really wants either the PCI or Platform EHCI driver, so build
it in so that all boards don't have to select this as well.
Based on a change from zhang sanshan.
Bug: 160193672
Bug: 162909109
Change-Id: Ie2273b5565003f339a7734f579d35b2f8bb4b0b0
Cc: zhang sanshan <pete.zhang@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
it use CHIPIDEA usb controller on imx8mm-evk board.
Need enable device/host mode for android device by default.
host mode depend on CONFIG_USB_CHIPIDEA_HOST which need enable CONFIG_USB_EHCI_HCD by default.
CONFIG_USB_EHCI_HCD is used for USB 2.0 "high speed" protocol.
Bug: 160193672
Bug: 162909109
Change-Id: Ic635ae6c12397ed7d2060ab68fec3853fadfa6ec
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
These configs will now be required in aosp/1204022.
Change-Id: Ib2961a9abf545f483cd5691f04b93cffd011ec82
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Bug: 136263708
Test: none
Bug: 162909109
Signed-off-by: Connor O'Brien <connoro@google.com>
This allows drivers who don't want to create their own
DMA-BUF exporter to be able to allocate DMA-BUFs directly
from existing DMA-BUF Heaps.
There is some concern that the premise of DMA-BUF heaps is
that userland knows better about what type of heap memory
is needed for a pipeline, so it would likely be best for
drivers to import and fill DMA-BUFs allocated by userland
instead of allocating one themselves, but this is still
up for debate.
Unfortunately we don't have any public users of this, so
we cannot push it upstream. However, vendors have asked
for this, so I'm submitting it to Andorid Common in the
hopes that we can eventually find what vendors are doing.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I7b5ef690cefd2bfbbc2e01220ada49e44ef4fa04
Bug: 154341375
While most uses will want to allocate a fd for a dmabuf, there
are some cases where it might be useful to have just a dma_buf structure.
So refactor the heap allocaiton functions to return a struct dma_buf
and add a dma_heap_bufferfd_alloc() function to convert that return a fd.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id6fd7e8471b9555a08bcdf8ca210feb589fa51c1
Bug: 154341375
Refactor the code to make in-kernel use a bit more clean.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I909a36ea6f2351415decbd489fd71ea03b2c2171
Bug: 154341375
the sensor/csi/mipi driver are in drivers/media/platform/.
need enable V4L_PLATFORM_DRIVERS by default to support camera
which is need by soc vendor.
Bug: 160192055
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Change-Id: I38ef6c1d1dcc2101216a50ad32f7fff96fe7ea65
(cherry picked from commit 7c8a73f320ef73b7ec8d9ac87f6696ef8997436a)
[salyzyn added CONFIG_MEDIA_PLATFORM_SUPPORT as well]
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Fixes: 06b93644f4 ("media: Kconfig: add an option to filter in/out platform drivers")
Bug: 165592876
commit e209b3b88d ("ANDROID: sched: add vendor hook for correcting
cpu capacity") had a typo which caused failures when tracing was
disabled.
Fixes: e209b3b88d ("ANDROID: sched: add vendor hook for correcting cpu capacity")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iec8d1cfd7f00ee5b6cb3e870f8b829d41e993335
To avoid mixup of packets from differnt ftrace packets simultaneously,
use different channel for packets from different CPU.
Bug: 160464759
Link: https://lore.kernel.org/patchwork/cover/1280618/
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Change-Id: I5e0afe8e6fb60f73c4ce3165b80db38e60f82031
Only function traces can be exported to other destinations currently.
This patch exports event trace as well. Move trace export related
function to the beginning of file so other trace can call
trace_process_export() to export.
Bug: 160464759
Link: https://lore.kernel.org/patchwork/cover/1280618/
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Change-Id: I140476398b889c0c793a4be972437012d2ad9552
More traces like event trace or trace marker will be supported.
Add flag for difference traces, so that they can be controlled
separately. Move current function trace to it's own flag
instead of global ftrace enable flag.
Bug: 160464759
Link: https://lore.kernel.org/patchwork/cover/1280618/
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Change-Id: I25f9fd4d3af7a82e013f6855e8ca69066b371cff
We will support copying event trace to STM. Change
STM_SOURCE_FTRACE to depend on TRACING since we will
support multiple tracers.
Bug: 160464759
Link: https://lore.kernel.org/patchwork/cover/1280618/
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Change-Id: If7e9b6d8831bb552fe76488c1c4b0f1ede604e83
Coresight driver will support to be built as Kernel module.
Disable the builtin configuration in gki_defconfig. It can
be enabled by vendor as Kernel module.
Bug: 160464759
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Change-Id: I6de8d6778703cb1db58e4343b31c06d5481b57c3
The tty name can be up to 8 chars if id is greater than 10 such as
ttyUSB11. In that case, the name will be overflowed. To prevent this,
this patch removes snprintf and adds comparison the idx value of
pdev_tty_port only if pdev_tty_port is specified.
Bug: 157525691
Bug: 161501868
Fixes: 21d085e1cc ("ANDROID: serdev: restrict claim of platform devices")
Change-Id: I2a766c9a83a09a1d386686638d8e9c529eeeb735
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Current CPU capacity is scaled by frequency
but it will sometime overestimate.
Add vendor hook to adjust cpu capacity.
android_vh_arch_set_freq_scale
Adjust cpu freq scale for each opp.
Bug: 163935827
Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I054740a7f60301d5a3b085bfa540d52853f5eec5
The hooks function of scheduler tick will need to
insert multiple instances, so that use vendor hook
instead of restricted vendor hook.
Bug: 165787557
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: I750da26452c657d83d5f8c520bf7008693c43a6b
An event that gather the idle state that the cpu attempted to enter and
actually entered is added. Through this, the idle statistics of the cpu
can be obtained and used for vendor specific algorithms or for system
analysis.
Bug: 162980647
Change-Id: I9c2491d524722042e881864488f7b3cf7e903d1e
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
- Add the hook to get mutex/rwsem information that the tasks
are waiting for.
- Add the hook to print messages for sched_show_task.
- ANDROID_VENDOR_DATA_ARRAY added to task_struct
Bug: 162776704
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: Ib436fbd8d0ad509c3b5a73ea8f5170e0761a13fd
(cherry picked from commit b519ac423787d38f467ca479d2126b7204d6f498)
Commit
8dcf2ad39f ("net: atlantic: add hwmon getter for MAC temperature")
implemented a read callback with an udelay(10000U). This fails to
compile on ARM because the delay is >1ms. I doubt that it is needed to
spin for 10ms even if possible on x86.
>From looking at the code, the context appears to be preemptible so using
usleep() should work and avoid busy spinning.
Use readx_poll_timeout() in the poll loop.
Cc: Mark Starovoytov <mstarovoitov@marvell.com>
Cc: Igor Russkikh <irusskikh@marvell.com>
Link: https://lkml.kernel.org/r/20200818161439.3dkf6jzp3vuwmvvh@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5ba7041e31be3445d209aeeed2f8933962b3fcb0
This reverts commit b276502e1b as the
"correct" fix for one driver is already merged and another one already
submitted.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1db77d2388903e18b2649719b17adbc5b2287ac3
Set DTC from kernel build tools. The DTC is the same as used in AOSP.
Bug: 162811113
Change-Id: I16c513ba9c6ce5a1206e95e8de4ae923c11db894
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
It's still magic number issue which cannot be compatible with
arm-32 platform, although we try to fix it in Iae4f3877444
("ANDROID: Incremental fs: magic number compatible 32-bit"),
there is still incompatible scenario, such as: get_incfs_node(),
it will return NULL then kernel exception will be trigger because
of NULL pointer access. (inode_set() -> get_incfs_node(), then used
node->xxx directly)
We change magic number directly, otherwise, we must fix above issues one by one.
Bug: 159772865
Fixes: Iae4f3877444("ANDROID: Incremental fs: magic number compatible 32-bit")
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Signed-off-by: mtk81325 <peng.zhou@mediatek.com>
Change-Id: I71f279c1bb55ea296ab33a47644f30df4a9f60a6
So that the pulse8-cec driver can be enabled downstream.
Bug: 157503752
Change-Id: Icaac11d24420e0320e961d11244ea349993d5fa1
Signed-off-by: Alistair Delva <adelva@google.com>
If quota is precisely equal to skb->len then a notification
would not be sent due to immediately hitting 0.
This fixes that, and takes the opportunity to slightly clean
up the code and make quota behave more correctly for packet mode
as well.
Test: builds, net tests continue to pass
Bug: 164336990
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I78a11b48794496255513a6226c0469d809d7aa56
When using the PF_KEY interface, SHA-256 hashes are hardcoded to
use 96-bit truncation. This is a violation of RFC4868, which
specifies 128-bit truncation, but will not be fixed upstream due
to backwards compatibility concerns and because the PF_KEY
interface is deprecated in favour of netlink XFRM (which allows
the app to specify an arbitrary truncation length).
Change the hardcoded truncation length from 96 to 128 so that
PF_KEY apps such as racoon will work with standards-compliant VPN
servers.
Note: this is effectively a redo (revert/reapplication) of:
commit b8a72fd7c4
ANDROID: net: xfrm: make PF_KEY SHA256 use RFC-compliant truncation.
but in a way that makes clearer what the ANDROID diff is.
Bug: 34114242
Bug: 120440497
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8ee2ac9bb577b5078e8565a5b1f5fd84c2b3f74f
CEC_{CORE,NOTIFIER,PIN} are hidden options which are selected by
drivers. Select them here so the ABI surface is available to
modules.
Bug: 162507365
Bug: 164180803
Change-Id: Idf8d072388b387442d967bf1c6d3be1f9a734ab6
Signed-off-by: Alistair Delva <adelva@google.com>
To create boot images for multiple kernels for CI testing, we
need the initramfs image.
Bug: 162034308
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I08fc4a45402dfff78da4d322ee70c2f63a262468
A bad merge resolution of upstream with "ANDROID: ASoC: core - add
hostless DAI support" resulted in some code being duplicated in
soc_pcm_hw_params(). The conflicting out-of-tree patch later got
reverted, but the duplicate code still remains. Remove it.
This makes the code match upstream.
Bug: 144369166
Fixes: 2b0f7f511d ("Merge b3a6082223 ("Merge branch 'for-v5.6' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security") into android-mainline")
Fixes: 89ff7d0c86 ("ANDROID: ASoC: core: Fix soc_pcm_hw_params crash")
Fixes: da171b5d56 ("ANDROID: Revert "ANDROID: ASoC: core - add hostless DAI support"")
Change-Id: Ib78167c5f60f5d8a0def25dce70e7597e8aeaedb
Signed-off-by: Eric Biggers <ebiggers@google.com>
This reverts commit 972e02b525 because it
was a fix for commit 9cb7ec3e9b ("ANDROID: ASoC: core - add hostless
DAI support"), which got reverted by commit da171b5d56 ("ANDROID:
Revert "ANDROID: ASoC: core - add hostless DAI support""). Therefore
it's no longer needed.
Bug: 144369166
Change-Id: If3ed9dcb04d9879d8fb4a74076c029cf8ce9a609
Signed-off-by: Eric Biggers <ebiggers@google.com>
nfs4 just got xattr support, so add the required extra "flags" variable
as Android has an out-of-tree patch that adds this to all of these
callbacks.
Bug: 133515582
Bug: 136124883
Bug: 129319403
Cc: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4260d16eb469047f62b37c8226c2c1c9cd04cf75
With commit f70f74d15c ("kconfig: remove '---help---' support") the
"---help---" marking is no longer allowed in Kconfig files.
Unfortunately some old ANDROID patches used this deprecated markings,
which breaks the build.
Fix this up by converting them to the correct style "help"
Bug: 156285741
Bug: 146517987
Bug: 31622239
Bug: 120445368
Bug: 119769411
Bug: 129280212
Fixes: 7f62740112 ("ANDROID: add support for vendor hooks")
Fixes: 2dec8234fe ("ANDROID: gnss: Add command line test driver")
Fixes: 6115619831 ("ANDROID: AVB error handler to invalidate vbmeta partition.")
Fixes: 0ce3eb37e9 ("ANDROID: dm-bow: Add dm-bow feature")
Cc: Todd Kjos <tkjos@google.com>
Cc: Alistair Delva <adelva@google.com>
Cc: David Zeuthen <zeuthen@google.com>
Cc: Paul Lawrence <paullawrence@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8a503c34b5b4dac6dc3e24afbefa10223a6fd946
Pull io_uring fixes from Jens Axboe:
"A few differerent things in here.
Seems like syzbot got some more io_uring bits wired up, and we got a
handful of reports and the associated fixes are in here.
General fixes too, and a lot of them marked for stable.
Lastly, a bit of fallout from the async buffered reads, where we now
more easily trigger short reads. Some applications don't really like
that, so the io_read() code now handles short reads internally, and
got a cleanup along the way so that it's now easier to read (and
documented). We're now passing tests that failed before"
* tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block:
io_uring: short circuit -EAGAIN for blocking read attempt
io_uring: sanitize double poll handling
io_uring: internally retry short reads
io_uring: retain iov_iter state over io_read/io_write calls
task_work: only grab task signal lock when needed
io_uring: enable lookup of links holding inflight files
io_uring: fail poll arm on queue proc failure
io_uring: hold 'ctx' reference around task_work queue + execute
fs: RWF_NOWAIT should imply IOCB_NOIO
io_uring: defer file table grabbing request cleanup for locked requests
io_uring: add missing REQ_F_COMP_LOCKED for nested requests
io_uring: fix recursive completion locking on oveflow flush
io_uring: use TWA_SIGNAL for task_work uncondtionally
io_uring: account locked memory before potential error case
io_uring: set ctx sq/cq entry count earlier
io_uring: Fix NULL pointer dereference in loop_rw_iter()
io_uring: add comments on how the async buffered read retry works
io_uring: io_async_buf_func() need not test page bit
Commit 1355c31eeb ("asm-generic: pgalloc: provide generic pmd_alloc_one()
and pmd_free_one()") converted parisc to use generic version of
pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
PMD.
Restore the original version of pmd_alloc_one() for parisc, just use
GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
memset.
Fixes: 1355c31eeb ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pull block fixes from Jens Axboe:
"A few fixes on the block side of things:
- Discard granularity fix (Coly)
- rnbd cleanups (Guoqing)
- md error handling fix (Dan)
- md sysfs fix (Junxiao)
- Fix flush request accounting, which caused an IO slowdown for some
configurations (Ming)
- Properly propagate loop flag for partition scanning (Lennart)"
* tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block:
block: fix double account of flush request's driver tag
loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE
rnbd: no need to set bi_end_io in rnbd_bio_map_kern
rnbd: remove rnbd_dev_submit_io
md-cluster: Fix potential error pointer dereference in resize_bitmaps()
block: check queue's limits.discard_granularity in __blkdev_issue_discard()
md: get sysfs entry after redundancy attr group create
Pull RISC-V fix from Palmer Dabbelt:
"I collected a single fix during the merge window: we managed to break
the early trap setup on !MMU, this fixes it"
* tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: Setup exception vector for nommu platform
Pull arch/sh updates from Rich Felker:
"Cleanup, SECCOMP_FILTER support, message printing fixes, and other
changes to arch/sh"
* tag 'sh-for-5.9' of git://git.libc.org/linux-sh: (34 commits)
sh: landisk: Add missing initialization of sh_io_port_base
sh: bring syscall_set_return_value in line with other architectures
sh: Add SECCOMP_FILTER
sh: Rearrange blocks in entry-common.S
sh: switch to copy_thread_tls()
sh: use the generic dma coherent remap allocator
sh: don't allow non-coherent DMA for NOMMU
dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig
sh: unexport register_trapped_io and match_trapped_io_handler
sh: don't include <asm/io_trapped.h> in <asm/io.h>
sh: move the ioremap implementation out of line
sh: move ioremap_fixed details out of <asm/io.h>
sh: remove __KERNEL__ ifdefs from non-UAPI headers
sh: sort the selects for SUPERH alphabetically
sh: remove -Werror from Makefiles
sh: Replace HTTP links with HTTPS ones
arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA*
sh: stacktrace: Remove stacktrace_ops.stack()
sh: machvec: Modernize printing of kernel messages
sh: pci: Modernize printing of kernel messages
...
One case was missed in the short IO retry handling, and that's hitting
-EAGAIN on a blocking attempt read (eg from io-wq context). This is a
problem on sockets that are marked as non-blocking when created, they
don't carry any REQ_F_NOWAIT information to help us terminate them
instead of perpetually retrying.
Fixes: 227c0c9673 ("io_uring: internally retry short reads")
Signed-off-by: Jens Axboe <axboe@kernel.dk>