Commit graph

886,572 commits

Author SHA1 Message Date
Leon Romanovsky
899bfe24dc UPSTREAM: ipv6: silence compilation warning for non-IPV6 builds
commit 1faba27f11c8da244e793546a1b35a9b1da8208e upstream.

The W=1 compilation of allmodconfig generates the following warning:

net/ipv6/icmp.c:448:6: warning: no previous prototype for 'icmp6_send' [-Wmissing-prototypes]
  448 | void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
      |      ^~~~~~~~~~

Fix it by providing function declaration for builds with ipv6 as a module.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 354fb7244f)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2d4f57e63640c18bf93c103da0a3b72c67152ed6
2021-03-05 06:50:46 +01:00
Eric Dumazet
f1c0684934 UPSTREAM: ipv6: icmp6: avoid indirect call for icmpv6_send()
commit cc7a21b6fbd945f8d8f61422ccd27203c1fafeb7 upstream.

If IPv6 is builtin, we do not need an expensive indirect call
to reach icmp6_send().

v2: put inline keyword before the type to avoid sparse warnings.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e528edf1e5)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d19f581c6360b4317e6934972845f6a39203de5
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
0682eb7280 UPSTREAM: xfrm: interface: use icmp_ndo_send helper
commit 45942ba890e6f35232727a5fa33d732681f4eb9f upstream.

Because xfrmi is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c30e93eee3)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I404cf4d493272eefd88c28b65712bca5f5e12744
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
fb836b54d0 UPSTREAM: sunvnet: use icmp_ndo_send helper
commit 67c9a7e1e3ac491b5df018803639addc36f154ba upstream.

Because sunvnet is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly. While we're
at it, doing the additional route lookup before calling icmp_ndo_send is
superfluous, since this is the job of the icmp code in the first place.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e1ec06b833)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia0ae7b14d4785c83547824563edb019c30cda79f
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
17060ca408 UPSTREAM: gtp: use icmp_ndo_send helper
commit e0fce6f945a26d4e953a147fe7ca11410322c9fe upstream.

Because gtp is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d8d268ce1a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I87cecb7368e63ad10a3a6a43d990797997019f92
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
61e9311bf7 UPSTREAM: icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
commit a8e41f6033a0c5633d55d6e35993c9e2005d872f upstream.

The icmpv6_send function has long had a static inline implementation
with an empty body for CONFIG_IPV6=n, so that code calling it doesn't
need to be ifdef'd. The new icmpv6_ndo_send function, which is intended
for drivers as a drop-in replacement with an identical function
signature, should follow the same pattern. Without this patch, drivers
that used to work with CONFIG_IPV6=n now result in a linker error.

Cc: Chen Zhou <chenzhou10@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 0b41713b6066 ("icmp: introduce helper for nat'd source address in network device context")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit dd28e735df)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4f30fef204264bd40c432e5e5408495b87e02d03
2021-03-05 06:50:45 +01:00
Jason A. Donenfeld
1188cb33bc UPSTREAM: icmp: introduce helper for nat'd source address in network device context
commit 0b41713b606694257b90d61ba7e2712d8457648b upstream.

This introduces a helper function to be called only by network drivers
that wraps calls to icmp[v6]_send in a conntrack transformation, in case
NAT has been used. We don't want to pollute the non-driver path, though,
so we introduce this as a helper to be called by places that actually
make use of this, as suggested by Florian.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2019554f96)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iec63f040ae2d82f3dc4bf1cd303a773e2e551b92
2021-03-05 06:50:45 +01:00
Xiaowen Wu
313f089215 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

3 Added functions:

  [A] 'function s32 __i2c_smbus_xfer(i2c_adapter*, u16, unsigned short int, char, u8, int, i2c_smbus_data*)'
  [A] 'function int i2c_get_device_id(const i2c_client*, i2c_device_identity*)'
  [A] 'function s32 i2c_smbus_read_byte(const i2c_client*)'

1 Added variable:

  [A] 'const irq_domain_ops irq_domain_simple_ops'

Bug: 181847974
Change-Id: I2a4de290bab1dfd84b055558bf59ae18922ff0db
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2021-03-04 14:43:14 -08:00
Hemant Kumar
5024508d0f ANDROID: ABI: Update allowed list for QCOM
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 int pcie_capability_clear_and_set_word(pci_dev*, int,
		  u16, u16)'

Bug: 180947505
Change-Id: Ied014fdef72f3b87f32ce4f0e41f1919addbb2d1
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2021-03-03 19:38:42 -08:00
Michael Specter
cb0830225a ANDROID: Adding kprobes build configs for Cuttlefish
Bug: 181054145
Change-Id: Ibb1362479469eae9c294f71a483e500db05b04e1
Signed-off-by: Michael Specter <mikespecter@google.com>
2021-02-28 04:50:28 +00:00
Paul Lawrence
75c93eb439 ANDROID: Incremental fs: Fix selinux issues
Bug: 177075428
Test: incfs_test passes
      atest GtsIncrementalInstallTestCases has only 8 failures
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I73accfc1982aec1cd7947996c25a23e4a97cfdac
2021-02-23 07:26:29 -08:00
Paul Lawrence
28688d32ed ANDROID: Incremental fs: Set credentials before reading/writing
Bug: 174692664
Test: incfs_test passes, incremental installs work with ag/13082306
Signed-off-by: Paul Lawrence <paullawrence@google.com>

