Commit Graph

798587 Commits

Author SHA1 Message Date
Banajit Goswami
e000f4e8d5 ANDROID: GKI: ASoC: soc-core: export function to find components
Drivers may need to use the ASoC core function to
find out whether a particular component is already
registered with ALSA core or not.
Export the function so that drivers can use it outside
of the file.

Bug: 151372815
Test: build
Change-Id: I13e4a053de085974b0b53c392a9453e46f1aa66d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
(cherry picked from commit fbcf71fe2dadcfbfe6b60f49534dd0312fd3b9d6)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-07 11:05:17 -07:00
Hridya Valsaraju
9159a8134c ANDROID: GKI: thermal: thermal_sys: Add configurable thermal trip points.
Modify enum thermal_trip_type to add configurable thermal
trip points of THERMAL_TRIP_CONFIGURABLE_HI,
THERMAL_TRIP_CONFIGURABLE_LOW, and THERMAL_TRIP_CRITICAL_LOW.

Bug: 149945768
Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
(cherry picked from commit 3f67fe6c0a924f23ba19033a0f55b7d82e268926)
[hridya: commit amended to only include ABI diff].
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-07 11:05:17 -07:00
Eric Biggers
b30501efe9 ANDROID: fscrypt: fall back to filesystem-layer crypto when needed
When the filesystem is mounted with '-o inlinecrypt', make fscrypt fall
back to filesystem-layer crypto when inline crypto won't work, e.g. due
to the hardware not supporting the encryption algorithm.

When blk-crypto-fallback is disabled, this fixes '-o inlinecrypt' to not
break any fscrypt policies that would otherwise work.

This is needed for VtsKernelEncryptionTest to pass on some devices.

Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
      inline crypto patches backported, and also on Cuttlefish.
Change-Id: I3e730df4608efb12d7126d1a85faddcccb566764
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-07 17:57:41 +00:00
Eric Biggers
8f078b1b3a ANDROID: block: require drivers to declare supported crypto key type(s)
We need a way to tell which type of keys the inline crypto hardware
supports (standard, wrapped, or both), so that fallbacks can be used
when needed (either blk-crypto-fallback, or fscrypt fs-layer crypto).

We can't simply assume that

    keyslot_mgmt_ll_ops::derive_raw_secret == NULL

means only standard keys are supported and that

    keyslot_mgmt_ll_ops::derive_raw_secret != NULL

means that only wrapped keys are supported, because device-mapper
devices always implement this method.  Also, hardware might support both
types of keys.

Therefore, add a field keyslot_manager::features which contains a
bitmask of flags which indicate the supported types of keys.  Drivers
will need to fill this in.  This patch makes the UFS standard crypto
code set BLK_CRYPTO_FEATURE_STANDARD_KEYS, but UFS variant drivers may
need to set BLK_CRYPTO_FEATURE_WRAPPED_KEYS instead.

Then, make keyslot_manager_crypto_mode_supported() take the key type
into account.

Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
      inline crypto patches backported, and also on Cuttlefish.
Change-Id: Ied846c2767c1fd2f438792dcfd3649157e68b005
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-07 17:57:33 +00:00
Eric Biggers
ce1ccfb9ef ANDROID: block: make blk_crypto_start_using_mode() properly check for support
If blk-crypto-fallback is needed but is disabled by kconfig, make
blk_crypto_start_using_mode() return an error rather than succeeding.
Use ENOPKG, which matches the error code used by fscrypt when crypto API
support is missing with fs-layer encryption.

Also, if blk-crypto-fallback is needed but the algorithm is missing from
the kernel's crypto API, change the error code from ENOENT to ENOPKG.

This is needed for VtsKernelEncryptionTest to pass on some devices.

Bug: 137270441
Bug: 151100202
Test: 'atest vts_kernel_encryption_test' on Pixel 4 with the
      inline crypto patches backported, and also on Cuttlefish.
Change-Id: Iedf00ca8e48c74a5d4c40b12712f38738a04ef11
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-07 17:57:24 +00:00
Mark Salyzyn
0134f3d545 ANDROID: GKI: power: supply: format regression
Build error results in excess arguments provided from
commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4
("power_supply: support for CHARGE_DISABLE")

Change introduced in partial cherry pick of the above in
commit 2d02a30a0b896e6ab970837cf54477550c34c31a
("ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CHARGE_DISABLE")

Removed excess unused argument.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Cc: AleX Pelosi <apelosi@google.com>
Cc: Jack Wu <wjack@google.com>
Bug: 150789066
Change-Id: I5be743eecffa0be7b8ec4969963f0a283f5684c5
2020-04-07 17:08:46 +00:00
Subbaraman Narayanamurthy
9cbe2f0b9b ANDROID: GKI: kobject: increase number of kobject uevent pointers to 64
Power supply framework uses uevents to notify the power supply
change events to the userspace. Some power supplies have their
properties increasing thus overflowing the number of kobject
uevent pointers, triggering warning shown below.

[   10.577545] WARNING: CPU: 3 PID: 406 at kernel/lib/kobject_uevent.c:393 add_uevent_var+0xc0/0x100()
[   10.589680] add_uevent_var: too many keys
[   10.593809] Modules linked in:
[   10.596686] CPU: 3 PID: 406 Comm: kworker/3:2 Tainted: G        W      3.18.20-g5e99605-00057-gd18285f #603
[   10.606373] Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 MTP (DT)
[   10.614188] Workqueue: events power_supply_changed_work
[   10.619366] Call trace:
[   10.621803] [<ffffffc00008881c>] dump_backtrace+0x0/0x130
[   10.627175] [<ffffffc00008895c>] show_stack+0x10/0x1c
[   10.632237] [<ffffffc000cc4d00>] dump_stack+0x74/0xb8
[   10.637253] [<ffffffc0000a0fec>] warn_slowpath_common+0x90/0xb8
[   10.643170] [<ffffffc0000a1060>] warn_slowpath_fmt+0x4c/0x58
[   10.648814] [<ffffffc00031121c>] add_uevent_var+0xbc/0x100
[   10.654259] [<ffffffc0003116f8>] kobject_uevent_env+0x498/0x5a8
[   10.660185] [<ffffffc000311814>] kobject_uevent+0xc/0x18
[   10.665457] [<ffffffc0007fd3c0>] power_supply_changed_work+0xb0/0xf0
[   10.671830] [<ffffffc0000b617c>] process_one_work+0x23c/0x3f4
[   10.677529] [<ffffffc0000b7338>] worker_thread+0x280/0x3a8
[   10.683017] [<ffffffc0000bb384>] kthread+0xe0/0xec

Fix this warning by increasing the number of kobject uevent
pointers from 32 to 64.

CRs-Fixed: 971954
Bug: 148872640
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
[saravanak Increase uevent buffer size too]
(cherry picked from commit d09cd0dd75f95acedd3fa63d67ca3fbc92d21272)
Change-Id: Ide942d25006abd36ba7be945be397a535e91d970
2020-04-07 06:07:41 +00:00
Ram Chandrasekar
7e9cfddda4 ANDROID: GKI: drivers: video: backlight: Fix ABI diff for struct backlight_device
The following members are added to struct backlight_device:
struct thermal_cooling_device *cdev;
int thermal_brightness_limit;
int usr_brightness_req;

Change-Id: I1405ddd6c3cfff99cd84842d3773851168dcfe78
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 6cd31b3ff45ab44f3624e9139a0602e3a1a6f9ea)
[connoro: commit amended to include only ABI diff]
Bug: 153189857
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-04-06 16:26:54 -07:00
Hemant Kumar
5dfdaa15ca ANDROID: GKI: usb: xhci: Add support for secondary interrupters
Implement APIs to dynamically allocate and free secondary
event rings based upon interrupter number. Also add exported
APIs in usb core layer which allows secondary event ring
management via remote processor entity.

Change-Id: I5ee7d44d6cad8e35e22d3c1a027a1eec5d208585
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit 8d48fb820fb849cee2474354f75ef5a78044bd19)
[connoro: squashed the following commits:
          a44f0d73af95 usb: xhci: Clear event handler busy flag upon
          event ring cleanup
          a1504b40da0e usb: xhci: Acknowledge pending events in
          secondary event ring
          a7e7dd8a3499 usb: host: xhci: Fix bound check for
          interrupter number
          c4d9817a3cc6 usb: core: Allow secondary event ring clean
          upon disconnect
          576c1e1fe65b usb: host: xhci: Fix secondary event ring
          setup]
