Merge "Merge keystone/android12-5.10-keystone-qcom-release.43+ (f9d0ae8
) into msm-5.10"
This commit is contained in:
commit
79c313403f
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,7 @@
|
||||
bpf_trace_run4
|
||||
bpf_trace_run5
|
||||
bpf_trace_run6
|
||||
bsearch
|
||||
cancel_delayed_work
|
||||
cancel_delayed_work_sync
|
||||
cancel_work_sync
|
||||
@ -54,8 +55,10 @@
|
||||
clk_get_rate
|
||||
__clk_hw_register_divider
|
||||
clk_hw_register_fixed_factor
|
||||
__clk_hw_register_fixed_rate
|
||||
__clk_hw_register_gate
|
||||
__clk_hw_register_mux
|
||||
clk_is_match
|
||||
clk_prepare
|
||||
clk_put
|
||||
clk_round_rate
|
||||
@ -117,6 +120,7 @@
|
||||
device_property_read_u32_array
|
||||
device_register
|
||||
device_remove_file
|
||||
__device_reset
|
||||
device_set_wakeup_capable
|
||||
device_set_wakeup_enable
|
||||
device_unregister
|
||||
@ -165,6 +169,7 @@
|
||||
dev_pm_domain_attach_by_id
|
||||
dev_pm_domain_attach_by_name
|
||||
dev_pm_domain_detach
|
||||
dev_pm_set_wake_irq
|
||||
dev_set_name
|
||||
_dev_warn
|
||||
disable_irq
|
||||
@ -880,6 +885,7 @@
|
||||
vb2_buffer_done
|
||||
vb2_dma_contig_memops
|
||||
vb2_dqbuf
|
||||
vb2_expbuf
|
||||
vb2_fop_mmap
|
||||
vb2_fop_poll
|
||||
vb2_mmap
|
||||
@ -1018,9 +1024,14 @@
|
||||
# required by ci_hdrc.ko
|
||||
devm_extcon_register_notifier
|
||||
devm_usb_get_phy
|
||||
ehci_handshake
|
||||
ehci_hub_control
|
||||
ehci_init_driver
|
||||
ehci_setup
|
||||
extcon_get_edev_by_phandle
|
||||
extcon_get_state
|
||||
of_usb_host_tpl_support
|
||||
of_usb_update_otg_caps
|
||||
phy_set_mode_ext
|
||||
platform_device_add_resources
|
||||
usb_add_gadget_udc
|
||||
@ -1051,11 +1062,14 @@
|
||||
usb_get_maximum_speed
|
||||
usb_hcd_irq
|
||||
usb_phy_set_charger_current
|
||||
usb_phy_set_charger_state
|
||||
usb_phy_set_event
|
||||
usb_put_hcd
|
||||
usb_remove_hcd
|
||||
usb_role_switch_get_drvdata
|
||||
usb_role_switch_register
|
||||
usb_role_switch_unregister
|
||||
usb_udc_vbus_handler
|
||||
|
||||
# required by ci_hdrc_pci.ko
|
||||
pcim_enable_device
|
||||
@ -1225,6 +1239,7 @@
|
||||
find_vpid
|
||||
get_unused_fd_flags
|
||||
get_user_pages
|
||||
hrtimer_resolution
|
||||
idr_preload
|
||||
iommu_attach_device
|
||||
iommu_domain_alloc
|
||||
@ -1261,19 +1276,27 @@
|
||||
# required by gpio-ir-recv.ko
|
||||
devm_rc_allocate_device
|
||||
devm_rc_register_device
|
||||
ir_raw_event_store_edge
|
||||
|
||||
# required by gpio-mxc.ko
|
||||
bgpio_init
|
||||
__devm_irq_alloc_descs
|
||||
devm_irq_alloc_generic_chip
|
||||
devm_irq_setup_generic_chip
|
||||
gpiochip_generic_free
|
||||
gpiochip_generic_request
|
||||
gpiochip_lock_as_irq
|
||||
gpiochip_unlock_as_irq
|
||||
irq_domain_add_legacy
|
||||
irq_domain_simple_ops
|
||||
irq_gc_ack_set_bit
|
||||
irq_gc_mask_clr_bit
|
||||
irq_gc_mask_set_bit
|
||||
__irq_set_handler
|
||||
register_syscore_ops
|
||||
|
||||
# required by gpio-pca953x.ko
|
||||
__bitmap_replace
|
||||
regcache_sync_region
|
||||
|
||||
# required by gpio-regulator.ko
|
||||
@ -1283,6 +1306,7 @@
|
||||
|
||||
# required by gpio-reset.ko
|
||||
reset_controller_register
|
||||
reset_controller_unregister
|
||||
|
||||
# required by gpio-switch.ko
|
||||
typec_switch_get_drvdata
|
||||
@ -1297,6 +1321,9 @@
|
||||
i2c_recover_bus
|
||||
|
||||
# required by imx-cpufreq-dt.ko
|
||||
clk_bulk_get
|
||||
clk_bulk_put
|
||||
dev_pm_opp_put_supported_hw
|
||||
dev_pm_opp_set_supported_hw
|
||||
nvmem_cell_read_u32
|
||||
|
||||
@ -1351,7 +1378,9 @@
|
||||
|
||||
# required by imx-sdma.ko
|
||||
dma_async_device_register
|
||||
gen_pool_dma_alloc
|
||||
krealloc
|
||||
of_gen_pool_get
|
||||
vchan_dma_desc_free_list
|
||||
vchan_find_desc
|
||||
vchan_init
|
||||
@ -1364,6 +1393,11 @@
|
||||
hrtimer_init
|
||||
hrtimer_start_range_ns
|
||||
hrtimer_try_to_cancel
|
||||
mctrl_gpio_disable_ms
|
||||
mctrl_gpio_enable_ms
|
||||
mctrl_gpio_get
|
||||
mctrl_gpio_init
|
||||
mctrl_gpio_set
|
||||
oops_in_progress
|
||||
rational_best_approximation
|
||||
_raw_spin_trylock
|
||||
@ -1376,6 +1410,9 @@
|
||||
uart_console_write
|
||||
uart_get_baud_rate
|
||||
uart_get_divisor
|
||||
uart_get_rs485_mode
|
||||
uart_handle_cts_change
|
||||
uart_handle_dcd_change
|
||||
uart_parse_options
|
||||
uart_register_driver
|
||||
uart_remove_one_port
|
||||
@ -1395,9 +1432,14 @@
|
||||
watchdog_set_restart_priority
|
||||
|
||||
# required by imx8-isi-cap.ko
|
||||
media_graph_walk_cleanup
|
||||
media_graph_walk_init
|
||||
media_graph_walk_next
|
||||
media_graph_walk_start
|
||||
v4l2_fh_open
|
||||
v4l2_g_parm_cap
|
||||
v4l2_s_parm_cap
|
||||
_vb2_fop_release
|
||||
vb2_ioctl_create_bufs
|
||||
vb2_ioctl_dqbuf
|
||||
vb2_ioctl_expbuf
|
||||
@ -1415,12 +1457,18 @@
|
||||
# required by imx8-media-dev.ko
|
||||
v4l2_device_register_subdev
|
||||
|
||||
# required by imx8m_pm_domains.ko
|
||||
of_genpd_add_subdomain
|
||||
|
||||
# required by imx8mm_thermal.ko
|
||||
thermal_zone_bind_cooling_device
|
||||
|
||||
# required by imx8mp-ldb.ko
|
||||
devm_of_phy_get
|
||||
|
||||
# required by imx_dsp_rproc.ko
|
||||
rproc_of_parse_firmware
|
||||
|
||||
# required by imx_rpmsg_tty.ko
|
||||
print_hex_dump
|
||||
|
||||
# required by imx_rproc.ko
|
||||
rproc_elf_find_loaded_rsc_table
|
||||
rproc_elf_load_segments
|
||||
@ -1441,7 +1489,9 @@
|
||||
# required by leds-gpio.ko
|
||||
device_get_child_node_count
|
||||
device_get_next_child_node
|
||||
devm_fwnode_gpiod_get_index
|
||||
devm_led_classdev_register_ext
|
||||
gpiod_cansleep
|
||||
gpiod_set_value
|
||||
|
||||
# required by mac80211.ko
|
||||
@ -1593,25 +1643,33 @@
|
||||
|
||||
# required by mux-core.ko
|
||||
class_find_device
|
||||
device_match_of_node
|
||||
devres_add
|
||||
devres_alloc_node
|
||||
devres_free
|
||||
down_killable
|
||||
|
||||
# required by mux-mmio.ko
|
||||
dev_get_regmap
|
||||
devm_regmap_field_alloc
|
||||
regmap_field_update_bits_base
|
||||
|
||||
# required by mx6s_capture.ko
|
||||
vb2_read
|
||||
|
||||
# required by mxc-clk.ko
|
||||
__clk_determine_rate
|
||||
clk_divider_ops
|
||||
clk_fractional_divider_ops
|
||||
clk_gate_ops
|
||||
__clk_get_hw
|
||||
clk_hw_get_name
|
||||
clk_hw_get_parent_by_index
|
||||
clk_hw_is_enabled
|
||||
clk_hw_register
|
||||
clk_hw_register_composite
|
||||
clk_hw_unregister
|
||||
clk_mux_index_to_val
|
||||
clk_mux_ops
|
||||
clk_unregister
|
||||
divider_get_val
|
||||
@ -1625,6 +1683,7 @@
|
||||
v4l2_src_change_event_subscribe
|
||||
|
||||
# required by mxs-dma.ko
|
||||
dmaenginem_async_device_register
|
||||
tasklet_setup
|
||||
|
||||
# required by mxsfb.ko
|
||||
@ -1655,6 +1714,8 @@
|
||||
# required by ov5640.ko
|
||||
v4l2_ctrl_auto_cluster
|
||||
v4l2_ctrl_new_std_menu_items
|
||||
__v4l2_ctrl_s_ctrl_int64
|
||||
v4l2_ctrl_subdev_log_status
|
||||
v4l2_ctrl_subdev_subscribe_event
|
||||
v4l2_event_subdev_unsubscribe
|
||||
__v4l2_find_nearest_size
|
||||
@ -1684,6 +1745,7 @@
|
||||
videomode_from_timing
|
||||
|
||||
# required by pca9450-regulator.ko
|
||||
regulator_desc_list_voltage_linear_range
|
||||
regulator_list_voltage_linear_range
|
||||
|
||||
# required by pci-imx6.ko
|
||||
@ -1707,10 +1769,13 @@
|
||||
regulator_get_voltage
|
||||
|
||||
# required by pfuze100-regulator.ko
|
||||
of_regulator_match
|
||||
pm_power_off_prepare
|
||||
regulator_list_voltage_linear
|
||||
regulator_map_voltage_ascend
|
||||
|
||||
# required by phy-fsl-imx8mq-usb.ko
|
||||
power_supply_get_by_phandle
|
||||
power_supply_get_property
|
||||
power_supply_put
|
||||
power_supply_reg_notifier
|
||||
@ -1735,7 +1800,15 @@
|
||||
pinctrl_enable
|
||||
pinctrl_force_default
|
||||
pinctrl_force_sleep
|
||||
pinctrl_generic_get_group
|
||||
pinctrl_generic_get_group_count
|
||||
pinctrl_generic_get_group_name
|
||||
pinctrl_generic_get_group_pins
|
||||
pin_get_name
|
||||
pinmux_generic_get_function
|
||||
pinmux_generic_get_function_count
|
||||
pinmux_generic_get_function_groups
|
||||
pinmux_generic_get_function_name
|
||||
radix_tree_insert
|
||||
|
||||
# required by pps_core.ko
|
||||
@ -1763,10 +1836,17 @@
|
||||
backlight_device_register
|
||||
backlight_device_unregister
|
||||
devm_pwm_get
|
||||
gpiod_get_direction
|
||||
pwm_apply_state
|
||||
pwm_free
|
||||
pwm_request
|
||||
|
||||
# required by pwrseq_simple.ko
|
||||
bitmap_alloc
|
||||
devm_gpiod_get_array
|
||||
gpiod_set_array_value_cansleep
|
||||
mmc_pwrseq_register
|
||||
mmc_pwrseq_unregister
|
||||
|
||||
# required by qoriq_thermal.ko
|
||||
of_thermal_get_ntrips
|
||||
@ -1789,6 +1869,9 @@
|
||||
phy_select_page
|
||||
phy_write_paged
|
||||
|
||||
# required by reset-dispmix.ko
|
||||
__regmap_init_mmio_clk
|
||||
|
||||
# required by rpmsg_raw.ko
|
||||
compat_ptr_ioctl
|
||||
_copy_from_iter_full
|
||||
@ -1809,18 +1892,26 @@
|
||||
mmc_gpiod_request_ro
|
||||
mmc_gpio_get_cd
|
||||
mmc_gpio_get_ro
|
||||
mmc_gpio_set_cd_wake
|
||||
mmc_of_parse
|
||||
mmc_of_parse_voltage
|
||||
mmc_retune_timer_stop
|
||||
mmc_send_tuning
|
||||
pinctrl_select_default_state
|
||||
sdhci_add_host
|
||||
sdhci_cqe_disable
|
||||
sdhci_cqe_enable
|
||||
sdhci_cqe_irq
|
||||
sdhci_dumpregs
|
||||
sdhci_execute_tuning
|
||||
sdhci_pltfm_free
|
||||
sdhci_pltfm_init
|
||||
sdhci_remove_host
|
||||
sdhci_reset
|
||||
sdhci_resume_host
|
||||
sdhci_runtime_resume_host
|
||||
sdhci_runtime_suspend_host
|
||||
sdhci_suspend_host
|
||||
|
||||
# required by sec-dsim.ko
|
||||
drm_atomic_helper_bridge_propagate_bus_fmt
|
||||
@ -1935,6 +2026,7 @@
|
||||
spi_unregister_controller
|
||||
|
||||
# required by spi-imx.ko
|
||||
sg_last
|
||||
wait_for_completion_interruptible
|
||||
|
||||
# required by spidev.ko
|
||||
@ -1960,6 +2052,7 @@
|
||||
|
||||
# required by timer-imx-sysctr.ko
|
||||
clockevents_config_and_register
|
||||
timer_of_init
|
||||
|
||||
# required by trusty-ipc.ko
|
||||
_copy_from_iter
|
||||
@ -2029,4 +2122,5 @@
|
||||
# required by vvcam-video.ko
|
||||
complete_all
|
||||
media_entity_remove_links
|
||||
v4l2_async_notifier_add_devname_subdev
|
||||
v4l2_ctrl_poll
|
||||
|
@ -108,6 +108,7 @@ CONFIG_GKI_HACKS_TO_FIX=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
|
@ -188,18 +188,6 @@ void mte_check_tfsr_el1(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void update_gcr_el1_excl(u64 excl)
|
||||
{
|
||||
|
||||
/*
|
||||
* Note that the mask controlled by the user via prctl() is an
|
||||
* include while GCR_EL1 accepts an exclude mask.
|
||||
* No need for ISB since this only affects EL0 currently, implicit
|
||||
* with ERET.
|
||||
*/
|
||||
sysreg_clear_set_s(SYS_GCR_EL1, SYS_GCR_EL1_EXCL_MASK, excl);
|
||||
}
|
||||
|
||||
static void mte_update_sctlr_user(struct task_struct *task)
|
||||
{
|
||||
/*
|
||||
@ -271,7 +259,8 @@ void mte_suspend_exit(void)
|
||||
if (!system_supports_mte())
|
||||
return;
|
||||
|
||||
update_gcr_el1_excl(gcr_kernel_excl);
|
||||
sysreg_clear_set_s(SYS_GCR_EL1, SYS_GCR_EL1_EXCL_MASK, gcr_kernel_excl);
|
||||
isb();
|
||||
}
|
||||
|
||||
long set_mte_ctrl(struct task_struct *task, unsigned long arg)
|
||||
|
@ -190,7 +190,7 @@ static bool range_is_memory(u64 start, u64 end)
|
||||
{
|
||||
struct kvm_mem_range r1, r2;
|
||||
|
||||
if (!find_mem_range(start, &r1) || !find_mem_range(end, &r2))
|
||||
if (!find_mem_range(start, &r1) || !find_mem_range(end - 1, &r2))
|
||||
return false;
|
||||
if (r1.start != r2.start)
|
||||
return false;
|
||||
|
@ -85,6 +85,7 @@ CONFIG_GKI_HACKS_TO_FIX=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
|
@ -893,7 +893,15 @@ int device_add_software_node(struct device *dev, const struct software_node *nod
|
||||
}
|
||||
|
||||
set_secondary_fwnode(dev, &swnode->fwnode);
|
||||
software_node_notify(dev, KOBJ_ADD);
|
||||
|
||||
/*
|
||||
* If the device has been fully registered by the time this function is
|
||||
* called, software_node_notify() must be called separately so that the
|
||||
* symlinks get created and the reference count of the node is kept in
|
||||
* balance.
|
||||
*/
|
||||
if (device_is_registered(dev))
|
||||
software_node_notify(dev, KOBJ_ADD);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -913,7 +921,8 @@ void device_remove_software_node(struct device *dev)
|
||||
if (!swnode)
|
||||
return;
|
||||
|
||||
software_node_notify(dev, KOBJ_REMOVE);
|
||||
if (device_is_registered(dev))
|
||||
software_node_notify(dev, KOBJ_REMOVE);
|
||||
set_secondary_fwnode(dev, NULL);
|
||||
kobject_put(&swnode->kobj);
|
||||
}
|
||||
@ -930,8 +939,7 @@ int software_node_notify(struct device *dev, unsigned long action)
|
||||
|
||||
switch (action) {
|
||||
case KOBJ_ADD:
|
||||
ret = sysfs_create_link_nowarn(&dev->kobj, &swnode->kobj,
|
||||
"software_node");
|
||||
ret = sysfs_create_link(&dev->kobj, &swnode->kobj, "software_node");
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
|
@ -4601,6 +4601,9 @@ int of_clk_add_provider(struct device_node *np,
|
||||
struct of_clk_provider *cp;
|
||||
int ret;
|
||||
|
||||
if (!np)
|
||||
return 0;
|
||||
|
||||
cp = kzalloc(sizeof(*cp), GFP_KERNEL);
|
||||
if (!cp)
|
||||
return -ENOMEM;
|
||||
@ -4640,6 +4643,9 @@ int of_clk_add_hw_provider(struct device_node *np,
|
||||
struct of_clk_provider *cp;
|
||||
int ret;
|
||||
|
||||
if (!np)
|
||||
return 0;
|
||||
|
||||
cp = kzalloc(sizeof(*cp), GFP_KERNEL);
|
||||
if (!cp)
|
||||
return -ENOMEM;
|
||||
@ -4735,6 +4741,9 @@ void of_clk_del_provider(struct device_node *np)
|
||||
{
|
||||
struct of_clk_provider *cp;
|
||||
|
||||
if (!np)
|
||||
return;
|
||||
|
||||
mutex_lock(&of_clk_mutex);
|
||||
list_for_each_entry(cp, &of_clk_providers, link) {
|
||||
if (cp->node == np) {
|
||||
|
@ -166,7 +166,8 @@ struct scmi_msg_sensor_reading_get {
|
||||
|
||||
struct scmi_resp_sensor_reading_complete {
|
||||
__le32 id;
|
||||
__le64 readings;
|
||||
__le32 readings_low;
|
||||
__le32 readings_high;
|
||||
};
|
||||
|
||||
struct scmi_sensor_reading_resp {
|
||||
@ -717,7 +718,8 @@ static int scmi_sensor_reading_get(const struct scmi_protocol_handle *ph,
|
||||
|
||||
resp = t->rx.buf;
|
||||
if (le32_to_cpu(resp->id) == sensor_id)
|
||||
*value = get_unaligned_le64(&resp->readings);
|
||||
*value =
|
||||
get_unaligned_le64(&resp->readings_low);
|
||||
else
|
||||
ret = -EPROTO;
|
||||
}
|
||||
|
@ -172,6 +172,7 @@ static struct mfc_control controls[] = {
|
||||
.type = V4L2_CTRL_TYPE_INTEGER,
|
||||
.minimum = 0,
|
||||
.maximum = 16383,
|
||||
.step = 1,
|
||||
.default_value = 0,
|
||||
},
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ scmi_config_linear_regulator_mappings(struct scmi_regulator *sreg,
|
||||
sreg->desc.uV_step =
|
||||
vinfo->levels_uv[SCMI_VOLTAGE_SEGMENT_STEP];
|
||||
sreg->desc.linear_min_sel = 0;
|
||||
sreg->desc.n_voltages = delta_uV / sreg->desc.uV_step;
|
||||
sreg->desc.n_voltages = (delta_uV / sreg->desc.uV_step) + 1;
|
||||
sreg->desc.ops = &scmi_reg_linear_ops;
|
||||
}
|
||||
|
||||
|
@ -1632,17 +1632,18 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
dwc3_check_params(dwc);
|
||||
dwc3_debugfs_init(dwc);
|
||||
|
||||
ret = dwc3_core_init_mode(dwc);
|
||||
if (ret)
|
||||
goto err5;
|
||||
|
||||
dwc3_debugfs_init(dwc);
|
||||
pm_runtime_put(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err5:
|
||||
dwc3_debugfs_exit(dwc);
|
||||
dwc3_event_buffers_cleanup(dwc);
|
||||
|
||||
usb_phy_shutdown(dwc->usb2_phy);
|
||||
@ -1687,8 +1688,8 @@ static int dwc3_remove(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
dwc3_debugfs_exit(dwc);
|
||||
dwc3_core_exit_mode(dwc);
|
||||
dwc3_debugfs_exit(dwc);
|
||||
|
||||
dwc3_core_exit(dwc);
|
||||
dwc3_ulpi_exit(dwc);
|
||||
|
@ -342,6 +342,7 @@ struct tcpm_port {
|
||||
bool vbus_source;
|
||||
bool vbus_charge;
|
||||
|
||||
/* Set to true when Discover_Identity Command is expected to be sent in Ready states. */
|
||||
bool send_discover;
|
||||
bool op_vsafe5v;
|
||||
|
||||
@ -371,6 +372,7 @@ struct tcpm_port {
|
||||
struct hrtimer send_discover_timer;
|
||||
struct kthread_work send_discover_work;
|
||||
bool state_machine_running;
|
||||
/* Set to true when VDM State Machine has following actions. */
|
||||
bool vdm_sm_running;
|
||||
|
||||
struct completion tx_complete;
|
||||
@ -1453,6 +1455,7 @@ static void tcpm_queue_vdm(struct tcpm_port *port, const u32 header,
|
||||
/* Set ready, vdm state machine will actually send */
|
||||
port->vdm_retries = 0;
|
||||
port->vdm_state = VDM_STATE_READY;
|
||||
port->vdm_sm_running = true;
|
||||
|
||||
mod_vdm_delayed_work(port, 0);
|
||||
}
|
||||
@ -1695,7 +1698,6 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev,
|
||||
rlen = 1;
|
||||
} else {
|
||||
tcpm_register_partner_altmodes(port);
|
||||
port->vdm_sm_running = false;
|
||||
}
|
||||
break;
|
||||
case CMD_ENTER_MODE:
|
||||
@ -1743,14 +1745,12 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev,
|
||||
(VDO_SVDM_VERS(svdm_version));
|
||||
break;
|
||||
}
|
||||
port->vdm_sm_running = false;
|
||||
break;
|
||||
default:
|
||||
response[0] = p[0] | VDO_CMDT(CMDT_RSP_NAK);
|
||||
rlen = 1;
|
||||
response[0] = (response[0] & ~VDO_SVDM_VERS_MASK) |
|
||||
(VDO_SVDM_VERS(svdm_version));
|
||||
port->vdm_sm_running = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1759,6 +1759,10 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev,
|
||||
return rlen;
|
||||
}
|
||||
|
||||
static void tcpm_pd_handle_msg(struct tcpm_port *port,
|
||||
enum pd_msg_request message,
|
||||
enum tcpm_ams ams);
|
||||
|
||||
static void tcpm_handle_vdm_request(struct tcpm_port *port,
|
||||
const __le32 *payload, int cnt)
|
||||
{
|
||||
@ -1786,11 +1790,25 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,
|
||||
port->vdm_state = VDM_STATE_DONE;
|
||||
}
|
||||
|
||||
if (PD_VDO_SVDM(p[0])) {
|
||||
if (PD_VDO_SVDM(p[0]) && (adev || tcpm_vdm_ams(port) || port->nr_snk_vdo)) {
|
||||
/*
|
||||
* Here a SVDM is received (INIT or RSP or unknown). Set the vdm_sm_running in
|
||||
* advance because we are dropping the lock but may send VDMs soon.
|
||||
* For the cases of INIT received:
|
||||
* - If no response to send, it will be cleared later in this function.
|
||||
* - If there are responses to send, it will be cleared in the state machine.
|
||||
* For the cases of RSP received:
|
||||
* - If no further INIT to send, it will be cleared later in this function.
|
||||
* - Otherwise, it will be cleared in the state machine if timeout or it will go
|
||||
* back here until no further INIT to send.
|
||||
* For the cases of unknown type received:
|
||||
* - We will send NAK and the flag will be cleared in the state machine.
|
||||
*/
|
||||
port->vdm_sm_running = true;
|
||||
rlen = tcpm_pd_svdm(port, adev, p, cnt, response, &adev_action);
|
||||
} else {
|
||||
if (port->negotiated_rev >= PD_REV30)
|
||||
tcpm_queue_message(port, PD_MSG_CTRL_NOT_SUPP);
|
||||
tcpm_pd_handle_msg(port, PD_MSG_CTRL_NOT_SUPP, NONE_AMS);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1855,6 +1873,8 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,
|
||||
|
||||
if (rlen > 0)
|
||||
tcpm_queue_vdm(port, response[0], &response[1], rlen - 1);
|
||||
else
|
||||
port->vdm_sm_running = false;
|
||||
}
|
||||
|
||||
static void tcpm_send_vdm(struct tcpm_port *port, u32 vid, int cmd,
|
||||
@ -1920,8 +1940,10 @@ static void vdm_run_state_machine(struct tcpm_port *port)
|
||||
* if there's traffic or we're not in PDO ready state don't send
|
||||
* a VDM.
|
||||
*/
|
||||
if (port->state != SRC_READY && port->state != SNK_READY)
|
||||
if (port->state != SRC_READY && port->state != SNK_READY) {
|
||||
port->vdm_sm_running = false;
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: AMS operation for Unstructured VDM */
|
||||
if (PD_VDO_SVDM(vdo_hdr) && PD_VDO_CMDT(vdo_hdr) == CMDT_INIT) {
|
||||
@ -2496,10 +2518,7 @@ static void tcpm_pd_data_request(struct tcpm_port *port,
|
||||
NONE_AMS);
|
||||
break;
|
||||
case PD_DATA_VENDOR_DEF:
|
||||
if (tcpm_vdm_ams(port) || port->nr_snk_vdo)
|
||||
tcpm_handle_vdm_request(port, msg->payload, cnt);
|
||||
else if (port->negotiated_rev > PD_REV20)
|
||||
tcpm_pd_handle_msg(port, PD_MSG_CTRL_NOT_SUPP, NONE_AMS);
|
||||
tcpm_handle_vdm_request(port, msg->payload, cnt);
|
||||
break;
|
||||
case PD_DATA_BIST:
|
||||
port->bist_request = le32_to_cpu(msg->payload[0]);
|
||||
@ -2580,10 +2599,6 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
TYPEC_PWR_MODE_PD,
|
||||
port->pps_data.active,
|
||||
port->supply_voltage);
|
||||
/* Set VDM running flag ASAP */
|
||||
if (port->data_role == TYPEC_HOST &&
|
||||
port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
tcpm_set_state(port, SNK_READY, 0);
|
||||
} else {
|
||||
/*
|
||||
@ -2621,14 +2636,10 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
switch (port->state) {
|
||||
case SNK_NEGOTIATE_CAPABILITIES:
|
||||
/* USB PD specification, Figure 8-43 */
|
||||
if (port->explicit_contract) {
|
||||
if (port->explicit_contract)
|
||||
next_state = SNK_READY;
|
||||
if (port->data_role == TYPEC_HOST &&
|
||||
port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
} else {
|
||||
else
|
||||
next_state = SNK_WAIT_CAPABILITIES;
|
||||
}
|
||||
|
||||
/* Threshold was relaxed before sending Request. Restore it back. */
|
||||
tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
|
||||
@ -2643,10 +2654,6 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
port->pps_status = (type == PD_CTRL_WAIT ?
|
||||
-EAGAIN : -EOPNOTSUPP);
|
||||
|
||||
if (port->data_role == TYPEC_HOST &&
|
||||
port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
|
||||
/* Threshold was relaxed before sending Request. Restore it back. */
|
||||
tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
|
||||
port->pps_data.active,
|
||||
@ -2722,10 +2729,6 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
}
|
||||
break;
|
||||
case DR_SWAP_SEND:
|
||||
if (port->data_role == TYPEC_DEVICE &&
|
||||
port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
|
||||
tcpm_set_state(port, DR_SWAP_CHANGE_DR, 0);
|
||||
break;
|
||||
case PR_SWAP_SEND:
|
||||
@ -2763,7 +2766,7 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
PD_MSG_CTRL_NOT_SUPP,
|
||||
NONE_AMS);
|
||||
} else {
|
||||
if (port->vdm_sm_running) {
|
||||
if (port->send_discover) {
|
||||
tcpm_queue_message(port, PD_MSG_CTRL_WAIT);
|
||||
break;
|
||||
}
|
||||
@ -2779,7 +2782,7 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
PD_MSG_CTRL_NOT_SUPP,
|
||||
NONE_AMS);
|
||||
} else {
|
||||
if (port->vdm_sm_running) {
|
||||
if (port->send_discover) {
|
||||
tcpm_queue_message(port, PD_MSG_CTRL_WAIT);
|
||||
break;
|
||||
}
|
||||
@ -2788,7 +2791,7 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
|
||||
}
|
||||
break;
|
||||
case PD_CTRL_VCONN_SWAP:
|
||||
if (port->vdm_sm_running) {
|
||||
if (port->send_discover) {
|
||||
tcpm_queue_message(port, PD_MSG_CTRL_WAIT);
|
||||
break;
|
||||
}
|
||||
@ -4582,18 +4585,20 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
/* DR_Swap states */
|
||||
case DR_SWAP_SEND:
|
||||
tcpm_pd_send_control(port, PD_CTRL_DR_SWAP);
|
||||
if (port->data_role == TYPEC_DEVICE || port->negotiated_rev > PD_REV20)
|
||||
port->send_discover = true;
|
||||
tcpm_set_state_cond(port, DR_SWAP_SEND_TIMEOUT,
|
||||
PD_T_SENDER_RESPONSE);
|
||||
break;
|
||||
case DR_SWAP_ACCEPT:
|
||||
tcpm_pd_send_control(port, PD_CTRL_ACCEPT);
|
||||
/* Set VDM state machine running flag ASAP */
|
||||
if (port->data_role == TYPEC_DEVICE && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
if (port->data_role == TYPEC_DEVICE || port->negotiated_rev > PD_REV20)
|
||||
port->send_discover = true;
|
||||
tcpm_set_state_cond(port, DR_SWAP_CHANGE_DR, 0);
|
||||
break;
|
||||
case DR_SWAP_SEND_TIMEOUT:
|
||||
tcpm_swap_complete(port, -ETIMEDOUT);
|
||||
port->send_discover = false;
|
||||
tcpm_ams_finish(port);
|
||||
tcpm_set_state(port, ready_state(port), 0);
|
||||
break;
|
||||
@ -4605,7 +4610,6 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
} else {
|
||||
tcpm_set_roles(port, true, port->pwr_role,
|
||||
TYPEC_HOST);
|
||||
port->send_discover = true;
|
||||
}
|
||||
tcpm_ams_finish(port);
|
||||
tcpm_set_state(port, ready_state(port), 0);
|
||||
@ -4756,8 +4760,6 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
break;
|
||||
case VCONN_SWAP_SEND_TIMEOUT:
|
||||
tcpm_swap_complete(port, -ETIMEDOUT);
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
tcpm_set_state(port, ready_state(port), 0);
|
||||
break;
|
||||
case VCONN_SWAP_START:
|
||||
@ -4773,14 +4775,10 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
case VCONN_SWAP_TURN_ON_VCONN:
|
||||
tcpm_set_vconn(port, true);
|
||||
tcpm_pd_send_control(port, PD_CTRL_PS_RDY);
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
tcpm_set_state(port, ready_state(port), 0);
|
||||
break;
|
||||
case VCONN_SWAP_TURN_OFF_VCONN:
|
||||
tcpm_set_vconn(port, false);
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
tcpm_set_state(port, ready_state(port), 0);
|
||||
break;
|
||||
|
||||
@ -4788,8 +4786,6 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
case PR_SWAP_CANCEL:
|
||||
case VCONN_SWAP_CANCEL:
|
||||
tcpm_swap_complete(port, port->swap_status);
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
if (port->pwr_role == TYPEC_SOURCE)
|
||||
tcpm_set_state(port, SRC_READY, 0);
|
||||
else
|
||||
@ -5142,9 +5138,6 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
|
||||
switch (port->state) {
|
||||
case SNK_TRANSITION_SINK_VBUS:
|
||||
port->explicit_contract = true;
|
||||
/* Set the VDM flag ASAP */
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover)
|
||||
port->vdm_sm_running = true;
|
||||
tcpm_set_state(port, SNK_READY, 0);
|
||||
break;
|
||||
case SNK_DISCOVERY:
|
||||
@ -5545,15 +5538,18 @@ static void tcpm_send_discover_work(struct kthread_work *work)
|
||||
if (!port->send_discover)
|
||||
goto unlock;
|
||||
|
||||
if (port->data_role == TYPEC_DEVICE && port->negotiated_rev < PD_REV30) {
|
||||
port->send_discover = false;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Retry if the port is not idle */
|
||||
if ((port->state != SRC_READY && port->state != SNK_READY) || port->vdm_sm_running) {
|
||||
mod_send_discover_delayed_work(port, SEND_DISCOVER_RETRY_MS);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Only send the Message if the port is host for PD rev2.0 */
|
||||
if (port->data_role == TYPEC_HOST || port->negotiated_rev > PD_REV20)
|
||||
tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0);
|
||||
tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&port->lock);
|
||||
|
@ -627,10 +627,10 @@ static void toggle_allocation_gate(struct work_struct *work)
|
||||
* During low activity with no allocations we might wait a
|
||||
* while; let's avoid the hung task warning.
|
||||
*/
|
||||
wait_event_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
|
||||
sysctl_hung_task_timeout_secs * HZ / 2);
|
||||
wait_event_idle_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
|
||||
sysctl_hung_task_timeout_secs * HZ / 2);
|
||||
} else {
|
||||
wait_event(allocation_wait, atomic_read(&kfence_allocation_gate));
|
||||
wait_event_idle(allocation_wait, atomic_read(&kfence_allocation_gate));
|
||||
}
|
||||
|
||||
/* Disable static key and reset timer. */
|
||||
|
@ -290,7 +290,7 @@ static void hex_dump_object(struct seq_file *seq,
|
||||
warn_or_seq_printf(seq, " hex dump (first %zu bytes):\n", len);
|
||||
kasan_disable_current();
|
||||
warn_or_seq_hex_dump(seq, DUMP_PREFIX_NONE, HEX_ROW_SIZE,
|
||||
HEX_GROUP_SIZE, ptr, len, HEX_ASCII);
|
||||
HEX_GROUP_SIZE, kasan_reset_tag((void *)ptr), len, HEX_ASCII);
|
||||
kasan_enable_current();
|
||||
}
|
||||
|
||||
@ -1171,7 +1171,7 @@ static bool update_checksum(struct kmemleak_object *object)
|
||||
|
||||
kasan_disable_current();
|
||||
kcsan_disable_current();
|
||||
object->checksum = crc32(0, (void *)object->pointer, object->size);
|
||||
object->checksum = crc32(0, kasan_reset_tag((void *)object->pointer), object->size);
|
||||
kasan_enable_current();
|
||||
kcsan_enable_current();
|
||||
|
||||
@ -1246,7 +1246,7 @@ static void scan_block(void *_start, void *_end,
|
||||
break;
|
||||
|
||||
kasan_disable_current();
|
||||
pointer = *ptr;
|
||||
pointer = *(unsigned long *)kasan_reset_tag((void *)ptr);
|
||||
kasan_enable_current();
|
||||
|
||||
untagged_ptr = (unsigned long)kasan_reset_tag((void *)pointer);
|
||||
|
11
mm/memory.c
11
mm/memory.c
@ -4117,8 +4117,17 @@ vm_fault_t finish_fault(struct vm_fault *vmf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (unlikely(pte_alloc(vma->vm_mm, vmf->pmd)))
|
||||
if (vmf->prealloc_pte) {
|
||||
vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd);
|
||||
if (likely(pmd_none(*vmf->pmd))) {
|
||||
mm_inc_nr_ptes(vma->vm_mm);
|
||||
pmd_populate(vma->vm_mm, vmf->pmd, vmf->prealloc_pte);
|
||||
vmf->prealloc_pte = NULL;
|
||||
}
|
||||
spin_unlock(vmf->ptl);
|
||||
} else if (unlikely(pte_alloc(vma->vm_mm, vmf->pmd))) {
|
||||
return VM_FAULT_OOM;
|
||||
}
|
||||
}
|
||||
|
||||
/* See comment in handle_pte_fault() */
|
||||
|
@ -534,8 +534,8 @@ static void print_section(char *level, char *text, u8 *addr,
|
||||
unsigned int length)
|
||||
{
|
||||
metadata_access_enable();
|
||||
print_hex_dump(level, kasan_reset_tag(text), DUMP_PREFIX_ADDRESS,
|
||||
16, 1, addr, length, 1);
|
||||
print_hex_dump(level, text, DUMP_PREFIX_ADDRESS,
|
||||
16, 1, kasan_reset_tag((void *)addr), length, 1);
|
||||
metadata_access_disable();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user