Change-Id: Ib1c924bbaff759f58f7d83bad8e23d7224ba7ed9
2021-02-23 07:26:18 -08:00
Paul Lawrence
152fd8f044 ANDROID: Incremental fs: Fix memory leak on closing file
Bug: 179271514
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Idc42d02b1df5ac84bdd04e728bfcca5f4cc5d07b
2021-02-23 07:03:08 -08:00
Masaya Takahashi
29b2beadc6 ANDROID: GKI: update Sony KMI symbol list
Update the Sony abi list for ledtrig_transient.ko

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 led_set_brightness_nosleep(led_classdev*, led_brightness)'

Bug: 180692386
Signed-off-by: Masaya Takahashi <masaya.a.takahashi@sony.com>
Change-Id: I097a124fda2b5b48a2d7ad7d92d033eaa571bc21
2021-02-19 20:59:46 +09:00
John Stultz
c382bf8373 ANDROID: ABI updates for db845c (enabling wifi)
Update the db845c abi list after enabling wifi

Generated with:
  BUILD_CONFIG=common/build.config.db845c build/build_abi.sh -u
  build/build_abi.sh -u

Leaf changes summary: 34 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 34 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

34 Added functions:

  [A] 'function void __ieee80211_schedule_txq(ieee80211_hw*, ieee80211_txq*, bool)'
  [A] 'function int dev_pm_genpd_set_performance_state(device*, unsigned int)'
  [A] 'function void* device_get_mac_address(device*, char*, int)'
  [A] 'function thermal_cooling_device* devm_thermal_of_cooling_device_register(device*, device_node*, char*, void*, const thermal_cooling_device_ops*)'
  [A] 'function sk_buff* ieee80211_beacon_get_template(ieee80211_hw*, ieee80211_vif*, ieee80211_mutable_offsets*)'
  [A] 'function void ieee80211_beacon_loss(ieee80211_vif*)'
  [A] 'function u8 ieee80211_csa_update_counter(ieee80211_vif*)'
  [A] 'function ieee80211_sta* ieee80211_find_sta_by_ifaddr(ieee80211_hw*, const u8*, const u8*)'
  [A] 'function void ieee80211_iter_chan_contexts_atomic(ieee80211_hw*, void (ieee80211_hw*, ieee80211_chanctx_conf*, void*)*, void*)'
  [A] 'function void ieee80211_iterate_stations_atomic(ieee80211_hw*, void (void*, ieee80211_sta*)*, void*)'
  [A] 'function void ieee80211_manage_rx_ba_offl(ieee80211_vif*, const u8*, unsigned int)'
  [A] 'function ieee80211_txq* ieee80211_next_txq(ieee80211_hw*, u8)'
  [A] 'function void ieee80211_sta_register_airtime(ieee80211_sta*, unsigned char, unsigned int, unsigned int)'
  [A] 'function void ieee80211_tdls_oper_request(ieee80211_vif*, const u8*, nl80211_tdls_operation, u16, gfp_t)'
  [A] 'function sk_buff* ieee80211_tx_dequeue(ieee80211_hw*, ieee80211_txq*)'
  [A] 'function void ieee80211_tx_rate_update(ieee80211_hw*, ieee80211_sta*, ieee80211_tx_info*)'
  [A] 'function void ieee80211_txq_get_depth(ieee80211_txq*, unsigned long int*, unsigned long int*)'
  [A] 'function bool ieee80211_txq_may_transmit(ieee80211_hw*, ieee80211_txq*)'
  [A] 'function void ieee80211_txq_schedule_start(ieee80211_hw*, u8)'
  [A] 'function int pcie_capability_write_word(pci_dev*, int, u16)'
  [A] 'function const char* reg_initiator_name(nl80211_reg_initiator)'
  [A] 'function int rproc_add(rproc*)'
  [A] 'function void rproc_add_subdev(rproc*, rproc_subdev*)'
  [A] 'function rproc* rproc_alloc(device*, const char*, const rproc_ops*, const char*, int)'
  [A] 'function int rproc_coredump_add_custom_segment(rproc*, dma_addr_t, size_t, void (rproc*, rproc_dump_segment*, void*)*, void*)'
  [A] 'function int rproc_coredump_add_segment(rproc*, dma_addr_t, size_t)'
  [A] 'function int rproc_del(rproc*)'
  [A] 'function u32 rproc_elf_get_boot_addr(rproc*, const firmware*)'
  [A] 'function void rproc_free(rproc*)'
  [A] 'function rproc* rproc_get_by_child(device*)'
  [A] 'function void rproc_remove_subdev(rproc*, rproc_subdev*)'
  [A] 'function void rproc_report_crash(rproc*, rproc_crash_type)'
  [A] 'function thermal_cooling_device* thermal_cooling_device_register(const char*, void*, const thermal_cooling_device_ops*)'
  [A] 'function void wiphy_read_of_freq_limits(wiphy*)'

