From patchwork Sat May 13 01:01:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 99732 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp577401qge; Fri, 12 May 2017 18:02:29 -0700 (PDT) X-Received: by 10.99.115.71 with SMTP id d7mr7162627pgn.153.1494637349346; Fri, 12 May 2017 18:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494637349; cv=none; d=google.com; s=arc-20160816; b=oi4hPM2svyJxvOzPqtr5fC1kBRcTsqHa7Bxqx6bfkaWu0wMOc2wgq2zatmw/dv7YMf gI+bR0k8m4+NfxvXfotG0c4FaNMFQg2u638u2j0rzt9YlaH6qu/RqopmBA1rsulVegem KFKuAiqa4+0VqXPsmGlW3sNa+XhrM/ZKXRMiW5ioeMWaUGLAoY7XHoHCio4KhXF1PJ/L xqsdvLf6pTdGNe4XG/alRmR8CtgmTWr1THXYsKocTKa8gP9l2/HeWeO9NQb0S2Qr36a+ LoetyAfBhRMdn/WTbJsUCiMkx0rZxcMqpHKH8cM4fL3BbGZflAkCjI+mkQne1JFRGMJg lkZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=jv86MTQOas1RMtWwrw1SH2ZsOyZWbpJtjhbMZ4b4LQo=; b=Padhdl1442bA2n0Xi1yGjd7Q7iC5WBszAXK10bEnEMsnIyqlDEuAOfXhstrgZGJEC7 sMtJWNJWgLzGWqJwLNm3ozKc/cveAmxG8d+j42nEQ2s+i2VvuqW6pqI8IYzyG+03i1up tsajiAVddhiD/6USqjOroLTM4eTkek+6AWOTYkib19vs9pvKC3pHii1bRQbsaxjji6/e GqwPEiVJbxCwH919pSap3+Z7hx6N3eBMMTYOILp6jT2SKeeC7O5HpexGwJom9fUs5+nv Omccdlj2UNPeM9hzl85dpsjfsB5hDfJHQqLcCHyy4hZulJ9grbewANfuZ/RsNL0r6xcL xXTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 133si4755171pgb.29.2017.05.12.18.02.29; Fri, 12 May 2017 18:02:29 -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; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.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 S1758147AbdEMBCO (ORCPT + 25 others); Fri, 12 May 2017 21:02:14 -0400 Received: from mail-sn1nam02on0079.outbound.protection.outlook.com ([104.47.36.79]:24420 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756913AbdEMBCL (ORCPT ); Fri, 12 May 2017 21:02:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jv86MTQOas1RMtWwrw1SH2ZsOyZWbpJtjhbMZ4b4LQo=; b=LKAtQaEz8oKWWdmFgBuUE4cDOPfsHTmtFyTwwVIZd1VTFEC05razEbKL/e49ziOSH1jxiiOExamw3Af+K6VcllsAFLymrZuldinv+3FkWU9VGzSIucWSjxTXV4bkjz+VUxgnGG9CvhJkQun16nyXjGkp21QRBmnRGe1yYz5wtQk= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (176.59.38.244) by BY1PR0701MB1271.namprd07.prod.outlook.com (10.160.108.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Sat, 13 May 2017 01:02:07 +0000 From: Yury Norov To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Ingo Molnar , Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner Cc: Yury Norov , Akinobu Mita , Mike Galbraith Subject: [PATCH] sched: remove sched_find_first_bit() Date: Sat, 13 May 2017 04:01:52 +0300 Message-Id: <20170513010152.13986-1-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Originating-IP: [176.59.38.244] X-ClientProxiedBy: HE1PR09CA0069.eurprd09.prod.outlook.com (10.174.50.141) To BY1PR0701MB1271.namprd07.prod.outlook.com (10.160.108.17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1de648bb-2966-4699-88b7-08d4999badf7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1271; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1271; 3:35E9VV4Srf5/2/PzFJCPUcCjWdWZfM7PpwTQLp9OYTL9WZebn1g+f+tBAqW0f4ZdEDUcHLFYu4ahKlKfTtZDG67YNRbQ2mMZb8CrgovVgjaLPhRnTckrhjEgTvNf9Nv1F995/CisRLZjIm5MMUCthyTMQst2L9ufccTY6UFKgnlNflQ7wYLL0BlR+D2TAmdXEyXpSSPp6UH/tpFCQ2DgP+IwklOgYKsBZIpVMNeVGxNg4DVPCZjG2tMS5zoy1MxS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0SgjSsyT17NxWoN1jmT4faNVa5aoABepjTgzaqkFMOlgO8k6NGMKZqR3v+CeNTs02ArmUnNh0WiLbT62B7vtiwKcguO2Jylnm8yxHHk9M78Y1lng8HXhn163JMc/H1zLWWXwf8rcjUbrfcoTbVZBJIHVI3R8lqN66dXygt39keRb9ytlKWfUWEXcs6p6nd7FhH8+/z3K9bPeVAXDzGEMez3HFbNo1mFD6EpIA4L+OxZKXy0hn7WlAzd5zZoygzkFfA3p7Q3JMwRX8wQoI5T4IGKd1hvcW3eGJZboyFSnaQ5F9ugVHoMzUT9qWTA9CH5PBqUtPfprnRugSPlJ4xDjhF/G+CF4b1u/YdaIpZHRem+ijJFImio/o9LT3JdRq0OXspVOycbKH+Qm0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(6072148); SRVR:BY1PR0701MB1271; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1271; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1271; 4:/F8Hxk9mwPiLiEradV5Ff2L3RLTCLGSu+5LArjK7YPJJ2Ah+LgJE2ySm2R8guVgNPw0iW+m0r46+9SfFpkA6UxUmKboFLtxXj++3Scl/k9vedE9IvYLhD4AbAwiPu6fypuR6SzBMV7mu/yTsAndYSkNLb5uIZUCgnWs8pAkBEBhDWZ1bn3+WMat+Idk186YdV7KtCDUJ4V4ed6F8oCg38qGrWap+RQcg+v3P9cISkF5Vfj/5Ksbvio2xLG0VxGDVVUOWRxMGyVkPJ3NYgspxhA5A2WCEsrgRaoEtqPvzYSxQsC9ruODnfWX2R7l1fJw2d+08LCyo9sk74bzELRacGD4pP88kt09KUXrRY72KROeNw9d/QgQdNEK9m5tN1xo6dSwGuhXb55XDpU46WUUdXDK6b4izza5Wt1EAtqMt6cc07YRAoahqXaPWrRaHtwvs+fzvc+G/vhFN0JFOu1363F+QXQ0WUYtL3dZ1x/md55fdAIWIGfo+QLTf+0n51s9NvrKPtmlZOHGuj7QHgfKK+YT41u509/HLNNkLsC4lVJ47UrLZXWK0C3qGJ3Xi88kQ54/KpVrJfp57BMeZuVBD17l2/UokKOt5YFt/IS21KxhGOrEEWOrBNYRfO9rnTVOHny32HhLHSSE3sW+Gvg99/3hty73Br5oxshVoBL2BgfmyUI9wdsE2eHIAzUW6MN/fpEwFBl5k36QCOe60DlDI3HNgP7Cq/irSx1LK5rj2MhQr/XcymRH3MMUZrBhDd3PknviPY6iHBRXRxfKQNCeEbg== X-Forefront-PRVS: 0306EE2ED4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(189998001)(7416002)(42882006)(4326008)(6666003)(72206003)(50226002)(42186005)(8676002)(48376002)(50466002)(76506005)(5660300001)(25786009)(33646002)(81166006)(575784001)(6496005)(305945005)(66066001)(54906002)(8666007)(7736002)(53936002)(6486002)(38730400002)(36756003)(3846002)(6116002)(478600001)(1076002)(5003940100001)(2906002)(47776003)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1271; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1271; 23:yG3n3awZGyqJG45kTH77JrFBgLShDBz9JrVg8gxntrCl5tV8tiJ/XkHZwNnNb3S+ToSe3m22LflRpxpP7gBhI3A64wry9WyCJ6QXejAAz1VqQ9n6Vmj/xfTdnphoboRqQcdRKCt4Sn3Lr0EsFUdx0mf+QQB4GfhBdcJ5whC87eWIGyZKHQsRQTeez9/enG32cwhDp9FDL+W+5osMc/6CPE11q9Fwfc7A6rScrz5pwH48jKl6Ni3GD4WeMzrzAa1EEiyre4Q0H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UCWq1r7yaGYezBKtMWxv3ZEM8xltHKNw625rO4da161Y4KNj6sPpHKpmMpd2M1FWUmg6Q+oMTq7QxwVuXalYR6QYpCXuUyuR79yL//F4oFv5PVvnFhA66n5Mgr0cc8WIaWCxtKy1mSyhDBGVYpxoCoSbUFn8gzoz9Owi5H5tN9dC0r8zuhWVaa9UXnatSpOXeK3O3e7ztwl6my+Cp4l02l++Mrgg+aYtjH6IAEE8GEw1msi1CvnM9MhxjIjUkq8GtVLPrTmiRE4unVeRjhbv5IlLCm/572XEpu+TFvHN6mrB64fovurpa2hPg==; 5:BcUp4W4dcxLJoZyiZBE2tHPiecqbih2VqM/R3joX2CXozdq0yKZ86XNy0f+y8oKktuwOf36wXOcN3P9oW0CXO8y+KDIAVF9pp5q1A2Va7UXymRmOUQ1vld7gU20G35+AmE8mq33izbQTqSfeZagKIw==; 24:cl6PJFJN8wEX/QKiFASilAuc6QE6YRoapIeRoD8LOheUe/UAifo7J0FLMEif2zXoAUVhQ7+AKCxe94rirlEKlFgUinZi64rRnGiTacFz9P0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1271; 7:eG9peVEwDmzLpGXTGzk3Vk8xMQz082LGjQw7RbJN9qz12UFLpoNVECaZLdnE5jRv4dWO19fyUsmALctA804vH4c+8nyoyxb3L00SvG2UdLneVSdEHXcC6y4qAr12UASEAAX91Ab7xnZ9qCZmMsIt7owG18Qz9k7UyVdEdVXl7F0RTkbZaTMHEyTiXmKB+WJ+JRpVbTa/El41IpRJPuCX+ICcC8mqwlmrxaV1p/gSJPP2wsYEzNEiyz3B/Fx0N1FL7WmsAlvYKFqiF3NOLuHZ+eeH6v/5A9S7H0EWMmq0WIQB9VKKQtIm1d7fLjDfWVILDHorfGRzTjmmAr4bObUpaw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2017 01:02:07.6418 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1271 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sched_find_first_bit() is in fact the unrolled version of find_first_bit(), which is theoretically faster in some cases. But in the kernel it is called only in couple places in kernel/sched/rt.c, and both of them are not looking like hot paths that will doubtly achieve measurable benefit from using unrolled version of find_first_bit() - there's no hard loops, and the execution path is not really short. This patch removes sched_find_first_bit() and deletes include/asm-generic/bitops/sched.h as it declares only this function. Alpha has it's own implementation, very similar to generic one, so it is also removed. Signed-off-by: Yury Norov --- arch/alpha/include/asm/bitops.h | 18 ------------------ arch/arc/include/asm/bitops.h | 1 - arch/arm/include/asm/bitops.h | 1 - arch/arm64/include/asm/bitops.h | 1 - arch/blackfin/include/asm/bitops.h | 1 - arch/c6x/include/asm/bitops.h | 1 - arch/cris/include/asm/bitops.h | 2 -- arch/frv/include/asm/bitops.h | 1 - arch/h8300/include/asm/bitops.h | 1 - arch/hexagon/include/asm/bitops.h | 1 - arch/ia64/include/asm/bitops.h | 2 -- arch/m32r/include/asm/bitops.h | 1 - arch/m68k/include/asm/bitops.h | 1 - arch/metag/include/asm/bitops.h | 1 - arch/mips/include/asm/bitops.h | 2 -- arch/mn10300/include/asm/bitops.h | 1 - arch/openrisc/include/asm/bitops.h | 1 - arch/parisc/include/asm/bitops.h | 1 - arch/powerpc/include/asm/bitops.h | 2 -- arch/s390/include/asm/bitops.h | 1 - arch/sh/include/asm/bitops.h | 1 - arch/sparc/include/asm/bitops_32.h | 1 - arch/sparc/include/asm/bitops_64.h | 1 - arch/tile/include/asm/bitops.h | 1 - arch/x86/include/asm/bitops.h | 2 -- arch/xtensa/include/asm/bitops.h | 1 - include/asm-generic/bitops.h | 1 - include/asm-generic/bitops/sched.h | 31 ------------------------------- kernel/sched/rt.c | 4 ++-- 29 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 include/asm-generic/bitops/sched.h -- 2.11.0 Acked-by: Arnd Bergmann diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h index 4bdfbd444e63..9e4d5309c27f 100644 --- a/arch/alpha/include/asm/bitops.h +++ b/arch/alpha/include/asm/bitops.h @@ -433,24 +433,6 @@ static inline unsigned int __arch_hweight8(unsigned int w) #ifdef __KERNEL__ -/* - * Every architecture must define this function. It's the fastest - * way of searching a 100-bit bitmap. It's guaranteed that at least - * one of the 100 bits is cleared. - */ -static inline unsigned long -sched_find_first_bit(const unsigned long b[2]) -{ - unsigned long b0, b1, ofs, tmp; - - b0 = b[0]; - b1 = b[1]; - ofs = (b0 ? 0 : 64); - tmp = (b0 ? b0 : b1); - - return __ffs(tmp) + ofs; -} - #include #include diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h index 8da87feec59a..5db132568926 100644 --- a/arch/arc/include/asm/bitops.h +++ b/arch/arc/include/asm/bitops.h @@ -425,7 +425,6 @@ static inline __attribute__ ((const)) int __ffs(unsigned long x) #include #include -#include #include #include diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index e943e6cee254..8498a8e3e76a 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h @@ -311,7 +311,6 @@ static inline unsigned long __ffs(unsigned long x) #include -#include #include #include diff --git a/arch/arm64/include/asm/bitops.h b/arch/arm64/include/asm/bitops.h index 9c19594ce7cb..a3ca26e459e1 100644 --- a/arch/arm64/include/asm/bitops.h +++ b/arch/arm64/include/asm/bitops.h @@ -42,7 +42,6 @@ extern int test_and_change_bit(int nr, volatile unsigned long *p); #include #include -#include #include #include diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h index b298b654a26f..6babd3ad7204 100644 --- a/arch/blackfin/include/asm/bitops.h +++ b/arch/blackfin/include/asm/bitops.h @@ -20,7 +20,6 @@ #error only can be included directly #endif -#include #include #include #include diff --git a/arch/c6x/include/asm/bitops.h b/arch/c6x/include/asm/bitops.h index f0ab012401b6..d828299a8e3c 100644 --- a/arch/c6x/include/asm/bitops.h +++ b/arch/c6x/include/asm/bitops.h @@ -85,7 +85,6 @@ static inline int ffs(int x) #include #include -#include #include #include diff --git a/arch/cris/include/asm/bitops.h b/arch/cris/include/asm/bitops.h index 8062cb52d343..e8b5d7ce010f 100644 --- a/arch/cris/include/asm/bitops.h +++ b/arch/cris/include/asm/bitops.h @@ -43,8 +43,6 @@ #include -#include - #endif /* __KERNEL__ */ #endif /* _CRIS_BITOPS_H */ diff --git a/arch/frv/include/asm/bitops.h b/arch/frv/include/asm/bitops.h index 0df8e95e3715..97e95cfc3f2d 100644 --- a/arch/frv/include/asm/bitops.h +++ b/arch/frv/include/asm/bitops.h @@ -312,7 +312,6 @@ int __ilog2_u64(u64 n) return bit; } -#include #include #include diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h index 05999aba1d6a..e4121c8c1dea 100644 --- a/arch/h8300/include/asm/bitops.h +++ b/arch/h8300/include/asm/bitops.h @@ -170,7 +170,6 @@ static inline unsigned long __ffs(unsigned long word) } #include -#include #include #include #include diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h index 5e4a59b3ec1b..56d75b58c080 100644 --- a/arch/hexagon/include/asm/bitops.h +++ b/arch/hexagon/include/asm/bitops.h @@ -288,7 +288,6 @@ static inline unsigned long __fls(unsigned long word) #include #include -#include #include #include diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h index 71e8145243ee..231de1c39535 100644 --- a/arch/ia64/include/asm/bitops.h +++ b/arch/ia64/include/asm/bitops.h @@ -449,8 +449,6 @@ static __inline__ unsigned long __arch_hweight64(unsigned long x) #include -#include - #endif /* __KERNEL__ */ #endif /* _ASM_IA64_BITOPS_H */ diff --git a/arch/m32r/include/asm/bitops.h b/arch/m32r/include/asm/bitops.h index 86ba2b42a6cf..71779daf42f1 100644 --- a/arch/m32r/include/asm/bitops.h +++ b/arch/m32r/include/asm/bitops.h @@ -255,7 +255,6 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr) #ifdef __KERNEL__ -#include #include #include #include diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index dda58cfe8c22..7a3584cc74d3 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -517,7 +517,6 @@ static inline int __fls(int x) #include #include #include -#include #include #include #endif /* __KERNEL__ */ diff --git a/arch/metag/include/asm/bitops.h b/arch/metag/include/asm/bitops.h index 2671134ee745..3cb18f94347d 100644 --- a/arch/metag/include/asm/bitops.h +++ b/arch/metag/include/asm/bitops.h @@ -119,7 +119,6 @@ static inline int test_and_change_bit(unsigned int bit, #include #include #include -#include #include #include diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index fa57cef12a46..b372fa86aced 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -606,8 +606,6 @@ static inline int ffs(int word) #ifdef __KERNEL__ -#include - #include #include diff --git a/arch/mn10300/include/asm/bitops.h b/arch/mn10300/include/asm/bitops.h index fe6f8e2c3617..7f915010c7bc 100644 --- a/arch/mn10300/include/asm/bitops.h +++ b/arch/mn10300/include/asm/bitops.h @@ -223,7 +223,6 @@ int ffs(int x) #include #include #include -#include #include #include #include diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/asm/bitops.h index 689f56819d53..8d8e87ad61d2 100644 --- a/arch/openrisc/include/asm/bitops.h +++ b/arch/openrisc/include/asm/bitops.h @@ -40,7 +40,6 @@ #error only can be included directly #endif -#include #include #include #include diff --git a/arch/parisc/include/asm/bitops.h b/arch/parisc/include/asm/bitops.h index da87943328a5..8ba49ed73c4d 100644 --- a/arch/parisc/include/asm/bitops.h +++ b/arch/parisc/include/asm/bitops.h @@ -218,7 +218,6 @@ static __inline__ int fls(int x) #include #include #include -#include #endif /* __KERNEL__ */ diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 33a24fdd7958..93af2bec3662 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h @@ -322,8 +322,6 @@ unsigned long __arch_hweight64(__u64 w); #include -#include - #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_BITOPS_H */ diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 99902b7b9f0c..1a8a78175b57 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -409,7 +409,6 @@ static inline int fls(int word) #include #include #include -#include #include #include diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index a8699d60a8c4..cb9cd36490af 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h @@ -89,7 +89,6 @@ static inline unsigned long ffz(unsigned long word) #include #include #include -#include #include #include #include diff --git a/arch/sparc/include/asm/bitops_32.h b/arch/sparc/include/asm/bitops_32.h index 600ed1d9c8c8..acef3517eb79 100644 --- a/arch/sparc/include/asm/bitops_32.h +++ b/arch/sparc/include/asm/bitops_32.h @@ -92,7 +92,6 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) #include #include -#include #include #include #include diff --git a/arch/sparc/include/asm/bitops_64.h b/arch/sparc/include/asm/bitops_64.h index 2d522402a937..994ab9413a7f 100644 --- a/arch/sparc/include/asm/bitops_64.h +++ b/arch/sparc/include/asm/bitops_64.h @@ -34,7 +34,6 @@ int ffs(int x); unsigned long __ffs(unsigned long); #include -#include /* * hweightN: returns the hamming weight (i.e. the number diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h index 20caa346ac06..269ebad2efe6 100644 --- a/arch/tile/include/asm/bitops.h +++ b/arch/tile/include/asm/bitops.h @@ -87,7 +87,6 @@ static inline unsigned long __arch_hweight64(__u64 w) #include #include #include -#include #include #include diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 854022772c5b..2ca57cac13ae 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -508,8 +508,6 @@ static __always_inline int fls64(__u64 x) #include -#include - #include #include diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h index d3490189792b..c3ed220087cb 100644 --- a/arch/xtensa/include/asm/bitops.h +++ b/arch/xtensa/include/asm/bitops.h @@ -230,7 +230,6 @@ test_and_change_bit(unsigned int bit, volatile unsigned long *p) #include #include -#include #endif /* __KERNEL__ */ diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index dcdcacf2fd2b..47f9b0a23b9d 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h @@ -24,7 +24,6 @@ #error only can be included directly #endif -#include #include #include #include diff --git a/include/asm-generic/bitops/sched.h b/include/asm-generic/bitops/sched.h deleted file mode 100644 index 604fab7031a6..000000000000 --- a/include/asm-generic/bitops/sched.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _ASM_GENERIC_BITOPS_SCHED_H_ -#define _ASM_GENERIC_BITOPS_SCHED_H_ - -#include /* unlikely() */ -#include - -/* - * Every architecture must define this function. It's the fastest - * way of searching a 100-bit bitmap. It's guaranteed that at least - * one of the 100 bits is cleared. - */ -static inline int sched_find_first_bit(const unsigned long *b) -{ -#if BITS_PER_LONG == 64 - if (b[0]) - return __ffs(b[0]); - return __ffs(b[1]) + 64; -#elif BITS_PER_LONG == 32 - if (b[0]) - return __ffs(b[0]); - if (b[1]) - return __ffs(b[1]) + 32; - if (b[2]) - return __ffs(b[2]) + 64; - return __ffs(b[3]) + 96; -#else -#error BITS_PER_LONG not defined -#endif -} - -#endif /* _ASM_GENERIC_BITOPS_SCHED_H_ */ diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 979b7341008a..f04346329204 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1092,7 +1092,7 @@ dec_rt_prio(struct rt_rq *rt_rq, int prio) struct rt_prio_array *array = &rt_rq->active; rt_rq->highest_prio.curr = - sched_find_first_bit(array->bitmap); + find_first_bit(array->bitmap, MAX_RT_PRIO); } } else @@ -1496,7 +1496,7 @@ static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq, struct list_head *queue; int idx; - idx = sched_find_first_bit(array->bitmap); + idx = find_first_bit(array->bitmap, MAX_RT_PRIO); BUG_ON(idx >= MAX_RT_PRIO); queue = array->queue + idx;