Commit Graph

872024 Commits

Author SHA1 Message Date
Saravana Kannan
f4d0973e4f ANDROID: of: property: Enable of_devlink by default
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 <saravanak@google.com>
Change-Id: I57c44e74e35d829ae2ae3145dc241ccf348f2eea
2019-10-24 15:48:48 -07:00
Saravana Kannan
454aa2ae22 ANDROID: of: property: Make sure child dependencies don't block probing of parent
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 <saravanak@google.com>
Bug: 142657042
Change-Id: Ifc63e36f6af6f48ec77215d0a2a609ff768e0fcb
2019-10-24 20:54:20 +00:00
Saravana Kannan
5415ddfa94 ANDROID: driver core: Allow fwnode_operations.add_links to differentiate errors
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 <saravanak@google.com>
Bug: 142657042
Change-Id: If8b2a11dc6d815287c9242aea0ee1c26ef316d96
2019-10-24 20:54:01 +00:00
Saravana Kannan
b713505f71 ANDROID: driver core: Allow a device to wait on optional suppliers
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 <saravanak@google.com>
Bug: 142657042
Change-Id: I86a764b67804ed889f17c55632e25d46a72912a8
2019-10-24 20:53:40 +00:00
Saravana Kannan
603dbeabed ANDROID: driver core: Add device link support for SYNC_STATE_ONLY flag
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 <saravanak@google.com>
Bug: 142657042
Change-Id: Ie709d3b6cd07ac9e09d1473fc0e0a21a8146a1dc
2019-10-24 20:53:27 +00:00
Saravana Kannan
2d4a45a838 FROMGIT: docs: driver-model: Add documentation for sync_state
The sync_state() driver callback was added recently, but the
documentation was missing.  Adding it now.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20191011191521.179614-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-pick from commit a3caeb8ffe
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I7ee9c61be93fb247759dbd6d90214c6994fe1bb0
2019-10-24 20:53:16 +00:00
Saravana Kannan
0e7ec28830 FROMGIT: driver: core: Improve documentation for fwnode_operations.add_links()
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 <saravanak@google.com>
Link: https://lore.kernel.org/r/20191011191521.179614-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-pick from commit 92df01e360
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I58621ad08084fee1ab9725026e54abe7eb79b741
2019-10-24 20:53:03 +00:00
Saravana Kannan
e8f92ffd70 FROMGIT: of: property: Minor code formatting/style clean ups
Better variable and function names. Remove "," after the sentinel in an
array initialization list.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20191011191521.179614-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry-picked from commit af1b967af5
 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 87337fb791]
Bug: 142657042
Change-Id: I86356be325b17676452b9ad93fe4a96235dbef0b
Signed-off-by: Saravana Kannan <saravanak@google.com>
2019-10-24 20:52:47 +00:00
Lina Iyer
a59c2b6675 FROMLIST: drivers: pinctrl: msm: setup GPIO chip in hierarchy
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 <mkshah@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ic37caf65e5d384234d8197d27b3d62cefa2bea7f
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145345
2019-10-24 15:31:30 +00:00
Maulik Shah
25a0afd115 FROMLIST: drivers: irqchip: pdc: Add irqchip set/get state calls
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 <mkshah@codeaurora.org>
[updated commit text]
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ie0042161727f2c8b1ebe0dd2165cbc4f20612f30
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145349
2019-10-24 15:31:22 +00:00
Maulik Shah
2d4940748d FROMLIST: genirq: Introduce irq_chip_get/set_parent_state calls
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 <mkshah@codeaurora.org>
[updated commit text and minor code fixes]
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I8c849f89bebca892fc8a5c94f1ca9492f2a9d49c
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145351
2019-10-24 15:31:14 +00:00
Lina Iyer
97b1fe8e66 FROMLIST: drivers: irqchip: pdc: additionally set type in SPI config registers
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 <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I73250a04f67549dbf75c40b3672b6b1b78ff8adb
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145353
2019-10-24 15:31:06 +00:00
Lina Iyer
0c347bec82 FROMLIST: dt-bindings/interrupt-controller: pdc: add SPI config register
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 <ilina@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I0f6dfc11fc4df4b0744b7c9372eaf4c7be3a82d6
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145355
2019-10-24 15:30:57 +00:00
Lina Iyer
18af63b34e FROMLIST: of: irq: document properties for wakeup interrupt parent
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 <ilina@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Idf50e6db657e9d08e369878c261c0d781523ce35
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145359
2019-10-24 15:30:47 +00:00
Lina Iyer
736036d738 FROMLIST: drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs
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 <swboyd@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Iaec0f39c86776d3f8cebe869c4ccaaba541c7ad5
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145357
2019-10-24 15:30:31 +00:00
Lina Iyer
8c77c18adc FROMLIST: drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask
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 <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ia5827a509bfb47aaa18ed0ea8f61c74f643fa91f
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145361
2019-10-24 15:30:20 +00:00
Lina Iyer
68bb4012e2 FROMLIST: drivers: irqchip: qcom-pdc: update max PDC interrupts
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 <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I97f548fcd42a5fef63b8f8cbea9470e83f5e8e3e
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145363
2019-10-24 15:30:08 +00:00
Lina Iyer
808a504f39 FROMLIST: irqdomain: add bus token DOMAIN_BUS_WAKEUP
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 <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I0fd6ccc288d1aa840d88392e5f57197c1e8d1afb
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145365
2019-10-24 15:29:50 +00:00
Matthias Maennich
301b74470d ANDROID: drop patches/ symbolic link
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 <maennich@google.com>
2019-10-24 09:48:15 +01:00
Matthias Maennich
780450bc36 ANDROID: Revert "ANDROID: Removed check for asm-goto"
This reverts commit 7eb28048b0.

