From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E31421C5D59 for ; Mon, 27 Jul 2026 08:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785141503; cv=none; b=DDTwXYgGAQBHxngjb4aCzixAFnEnd4NyBkLKnopp1EfTc+2u3VkLA3NZtLBwKbN4Xp4OkyO+LjGVo0ZxZSriv38Z0kmYK6tedh7q8W/exnChS1uUv0Bcbn8KKYOYF8F8FO2lBdw6Wwi6gAzQzktSs3Htsi55+123LNALHGXmsII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785141503; c=relaxed/simple; bh=lbbNnwK3VkwBMs+EmlsI4Fw27haWgx2pGKXP87TLttg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UwDbLq2i964IflroGACWnLyzGKEXBLLdSU3zEGa03tk+Aqj9c9n7OOhPE2wiENEPIn8cDAOhmISX+5rsc9dFp51LSsPwJLC5+PLFmCif94ug4cTuvroPad8YLSbxeGf82Au8REBfEwH5AXuCxoCgYYyidTbptG4uD0R8aszvicw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=b3uBcf+8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kQoYkeTf; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="b3uBcf+8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kQoYkeTf" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66R7RhjX2936870 for ; Mon, 27 Jul 2026 08:38:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= JBJODevipv2/JNQZQkU3PGD4+im0nIr+wKclPG5CiQo=; b=b3uBcf+871dDTxsg Cd53dTDUPYOBlWM5czBnT1pNS+T44MP4K3yA02G1/YsoptygrNVtEbaOgIzhJR6f MN1ajTwymI1pPBr0je5MUw71/U8bH2rX9ksjlrUNmnJ1DZ0hmNiBLvdi8Y001vqT 29WnQPjkcnjY35P5qPc7Gvs8aGVB0RSrFiIYd3ui8kSW47xG8kWsRGk6mXHsNrkH s7/nsxK7RVR1e4qXqofricb9HmQB176l5Ux55pLknXe69kMF+CJAX3F/ArpMJJau sxgZhfc5CW77D+c5lT1daa08q5kPaxDcOgVrcSUlziWGmnHcuc9ah5aG4STNTasZ A3hyxg== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fmnwew93c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 27 Jul 2026 08:38:20 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2cfca8558d2so36595335ad.2 for ; Mon, 27 Jul 2026 01:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785141500; x=1785746300; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=JBJODevipv2/JNQZQkU3PGD4+im0nIr+wKclPG5CiQo=; b=kQoYkeTflHwDpWwutbFTjQ5w7+3dUqT8BwvBoihkYYvucVbsxQ+B8EdzzqoZBp3uCO Xzz9YnE34bhspxBHO0jvFatSUJhK1JuIq+Pj37v+dXsjkYIynHbB8vw0EqDRMKa/n/ce d14g57UJz+cmRpIN1q9Vj753GU7GbwgY++npluEUtrQ5Tc44hXcdgFIEVK9DgqOpYc/y qzS1PJr1QU2QXvN0ITNB8F4kzoeGz7y0oHyW4jfZzP1i19Q4sjIZfhuaxM6ezBQelKpq PuPCoCQ5CLXkmzikl3r8l1G5pDeSDVT3cZLSozUKxpbweS9aYq8eUNL97qY1VOOZVEyI 0tnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785141500; x=1785746300; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JBJODevipv2/JNQZQkU3PGD4+im0nIr+wKclPG5CiQo=; b=C3aE9pLPp4O70txgHPy8KXBHpjnUikAhUUH/zj+8kkB67dvxfnyj/6TV/gNA0r1NXi BoOVDyVbDCpnCniQTLgTRqiPrfOpjSRJ08+NwQn9jL4E/7yznAjnnPRGWw/DElrj2zTl rqcGPiwE/BR000alZFGQCgPzIXtRgsf0VQJke1wkUtgXYLiHz6rjqlkX9LPNjOcQLvPW TIn8+SoOzNRWR7UTLROKEh4Da3IZi7gs2R67+Nv0x2Xj9TTApyIBzFsoHNThBMEQUgU9 TbYveCqlJU9LdWtvRtXtgvu1BCgVmcJnTFXj1s6vr8740VPB3kF7KmGkZxtp/U/8C3Rk BwIw== X-Forwarded-Encrypted: i=1; AHgh+Ro5CUe3KUP9UwndjaO1n70Pfs54rhOkGFl1FJ7Vaay36HllAdDtdXNxyaiBwf2SLVaQLRqXyImwAquFrYk=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+bCIghqU/5ATkjzpPIRPw0occkgvsZXRY/EEO2Ud1Oj7rp9hr Rqz1Duf9o8sYPwLuXM+m5Z7WDdwHJnePz+kbMuesvSUN4JLGkzckIumLxxQxeGWaDaej4zfPdhN 84h9LYcNDydd1AmGkyqRTXMsI2Ch0nzUrcXE9nZaqufaDZ8inj+IYCWBqEM36GrFkpNc= X-Gm-Gg: AR+sD101Oc73BEtaAIJrhla1eQ3MuOw7//Zh245ZB9fhboTVjHmg7uJB8lKQfjNvG0e gY6xggxJJMXaQYjNyytGG/UkHFCdMaIm/R7EMm2CwaPMJ6StyDh4l81KR89VcX8kW5zipAOLmjQ AGd2F3Kp+37A0Yge3aM2ei7K0nH8jbLM2zEo34CSgBAssUhi4rrfOYesJ2PWI6Edtw2tN8e7NKR ZuPqU6YRPRAnPay/ubFMq8iIiQBBKuQ/RAZKo5tRmjIagJ4xRxvw6qq/rejr7faHogKA/+BPMHA aTDXDy/9dCgsq0NZNKj+XbfBRXBQ2y/J27rkSYYo5BRQ5fEducUpd3CnGe4tmntri+z2g8+RlQP Jk+bzGAPdYQeB5uNgUgvjRzAvsWGTbXY= X-Received: by 2002:a17:903:2446:b0:2cf:4505:6bcf with SMTP id d9443c01a7336-2cfde83038amr68156845ad.29.1785141500302; Mon, 27 Jul 2026 01:38:20 -0700 (PDT) X-Received: by 2002:a17:903:2446:b0:2cf:4505:6bcf with SMTP id d9443c01a7336-2cfde83038amr68156635ad.29.1785141499842; Mon, 27 Jul 2026 01:38:19 -0700 (PDT) Received: from [10.231.194.200] ([114.94.8.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cfde59b768sm31703235ad.4.2026.07.27.01.38.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jul 2026 01:38:19 -0700 (PDT) Message-ID: <4f08e6f6-29bf-4653-899f-e0b6cf806675@oss.qualcomm.com> Date: Mon, 27 Jul 2026 16:38:16 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH ath-next] wifi: ath10k: snoc: use memcpy_fromio() for MSA ramdump To: Linghui Wu , ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, jjohnson@kernel.org, linux-kernel@vger.kernel.org References: <20260727072629.2297208-1-linghui.wu@oss.qualcomm.com> From: Baochen Qiang Content-Language: en-US In-Reply-To: <20260727072629.2297208-1-linghui.wu@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI3MDA4NSBTYWx0ZWRfX5V31RjvIvd9O Pp4swD0rBBnu9zAUQJjOKUT9sR/HyiaN5FcmDoKFYz8B6js+rANZLhOqCMXMh0GoXIg8rq/563b jbdGZHuwJ412ftLq3kbSexB4ag8rsfMF9U3jwPIghBm3xY65fbhoHFVN9GlH2Jao/AjfhShTM78 iaPKajRBq+LCkKMvSNL9SLfhHeR7KyYEcOdaz4dHhYUvF+0jqbrlk8rl4cI3RwFoHkvXLmuQ2jU kivfmqqi/Rkz1syylssgnlhx0g05UEte0VYKO6OJ7xgERnm187h+REFplSmppvnOkV80YYDWxIs rubqUB5iXUzuZhz58Kj6O/cGzTK/+FnAU9k+YYQATzuEW0uLr2UvyKOZl7TDtcni/XJ0MEXHjnm t24EYqUPmjF5dg6X1vTrgK6aWHJIJBYrpRUFPncLuGdu99xiJG3eRelF7mfFbpkoZwShQ6Q2PA5 qYR3VCyTyPhvsB7kAhg== X-Proofpoint-GUID: zazFNMEvWVv3Ed6AFtiV1ee64mPJUxoI X-Authority-Analysis: v=2.4 cv=S77pBosP c=1 sm=1 tr=0 ts=6a6718fc cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Uz3yg00KUFJ2y2WijEJ4bw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=EMxFUL3Ltl7gSd1fbyIA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-ORIG-GUID: zazFNMEvWVv3Ed6AFtiV1ee64mPJUxoI X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI3MDA4NSBTYWx0ZWRfXz2kQdnjyO5V/ c6xykqMQbDBNPuxswlGe/YQ3UPZJM5XJZUrRQyXMgKtVdTSk7uOrnSgn4jh+yL32CpI1lJNBJdW ODH5xayi/mbo52ENTn9gM4DfuVNV3Bo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-27_02,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 phishscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 adultscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607270085 On 7/27/2026 3:26 PM, Linghui Wu wrote: > On WCN3990/SNOC the MSA region is mapped with devm_memremap(MEMREMAP_WT). > On arm64 such a mapping is not Normal-cacheable, so unaligned accesses to > it are not permitted. ath10k_msa_dump_memory() copies the region with a > plain memcpy(), whose optimized __pi_memcpy_generic implementation issues > wide/unaligned loads. This triggers an alignment fault (FSC=0x21) Oops in > ath10k_snoc_fw_crashed_dump() while collecting the devcoredump: > > Unable to handle kernel paging request ... FSC=0x21: alignment fault > pc : __pi_memcpy_generic > lr : ath10k_snoc_fw_crashed_dump [ath10k_snoc] > > The Oops both leaves the firmware RAM dump buffer zeroed (no dump is > captured) and crashes the kernel, which in turn breaks modem SSR > recovery. > > Use memcpy_fromio(), which only performs accesses that are valid for such > a device-memory mapping. The generic memcpy_fromio() implementation aligns > the source before issuing word-sized reads and stores the destination with > put_unaligned(), so it is also safe for the coherent DMA allocation used on > the non-reserved-memory path. ath11k and ath12k use the same pattern > when copying target memory into crash dumps, so call it unconditionally > here too. > The MEMREMAP_WT pointer is a plain void *, so an explicit __iomem cast is > needed; use __force to keep sparse happy. > > Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.3.7.c5-00107-QCAHLSWMTPL-1 > > Fixes: 3f14b73c3843 ("ath10k: Enable MSA region dump support for WCN3990") > Signed-off-by: Linghui Wu Reviewed-by: Baochen Qiang