Message ID | 20190322154425.3852517-25-arnd@arndb.de |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp964222jan; Fri, 22 Mar 2019 08:50:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWAXhLKCT3DXVFsRkP6iXiIgxodfSVAEsC1alu+NCZgnUcGsvPsL+E/SHA1N3jVxY7XStn X-Received: by 2002:a63:2158:: with SMTP id s24mr1684369pgm.156.1553269820704; Fri, 22 Mar 2019 08:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269820; cv=none; d=google.com; s=arc-20160816; b=Bq2rsZe1UTLgfNFqZvboLjt/enb1WrIlO2QZvV1hzOrzpdG2toIkTKbVN+2RDXxKp2 mJYY9rL1RvU72EpLx/vVGaYS+kkJUEsXpnJcBcWsJRRtjSKWNZ33w6AF/aio4+GtK4z6 z3+bRd/f7t8sKbAK5shHPYdAzz5jKNawWT+byf8piuUKFbC7j7YngIqvzKqHjckI4dBP 5+o7Bxpeb06YbFU4fAZFZWN4Wr+Egi1+WxGOf/NV8Bh/JfUVbeRPUOEw+ekzt69QMlu6 epR3Bt/J8Yzu+BBrBu7bJG9IAG9V6l5PlTKU6ZGADE5dRp+MqL15rN61l5hW7RLVFLMh 8SYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ADd/WlX24cMYXST+eM5ecQSFrL8rYUZAcSMyeV6d0fI=; b=SEWvuu7ppARVg7lsbYpHcsimXW3Nz+dzVVVHXT22EMnyP2Zxzkwr0oKgEJtbyJi77P yyltcgCF8bHwtZXrzhr+hyya0A13UndVbjAZl0vdsb/bDJG2rRv25M5TtqUj1Wms7PKU 9/Njs0qfJB5ElGwRJD0WdUBGIm3L4j7zFcHxiEMFsNH6StKfOWYkvj4SsJOcvXJPVk4Z R75/n+M52BSosFxq7Qi5YLlcVnjk80mpzo9gKXDNueer4hOmst2fgoQKhBdoG/1lOcGh bH8B74jfIBldcMKz2tiwANsx10WYa490mA+p70bKj3stjC228UkOox16MyEC6wsUQZG/ sRcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o188si7021641pga.297.2019.03.22.08.50.20; Fri, 22 Mar 2019 08:50:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbfCVPuT (ORCPT <rfc822;mike.holmes@linaro.org> + 31 others); Fri, 22 Mar 2019 11:50:19 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:45707 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbfCVPuR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Mar 2019 11:50:17 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MbRbr-1gaEfE3zyb-00bqAN; Fri, 22 Mar 2019 16:49:50 +0100 From: Arnd Bergmann <arnd@arndb.de> To: stable@vger.kernel.org, Will Deacon <will.deacon@arm.com>, Florian La Roche <florian.laroche@googlemail.com> Cc: Peter Zijlstra <peterz@infradead.org>, Anshul Garg <aksgarg1989@gmail.com>, Linus Torvalds <torvalds@linux-foundation.org>, Davidlohr Bueso <dave@stgolabs.net>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Joe Perches <joe@perches.com>, David Miller <davem@davemloft.net>, Matthew Wilcox <mawilcox@microsoft.com>, Kees Cook <keescook@chromium.org>, Michael Davidson <md@google.com>, Andrew Morton <akpm@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 24/25] lib/int_sqrt: optimize small argument Date: Fri, 22 Mar 2019 16:44:15 +0100 Message-Id: <20190322154425.3852517-25-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ihhiFo5aEMgWh25D9Bhc7/1vpeO4x1oikMd7eBfRIzsE2G0q9Gr hIr6QmP9RMez6Ix4DFFMIQDzR3YaedPi3Pz/K1W8ErI+BdhZVywglbZcwR6f+6SJT27oNm8 g1lGrthhnwWUDhmA10q3KnEkYDrWCtlwdZ320LWQYbCb/IEQT/+zYeBzFZsmA/cbli652aU JgBDPkDU+yn7METUKJ6wA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:qJH3pP5UbgI=:5C8uo+IYJWNbuNNH4ebN7V n+nS75jqFZYRqIoFCQJuhd0TKUszs2S1oxLhtAZZ2qw1FAGKe+PHCsAUkAj+pWLRZbwTy9oMO 1zjhMB6R4xJ27YZ+aiMCGtzxKTsu/hvRCKdfPQhq83Sj2ruvf6VmWAqypgwwolJDxWRXzi3QZ 0nz6xh65GlJfbrNJSbYL764ctj/c1X9NtyW/OUcqlxWWMGOPL67fErX6VNiQSpv1Q7VwnzSse pBodOqvkkOiNKioaSB3+SERQyrEAzMFI7VVA1vAoo5Mb2CGpkpM6dyX7DcaAk1FsbcDZHLum/ 5eHtD3DIDfsQDyXg63QDDIt+cBdFqFt8OBi/rZSAmotk700OJP3NmWnEtGJZl7P6vHW9dOeDC XBgDvomnu0vW2pmAwKle5/xZz2R/jlwBthWjnqXhpm2QPud/mMtvs2hX6zvuuFwew7+SAFI6a gGHNijLlQjhb6lC6QYRKaSSmt+Q7s6yMbcvrCO4lUA5QMhkfVMz086ERooqoCqc9GyG6xk6+F 6GmbJoOrolBgua1CPxiKQMtqUUiV7bkjrTXWXadJNkK+B+W8FrSUITKfmLH5BcIp7cREVQeLT HMc2bKZCYn8/b/7OJ/bcZaBbUurg+tg5pMDvBM90HjS+zPez3e2RkwUxcJSjm6jpsh/Eh2QCr aHhlGBFFYreiAceCa3bQBzjSYHbM3A7yHLqFWHaquOAXJK0FvtylFK0poLwjwGimBcYPOEiTZ Jq1hnSGHJTGHTBpUP3EVCwv+7F0ytysK1XPMZA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
candidates from spreadtrum 4.4 product kernel
|
expand
|
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c index 1ef4cc344977..1afb545a37c5 100644 --- a/lib/int_sqrt.c +++ b/lib/int_sqrt.c @@ -22,6 +22,9 @@ unsigned long int_sqrt(unsigned long x) return x; m = 1UL << (BITS_PER_LONG - 2); + while (m > x) + m >>= 2; + while (m != 0) { b = y + m; y >>= 1;