Bug: 151258428
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-04-06 16:26:54 -07:00
Hemant Kumar
a6c834c026 ANDROID: GKI: usb: host: xhci: Add support for usb core indexing
Unique usb core id is used to differentiate between
different usb controllers.

[jackp@codeaurora.org: squashed with usb: host: Fix passing of
core-id property to xhci-plat]
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 4c874ac2de1e09d148aeb47362e89f60b2743280)
[connoro: commit amended to include only the ABI diff]
Signed-off-by: Connor O'Brien <connoro@google.com>
Bug: 151258428
Change-Id: I736d5a99f51820e562311c988ea9fd09b3e7117b
2020-04-06 16:26:54 -07:00
Connor O'Brien
a1b446aa69 ANDROID: gki_defconfig: enable USB_XHCI_HCD
set CONFIG_USB_HCI_HCD=y for arm64 and x86 gki defconfigs

Bug: 151258428
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I74e9a1fbc5efbbfacbe5046c1604afc05fad6bf9
2020-04-06 16:26:54 -07:00
Connor O'Brien
16bf78bd46 ANDROID: gki_defconfig: enable CONFIG_BRIDGE
Set CONFIG_BRIDGE=y for arm64 and x86 gki defconfigs

Bug: 151683251
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ifa34d56b2b8e497d3d696f8c80e137ffc4a93280
2020-04-06 16:26:54 -07:00
Suren Baghdasaryan
be4d1de13e ANDROID: GKI: Update ABI report
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void set_update_ipi_history_callback(void ()*)'

Bug: 152652820
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Id1882b5c611fdcae4d1e9a694d636d09973542a5
2020-04-06 20:50:40 +00:00
Will McVicker
8d3bea1aed ANDROID: GKI: arm64: smp: Add set_update_ipi_history_callback
Provide set_update_ipi_history_callback allowing modules to register
a callback for monitoring interrupt rescheduling events.

Bug: 147267745
Bug: 152652820
Test: compile
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit 356d92323654c149933fa0eacaba7ab464381f8e)
[surenb: resolve merge conflicts]
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icae6ba1f671967723667dc51f8337dbef03e89f3
2020-04-06 20:50:30 +00:00
Sami Tolvanen
166a538d15 ANDROID: kbuild: ensure __cfi_check is correctly aligned
On modules with no executable code, LLVM generates a __cfi_check stub,
but won't align it to page size as expected. This change ensures the
function is at the beginning of the .text section and correctly aligned
for the CFI shadow.

Bug: 148458318
Change-Id: I85ea31fa851bc23988f649b021b3ac7e9d9dcb38
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-04-06 20:34:01 +00:00
Eric Biggers
a898a4764c FROMLIST: kmod: make request_module() return an error when autoloading is disabled
It's long been possible to disable kernel module autoloading completely
(while still allowing manual module insertion) by setting
/proc/sys/kernel/modprobe to the empty string.  This can be preferable
to setting it to a nonexistent file since it avoids the overhead of an
attempted execve(), avoids potential deadlocks, and avoids the call to
security_kernel_module_request() and thus on SELinux-based systems
eliminates the need to write SELinux rules to dontaudit module_request.

However, when module autoloading is disabled in this way,
request_module() returns 0.  This is broken because callers expect 0 to
mean that the module was successfully loaded.

Apparently this was never noticed because this method of disabling
module autoloading isn't used much, and also most callers don't use the
return value of request_module() since it's always necessary to check
whether the module registered its functionality or not anyway.  But
improperly returning 0 can indeed confuse a few callers, for example
get_fs_type() in fs/filesystems.c where it causes a WARNING to be hit:

	if (!fs && (request_module("fs-%.*s", len, name) == 0)) {
		fs = __get_fs_type(name, len);
		WARN_ONCE(!fs, "request_module fs-%.*s succeeded, but still no fs?\n", len, name);
	}

This is easily reproduced with:

	echo > /proc/sys/kernel/modprobe
	mount -t NONEXISTENT none /

It causes:

	request_module fs-NONEXISTENT succeeded, but still no fs?
	WARNING: CPU: 1 PID: 1106 at fs/filesystems.c:275 get_fs_type+0xd6/0xf0
	[...]

This should actually use pr_warn_once() rather than WARN_ONCE(), since
it's also user-reachable if userspace immediately unloads the module.
Regardless, request_module() should correctly return an error when it
fails.  So let's make it return -ENOENT, which matches the error when
the modprobe binary doesn't exist.

I've also sent patches to document and test this case.

Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Jessica Yu <jeyu@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: NeilBrown <neilb@suse.com>
Link: https://lore.kernel.org/r/20200318230515.171692-2-ebiggers@kernel.org
Bug: 151589316
Change-Id: I5e04f85e12a4f85da23e53bc11da1ade565abcd6
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-06 10:44:34 -07:00
Hridya Valsaraju
77333590dd ANDROID: GKI: Update ABI report
Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 5 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function void of_thermal_handle_trip(thermal_zone_device*)'
  [A] 'function void of_thermal_handle_trip_temp(thermal_zone_device*, int)'

Test: build
Bug: 149945768
Bug: 151372815
Change-Id: Iee07955ae17b629010acef55686e94fd56f23342
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:28:09 -07:00
Hridya Valsaraju
cc7156f3c5 ANDROID: GKI: ARM64: dma-mapping: export symbol arch_setup_dma_ops
Fixes the following error on an allmodconfig build
ERROR: "arch_setup_dma_ops" [sound/soc/snd-soc-core.ko] undefined!

Bug: 151372815
Test: build
Change-Id: Id2fcb63664c8ac8879f2cf654ac1424577c46709
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Hridya Valsaraju
195bdb8112 ANDROID: GKI: ARM: dma-mapping: export symbol arch_setup_dma_ops
Fixes the following error on an allmodconfig build
ERROR: "arch_setup_dma_ops" [sound/soc/snd-soc-core.ko] undefined!

Bug: 151372815
Test: build
Change-Id: Iddd3c5b79886e94b751840abad4a0652e3e8da3c
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Sudheer Papothi
066f5e4cf4 ANDROID: GKI: ASoC: dapm: Avoid static route b/w cpu and codec dai
Currently ASoC core creates a static route b/w
playback/capture widgets of cpu and codec dai
if they are part of the same dai-link. However
this will cause codec path to get powered up
followed by the backend dai start during device
switch use-case where the front-end is not closed,
leading to audio playback failure if either bit-width
or sample rate is different.

Test: build
Bug: 151372815
Change-Id: Icd17677a73fdc4bd30e0918fcaa7e7f394245685
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
(cherry picked from commit 85a57fb9237c4021150e3a3ba9a274a7b78b79a5)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Banajit Goswami
645bb4d439 ANDROID: GKI: ASoC: pcm: Add support for hostless playback/capture
For playback/capture usecases in which host doesn't exchange
PCM data, audio driver creates hostless pcm devices.
This change squashes the below changes added to support
hostless pcm usecases-
   ASoC: core: Add support for no host mode
   ASoC: core: Update DMA mask for hostless pcm devices
   ASoC: pcm: increase the hostless buffer size
   soc: pcm: add arch_setup_dma_ops call

Test: build
Bug: 151372815
Change-Id: I82574c88847bcb9aa1a495c3690bba7f4e461979
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit f156bb58247dfbfb91a6f5579f41b07e3c5e5b8b)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Liam Girdwood
aa5d0cdc64 ANDROID: GKI: ASoC: core - add hostless DAI support
Allow DAI's to be hostless so that no PCM data is sent between DAI
and CPU. This allows for power savings as there is no DMA or CPU
interaction required.

TODO: we shouldn't need to allocate a PAGE for a dummy DMA buffer.

Test: build
Bug: 151372815
Change-Id: I8947f1ad2c4a7013e92e21078b35e3cad332cf6f
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Git-commit: b77e8f4fb684f8afd45d4276e3dba9edd4a0c4e0
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm/log/?h=msm-2.6.38
[bgoswami@codeaurora.org: fix merge conflict by moving
 code to the right source file. Fix checkpatch errors
 for line over 80 character. Fix compilation errors.]
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit c009f70138e1b66c6ae9597947b56a761f92bc0d)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Manaf Meethalavalappu Pallikunhi
4f04e3ea54 ANDROID: GKI: drivers: thermal: Resolve ABI diff for struct thermal_zone_device_ops
The following members are added to struct thermal_zone_device_ops:
int (*set_polling_delay)(struct thermal_zone_device *, int);
int (*set_passive_delay)(struct thermal_zone_device *, int);

