Commit Graph

976586 Commits

Author SHA1 Message Date
Jone Chou
2e04650661 ANDROID: kernel: clear debug_kinfo precisely
Clear debug_kinfo itself instead of whole reserved memory

Bug: 176088154
Bug: 175726952
Bug: 185982588
Signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: Ic322f6289b508a51c19cad17a2e264974d0b3e0e
2021-04-21 23:23:56 +00:00
lijianzhong
295ce88224 ANDROID: cgroup: Add vendor hook for cpuset.
add vendor hook for cpuset to support oem's feature.

Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: Ib93e05e5f6c338c5f7ada56bfebdd705f87f1f66
2021-04-21 13:31:39 -07:00
Georgi Djakov
e162c57223 ANDROID: GKI: Update abi_gki_aarch64_qcom for PSI tracepoints
Add the symbols needed for PSI tracing.

Leaf changes summary: 2 artifacts 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, 2 Added variables

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_psi_event'
  [A] 'tracepoint __tracepoint_android_vh_psi_group'

Bug: 178721511
Change-Id: Iccea9144563284502b3d3e1ecd50d7e68cf0b63a
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
2021-04-21 05:08:41 -07:00
Georgi Djakov
b79d1815c4 ANDROID: psi: Add vendor hooks for PSI tracing
Add hooks to capture various per-zone memory stats when
a trigger threshold is hit.

Bug: 178721511
Change-Id: Ibe39263ddb05ffc3fa63b5225497a90c6480c8d7
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
2021-04-21 05:08:41 -07:00
Pavankumar Kondeti
25ede723cd ANDROID: abi_gki_aarch64_qcom: Add android_rvh_sched_setaffinity
Add __tracepoint_android_rvh_sched_setaffinity symbol so that vendor
modules can use this hook to receive affinity changes of a task.

Leaf changes summary: 1 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, 1 Added variable

1 Added variable:

  [A] 'tracepoint __tracepoint_android_rvh_sched_setaffinity'

Bug: 185853895
Change-Id: Ie8cc30bee30dacfc909c8e12e9d3a4262f1050f7
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2021-04-21 07:54:28 +00:00
Alexander Potapenko
ef4ff626b3 ANDROID: gki_defconfig: temporarily disable KFENCE in GKI
Temporarily disable KFENCE to investigate a power regression we've
encountered on idle systems.
There is a potential fix already, but we don't want to further block the
performance team.

Bug: 185280916
Test: build

Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ic5e4f48b48d9c059e3087f85e9edcb6921bee012
2021-04-21 01:48:59 +00:00
Vijayanand Jitta
91a4e8d8c8 ANDROID: GKI: Update abi_gki_aarch64_qcom list for minidump
Update allowed list with symbols required for minidump.

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

8 Added functions:

  [A] 'function int get_each_dmabuf(int (const dma_buf*, void*)*, void*)'
  [A] 'function unsigned long int get_each_object_track(kmem_cache*, page*, track_item, int (const kmem_cache*, void*, const track*, void*)*, void*)'
  [A] 'function depot_stack_handle_t get_page_owner_handle(page_ext*, unsigned long int)'
  [A] 'function void get_slabinfo(kmem_cache*, slabinfo*)'
  [A] 'function page_ext* lookup_page_ext(const page*)'
  [A] 'function unsigned long int pcpu_nr_pages()'
  [A] 'function unsigned int stack_depot_fetch(depot_stack_handle_t, unsigned long int**)'
  [A] 'function unsigned long int vm_memory_committed()'

Bug: 184707700
Change-Id: I1f2a84b4a8156ddb2b5be2fe1dd4494ac5006b90
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-04-20 23:57:13 +00:00
Charan Teja Reddy
8cd9aa93b7 ANDROID: implement wrapper for reverse migration
Reverse migration is used to do the balancing the occupancy of memory
zones in a node in the system whose imabalance may be caused by
migration of pages to other zones by an operation, eg: hotremove and
then hotadding the same memory. In this case there is a lot of free
memory in newly hotadd memory which can be filled up by the previous
migrated pages(as part of offline/hotremove) thus may free up some
pressure in other zones of the node.

Upstream discussion: https://lore.kernel.org/patchwork/cover/1382106/

Change-Id: Ib3137dab0db66ecf6858c4077dcadb9dfd0c6b1c
Bug: 175403896
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2021-04-20 21:26:32 +00:00
rogercl.yang
ea527a52d1 ANDROID: cpuidle: enable TEO and MENU governors in gki_defconfig
TEO governor was implemented in android12-5.10, however CONFIG_CPU_IDLE_GOV_TEO
was not enabled in gki_defconfig and vendor can not select TEO governor.
This commit enable TEO and MENU governors in gki_defconfig, and vendors can
select the governor they wanted, e.g. in rc file:
write /sys/devices/system/cpu/cpuidle/current_governor "teo"

Besides, MENU governor's rating is 20, and higher than TEO governor,
so MENU governor is still the default governor if vendors not select the governor manually.

Bug: 185762657

Change-Id: I87be7c4d119f17901b921f22dd7df8b61ac539af
Signed-off-by: rogercl.yang <rogercl.yang@mediatek.com>
2021-04-20 17:26:34 +08:00
Rishabh Bhatnagar
3b9e4bd9f0 ANDROID: abi_gki_aarch64_qcom: Update symbol list
Add scmi_driver/protocol_register/unregister APIs to QCOM
symbol list. These symbols are required to add SCMI vendor
protocol modules on top of the SCMI core framework.

Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type 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 scmi_driver_register(scmi_driver*, module*, const char*)'
  [A] 'function void scmi_driver_unregister(scmi_driver*)'
  [A] 'function int scmi_protocol_register(const scmi_protocol*)'
  [A] 'function void scmi_protocol_unregister(const scmi_protocol*)'

Bug: 183967991
Change-Id: I19a2ed667ceafca103b8a216b26d9b463b95fb3a
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2021-04-19 22:42:52 +00:00
Nick Desaulniers
f096764239 ANDROID: clang: update to 12.0.5
Bug: 185804542
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: If3d0c122472d8979b326d8a6fece30d8b2af962a
2021-04-19 22:42:16 +00:00
Jaehyoung Choi
e16264e625 ANDROID: Add initial Exynos symbol list
Add initial symbol list for Exynos in android/abi_gki_aarch64_exynos.