Bug: 146449535
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I6e3c8a52a394b7f151065f4792d22a5a94c7e8fa
2021-02-18 16:34:56 -08:00
John Stultz
2ae7c28a04 ANDROID: db845c_gki.fragment: Enable wifi on db845c w/ android-5.4
Add config settings to enable wifi via modules on db845c

Bug: 146449535
Change-Id: I81892c4cc48db7839fe99aa5fb0b0a0782cab321
Signed-off-by: John Stultz <john.stultz@linaro.org>
2021-02-18 16:25:02 -08:00
Bjorn Andersson
8f96c722f5 UPSTREAM: arm64: dts: qcom: sdm845: Add APSS watchdog node
commit ef8576789e869b7584684ae81126a465eb1deeb6 upstream.

Add a node describing the watchdog found in the application subsystem.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
(cherry picked from commit ef8576789e869b7584684ae81126a465eb1deeb6)
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I835d512c13c392e356c5190e865c0617e97041c2
2021-02-18 16:24:28 -08:00
Bjorn Andersson
1d2d51a301 UPSTREAM: arm64: dts: qcom: db845c: Move remoteproc firmware to sdm845
The redistributable firmware should work on any engineering device, so
lets push this to qcom/sdm845, rather than qcom/db845c. Also specify the
path for the modem firmware.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191113203951.3704428-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
(cherry picked from commit 82b1cc447a2c7c5121ce34f15f9840110ee3499f)
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ica785dd7faee17dce933379dbb6ada32a3697bdb
2021-02-18 16:23:58 -08:00
Bjorn Andersson
a09a63360b UPSTREAM: ath10k: qmi: Sleep for a while before assigning MSA memory
commit b70b3a36ec33a2c8d3292f3b33fe2047a8f57b9a upstream.

Unless we sleep for a while before transitioning the MSA memory to WLAN
the MPSS.AT.4.0.c2-01184-SDM845_GEN_PACK-1 firmware triggers a security
violation fairly reliably. Unforutnately recovering from this failure
always results in the entire system freezing.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit b70b3a36ec33a2c8d3292f3b33fe2047a8f57b9a)
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ie44e86d404f1897b7cc349a03972178374fef89c
2021-02-18 16:23:20 -08:00
Jeffrey Hugo
2d00c82d25 UPSTREAM: soc: qcom: qmi: Return EPROBE_DEFER if no address family
If a client comes up early in the boot process (perhaps was a built-in
driver), qmi_handle_init() will likely fail with a EAFNOSUPPORT since the
underlying ipc router hasn't init'd and registered the address family.
This should not be a fatal error since chances are, the router will come
up later, so recode the error to EPROBE_DEFER so that clients will retry
later.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lore.kernel.org/r/20191106230511.1290-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
(cherry picked from commit 52af26e33e700158e6549f1465fcf9da099fabfa)
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I26a0dabe9b1f3b8e9cc793f7f52ee8f658ecdce3
2021-02-18 16:22:46 -08:00
Tony Truong
240e180bd8 ANDROID: ABI: Update allowed list for QCOM
Add the following symbols to QCOM allowed-list:
-- pcie_bus_configure_settings

Bug: 180475310
Change-Id: I49ed1ada673a9199370344cf2b89d7369f92d3f2
Signed-off-by: Tony Truong <truong@codeaurora.org>
2021-02-18 14:25:28 +00:00
Masaya Takahashi
224ea2cd2c ANDROID: GKI: update Sony symbol list for texfat
Leaf changes summary: 60 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 60 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

