Merge branch 'android12-5.10' into android12-5.10-lts

Sync up with android12-5.10 for the following commits:

6d9cb283f8 ANDROID: Update symbol list for mtk
fca37c251a ANDROID: dma-buf: Don't change vm_ops if vm_file changes
a2e00b4b5d FROMGIT: mm/slub: add taint after the errors are printed
e1b73b2abd FROMGIT: scsi: ufs: ufs-mediatek: Add missing of_node_put() in ufs_mtk_probe()
127a7e28ad FROMGIT: scsi: ufs-mediatek: Create reset control device_link
142bc470cd FROMGIT: scsi: ufs: ufs-mediatek: Fix HCI version in some platforms
bb105230c4 FROMGIT: scsi: ufs: ufs-mediatek: Disable HCI before HW reset
0f44c7edbc FROMGIT: scsi: ufs: core: Export ufshcd_hba_stop()
91843b55b4 ANDROID: abi_gki_aarch64_qcom: Add scheduler symbols
143148444d FROMLIST: staging: android: ashmem: add size field in procfs fdinfo
2f30bf7d8c ANDROID: ABI: Update allowed list for QCOM

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1c32004430db53083fb366db534cc726a2761568
This commit is contained in:
Greg Kroah-Hartman
2021-06-23 14:50:08 +02:00
10 changed files with 877 additions and 803 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -281,7 +281,6 @@
debugfs_create_symlink debugfs_create_symlink
debugfs_create_u32 debugfs_create_u32
debugfs_create_u64 debugfs_create_u64
debugfs_create_u8
debugfs_create_x32 debugfs_create_x32
debugfs_lookup debugfs_lookup
debugfs_remove debugfs_remove
@@ -393,7 +392,6 @@
devm_of_phy_get_by_index devm_of_phy_get_by_index
__devm_of_phy_provider_register __devm_of_phy_provider_register
devm_of_platform_populate devm_of_platform_populate
devm_of_pwm_get
devm_phy_create devm_phy_create
devm_phy_get devm_phy_get
devm_pinctrl_get devm_pinctrl_get
@@ -513,6 +511,7 @@
dma_pool_destroy dma_pool_destroy
dma_pool_free dma_pool_free
dma_resv_wait_timeout_rcu dma_resv_wait_timeout_rcu
dma_run_dependencies
dma_set_coherent_mask dma_set_coherent_mask
dma_set_mask dma_set_mask
dma_sync_sg_for_cpu dma_sync_sg_for_cpu
@@ -1005,7 +1004,6 @@
kvmalloc_node kvmalloc_node
led_classdev_flash_register_ext led_classdev_flash_register_ext
led_classdev_flash_unregister led_classdev_flash_unregister
led_classdev_unregister
led_get_flash_fault led_get_flash_fault
led_set_brightness_sync led_set_brightness_sync
led_set_flash_brightness led_set_flash_brightness
@@ -1183,6 +1181,7 @@
of_find_device_by_node of_find_device_by_node
of_find_matching_node_and_match of_find_matching_node_and_match
of_find_node_by_name of_find_node_by_name
of_find_node_by_phandle
of_find_node_opts_by_path of_find_node_opts_by_path
of_find_node_with_property of_find_node_with_property
of_find_property of_find_property
@@ -1556,7 +1555,6 @@
sdio_writel sdio_writel
sdio_writesb sdio_writesb
send_sig send_sig
send_sig_info
seq_hex_dump seq_hex_dump
seq_lseek seq_lseek
seq_open seq_open
@@ -1732,8 +1730,6 @@
syscon_node_to_regmap syscon_node_to_regmap
syscon_regmap_lookup_by_compatible syscon_regmap_lookup_by_compatible
syscon_regmap_lookup_by_phandle syscon_regmap_lookup_by_phandle
syscore_resume
syscore_suspend
sysfs_create_bin_file sysfs_create_bin_file
sysfs_create_file_ns sysfs_create_file_ns
sysfs_create_group sysfs_create_group
@@ -1758,6 +1754,7 @@
tasklet_init tasklet_init
tasklet_kill tasklet_kill
__tasklet_schedule __tasklet_schedule
tasklet_setup
tasklist_lock tasklist_lock
__task_pid_nr_ns __task_pid_nr_ns
__task_rq_lock __task_rq_lock
@@ -2193,4 +2190,10 @@
zlib_deflate_workspacesize zlib_deflate_workspacesize
# preserved by --additions-only # preserved by --additions-only
debugfs_create_u8
devm_of_pwm_get
led_classdev_unregister
send_sig_info
syscore_resume
syscore_suspend
v4l2_m2m_buf_remove_by_buf v4l2_m2m_buf_remove_by_buf

View File