Bug: 183447175

Leaf changes summary: 194 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 182 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 12 Added variables
Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info
Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info

182 Added functions:

  [A] 'function void __bitmap_complement(unsigned long int*, const unsigned long int*, unsigned int)'
  [A] 'function void __bitmap_or(unsigned long int*, const unsigned long int*, const unsigned long int*, unsigned int)'
  [A] 'function void __bitmap_xor(unsigned long int*, const unsigned long int*, const unsigned long int*, unsigned int)'
  [A] 'function clk_hw* __clk_hw_register_gate(device*, device_node*, const char*, const char*, const clk_hw*, const clk_parent_data*, unsigned long int, void*, u8, u8, spinlock_t*)'
  [A] 'function int __devm_irq_alloc_descs(device*, int, unsigned int, unsigned int, int, module*, const irq_affinity_desc*)'
  [A] 'function void __irq_set_handler(unsigned int, irq_flow_handler_t, int, const char*)'
  [A] 'function int __platform_register_drivers(platform_driver* const*, unsigned int, module*)'
  [A] 'function void __rb_erase_color(rb_node*, rb_root*, void (rb_node*, rb_node*)*)'
  [A] 'function void __rb_insert_augmented(rb_node*, rb_root*, void (rb_node*, rb_node*)*)'
  [A] 'function int __scsi_execute(scsi_device*, const unsigned char*, int, void*, unsigned int, unsigned char*, scsi_sense_hdr*, int, int, u64, req_flags_t, int*)'
  [A] 'function void clk_hw_unregister_gate(clk_hw*)'
  [A] 'function int dapm_pinctrl_event(snd_soc_dapm_widget*, snd_kcontrol*, int)'
  [A] 'function int dapm_regulator_event(snd_soc_dapm_widget*, snd_kcontrol*, int)'
  [A] 'function void devfreq_monitor_resume(devfreq*)'
  [A] 'function void devfreq_monitor_start(devfreq*)'
  [A] 'function void devfreq_monitor_stop(devfreq*)'
  [A] 'function void devfreq_monitor_suspend(devfreq*)'
  [A] 'function void devfreq_update_interval(devfreq*, unsigned int*)'
  [A] 'function ssize_t device_show_bool(device*, device_attribute*, char*)'
  [A] 'function ssize_t device_store_bool(device*, device_attribute*, const char*, size_t)'
  [A] 'function int devm_devfreq_register_notifier(device*, devfreq*, notifier_block*, unsigned int)'
  [A] 'function void devm_devfreq_unregister_notifier(device*, devfreq*, notifier_block*, unsigned int)'
  [A] 'function int devm_hwrng_register(device*, hwrng*)'
  [A] 'function dma_buf_attachment* dma_buf_dynamic_attach(dma_buf*, device*, const dma_buf_attach_ops*, void*)'
  [A] 'function void dma_buf_move_notify(dma_buf*)'
  [A] 'function int dma_buf_pin(dma_buf_attachment*)'
  [A] 'function void dma_buf_unpin(dma_buf_attachment*)'
  [A] 'function dma_fence* dma_fence_get_stub()'
  [A] 'function long int dma_fence_wait_any_timeout(dma_fence**, uint32_t, bool, long int, uint32_t*)'
  [A] 'function u64 dma_get_required_mask(device*)'
  [A] 'function int dma_resv_get_fences_rcu(dma_resv*, dma_fence**, unsigned int*, dma_fence***)'
  [A] 'function int down_read_killable(rw_semaphore*)'
  [A] 'function int down_read_trylock(rw_semaphore*)'
  [A] 'function void drm_connector_attach_dp_subconnector_property(drm_connector*)'
  [A] 'function int drm_crtc_helper_set_config(drm_mode_set*, drm_modeset_acquire_ctx*)'
  [A] 'function bool drm_crtc_helper_set_mode(drm_crtc*, drm_display_mode*, int, int, drm_framebuffer*)'
  [A] 'function int drm_crtc_init(drm_device*, drm_crtc*, const drm_crtc_funcs*)'
  [A] 'function u64 drm_crtc_vblank_count(drm_crtc*)'
  [A] 'function void drm_dp_aux_init(drm_dp_aux*)'
  [A] 'function void drm_dp_set_subconnector_property(drm_connector*, drm_connector_status, const u8*, const u8*)'
  [A] 'function int drm_edid_header_is_valid(const u8*)'
  [A] 'function int drm_edid_to_sad(edid*, cea_sad**)'
  [A] 'function int drm_edid_to_speaker_allocation(edid*, u8**)'
  [A] 'function void drm_framebuffer_cleanup(drm_framebuffer*)'
  [A] 'function int drm_helper_connector_dpms(drm_connector*, int)'
  [A] 'function void drm_helper_disable_unused_functions(drm_device*)'
  [A] 'function int drm_helper_force_disable_all(drm_device*)'
  [A] 'function void drm_helper_resume_force_mode(drm_device*)'
  [A] 'function bool drm_is_current_master(drm_file*)'
  [A] 'function bool drm_kms_helper_is_poll_worker()'
  [A] 'function int drm_mode_create_scaling_mode_property(drm_device*)'
  [A] 'function int drm_mode_crtc_set_gamma_size(drm_crtc*, int)'
  [A] 'function bool drm_need_swiotlb(int)'
  [A] 'function int drm_syncobj_create(drm_syncobj**, uint32_t, dma_fence*)'
  [A] 'function int drm_syncobj_get_fd(drm_syncobj*, int*)'
  [A] 'function int drm_syncobj_get_handle(drm_file*, drm_syncobj*, u32*)'
  [A] 'function int drm_vma_node_allow(drm_vma_offset_node*, drm_file*)'
  [A] 'function bool drm_vma_node_is_allowed(drm_vma_offset_node*, drm_file*)'
  [A] 'function void drm_vma_node_revoke(drm_vma_offset_node*, drm_file*)'
  [A] 'function void* dw_pcie_own_conf_map_bus(pci_bus*, unsigned int, int)'
  [A] 'function file* get_task_exe_file(task_struct*)'
  [A] 'function int i2c_bit_add_bus(i2c_adapter*)'
  [A] 'function s32 i2c_smbus_read_i2c_block_data(const i2c_client*, u8, u8, u8*)'
  [A] 'function s32 i2c_smbus_write_i2c_block_data(const i2c_client*, u8, u8, const u8*)'
  [A] 'function s32 i2c_smbus_write_word_data(const i2c_client*, u8, u16)'
  [A] 'function int irq_domain_xlate_onetwocell(irq_domain*, device_node*, const u32*, unsigned int, unsigned long int*, unsigned int*)'
  [A] 'function int irq_set_chip(unsigned int, irq_chip*)'
  [A] 'function int irq_set_handler_data(unsigned int, void*)'
  [A] 'function u64 jiffies_64_to_clock_t(u64)'
  [A] 'function void ksys_sync_helper()'
  [A] 'function int mmu_interval_notifier_insert(mmu_interval_notifier*, mm_struct*, unsigned long int, unsigned long int, const mmu_interval_notifier_ops*)'
  [A] 'function void mmu_interval_notifier_remove(mmu_interval_notifier*)'
  [A] 'function unsigned long int mmu_interval_read_begin(mmu_interval_notifier*)'
  [A] 'function void mmu_notifier_synchronize()'
  [A] 'function pwm_device* of_pwm_xlate_with_flags(pwm_chip*, const of_phandle_args*)'
  [A] 'function void orderly_poweroff(bool)'
  [A] 'function void pci_assign_unassigned_bus_resources(pci_bus*)'
  [A] 'function resource* pci_bus_resource_n(const pci_bus*, int)'
  [A] 'function int pci_enable_atomic_ops_to_root(pci_dev*, u32)'
  [A] 'function int pci_generic_config_read(pci_bus*, unsigned int, int, int, u32*)'
  [A] 'function int pci_generic_config_write(pci_bus*, unsigned int, int, int, u32)'
  [A] 'function pci_dev* pci_get_domain_bus_and_slot(int, unsigned int, unsigned int)'
  [A] 'function void* pci_map_rom(pci_dev*, size_t*)'
  [A] 'function int pci_msix_vec_count(pci_dev*)'
  [A] 'function void pci_release_resource(pci_dev*, int)'
  [A] 'function int pci_resize_resource(pci_dev*, int, int)'
  [A] 'function void pci_unmap_rom(pci_dev*, void*)'
  [A] 'function u32 pcie_bandwidth_available(pci_dev*, pci_dev**, pci_bus_speed*, pcie_link_width*)'
  [A] 'function int pcie_get_mps(pci_dev*)'
  [A] 'function pci_bus_speed pcie_get_speed_cap(pci_dev*)'
  [A] 'function long int pin_user_pages(unsigned long int, unsigned long int, unsigned int, page**, vm_area_struct**)'
  [A] 'function u64 pm_runtime_autosuspend_expiration(device*)'
  [A] 'function int power_supply_is_system_supplied()'
  [A] 'function bool printk_timed_ratelimit(unsigned long int*, unsigned int)'
  [A] 'function void proc_set_size(proc_dir_entry*, loff_t)'
  [A] 'function proc_dir_entry* proc_symlink(const char*, proc_dir_entry*, const char*)'
  [A] 'function void* pwm_get_chip_data(pwm_device*)'
  [A] 'function int pwm_set_chip_data(pwm_device*, void*)'
  [A] 'function int radix_tree_tagged(const xarray*, unsigned int)'
  [A] 'function rb_node* rb_first_postorder(const rb_root*)'
  [A] 'function rb_node* rb_next_postorder(const rb_node*)'
  [A] 'function reciprocal_value reciprocal_value(u32)'
  [A] 'function void refresh_frequency_limits(cpufreq_policy*)'
  [A] 'function void release_pages(page**, int)'
  [A] 'function void scsi_print_sense_hdr(const scsi_device*, const char*, const scsi_sense_hdr*)'
  [A] 'function int sg_nents_for_len(scatterlist*, u64)'
  [A] 'function void smp_call_function_many(const cpumask*, smp_call_func_t, void*, bool)'
  [A] 'function int snd_hwdep_new(snd_card*, char*, int, snd_hwdep**)'
  [A] 'function void snd_pcm_lib_preallocate_free_for_all(snd_pcm*)'
  [A] 'function unsigned int snd_pcm_rate_range_to_bits(unsigned int, unsigned int)'
  [A] 'function int snd_soc_bytes_info_ext(snd_kcontrol*, snd_ctl_elem_info*)'
  [A] 'function void snd_soc_component_async_complete(snd_soc_component*)'
  [A] 'function int snd_soc_component_update_bits_async(snd_soc_component*, unsigned int, unsigned int, unsigned int)'
  [A] 'function int snd_soc_dai_set_bclk_ratio(snd_soc_dai*, unsigned int)'
  [A] 'function int snd_soc_dapm_enable_pin(snd_soc_dapm_context*, const char*)'
  [A] 'function snd_soc_dapm_widget* snd_soc_dapm_new_control(snd_soc_dapm_context*, const snd_soc_dapm_widget*)'
  [A] 'function int snd_soc_dapm_weak_routes(snd_soc_dapm_context*, const snd_soc_dapm_route*, int)'
  [A] 'function snd_soc_dai* snd_soc_find_dai(const snd_soc_dai_link_component*)'
  [A] 'function int snd_soc_get_xr_sx(snd_kcontrol*, snd_ctl_elem_value*)'
  [A] 'function int snd_soc_info_xr_sx(snd_kcontrol*, snd_ctl_elem_info*)'
  [A] 'function void snd_soc_of_put_dai_link_codecs(snd_soc_dai_link*)'
  [A] 'function int snd_soc_params_to_bclk(snd_pcm_hw_params*)'
  [A] 'function int snd_soc_put_xr_sx(snd_kcontrol*, snd_ctl_elem_value*)'
  [A] 'function int snd_vendor_set_ops(snd_usb_audio_vendor_ops*)'
  [A] 'function unsigned long int swiotlb_nr_tbl()'
  [A] 'function rq* task_rq_lock(task_struct*, rq_flags*)'
  [A] 'function void ttm_bo_bulk_move_lru_tail(ttm_lru_bulk_move*)'
  [A] 'function int ttm_bo_device_init(ttm_bo_device*, ttm_bo_driver*, address_space*, drm_vma_offset_manager*, bool)'
  [A] 'function int ttm_bo_device_release(ttm_bo_device*)'
  [A] 'function size_t ttm_bo_dma_acc_size(ttm_bo_device*, unsigned long int, unsigned int)'
  [A] 'function int ttm_bo_evict_mm(ttm_bo_device*, unsigned int)'
  [A] 'function bool ttm_bo_eviction_valuable(ttm_buffer_object*, const ttm_place*)'
  [A] 'function int ttm_bo_init_reserved(ttm_bo_device*, ttm_buffer_object*, unsigned long int, ttm_bo_type, ttm_placement*, uint32_t, ttm_operation_ctx*, size_t, sg_table*, dma_resv*, void (ttm_buffer_object*)*)'
  [A] 'function int ttm_bo_kmap(ttm_buffer_object*, unsigned long int, unsigned long int, ttm_bo_kmap_obj*)'
  [A] 'function void ttm_bo_kunmap(ttm_bo_kmap_obj*)'
  [A] 'function int ttm_bo_lock_delayed_workqueue(ttm_bo_device*)'
  [A] 'function int ttm_bo_mem_space(ttm_buffer_object*, ttm_placement*, ttm_resource*, ttm_operation_ctx*)'
  [A] 'function int ttm_bo_mmap(file*, vm_area_struct*, ttm_bo_device*)'
  [A] 'function int ttm_bo_mmap_obj(vm_area_struct*, ttm_buffer_object*)'
  [A] 'function int ttm_bo_move_accel_cleanup(ttm_buffer_object*, dma_fence*, bool, bool, ttm_resource*)'
  [A] 'function int ttm_bo_move_memcpy(ttm_buffer_object*, ttm_operation_ctx*, ttm_resource*)'
  [A] 'function void ttm_bo_move_to_lru_tail(ttm_buffer_object*, ttm_lru_bulk_move*)'
  [A] 'function int ttm_bo_move_ttm(ttm_buffer_object*, ttm_operation_ctx*, ttm_resource*)'
  [A] 'function void ttm_bo_put(ttm_buffer_object*)'
  [A] 'function void ttm_bo_unlock_delayed_workqueue(ttm_bo_device*, int)'
  [A] 'function int ttm_bo_validate(ttm_buffer_object*, ttm_placement*, ttm_operation_ctx*)'
  [A] 'function int ttm_dma_page_alloc_debugfs(seq_file*, void*)'
  [A] 'function int ttm_dma_populate(ttm_dma_tt*, device*, ttm_operation_ctx*)'
  [A] 'function void ttm_dma_tt_fini(ttm_dma_tt*)'
  [A] 'function void ttm_dma_unpopulate(ttm_dma_tt*, device*)'
  [A] 'function void ttm_eu_backoff_reservation(ww_acquire_ctx*, list_head*)'
  [A] 'function void ttm_eu_fence_buffer_objects(ww_acquire_ctx*, list_head*, dma_fence*)'
  [A] 'function int ttm_eu_reserve_buffers(ww_acquire_ctx*, list_head*, bool, list_head*)'
  [A] 'function int ttm_page_alloc_debugfs(seq_file*, void*)'
  [A] 'function int ttm_populate_and_map_pages(device*, ttm_dma_tt*, ttm_operation_ctx*)'
  [A] 'function int ttm_range_man_fini(ttm_bo_device*, unsigned int)'
  [A] 'function int ttm_range_man_init(ttm_bo_device*, unsigned int, bool, unsigned long int)'
  [A] 'function void ttm_resource_free(ttm_buffer_object*, ttm_resource*)'
  [A] 'function int ttm_resource_manager_force_list_clean(ttm_bo_device*, ttm_resource_manager*)'
  [A] 'function void ttm_resource_manager_init(ttm_resource_manager*, unsigned long int)'
  [A] 'function int ttm_sg_tt_init(ttm_dma_tt*, ttm_buffer_object*, uint32_t)'
  [A] 'function void ttm_tt_destroy_common(ttm_bo_device*, ttm_tt*)'
  [A] 'function int ttm_tt_populate(ttm_bo_device*, ttm_tt*, ttm_operation_ctx*)'
  [A] 'function int ttm_tt_set_placement_caching(ttm_tt*, uint32_t)'
  [A] 'function void ttm_unmap_and_unpopulate_pages(device*, ttm_dma_tt*)'
  [A] 'function int usb_choose_configuration(usb_device*)'
  [A] 'function void usb_enable_autosuspend(usb_device*)'
  [A] 'function int v4l2_ctrl_handler_setup(v4l2_ctrl_handler*)'
  [A] 'function int v4l2_m2m_dqbuf(file*, v4l2_m2m_ctx*, v4l2_buffer*)'
  [A] 'function int v4l2_m2m_mmap(file*, v4l2_m2m_ctx*, vm_area_struct*)'
  [A] 'function __poll_t v4l2_m2m_poll(file*, v4l2_m2m_ctx*, poll_table_struct*)'
  [A] 'function int v4l2_m2m_reqbufs(file*, v4l2_m2m_ctx*, v4l2_requestbuffers*)'
  [A] 'function int v4l2_m2m_streamoff(file*, v4l2_m2m_ctx*, v4l2_buf_type)'
  [A] 'function int v4l2_m2m_streamon(file*, v4l2_m2m_ctx*, v4l2_buf_type)'
  [A] 'function void v4l2_m2m_try_schedule(v4l2_m2m_ctx*)'
  [A] 'function void v4l_bound_align_image(u32*, unsigned int, unsigned int, unsigned int, u32*, unsigned int, unsigned int, unsigned int, unsigned int)'
  [A] 'function int xhci_add_endpoint(usb_hcd*, usb_device*, usb_host_endpoint*)'
  [A] 'function int xhci_address_device(usb_hcd*, usb_device*)'
  [A] 'function int xhci_check_trb_in_td_math(xhci_hcd*)'
  [A] 'function void xhci_initialize_ring_info(xhci_ring*, unsigned int)'
  [A] 'function void xhci_link_segments(xhci_segment*, xhci_segment*, xhci_ring_type, bool)'
  [A] 'function void xhci_segment_free(xhci_hcd*, xhci_segment*)'