60 Added functions:

  [A] 'function void __bforget(buffer_head*)'
  [A] 'function void __filemap_set_wb_err(address_space*, int)'
  [A] 'function void __pagevec_release(pagevec*)'
  [A] 'function void __sb_end_write(super_block*, int)'
  [A] 'function int __sb_start_write(super_block*, int, bool)'
  [A] 'function int __test_set_page_writeback(page*, bool)'
  [A] 'function int add_to_page_cache_locked(page*, address_space*, unsigned long int, gfp_t)'
  [A] 'function void balance_dirty_pages_ratelimited(address_space*)'
  [A] 'function int blkdev_issue_discard(block_device*, long long unsigned int, long long unsigned int, unsigned int, unsigned long int)'
  [A] 'function void block_invalidatepage(page*, unsigned int, unsigned int)'
  [A] 'function bool capable_wrt_inode_uidgid(const inode*, int)'
  [A] 'function int clear_page_dirty_for_io(page*)'
  [A] 'function int current_umask()'
  [A] 'function dentry* d_splice_alias(inode*, dentry*)'
  [A] 'function void end_page_writeback(page*)'
  [A] 'function int fiemap_check_flags(fiemap_extent_info*, u32)'
  [A] 'function int fiemap_fill_next_extent(fiemap_extent_info*, u64, u64, u64, u32)'
  [A] 'function int file_remove_privs(file*)'
  [A] 'function int file_update_time(file*)'
  [A] 'function int file_write_and_wait_range(file*, loff_t, loff_t)'
  [A] 'function int filemap_fdatawrite(address_space*)'
  [A] 'function int filemap_flush(address_space*)'
  [A] 'function int filemap_write_and_wait(address_space*)'
  [A] 'function int filemap_write_and_wait_range(address_space*, loff_t, loff_t)'
  [A] 'function ssize_t generic_file_direct_write(kiocb*, iov_iter*)'
  [A] 'function ssize_t generic_perform_write(file*, iov_iter*, loff_t)'
  [A] 'function ssize_t generic_write_checks(kiocb*, iov_iter*)'
  [A] 'function page* grab_cache_page_write_begin(address_space*, unsigned long int, unsigned int)'
  [A] 'function inode* igrab(inode*)'
  [A] 'function inode* ilookup5(super_block*, unsigned long int, int (inode*, void*)*, void*)'
  [A] 'function void inode_dio_wait(inode*)'
  [A] 'function int inode_newsize_ok(const inode*, long long int)'
  [A] 'function void inode_set_flags(inode*, unsigned int, unsigned int)'
  [A] 'function void iov_iter_advance(iov_iter*, unsigned long int)'
  [A] 'function unsigned long int iov_iter_alignment(const iov_iter*)'
  [A] 'function long int iov_iter_get_pages(iov_iter*, page**, unsigned long int, unsigned int, unsigned long int*)'
  [A] 'function ssize_t iter_file_splice_write(pipe_inode_info*, file*, loff_t*, size_t, unsigned int)'
  [A] 'function kmem_cache* kmem_cache_create_usercopy(const char*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, void (void*)*)'
  [A] 'function void ktime_get_coarse_real_ts64(timespec64*)'
  [A] 'function void ll_rw_block(int, int, int, buffer_head**)'
  [A] 'function void lru_cache_add_file(page*)'
  [A] 'function void mark_buffer_write_io_error(buffer_head*)'
  [A] 'function void mnt_drop_write_file(file*)'
  [A] 'function unsigned long int page_cache_next_miss(address_space*, unsigned long int, unsigned long int)'
  [A] 'function unsigned long int page_cache_prev_miss(address_space*, unsigned long int, unsigned long int)'
  [A] 'function unsigned int pagevec_lookup_range_tag(pagevec*, address_space*, unsigned long int*, unsigned long int, unsigned int)'
  [A] 'function int param_set_byte(const char*, const kernel_param*)'
  [A] 'function void put_pages_list(list_head*)'
  [A] 'function int redirty_page_for_writepage(writeback_control*, page*)'
  [A] 'function void set_nlink(inode*, unsigned int)'
  [A] 'function int setattr_prepare(dentry*, iattr*)'
  [A] 'function long long unsigned int simple_strtoull(const char*, char**, unsigned int)'
  [A] 'function int sync_inode_metadata(inode*, int)'
  [A] 'function void sync_inodes_sb(super_block*)'
  [A] 'function void tag_pages_for_writeback(address_space*, unsigned long int, unsigned long int)'
  [A] 'function void truncate_setsize(inode*, loff_t)'
  [A] 'function void try_to_writeback_inodes_sb(super_block*, wb_reason)'
  [A] 'function int vfs_fsync_range(file*, long long int, long long int, int)'
  [A] 'function void wait_on_page_bit(page*, int)'
  [A] 'function void writeback_inodes_sb(super_block*, wb_reason)'

Bug: 178455529
Signed-off-by: Masaya Takahashi <masaya.a.takahashi@sony.com>
Change-Id: I39c6be26264b1eba59e3fc0ba2a086dc4f9e1baa
2021-02-18 18:43:30 +09:00
Yongqin Liu
19c89b6bbf ANDROID: GKI: update KMI for db845c with idr_alloc_u32 added
to resolve the idr_alloc_u32 symbol not found problem,
like reported as the following:
    [    9.718675] init: Loading module /lib/modules/qrtr.ko with args ""
    [    9.724987] qcom-pcie 1c08000.pci: 1c08000.pci supply vddpe-3v3 not found, using dummy regulator
    [    9.733909] qcom-pcie 1c08000.pci: host bridge /soc@0/pci@1c08000 ranges:
    [    9.741378] qrtr: Unknown symbol idr_alloc_u32 (err -2)
    [    9.746741] qcom-pcie 1c08000.pci:    IO 0x40200000..0x402fffff -> 0x40200000
    [    9.753958] qcom-pcie 1c08000.pci:   MEM 0x40300000..0x5fffffff -> 0x40300000
    [    9.784507] init: Failed to insmod '/lib/modules/qrtr.ko' with args ''
    [    9.791151] init: LoadWithAliases was unable to load /lib/modules/qrtr.ko
    [    9.798037] init: LoadWithAliases was unable to load qrtr_tun
    [    9.804055] init: Failed to load kernel modules

Add this symbol to the .xml file:

Leaf changes summary: 1 artifact changed (80 filtered out)
Changed leaf types summary: 0 (80 filtered out) leaf types 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 int idr_alloc_u32(idr*, void*, unsigned int*, unsigned long int, unsigned int)'

