From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2402B36C5A6 for ; Tue, 13 Jan 2026 20:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768334702; cv=none; b=mNBqHzIg3J/yFr90RsNT+xPRaY4Wr5q9bSCv4HhLBCys2mN74MuJkF9lq51KU/9IYZupQ5Gy/bxDwgEdf3Lz7LEaI1PUz0Zqi4SHdA+kqFsNoMIB8zGM9T7qivQX6tK7phiJ7vFBj8tgjzPqhezbfeWLMd7D7JlaC+oR/uojJPo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768334702; c=relaxed/simple; bh=BOlPQfIkt/fjEJvpKRaH6vV9rI3DP+2Yxs4j/ADRLvc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uw+IqVxslqS2KkxEDj+tLGkVBzD3ipjz6RzchqpXRBPXRDrUkHX6Bj6GG7SjG5bPL4/i8IVuUkqn6fuWt6k30H/RSTq3j4YIpO4oUxFUFYhPtbFDv/AGYSztNSPOpJLihx8F0k8W77vq9aEF0nruFlwjf2jmIQEVES/zZiPpU6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XjkaNZVQ; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XjkaNZVQ" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-47d63594f7eso48169095e9.0 for ; Tue, 13 Jan 2026 12:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768334698; x=1768939498; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=0muJ4312EJ6gGXEPQdwyzyI8xQcdUomK1P5HrD6iP7k=; b=XjkaNZVQM+Y5BoEcDdJmkk6brF1Z5JDdZ6PROcCg+W8uRfNrsFK3aEqnGcCceeq4NY CibiU7UTj55ENIEQNLh5FZwH/08Cp7/hsTyHc0+UjJohTmHpON/DkdVZMoRitvuvX75v Cn7ud3lSje5kpBPNuVuyTHPBR6ZNePfsAvDQIUNplPydgdg/95FBCXFAW0jd5uhem6et NOdWiTi09xm6Me8xo04xo+kaJG9/miuPrW8eieQnlrZgEnKeT1euEqxQPoIyDC3661wr 4iwgiGbqIqCILY0lEkJ6b/Yd3Tae9cWuziZwFwIF/vNqjpKuCgM/pO+avOkqpsvVgWhO eqGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768334698; x=1768939498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0muJ4312EJ6gGXEPQdwyzyI8xQcdUomK1P5HrD6iP7k=; b=O9E7ZOOyMXXKkeXxOMUon7Cr4idwILn9TO0u6EOtxuuReAUAiiZvh7ZFnX/H9WBuv+ bzqrEpDtH2C3PEA2CcN4lJ4daIZLA1zOeD2g8Uf1FIZDm2GOeVYK+8sgzb57aAbzs0CA ALjvu7olHjTXg2A0SgNmXqA3P/2nKtyTm7HoyJHtCSTRWN8mEdhcCCSmMqCC6VvioKIg ayfgFOWLeYkBH2n0XGXMbyJ1H5N3OB4Lx8Dn61GJfKJ/0anonzGfpr3pBhDnISv8ku9y sRBT4V9aa9/QEKtaiqfu6N054f9Tlp4e0dO3tbs24vrvBTKfY3fD3SzBURVqQO/kfg9e F33g== X-Forwarded-Encrypted: i=1; AJvYcCWmjo9fXtzTT9j6jeBbDI32zVn0ufwu5ELfCb/HDy3KElfqawHpM0Wo6JWBBhSacq8yQQgv2LAbhOTmsiM=@vger.kernel.org X-Gm-Message-State: AOJu0YyRnZz9jGsndZ4q+ZYw46j4jcjbyt8erqeaF5DOSN0Kxo/64/DE DIyW1bz959EzjTHh2G3DwmH46h7AccP7SG2DubgmHTteO/H7gQg854hePVS4HA== X-Gm-Gg: AY/fxX6rvPrFdJOtanGyiYBOmH7fXAMHOSwoJ3etvw30V3FeccpUmhFIYtLOYRXGmxy 4bGMPDopF0+wJIPRdvRPQCKy6Llh6VylzHKmMvTiWbH62GlEySnHauanxlSlIaW3R2TaTzwnEfJ gUmt/Rv3R6Rh1idDcZ4oYD97/8MvmXw56qNZWCe8KngJnfwb0XMo0BmT0/f8LZi4DqbsF1Vh4QY pz3LCZ8n/g7rGwhAmd4sh+F3EiHi5PUsJXemboDuANguCZ/9qTi6C8XarSLAjTK66PFmu3mSF6R ciZTSAAHABzk7TifP1+hvRNTsEvBwDA5SZDtyHOR57XH+XRpnPfS2eDn78DTOvVeAsdQ1QdQR4s yz/IeEVyMHMNDvBhMGRr/ePfoM63F0i5ufRHqUNjGtMtvAxiZ6/ifYBWWPMnv47IfNwu0pKR2zX tn28TXtokElBmyMI6l7tndG9MKFQEr4EmquPrutNY+z2M5setr8aGu3gTpnRXVmfU= X-Received: by 2002:a05:600c:4443:b0:477:9392:8557 with SMTP id 5b1f17b1804b1-47ee338d53fmr4231585e9.18.1768334698044; Tue, 13 Jan 2026 12:04:58 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0daa78sm46840666f8f.6.2026.01.13.12.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 12:04:57 -0800 (PST) Date: Tue, 13 Jan 2026 20:04:55 +0000 From: David Laight To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List , Nicolas Pitre , linux-mips@vger.kernel.org, tsbogend@alpha.franked.de Subject: Re: mips64-linux-ld: div64.c:undefined reference to `__multi3' Message-ID: <20260113200455.3dffe121@pumpkin> In-Reply-To: <202601140146.hMLODc6v-lkp@intel.com> References: <202601140146.hMLODc6v-lkp@intel.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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-Transfer-Encoding: 7bit On Wed, 14 Jan 2026 01:59:24 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: b71e635feefc852405b14620a7fc58c4c80c0f73 > commit: d10bb374c41e4c4dced04ae7d2fe2d782a5858a0 lib: mul_u64_u64_div_u64(): optimise the divide code > date: 8 weeks ago > config: mips-randconfig-r113-20260113 (https://download.01.org/0day-ci/archive/20260114/202601140146.hMLODc6v-lkp@intel.com/config) > compiler: mips64-linux-gcc (GCC) 8.5.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260114/202601140146.hMLODc6v-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/202601140146.hMLODc6v-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > mips64-linux-ld: lib/math/div64.o: in function `mul_u64_add_u64_div_u64': > div64.c:(.text+0x84): undefined reference to `__multi3' > >> mips64-linux-ld: div64.c:(.text+0x11c): undefined reference to `__multi3' > This looks like a bug in the mips 'port'. arch/mips/lib/multi3.c has the comment: /* * GCC 7 & older can suboptimally generate __multi3 calls for mips64r6, so for * that specific case only we implement that intrinsic here. * * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981 */ #if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ < 8) So this code is excluded for gcc 8.5 but the compiler is generating the call. Looking at the git log for that file there is a comment that includes: "we wouldn't expect any calls to __multi3 to be generated from kernel code". Not true.... Not sure why the link didn't fail before though, something subtle must have changed. I think the fix is just to remove the gcc version check. The code itself just adds the results of four multiply instructions together. David