12 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_cpu_cgroup_can_attach'
  [A] 'tracepoint __tracepoint_android_rvh_sched_rebalance_domains'
  [A] 'tracepoint __tracepoint_android_rvh_select_fallback_rq'
  [A] 'tracepoint __tracepoint_android_vh_gic_v3_set_affinity'
  [A] 'tracepoint __tracepoint_hrtimer_expire_entry'
  [A] 'tracepoint __tracepoint_hrtimer_expire_exit'
  [A] 'tracepoint __tracepoint_ipi_exit'
  [A] 'tracepoint __tracepoint_irq_handler_exit'
  [A] 'tracepoint __tracepoint_workqueue_execute_end'
  [A] 'tracepoint __tracepoint_workqueue_execute_start'
  [A] 'const kernel_param_ops param_ops_hexint'
  [A] 'ttm_bo_global ttm_bo_glob'

1 Added function symbol not referenced by debug info:

  [A] __arm_smccc_hvc

Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
Change-Id: I9d080a945208edff18bbe7e8981da54425270c4a
2021-04-19 22:36:10 +00:00
Carlos Llamas
e98d2de6a6 ANDROID: mm: fix mixed declaration and code warning
This fixes the following warning:
mm/memory.c: In function ‘___handle_speculative_fault’:
mm/memory.c:4871:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
 4871 |  struct mempolicy *pol;
      |  ^~~~~~