Test: boot tested with db845c android11 build
Fixes: 4ef63e3654 ("net: qrtr: fix usage of idr in port assignment to socket")
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I62bf3ac2cccbc2fe7ca70986939ba4f593ca86a2
2021-02-17 19:18:53 +01:00
Greg Kroah-Hartman
9394e52285 Merge tag 'android11-5.4.86_r00' from 'android11-5.4-lts' into 'android11-5.4'
This merges the 5.4.86 upstream LTS release into the android11-5.4
branch so that all devices can get the needed important security and
other bugfixes that are in here.  All devices must upgrade to remain
properly secure from known issues.

Bug: 180469075
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1041e0d08d55a3eb2e0f49b7d2384960f48d9b11
2021-02-17 16:57:46 +01:00
Manaf Meethalavalappu Pallikunhi
d3c11f4ae4 ANDROID: ABI: Update allowed list for QCOM
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 int clk_notifier_unregister(clk*, notifier_block*)'

Bug: 180475184
Change-Id: Ifbbdfbb67dd5582144e345d0a2fa45065d0215ba
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2021-02-17 15:27:50 +00:00
Raviteja Tamatam
6b4f6cd53f ANDROID: ABI: update allowed list for QCOM
Update the android/abi_gki_aarch64_qcom with recent symbol additions.

No need to update the .xml file, as no new symbol addition.

Bug: 180426964
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Change-Id: I301d36b0385756d6cfd5924c2655d5b728637a24
2021-02-17 10:08:51 +05:30
Xiaowen Wu
1d9c43fa3b ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 11 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 11 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

11 Added functions:

  [A] 'function int drm_atomic_set_crtc_for_plane(drm_plane_state*, drm_crtc*)'
  [A] 'function void drm_atomic_set_fb_for_plane(drm_plane_state*, drm_framebuffer*)'
  [A] 'function void drm_connector_list_update(drm_connector*)'
  [A] 'function int drm_dp_mst_atomic_check(drm_atomic_state*)'
  [A] 'function void drm_dp_mst_dump_topology(seq_file*, drm_dp_mst_topology_mgr*)'
  [A] 'function bool drm_is_current_master(drm_file*)'
  [A] 'function drm_master* drm_master_get(drm_master*)'
  [A] 'function void drm_master_put(drm_master**)'
  [A] 'function void drm_mode_prune_invalid(drm_device*, list_head*, bool)'
  [A] 'function void drm_mode_sort(list_head*)'
  [A] 'function void drm_rect_rotate(drm_rect*, int, int, unsigned int)'

Bug: 180427255
Change-Id: I18bec99816010ff942849bf1f253b00a773a014e
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2021-02-16 16:36:56 -05:00
Andrey Konovalov
f682b4505d ANDROID: build_config: drop CONFIG_KASAN_PANIC_ON_WARN
CONFIG_KASAN_PANIC_ON_WARN was added in a custom patch for Pixel kernels,
which would make KASAN panic the kernel after the first report regardless
of whether the panic_on_warn parameter is set. (Coincidentally, that patch
also would break instrumentation mode selection for KASAN.)

As that patch was never applied to the common kernel,
CONFIG_KASAN_PANIC_ON_WARN doesn't exist here. This change drops the
non-existent CONFIG_KASAN_PANIC_ON_WARN from build.config.gki_kasan.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Change-Id: I9f42bb5f3515f18e2a5774241ea73a59d8883955
2021-02-15 18:29:03 +00:00
Maciej Żenczykowski
0934349866 BACKPORT: bpf: add bpf_ktime_get_boot_ns()
On a device like a cellphone which is constantly suspending
and resuming CLOCK_MONOTONIC is not particularly useful for
keeping track of or reacting to external network events.
Instead you want to use CLOCK_BOOTTIME.

Hence add bpf_ktime_get_boot_ns() as a mirror of bpf_ktime_get_ns()
based around CLOCK_BOOTTIME instead of CLOCK_MONOTONIC.

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
(cherry picked from commit 71d19214776e61b33da48f7c1b46e522c7f78221)
Change-Id: Ifd62c410dcc5112fd1a473a7e1f70231ca514bc0
2021-02-12 01:58:59 -08:00
Kamal Agrawal
2d04a808c6 ANDROID: ABI: update allowed list for QCOM
Update the android/abi_gki_aarch64_qcom with recent symbol additions.

Simple change and no need to update the .xml file, as no new symbol
addition.

Bug: 179747683
Signed-off-by: Neeraja P <neerp@codeaurora.org>
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Change-Id: I1d5252ed623f83611a5b064a8e0e33e4f0d188c5
2021-02-09 12:57:28 +05:30
Anson Huang
9533cdc100 BACKPORT: clk: composite: Export clk_hw_register_composite()
Export clk_hw_register_composite() to support user built as module.

ERROR: modpost: "clk_hw_register_composite" [drivers/clk/imx/mxc-clk.ko]
undefined!

