Commit graph

798641 commits

Author SHA1 Message Date
Matthias Maennich
34513175d5 ANDROID: Drop ABI monitoring from KASAN build config
That should not be enabled nor tracked for the KASAN config.

Fixes: ed18ac2d4a ("ANDROID: KASAN support for GKI")
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I0d2fa1748bcfd844667f4b8c9e013d2fd24bca05
2020-05-13 15:11:47 +00:00
Max Spector
6e217bf259 ANDROID: Rename build.config.gki.arch_kasan
Rename build.config.gki.arch_kasan -> build.config.gki_kasan.arch
and build.config_kasan.gki -> build.config.gki_kasan

Bug: 152792812
Change-Id: I88beb1ec7342d480b717e42e50cd204c4ae43a24
Signed-off-by: Max Spector <mspector@google.com>
2020-05-13 15:10:51 +00:00
Matthias Maennich
3031e16419 ANDROID: Correct build.config branch name
Bug: 148979805
Change-Id: I948ed494ef08601392f0d6688a392e9cb37488b5
Signed-off-by: Matthias Maennich <maennich@google.com>
2020-05-05 13:46:27 +02:00
Jaegeuk Kim
c1fae4b255 UPSTREAM: Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-4.19.y' into android-4.19 (v5.7-rc1)
* aosp/upstream-f2fs-stable-linux-4.19.y:
  f2fs: keep inline_data when compression conversion
  f2fs: fix to disable compression on directory
  f2fs: add missing CONFIG_F2FS_FS_COMPRESSION
  f2fs: switch discard_policy.timeout to bool type
  f2fs: fix to verify tpage before releasing in f2fs_free_dic()
  f2fs: show compression in statx
  f2fs: clean up dic->tpages assignment
  f2fs: compress: support zstd compress algorithm
  f2fs: compress: add .{init,destroy}_decompress_ctx callback
  f2fs: compress: fix to call missing destroy_compress_ctx()
  f2fs: change default compression algorithm
  f2fs: clean up {cic,dic}.ref handling
  f2fs: fix to use f2fs_readpage_limit() in f2fs_read_multi_pages()
  f2fs: xattr.h: Make stub helpers inline
  f2fs: fix to avoid double unlock
  f2fs: fix potential .flags overflow on 32bit architecture
  f2fs: fix NULL pointer dereference in f2fs_verity_work()
  f2fs: fix to clear PG_error if fsverity failed
  f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmpfile()
  f2fs: don't trigger data flush in foreground operation
  f2fs: fix NULL pointer dereference in f2fs_write_begin()
  f2fs: clean up f2fs_may_encrypt()
  f2fs: fix to avoid potential deadlock
  f2fs: don't change inode status under page lock
  f2fs: fix potential deadlock on compressed quota file
  f2fs: delete DIO read lock
  f2fs: don't mark compressed inode dirty during f2fs_iget()
  f2fs: fix to account compressed blocks in f2fs_compressed_blocks()
  f2fs: xattr.h: Replace zero-length array with flexible-array member
  f2fs: fix to update f2fs_super_block fields under sb_lock
  f2fs: Add a new CP flag to help fsck fix resize SPO issues
  f2fs: Fix mount failure due to SPO after a successful online resize FS
  f2fs: use kmem_cache pool during inline xattr lookups
  f2fs: skip migration only when BG_GC is called
  f2fs: fix to show tracepoint correctly
  f2fs: avoid __GFP_NOFAIL in f2fs_bio_alloc
  f2fs: introduce F2FS_IOC_GET_COMPRESS_BLOCKS
  f2fs: fix to avoid triggering IO in write path
  f2fs: add prefix for f2fs slab cache name
  f2fs: introduce DEFAULT_IO_TIMEOUT
  f2fs: skip GC when section is full
  f2fs: add migration count iff migration happens
  f2fs: clean up bggc mount option
  f2fs: clean up lfs/adaptive mount option
  f2fs: fix to show norecovery mount option
  f2fs: clean up parameter of macro XATTR_SIZE()
  f2fs: clean up codes with {f2fs_,}data_blkaddr()
  f2fs: show mounted time
  f2fs: Use scnprintf() for avoiding potential buffer overflow
  f2fs: allow to clear F2FS_COMPR_FL flag
  f2fs: fix to check dirty pages during compressed inode conversion
  f2fs: fix to account compressed inode correctly
  f2fs: fix wrong check on F2FS_IOC_FSSETXATTR
  f2fs: fix to avoid use-after-free in f2fs_write_multi_pages()
  f2fs: fix to avoid using uninitialized variable
  f2fs: fix inconsistent comments
  f2fs: remove i_sem lock coverage in f2fs_setxattr()
  f2fs: cover last_disk_size update with spinlock
  f2fs: fix to check i_compr_blocks correctly
  f2fs: fix to avoid potential deadlock
  f2fs: add missing function name in kernel message
  f2fs: recycle unused compress_data.chksum feild
  f2fs: fix to avoid NULL pointer dereference
  f2fs: fix leaking uninitialized memory in compressed clusters
  f2fs: fix the panic in do_checkpoint()
  f2fs: fix to wait all node page writeback
  mm/swapfile.c: move inode_lock out of claim_swapfile
  fscrypt: don't evict dirty inodes after removing key

 Conflicts:
	fs/f2fs/file.c