Bug: 183339614
Fixes: 1c53717440 (FROMLIST: mm: provide speculative fault infrastructure)
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Iebb8c7b4f7c01688bfbb9770653063015ae47020
2021-04-19 16:39:55 +00:00
Pavankumar Kondeti
73ae4bff1d ANDROID: sched/fair: call set_next_entity() on the replaced next task
android_rvh_replace_next_task_fair hook allows vendor modules to
override the next task selected by CFS. However the current code is
not calling set_next_entity() on the hierarchy of the replaced task
in the case where the previous task is CFS. Fix this issue.

Bug: 184720311
Change-Id: If6c35b1ddefd0829cd236dd821e5ac8aef7347c6
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2021-04-19 08:00:03 +00:00
Hang Lu
6c3c18a4c9 FROMGIT: binder: fix the missing BR_FROZEN_REPLY in binder_return_strings
Add BR_FROZEN_REPLY in binder_return_strings to support stat function.

Fixes: ae28c1be1e ("binder: BINDER_GET_FROZEN_INFO ioctl")
Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Hang Lu <hangl@codeaurora.org>
Link: https://lore.kernel.org/r/1617961246-4502-2-git-send-email-hangl@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0051691574
git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next)

Change-Id: Ib12e3f1dc1a389c9b4d5e9f60bd740d269dadf94
Signed-off-by: Hang Lu <hangl@codeaurora.org>
2021-04-18 17:50:46 +00:00
Saravana Kannan
da9a1b44ee FROMLIST: drivers/clocksource/timer-of: Remove __init markings
This allows timer drivers to be compiled as modules.