@@ -242,6 +242,7 @@
copy_from_kernel_nofault copy_from_kernel_nofault
__cpu_active_mask __cpu_active_mask
cpu_bit_bitmap cpu_bit_bitmap
cpufreq_cooling_unregister
cpufreq_cpu_get cpufreq_cpu_get
cpufreq_cpu_get_raw cpufreq_cpu_get_raw
cpufreq_cpu_put cpufreq_cpu_put
@@ -2053,6 +2054,7 @@
sched_setscheduler sched_setscheduler
sched_setscheduler_nocheck sched_setscheduler_nocheck
sched_show_task sched_show_task
sched_trace_rd_span
sched_uclamp_used sched_uclamp_used
schedule schedule
schedule_hrtimeout schedule_hrtimeout
@@ -2505,6 +2507,7 @@
__traceiter_rwmmio_post_read __traceiter_rwmmio_post_read
__traceiter_rwmmio_read __traceiter_rwmmio_read
__traceiter_rwmmio_write __traceiter_rwmmio_write
__traceiter_sched_overutilized_tp
__traceiter_sched_switch __traceiter_sched_switch
__traceiter_suspend_resume __traceiter_suspend_resume
__tracepoint_android_rvh_account_irq __tracepoint_android_rvh_account_irq
@@ -2606,6 +2609,7 @@
__tracepoint_rwmmio_post_read __tracepoint_rwmmio_post_read
__tracepoint_rwmmio_read __tracepoint_rwmmio_read
__tracepoint_rwmmio_write __tracepoint_rwmmio_write
__tracepoint_sched_overutilized_tp
__tracepoint_sched_switch __tracepoint_sched_switch
__tracepoint_suspend_resume __tracepoint_suspend_resume
trace_print_array_seq trace_print_array_seq

View File

@@ -173,12 +173,17 @@ static void dma_buf_vma_close(struct vm_area_struct *vma)
static int dma_buf_do_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) static int dma_buf_do_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
{ {
/* call this first because the exporter might override vma->vm_ops */ int ret;
int ret = dmabuf->ops->mmap(dmabuf, vma); struct file *orig_vm_file = vma->vm_file;
/* call this first because the exporter might override vma->vm_ops */
ret = dmabuf->ops->mmap(dmabuf, vma);
if (ret) if (ret)
return ret; return ret;
if (orig_vm_file != vma->vm_file)
return 0;
/* save the exporter provided vm_ops */ /* save the exporter provided vm_ops */
dmabuf->exp_vm_ops = vma->vm_ops; dmabuf->exp_vm_ops = vma->vm_ops;
dmabuf->vm_ops = *(dmabuf->exp_vm_ops); dmabuf->vm_ops = *(dmabuf->exp_vm_ops);

View File

@@ -115,6 +115,7 @@ config SCSI_UFS_MEDIATEK
tristate "Mediatek specific hooks to UFS controller platform driver" tristate "Mediatek specific hooks to UFS controller platform driver"
depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
select PHY_MTK_UFS select PHY_MTK_UFS
select RESET_TI_SYSCON
help help
This selects the Mediatek specific additions to UFSHCD platform driver. This selects the Mediatek specific additions to UFSHCD platform driver.
UFS host on Mediatek needs some vendor specific configuration before UFS host on Mediatek needs some vendor specific configuration before

View File

@@ -595,11 +595,23 @@ static void ufs_mtk_get_controller_version(struct ufs_hba *hba)
ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_LOCALVERINFO), &ver); ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_LOCALVERINFO), &ver);
if (!ret) { if (!ret) {
if (ver >= UFS_UNIPRO_VER_1_8) if (ver >= UFS_UNIPRO_VER_1_8) {
host->hw_ver.major = 3; host->hw_ver.major = 3;
/*
* Fix HCI version for some platforms with
* incorrect version
*/
if (hba->ufs_version < ufshci_version(3, 0))
hba->ufs_version = ufshci_version(3, 0);
}
} }
} }
static u32 ufs_mtk_get_ufs_hci_version(struct ufs_hba *hba)
{
return hba->ufs_version;
}
/** /**
* ufs_mtk_init - find other essential mmio bases * ufs_mtk_init - find other essential mmio bases
* @hba: host controller instance * @hba: host controller instance
@@ -853,6 +865,9 @@ static int ufs_mtk_device_reset(struct ufs_hba *hba)
{ {
struct arm_smccc_res res; struct arm_smccc_res res;
/* disable hba before device reset */
ufshcd_hba_stop(hba);
ufs_mtk_device_reset_ctrl(0, res); ufs_mtk_device_reset_ctrl(0, res);
/* /*
@@ -1055,6 +1070,7 @@ static void ufs_mtk_event_notify(struct ufs_hba *hba,
static const struct ufs_hba_variant_ops ufs_hba_mtk_vops = { static const struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
.name = "mediatek.ufshci", .name = "mediatek.ufshci",
.init = ufs_mtk_init, .init = ufs_mtk_init,
.get_ufs_hci_version = ufs_mtk_get_ufs_hci_version,
.setup_clocks = ufs_mtk_setup_clocks, .setup_clocks = ufs_mtk_setup_clocks,
.hce_enable_notify = ufs_mtk_hce_enable_notify, .hce_enable_notify = ufs_mtk_hce_enable_notify,
.link_startup_notify = ufs_mtk_link_startup_notify, .link_startup_notify = ufs_mtk_link_startup_notify,
@@ -1078,12 +1094,42 @@ static int ufs_mtk_probe(struct platform_device *pdev)
{ {
int err; int err;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *reset_node;
struct platform_device *reset_pdev;
struct device_link *link;
reset_node = of_find_compatible_node(NULL, NULL,
"ti,syscon-reset");
if (!reset_node) {
dev_notice(dev, "find ti,syscon-reset fail\n");
goto skip_reset;
}
reset_pdev = of_find_device_by_node(reset_node);
if (!reset_pdev) {
dev_notice(dev, "find reset_pdev fail\n");
goto skip_reset;
}
link = device_link_add(dev, &reset_pdev->dev,
DL_FLAG_AUTOPROBE_CONSUMER);
if (!link) {
dev_notice(dev, "add reset device_link fail\n");
goto skip_reset;
}
/* supplier is not probed */
if (link->status == DL_STATE_DORMANT) {
err = -EPROBE_DEFER;
goto out;
}
skip_reset:
/* perform generic probe */ /* perform generic probe */
err = ufshcd_pltfrm_init(pdev, &ufs_hba_mtk_vops); err = ufshcd_pltfrm_init(pdev, &ufs_hba_mtk_vops);
out:
if (err) if (err)
dev_info(dev, "probe failed %d\n", err); dev_info(dev, "probe failed %d\n", err);
of_node_put(reset_node);
return err; return err;
} }