Bug: 151226003
Change-Id: I86ee3579255cf2f37cf1a1d00ee4af90e973242a
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit 714629517b)
2020-04-15 03:11:30 +00:00
Will McVicker
b1461c0ee8 ANDROID: fix allmodconfig build to use the right toolchain
Without these changes, the user will be prompted for config changes.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153934356
Test: BUILD_CONFIG=common/build.config.allmodconfig.aarch64 build/build.sh
Change-Id: Ib9ef72b217d1e0d78edf136cfe560058e3126d18
2020-04-14 15:40:26 +00:00
Todd Kjos
2f78c8b03b Merge remote-tracking branch 'aosp/android-4.19' into android-4.19-stable
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ic799a450164a77a90bf1f0941f0b52ab538ab73e
2020-04-12 12:39:16 -07:00
Mark Salyzyn
33442ca135 ANDROID: GKI: export symbols required by SPECTRA_CAMERA
Partial cherry pick of commit 57c83854622c6ebee51444e4f2849266c0c40c50
("enable SPECTRA_CAMERA modularization")

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: build
Bug: 140652274
Bug: 140827934
Bug: 140865992
Change-Id: If33363b1198dd52595d8e6d4919e5c76b0451921
(cherry picked from commit 57c83854622c6ebee51444e4f2849266c0c40c50)
Bug: 153738240
2020-04-10 18:15:14 -07:00
Bhargav Gurappadi
4cde55b708 ANDROID: GKI: ARM/ARM64: Introduce arch_read_hardware_id
Moving towards device tree and arm single binary referring to
machine descriptor name for hardware id information under
/proc/cpuinfo is not sufficient for soc vendors. Add a
hook for soc vendors to supply a per-soc hardware read method

Change-Id: Ifcccdffa3c0e1e8b5f96837eb1c023e468d4c287
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Bhargav Gurappadi <bhargavg1@codeaurora.org>
(cherry picked from commit b39389c3a6)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
2020-04-10 18:15:14 -07:00
Quentin Perret
bf3b194518 ANDROID: GKI: drivers: base: soc: export symbols for socinfo
drivers/base/soc.c uses symbols defined in the base/soc driver, export
them to enable the socinfo modularization.

Bug: 144523239
Test: modules load, same devices probe on kona
Change-Id: Ie620bf6a8aa1b09faaf67a936c8bb0eba21f05fc
Signed-off-by: Quentin Perret <qperret@google.com>
Tested-by: Connor O'Brien <connoro@google.com>
(cherry picked from commit f21560c0cc37c80de35d20c1eba27eb044b16186)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
2020-04-10 18:15:14 -07:00
Mark Salyzyn
4edf27b0e9 ANDROID: GKI: Update ABI
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct snd_compr_tstamp at compress_offload.h:68:1' changed:
  type size changed from 160 to 192 (in bits)
  there are data member changes:
    type 'typedef __u32' of 'snd_compr_tstamp::copied_total' changed:
      typedef name changed from __u32 to __u64 at int-ll64.h:31:1
      35 impacted interfaces:
        function int devm_snd_soc_register_card(device*, snd_soc_card*)
        function int devm_snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
        function int snd_soc_add_component_controls(snd_soc_component*, const snd_kcontrol_new*, unsigned int)
        function void snd_soc_card_change_online_state(snd_soc_card*, int)
        function snd_kcontrol* snd_soc_card_get_kcontrol(snd_soc_card*, const char*)
        function int snd_soc_card_jack_new(snd_soc_card*, const char*, int, snd_soc_jack*, snd_soc_jack_pin*, unsigned int)
        function int snd_soc_component_disable_pin(snd_soc_component*, const char*)
        function int snd_soc_component_force_enable_pin(snd_soc_component*, const char*)
        function void snd_soc_component_init_regmap(snd_soc_component*, regmap*)
        function unsigned int snd_soc_component_read32(snd_soc_component*, unsigned int)
        function int snd_soc_component_set_sysclk(snd_soc_component*, int, int, unsigned int, int)
        function int snd_soc_component_update_bits(snd_soc_component*, unsigned int, unsigned int, unsigned int)
        function int snd_soc_component_write(snd_soc_component*, unsigned int, unsigned int)
        function int snd_soc_dai_get_channel_map(snd_soc_dai*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
        function int snd_soc_dai_set_channel_map(snd_soc_dai*, unsigned int, unsigned int*, unsigned int, unsigned int*)
        function int snd_soc_dai_set_fmt(snd_soc_dai*, unsigned int)
        function int snd_soc_dai_set_pll(snd_soc_dai*, int, int, unsigned int, unsigned int)
        function int snd_soc_dai_set_sysclk(snd_soc_dai*, int, unsigned int, int)
        function int snd_soc_dai_set_tdm_slot(snd_soc_dai*, unsigned int, unsigned int, int, int)
        function int snd_soc_dapm_add_routes(snd_soc_dapm_context*, const snd_soc_dapm_route*, int)
        function int snd_soc_dapm_ignore_suspend(snd_soc_dapm_context*, const char*)
        function snd_soc_dapm_widget* snd_soc_dapm_kcontrol_widget(snd_kcontrol*)
        function int snd_soc_dapm_mixer_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, snd_soc_dapm_update*)
        function int snd_soc_dapm_mux_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, soc_enum*, snd_soc_dapm_update*)
        function int snd_soc_dapm_new_controls(snd_soc_dapm_context*, const snd_soc_dapm_widget*, int)
        function int snd_soc_dapm_new_widgets(snd_soc_card*)
        function int snd_soc_dapm_sync(snd_soc_dapm_context*)
        function void snd_soc_jack_report(snd_soc_jack*, int, int)
        function int snd_soc_of_get_dai_link_codecs(device*, device_node*, snd_soc_dai_link*)
        function int snd_soc_of_parse_audio_routing(snd_soc_card*, const char*)
        function int snd_soc_of_parse_card_name(snd_soc_card*, const char*)
        function int snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
        function snd_soc_component* snd_soc_rtdcom_lookup(snd_soc_pcm_runtime*, const char*)
        function int snd_soc_unregister_card(snd_soc_card*)
        function snd_soc_component* soc_find_component(const device_node*, const char*)
    and size changed from 32 to 64 (in bits) (by +32 bits)
    '__u32 snd_compr_tstamp::pcm_frames' offset changed from 64 to 96 (in bits) (by +32 bits)
    '__u32 snd_compr_tstamp::pcm_io_frames' offset changed from 96 to 128 (in bits) (by +32 bits)
    '__u32 snd_compr_tstamp::sampling_rate' offset changed from 128 to 160 (in bits) (by +32 bits)
  35 impacted interfaces:
    function int devm_snd_soc_register_card(device*, snd_soc_card*)
    function int devm_snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
    function int snd_soc_add_component_controls(snd_soc_component*, const snd_kcontrol_new*, unsigned int)
    function void snd_soc_card_change_online_state(snd_soc_card*, int)
    function snd_kcontrol* snd_soc_card_get_kcontrol(snd_soc_card*, const char*)
    function int snd_soc_card_jack_new(snd_soc_card*, const char*, int, snd_soc_jack*, snd_soc_jack_pin*, unsigned int)
    function int snd_soc_component_disable_pin(snd_soc_component*, const char*)
    function int snd_soc_component_force_enable_pin(snd_soc_component*, const char*)
    function void snd_soc_component_init_regmap(snd_soc_component*, regmap*)
    function unsigned int snd_soc_component_read32(snd_soc_component*, unsigned int)
    function int snd_soc_component_set_sysclk(snd_soc_component*, int, int, unsigned int, int)
    function int snd_soc_component_update_bits(snd_soc_component*, unsigned int, unsigned int, unsigned int)
    function int snd_soc_component_write(snd_soc_component*, unsigned int, unsigned int)
    function int snd_soc_dai_get_channel_map(snd_soc_dai*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
    function int snd_soc_dai_set_channel_map(snd_soc_dai*, unsigned int, unsigned int*, unsigned int, unsigned int*)
    function int snd_soc_dai_set_fmt(snd_soc_dai*, unsigned int)
    function int snd_soc_dai_set_pll(snd_soc_dai*, int, int, unsigned int, unsigned int)
    function int snd_soc_dai_set_sysclk(snd_soc_dai*, int, unsigned int, int)
    function int snd_soc_dai_set_tdm_slot(snd_soc_dai*, unsigned int, unsigned int, int, int)
    function int snd_soc_dapm_add_routes(snd_soc_dapm_context*, const snd_soc_dapm_route*, int)
    function int snd_soc_dapm_ignore_suspend(snd_soc_dapm_context*, const char*)
    function snd_soc_dapm_widget* snd_soc_dapm_kcontrol_widget(snd_kcontrol*)
    function int snd_soc_dapm_mixer_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, snd_soc_dapm_update*)
    function int snd_soc_dapm_mux_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, soc_enum*, snd_soc_dapm_update*)
    function int snd_soc_dapm_new_controls(snd_soc_dapm_context*, const snd_soc_dapm_widget*, int)
    function int snd_soc_dapm_new_widgets(snd_soc_card*)
    function int snd_soc_dapm_sync(snd_soc_dapm_context*)
    function void snd_soc_jack_report(snd_soc_jack*, int, int)
    function int snd_soc_of_get_dai_link_codecs(device*, device_node*, snd_soc_dai_link*)
    function int snd_soc_of_parse_audio_routing(snd_soc_card*, const char*)
    function int snd_soc_of_parse_card_name(snd_soc_card*, const char*)
    function int snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
    function snd_soc_component* snd_soc_rtdcom_lookup(snd_soc_pcm_runtime*, const char*)
    function int snd_soc_unregister_card(snd_soc_card*)
    function snd_soc_component* soc_find_component(const device_node*, const char*)