Test: build and boot
Bug: 149945768
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
(cherry picked from commit f68eb1a39e07a296ff4424c594c0fcc9b48240bc)
[hridya: commit amended to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: Iad25d6585a35ecb71fdef36e27b27bece93a7c11
2020-04-06 07:17:39 -07:00
Ram Chandrasekar
10d3954a78 ANDROID: GKI: drivers: thermal: Add support for getting trip temperature
Add support for the sensor drivers using of-thermal interface to support
reading the trip temperature from the hardware using a callback. This
can be used in case, when the hardware works on a pre-configured
threshold different from the threshold set by software.

Test: build
Bug: 149945768
Change-Id: Ic5aaf1586b8dcbb3da0dd775718407c257b2064f
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
(cherry picked from commit 8a12149c264c7b871932ad90f76e5981452bb4bb)
[hridya: added an extra null pointer check, partial cherry-pick]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Hridya Valsaraju
5a7902fba4 ANDROID: GKI: Add functions of_thermal_handle_trip/of_thermal_handle_trip_temp
These APIs handle thermal trips from sensors.
These are required to reduce ABI diff.

Test: build
Bug: 149945768
Change-Id: I2ba4e91c954c9b13a323ec729b0c5a99f51e8fc3
(cherry picked from commit 8a12149c264c7b871932ad90f76e5981452bb4bb)
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
[hridya: commit amended to only include ABI diff, some pointer checks
added, also squashed 'c379a963e6ce9  drivers: thermal: Evaluate based on
trip temperature']
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:39 -07:00
Manaf Meethalavalappu Pallikunhi
b078dd60e3 ANDROID: GKI: drivers: thermal: Add post suspend evaluate flag to thermal zone devicetree
Thermal core framework subscribes for suspend/resume notification.
On resume notification it re-evaluates each thermal zone for
temperature and cooling state update. For some devices,
a large number of thermal zones are enabled for different mitigations.
Re-evaluating each thermal zone during resume leads to multiple issues
including delay in back to back suspend resume scenario, power penalty
for frequent wake up due to re-setting trip threshold especially
during cold temperature usecases.

Add wake-capable-sensor property to thermal zone devicetree node to
denote that these sensors are wakeup capable. If a thermal zone has
this property defined, thermal framework ignores resume re-evaluation
and can service the threshold notification during the suspend/resume
path.

Test: build
Bug: 149945768
Change-Id: I07edf80ad29009378af4c70e750d01bde6f30806
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
(cherry picked from commit a915ed479e624a1be30e34720b07207136fca0a9)
[hridya: added some pointer checks]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-06 07:17:38 -07:00
Martijn Coenen
30be971f3f UPSTREAM: loop: Only freeze block queue when needed.
__loop_update_dio() can be called as a part of loop_set_fd(), when the
block queue is not yet up and running; avoid freezing the block queue in
that case, since that is an expensive operation.

Bug: 148607611
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 0fbcf57982)
Change-Id: I17d8de6b6b54a667703d60ea1c62449bb14331da
2020-04-04 16:33:15 +00:00
Martijn Coenen
456ce3aa8c UPSTREAM: loop: Only change blocksize when needed.
Return early in loop_set_block_size() if the requested block size is
identical to the one we already have; this avoids expensive calls to
freeze the block queue.

Bug: 148607611
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martijn Coenen <maco@android.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 7e81f99afd)
Change-Id: I61778680579dbfeeb193133527a3926d376e0bac
2020-04-04 16:33:07 +00:00
Alistair Delva
182b38fc31 ANDROID: Fix wq fp check for CFI builds
A previous change added a test on the wrong config flag; rename
CFI to CFI_CLANG.

Bug: 145210207
Change-Id: Id8aead2eb2c75ad6442d10165f6cb86ccfb9c2f9
Signed-off-by: Alistair Delva <adelva@google.com>
2020-04-04 16:30:40 +00:00
Greg Kroah-Hartman
64f8bab38a ANDROID: GKI: update abi definition after CONFIG_DEBUG_LIST was enabled
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function bool __list_add_valid(list_head*, list_head*, list_head*)'
  [A] 'function bool __list_del_entry_valid(list_head*)'

Bug: 152470236
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ieef7c50f4f5717a7f825a40617b97e0b3b7c9cd3
2020-04-04 14:02:31 +02:00
Greg Kroah-Hartman
d7304153b5 ANDROID: gki_defconfig: enable CONFIG_DEBUG_LIST
For lots of good security reasons, this config option needs to be
enabled

Bug: 152470236
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I96a88bbee9c4d17be97ed63262dbab2ef31fee79
(cherry picked from commit ab789e8750)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-04 09:52:50 +00:00
Suren Baghdasaryan
b12d8a020f ANDROID: GKI: Update ABI definition
Leaf changes summary: 54 artifacts changed
Changed leaf types summary: 7 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 47 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

47 Added functions:

  [A] 'function long int __ll_sc_atomic64_add_return(long int, atomic64_t*)'
  [A] 'function long int __ll_sc_atomic64_fetch_andnot(long int, atomic64_t*)'
  [A] 'function long int __ll_sc_atomic64_fetch_or(long int, atomic64_t*)'
  [A] 'function void __ll_sc_atomic64_xor(long int, atomic64_t*)'
  [A] 'function int __ll_sc_atomic_fetch_add(int, atomic_t*)'
  [A] 'function void __ll_sc_atomic_or(int, atomic_t*)'
  [A] 'function int __radix_tree_insert(radix_tree_root*, unsigned long int, unsigned int, void*)'
  [A] 'function int __skb_pad(sk_buff*, int, bool)'
  [A] 'function void _raw_read_lock_irq(rwlock_t*)'
  [A] 'function void _raw_read_unlock_irq(rwlock_t*)'
  [A] 'function unsigned long int _raw_write_lock_irqsave(rwlock_t*)'
  [A] 'function void _raw_write_unlock_irqrestore(rwlock_t*, unsigned long int)'
  [A] 'function sk_buff* alloc_skb_with_frags(unsigned long int, unsigned long int, int, int*, unsigned int)'
  [A] 'function int cpumask_next_and(int, const cpumask*, const cpumask*)'
  [A] 'function __poll_t datagram_poll(file*, socket*, poll_table*)'
  [A] 'function int devm_regulator_register_notifier(regulator*, notifier_block*)'
  [A] 'function int drm_crtc_vblank_get(drm_crtc*)'
  [A] 'function void drm_crtc_vblank_put(drm_crtc*)'
  [A] 'function gpio_desc* gpiod_get_from_of_node(device_node*, const char*, int, gpiod_flags, const char*)'
  [A] 'function int in_egroup_p(kgid_t)'
  [A] 'function ssize_t mipi_dsi_dcs_write(mipi_dsi_device*, u8, void*, size_t)'
  [A] 'function bool netlink_capable(const sk_buff*, int)'
  [A] 'function int of_n_addr_cells(device_node*)'
  [A] 'function int of_n_size_cells(device_node*)'
  [A] 'function void radix_tree_iter_delete(radix_tree_root*, radix_tree_iter*, void**)'
  [A] 'function void* radix_tree_lookup(const radix_tree_root*, unsigned long int)'
  [A] 'function void** radix_tree_next_chunk(const radix_tree_root*, radix_tree_iter*, unsigned int)'
  [A] 'function bool refcount_dec_not_one(refcount_struct*)'
  [A] 'function int regulator_get_voltage(regulator*)'
  [A] 'function int regulator_list_voltage_table(regulator_dev*, unsigned int)'
  [A] 'function int regulator_map_voltage_ascend(regulator_dev*, int, int)'
  [A] 'function int rtnl_register_module(module*, int, int, rtnl_doit_func, rtnl_dumpit_func, unsigned int)'
  [A] 'function int rtnl_unregister(int, int)'
  [A] 'function void save_stack_trace(stack_trace*)'
  [A] 'function void skb_condense(sk_buff*)'
  [A] 'function void skb_free_datagram(sock*, sk_buff*)'
  [A] 'function sk_buff* skb_recv_datagram(sock*, unsigned int, int, int*)'
  [A] 'function int skb_store_bits(sk_buff*, int, void*, int)'
  [A] 'function sk_buff* sock_alloc_send_skb(sock*, unsigned long int, int, int*)'
  [A] 'function int sock_create_kern(net*, int, int, int, socket**)'
  [A] 'function int sock_get_timestamp(sock*, timeval*)'
  [A] 'function int sock_no_shutdown(socket*, int)'
  [A] 'function bool timerqueue_add(timerqueue_head*, timerqueue_node*)'
  [A] 'function bool timerqueue_del(timerqueue_head*, timerqueue_node*)'
  [A] 'function timerqueue_node* timerqueue_iterate_next(timerqueue_node*)'
  [A] 'function config_group* usb_os_desc_prepare_interf_dir(config_group*, int, usb_os_desc**, char**, module*)'
  [A] 'function long int vfs_write(file*, const char*, unsigned long int, long long int*)'

