From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 A362D3B6376 for ; Tue, 7 Apr 2026 15:22:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775575346; cv=none; b=OPcq+3XT/z65Ds9OoK9HMy0J4lM41sQBGLytHbcXBvvrebfauyhg7vM3slI3gFR+yJ+8bsKKa3mMZ8D9Lff2NABTfsrK06Jl9gp3KS+gbz4CMKDUOfGFj1hpabuJIdMrZpx+YqfdsBhbFOKUZefmnUFbUraZUYGIFkfmum40Wn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775575346; c=relaxed/simple; bh=1tJVwajwStaJiW35ZoXT6KUci38I5ZYjNFoqJGCE/po=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aRZ35QxTO/V90So8ZZMgvHOAv7Ug82lPz/9ihtze+H8pX0wciQnYzaFIA1WaeJV575TFvvq4sz1um/SIQ83ptPbcusCvmvTwY+s0DQ6q0QM0mpLhUwSkHgkEbpwQEAWg9+0/Twn5lyvm/ObahlhOFzf5ZpTpmF7DUgk3i4VHXvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LSaM9bZs; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LSaM9bZs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775575335; x=1807111335; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1tJVwajwStaJiW35ZoXT6KUci38I5ZYjNFoqJGCE/po=; b=LSaM9bZsucG4X67W4DOqXYoNw2XcvUgso/BLG4rNXpZ+4RYQsbmyFuEN pVdz1M4+c3HAy0R8vWHaSPu/5jZrWB1X2LzUo9LnEJhYLJx/5XfhCp1YA 2lIaAfDD7zPGseeBW0zVNVLqExY9Xwjb7KKfPS06NYDNqNm90eFHEp8bI dnZnzjzWiJtxaWCX35TBs+4fy9eOkcO6gpquLdasf8Iv3jxPIsFmdkbOi xETS9AXJXG+D4sbeTxQEJAlmoP3PJBf0FgAtmqm3qWcs2swnY+kAEEZPw TPHhtfr2cgmOm1xKXSPNoGtvQ51Y8xR6W6zUCRe2fGNy5aDnw5BEGvMxI w==; X-CSE-ConnectionGUID: 1iSmh2SeRYSEsDDIfcwx2A== X-CSE-MsgGUID: AddDSMTWT9WGx4Val0H1nQ== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="76505943" X-IronPort-AV: E=Sophos;i="6.23,165,1770624000"; d="scan'208";a="76505943" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2026 08:22:12 -0700 X-CSE-ConnectionGUID: GFvaF7A4SAiTO1Hp3csw9w== X-CSE-MsgGUID: ATKRYI8HSh25TYy1tIwZFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,165,1770624000"; d="scan'208";a="227187059" Received: from lkp-server01.sh.intel.com (HELO d00eb8a6782a) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 07 Apr 2026 08:22:09 -0700 Received: from kbuild by d00eb8a6782a with local (Exim 4.98.2) (envelope-from ) id 1wA8Fh-000000000jV-3hQl; Tue, 07 Apr 2026 15:22:05 +0000 Date: Tue, 7 Apr 2026 23:21:14 +0800 From: kernel test robot To: Xi Ruoyao , Huacai Chen , WANG Xuerui Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, loongarch@lists.linux.dev, Zixing Liu , Mingcong Bai , Xi Ruoyao , Jiaxun Yang , Arnd Bergmann , Yangyang Lian , Yawei Li , George Guo , linux-kernel@vger.kernel.org Subject: Re: [PATCH] LoongArch: detect and disable sc.q if erratic Message-ID: <202604072314.9J2SQEFo-lkp@intel.com> References: <20260402044732.164294-2-xry111@xry111.site> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260402044732.164294-2-xry111@xry111.site> Hi Xi, kernel test robot noticed the following build errors: [auto build test ERROR on soc/for-next] [also build test ERROR on linus/master v7.0-rc7 next-20260406] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Xi-Ruoyao/LoongArch-detect-and-disable-sc-q-if-erratic/20260407-193425 base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next patch link: https://lore.kernel.org/r/20260402044732.164294-2-xry111%40xry111.site patch subject: [PATCH] LoongArch: detect and disable sc.q if erratic config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20260407/202604072314.9J2SQEFo-lkp@intel.com/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c80443cd37b2e2788cba67ffa180a6331e5f0791) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604072314.9J2SQEFo-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202604072314.9J2SQEFo-lkp@intel.com/ All errors (new ones prefixed by >>): >> arch/loongarch/kernel/cpu-probe.c:151:23: error: invalid operand for instruction 151 | "move\t%[tmp], $r0\n\t" | ^ :3:22: note: instantiated into assembly here 3 | sc.q $a2, $a0, $a1, 0 | ^ 1 error generated. vim +151 arch/loongarch/kernel/cpu-probe.c 134 135 /* 136 * Some LoongArch has broken sc.q which incorrectly handles the upper word 137 * when the lower word is zero. Newer firmware versions (such as the 202602 138 * release from Loongson) seem to contain a workaround for this issue. 139 * 140 * Disable sc.q if erratic to ensure reliability and compatibility. 141 */ 142 static bool sc_q_is_sane(void) 143 { 144 struct { 145 long word[2]; 146 } __aligned(16) mem; 147 register long tmp; 148 149 asm ( 150 "1:ll.d\t$r0, %[mem]\n\t" > 151 "move\t%[tmp], $r0\n\t" 152 "sc.q\t%[tmp], %[one], %[mem]\n\t" 153 "beqz\t%[tmp], 1b" 154 : [mem] "=ZB" (mem), [tmp] "=&r" (tmp) 155 : [one] "r" (1)); 156 157 if (mem.word[1] != 1) { 158 pr_warn_once("Warning: sc.q is erratic on this platform, disabling for both kernel and HWCAP. Please try a firmware update."); 159 return false; 160 } 161 162 return true; 163 } 164 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki