26 Oct, 2019
6 commits
-
We've been building mainline x86_64 with LLD for months now, and don't
plan to upgrade Android's binutils to work around issues upstream
related to:commit c603a309cc75 ("x86/mm: Identify the end of the kernel area to be reserved")
Bug: 138463564
Signed-off-by: Nick Desaulniers
Signed-off-by: Alistair Delva
Change-Id: Ic52f7f374c494e5d39efb758a7739ebd33799f49 -
Change adds support for jack switch types supported
by platform.This change also squashes the below changes-
include: increase allowed SW INPUT device ID from 15 to 32
Increase the Input device SW ID from 15 to 32. This is needed
to accommodate more input devices.Bug: 142489397
Change-Id: If77f8b37b4db72ada2b5d8a3095265eef90ab62b
Signed-off-by: Gopikrishnaiah Anandan
Signed-off-by: Banajit Goswami
Signed-off-by: Sudheer Papothi
Signed-off-by: Meng Wang -
Parameter fragments and fragment_size are type of u32. U32_MAX is
the correct check.CRs-Fixed: 1014726
Bug: 142489397
Change-Id: Ia6d4755408646ac4a75724f3c6f2177651875da3
Signed-off-by: Xiaojun Sang
Signed-off-by: Meng Wang -
IOMMU drivers that can be compiled as modules need to use
some of the IOMMU core functions, so expose them.Change-Id: I84004fdcd7eee3f56d08db76c3b0421990179810
Signed-off-by: Isaac J. Manjarres
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948413/ -
IOMMU drivers that can be compiled as modules may
want to use pci_for_each_dma_alias() and pci_request_acs(),
so export those functions.Change-Id: I8fab4075d151cc3d07a6594685895a189565bb3d
Signed-off-by: Isaac J. Manjarres
Acked-by: Bjorn Helgaas
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948411/ -
Kernel modules may want to use of_phandle_iterator_args(),
so export it.Change-Id: Ic42b0917834669dd4dc6930081581d66381c7d5a
Signed-off-by: Isaac J. Manjarres
Acked-by: Rob Herring
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948415/
25 Oct, 2019
10 commits
-
Add required header file to fix compiler reported errors.
BUG: 141169320
TEST: Build and bootFixes: 736036d73892 ("FROMLIST: drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs")
Signed-off-by: Maulik Shah
Change-Id: Ie1503213bdc7432f36d065f8487e71e37cfe8532 -
Copy reserved fields along with other fields in v4l2_plane
for userspace clients and drivers to use reserved fields
when required.Bug: 143160749
Change-Id: I0c7e7485961ab50188cda6ae81998473500bb07b
Signed-off-by: Maheshwar Ajja -
The of_devlink feature creates device links between devices based on
the common device tree bindings listed in their device node. This
allows improved probe ordering and also makes sure the sync_state()
calls to the device drivers come only after all the consumers of a
device have probed successfully.Enable this by default on Android since this is required to ease
modularization efforts for GKI.Bug: 143308885
Signed-off-by: Saravana Kannan
Change-Id: I57c44e74e35d829ae2ae3145dc241ccf348f2eea -
When creating device links to proxy the sync_state() needs of child
dependencies, create SYNC_STATE_ONLY device links so that children
dependencies don't block probing of the parent.Also, differentiate between missing suppliers of parent device vs
missing suppliers of child devices so that driver core doesn't block
parent device probing when only child supplier dependencies are missing.Signed-off-by: Saravana Kannan
Bug: 142657042
Change-Id: Ifc63e36f6af6f48ec77215d0a2a609ff768e0fcb -
When add_links() still has suppliers that it needs to link to in the
future, this patch allows it to differentiate between suppliers that are
needed for probing vs suppliers are needed for sync_state() correctness.Signed-off-by: Saravana Kannan
Bug: 142657042
Change-Id: If8b2a11dc6d815287c9242aea0ee1c26ef316d96 -
Before this change, if a device is waiting on suppliers, it's assumed
that all those suppliers are needed for the device to probe
successfully. This change allows marking a devices as waiting only on
optional suppliers. This allows a device to wait on suppliers (and link
to them as soon as they are available) without preventing the device
from being probed.Signed-off-by: Saravana Kannan
Bug: 142657042
Change-Id: I86a764b67804ed889f17c55632e25d46a72912a8 -
Parent devices might need to create "proxy" device links from themselves
to supplier devices to make sure the supplier devices don't get a
sync_state() before the child consumer devices get a chance to add
device links to the supplier devices.However, the parent device has no real dependency on the supplier device
and probing, suspend/resume or runtime PM don't need to be affected by
the supplier device. To capture these cases, create a SYNC_STATE_ONLY
device link flag that only affects sync_state() behavior and doesn't
affect probing, suspend/resume or runtime PM.Signed-off-by: Saravana Kannan
Bug: 142657042
Change-Id: Ie709d3b6cd07ac9e09d1473fc0e0a21a8146a1dc -
The sync_state() driver callback was added recently, but the
documentation was missing. Adding it now.Signed-off-by: Saravana Kannan
Link: https://lore.kernel.org/r/20191011191521.179614-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-pick from commit a3caeb8ffe5d2bbe01da66081f0ef28c26302d99
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I7ee9c61be93fb247759dbd6d90214c6994fe1bb0 -
The add_links() ops shouldn't return on the first failed device link
add. It needs to continue trying to add device links to other suppliers
that are available. The documentation didn't explain WHY this behavior
is necessary. So, update the documentation with an example that explains
why this is necessary.Signed-off-by: Saravana Kannan
Link: https://lore.kernel.org/r/20191011191521.179614-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-pick from commit 92df01e3601fe29eb3727a82705eafa6209053f5
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I58621ad08084fee1ab9725026e54abe7eb79b741 -
Better variable and function names. Remove "," after the sentinel in an
array initialization list.Signed-off-by: Saravana Kannan
Acked-by: Rob Herring
Link: https://lore.kernel.org/r/20191011191521.179614-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman(cherry-picked from commit af1b967af5ffb94aaed5b9b3259349cc2d398fa7
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Conflicts: drivers/of/property.c
[Fixed minor conflict due to 87337fb791b2fad85f6316ea6a31f5a9c0b2f50d]
Bug: 142657042
Change-Id: I86356be325b17676452b9ad93fe4a96235dbef0b
Signed-off-by: Saravana Kannan
24 Oct, 2019
24 commits
-
Some GPIOs are marked as wakeup capable and are routed to another
interrupt controller that is an always-domain and can detect interrupts
even most of the SoC is powered off. The wakeup interrupt controller
wakes up the GIC and replays the interrupt at the GIC.Setup the TLMM irqchip in hierarchy with the wakeup interrupt controller
and ensure the wakeup GPIOs are handled correctly.Signed-off-by: Maulik Shah
Signed-off-by: Lina IyerBUG: 141169320
TEST: Build and bootChange-Id: Ic37caf65e5d384234d8197d27b3d62cefa2bea7f
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145345 -
Add irqchip calls to set/get interrupt state from the parent interrupt
controller. When GPIOs are renabled as interrupt lines, it is desirable
to clear the interrupt state at the GIC. This avoids any unwanted
interrupt as a result of stale pending state recorded when the line was
used as a GPIO.Signed-off-by: Maulik Shah
[updated commit text]
Signed-off-by: Lina IyerBUG: 141169320
TEST: Build and bootChange-Id: Ie0042161727f2c8b1ebe0dd2165cbc4f20612f30
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145349 -
On certain QTI chipsets some GPIOs are direct-connect interrupts to the
GIC to be used as regular interrupt lines. When the GPIOs are not used
for interrupt generation the interrupt line is disabled. But disabling
the interrupt at GIC does not prevent the interrupt to be reported as
pending at GIC_ISPEND. Later, when drivers call enable_irq() on the
interrupt, an unwanted interrupt occurs.Introduce get and set methods for irqchip's parent to clear it's pending
irq state. This then can be invoked by the GPIO interrupt controller on
the parents in it hierarchy to clear the interrupt before enabling the
interrupt.Signed-off-by: Maulik Shah
[updated commit text and minor code fixes]
Signed-off-by: Lina IyerBUG: 141169320
TEST: Build and bootChange-Id: I8c849f89bebca892fc8a5c94f1ca9492f2a9d49c
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145351 -
GPIOs that can be configured as wakeup are routed to the PDC wakeup
interrupt controller and from there to the GIC interrupt controller. On
some QCOM SoCs, the interface to the GIC for wakeup capable GPIOs have
additional hardware registers that need to be configured as well to
match the trigger type of the GPIO. This register interfaces the PDC to
the GIC and therefore updated from the PDC driver.Typically, the firmware intializes the interface registers for the
wakeup capable GPIOs with commonly used GPIO trigger type, but it is
possible that a platform may want to use the GPIO differently. So, in
addition to configuring the PDC, configure the interface registers as
well.Signed-off-by: Lina Iyer
BUG: 141169320
TEST: Build and bootChange-Id: I73250a04f67549dbf75c40b3672b6b1b78ff8adb
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145353 -
In addition to configuring the PDC, additional registers that interface
the GIC have to be configured to match the GPIO type. The registers on
some QCOM SoCs are access restricted, while on other SoCs are not. They
SoCs with access restriction to these SPI registers need to be written
from the firmware using the SCM interface. Add a flag to indicate if the
register is to be written using SCM interface.Cc: devicetree@vger.kernel.org
Signed-off-by: Lina Iyer
Reviewed-by: Rob HerringBUG: 141169320
TEST: Build and bootChange-Id: I0f6dfc11fc4df4b0744b7c9372eaf4c7be3a82d6
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145355 -
Some interrupt controllers in a SoC, are always powered on and have a
select interrupts routed to them, so that they can wakeup the SoC from
suspend. Add wakeup-parent DT property to refer to these interrupt
controllers.Cc: devicetree@vger.kernel.org
Signed-off-by: Lina Iyer
Reviewed-by: Rob Herring
Reviewed-by: Linus WalleijBUG: 141169320
TEST: Build and bootChange-Id: Idf50e6db657e9d08e369878c261c0d781523ce35
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145359 -
Introduce a new domain for wakeup capable GPIOs. The domain can be
requested using the bus token DOMAIN_BUS_WAKEUP. In the following
patches, we will specify PDC as the wakeup-parent for the TLMM GPIO
irqchip. Requesting a wakeup GPIO will setup the GPIO and the
corresponding PDC interrupt as its parent.Co-developed-by: Stephen Boyd
Signed-off-by: Stephen Boyd
Signed-off-by: Lina IyerBUG: 141169320
TEST: Build and bootChange-Id: Iaec0f39c86776d3f8cebe869c4ccaaba541c7ad5
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145357 -
When an interrupt is to be serviced, the convention is to mask the
interrupt at the chip and unmask after servicing the interrupt. Enabling
and disabling the interrupt at the PDC irqchip causes an interrupt storm
due to the way dual edge interrupts are handled in hardware.Skip configuring the PDC when the IRQ is masked and unmasked, instead
use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE
register at the PDC. The PDC's IRQ_ENABLE register is only used during
the monitoring mode when the system is asleep and is not needed for
active mode detection.Signed-off-by: Lina Iyer
BUG: 141169320
TEST: Build and bootChange-Id: Ia5827a509bfb47aaa18ed0ea8f61c74f643fa91f
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145361 -
Newer SoCs have increased the number of interrupts routed to the PDC
interrupt controller. Update the definition of max PDC interrupts.Signed-off-by: Lina Iyer
BUG: 141169320
TEST: Build and bootChange-Id: I97f548fcd42a5fef63b8f8cbea9470e83f5e8e3e
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145363 -
A single controller can handle normal interrupts and wake-up interrupts
independently, with a different numbering space. It is thus crucial to
allow the driver for such a controller discriminate between the two.A simple way to do so is to tag the wake-up irqdomain with a "bus token"
that indicates the wake-up domain. This slightly abuses the notion of
bus, but also radically simplifies the design of such a driver. Between
two evils, we choose the least damaging.Suggested-by: Stephen Boyd
Signed-off-by: Lina IyerBUG: 141169320
TEST: Build and bootChange-Id: I0fd6ccc288d1aa840d88392e5f57197c1e8d1afb
Signed-off-by: Maulik Shah
Link: https://patchwork.kernel.org/patch/11145365 -
This is only valid in repo checkouts and caused issues when rebasing on
top. Hence drop it for now until a better solution can be found.Change-Id: If06560c131a57f2e6d82966f9adf3ca628b2468a
Signed-off-by: Matthias Maennich -
This reverts commit 7eb28048b00a3c1ee5cf29b6e416eaf61e79d705.
Change-Id: Ibb4775f9d11d5a5e413204855f8ccbcad6777b3d
Signed-off-by: Matthias Maennich -
Use the fscrypt key removal notifier chain to make sdcardfs evict its
dentries when an fscrypt key is about to be removed. This is needed for
the FS_IOC_REMOVE_ENCRYPTION_KEY ioctl to properly "lock" the encrypted
files underneath sdcardfs when an Android user is stopped.Test: pm create-user 10
am start-user 10
find /data/media/10/ # filenames are in plaintext form
am stop-user 10
find /data/media/10/ # filenames are in ciphertext form(But currently the kernel and vold still warn about other files
still being open, due to b/140762419)Bug: 120446149
Bug: 142275883
Change-Id: I83b451a2bc40c72fcd01d24aa5c34ad8de427534
Signed-off-by: Eric Biggers -
Add a notifier chain so that sdcardfs can evict its dentries when an
fscrypt key is about to be removed. This is needed for the
FS_IOC_REMOVE_ENCRYPTION_KEY ioctl to properly "lock" the encrypted
files underneath sdcardfs when an Android user is stopped.This is meant to be a temporary patch carried as part of the sdcardfs
patchset until either we stop using sdcardfs, we get sdcardfs upstream,
or we find a way to provide what sdcardfs needs while also benefitting a
user upstream.Bug: 120446149
Bug: 142275883
Test: see I83b451a2bc40c72fcd01d24aa5c34ad8de427534
Change-Id: Iec79775a71057d05a371d77da4a6541cb8e09cb7
Signed-off-by: Eric Biggers -
It causes BUG because remove_proc_entry may sleep while holding spinlock.
BUG: scheduling while atomic: ip6tables-resto/887/0x00000202
[] (wait_for_completion) from [] (proc_entry_rundown+0x74/0xd0)
[] (proc_entry_rundown) from [] (remove_proc_entry+0xc0/0x18c)
[] (remove_proc_entry) from [] (quota_mt2_destroy+0x88/0xa8)
[] (quota_mt2_destroy) from [] (cleanup_entry+0x6c/0xf0)
[] (cleanup_entry) from [] (do_replace.constprop.2+0x314/0x438)
[] (do_replace.constprop.2) from [] (do_ip6t_set_ctl+0x11c/0x238)
[] (do_ip6t_set_ctl) from [] (nf_setsockopt+0xd4/0xf0)
[] (nf_setsockopt) from [] (ipv6_setsockopt+0x90/0xb8)
[] (ipv6_setsockopt) from [] (rawv6_setsockopt+0x54/0x22c)
[] (rawv6_setsockopt) from [] (sock_common_setsockopt+0x28/0x30)
[] (sock_common_setsockopt) from [] (SyS_setsockopt+0xb8/0x110)
[] (SyS_setsockopt) from [] (ret_fast_syscall+0x0/0x48)This is a fix for an Android specific feature which was imported
from unofficial upstream (xtables-addons), which also has the same issue:
https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l235After this change the proc entry may now be removed later, when we're already
adding another one, potentially with the same name, this will simply
fail during creation, see error path for this at:
https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l179Bug: 143092160
Signed-off-by: Maciej Żenczykowski
Signed-off-by: DongJoo Kim
Change-Id: I3ff3883738353785f5792c5f06bf6b72985c4c68 -
Enable hidden MMC configs via CONFIG_GKI_HACKS_TO_FIX
Bug: 142268770
Change-Id: Ibaba180c46708f1213055f44523b9e7b45eefee6
Signed-off-by: John Stultz -
Enable hidden QCOM configs via CONFIG_GKI_HACKS_TO_FIX
Bug: 142268770
Change-Id: I99e9a05ac631843dafcf33e9b4ceb8e54e40c117
Signed-off-by: John Stultz -
SND_PCM_ELD is used by DRM drivers for HDMI audio,
so add it to the HIDDEN_DRM configs.Bug: 142268770
Change-Id: I914beef34b2cf5174da76a5d1a4d443117f1b687
Signed-off-by: John Stultz -
Add SND_PCM_IEC958 to GKI_HIDDEN_SND_SOC_CONFIGS
Bug: 142268770
Change-Id: I0927c00ef476cb232a8f6c87534cadea62d4a21a
Signed-off-by: John Stultz -
Add REGMAP_MMIO to GKI_HIDDEN_REGMAP_CONFIGS
Bug: 142268770
Change-Id: I7e67afbd67f31b853abc3a4f7ba596b82a5febef
Signed-off-by: John Stultz -
Re-add "x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation"
This reverts commit 2c7164851ef24079bee51560a19ba10addc453b0.Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah
Change-Id: I74ea8dcb2f5c3661dc1657eb53872375aa9e6753 -
Re-add "x86/uaccess: Don't leak the AC flag into __put_user() value evaluation"
This reverts commit a4bd9e975e0ea28242401200a4c2fd618aa2be9d.Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah
Change-Id: Iebfe5df8e2e09b6eeeaae343ec6deeda7f45c975 -
Re-add "Use __put_user_goto in __put_user_size() and unsafe_put_user()"
This reverts commit 7a71617410d6dbc89c66b9ee0166381a2b3b60b4.Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah
Change-Id: Ife28957c3e9f4e6a44d8e02bc43d683701953369 -
Re-add "x86 uaccess: Introduce __put_user_goto"
This reverts commit 60f8cf9e65c98558d0fc76334b17688a8e396c8d.Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah
Change-Id: I1c5ca6ac430694cb46bb8b408e60338e88cbffd6