'typedef __u32 at int-ll64.h:27:1' changed:
  typedef name changed from __u32 to __u64 at int-ll64.h:31:1
  35 impacted interfaces:
    function int devm_snd_soc_register_card(device*, snd_soc_card*)
    function int devm_snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
    function int snd_soc_add_component_controls(snd_soc_component*, const snd_kcontrol_new*, unsigned int)
    function void snd_soc_card_change_online_state(snd_soc_card*, int)
    function snd_kcontrol* snd_soc_card_get_kcontrol(snd_soc_card*, const char*)
    function int snd_soc_card_jack_new(snd_soc_card*, const char*, int, snd_soc_jack*, snd_soc_jack_pin*, unsigned int)
    function int snd_soc_component_disable_pin(snd_soc_component*, const char*)
    function int snd_soc_component_force_enable_pin(snd_soc_component*, const char*)
    function void snd_soc_component_init_regmap(snd_soc_component*, regmap*)
    function unsigned int snd_soc_component_read32(snd_soc_component*, unsigned int)
    function int snd_soc_component_set_sysclk(snd_soc_component*, int, int, unsigned int, int)
    function int snd_soc_component_update_bits(snd_soc_component*, unsigned int, unsigned int, unsigned int)
    function int snd_soc_component_write(snd_soc_component*, unsigned int, unsigned int)
    function int snd_soc_dai_get_channel_map(snd_soc_dai*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
    function int snd_soc_dai_set_channel_map(snd_soc_dai*, unsigned int, unsigned int*, unsigned int, unsigned int*)
    function int snd_soc_dai_set_fmt(snd_soc_dai*, unsigned int)
    function int snd_soc_dai_set_pll(snd_soc_dai*, int, int, unsigned int, unsigned int)
    function int snd_soc_dai_set_sysclk(snd_soc_dai*, int, unsigned int, int)
    function int snd_soc_dai_set_tdm_slot(snd_soc_dai*, unsigned int, unsigned int, int, int)
    function int snd_soc_dapm_add_routes(snd_soc_dapm_context*, const snd_soc_dapm_route*, int)
    function int snd_soc_dapm_ignore_suspend(snd_soc_dapm_context*, const char*)
    function snd_soc_dapm_widget* snd_soc_dapm_kcontrol_widget(snd_kcontrol*)
    function int snd_soc_dapm_mixer_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, snd_soc_dapm_update*)
    function int snd_soc_dapm_mux_update_power(snd_soc_dapm_context*, snd_kcontrol*, int, soc_enum*, snd_soc_dapm_update*)
    function int snd_soc_dapm_new_controls(snd_soc_dapm_context*, const snd_soc_dapm_widget*, int)
    function int snd_soc_dapm_new_widgets(snd_soc_card*)
    function int snd_soc_dapm_sync(snd_soc_dapm_context*)
    function void snd_soc_jack_report(snd_soc_jack*, int, int)
    function int snd_soc_of_get_dai_link_codecs(device*, device_node*, snd_soc_dai_link*)
    function int snd_soc_of_parse_audio_routing(snd_soc_card*, const char*)
    function int snd_soc_of_parse_card_name(snd_soc_card*, const char*)
    function int snd_soc_register_component(device*, const snd_soc_component_driver*, snd_soc_dai_driver*, int)
    function snd_soc_component* snd_soc_rtdcom_lookup(snd_soc_pcm_runtime*, const char*)
    function int snd_soc_unregister_card(snd_soc_card*)
    function snd_soc_component* soc_find_component(const device_node*, const char*)

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I1640fbb0386c752bb641576d658e7d6513d99ee7
2020-04-10 18:14:58 -07:00
Meng Wang
dbad92f6e8 ANDROID: GKI: ASoC: msm: fix integer overflow for long duration offload playback
32 bit variable is used for storing number of bytes copied to DSP,
which can overflow when playback duration goes beyond 24 hours.
Change data type for this variable to uint64_t to prevent overflow
and related playback anomaly.