(cherry picked from commit d7d7518fdcc8f43da69fb40073273e77f24be24f)
[Jindong: Resolved minor conflict in drivers/clk/clk-composite.c ]
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Change-Id: I54496d44d4bf6599af3a3ec9c40c02556d55cf17
2021-02-05 21:39:00 +00:00
Jindong Yue
a9cae6eab7 ANDROID: PCI: dwc: Export symbols for ep driver
Several symbols in DesignWare PCI Core driver are used
to support PCIe controller work at Endpoint Mode.
Export them to support such driver built as module.

Bug: 159736148
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Change-Id: I2c77bfbfbec750ecdf21f0cd1bbb20fe339a2f0c
2021-02-03 22:20:28 +00:00
Thomas Gleixner
904fb159c9 UPSTREAM: futex: Handle faults correctly for PI futexes
commit 34b1a1ce1458f50ef27c54e28eb9b1947012907a upstream

fixup_pi_state_owner() tries to ensure that the state of the rtmutex,
pi_state and the user space value related to the PI futex are consistent
before returning to user space. In case that the user space value update
faults and the fault cannot be resolved by faulting the page in via
fault_in_user_writeable() the function returns with -EFAULT and leaves
the rtmutex and pi_state owner state inconsistent.

A subsequent futex_unlock_pi() operates on the inconsistent pi_state and
releases the rtmutex despite not owning it which can corrupt the RB tree of
the rtmutex and cause a subsequent kernel stack use after free.

It was suggested to loop forever in fixup_pi_state_owner() if the fault
cannot be resolved, but that results in runaway tasks which is especially
undesired when the problem happens due to a programming error and not due
to malice.

As the user space value cannot be fixed up, the proper solution is to make
the rtmutex and the pi_state consistent so both have the same owner. This
leaves the user space value out of sync. Any subsequent operation on the
futex will fail because the 10th rule of PI futexes (pi_state owner and
user space value are consistent) has been violated.

As a consequence this removes the inept attempts of 'fixing' the situation
in case that the current task owns the rtmutex when returning with an
unresolvable fault by unlocking the rtmutex which left pi_state::owner and
rtmutex::owner out of sync in a different and only slightly less dangerous
way.

Fixes: 1b7558e457 ("futexes: fix fault handling in futex_lock_pi")
Reported-by: gzobqq@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 34b1a1ce1458f50ef27c54e28eb9b1947012907a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iabd44dad5d4b8385b8a20e44d18308708cc3b701
2021-01-29 13:16:10 +01:00
Thomas Gleixner
dddad86240 UPSTREAM: futex: Simplify fixup_pi_state_owner()
commit f2dac39d93987f7de1e20b3988c8685523247ae2 upstream

Too many gotos already and an upcoming fix would make it even more
unreadable.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f2dac39d93987f7de1e20b3988c8685523247ae2)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5a97587c0f696d4f4b849f7f106990a5587fa402
2021-01-29 13:16:01 +01:00
Thomas Gleixner
d245cfa173 UPSTREAM: futex: Use pi_state_update_owner() in put_pi_state()
commit 6ccc84f917d33312eb2846bd7b567639f585ad6d upstream

No point in open coding it. This way it gains the extra sanity checks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6ccc84f917d33312eb2846bd7b567639f585ad6d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic34513518cd4996b3eb4cb82b669d727be522597
2021-01-29 13:15:51 +01:00
Thomas Gleixner
cfe591bb90 UPSTREAM: rtmutex: Remove unused argument from rt_mutex_proxy_unlock()
commit 2156ac1934166d6deb6cd0f6ffc4c1076ec63697 upstream

Nothing uses the argument. Remove it as preparation to use
pi_state_update_owner().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2156ac1934166d6deb6cd0f6ffc4c1076ec63697)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I126088d93c5f05db654e508dfd4195e5c1696164
2021-01-29 13:15:42 +01:00
Thomas Gleixner
a60fba3000 UPSTREAM: futex: Provide and use pi_state_update_owner()
commit c5cade200ab9a2a3be9e7f32a752c8d86b502ec7 upstream

Updating pi_state::owner is done at several places with the same
code. Provide a function for it and use that at the obvious places.

This is also a preparation for a bug fix to avoid yet another copy of the
same code or alternatively introducing a completely unpenetratable mess of
gotos.

Originally-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c5cade200ab9a2a3be9e7f32a752c8d86b502ec7)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I17a67806a035338a55b27eea673d707fc4d8c529
2021-01-29 13:15:27 +01:00
Thomas Gleixner
97500641e2 UPSTREAM: futex: Replace pointless printk in fixup_owner()
commit 04b79c55201f02ffd675e1231d731365e335c307 upstream

If that unexpected case of inconsistent arguments ever happens then the
futex state is left completely inconsistent and the printk is not really
helpful. Replace it with a warning and make the state consistent.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 04b79c55201f02ffd675e1231d731365e335c307)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I32bd64130d9414f65155ecd80646d01eb4374a60
2021-01-29 13:15:18 +01:00
Thomas Gleixner
3a0f91fd81 UPSTREAM: futex: Ensure the correct return value from futex_lock_pi()
commit 12bb3f7f1b03d5913b3f9d4236a488aa7774dfe9 upstream