Bug: 146868249
Change-Id: I490a0e82ff59022da72b5e2f7e631cfb21533589
Link: https://lore.kernel.org/patchwork/patch/1214447/
Signed-off-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Baolin Wang <baolin.wang@unisoc.corp-partner.google.com>
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
2021-04-17 08:41:37 +00:00
J. Avila
23e7d05d56 ANDROID: GKI: Add support for a GKI_DEFCONFIG_FRAGMENT
To provide more fleixbility in debugging GKI builds, create a mechanism
for adding an optional file which may override some of the build vars,
such as POST_DEFCONFIG_CMDS.

Bug: 171343315
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I9f4a7bad2c19bcdb3b494c97d7c1eea5c7f311ba
2021-04-16 18:12:42 +00:00
Mukesh Ojha
de777f121d ANDROID: GKI: Update abi_gki_aarch64_qcom for logbuf tracepoint
Add __tracepoint_android_vh_logbuf symbol.

Leaf changes summary: 1 artifact changed (25 filtered out)
Changed leaf types summary: 0 (25 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_logbuf'

Bug: 185182649
Change-Id: Id72d6e18bd66f08bfb4c833a2dc5b99547a2627a
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-04-16 15:50:37 +00:00
Greg Kroah-Hartman
ab8b108b0a Merge 5.10.31 into android12-5.10
Changes in 5.10.31
	interconnect: core: fix error return code of icc_link_destroy()
	gfs2: Flag a withdraw if init_threads() fails
	KVM: arm64: Hide system instruction access to Trace registers
	KVM: arm64: Disable guest access to trace filter controls
	drm/imx: imx-ldb: fix out of bounds array access warning
	gfs2: report "already frozen/thawed" errors
	ftrace: Check if pages were allocated before calling free_pages()
	tools/kvm_stat: Add restart delay
	drm/tegra: dc: Don't set PLL clock to 0Hz
	gpu: host1x: Use different lock classes for each client
	XArray: Fix splitting to non-zero orders
	block: only update parent bi_status when bio fail
	radix tree test suite: Register the main thread with the RCU library
	idr test suite: Take RCU read lock in idr_find_test_1
	idr test suite: Create anchor before launching throbber
	null_blk: fix command timeout completion handling
	io_uring: don't mark S_ISBLK async work as unbounded
	riscv,entry: fix misaligned base for excp_vect_table
	block: don't ignore REQ_NOWAIT for direct IO
	netfilter: x_tables: fix compat match/target pad out-of-bound write
	perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
	net: sfp: relax bitrate-derived mode check
	net: sfp: cope with SFPs that set both LOS normal and LOS inverted
	xen/events: fix setting irq affinity
	Linux 5.10.31

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I19a7cfbdaab23e578dd82c552aea86d367c2f40f
2021-04-16 16:01:44 +02:00
Greg Kroah-Hartman
65f1995ea1 Linux 5.10.31
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Andrei Rabusov <a.rabusov@tum.de>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Jason Self <jason@bluehome.net>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20210415144413.165663182@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:22 +02:00
Juergen Gross
ceee49ca34 xen/events: fix setting irq affinity
The backport of upstream patch 25da4618af ("xen/events: don't
unmask an event channel when an eoi is pending") introduced a
regression for stable kernels 5.10 and older: setting IRQ affinity for
IRQs related to interdomain events would no longer work, as moving the
IRQ to its new cpu was not included in the irq_ack callback for those
events.

Fix that by adding the needed call.

Note that kernels 5.11 and later don't need the explicit moving of the
IRQ to the target cpu in the irq_ack callback, due to a rework of the
affinity setting in kernel 5.11.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:22 +02:00
Russell King
9d9facd32d net: sfp: cope with SFPs that set both LOS normal and LOS inverted
commit 624407d2cf upstream.

The SFP MSA defines two option bits in byte 65 to indicate how the
Rx_LOS signal on SFP pin 8 behaves:

bit 2 - Loss of Signal implemented, signal inverted from standard
        definition in SFP MSA (often called "Signal Detect").
bit 1 - Loss of Signal implemented, signal as defined in SFP MSA
        (often called "Rx_LOS").

Clearly, setting both bits results in a meaningless situation: it would
mean that LOS is implemented in both the normal sense (1 = signal loss)
and inverted sense (0 = signal loss).

Unfortunately, there are modules out there which set both bits, which
will be initially interpret as "inverted" sense, and then, if the LOS
signal changes state, we will toggle between LINK_UP and WAIT_LOS
states.

Change our LOS handling to give well defined behaviour: only interpret
these bits as meaningful if exactly one is set, otherwise treat it as
if LOS is not implemented.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/E1kyYQa-0004iR-CU@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:22 +02:00
Russell King
2a60ab2dab net: sfp: relax bitrate-derived mode check
commit 7a77233ec6 upstream.

Do not check the encoding when deriving 1000BASE-X from the bitrate
when no other modes are discovered. Some GPON modules (VSOL V2801F
and CarlitoxxPro CPGOS03-0490 v2.0) indicate NRZ encoding with a
1200Mbaud bitrate, but should be driven with 1000BASE-X on the host
side.

Tested-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:22 +02:00
Arnaldo Carvalho de Melo
cd8ce27e6c perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
commit 77d02bd00c upstream.

Noticed on a debian:experimental mips and mipsel cross build build
environment:

  perfbuilder@ec265a086e9b:~$ mips-linux-gnu-gcc --version | head -1
  mips-linux-gnu-gcc (Debian 10.2.1-3) 10.2.1 20201224
  perfbuilder@ec265a086e9b:~$

    CC       /tmp/build/perf/util/map.o
  util/map.c: In function 'map__new':
  util/map.c:109:5: error: '%s' directive output may be truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=format-truncation=]
    109 |    "%s/platforms/%s/arch-%s/usr/lib/%s",
        |     ^~
  In file included from /usr/mips-linux-gnu/include/stdio.h:867,
                   from util/symbol.h:11,
                   from util/map.c:2:
  /usr/mips-linux-gnu/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output 32 or more bytes (assuming 4294967321) into a destination of size 4096
     67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     68 |        __bos (__s), __fmt, __va_arg_pack ());
        |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Since we have the lenghts for what lands in that place, use it to give