Bug: 153747771
Test: compile
CRs-Fixed: 877677
Change-Id: Ie4dfa630cf89559bb784d4712c52526665baeca6
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit 5396710759)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: fixed merged conflict in compress_offload.c]
2020-04-11 00:30:41 +00:00
Hridya Valsaraju
a21df153db ANDROID: GKI: Bulk ABI update
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 4 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 Added functions:

  [A] 'function int sched_isolate_cpu(int)'
  [A] 'function int sched_unisolate_cpu(int)'
  [A] 'function int sched_unisolate_cpu_unlocked(int)'
  [A] 'function int set_task_boost(int, u64)'

Test: build
Bug: 149430094
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: Ia85d6bae9fcb536f63b38d4041c1f8e7fb10404c
2020-04-10 23:46:44 +00:00
Suren Baghdasaryan
f892b39288 Revert "ANDROID: GKI: mm: add struct/enum fields for SPECULATIVE_PAGE_FAULTS"
This reverts commit b85526df37.

Reason for revert: GKI does not support SPECULATIVE_PAGE_FAULTS until they are upstreamed.

Bug: 140544941
Change-Id: Ideeb6a11b8554618a20d736c3d8ca8b4ddcf6520
Test: build and compare ABI diffs
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-04-10 19:40:27 +00:00
Rohit Vaswani
c73cb2cce2 ANDROID: GKI: Revert "arm64: kill flush_cache_all()"
This reverts the upstream commit <68234df4ea79>
("arm64: kill flush_cache_all()"). This is required internally
for certain use-cases like flushing cache before reboot to
ensure all the data is available in the ramdump.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
(cherry picked from commit 208984f39c)
[surenb: resolve merge conflicts, do not add unused cpu_soft_restart
function because it conflicts with the function of the same name from
arch/arm64/kernel/cpu-reset.h]
Bug: 153349826
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I47b4f4ba4001c1fbb53794c6da0b3fdf641bd981
2020-04-10 16:01:53 +00:00
Rohit Vaswani
5f6e65274d ANDROID: GKI: Revert "arm64: Remove unused macros from assembler.h"
This reverts commit <d3127afa7123>
("arm64: Remove unused macros from assembler.h")
This is required for flush_cache_all to work.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
(cherry picked from commit fe53b823dc)
Bug: 153349826
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I75e4af597bdec8d4e49abcdfef28e86b2f06c21b
2020-04-10 16:01:42 +00:00
Tri Vo
e64d8dcc68 ANDROID: GKI: kernel/dma, mm/cma: Export symbols needed by vendor modules
This allows them to work with a GKI kernel.

Bug: 140651649
Bug: 140651863
Change-Id: I41ae14d90df31d552b2a0eab89a20d7ba8a9243d
Signed-off-by: Tri Vo <trong@google.com>
[saravanak partial cherry-pick and dropped a ton of changes]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-10 02:39:49 +00:00
Hridya Valsaraju
0a81e68654 ANDROID: GKI: mm: Export symbols __next_zones_zonelist and zone_watermark_ok_safe
These symbols are required to modularize driver for
qcom,msm-ion.

Bug: 147914088
Change-Id: Ice7f76c6a52c6cc94ad7076a1c2396a90d6aa9ca
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-10 02:39:42 +00:00
Quentin Perret
b21d7a0f7b ANDROID: GKI: mm/memblock: export memblock_overlaps_memory
The PIL driver needs it, export the symbol to enable compilation as a
module.

Bug: 144523239
Change-Id: I43692fa55d17c3196719c6606766d4fd5c5f6c65
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-10 02:39:32 +00:00
Will McVicker
3b0049b82e ANDROID: GKI: net, skbuff: export symbols needed by vendor drivers
These are needed to modularize them.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 151450270
Test: compile
Change-Id: I595b4f85cea0108c76bd776fc7087863040e65d9
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-10 02:38:59 +00:00
Saravana Kannan
61a3356ad1 ANDROID: GKI: Add stub __cpu_isolated_mask symbol
Some vendor modules might want to keep track of isolated CPUs. Add a
stub symbol that never isolates any CPU.