Change-Id: Ibb4775f9d11d5a5e413204855f8ccbcad6777b3d
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-23 21:55:48 +00:00
Eric Biggers
2b6ff0224c ANDROID: sdcardfs: evict dentries on fscrypt key removal
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 <ebiggers@google.com>
2019-10-23 21:19:54 +00:00
Eric Biggers
98261f39e9 ANDROID: fscrypt: add key removal notifier chain
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 <ebiggers@google.com>
2019-10-23 21:19:43 +00:00
DongJoo Kim
91e5e077d8 ANDROID: move up spin_unlock_bh() ahead of remove_proc_entry()
It causes BUG because remove_proc_entry may sleep while holding spinlock.

BUG: scheduling while atomic: ip6tables-resto/887/0x00000202
[<c0f03f00>] (wait_for_completion) from [<c031b8c8>] (proc_entry_rundown+0x74/0xd0)
[<c031b854>] (proc_entry_rundown) from [<c03225c4>] (remove_proc_entry+0xc0/0x18c)
[<c0322504>] (remove_proc_entry) from [<c0d656e0>] (quota_mt2_destroy+0x88/0xa8)
[<c0d65658>] (quota_mt2_destroy) from [<c0e405f0>] (cleanup_entry+0x6c/0xf0)
[<c0e40584>] (cleanup_entry) from [<c0e41400>] (do_replace.constprop.2+0x314/0x438)
[<c0e410ec>] (do_replace.constprop.2) from [<c0e41640>] (do_ip6t_set_ctl+0x11c/0x238)
[<c0e41524>] (do_ip6t_set_ctl) from [<c0d2e7ec>] (nf_setsockopt+0xd4/0xf0)
[<c0d2e718>] (nf_setsockopt) from [<c0e16bb8>] (ipv6_setsockopt+0x90/0xb8)
[<c0e16b28>] (ipv6_setsockopt) from [<c0e1e908>] (rawv6_setsockopt+0x54/0x22c)
[<c0e1e8b4>] (rawv6_setsockopt) from [<c0cb48dc>] (sock_common_setsockopt+0x28/0x30)
[<c0cb48b4>] (sock_common_setsockopt) from [<c0cb3ac8>] (SyS_setsockopt+0xb8/0x110)
[<c0cb3a10>] (SyS_setsockopt) from [<c01094e0>] (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#l235

After 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#l179

Bug: 143092160
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: DongJoo Kim <micomx@gmail.com>
Change-Id: I3ff3883738353785f5792c5f06bf6b72985c4c68
2019-10-23 21:17:30 +00:00
John Stultz
a025c3a713 ANDROID: Kconfig.gki: Add hidden MMC config support
Enable hidden MMC configs via CONFIG_GKI_HACKS_TO_FIX

Bug: 142268770
Change-Id: Ibaba180c46708f1213055f44523b9e7b45eefee6
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:14:26 +00:00
John Stultz
612b6ac9ff ANDROID: Kconfig.gki: Add Hidden QCOM configs
Enable hidden QCOM configs via CONFIG_GKI_HACKS_TO_FIX

Bug: 142268770
Change-Id: I99e9a05ac631843dafcf33e9b4ceb8e54e40c117
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:14:19 +00:00
John Stultz
26a9b13fee ANDROID: Kconfig.gki: Add SND_PCM_ELD to HIDDEN_DRM configs
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 <john.stultz@linaro.org>
2019-10-23 21:14:12 +00:00
John Stultz
b4750d3d2c ANDROID: Kconfig.gki: Add extra audio selections
Add SND_PCM_IEC958 to GKI_HIDDEN_SND_SOC_CONFIGS

Bug: 142268770
Change-Id: I0927c00ef476cb232a8f6c87534cadea62d4a21a
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:13:59 +00:00
John Stultz
146dc14c33 ANDROID: Kconfig.gki: Add extra GKI_HIDDEN_REGMAP_CONFIGS selections
Add REGMAP_MMIO to GKI_HIDDEN_REGMAP_CONFIGS

Bug: 142268770
Change-Id: I7e67afbd67f31b853abc3a4f7ba596b82a5febef
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:13:50 +00:00
Ram Muthiah
5a7b085e71 ANDROID: Four part re-add of asm-goto usage [4/4]
Re-add "x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation"
This reverts commit 2c7164851e.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I74ea8dcb2f5c3661dc1657eb53872375aa9e6753
2019-10-23 20:53:53 +00:00
Ram Muthiah
265694b7ec ANDROID: Four part re-add of asm-goto usage [3/4]
Re-add "x86/uaccess: Don't leak the AC flag into __put_user() value evaluation"
This reverts commit a4bd9e975e.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: Iebfe5df8e2e09b6eeeaae343ec6deeda7f45c975
2019-10-23 20:53:31 +00:00
Ram Muthiah
a6e5c4faab ANDROID: Four part re-add of asm-goto usage [2/4]
Re-add "Use __put_user_goto in __put_user_size() and unsafe_put_user()"
This reverts commit 7a71617410.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: Ife28957c3e9f4e6a44d8e02bc43d683701953369
2019-10-23 20:53:17 +00:00
Ram Muthiah
692cc83d7c ANDROID: Four part re-add of asm-goto usage [1/4]
Re-add "x86 uaccess: Introduce __put_user_goto"
This reverts commit 60f8cf9e65.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I1c5ca6ac430694cb46bb8b408e60338e88cbffd6
2019-10-23 20:53:03 +00:00
Matthias Maennich
ce42ef68b9 ANDROID: Move out patches/ and replace by link to kernel/common-patches project
Change-Id: Ie9df0ea6933b34a1b97f5034bb8c6a913b079e08
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-23 20:19:34 +00:00
Raghavendra Rao Ananta
3fde1dfb00 ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux"
This reverts commit e070355664, reversing
changes made to 8808cf8cbc.

Introducing symbol-namespaces into the kernel has caused issues with
respect to the ABI checker. Hence, revert the changes until a valid
fix is available. The revert was done based off of 5.4-rc1.

Change-Id: I529ced269661f457ce667a76eb383843002f0a7d
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2019-10-23 12:04:25 +00:00
Ram Muthiah
6ce0937faa ANDROID: Move from clang r353983c to r365631c
Bug: 139440459
Test: BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
Test: BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Change-Id: I7ee5d9a687843c09bbc5edb591d3337bd5bfbcbc
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2019-10-22 17:59:02 +00:00
Saravana Kannan
87337fb791 ANDROID: of/property: Add device link support for iommus
Add support for parsing iommus DT property to create device links
between IOMMU suppliers and their consumers.

Bug: 140290589
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I7aa1b4315010fa5f3dc49c0903d164478ecdd1a7
2019-10-22 17:18:19 +00:00
Matthias Maennich
12c7af34c3 ANDROID: quilt series: drop cuttlefish config changes
Filter out all modifications to arch/*/configs/*cuttlefish_defconfig and
build.config.cuttlefish.*. They got deleted eventually. No need to
maintain them in the series any longer.

Change-Id: I288ddab3482f8e23e3745d0e8972612a1a413f47
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-22 14:47:59 +01:00
Matthias Maennich
ada6a39de0 ANDROID: quilt series: add missing ANDROID: tags
Change-Id: Icaf0ad10a2552a1e7c69f9e21841d84205a7b41e
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-22 14:19:17 +01:00
Matthias Maennich
867c8c8cff ANDROID: quilt series cleanup: drop obsolete patches
- drivers: qcom: rpmh-rsc: modularize RSC controller driver
 - its revert

Change-Id: I2c12ebf20be032d8fbedf2b792da6b85e62deba3
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-22 13:40:09 +01:00
Matthias Maennich
4e4e0a14a1 ANDROID: add latest patches to quilt series
up to 06dc94f19d ("ANDROID: sched: Honor sync flag for energy-aware wakeups")

Change-Id: Ic808532ca712428d0716b9fd6cc5fd168d9d0db1
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-22 13:39:50 +01:00
Chris Redpath
06dc94f19d ANDROID: sched: Honor sync flag for energy-aware wakeups
Since we don't do energy-aware wakeups when we are overutilized, always
honoring sync wakeups in this state does not prevent wake-wide mechanics
overruling the flag as normal.

Having the check for (cpu_rq(cpu)->nr_running == 1) in the test condition
means that we only bypass the energy model for sync wakeups where the
cpu is about to become idle. This matches the use of this flag in Binder
which is the main place where sync wakeups come from in Android.

This patch is based upon previous work to build EAS for android products.
It replaces
commit 79e3a4a27e ("ANDROID: sched: Unconditionally honor sync flag
 for energy-aware wakeups")
in what's considered to be 'EAS'.

sync-hint code taken from wahoo
https://android.googlesource.com/kernel/msm/+/4a5e890ec60d
written by Juri Lelli <juri.lelli@arm.com>

Change-Id: I4b3d79141fc8e53dc51cd63ac11096c2e3cb10f5
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
(cherry-picked from commit f1ec666a62de)
[ Moved the feature to find_energy_efficient_cpu() and removed the
  sysctl knob ]
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
[ Add 'cpu_rq(cpu)->nr_running == 1' to the condition and remove the
  word 'Unconditionally' from the patch name ]
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
2019-10-22 09:04:43 +00:00
Ram Muthiah
071bdb6cdb ANDROID: gki_defconfig: remove PWRSEQ_EMMC and PWRSEQ_SIMPLE
These modules are not required for GKI.

Bug: 139431025
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I9a82010eb326b0a336725037e0356a63a0c9f053
2019-10-21 19:10:47 +00:00
Steve Muckle
b19c4dfb4b ANDROID: unconditionally compile sig_ok in struct module
The generic kernel image must have module signing disabled so it can
load kernel modules from all vendors. Unfortunately loading a signed
kernel module into a kernel with module signing disabled will fail
because struct module_layout (which appears in kernel modules) contains
struct module, and struct module contains the sig_ok field, which is
conditionally compiled depending on CONFIG_MODULE_SIG (module signing).

Unconditionally compile the sig_ok field to work around this problem.

Bug: 135940219
Test: load a signed kernel module with module signing disabled
Change-Id: I5cc437c806f74f89c0e45ce4135136ca0c70738e
Signed-off-by: Steve Muckle <smuckle@google.com>
2019-10-18 18:11:18 +00:00
Matthias Maennich
b4b23f08d8 ANDROID: add latest patches to quilt series
up to 1caeb408f5 ("UPSTREAM: base: soc: Handle custom soc information sysfs entries")

Change-Id: I070748e45a9ffbdd0fdba43fe56b99db90a10b08
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-18 16:40:14 +00:00
Matthias Maennich
ce235d4c0b ANDROID: rebase mainline quilt series on v5.4-rc3
Change-Id: I917caccc57d47427e423e359837ec94a7ed7be06
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-18 16:40:02 +00:00
Matthias Maennich
58d52a4f16 ANDROID: regenerate quilt series
Programmatically regenerate the quilt series for consistency.

Also, this programmatically cleans up the patches as they are freshly
extracted from git and committed without any further modification.

Change-Id: I7e972756b002b6b9966bf0c8a0f3d7a58117206e
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-18 16:39:30 +00:00
Murali Nalajala
1caeb408f5 UPSTREAM: base: soc: Handle custom soc information sysfs entries
Soc framework exposed sysfs entries are not sufficient for some
of the h/w platforms. Currently there is no interface where soc
drivers can expose further information about their SoCs via soc
framework. This change address this limitation where clients can
pass their custom entries as attribute group and soc framework
would expose them as sysfs properties.

Bug: 141190076
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1570480662-25252-1-git-send-email-mnalajal@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-picked from c31e73121f)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia1c8d697e29052b4503da7c4b30c2c97d3b697f7
2019-10-17 13:15:53 -07:00
Greg Kroah-Hartman
630839ac24 Merge 5.4-rc3 into android-mainline
Linux 5.4-rc3

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia87ba662738dd58ddb917e32c1fbd812861e7a46
2019-10-17 05:28:13 -07:00
Eric Biggers
3048eb686b ANDROID: gki_defconfig: enable fs-verity
fs-verity will be used for APK verification in R.

Bug: 142494008
Change-Id: Ia18eb35fcdbccabab47de5fb26daba455fc1eb77
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-10-16 17:51:04 +00:00
David Dai
8e79a4a2ed clk: add pre and post change rate callbacks
There are scenarios where a rate change could result in a configuration
change for both the targeted clock and its parent.

For example, setting the rate for a clock could require both slewing its parent
PLL as well as adjusting the clock's divider values. Due to the fact that
rate change propagation always occurs from parent to child, we could exceed
the allowed operating frequencies for the clock as the parent slews to a higher
frequency before increasing the downstream divider.

Add a pre change call back which allows the clock to adjust its divider
appropriately before any rate change has occurred from its parents to ensure
that the clock's requirements are always within safe frequencies during parent
rate changes. The symmetrical post change call back handles the scenario where
the divider adjusts to a lower value and can only be safely adjusted after the
parent rate changes.

Change-Id: I4f8cf9df6fc256d065599de86a34cf99eae4d853
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-10-15 15:09:00 -07:00