In case that futex_lock_pi() was aborted by a signal or a timeout and the
task returned without acquiring the rtmutex, but is the designated owner of
the futex due to a concurrent futex_unlock_pi() fixup_owner() is invoked to
establish consistent state. In that case it invokes fixup_pi_state_owner()
which in turn tries to acquire the rtmutex again. If that succeeds then it
does not propagate this success to fixup_owner() and futex_lock_pi()
returns -EINTR or -ETIMEOUT despite having the futex locked.

Return success from fixup_pi_state_owner() in all cases where the current
task owns the rtmutex and therefore the futex and propagate it correctly
through fixup_owner(). Fixup the other callsite which does not expect a
positive return value.

Fixes: c1e2f0eaf0 ("futex: Avoid violating the 10th rule of futex")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 12bb3f7f1b03d5913b3f9d4236a488aa7774dfe9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6dfb7407620fdf8293edbfbe54463f0c8ff63a57
2021-01-29 13:15:05 +01:00
Wang Hai
19193ef53a UPSTREAM: Revert "mm/slub: fix a memory leak in sysfs_slab_add()"
commit 757fed1d0898b893d7daa84183947c70f27632f3 upstream.

This reverts commit dde3c6b72a16c2db826f54b2d49bdea26c3534a2.

syzbot report a double-free bug. The following case can cause this bug.

 - mm/slab_common.c: create_cache(): if the __kmem_cache_create() fails,
   it does:

	out_free_cache:
		kmem_cache_free(kmem_cache, s);

 - but __kmem_cache_create() - at least for slub() - will have done

	sysfs_slab_add(s)
		-> sysfs_create_group() .. fails ..
		-> kobject_del(&s->kobj); .. which frees s ...

We can't remove the kmem_cache_free() in create_cache(), because other
error cases of __kmem_cache_create() do not free this.

So, revert the commit dde3c6b72a16 ("mm/slub: fix a memory leak in
sysfs_slab_add()") to fix this.

Reported-by: syzbot+d0bd96b4696c1ef67991@syzkaller.appspotmail.com
Fixes: dde3c6b72a16 ("mm/slub: fix a memory leak in sysfs_slab_add()")
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 757fed1d0898b893d7daa84183947c70f27632f3)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3743749e527dddde63620ac16a0db66c475ac404
2021-01-29 13:15:03 +01:00
Dan Carpenter
364ec3d27d UPSTREAM: futex: Don't enable IRQs unconditionally in put_pi_state()
commit 1e106aa3509b86738769775969822ffc1ec21bf4 upstream.

The exit_pi_state_list() function calls put_pi_state() with IRQs disabled
and is not expecting that IRQs will be enabled inside the function.

Use the _irqsave() variant so that IRQs are restored to the original state
instead of being enabled unconditionally.

Fixes: 153fbd1226 ("futex: Fix more put_pi_state() vs. exit_pi_state_list() races")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201106085205.GA1159983@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2192d905df)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I10bc011b54ffc6d66c0a499ecebfa5b2d96d58ce
2021-01-29 13:13:00 +01:00
Mike Galbraith
6f8f2dc71c UPSTREAM: futex: Handle transient "ownerless" rtmutex state correctly
commit 9f5d1c336a10c0d24e83e40b4c1b9539f7dba627 upstream.

Gratian managed to trigger the BUG_ON(!newowner) in fixup_pi_state_owner().
This is one possible chain of events leading to this:

Task Prio       Operation
T1   120	lock(F)
T2   120	lock(F)   -> blocks (top waiter)
T3   50 (RT)	lock(F)   -> boosts T1 and blocks (new top waiter)
XX   		timeout/  -> wakes T2
		signal
T1   50		unlock(F) -> wakes T3 (rtmutex->owner == NULL, waiter bit is set)
T2   120	cleanup   -> try_to_take_mutex() fails because T3 is the top waiter
     			     and the lower priority T2 cannot steal the lock.
     			  -> fixup_pi_state_owner() sees newowner == NULL -> BUG_ON()

The comment states that this is invalid and rt_mutex_real_owner() must
return a non NULL owner when the trylock failed, but in case of a queued
and woken up waiter rt_mutex_real_owner() == NULL is a valid transient
state. The higher priority waiter has simply not yet managed to take over
the rtmutex.

The BUG_ON() is therefore wrong and this is just another retry condition in
fixup_pi_state_owner().

Drop the locks, so that T3 can make progress, and then try the fixup again.

Gratian provided a great analysis, traces and a reproducer. The analysis is
to the point, but it confused the hell out of that tglx dude who had to
page in all the futex horrors again. Condensed version is above.

[ tglx: Wrote comment and changelog ]

Fixes: c1e2f0eaf0 ("futex: Avoid violating the 10th rule of futex")
Reported-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/87a6w6x7bb.fsf@ni.com
Link: https://lore.kernel.org/r/87sg9pkvf7.fsf@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2716e78a64)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9ab0878641624448cacb1951506b5accb4c92a00
2021-01-29 13:12:13 +01:00
Mateusz Nosek
4fe499637b UPSTREAM: futex: Fix incorrect should_fail_futex() handling
[ Upstream commit 921c7ebd1337d1a46783d7e15a850e12aed2eaa0 ]