Bug: 149816871
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia494314168e94d72b0c1e8b786c150b9403dbf1a
2020-04-10 00:48:38 +00:00
Quentin Perret
eead51495c ANDROID: GKI: sched: stub sched_isolate symbols
These are needed to let modules load during compliance testing, but the
underlying core-isolation feature is not necessary for android-common.

Bug: 149816871
Test: compiled, checked abi diff for missing sched_*isolate* symbols
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Iaece1e98f821c50f2497b4a47b60714f49272750
2020-04-10 00:48:27 +00:00
Mark Salyzyn
d45df4b851 ANDROID: GKI: export saved_command_line
Some driver modules require the ability to parse the kernel command
line outside the <modulename>.parm=<val> set on Android.  For example
androidboot.console=.  Past attempts ('03) to upstream and export
this key piece of content has come under resistance because
preference has been to support the existing api __setup(str,func),
which is only available to built-in, and push modules towards only
using the documented kernel parameter interface cited above or to
Device Tree and not react to any other out-of-band content.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: compile
Bug: 142496416
Change-Id: Ia349dce6f7e467b40b9fd95e40f52ea9a8f7e51d
2020-04-10 00:48:14 +00:00
Hridya Valsaraju
ef29b001ed ANDROID: GKI: Update ABI
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 5 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function snd_info_entry* snd_info_create_subdir(module*, const char*, snd_info_entry*)'
  [A] 'function thermal_cooling_device* thermal_zone_get_cdev_by_name(const char*)'
  [A] 'function int usb_stop_endpoint(usb_device*, usb_host_endpoint*)'

Test: build
Bug: 151372815
Bug: 153446435
Bug: 149945768
Change-Id: If6385828052d6f6f787f134eb961298d06bef9ea
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 13:18:01 -07:00
Santosh Mardi
bd84ac72c1 ANDROID: GKI: ASoC: core: Update ALSA core to issue restart in underrun.
When compressed and pcm session is started the buffer pull will
Be from the DSP, in mmap mode for the scenario Hardware pointer
Is same as application pointer implies application has not filled the
Buffer to be send to DSP, and platform driver has to break and restart
The de queue process when the application has sufficient buffers.

When hardware pointer is same as application pointer it is an under run
Scenario where the ALSA framework has to trigger the under run and in HAL
The session has to re-prepare and re-triggered. based on the stop
Threshold, but in our system the stop threshold is INT_MAX which
Indicates that under run is not triggered in practical cases.

We have a brodcast usecase in which the mentioned under run case
Is hit mulitple times, and every time re-prepare and re-trigger will be
Expensive

Update the ASoC core framework to restart de queue process stopped
By platform Driver when the under run is hit, based on the available
Buffer and render flag, so the System will recover from the hang state.

To restart de queue process the ASoC core will be calling the restart
Callback registered by platform driver and this callback will be running in
Atomic context.

Test: build
Bug: 151372815
Change-Id: Ic9ea05a0dc6246346e9913493232882e2f5447d1
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit ddbe60b879)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:54 -07:00
Hridya Valsaraju
699c2634b6 ANDROID: GKI: SoC: pcm: Add a restart callback field to struct snd_pcm_ops
This is required to resolve ABI diff for struct snd_pcm_ops.

Test: build
Bug: 151372815
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: I380c4ddaa7aa8e5c606dd8db0a9d0c73ad1f7724
(cherry picked from commit ddbe60b879)
[hridya: amended commit to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:54 -07:00
Hridya Valsaraju
1b221c22c7 ANDROID: GKI: SoC: pcm: Add fields to struct snd_pcm_ops and struct snd_soc_component_driver
These are required to resolve the ABI diffs
for these structs.

Test: make
Bug: 151372815
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: Ic83229850787aaa07b5e1d0b22f3192afdd6e434
(cherry picked from commit 9206459050)
[hridya: commit amended to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:54 -07:00
Banajit Goswami
a24ebd9313 ANDROID: GKI: ASoC: core: Add compat_ioctl callback to struct snd_pcm_ops
This is required to resolve the ABI diff.

Test: build
Bug: 151372815
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Change-Id: I4757f9609bd14bd904bd1c90bd41986c2f7a4a64
(cherry picked from commit d5768539ed)
[hridya: amended commit to only include ABI diff]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:53 -07:00
Meng Wang
b224f6a82f ANDROID: GKI: ALSA: core: modify, rename and export create_subdir API
Modify create_subdir API, so that it can create a subdir
under a given parent directory and then register the info
entry. Also rename and export the API so that it can be
used to expose ID and version related information.

Test: build
Bug: 151372815
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit 454c5b5c34)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I8876b7ab22594766c9ec08c7289d8f38de7f00fa
2020-04-09 12:47:53 -07:00
Hemant Kumar
f7fbc946c2 ANDROID: GKI: usb: Add helper API to issue stop endpoint command
This API is used to issue stop endpoint command on
requested endpoint in order to retire all active TRBs
in the transfer ring.

Test: build
Bug: 153446435
Change-Id: I312772367a2cd293982a66ea8b75e04a8b1f2fd0
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 106c645a79)
[hridya: resolved minor conflicts, EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL,
added some null pointer checks]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:53 -07:00
George Lee
c0f9037932 ANDROID: GKI: Thermal: thermal_zone_get_cdev_by_name added
thermal_zone_get_cdev_by_name added to thermal_core for cooling device
querying by name.

Bug: 128625129
Bug: 143740346
Bug: 149945768
Test: build
Change-Id: I3253e61800f8514769d1efc33111dec1e9000e26
Signed-off-by: George Lee <geolee@google.com>
(cherry picked from commit e1a515b24088b0051506fa7d54c5b9d6e6b870b0)
Signed-off-by: TeYuan Wang <kamewang@google.com>
(cherry picked from commit 5e9b1d82fd78cc6e91d18892e117341fa36ad315)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-09 12:47:53 -07:00
Mark Salyzyn
69672dd58d ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m
Automatically generated by add_EXPORT_SYMBOL_GPL