Test: build
Bug: 152652820
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ice5776d98cba4115220f38eeaff366f6b500af72
2020-04-03 15:35:27 -07:00
Suren Baghdasaryan
b33c657f7a ANDROID: GKI: remove condition causing sk_buff struct ABI differences
Remove condition for including struct sk_buff members based on
CONFIG_BRIDGE_NETFILTER config.

Bug: 151840548
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Iee626843e107e8d64c3c6c4a1cc9c08f4e38f5af
Merged-In: Iee626843e107e8d64c3c6c4a1cc9c08f4e38f5af
2020-04-03 15:23:59 -07:00
Hridya Valsaraju
13630d0555 ANDROID: GKI: Export symbol arch_timer_mem_get_cval
Bug: 140652396
Test: build, boot

Signed-off-by: Hridya Valsaraju <hridya@google.com>
Bug: 152635062
Test: build
(cherry picked from commit e8c25076c4b591e186a4cf52faa7370d783f4475)
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0260070ea060b5a56440760ed660373353329d6d
Merged-In: I0260070ea060b5a56440760ed660373353329d6d
2020-04-03 15:23:59 -07:00
Fenglin Wu
d892c9f357 ANDROID: GKI: pwm: core: Add option to config PWM duty/period with u64 data length
Currently, PWM core driver provides interfaces for configuring PWM
period and duty length in nanoseconds with an integer data type, so
the max period can be only set to ~2.147 seconds. Add interfaces which
can set PWM period and duty with u64 data type to remove this
limitation.

Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Bug: 152542675
Test: build and boot
(cherry picked from commit a691c36aef3f1123f41f12e8d508c5e3457fec7f)
[surenb: removed sysfs API changes, replaced 32-bit divisions with 64-bit
ones in the following drivers to fix allmodconfig build:
	drivers/clk/clk-pwm.c
	drivers/hwmon/pwm-fan.c
	drivers/pwm/pwm-clps711x.c
	drivers/pwm/pwm-sti.c
	drivers/pwm/pwm-sun4i.c
]
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I149c14b2d59b181344e7bb77393c64bcd9998de5
Merged-In: I149c14b2d59b181344e7bb77393c64bcd9998de5
2020-04-03 15:23:59 -07:00
Saravana Kannan
1f1eb8c282 ANDROID: Update ABI whitelist for qcom SoCs
Update the whitelist for qcom SoCs.

Bug: 149430094
Change-Id: I3bdf1a21e4d39a3be341bb65a968e48e99530e8a
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-03 12:15:01 -07:00
Paul Lawrence
ae41ea981b ANDROID: Incremental fs: Fix remount
Bug: 153017385
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I13f3a3c91d746d725e0e21b1e2bcfe0a64a13716
2020-04-03 17:25:37 +00:00
Paul Lawrence
e251cfe620 ANDROID: Incremental fs: Protect get_fill_block, and add a field
Since INCFS_IOC_GET_FILLED_BLOCKS potentially leaks information about usage
patterns, and is only useful to someone filling the file, best protect it in
the same way as INCFS_IOC_FILL_BLOCKS.

Add useful field data_block_out as well

Test: incfs_test passes
Bug: 152983639
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I126a8cf711e56592479093e9aadbfd0e7f700752
2020-04-03 17:25:30 +00:00
Paul Lawrence
759d52ee9e ANDROID: Incremental fs: Fix crash polling 0 size read_log
When read log is 0 sized, we still need to init the wait queue to avoid
kernel panics if someone does decide to poll on the read log.

Test: Added test for this condition, incfs_test crashes
	With fix, incfs_test doesn't crash
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Bug: 152909243
Change-Id: Ic3250523bb7ddb1839f8e95852c17103e5ffb782
2020-04-03 17:25:22 +00:00
Yurii Zubrytskyi
21b6d8c954 ANDROID: Incremental fs: get_filled_blocks: better index_out
When returning incomplete results index_out has to be usable to
call the function again and resume from the same location. This
means that if the output buffer was too small the function needs
to check for that when encountering the _beginning_ of a next
output range, not the end of it. Otherwise resuming from the
end of the range that didn't fit into the buffer would cause
the call to never return that range

+ Make the backing file header flags update thread safe

Bug: 152691988
Test: libincfs-test, incfs_test passes
Signed-off-by: Yurii Zubrytskyi <zyy@google.com>
Change-Id: I351156beba0b74e1942a39117279d3fcdb5e0c78
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-04-03 17:25:13 +00:00
Saravana Kannan
8f528caa59 ANDROID: GKI: of: property: Add device links support for "qcom,wrapper-dev"
The qcom,wrapper-dev property is used to indicate which QUPv3 wrapper
encapsulated different I2C, serial and SPI devices. The wrapper device
needs to be functional before the I2C, serial and SPI devices can probe.
So, parse this property and add device links.

Bug: 149092675
Change-Id: I19cc464917c9b15a93d7779a59800d6603220d5c
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit da793b2bddc2e3f72b09f101cc601172b9d83f2d)
2020-04-03 16:33:15 +00:00
Greg Kroah-Hartman
1e9ce09d3e ANDROID: GKI: update abi definitions due to recent changes
Leaf changes summary: 23 artifacts changed
Changed leaf types summary: 10 leaf types changed
Removed/Changed/Added functions summary: 3 Removed, 0 Changed, 10 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Removed functions:

  [D] 'function int fb_register_client(notifier_block*)'
  [D] 'function int fb_unregister_client(notifier_block*)'
  [D] 'function int remove_conflicting_framebuffers(apertures_struct*, const char*, bool)'

10 Added functions:

  [A] 'function void arch_timer_mem_get_cval(u32*, u32*)'
  [A] 'function unsigned long int clk_aggregate_rate(clk_hw*, const clk_core*)'
  [A] 'function void clk_debug_print_hw(clk_core*, seq_file*)'
  [A] 'function int clk_set_flags(clk*, unsigned long int)'
  [A] 'function void clk_unvote_rate_vdd(clk_core*, unsigned long int)'
  [A] 'function int clk_unvote_vdd_level(clk_vdd_class*, int)'
  [A] 'function int clk_vote_rate_vdd(clk_core*, unsigned long int)'
  [A] 'function int clk_vote_vdd_level(clk_vdd_class*, int)'
  [A] 'function napi_struct* get_current_napi_context()'
  [A] 'function void regulator_sync_state(device*)'

'struct cfg80211_ap_settings at cfg80211.h:929:1' changed:
  type size hasn't changed
  1 data member insertion:
    'u32 cfg80211_ap_settings::flags', at offset 3232 (in bits) at cfg80211.h:964:1
  one impacted interface:
    function wiphy* wiphy_new_nm(const cfg80211_ops*, int, const char*)

'struct cfg80211_external_auth_params at cfg80211.h:2871:1' changed:
  type size changed from 416 to 512 (in bits)
  1 data member insertion:
    'const u8* cfg80211_external_auth_params::pmkid', at offset 448 (in bits) at cfg80211.h:2891:1
  2 impacted interfaces:
    function int cfg80211_external_auth_request(net_device*, cfg80211_external_auth_params*, gfp_t)
    function wiphy* wiphy_new_nm(const cfg80211_ops*, int, const char*)

