Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334Ab3JDQkv (ORCPT ); Fri, 4 Oct 2013 12:40:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:32822 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754800Ab3JDQhI (ORCPT ); Fri, 4 Oct 2013 12:37:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1034,1371106800"; d="scan'208";a="387960667" From: Srinivas Pandruvada To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, len.brown@intel.com, rjw@sisk.pl, arjan@linux.intel.com, jacob.jun.pan@linux.intel.com, Srinivas Pandruvada Subject: [PATCH v2 5/6] bitops: Introduce BIT_ULL Date: Fri, 4 Oct 2013 09:36:55 -0700 Message-Id: <1380904616-17519-6-git-send-email-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1380904616-17519-1-git-send-email-srinivas.pandruvada@linux.intel.com> References: <1380904616-17519-1-git-send-email-srinivas.pandruvada@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 35 Adding BIT(x) equivalent for unsigned long long type, BIT_ULL(x). Also added BIT_ULL_MASK and BIT_ULL_WORD. Suggested-by: Joe Perches Signed-off-by: Srinivas Pandruvada Signed-off-by: Jacob Pan Acked-by: Rafael J. Wysocki --- include/linux/bitops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index a3b6b82..5a1c8b7 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -4,8 +4,11 @@ #ifdef __KERNEL__ #define BIT(nr) (1UL << (nr)) +#define BIT_ULL(nr) (1ULL << (nr)) #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#define BIT_ULL_MASK(nr) (1ULL << ((nr) % BITS_PER_LONG_LONG)) +#define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG) #define BITS_PER_BYTE 8 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) #endif -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/