The following symbols are exported:
 - generic_device_group
 - iommu_alloc_resv_region
 - iommu_device_link
 - iommu_device_register
 - iommu_device_sysfs_add
 - iommu_device_unlink
 - iommu_group_get_for_dev
 - iommu_group_ref_get
 - of_phandle_iterator_args
 - pci_device_group
 - pci_for_each_dma_alias
 - pci_request_acs
 - __tracepoint_smmu_init
 - __tracepoint_tlbi_end
 - __tracepoint_tlbi_start
 - __tracepoint_tlbsync_timeout

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: compile
Bug: 149990629
Change-Id: Ie66885b3ddeefcb1117d97fe4100e1a250f0e5c6
2020-04-09 17:03:10 +00:00
Kelly Rossmoyer
e7b509cf04 ANDROID: power: wakeup_reason: wake reason enhancements
These changes build upon the existing Android kernel wakeup reason code
to:
* improve the positioning of suspend abort logging calls in suspend flow
* add logging of abnormal wakeup reasons like unexpected HW IRQs and
  IRQs configured as both wake-enabled and no-suspend
* add support for capturing deferred-processing threaded nested IRQs as
  wakeup reasons rather than their synchronously-processed parents

Bug: 150970830
Bug: 140217217

Signed-off-by: Kelly Rossmoyer <krossmo@google.com>
Change-Id: I903b811a0fe11a605a25815c3a341668a23de700
2020-04-09 15:27:37 +00:00
Kees Cook
dba8725f4c BACKPORT: FROMGIT: kbuild: mkcompile_h: Include $LD version in /proc/version
When doing Clang builds of the kernel, it is possible to link with
either ld.bfd (binutils) or ld.lld (LLVM), but it is not possible to
discover this from a running kernel. Add the "$LD -v" output to
/proc/version.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Fangrui Song <maskray@google.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 153484457
(cherry picked from commit 6f04f056df3c
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
 for-next)
[nd: commit 4b950bb9ac0c ("Kbuild: Handle PREEMPT_RT for version string and magic")
     missing in 4.19, first landed in 5.4-rc1.
     commit b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution")
     missing in 4.19, first landed in 5.1-rc1.
]
Change-Id: Ifa5a98fe159392862e8d07a733c0f141fa9c7715
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2020-04-09 15:16:12 +00:00
Saravana Kannan
0548ed6756 ANDROID: GKI: kernel: Export symbols needed by msm_minidump.ko and minidump_log.ko
These symbols are used by these modules. Export them so that these
modules can be loaded.

Bug: 149258398
Test: compile
Change-Id: Ie29c2811c07944b5a01dbc47b7a60dd56fe2aa5b
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit 9d5b6d29f017e1ae5df2dac53694382b24393f5f)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-09 00:55:32 +00:00
Will McVicker
c55f3a7a60 ANDROID: Bulk update the ABI xml
Leaf changes summary: 9 artifacts changed (1 filtered out)
Changed leaf types summary: 7 (1 filtered out) 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

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153583123
Bug: 151154716
Bug: 153490586
Bug: 153490586
Bug: 149816871
Bug: 147895101
Bug: 148872640
Bug: 150638107
Test: compile
Change-Id: Iea8fedd5848d9b6cb0ff55ce91c4e2b2b16b5e1c
2020-04-08 14:40:05 -07:00
Will McVicker
a83dd23367 ANDROID: gki_defconfig: add CONFIG_IPV6_SUBTREES
Enable for both arm64 and x86.

Change-Id: I091241994ac5199d6b4e8131cff2affb11569ade
Bug: 153583123
Test: compile
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-08 14:34:35 -07:00
Greg Kroah-Hartman
ba200d39ad ANDROID: GKI: arm64: reserve space in cpu_hwcaps and cpu_hwcap_keys arrays
Since cpu_hwcaps and cpu_hwcap_keys are exported symbols, reserve
space in them for any future cpu capabilities or erratas.

Bug: 151154716
Bug: 153490586
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I35930dd52d98817831d812f35560a2605804a553
(cherry picked from commit 9c406803119f6f1a86fe2d693e5dbe1e849c9d42)
Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: updated ARM64_NCAPS value to patch current range]
2020-04-08 14:34:10 -07:00
Patrick Daly
7f3e23b3d8 ANDROID: GKI: of: reserved_mem: Fix kmemleak crash on no-map region
Unable to handle kernel paging request at virtual address
[<ffffff849b434d88>] scan_block+0x88/0x170
[<ffffff849b435070>] scan_gray_list+0x18c/0x1c0
[<ffffff849b4352ac>] kmemleak_scan+0x208/0x4b0
[<ffffff849b4359ec>] kmemleak_write+0x338/0x378
[<ffffff849b571068>] full_proxy_write+0x80/0xe4
[<ffffff849b43fe7c>] vfs_write+0xb4/0x1d0

early_init_dt_alloc_reserved_memory_arch() calls memblock_alloc_base(),
which will create a kmemleak entry. Ensure this entry is ignored if
the no-map property is set. This will prevent kmemleak from scanning
the object if there is no kernel mapping for it.

Bug: 153490586
Test: compile, verify MODVERSIONS CRC
Change-Id: I45f35600ae2aacf0f10f8bcbc956d019b666e4a7
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
(cherry picked from commit cf512e1d2c)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-08 14:34:09 -07:00
Will McVicker
36e1278b55 ANDROID: GKI: sched: add task boost vendor fields to task_struct
Adds vendor fields for task boosting in task_struct.