'struct clk_init_data at clk-provider.h:262:1' changed:
  type size changed from 320 to 512 (in bits)
  4 data member insertions:
    'clk_vdd_class* clk_init_data::vdd_class', at offset 320 (in bits) at clk-provider.h:297:1
    'unsigned long int* clk_init_data::rate_max', at offset 384 (in bits) at clk-provider.h:298:1
    'int clk_init_data::num_rate_max', at offset 448 (in bits) at clk-provider.h:299:1
    'unsigned int clk_init_data::bus_cl_id', at offset 480 (in bits) at clk-provider.h:300:1
  there are data member changes:
    type 'typedef u8' of 'clk_init_data::num_parents' changed:
      entity changed from 'typedef u8' to compatible type 'unsigned int'
      type size changed from 8 to 32 (in bits)
    and size changed from 8 to 32 (in bits) (by +24 bits)
  18 impacted interfaces:
    function int __clk_determine_rate(clk_hw*, clk_rate_request*)
    function clk_hw* __clk_get_hw(clk*)
    function int __clk_mux_determine_rate_closest(clk_hw*, clk_rate_request*)
    function unsigned long int clk_hw_get_flags(const clk_hw*)
    function const char* clk_hw_get_name(const clk_hw*)
    function unsigned int clk_hw_get_num_parents(const clk_hw*)
    function clk_hw* clk_hw_get_parent(const clk_hw*)
    function clk_hw* clk_hw_get_parent_by_index(const clk_hw*, unsigned int)
    function unsigned long int clk_hw_get_rate(const clk_hw*)
    function bool clk_hw_is_enabled(const clk_hw*)
    function bool clk_hw_is_prepared(const clk_hw*)
    function unsigned long int clk_hw_round_rate(clk_hw*, unsigned long int)
    function int devm_clk_hw_register(device*, clk_hw*)
    function clk* devm_clk_register(device*, clk_hw*)
    function int devm_of_clk_add_hw_provider(device*, void ()*, void*)
    function unsigned long int divider_recalc_rate(clk_hw*, unsigned long int, unsigned int, const clk_div_table*, unsigned long int, unsigned long int)
    function long int divider_ro_round_rate_parent(clk_hw*, clk_hw*, unsigned long int, unsigned long int*, const clk_div_table*, u8, unsigned long int, unsigned int)
    function long int divider_round_rate_parent(clk_hw*, clk_hw*, unsigned long int, unsigned long int*, const clk_div_table*, u8, unsigned long int)

'struct clk_ops at clk-provider.h:218:1' changed:
  type size changed from 1408 to 1664 (in bits)
  4 data member insertions:
    'void ()* clk_ops::set_flags', at offset 1408 (in bits) at clk-provider.h:269:1
    'void ()* clk_ops::list_registers', at offset 1472 (in bits) at clk-provider.h:270:1
    'void ()* clk_ops::list_rate', at offset 1536 (in bits) at clk-provider.h:272:1
    'void ()* clk_ops::bus_vote', at offset 1600 (in bits) at clk-provider.h:274:1
  18 impacted interfaces:
    function int __clk_determine_rate(clk_hw*, clk_rate_request*)
    function clk_hw* __clk_get_hw(clk*)
    function int __clk_mux_determine_rate_closest(clk_hw*, clk_rate_request*)
    function unsigned long int clk_hw_get_flags(const clk_hw*)
    function const char* clk_hw_get_name(const clk_hw*)
    function unsigned int clk_hw_get_num_parents(const clk_hw*)
    function clk_hw* clk_hw_get_parent(const clk_hw*)
    function clk_hw* clk_hw_get_parent_by_index(const clk_hw*, unsigned int)
    function unsigned long int clk_hw_get_rate(const clk_hw*)
    function bool clk_hw_is_enabled(const clk_hw*)
    function bool clk_hw_is_prepared(const clk_hw*)
    function unsigned long int clk_hw_round_rate(clk_hw*, unsigned long int)
    function int devm_clk_hw_register(device*, clk_hw*)
    function clk* devm_clk_register(device*, clk_hw*)
    function int devm_of_clk_add_hw_provider(device*, void ()*, void*)
    function unsigned long int divider_recalc_rate(clk_hw*, unsigned long int, unsigned int, const clk_div_table*, unsigned long int, unsigned long int)
    function long int divider_ro_round_rate_parent(clk_hw*, clk_hw*, unsigned long int, unsigned long int*, const clk_div_table*, u8, unsigned long int, unsigned int)
    function long int divider_round_rate_parent(clk_hw*, clk_hw*, unsigned long int, unsigned long int*, const clk_div_table*, u8, unsigned long int)

'struct edac_device_ctl_info at edac_device.h:151:1' changed:
  type size changed from 3008 to 3072 (in bits)
  2 data member insertions:
    'int edac_device_ctl_info::panic_on_ce', at offset 288 (in bits) at edac_device.h:162:1
    'bool edac_device_ctl_info::defer_work', at offset 448 (in bits) at edac_device.h:166:1
  there are data member changes:
    'int edac_device_ctl_info::panic_on_ue' offset changed from 288 to 320 (in bits) (by +32 bits)
    'unsigned int edac_device_ctl_info::poll_msec' offset changed from 320 to 352 (in bits) (by +32 bits)
    'edac_dev_sysfs_attribute* edac_device_ctl_info::sysfs_attributes' offset changed from 448 to 512 (in bits) (by +64 bits)
    'bus_type* edac_device_ctl_info::edac_subsys' offset changed from 512 to 576 (in bits) (by +64 bits)
    'int edac_device_ctl_info::op_state' offset changed from 576 to 640 (in bits) (by +64 bits)
    'delayed_work edac_device_ctl_info::work' offset changed from 640 to 704 (in bits) (by +64 bits)
    'void ()* edac_device_ctl_info::edac_check' offset changed from 1344 to 1408 (in bits) (by +64 bits)
    'device* edac_device_ctl_info::dev' offset changed from 1408 to 1472 (in bits) (by +64 bits)
    'const char* edac_device_ctl_info::mod_name' offset changed from 1472 to 1536 (in bits) (by +64 bits)
    'const char* edac_device_ctl_info::ctl_name' offset changed from 1536 to 1600 (in bits) (by +64 bits)
    'const char* edac_device_ctl_info::dev_name' offset changed from 1600 to 1664 (in bits) (by +64 bits)
    'void* edac_device_ctl_info::pvt_info' offset changed from 1664 to 1728 (in bits) (by +64 bits)
    'unsigned long int edac_device_ctl_info::start_time' offset changed from 1728 to 1792 (in bits) (by +64 bits)
    'completion edac_device_ctl_info::removal_complete' offset changed from 1792 to 1856 (in bits) (by +64 bits)
    'char edac_device_ctl_info::name[32]' offset changed from 2048 to 2112 (in bits) (by +64 bits)
    'u32 edac_device_ctl_info::nr_instances' offset changed from 2304 to 2368 (in bits) (by +64 bits)
    'edac_device_instance* edac_device_ctl_info::instances' offset changed from 2368 to 2432 (in bits) (by +64 bits)
    'edac_device_counter edac_device_ctl_info::counters' offset changed from 2432 to 2496 (in bits) (by +64 bits)
    'kobject edac_device_ctl_info::kobj' offset changed from 2496 to 2560 (in bits) (by +64 bits)
  6 impacted interfaces:
    function int edac_device_add_device(edac_device_ctl_info*)
    function edac_device_ctl_info* edac_device_alloc_ctl_info(unsigned int, char*, unsigned int, char*, unsigned int, unsigned int, edac_dev_sysfs_block_attribute*, unsigned int, int)
    function edac_device_ctl_info* edac_device_del_device(device*)
    function void edac_device_free_ctl_info(edac_device_ctl_info*)
    function void edac_device_handle_ce(edac_device_ctl_info*, int, int, const char*)
    function void edac_device_handle_ue(edac_device_ctl_info*, int, int, const char*)

