From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 DA10031B808 for ; Tue, 13 Jan 2026 21:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768341493; cv=none; b=hVsWU/wEJ5puvWpya7EsLEsU5W6fT2zkOM485wsVR9UgArJ7/mid/mQiEp21OmEVWE4CO2R/SsvY/NMiz/jkC6/rAUnw2zfK9nZGFkArAcRMV436LSeMAi5CJCmvP0onpGcbUbYjquC/USTEgLMY2hyxJ+VUx3GZYS9gOYnRRpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768341493; c=relaxed/simple; bh=0ttUuD9yelTRfCEzlEO4mLlzeT+izPzbeZ2mAMeg75I=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qvG86F6VsVt2lwHTD7+YCrE1HbYFV5PMxeJYLYoE6gTNEXTe8b4IcLsSs9/BeezI+S2AQBhmErYoFKE9bY/+AP+e1Ds68nd2iD9NXXafPW2PpGsnIh5XgxRRFIb0iXuD2CJRg4BroKMqJBmjEdhi/rbNM3VnUhvOkVexB9EsTrY= 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=g21EYt2O; arc=none smtp.client-ip=209.85.128.52 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="g21EYt2O" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-47d63594f7eso48598335e9.0 for ; Tue, 13 Jan 2026 13:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768341490; x=1768946290; 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=VjQpoKoi4pzTkbGscUXDmca2AVl+LBzlv/bdYvtEAK0=; b=g21EYt2OfSM1BcBK5Qy4ex+z1YlMvb1kDjVk+ehRk1UJc/l6q/F7uskmLO/4Yf1qMd lA0ae2XGZtRjf8BeDtDrxLZ7JZLOgVycpioZeh3j/vVpojJ7BffW6NoAVGdTgFinNsrK wHo3Nik0eJ/H6e+JyVbo/gL6rLeyxhnuqnPvqfZlsr75wOhDLolioUUmsqNZOm7WK/WZ VPdGn8pCchUgkVlnhawHk/bwgeTgd3NFJxMQS6VqlSwp8nfVIScqJhvEOs87FdsYQiG1 QxaxKFhEhc74lEaSniI+qTPWSt00sJ3fvL2A2/yAG1ZPtfTtUsJ7W7Bv/ecuAIqchPvE 4Hog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768341490; x=1768946290; 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=VjQpoKoi4pzTkbGscUXDmca2AVl+LBzlv/bdYvtEAK0=; b=cCnE5B8ie0K9bXAQQm5kjP+wlqqRUVoKk1JhDB/r8XogrUkNN4L354lwCvH7U+xQZT 3mEWq2D7E1K4tAQP1F7rJnUtmUeKWJ5/W2wb9wMvT7+mAUBA73fUnacVDktO+pR4K4jv Ze8LL8SW3K34WG9VghNc3BCICui0XT8iHA+S3/EGGZO0weXHxZYSKRZPTAs6QbF3JHzx GOWs/E4FLnDz4iven6uUQ+qtKAQ/5kIpsWC9sPJ5rbmBdWEWwa9r7lfqwuFIZRfEd8Or 9uRfWyLTxK8rFxMLPNPGwVdlUEubpqhdYaceOhzUOkgrLuGRC0y+AmxB+1OJSUWGjOey rulA== X-Forwarded-Encrypted: i=1; AJvYcCU07Z59kpPg6Rphy1LZ1s79SxlZs7zlO2koJoWfZLduYlUK06DS49/+sGLg4z+2zvgMuLwmRW4JE+PRXBM=@vger.kernel.org X-Gm-Message-State: AOJu0YwKcTbWx82+/uEdPn+C3Ng37UMvGfV8XsrLVBr9rTo4zgQtS3jN na+oWk5ipjzKdRFL4LlIXwpnsMWcB1A/ncYOgGp2SKQTeZ0INMciP0NY1lEv0Q== X-Gm-Gg: AY/fxX7mrvMvJ+R22YYQZlWJ1tGoiCljCM7yB7QG4/kvh2r3r/FUI+ZpCNo3NvjZUk0 huhCwJb0B8tL0gtThsshIHdkGwfg1FcarkofxtFPy7kbg9DzYSTSTYFlNIpfl+pngyf+AC4h6Lg wsWKaN4Yyl9tz1LtRedxRRXrnVoY+R7UX+N1HYhvMEKIL73qod9NNuvurOgv9ZZZJ5YbzqCEb0E 0svcAIw8MmEn73QfBdlH0/DIlYx9LyZtqANId5TEuuZlO2zUkdqtFtJAVao3FwRRc35/x6zsCgw FHG7TJzLjLEiwW3fUcYDX1vAAtQyIEJnQ78+wRULef0Nvrtv1enU+o1uVgdxX1iZU7/vfVdPuwU zJK9oHCWghkOqr7HQBYV9yVcBMpCGxzUbxQu0RVLrH0igG6cIGtGkmAU/gyq8KQ55MaiyiydR1Y oJ/6IxQFrIVLQbNcQq6K8y/KZvP7Ak5W/LCsMxUyYlX0R65xFCqLc3 X-Received: by 2002:a05:600c:3487:b0:477:9f34:17b8 with SMTP id 5b1f17b1804b1-47ee47bbe36mr467055e9.1.1768341489984; Tue, 13 Jan 2026 13:58:09 -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 5b1f17b1804b1-47ee0bb3383sm8819575e9.2.2026.01.13.13.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 13:58:09 -0800 (PST) Date: Tue, 13 Jan 2026 21:58:08 +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.franken.de Subject: Re: mips64-linux-ld: div64.c:undefined reference to `__multi3' Message-ID: <20260113215808.135dc8b6@pumpkin> In-Reply-To: <20260113200455.3dffe121@pumpkin> References: <202601140146.hMLODc6v-lkp@intel.com> <20260113200455.3dffe121@pumpkin> 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 Tue, 13 Jan 2026 20:04:55 +0000 David Laight wrote: Resend fixing Thomas's email > 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