Signed-off-by: Will McVicker <willmcvicker@google.com>
[willmcvicker: pulled in ABI changes only]
Bug: 149816871
Bug: 147895101
Test: compile, verify ABI diff
Change-Id: I96acc4d5e47499c0e32e341caddec2140c13e5a8
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: blong <blong@codeaurora.org>
(cherry picked from commit 7ed681a974)
2020-04-08 14:34:09 -07:00
Vinayak Menon
135415b1ff ANDROID: GKI: mm: add rss counter for unreclaimable pages
Add a per mm rss counter to hold the unreclaimable
pages. This can include the pages allocated by a
task and shared with hardware for DMA etc.

Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit ade7f1cd6f)
Bug: 148872640
Change-Id: Iec77d69eca0a4f8f6e23f866c80c0143620fcaf2
2020-04-08 14:34:09 -07:00
Lina Iyer
b4441f0a82 ANDROID: GKI: irqdomain: add bus token DOMAIN_BUS_WAKEUP
Add new bus token to describe domains that are wakeup capable.

Bug: 150638107
Change-Id: Ic1c0f0d2882a20a28aabc100835ac249c7bb4eef
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit bb8e854f5c)
2020-04-08 14:34:09 -07:00
Mark Salyzyn
08bcbfbf7c ANDROID: GKI: arm64: fault: do_tlb_conf_fault_cb register fault callback
Allow for vendor components or modules to override
"TLB conflict abort" handler,

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: Verified with scripts/gki/device_snapshot
Test: No impact on /sys/ (except new module files) and /dev/
Test: All devices probed as before
Bug: 141888626
Change-Id: I7d0a4d7440412f2ffc611fe597d5d39d18a2a03a
(cherry picked from commit 75c07a4fbd301fbff1522e66996bad91617cd06f)
Bug: 149990629
2020-04-08 19:49:42 +00:00
Lina Iyer
723feab600 ANDROID: GKI: QoS: Enhance framework to support cpu/irq specific QoS requests
QoS request for CPU_DMA_LATENCY can be better optimized if the request
can be set only for the required cpus and not all cpus. This helps save
power on other cores, while still gauranteeing the quality of service.

Enhance the QoS constraints data structures to support target value for
each core. Requests specify if the QoS is applicable to all cores
(default) or to a selective subset of the cores or to a core(s), that the
IRQ is affine to.

QoS requests that need to track an IRQ can be set to apply only on the
cpus to which the IRQ's smp_affinity attribute is set to. The QoS
framework will automatically track IRQ migration between the cores. The
QoS is updated to be applied only to the core(s) that the IRQ has been
migrated to.

Idle and interested drivers can request a PM QoS value for a constraint
across all cpus, or a specific cpu or a set of cpus. Separate APIs have
been added to request for individual cpu or a cpumask.  The default
behaviour of PM QoS is maintained i.e, requests that do not specify a
type of the request will continue to be effected on all cores.  Requests
that want to specify an affinity of cpu(s) or an irq, can modify the PM
QoS request data structures by specifying the type of the request and
either the mask of the cpus or the IRQ number depending on the type.
Updating the request does not reset the type of the request.

The userspace sysfs interface does not support CPU/IRQ affinity.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
(cherry picked from commit 16cafdb44f)

Bug: 153463922
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1aad836a985fd303f2254fe607bb909a6b720dd5
2020-04-08 16:37:25 +00:00
Saravana Kannan
b55bfe2fd5 ANDROID: GKI: Bulk ABI update
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct devfreq at devfreq.h:148:1' changed:
  type size changed from 13824 to 14144 (in bits)
  2 data member insertions:
    'mutex devfreq::event_lock', at offset 384 (in bits) at devfreq.h:152:1
    'bool devfreq::dev_suspended', at offset 14080 (in bits) at devfreq.h:178:1
  there are data member changes:
    'device devfreq::dev' offset changed from 384 to 640 (in bits) (by +256 bits)
    'devfreq_dev_profile* devfreq::profile' offset changed from 6656 to 6912 (in bits) (by +256 bits)
    'const devfreq_governor* devfreq::governor' offset changed from 6720 to 6976 (in bits) (by +256 bits)
    'char devfreq::governor_name[16]' offset changed from 6784 to 7040 (in bits) (by +256 bits)
    'notifier_block devfreq::nb' offset changed from 6912 to 7168 (in bits) (by +256 bits)
    'delayed_work devfreq::work' offset changed from 7104 to 7360 (in bits) (by +256 bits)
    'unsigned long int devfreq::previous_freq' offset changed from 7808 to 8064 (in bits) (by +256 bits)
    'devfreq_dev_status devfreq::last_status' offset changed from 7872 to 8128 (in bits) (by +256 bits)
    'void* devfreq::data' offset changed from 8128 to 8384 (in bits) (by +256 bits)
    'unsigned long int devfreq::min_freq' offset changed from 8192 to 8448 (in bits) (by +256 bits)
    'unsigned long int devfreq::max_freq' offset changed from 8256 to 8512 (in bits) (by +256 bits)
    'unsigned long int devfreq::scaling_min_freq' offset changed from 8320 to 8576 (in bits) (by +256 bits)
    'unsigned long int devfreq::scaling_max_freq' offset changed from 8384 to 8640 (in bits) (by +256 bits)
    'bool devfreq::stop_polling' offset changed from 8448 to 8704 (in bits) (by +256 bits)
    'unsigned int devfreq::total_trans' offset changed from 8480 to 8736 (in bits) (by +256 bits)
    'unsigned int* devfreq::trans_table' offset changed from 8512 to 8768 (in bits) (by +256 bits)
    'unsigned long int* devfreq::time_in_state' offset changed from 8576 to 8832 (in bits) (by +256 bits)
    'unsigned long int devfreq::last_stat_updated' offset changed from 8640 to 8896 (in bits) (by +256 bits)
    'srcu_notifier_head devfreq::transition_notifier_list' offset changed from 8704 to 8960 (in bits) (by +256 bits)
  20 impacted interfaces:
    function devfreq* devfreq_add_device(device*, devfreq_dev_profile*, const char*, void*)
    function int devfreq_add_governor(devfreq_governor*)
    function void devfreq_interval_update(devfreq*, unsigned int*)
    function void devfreq_monitor_resume(devfreq*)
    function void devfreq_monitor_start(devfreq*)
    function void devfreq_monitor_stop(devfreq*)
    function void devfreq_monitor_suspend(devfreq*)
    function int devfreq_remove_device(devfreq*)
    function int devfreq_remove_governor(devfreq_governor*)
    function int devfreq_resume_device(devfreq*)
    function int devfreq_suspend_device(devfreq*)
    function devfreq* devm_devfreq_add_device(device*, devfreq_dev_profile*, const char*, void*)
    function thermal_cooling_device* of_devfreq_cooling_register(device_node*, devfreq*)
    function int ufshcd_dme_get_attr(ufs_hba*, u32, u32*, u8)
    function int ufshcd_dme_set_attr(ufs_hba*, u32, u8, u32, u8)
    function u32 ufshcd_get_local_unipro_ver(ufs_hba*)
    function int ufshcd_hold(ufs_hba*, bool)
    function void ufshcd_release(ufs_hba*)
    function void ufshcd_remove(ufs_hba*)
    function int update_devfreq(devfreq*)