'struct fb_info at fb.h:464:1' changed:
  type size changed from 6912 to 6144 (in bits)
  2 data member deletions:
    'delayed_work fb_info::deferred_work', at offset 5376 (in bits) at fb.h:496:1
    'fb_deferred_io* fb_info::fbdefio', at offset 6080 (in bits) at fb.h:497:1
  there are data member changes:
    'fb_ops* fb_info::fbops' offset changed from 6144 to 5376 (in bits) (by -768 bits)
    'device* fb_info::device' offset changed from 6208 to 5440 (in bits) (by -768 bits)
    'device* fb_info::dev' offset changed from 6272 to 5504 (in bits) (by -768 bits)
    'int fb_info::class_flag' offset changed from 6336 to 5568 (in bits) (by -768 bits)
    offset changed from 6400 to 5632 (in bits) (by -768 bits)
    'unsigned long int fb_info::screen_size' offset changed from 6464 to 5696 (in bits) (by -768 bits)
    'void* fb_info::pseudo_palette' offset changed from 6528 to 5760 (in bits) (by -768 bits)
    'u32 fb_info::state' offset changed from 6592 to 5824 (in bits) (by -768 bits)
    'void* fb_info::fbcon_par' offset changed from 6656 to 5888 (in bits) (by -768 bits)
    'void* fb_info::par' offset changed from 6720 to 5952 (in bits) (by -768 bits)
    'apertures_struct* fb_info::apertures' offset changed from 6784 to 6016 (in bits) (by -768 bits)
    'bool fb_info::skip_vt_switch' offset changed from 6848 to 6080 (in bits) (by -768 bits)
  97 impacted interfaces:
    function backlight_device* devm_backlight_device_register(device*, const char*, device*, void*, const backlight_ops*, const backlight_properties*)
    function int drm_atomic_helper_check(drm_device*, drm_atomic_state*)
    function void drm_atomic_helper_cleanup_planes(drm_device*, drm_atomic_state*)
    function int drm_atomic_helper_commit(drm_device*, drm_atomic_state*, bool)
    function void drm_atomic_helper_commit_modeset_disables(drm_device*, drm_atomic_state*)
    function void drm_atomic_helper_commit_modeset_enables(drm_device*, drm_atomic_state*)
    function void drm_atomic_helper_commit_planes(drm_device*, drm_atomic_state*, unsigned int)
    function drm_atomic_state* drm_atomic_helper_duplicate_state(drm_device*, drm_modeset_acquire_ctx*)
    function int drm_atomic_helper_prepare_planes(drm_device*, drm_atomic_state*)
    function void drm_atomic_helper_shutdown(drm_device*)
    function void drm_atomic_helper_update_legacy_modeset_state(drm_device*, drm_atomic_state*)
    function int drm_atomic_helper_wait_for_fences(drm_device*, drm_atomic_state*, bool)
    function void drm_atomic_helper_wait_for_vblanks(drm_device*, drm_atomic_state*)
    function drm_atomic_state* drm_atomic_state_alloc(drm_device*)
    function int drm_atomic_state_init(drm_device*, drm_atomic_state*)
    function int drm_connector_init(drm_device*, drm_connector*, const drm_connector_funcs*, int)
    function void drm_connector_list_iter_begin(drm_device*, drm_connector_list_iter*)
    function void drm_connector_list_iter_end(drm_connector_list_iter*)
    function drm_connector* drm_connector_list_iter_next(drm_connector_list_iter*)
    function int drm_crtc_init_with_planes(drm_device*, drm_crtc*, drm_plane*, drm_plane*, const drm_crtc_funcs*, const char*, ...)
    function drm_display_mode* drm_cvt_mode(drm_device*, int, int, int, bool, bool, bool)
    function drm_device* drm_dev_alloc(drm_driver*, device*)
    function void drm_dev_put(drm_device*)
    function int drm_dev_register(drm_device*, unsigned long int)
    function int drm_dev_set_unique(drm_device*, const char*)
    function void drm_dev_unregister(drm_device*)
    function int drm_dp_atomic_find_vcpi_slots(drm_atomic_state*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*, int)
    function int drm_dp_atomic_release_vcpi_slots(drm_atomic_state*, drm_dp_mst_topology_mgr*, int)
    function int drm_dp_check_act_status(drm_dp_mst_topology_mgr*)
    function int drm_dp_find_vcpi_slots(drm_dp_mst_topology_mgr*, int)
    function bool drm_dp_mst_allocate_vcpi(drm_dp_mst_topology_mgr*, drm_dp_mst_port*, int, int)
    function void drm_dp_mst_deallocate_vcpi(drm_dp_mst_topology_mgr*, drm_dp_mst_port*)
    function drm_connector_status drm_dp_mst_detect_port(drm_connector*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*)
    function edid* drm_dp_mst_get_edid(drm_connector*, drm_dp_mst_topology_mgr*, drm_dp_mst_port*)
    function int drm_dp_mst_hpd_irq(drm_dp_mst_topology_mgr*, u8*, bool*)
    function void drm_dp_mst_reset_vcpi_slots(drm_dp_mst_topology_mgr*, drm_dp_mst_port*)
    function void drm_dp_mst_topology_mgr_destroy(drm_dp_mst_topology_mgr*)
    function int drm_dp_mst_topology_mgr_init(drm_dp_mst_topology_mgr*, drm_device*, drm_dp_aux*, int, int, int)
    function int drm_dp_mst_topology_mgr_set_mst(drm_dp_mst_topology_mgr*, bool)
    function int drm_dp_send_power_updown_phy(drm_dp_mst_topology_mgr*, drm_dp_mst_port*, bool)
    function int drm_dp_update_payload_part1(drm_dp_mst_topology_mgr*)
    function int drm_dp_update_payload_part2(drm_dp_mst_topology_mgr*)
    function int drm_encoder_init(drm_device*, drm_encoder*, const drm_encoder_funcs*, int, const char*, ...)
    function int drm_event_reserve_init_locked(drm_device*, drm_file*, drm_pending_event*, drm_event*)
    function int drm_framebuffer_init(drm_device*, drm_framebuffer*, const drm_framebuffer_funcs*)
    function drm_framebuffer* drm_framebuffer_lookup(drm_device*, drm_file*, unsigned int)
    function int drm_gem_create_mmap_offset(drm_gem_object*)
    function drm_gem_object* drm_gem_fb_get_obj(drm_framebuffer*, unsigned int)
    function void drm_gem_free_mmap_offset(drm_gem_object*)
    function page** drm_gem_get_pages(drm_gem_object*)
    function int drm_gem_handle_create(drm_file*, drm_gem_object*, unsigned int*)
    function int drm_gem_mmap_obj(drm_gem_object*, unsigned long int, vm_area_struct*)
    function int drm_gem_object_init(drm_device*, drm_gem_object*, size_t)
    function drm_gem_object* drm_gem_object_lookup(drm_file*, unsigned int)
    function void drm_gem_object_put(drm_gem_object*)
    function void drm_gem_object_put_unlocked(drm_gem_object*)
    function void drm_gem_object_release(drm_gem_object*)
    function dma_buf* drm_gem_prime_export(drm_device*, drm_gem_object*, int)
    function int drm_gem_prime_fd_to_handle(drm_device*, drm_file*, int, uint32_t*)
    function int drm_gem_prime_handle_to_fd(drm_device*, drm_file*, uint32_t, uint32_t, int*)
    function drm_gem_object* drm_gem_prime_import(drm_device*, dma_buf*)
    function int drm_gem_prime_mmap(drm_gem_object*, vm_area_struct*)
    function void drm_gem_private_object_init(drm_device*, drm_gem_object*, unsigned long int)
    function void drm_gem_put_pages(drm_gem_object*, page**, bool, bool)
    function bool drm_helper_hpd_irq_event(drm_device*)
    function void drm_helper_mode_fill_fb_struct(drm_device*, drm_framebuffer*, const drm_mode_fb_cmd2*)
    function int drm_irq_install(drm_device*, int)
    function int drm_irq_uninstall(drm_device*)
    function void drm_kms_helper_hotplug_event(drm_device*)
    function void drm_kms_helper_poll_disable(drm_device*)
    function void drm_kms_helper_poll_enable(drm_device*)
    function void drm_kms_helper_poll_fini(drm_device*)
    function void drm_kms_helper_poll_init(drm_device*)
    function void drm_mode_config_cleanup(drm_device*)
    function void drm_mode_config_init(drm_device*)
    function void drm_mode_config_reset(drm_device*)
    function int drm_mode_convert_umode(drm_device*, drm_display_mode*, const drm_mode_modeinfo*)
    function drm_display_mode* drm_mode_create(drm_device*)
    function drm_display_mode* drm_mode_duplicate(drm_device*, const drm_display_mode*)
    function drm_mode_object* drm_mode_object_find(drm_device*, drm_file*, unsigned int, unsigned int)
    function void drm_modeset_lock_all(drm_device*)
    function int drm_modeset_lock_all_ctx(drm_device*, drm_modeset_acquire_ctx*)
    function void drm_modeset_unlock_all(drm_device*)
    function void drm_object_attach_property(drm_mode_object*, drm_property*, long long unsigned int)
    function int drm_object_property_set_value(drm_mode_object*, drm_property*, long long unsigned int)
    function void drm_prime_gem_destroy(drm_gem_object*, sg_table*)
    function drm_property* drm_property_create(drm_device*, unsigned int, const char*, int)
    function drm_property* drm_property_create_bitmask(drm_device*, unsigned int, const char*, const drm_prop_enum_list*, int, long long unsigned int)
    function drm_property_blob* drm_property_create_blob(drm_device*, unsigned long int, void*)
    function drm_property* drm_property_create_enum(drm_device*, unsigned int, const char*, const drm_prop_enum_list*, int)
    function drm_property* drm_property_create_range(drm_device*, unsigned int, const char*, long long unsigned int, long long unsigned int)
    function drm_property_blob* drm_property_lookup_blob(drm_device*, unsigned int)
    function void drm_put_dev(drm_device*)
    function void drm_send_event_locked(drm_device*, drm_pending_event*)
    function int drm_universal_plane_init(drm_device*, drm_plane*, unsigned int, const drm_plane_funcs*, const unsigned int*, unsigned int, const long long unsigned int*, drm_plane_type, const char*, ...)
    function int drm_vblank_init(drm_device*, unsigned int)
    function void drm_wait_one_vblank(drm_device*, unsigned int)