the compiler more info and make it happy.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:22 +02:00
Florian Westphal
1f3b9000cb netfilter: x_tables: fix compat match/target pad out-of-bound write
commit b29c457a65 upstream.

xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com
Reported-by: Andy Nguyen <theflow@google.com>
Fixes: 9fa492cdc1 ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 11:43:21 +02:00
Pavel Begunkov
5402a67ac4 block: don't ignore REQ_NOWAIT for direct IO
[ Upstream commit f8b78caf21 ]

If IOCB_NOWAIT is set on submission, then that needs to get propagated to
REQ_NOWAIT on the block side. Otherwise we completely lose this
information, and any issuer of IOCB_NOWAIT IO will potentially end up
blocking on eg request allocation on the storage side.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Zihao Yu
efa7b6e401 riscv,entry: fix misaligned base for excp_vect_table
[ Upstream commit ac8d0b901f ]

In RV64, the size of each entry in excp_vect_table is 8 bytes. If the
base of the table is not 8-byte aligned, loading an entry in the table
will raise a misaligned exception. Although such exception will be
handled by opensbi/bbl, this still causes performance degradation.

Signed-off-by: Zihao Yu <yuzihao@ict.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Jens Axboe
6fbdce3cde io_uring: don't mark S_ISBLK async work as unbounded
[ Upstream commit 4b982bd0f3 ]

S_ISBLK is marked as unbounded work for async preparation, because it
doesn't match S_ISREG. That is incorrect, as any read/write to a block
device is also a bounded operation. Fix it up and ensure that S_ISBLK
isn't marked unbounded.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Damien Le Moal
5d4600017b null_blk: fix command timeout completion handling
[ Upstream commit de3510e52b ]

Memory backed or zoned null block devices may generate actual request
timeout errors due to the submission path being blocked on memory
allocation or zone locking. Unlike fake timeouts or injected timeouts,
the request submission path will call blk_mq_complete_request() or
blk_mq_end_request() for these real timeout errors, causing a double
completion and use after free situation as the block layer timeout
handler executes blk_mq_rq_timed_out() and __blk_mq_free_request() in
blk_mq_check_expired(). This problem often triggers a NULL pointer
dereference such as:

BUG: kernel NULL pointer dereference, address: 0000000000000050
RIP: 0010:blk_mq_sched_mark_restart_hctx+0x5/0x20
...
Call Trace:
  dd_finish_request+0x56/0x80
  blk_mq_free_request+0x37/0x130
  null_handle_cmd+0xbf/0x250 [null_blk]
  ? null_queue_rq+0x67/0xd0 [null_blk]
  blk_mq_dispatch_rq_list+0x122/0x850
  __blk_mq_do_dispatch_sched+0xbb/0x2c0
  __blk_mq_sched_dispatch_requests+0x13d/0x190
  blk_mq_sched_dispatch_requests+0x30/0x60
  __blk_mq_run_hw_queue+0x49/0x90
  process_one_work+0x26c/0x580
  worker_thread+0x55/0x3c0
  ? process_one_work+0x580/0x580
  kthread+0x134/0x150
  ? kthread_create_worker_on_cpu+0x70/0x70
  ret_from_fork+0x1f/0x30

