Commit Graph

950297 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
eade9ee6fd ANDROID: GKI: support CONFIG_USB_EHCI_HCD_PLATFORM
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>
2020-08-21 15:44:41 -07:00
zhang sanshan
f004a66806 ANDROID: GKI: support CONFIG_USB_EHCI_HCD
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>
2020-08-21 15:44:39 -07:00
Martijn Coenen
9dd3c90095 ANDROID: GKI: enable CONFIG_EXT4_FS_POSIX_ACL.
This is required on devices without sdcardfs.

Bug: 158733532
Bug: 162909109
Test: manual
Change-Id: I21d6ee488b7e4a094260cffc654a4c9dc3392081
Signed-off-by: Martijn Coenen <maco@google.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-08-21 15:44:20 -07:00
huangshuosheng
636e72b6f7 ANDROID: gki_defconfig: enable CONFIG_PM_DEVFREQ_EVENT.
Enable support for devfreq driver to adjust DDR frequency.

Bug: 154672404
Bug: 162909109
Change-Id: Ic42139c54c62c6ee1bea1da002af06088e2ef268
Signed-off-by: huangshuosheng <huangshuosheng@allwinnertech.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-08-21 15:44:20 -07:00
Siarhei Vishniakou
4857667be1 ANDROID: Enable HID_STEAM and JOYSTICK_XPAD as y
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>
2020-08-21 15:44:18 -07:00
John Stultz
8e1ec97355 ANDROID: dma-heap: Provide accessors so that in-kernel drivers can allocate dmabufs from specific heaps
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
2020-08-21 20:24:29 +00:00
John Stultz
349e8360c9 ANDROID: dma-heap: Rework allocation calls to return struct dma_buf instead of fd
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
2020-08-21 20:24:29 +00:00
John Stultz
fc1310ebf8 ANDROID: dma-heap: Refactor code to allow for future in-kernel users
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
2020-08-21 20:24:29 +00:00
John Stultz
c700bdd223 ANDROID: dma-heap: Add proper kref handling on dma-buf heaps
Add proper refcounting on the dma_heap structure.
While existing heaps are built-in, we may eventually
have heaps loaded from modules, and we'll need to be
able to properly handle the references to the heaps

Also moves minor tracking into the heap structure so
we can properly free things.

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Liam Mark <lmark@codeaurora.org>
Cc: Laura Abbott <labbott@kernel.org>
Cc: Brian Starkey <Brian.Starkey@arm.com>
Cc: Hridya Valsaraju <hridya@google.com>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I9f9e27f640c926882a639d6ad5dc3019d7e2c2b0
Link: https://lore.kernel.org/lkml/20200725032633.125006-1-john.stultz@linaro.org/T/#u
Bug: 154341375
---
v2: Fix potential race with kref_put being called while another
    cpu was scanning the list to take a ref, pointed out by
    Hridya
2020-08-21 20:24:29 +00:00
zhang sanshan
0dff32e5ae ANDROID: GKI: enable CONFIG_V4L_PLATFORM_DRIVERS
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
2020-08-21 06:51:54 -07:00
Todd Kjos
d6d9bb4ff4 ANDROID: fix kernelci build break
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
2020-08-20 20:25:48 -07:00
Tingwei Zhang
344b01778e FROMLIST: stm class: ftrace: use different channel accroding to CPU
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
2020-08-21 02:12:39 +00:00
Tingwei Zhang
651e59845c FROMLIST: stm class: ftrace: enable supported trace export flag
Set flags for trace_export. Export function trace, event trace
and trace marker to stm.

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: Ia4ce8e860372e9149e9763f2fb07f18d6b7e56a6
2020-08-21 02:12:29 +00:00
Tingwei Zhang
b0b6463bb2 FROMLIST: tracing: add trace_export support for trace_marker
Add the support to route trace_marker buffer to other destination
via trace_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: I870f1902e48d05947667ac0ecda7a9d17a982890
2020-08-21 02:12:20 +00:00
Tingwei Zhang
23e1124fab FROMLIST: tracing: add trace_export support for event trace
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
2020-08-21 02:12:09 +00:00
Tingwei Zhang
d853627385 FROMLIST: tracing: add flag to control different traces
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
2020-08-21 02:11:58 +00:00
Tingwei Zhang
75f172538c FROMLIST: stm class: ftrace: change dependency to TRACING
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
2020-08-21 02:11:42 +00:00
Tingwei Zhang
99eb40f95d FROMLIST: coresight: stm: support marked packet
STP_PACKET_MARKED is not supported by STM currently.
Add STM_FLAG_MARKED to support marked packet in STM.