'struct regmap_irq_chip at regmap.h:1138:1' changed:
  type size hasn't changed
  1 data member insertion:
    'unsigned int regmap_irq_chip::clear_ack', at offset 288 (in bits) at regmap.h:1148:1
  there are data member changes:
    'bool regmap_irq_chip::type_invert' offset changed from 288 to 320 (in bits) (by +32 bits)
    'int regmap_irq_chip::num_regs' offset changed from 320 to 352 (in bits) (by +32 bits)
  3 impacted interfaces:
    function int devm_regmap_add_irq_chip(device*, regmap*, int, int, int, const regmap_irq_chip*, regmap_irq_chip_data**)
    function void devm_regmap_del_irq_chip(device*, int, regmap_irq_chip_data*)
    function int regmap_irq_get_virq(regmap_irq_chip_data*, int)

Bug: 149430094
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I1ce004bc7d52ef153ef54be9feb7f32cd031288e
2020-04-08 00:38:26 -07:00
Rama Aparna Mallavarapu
4f9183cc24 ANDROID: GKI: PM/devfreq: Do not switch governors from sysfs when device is suspended
There is a possibility to switch the governors from sysfs even when the
device is in suspended state. This can cause a NOC error at times when
trying to access the device's monitor registers in a suspended state. This
change fixes this issue. Introduce a variable dev_suspended to know if
the device is in suspended state or not. Check if the device is suspended
before switching the governor from sysfs.

Change-Id: I15055aa51daa35272be4667e5bafb8ccd7933098
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 9c41437c07)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-08 00:21:28 -07:00
Rama Aparna Mallavarapu
902ad8fa08 ANDROID: GKI: PM / devfreq: Fix race condition between suspend/resume and governor_store
There is a race condition when the event governor_store is being executed
from sysfs and the device issues a suspend. The devfreq data structures
would become stale when the suspend tries to access them in the middle
of the governor_store operation. Fix this issue by taking a lock around
suspend and resume operations so that these operations are not concurrent
with the other events from sysfs.

Also rename the sysfs_lock as event_lock since the same lock is used
for non sysfs operations like suspend and resume as well.

Change-Id: Ifa0e93915a920cec3e0429966328a1128d61098b
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 8bf200e713)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-08 00:21:28 -07:00
Jonathan Avila
8f43993c58 ANDROID: GKI: PM / devfreq: Introduce a sysfs lock
Currently, concurrent writes to sysfs entries leave the	possibility
for race conditions within the devfreq framework.  For example,
concurrently executing max_freq_store and governor_store can result
in attempting to perform an update_devfreq() before the new governor's
start handler can be executed.

A more concrete case is a race between polling_interval_store and
governor_store.  Because no lock is used after calling into the event
handler of the old governor and there's nothing preventing work from
being queued after the monitor is stopped, it's possible to
accidentally cause delayed work to be queued on the governor being
switched to.  This can be seen if you create two threads, one which
changes a device's governor between simple_ondemand and performance,
and one which changes its polling interval between 45 and 50.

All of these races can be addressed with the introduction of a lock
that prevents sysfs operations from interleaving in this fashion.

Change-Id: Ia6887dcb2d69dc2576837a6c09fed55a28943abc
Signed-off-by: Jonathan Avila <avilaj@codeaurora.org>
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Bug: 152343889
(cherry picked from commit 78fdd25c1a)
[saravanak Fixed some conflicts]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-08 00:21:28 -07:00
Ramprasad Katkam
171d2c87ca ANDROID: GKI: regmap: irq: Add support to clear ack registers
WCD codec requires clear registers to be written '1' and
'0' for clearing interrupts. Add this support in regmap irq
to clear ack registers.

Change-Id: I399592fc0ee7f3a01a32267684a9be340076ffb1
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Bug: 153500481
[saravanak Minor edit to commit text]
(cherry picked from commit 25401ed921)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-08 00:21:27 -07:00
Alistair Delva
6b5a4bd4a4 ANDROID: GKI: Remove SCHED_AUTOGROUP
This feature is undesirable and not required by Android.

Bug: 153460450
Change-Id: I548bb44b9fecc90ba2589fb74b4e4693e639a8c9
Signed-off-by: Alistair Delva <adelva@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
2020-04-08 05:59:48 +00:00
Will McVicker
a4923652a4 ANDROID: ignore compiler tag __must_check for GENKSYMS
GENKSYMS shouldn't care about the __must_check compiler flag. So strip
it out for GENKSYMS.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 153478475
Test: compile, check crc
Change-Id: I512639a4f719037728ffbfa48e7b766510c7d726
2020-04-07 21:31:57 +00:00