'struct pwm_device at pwm.h:76:1' changed:
  type size changed from 512 to 640 (in bits)
  there are data member changes:
    type 'struct pwm_state' of 'pwm_device::state' changed:
      type size changed from 128 to 256 (in bits)
      2 data member insertions:
        'pwm_output_type pwm_state::output_type', at offset 96 (in bits) at pwm.h:85:1
        'pwm_output_pattern* pwm_state::output_pattern', at offset 128 (in bits) at pwm.h:86:1
      there are data member changes:
        'bool pwm_state::enabled' offset changed from 96 to 192 (in bits) (by +96 bits)
      4 impacted interfaces:
        function pwm_device* devm_of_pwm_get(device*, device_node*, const char*)
        function void devm_pwm_put(device*, pwm_device*)
        function int pwmchip_add(pwm_chip*)
        function int pwmchip_remove(pwm_chip*)
    and size changed from 128 to 256 (in bits) (by +128 bits)
  4 impacted interfaces:
    function pwm_device* devm_of_pwm_get(device*, device_node*, const char*)
    function void devm_pwm_put(device*, pwm_device*)
    function int pwmchip_add(pwm_chip*)
    function int pwmchip_remove(pwm_chip*)

'struct pwm_ops at pwm.h:260:1' changed:
  type size changed from 640 to 832 (in bits)
  3 data member insertions:
    'void ()* pwm_ops::get_output_type_supported', at offset 448 (in bits) at pwm.h:319:1
    'void ()* pwm_ops::set_output_type', at offset 512 (in bits) at pwm.h:321:1
    'void ()* pwm_ops::set_output_pattern', at offset 576 (in bits) at pwm.h:323:1
  there are data member changes:
    'void ()* pwm_ops::apply' offset changed from 448 to 640 (in bits) (by +192 bits)
    'void ()* pwm_ops::get_state' offset changed from 512 to 704 (in bits) (by +192 bits)
    'module* pwm_ops::owner' offset changed from 576 to 768 (in bits) (by +192 bits)
  4 impacted interfaces:
    function pwm_device* devm_of_pwm_get(device*, device_node*, const char*)
    function void devm_pwm_put(device*, pwm_device*)
    function int pwmchip_add(pwm_chip*)
    function int pwmchip_remove(pwm_chip*)

'struct pwm_state at pwm.h:58:1' changed:
  details were reported earlier

'struct regulator_dev at driver.h:438:1' changed:
  type size changed from 9280 to 9344 (in bits)
  1 data member insertion:
    'proxy_consumer* regulator_dev::proxy_consumer', at offset 9280 (in bits) at driver.h:479:1
  29 impacted interfaces:
    function int devm_regulator_bulk_get(device*, int, regulator_bulk_data*)
    function regulator* devm_regulator_get(device*, const char*)
    function regulator* devm_regulator_get_optional(device*, const char*)
    function void devm_regulator_put(regulator*)
    function regulator_dev* devm_regulator_register(device*, const regulator_desc*, const regulator_config*)
    function regulator_init_data* of_get_regulator_init_data(device*, device_node*, const regulator_desc*)
    function void* rdev_get_drvdata(regulator_dev*)
    function int rdev_get_id(regulator_dev*)
    function int regulator_bulk_disable(int, regulator_bulk_data*)
    function int regulator_bulk_enable(int, regulator_bulk_data*)
    function int regulator_count_voltages(regulator*)
    function int regulator_disable_deferred(regulator*, int)
    function int regulator_disable_regmap(regulator_dev*)
    function int regulator_enable_regmap(regulator_dev*)
    function regulator* regulator_get(device*, const char*)
    function void* regulator_get_drvdata(regulator*)
    function unsigned int regulator_get_mode(regulator*)
    function int regulator_get_voltage_sel_regmap(regulator_dev*)
    function int regulator_is_enabled(regulator*)
    function int regulator_is_enabled_regmap(regulator_dev*)
    function int regulator_list_voltage_linear(regulator_dev*, unsigned int)
    function int regulator_map_voltage_linear(regulator_dev*, int, int)
    function int regulator_notifier_call_chain(regulator_dev*, unsigned long int, void*)
    function int regulator_register_notifier(regulator*, notifier_block*)
    function int regulator_set_current_limit(regulator*, int, int)
    function int regulator_set_load(regulator*, int)
    function int regulator_set_mode(regulator*, unsigned int)
    function int regulator_set_voltage_sel_regmap(regulator_dev*, unsigned int)
    function int regulator_unregister_notifier(regulator*, notifier_block*)

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I926c10dae8e7acce013c94d4713084de638d64bf
2020-04-03 10:40:08 +02:00
Greg Kroah-Hartman
6ca29140d7 Merge 4.19.114 into android-4.19
Changes in 4.19.114
	mmc: core: Allow host controllers to require R1B for CMD6
	mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard
	mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command
	mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
	mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
	Revert "drm/dp_mst: Skip validating ports during destruction, just ref"
	geneve: move debug check after netdev unregister
	hsr: fix general protection fault in hsr_addr_is_self()
	macsec: restrict to ethernet devices
	mlxsw: spectrum_mr: Fix list iteration in error path
	net: cbs: Fix software cbs to consider packet sending time
	net: dsa: Fix duplicate frames flooded by learning
	net: mvneta: Fix the case where the last poll did not process all rx
	net/packet: tpacket_rcv: avoid a producer race condition
	net: qmi_wwan: add support for ASKEY WWHC050
	net_sched: cls_route: remove the right filter from hashtable
	net_sched: keep alloc_hash updated after hash allocation
	net: stmmac: dwmac-rk: fix error path in rk_gmac_probe
	NFC: fdp: Fix a signedness bug in fdp_nci_send_patch()
	slcan: not call free_netdev before rtnl_unlock in slcan_open
	bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets()
	bnxt_en: Reset rings if ring reservation fails during open()
	net: ip_gre: Separate ERSPAN newlink / changelink callbacks
	net: ip_gre: Accept IFLA_INFO_DATA-less configuration
	net: dsa: mt7530: Change the LINK bit to reflect the link status
	net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
	r8169: re-enable MSI on RTL8168c
	tcp: repair: fix TCP_QUEUE_SEQ implementation
	vxlan: check return value of gro_cells_init()
	hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
	hsr: add restart routine into hsr_get_node_list()
	hsr: set .netnsok flag
	cgroup-v1: cgroup_pidlist_next should update position index
	nfs: add minor version to nfs_server_key for fscache
	cpupower: avoid multiple definition with gcc -fno-common
	drivers/of/of_mdio.c:fix of_mdiobus_register()
	cgroup1: don't call release_agent when it is ""
	dt-bindings: net: FMan erratum A050385
	arm64: dts: ls1043a: FMan erratum A050385
	fsl/fman: detect FMan erratum A050385
	s390/qeth: handle error when backing RX buffer
	scsi: ipr: Fix softlockup when rescanning devices in petitboot
	mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
	dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom
	sxgbe: Fix off by one in samsung driver strncpy size arg
	ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare()
	i2c: hix5hd2: add missed clk_disable_unprepare in remove
	Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
	Input: synaptics - enable RMI on HP Envy 13-ad105ng
	Input: avoid BIT() macro usage in the serio.h UAPI header
	ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL
	ARM: dts: dra7: Add bus_dma_limit for L3 bus
	ARM: dts: omap5: Add bus_dma_limit for L3 bus
	perf probe: Do not depend on dwfl_module_addrsym()
	tools: Let O= makes handle a relative path with -C option
	scripts/dtc: Remove redundant YYLOC global declaration
	scsi: sd: Fix optimal I/O size for devices that change reported values
	nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type
	mac80211: mark station unauthorized before key removal
	gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk
	gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option
	gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model
	RDMA/core: Ensure security pkey modify is not lost
	genirq: Fix reference leaks on irq affinity notifiers
	xfrm: handle NETDEV_UNREGISTER for xfrm device
	vti[6]: fix packet tx through bpf_redirect() in XinY cases
	RDMA/mlx5: Block delay drop to unprivileged users
	xfrm: fix uctx len check in verify_sec_ctx_len
	xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire
	xfrm: policy: Fix doulbe free in xfrm_policy_timer
	afs: Fix some tracing details
	netfilter: flowtable: reload ip{v6}h in nf_flow_tuple_ip{v6}
	netfilter: nft_fwd_netdev: validate family and chain type
	bpf/btf: Fix BTF verification of enum members in struct/union
	vti6: Fix memory leak of skb if input policy check fails
	Revert "r8169: check that Realtek PHY driver module is loaded"
	mac80211: add option for setting control flags
	mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX
	USB: serial: option: add support for ASKEY WWHC050
	USB: serial: option: add BroadMobi BM806U
	USB: serial: option: add Wistron Neweb D19Q1
	USB: cdc-acm: restore capability check order
	USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
	usb: musb: fix crash with highmen PIO and usbmon
	media: flexcop-usb: fix endpoint sanity check
	media: usbtv: fix control-message timeouts
	staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table
	staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
	staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
	ahci: Add Intel Comet Lake H RAID PCI ID
	libfs: fix infoleak in simple_attr_read()
	media: ov519: add missing endpoint sanity checks
	media: dib0700: fix rc endpoint lookup
	media: stv06xx: add missing descriptor sanity checks
	media: xirlink_cit: add missing descriptor sanity checks
	mac80211: Check port authorization in the ieee80211_tx_dequeue() case
	mac80211: fix authentication with iwlwifi/mvm
	vt: selection, introduce vc_is_sel
	vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines
	vt: switch vt_dont_switch to bool
	vt: vt_ioctl: remove unnecessary console allocation checks
	vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
	vt: vt_ioctl: fix use-after-free in vt_in_use()
	platform/x86: pmc_atom: Add Lex 2I385SW to critclk_systems DMI table
	bpf: Explicitly memset the bpf_attr structure
	bpf: Explicitly memset some bpf info structures declared on the stack
	gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model
	net: ks8851-ml: Fix IO operations, again
	arm64: alternative: fix build with clang integrated assembler
	perf map: Fix off by one in strncpy() size argument
	ARM: dts: oxnas: Fix clear-mask property
	ARM: bcm2835-rpi-zero-w: Add missing pinctrl name
	ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage
	ARM: dts: N900: fix onenand timings
	arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id
	arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode
	Linux 4.19.114