Bug: 160464759
Link: https://lore.kernel.org/linux-arm-kernel/20200726023950.3804-1-tingwei@codeaurora.org/
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Change-Id: Ibe402e35d12e17f33c6ef006f88ab470791bb770
2020-08-21 02:11:30 +00:00
Tingwei Zhang
f79c819c3e ANDROID: GKI: Disable coresight config
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
2020-08-21 01:05:37 +00:00
Chanho Park
a299997ad0 ANDROID: tty: fix tty name overflow
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>
2020-08-21 00:57:38 +00:00
Yun Hsiang
e209b3b88d ANDROID: sched: add vendor hook for correcting cpu capacity
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
2020-08-20 21:31:45 +00:00
JianMin Liu
2935d588b1 ANDROID: sched: Use normal vendor hook in scheduler tick
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
2020-08-20 19:41:06 +00:00
Park Bumgyu
322f59e742 ANDROID: vendor_hooks: add cpuidle event
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>
2020-08-20 14:34:44 +09:00
Paul Lawrence
7ab6cf0fec ANDROID: Incremental fs: Add UID to pending_read
Test: incfs_test passes
Bug: 160634477
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Iaf817cf1f7ccd0109b2114b425ea7f26718345ab
2020-08-19 17:13:16 +00:00
Sangmoon Kim
9ad8ff902e ANDROID: vendor_hooks: add waiting information for blocked tasks
- 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)
2020-08-19 14:52:44 +00:00
Sebastian Andrzej Siewior
10278602dc FROMLIST: net: atlantic: Use readx_poll_timeout() for large timeout
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
2020-08-19 10:24:51 +02:00
Greg Kroah-Hartman
92f13cd6bd Revert "ANDROID: disable 2 ethernet drivers from arm32 build"
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
2020-08-19 10:24:17 +02:00
Elliot Berman
023411cbe9 ANDROID: Use DTC from the hermetic toolchain
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>
2020-08-19 00:33:58 +00:00
Elliot Berman
47b5470fd1 FROMLIST: kbuild: Add dtc flag test
Host dtc may not support the same flags as kernel's copy of dtc. Test
if dtc supports each flag when the dtc comes from host.

Bug: 162811113
Link: https://lore.kernel.org/linux-devicetree/1596650328-14869-1-git-send-email-eberman@codeaurora.org/
Change-Id: Iab4e95c7100817c8b4ad40dcaafa6e6c29a85163
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-08-19 00:33:42 +00:00
Paul Lawrence
3f4938108a ANDROID: Incremental fs: Create mapped file
Bug: 160634482
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ic2ac8dfccd60f6c9c72c38bf323997fce7546c1c
2020-08-18 12:37:59 -07:00
mtk81325
7c02f94255 ANDROID: Incremental fs: fix magic compatibility again
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
2020-08-18 17:12:58 +00:00
Alistair Delva
1ff3ab2468 ANDROID: GKI: Enable CONFIG_USB_ACM
So that the pulse8-cec driver can be enabled downstream.

Bug: 157503752
Change-Id: Icaac11d24420e0320e961d11244ea349993d5fa1
Signed-off-by: Alistair Delva <adelva@google.com>
2020-08-18 08:34:14 -07:00
Maciej Żenczykowski
b20eacd8dd ANDROID: fix a bug in quota2
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
2020-08-18 01:31:37 +00:00
Lorenzo Colitti
29f30c592b ANDROID: net: xfrm: make PF_KEY SHA256 use RFC-compliant truncation. [v2]
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
2020-08-17 23:20:44 +00:00
Alistair Delva
2886a3b337 ANDROID: GKI: Build CEC_{CORE,NOTIFIER,PIN} in
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>
2020-08-17 22:12:23 +00:00
Todd Kjos
3b2fed2f23 ANDROID: db845c: set BUILD_INITRAMFS=1
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
2020-08-17 18:30:04 +00:00
Dmitry Shmidt
9f63939811 ANDROID: GKI: Enable CEC support
CONFIG_MEDIA_CEC_SUPPORT

Bug: 162507365
Bug: 164180803
Change-Id: If6d4a6fbe0aebb27952c8db250db99183e211493
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
[adelva: CONFIG_CEC_PLATFORM_DRIVERS was removed upstream]
Signed-off-by: Alistair Delva <adelva@google.com>
2020-08-17 15:21:39 +00:00
Greg Kroah-Hartman
2a3286f860 Merge 5.9-rc1 into android-mainline
Linux 5.9-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1cfd3565631a1fa0d0411d93d4131ed92ec4ff23
2020-08-17 10:41:31 +02:00
Eric Biggers
b05e7404b7 ANDROID: fix up bad merge resolution / bad revert in soc_pcm_hw_params()
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>
2020-08-17 08:24:52 +00:00
Eric Biggers
2f22f2ce4b Revert "ANDROID: ASoC: Fix 'allmodconfig' build break"
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>
2020-08-17 08:24:40 +00:00
Greg Kroah-Hartman
4aeb613af6 ANDROID: add flags variable to nfs4_xattr_get_nfs4_user()
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
2020-08-17 09:24:44 +02:00
Greg Kroah-Hartman
df7e491a37 Merge 4b6c093e21 ("Merge tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.9-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I904678b5c31139b25fb49ee67cbacb4721a3c7bc
2020-08-17 09:19:35 +02:00
Greg Kroah-Hartman
9edfd6c57a ANDROID: fix up Android-specific Kconfig ---help--- strings
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
2020-08-17 09:13:01 +02:00
Linus Torvalds
9123e3a74e Linux 5.9-rc1 2020-08-16 13:04:57 -07:00
Linus Torvalds
2cc3c4b3c2 Merge tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block
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
2020-08-16 10:55:12 -07:00
Mike Rapoport
6f6aea7e96 parisc: fix PMD pages allocation by restoring pmd_alloc_one()
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>
2020-08-16 10:53:13 -07:00
Linus Torvalds
4b6c093e21 Merge tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block
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
2020-08-15 20:36:42 -07:00
Linus Torvalds
d84835b118 Merge tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
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
2020-08-15 18:54:42 -07:00
Linus Torvalds
5bbec3cfe3 Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh
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
  ...
2020-08-15 18:50:32 -07:00
Jens Axboe
f91daf565b io_uring: short circuit -EAGAIN for blocking read attempt
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>
2020-08-15 15:58:42 -07:00