From patchwork Wed Dec 30 15:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 355279 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp11426474jai; Wed, 30 Dec 2020 07:38:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgPTZRW+8DIJmVN0NFNMaC7hhCzlVxwQgjDBs1LO9HCaGuoHjOt49IPiyHUBJvjHaWR2cv X-Received: by 2002:a17:906:77ce:: with SMTP id m14mr51899365ejn.10.1609342737416; Wed, 30 Dec 2020 07:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609342737; cv=none; d=google.com; s=arc-20160816; b=l2V11eZ+38Ligi8JqcOH1yBxzCMnQFUzL16wfXlqkJwvSse0iLHHgtTSpIrFMYFH/f Q/Uzs2NezfrcIV9PThIE0bxSMU5obWdAeFF0SiHXCtiMsf/8p+YbI/3fHHcv3h1hpHI0 mRq3EdVWXatFrfXzdbnQF2WWgSqOgu7IBK02694YhXxQGVOQR+wghK557uTuG/Dx4l2h MRYhztASwHTDIv2Zy8tKRGfmbHM+ALtDwWCv0k9SPa5HlFk7ZHBMFsTbk7S5QjyEk/6i zAiQXwedN9GnIGVW/AC6CvNKtZlTTimp/8RTRLWIJh6pDEwp/nhY/+RvvVGVo9CODCGH 3NdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=t5qU0u0BbjyAf7ASokX3PDKEGwUdQpw6OEstGnrNo58=; b=lSIL5BYhUsZjCmwmQ3bPTJIfaxMrsSCc3lUEX60ixI4NgtORz9/Dp1kDMfWmf7ITbY n0oHabNiJACfsPwpVghFNfJlzjwmlsdkjNhoeFlNi4GyAiMBqiZu34beIdJrK095/JYE +osBMpXTBSUTXWr9DqqeS6HdD0NIDGoagZQatr5k+GovuCSpWDWN2+rreQXEdbO5aWhM mH61nNL1guYHAc0NYzWyAWAPm9JLsjjws+l2gNpjTqjOVDqaBXlK3K8eYcbopehqeCNx mU8XQh3d6UTZbuUUX8CoCVrmFJLNTXNF27DkVqx0Jdrj56gF6RGWZYeDanZIuhnnS2yN dEqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CN437dPV; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si7827171ejd.523.2020.12.30.07.38.57; Wed, 30 Dec 2020 07:38:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CN437dPV; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbgL3Pi4 (ORCPT + 8 others); Wed, 30 Dec 2020 10:38:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgL3Pi4 (ORCPT ); Wed, 30 Dec 2020 10:38:56 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2111C061799 for ; Wed, 30 Dec 2020 07:38:15 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id q75so5024484wme.2 for ; Wed, 30 Dec 2020 07:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t5qU0u0BbjyAf7ASokX3PDKEGwUdQpw6OEstGnrNo58=; b=CN437dPVzQo0tvO2u2a4Jee8cmUZkWsILIxPzYq/EoNcgHYmX8y3d7PWXku/qVwxRy Zbih/MHCKJ0s5zdvYyotn+sgkUAbn783RjApS1XoiEBHja3W0TkLhDNloVKFYYkBmZPu bVcCOIdNJMbJDfBeXs3wHJX3reDJ/A3syjLGnD4ylznyFGeKC+MoVy8YK4APmzXAjBuS 0bhWQJ3ohVhocsH0n4miWboYQILyBW2+Q/1yPdUqZRoLnu7Oxv4w/V8HvP9eJUXrlEoS SZml0TkX7+8HKCCONeQ51dWaKMKvDIxnFUWfQV7WtXsmlJz8yBd7fMn2d2wxfoRVGLPr 821g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t5qU0u0BbjyAf7ASokX3PDKEGwUdQpw6OEstGnrNo58=; b=cVPKirh2CVn4Vn6arkZSGW2v0cyA+mp8akkLapBC36Yv71p71PsR0OJl3NwIZoEyp2 ncYa50E2TDAlC0pNcMwZ6/lPaslfeX5tSPPcl9xYFsskif9sZxYKIHORPlugX8PWldyc 8vVWPPXVHffka0/MAOfFL+uy81NR7NFF9IsacQJbS1ZbOgTiaGRfLC8xpf9pZlMs1Usu QJfokXACi6xpeUc3NuqnvGTSFSFEtUdo92zWHgu+qUQXXpuYT2cQ6nM91zl53rBZQ7/A oM6rj0e5CDmqYC9f8FYT+GTffcm4jHuE3ou4zHYJeWGONuuSTiLi4wcXLpFMRg1ZIIRC 8Csw== X-Gm-Message-State: AOAM531nVhJiDG3A1Bm6P96GGodtY3oCTtVZTGO0etxY5lcOseVL7RO7 BuZXiOjJ6tiRsgDOday1uNFzhw== X-Received: by 2002:a05:600c:d8:: with SMTP id u24mr8094776wmm.103.1609342694387; Wed, 30 Dec 2020 07:38:14 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-148-164.adsl.proxad.net. [82.252.148.164]) by smtp.gmail.com with ESMTPSA id g191sm8634484wmg.39.2020.12.30.07.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 07:38:13 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, kernel test robot , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] powercap/drivers/dtpm: Fix __udivdi3 and __aeabi_uldivmod unresolved symbols Date: Wed, 30 Dec 2020 16:37:44 +0100 Message-Id: <20201230153744.15612-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 32 bits architectures do not support u64 division, so the macro DIV_ROUND_CLOSEST is not adequate as the compiler will replace the call to an unexisting function for the platform, leading to an unresolved symbols. Fix this by using the compatible macros: DIV64_U64_ROUND_CLOSEST and DIV_ROUND_CLOSEST_ULL. Reported-by: kernel test robot Signed-off-by: Daniel Lezcano --- drivers/powercap/dtpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c index 5b6857e9b064..0abcc439d728 100644 --- a/drivers/powercap/dtpm.c +++ b/drivers/powercap/dtpm.c @@ -99,8 +99,8 @@ static void __dtpm_rebalance_weight(struct dtpm *dtpm) pr_debug("Setting weight '%d' for '%s'\n", child->weight, child->zone.name); - child->weight = DIV_ROUND_CLOSEST(child->power_max * 1024, - dtpm->power_max); + child->weight = DIV64_U64_ROUND_CLOSEST( + child->power_max * 1024, dtpm->power_max); __dtpm_rebalance_weight(child); } @@ -272,7 +272,7 @@ static int __set_power_limit_uw(struct dtpm *dtpm, int cid, u64 power_limit) } else if (power_limit == dtpm->power_min) { power = child->power_min; } else { - power = DIV_ROUND_CLOSEST( + power = DIV_ROUND_CLOSEST_ULL( power_limit * child->weight, 1024); }