Unverified Commit de1a4d93 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15271 LoongArch: fix cacheinfo/unaligned/rtc/s3/hda/usb issues

Merge Pull Request from: @ci-robot 
 
PR sync from: Hongchen Zhang <zhanghongchen@loongson.cn>
https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/W6HCN4E264FRWJ4MYCVUWCUDVXEF2DQF/ 
Huacai Chen (1):
  LoongArch: Correct the cacheinfo sharing information

Michal Schmidt (1):
  ice: fix unaligned access in ice_create_lag_recipe

Ming Wang (1):
  rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr()

Zhao Qunqin (3):
  LoongArch: Update the flush cache policy
  hda/pci: Add AZX_DCAPS_NO_TCSEL flag for Loongson HDA devices
  blutetooth/btusb: delay 1ms while suspending

Hongchen Zhang (1):
  LoongArch: set CONFIG_CMA_SIZE_MBYTES to 0


 
https://gitee.com/openeuler/kernel/issues/IBQ4JL 
 
Link:https://gitee.com/openeuler/kernel/pulls/15271

 

Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents c6d689ea 7e901bca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2185,6 +2185,7 @@ CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC7=m
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
CONFIG_BOOT_PRINTK_DELAY=y
+6 −0
Original line number Diff line number Diff line
@@ -51,6 +51,12 @@ static void cache_cpumap_setup(unsigned int cpu)
				continue;

			sib_leaf = sib_cpu_ci->info_list + index;
			/* SMT cores share all caches */
			if (cpus_are_siblings(i, cpu)) {
				cpumask_set_cpu(cpu, &sib_leaf->shared_cpu_map);
				cpumask_set_cpu(i, &this_leaf->shared_cpu_map);
			}
			/* Node's cores share shared caches */
			if (cache_leaves_are_shared(this_leaf, sib_leaf)) {
				cpumask_set_cpu(cpu, &sib_leaf->shared_cpu_map);
				cpumask_set_cpu(i, &this_leaf->shared_cpu_map);
+23 −1
Original line number Diff line number Diff line
@@ -63,6 +63,28 @@ static void flush_cache_leaf(unsigned int leaf)
	} while (--nr_nodes > 0);
}

static void flush_cache_last_level(unsigned int leaf)
{
	u64 addr;
	int i, j, nr_nodes, way_size;
	struct cache_desc *cdesc = current_cpu_data.cache_leaves + leaf;

	nr_nodes = loongson_sysconf.nr_nodes;

	addr = CSR_DMW1_BASE;
	iocsr_write8(0x1, 0x280);
	way_size = cdesc->sets * cdesc->linesz;
	do {
		for (i = 0; i < (cdesc->ways * 3); i++) {
			for (j = 0; j < (cdesc->sets); j++) {
				READ_ONCE(*(u32 *)addr);
				addr += cdesc->linesz;
			}
		}
		addr += 0x100000000000;
	} while (--nr_nodes > 0);
}

asmlinkage __visible void __flush_cache_all(void)
{
	int leaf;
@@ -71,7 +93,7 @@ asmlinkage __visible void __flush_cache_all(void)

	leaf = cache_present - 1;
	if (cache_inclusive(cdesc + leaf)) {
		flush_cache_leaf(leaf);
		flush_cache_last_level(leaf);
		return;
	}

+3 −0
Original line number Diff line number Diff line
@@ -4686,6 +4686,9 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
	if (data->suspend_count++)
		return 0;

#ifdef CONFIG_LOONGARCH
	mdelay(1);
#endif
	spin_lock_irq(&data->txlock);
	if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
		set_bit(BTUSB_SUSPENDING, &data->flags);
+1 −3
Original line number Diff line number Diff line
@@ -1806,9 +1806,7 @@ static int ice_create_lag_recipe(struct ice_hw *hw, u16 *rid,
	new_rcp->content.act_ctrl_fwd_priority = prio;
	new_rcp->content.rid = *rid | ICE_AQ_RECIPE_ID_IS_ROOT;
	new_rcp->recipe_indx = *rid;
	bitmap_zero((unsigned long *)new_rcp->recipe_bitmap,
		    ICE_MAX_NUM_RECIPES);
	set_bit(*rid, (unsigned long *)new_rcp->recipe_bitmap);
	put_unaligned_le64(BIT_ULL(*rid), new_rcp->recipe_bitmap);

	err = ice_aq_add_recipe(hw, new_rcp, 1, NULL);
	if (err)
Loading