If should_futex_fail() returns true in futex_wake_pi(), then the 'ret'
variable is set to -EFAULT and then immediately overwritten. So the failure
injection is non-functional.

Fix it by actually leaving the function and returning -EFAULT.

The Fixes tag is kinda blury because the initial commit which introduced
failure injection was already sloppy, but the below mentioned commit broke
it completely.

[ tglx: Massaged changelog ]

Fixes: 6b4f4bc9cb ("locking/futex: Allow low-level atomic operations to return -EAGAIN")
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200927000858.24219-1-mateusznosek0@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2db7590371)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I22198b7a65630cb5649f3e889810783b147bfada
2021-01-29 13:12:05 +01:00
Todd Kjos
52fd679fec ANDROID: add macros to create OEM data fields
Adds ANDROID_OEM_DATA and ANDROID_OEM_DATA_ARRAY macros
to add OEM-specific fields to kernel data structures
to enable value-added features implemented in vendor modules.
Fields defined with these macros must not be used by
SoC vendors who must use the ANDROID_VENDOR_DATA* macros
to add vendor fields.

Bug: 156285741
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I93a8a182a17854cc4f0a86835e833bf9b00ea0b8
2021-01-27 09:43:29 +00:00
Robin Murphy
c6617edf72 BACKPORT: arm64: perf: Support new DT compatibles
Add support for matching the new PMUs. For now, this just wires them up
as generic PMUv3 such that people writing DTs for new SoCs can do the
right thing, and at least have architectural and raw events be usable.
We can come back and fill in event maps for sysfs and/or perf tools at
a later date.

Change-Id: I0c0839f6fff87934e97708176f783514bdee7f58
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 29cc4ceeac1274ab8363a11b81ebd99f3b023985
 git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf)

Bug: 176519087
Link: https://lore.kernel.org/linux-arm-kernel/20200225190125.GA2781@bogus/T/#mdaa003324f263cc9541d412f7ba6b9519d6603fe
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: I335d4c9a9bfcfcfeb18b096cfe660209d3b62820
2021-01-27 08:48:28 +00:00
Ikjoon Jang
b227e97836 UPSTREAM: usb: xhci-mtk: fix unreleased bandwidth data
xhci-mtk needs XHCI_MTK_HOST quirk functions in add_endpoint() and
drop_endpoint() to handle its own sw bandwidth management.

It stores bandwidth data into an internal table every time
add_endpoint() is called, and drops those in drop_endpoint().
But when bandwidth allocation fails at one endpoint, all earlier
allocation from the same interface could still remain at the table.

This patch moves bandwidth management codes to check_bandwidth() and
reset_bandwidth() path. To do so, this patch also adds those functions
to xhci_driver_overrides and lets mtk-xhci to release all failed
endpoints in reset_bandwidth() path.

Fixes: 08e469de87 ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT")
Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Link: https://lore.kernel.org/r/20210113180444.v6.1.Id0d31b5f3ddf5e734d2ab11161ac5821921b1e1e@changeid
Cc: stable <stable@vger.kernel.org>
(cherry picked from commit 1d69f9d901ef14d81c3b004e3282b8cc7b456280
  https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I211875090c3b8080292a415fdb182fd4b8ac9729
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-01-26 18:23:27 +01:00
Yun Hsiang
b7f31af2f1 ANDROID: sched: add em_pd_energy vendor hook
We add a vendor hook for util to freq calculation in schedutil,
so we need to do corresponding change for energy calculation.

android_vh_em_pd_energy
	adjust energy calculation

Bug: 178021064

Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: Iae772cf07881602eea3f27aeb75fba753e7c2635
2021-01-21 10:32:49 +08:00
Yun Hsiang
68ecddcda8 ANDROID: schedutil: add vendor hook for adjusting util to freq calculation
Currently, the frequency is calculated by max freq * 1.25 * util / max cap.
Add a vendor hook to adjust the frequency when the calculation
overestimate.

android_vh_map_util_freq
	adjust util to freq calculation

Bug: 177845438

Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I9aa9079f00af7d3380b19f2fe21b75cddd107d15
2021-01-19 19:02:47 +00:00
jian.gong
247d907f7b ANDROID: ABI: update symbols of unisoc whitelist
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 0 artifact changed
Changed leaf types summary: 0 leaf type 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

Bug: 175337500
Change-Id: I2efd0a7074ddcb0a4f48564e7df0d8a1a7fd5ca9
Signed-off-by: jian.gong <jian.gong@unisoc.com>
2021-01-19 08:13:45 +00:00
Quentin Perret
1a955566df Revert "BACKPORT: FROMGIT: mm: improve mprotect(R|W) efficiency on pages referenced once"
This reverts commit fd0edef76b.

Reason for revert: Breaks CTS

Change-Id: I6d04bbe3bf119971b855a874acd374df911fb971
Signed-off-by: Quentin Perret <qperret@google.com>
2021-01-18 16:25:18 +00:00