Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp231915pxm; Tue, 22 Feb 2022 09:27:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJlVFheqy/8wg0357ozstVxMDmDFTz9bu7b4ugeY7oe9/D9rR3vcgnqDcB6yG6TNoSLTNx X-Received: by 2002:a17:906:1393:b0:6ce:eac4:4ebe with SMTP id f19-20020a170906139300b006ceeac44ebemr19556932ejc.643.1645550864758; Tue, 22 Feb 2022 09:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645550864; cv=none; d=google.com; s=arc-20160816; b=DSs4mU0xjvAVJtiyjCTVaGHjxOL2S337v2eieJwhqGMVfP4dTwIPfqG/8Jb7+jTU85 92x7ztCMdUkL0SDmQUoCUqCdrMNMBHV8ZTq1Qul10/wiL/WSJSsj7j8cvTnFqLnucAUF 3ypRUEGN2EogleqcGfjppIJkcVkGId/+KzpgZr+Q2cOMg6WTOufexSVXTBJ1QjU0tVXw baamBHpmvKnde4vHWxj4uctVEJjMrjh3mVeNpiWnFwiGQWu73TlFII9pIrm5bDWP6dS4 sE4WBJFGt0gEczOQ07PeCRX+YUTIFky2J7kENV8CCwhxiiBuG2CFt0Dzf+VuVPzo3NPy D8mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R/D2PK6+/cfWn+SCy45HN5KBWgHkNQFK3LmX+dzqRT4=; b=LhQSdj+oCF+SmvRnCGk+94x6yS/8NJ/SdvUVccf5gGszBA5kerBXdTqEWQTvDYJnS+ dynx80YyG+5EYRcL0euOmAMypOOM+hpenAeGVKN1/MeRQNLKKz5DDSC+SC/MCMB9GGUH NsQ5HAh9azsyNUeXjwnxM63tvQd3lK7AnEF7jq8eSx4tdRm1g7EPaj4xMxULKAbVZZ/J AFu/IO99kHC4WyzIbn3MmzVcJmnNxIlh3pO+numH5SWePSV4G9ZR6vrUX4zTPr3kYmKg 0dSo2+mly92VWexyAYug7dI6mQZjwSqBDEApEDZEclpSGwdpaNramv0MHaV51oPU6DC+ JZMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GCSf5tRN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id er16si9282836edb.412.2022.02.22.09.26.49; Tue, 22 Feb 2022 09:27:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GCSf5tRN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbiBVQdE (ORCPT + 99 others); Tue, 22 Feb 2022 11:33:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234095AbiBVQcu (ORCPT ); Tue, 22 Feb 2022 11:32:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37914BB091; Tue, 22 Feb 2022 08:32:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C8CA860A2B; Tue, 22 Feb 2022 16:32:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 709A5C340F6; Tue, 22 Feb 2022 16:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645547543; bh=r/bd83ebHmk3oq087sNFUNNVtBRYLznJSmRLMlpTbUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCSf5tRNML33gIhC3sIrrGWNIgk5kvVblmBu4I3xUoYSfiBZQ7ehJCYaFMnjgfYrh OEya2ydwEKX3H3fD0dwoZ6w+H+uVTnLvXdVh13m4ZYJeOwoVOR8FpM5mREFIghRXun Hbo1Vj+fgL7RwAtA8rRkuMSwCelOJIR8YWHIIT259xvZllYv4OVf9/3czpEuPPVy05 LfWvNjQZxOLoyJOF48fW/B6VWOY4CLWhcn4SoZpbDixEkczclmp/n15F/B5+EtU2/C QIy+oT0tinibuGXLKZUog8+xSn83qCPVsd+HVtOq+tDiYftWhlgYVwby4IeweuNnAO rEhXiElbv4AFg== From: Keith Busch To: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, hch@lst.de, martin.petersen@oracle.com, colyli@suse.de, Keith Busch , Bart Van Assche Subject: [PATCHv3 04/10] linux/kernel: introduce lower_48_bits macro Date: Tue, 22 Feb 2022 08:31:38 -0800 Message-Id: <20220222163144.1782447-5-kbusch@kernel.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20220222163144.1782447-1-kbusch@kernel.org> References: <20220222163144.1782447-1-kbusch@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Recent data integrity field enhancements allow 48-bit reference tags. Introduce a helper macro since this will be a repeated operation. Suggested-by: Bart Van Assche Signed-off-by: Keith Busch --- include/linux/kernel.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 33f47a996513..c1fa9fc2b5cd 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -63,6 +63,12 @@ } \ ) +/** + * lower_48_bits - return bits 0-47 of a number + * @n: the number we're accessing + */ +#define lower_48_bits(n) ((u64)((n) & 0xffffffffffffull)) + /** * upper_32_bits - return bits 32-63 of a number * @n: the number we're accessing -- 2.25.4