This problem very often triggers when running the full btrfs xfstests
on a memory-backed zoned null block device in a VM with limited amount
of memory.

Avoid this by executing blk_mq_complete_request() in null_timeout_rq()
only for commands that are marked for a fake timeout completion using
the fake_timeout boolean in struct null_cmd. For timeout errors injected
through debugfs, the timeout handler will execute
blk_mq_complete_request()i as before. This is safe as the submission
path does not execute complete requests in this case.

In null_timeout_rq(), also make sure to set the command error field to
BLK_STS_TIMEOUT and to propagate this error through to the request
completion.

Reported-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Tested-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Reviewed-by: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20210331225244.126426-1-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Matthew Wilcox (Oracle)
b1f6c6f39b idr test suite: Create anchor before launching throbber
[ Upstream commit 094ffbd1d8 ]

The throbber could race with creation of the anchor entry and cause the
IDR to have zero entries in it, which would cause the test to fail.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Matthew Wilcox (Oracle)
9a7552daa9 idr test suite: Take RCU read lock in idr_find_test_1
[ Upstream commit 703586410d ]

When run on a single CPU, this test would frequently access already-freed
memory.  Due to timing, this bug never showed up on multi-CPU tests.

Reported-by: Chris von Recklinghausen <crecklin@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Matthew Wilcox (Oracle)
edd822b692 radix tree test suite: Register the main thread with the RCU library
[ Upstream commit 1bb4bd266c ]

Several test runners register individual worker threads with the
RCU library, but neglect to register the main thread, which can lead
to objects being freed while the main thread is in what appears to be
an RCU critical section.

Reported-by: Chris von Recklinghausen <crecklin@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Yufen Yu
1d2310d95f block: only update parent bi_status when bio fail
[ Upstream commit 3edf5346e4 ]

For multiple split bios, if one of the bio is fail, the whole
should return error to application. But we found there is a race
between bio_integrity_verify_fn and bio complete, which return
io success to application after one of the bio fail. The race as
following:

split bio(READ)          kworker

nvme_complete_rq
blk_update_request //split error=0
  bio_endio
    bio_integrity_endio
      queue_work(kintegrityd_wq, &bip->bip_work);

                         bio_integrity_verify_fn
                         bio_endio //split bio
                          __bio_chain_endio
                             if (!parent->bi_status)

                               <interrupt entry>
                               nvme_irq
                                 blk_update_request //parent error=7
                                 req_bio_endio
                                    bio->bi_status = 7 //parent bio
                               <interrupt exit>

                               parent->bi_status = 0
                        parent->bi_end_io() // return bi_status=0

The bio has been split as two: split and parent. When split
bio completed, it depends on kworker to do endio, while
bio_integrity_verify_fn have been interrupted by parent bio
complete irq handler. Then, parent bio->bi_status which have
been set in irq handler will overwrite by kworker.

In fact, even without the above race, we also need to conside
the concurrency beteen mulitple split bio complete and update
the same parent bi_status. Normally, multiple split bios will
be issued to the same hctx and complete from the same irq
vector. But if we have updated queue map between multiple split
bios, these bios may complete on different hw queue and different
irq vector. Then the concurrency update parent bi_status may
cause the final status error.

Suggested-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210331115359.1125679-1-yuyufen@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Matthew Wilcox (Oracle)
d99e22c0ea XArray: Fix splitting to non-zero orders
[ Upstream commit 3012110d71 ]

Splitting an order-4 entry into order-2 entries would leave the array
containing pointers to 000040008000c000 instead of 000044448888cccc.
This is a one-character fix, but enhance the test suite to check this
case.

Reported-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:21 +02:00
Mikko Perttunen
9576dd8955 gpu: host1x: Use different lock classes for each client
[ Upstream commit a24f98176d ]

To avoid false lockdep warnings, give each client lock a different
lock class, passed from the initialization site by macro.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Dmitry Osipenko
39af2f472f drm/tegra: dc: Don't set PLL clock to 0Hz
[ Upstream commit f8fb97c915 ]

RGB output doesn't allow to change parent clock rate of the display and
PCLK rate is set to 0Hz in this case. The tegra_dc_commit_state() shall
not set the display clock to 0Hz since this change propagates to the
parent clock. The DISP clock is defined as a NODIV clock by the tegra-clk
driver and all NODIV clocks use the CLK_SET_RATE_PARENT flag.

This bug stayed unnoticed because by default PLLP is used as the parent
clock for the display controller and PLLP silently skips the erroneous 0Hz
rate changes because it always has active child clocks that don't permit
rate changes. The PLLP isn't acceptable for some devices that we want to
upstream (like Samsung Galaxy Tab and ASUS TF700T) due to a display panel
clock rate requirements that can't be fulfilled by using PLLP and then the
bug pops up in this case since parent clock is set to 0Hz, killing the
display output.

Don't touch DC clock if pclk=0 in order to fix the problem.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Stefan Raspl
e4a0956574 tools/kvm_stat: Add restart delay
[ Upstream commit 75f94ecbd0 ]

If this service is enabled and the system rebooted, Systemd's initial
attempt to start this unit file may fail in case the kvm module is not
loaded. Since we did not specify a delay for the retries, Systemd
restarts with a minimum delay a number of times before giving up and
disabling the service. Which means a subsequent kvm module load will
have kvm running without monitoring.
Adding a delay to fix this.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Message-Id: <20210325122949.1433271-1-raspl@linux.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Steven Rostedt (VMware)
1dcb3ebc24 ftrace: Check if pages were allocated before calling free_pages()
[ Upstream commit 59300b36f8 ]

It is possible that on error pg->size can be zero when getting its order,
which would return a -1 value. It is dangerous to pass in an order of -1
to free_pages(). Check if order is greater than or equal to zero before
calling free_pages().

Link: https://lore.kernel.org/lkml/20210330093916.432697c7@gandalf.local.home/

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Bob Peterson
6c6d583220 gfs2: report "already frozen/thawed" errors
[ Upstream commit ff132c5f93 ]