View File

@@ -4474,7 +4474,7 @@ EXPORT_SYMBOL_GPL(ufshcd_make_hba_operational);
* ufshcd_hba_stop - Send controller to reset state * ufshcd_hba_stop - Send controller to reset state
* @hba: per adapter instance * @hba: per adapter instance
*/ */
static inline void ufshcd_hba_stop(struct ufs_hba *hba) void ufshcd_hba_stop(struct ufs_hba *hba)
{ {
unsigned long flags; unsigned long flags;
int err; int err;
@@ -4493,6 +4493,7 @@ static inline void ufshcd_hba_stop(struct ufs_hba *hba)
if (err) if (err)
dev_err(hba->dev, "%s: Controller disable failed\n", __func__); dev_err(hba->dev, "%s: Controller disable failed\n", __func__);
} }
EXPORT_SYMBOL_GPL(ufshcd_hba_stop);
/** /**
* ufshcd_hba_execute_hce - initialize the controller * ufshcd_hba_execute_hce - initialize the controller

View File

@@ -975,6 +975,7 @@ int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask,
unsigned long timeout_ms); unsigned long timeout_ms);
void ufshcd_parse_dev_ref_clk_freq(struct ufs_hba *hba, struct clk *refclk); void ufshcd_parse_dev_ref_clk_freq(struct ufs_hba *hba, struct clk *refclk);
void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val); void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val);
void ufshcd_hba_stop(struct ufs_hba *hba);
static inline void check_upiu_size(void) static inline void check_upiu_size(void)
{ {

View File

@@ -894,6 +894,8 @@ static void ashmem_show_fdinfo(struct seq_file *m, struct file *file)
seq_printf(m, "name:\t%s\n", seq_printf(m, "name:\t%s\n",
asma->name + ASHMEM_NAME_PREFIX_LEN); asma->name + ASHMEM_NAME_PREFIX_LEN);
seq_printf(m, "size:\t%zu\n", asma->size);
mutex_unlock(&ashmem_mutex); mutex_unlock(&ashmem_mutex);
} }
#endif #endif

View File

@@ -685,8 +685,6 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
pr_err("=============================================================================\n"); pr_err("=============================================================================\n");
pr_err("BUG %s (%s): %pV\n", s->name, print_tainted(), &vaf); pr_err("BUG %s (%s): %pV\n", s->name, print_tainted(), &vaf);
pr_err("-----------------------------------------------------------------------------\n\n"); pr_err("-----------------------------------------------------------------------------\n\n");
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
va_end(args); va_end(args);
} }
@@ -760,6 +758,7 @@ void object_err(struct kmem_cache *s, struct page *page,
{ {
slab_bug(s, "%s", reason); slab_bug(s, "%s", reason);
print_trailer(s, page, object); print_trailer(s, page, object);
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
} }
static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page, static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page,
@@ -774,6 +773,7 @@ static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page,
slab_bug(s, "%s", buf); slab_bug(s, "%s", buf);
print_page_info(page); print_page_info(page);
dump_stack(); dump_stack();
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
} }
static void init_object(struct kmem_cache *s, void *object, u8 val) static void init_object(struct kmem_cache *s, void *object, u8 val)
@@ -822,6 +822,7 @@ static int check_bytes_and_report(struct kmem_cache *s, struct page *page,
fault, end - 1, fault - addr, fault, end - 1, fault - addr,
fault[0], value); fault[0], value);
print_trailer(s, page, object); print_trailer(s, page, object);
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
restore_bytes(s, what, value, fault, end); restore_bytes(s, what, value, fault, end);
return 0; return 0;