Change-Id: Icc165d2e49aba750e1b5a8856d9774c149e59ce7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-04-03 08:17:23 +02:00
Saravana Kannan
2071154513 ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Bug: 150506629
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I0ff4e5108541b9f6e3e3e3f984a277b6954a629c
2020-04-02 18:04:21 -07:00
Channagoud Kadabi
1f01baa02c ANDROID: GKI: drivers: clksource: Add API to return cval
Sleep driver needs to program the absolute clock value for next expiry
into pdc register for system wake up. Add an API to read the cval low
and high counters.

Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
Bug: 152635062
Test: build
(cherry picked from commit ee514e9083c5d9f3312a54fd317786da7c9abdb1)
[surenb: replaced out-of-tree readl_relaxed_no_log with functionally
identical in-tree readl_relaxed]
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1244c31c8a2717a6f2002cac3b26ee3526409058
Merged-In: I1244c31c8a2717a6f2002cac3b26ee3526409058
2020-04-02 23:32:47 +00:00
Saravana Kannan
3179a1a38d ANDROID: GKI: clk: Add support for voltage voting
This change adds support for voltage voting in the clock framework. This
will NOT be carried over to newer kernels.

Bug: 150506629
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Signed-off-by: Shefali Jain <shefjain@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
[saravanak: Squashed the following commits and dropped some debug code
	    and code whose functionality that's replaced by clk_sync_state()
	ff5ce501ba80 clk: do not vote for vdd_class level with 0 Hz rate_max
	96f0596cc03a clk: provider: cleanup of unused use_max_uV
	83d12e55ba9d clk: Always vote INT_MAX as maximum voltage for a rail
	352850e65775 clk: handle reentrant clk_set_rate() calls from clock supply regulators
	0d8060cd6b63 clk: add bus voting to rate_get, rate_set, enable_set debug functions
	d4c36a3d1038 clk: remove prepare lock and bus voting in clk_debug_print_hw
	813f66628115 clk: add bus voting ops for debug purposes
	7e0561072d82 clk: qcom: Fix return value check for round rate during clock registration
	c4540b8ee30c clk: fix conflicting bit for measure clock flag
	fa9b30447f77 clk: correct vdd_class voting scheme used during clock rate changes
	61dad2894f52 clk: Move VDD voltage voting from core clock to top clock
	0cbef8b6fc58 clk: qcom: Add support to log PLL/RCGR values in case of failure
	bcc43f7a193b clk: qcom: Add support for debugfs measure clock
	1ac9516f7402 clk: Export the clock driver's voltage voting APIs
	c4316254d2f9 clk: add/modify debugfs support for clocks
	d30b895f2155 clk: move check for CLK_ENABLE_HAND_OFF at unused tree
	11032174cac0 clk: Add support to provide OPP tables for clocks
	f349485712d2 clk: Add support to vote to regulator framework from clk framework
	81286aed669c clk: Check for failure at clk_change_rate
	6a4951a8308c clk: qcom: clk-voter: Add support for voter clocks
	b904878a04fb clk: Add support to set custom flags with clk_set_flags ]
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I95574f11053e8f3762c8d660183ce5004ff5cc5b
2020-04-02 16:27:12 -07:00
Saravana Kannan
1d887ea976 ANDROID: GKI: kernel: Export task and IRQ affinity symbols
A module uses these symbols. So, export them to allow loading of that
module.

Bug: 149816871
Bug: 149256712
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I949da5d091894ea3d79a6c9244bfc2f8426eee71
(cherry picked from commit dc928ba3bdfb4527e0ffca7c491d946a02e5bd11)
[ qperret: made changes to commit message for AOSP compliance ]
Signed-off-by: Quentin Perret <qperret@google.com>
2020-04-02 16:27:12 -07:00
Saravana Kannan
95b8a4b5b1 ANDROID: GKI: regulator: core: Add support for regulator providers with sync state
Regulator providers whose drivers have sync_state() implemented will
disable their regulators once all their consumers have probed. So during
late_initcall_sync(), don't disable unused regulators of these regulator
providers.

Also, provide a regulator_sync_state() API that regulator providers can
use to disable all their unused regulators once the get their
sync_state() callback.

Bug: 144127090
Bug: 150508586
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I5cc32730214c8e769c2a55cbe3b702cf6bb9016a
2020-04-02 16:27:12 -07:00
David Collins
4bad67ba2a ANDROID: GKI: regulator: Call proxy-consumer functions for each regulator registered
Add a call to regulator_proxy_consumer_register() at the end of
regulator_register() and a call to
regulator_proxy_consumer_unregister() at the beginning of
regulator_unregister().  These calls ensure that proxy consumer
features may be used by any type of regulator regardless of the
driver supporting it.

Bug: 150508586
Change-Id: Ia70da1df47042fa673c42f389136557f868d19a3
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit ff753edc6d60e1e1043931409e6d3ac6e01b8108)
[Fixed minor conflicts from dropping an earlier debugfs patch]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-02 16:27:12 -07:00
David Collins
653a867e09 ANDROID: GKI: regulator: Add proxy consumer driver
Add a proxy consumer driver which can be used to ensure that a
given regulator maintains a certain minimum state during bootup.
Enable state, voltage, and current may be forced to specified
levels.

Bug: 150508586
Change-Id: I0ccc63a41684462684ac737fb2f4129a3e6e4aea
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit cf03466c074e912a8aa3e079e1b7ea1cc17b18ba)
[Also squashed e9a05bb4d3f0 "spdx: Modify spdx tag from GPL-2.0 to GPL-2.0-only"]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-02 16:27:12 -07:00