Before this patch, gfs2's freeze function failed to report an error
when the target file system was already frozen as it should (and as
generic vfs function freeze_super does. Similarly, gfs2's thaw function
failed to report an error when trying to thaw a file system that is not
frozen, as vfs function thaw_super does. The errors were checked, but
it always returned a 0 return code.

This patch adds the missing error return codes to gfs2 freeze and thaw.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Arnd Bergmann
870c8df1d1 drm/imx: imx-ldb: fix out of bounds array access warning
[ Upstream commit 33ce7f2f95 ]

When CONFIG_OF is disabled, building with 'make W=1' produces warnings
about out of bounds array access:

drivers/gpu/drm/imx/imx-ldb.c: In function 'imx_ldb_set_clock.constprop':
drivers/gpu/drm/imx/imx-ldb.c:186:8: error: array subscript -22 is below array bounds of 'struct clk *[4]' [-Werror=array-bounds]

Add an error check before the index is used, which helps with the
warning, as well as any possible other error condition that may be
triggered at runtime.

The warning could be fixed by adding a Kconfig depedency on CONFIG_OF,
but Liu Ying points out that the driver may hit the out-of-bounds
problem at runtime anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:20 +02:00
Suzuki K Poulose
5b50468a2d KVM: arm64: Disable guest access to trace filter controls
[ Upstream commit a354a64d91 ]

Disable guest access to the Trace Filter control registers.
We do not advertise the Trace filter feature to the guest
(ID_AA64DFR0_EL1: TRACE_FILT is cleared) already, but the guest
can still access the TRFCR_EL1 unless we trap it.

This will also make sure that the guest cannot fiddle with
the filtering controls set by a nvhe host.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210323120647.454211-3-suzuki.poulose@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:19 +02:00
Suzuki K Poulose
fa0c0dce58 KVM: arm64: Hide system instruction access to Trace registers
[ Upstream commit 1d676673d6 ]

Currently we advertise the ID_AA6DFR0_EL1.TRACEVER for the guest,
when the trace register accesses are trapped (CPTR_EL2.TTA == 1).
So, the guest will get an undefined instruction, if trusts the
ID registers and access one of the trace registers.
Lets be nice to the guest and hide the feature to avoid
unexpected behavior.

Even though this can be done at KVM sysreg emulation layer,
we do this by removing the TRACEVER from the sanitised feature
register field. This is fine as long as the ETM drivers
can handle the individual trace units separately, even
when there are differences among the CPUs.

Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210323120647.454211-2-suzuki.poulose@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:19 +02:00
Andrew Price
57fb08fb9a gfs2: Flag a withdraw if init_threads() fails
[ Upstream commit 62dd0f98a0 ]

Interrupting mount with ^C quickly enough can cause the kthread_run()
calls in gfs2's init_threads() to fail and the error path leads to a
deadlock on the s_umount rwsem. The abridged chain of events is:

  [mount path]
  get_tree_bdev()
    sget_fc()
      alloc_super()
        down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING); [acquired]
    gfs2_fill_super()
      gfs2_make_fs_rw()
        init_threads()
          kthread_run()
            ( Interrupted )
      [Error path]
      gfs2_gl_hash_clear()
        flush_workqueue(glock_workqueue)
          wait_for_completion()

  [workqueue context]
  glock_work_func()
    run_queue()
      do_xmote()
        freeze_go_sync()
          freeze_super()
            down_write(&sb->s_umount) [deadlock]

In freeze_go_sync() there is a gfs2_withdrawn() check that we can use to
make sure freeze_super() is not called in the error path, so add a
gfs2_withdraw_delayed() call when init_threads() fails.

Ref: https://bugzilla.kernel.org/show_bug.cgi?id=212231

Reported-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:19 +02:00
Jia-Ju Bai
9b57ecb01b interconnect: core: fix error return code of icc_link_destroy()
[ Upstream commit 715ea61532 ]

When krealloc() fails and new is NULL, no error return code of
icc_link_destroy() is assigned.
To fix this bug, ret is assigned with -ENOMEM hen new is NULL.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20210306132857.17020-1-baijiaju1990@gmail.com
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-16 11:43:19 +02:00
Jindong Yue
47b8276da1 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-04-16 08:47:09 +00:00
Jay Jayanna
005be5a71b ANDROID: abi_gki_aarch64_qcom: Add sock_setsockopt to list
Add sock_setsockopt to allow resizing of receive buffers.

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 sock_setsockopt(struct socket *sock, int level, int optname,
                                  sockptr_t optval, unsigned int optlen)'

Bug: 184928492
Change-Id: I6a18010e90c0195d184d451c35266182bc6d0b2e
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
2021-04-15 23:18:40 +00:00
xiaofeng
35dafe72dd ANDROID: vendor_hooks: tune reclaim swappiness or scan type
Add hooks for reclaim

Bug: 185438290
Change-Id: Ib9eec302b1df4da7e98c77b94541af28c34a8613
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
2021-04-15 23:08:29 +00:00
Stanimir Varbanov
edb1a85895 FROMGIT: media: docs: Document colorimetry class
Add a document for ext control colorimetry class.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit 4e4053a28f
 git://linuxtv.org/media_tree.git master)
Bug: 175389589
Link: https://lkml.org/lkml/2021/3/23/646

Change-Id: I4aa8a420221ba6a98caa0fbac57aacdfc5e22224
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2021-04-15 15:34:37 -07:00
Dikshita Agarwal
e6b18e4945 FROMGIT: media: v4l: Add new Colorimetry Class
Add Colorimetry control class for colorimetry controls

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit f31b9ffd96
 git://linuxtv.org/media_tree.git master )
BUG: 175389589
Link: https://lkml.org/lkml/2021/3/23/643

Change-Id: Icd7dd39d5f3d6a19220ddf49057eb041cdfb2e9a
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2021-04-15 15:34:36 -07:00
Stanimir Varbanov
a0ac76fc0c FROMGIT: media: v4l2-ctrl: Add decoder conceal color control
Add decoder v4l2 control to set conceal color.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit b52051a409
 git://linuxtv.org/media_tree.git master)
Bug: 183579772
Link: https://lkml.org/lkml/2021/2/9/252

Change-Id: I49cac2c1b27cdac72f7dbbb602d2387fd006ff98
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2021-04-15 15:34:36 -07:00