Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2404352rdb; Mon, 12 Feb 2024 04:01:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3e+ZyUdCJPEUFVd5UkjJeUuLkGkktEOSHUSqJ5RVKVGaH0ZaOtracIihpuwyvPHak42ukXNuZOsqkvmrSTD5Eiqf4dfn30rpdQ17s3w== X-Google-Smtp-Source: AGHT+IFuEZHLo1Y1PqL90+t3LMJuDvUDje06gRJ3GeDKSOKg6PfTgPq+zqTajJ+qriFLNWTM91zR X-Received: by 2002:a05:6830:4a1:b0:6e2:dac8:92d with SMTP id l1-20020a05683004a100b006e2dac8092dmr4476601otd.27.1707739318098; Mon, 12 Feb 2024 04:01:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707739318; cv=pass; d=google.com; s=arc-20160816; b=urPsH8EnEoFuy0MNyDzrjdMnbsmCeKrR9f34Ec/5Y5tkBH8IIbFUXlClGAbyVHd82y W7xmgME+T6koW/PEglOEMPwXvkyoZ7QuJIoAcWyey8RfMZxIjRvINl1uHjfUVnZPqqIY QFqcCfJKcsHhZP32xM7Gh4mkCQBnCaoAbjqUVktLfQH/NJWWawQg6zGOQ+VXP+bdLqw1 I/hyygBPO1cy9NFXiuBiv0TlQnm3tTZWsz+NuM6whVCcewajj/0RnUcuNqBWVuO1vBWy Rq4WG5/SL//P7yWocxizmW/HMvLyX9IIxmDBfsE5PFdC+qVUWxUjx1WpEbptS452pHgf U5sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PqBKyioLpQMwRvtX600aSZdz3rsEJrSU++0tqKocH9w=; fh=0HtiURdJONXe+Db8rWJYmVv2sBSor081h0tj0giHwgA=; b=E9gyStRPLrk1JrfFcGZfVmJE/WmHXe+b/ikBECY18KdgjmHLlQ1zgttehwrFCmQVqt PTfjICykTmYQmC/ayDDkaWzrNLg3KRpVC3uJ3OtACpvjIYTSv1mEj5ReatXr0yXrD8Fk IS2UNIhjB3FliuGpBBz6bCtQzc6qMQrOGVQhhpWg88b3DaOMmAbV9gtq6C4uIJe4qOJX qMNwLI2wx69U2vFsAa6cOdc3dS9kCf/HQMDCsgc8ixZ+B/BpZmhkEAvRNZpBO2wPOnvq +4rMfSf1Z5yAneIxlcthNW1dYMbFQA/DrOikRsuRrxOIVmdzRd+rET8PbIqxpI0hrmHa PRWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b="d0QhNL/m"; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-61494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=2; AJvYcCW5zc6L/Nyngnyorn/JismToda/e8kAAuDMhB+DRY77cdhjwXRD/Qk/1Z0TexCPFas/fbroGpiIMX5IUtvs4Wjwgvil1Y9njk8viA2c4w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h1-20020a056102104100b0046d485e15ffsi621040vsq.53.2024.02.12.04.01.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:01:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b="d0QhNL/m"; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-61494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BD1F61C218B6 for ; Mon, 12 Feb 2024 12:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FE863F9E0; Mon, 12 Feb 2024 11:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="d0QhNL/m" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B461B3D3BA for ; Mon, 12 Feb 2024 11:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738951; cv=none; b=G8TIRxWoQUWGpvvqWSm3TkNtlEXB5+WA+zjgc+U9k/11bNXTfyGkbX7I7vgHQh4cSiRvgmt7g4llOoNvWiJ/LFrsUlCjbRYZobLmOERS4PuRtllnY2rbT9Ih50YmEU91Jn8WXsL4f2CDZ3gSB2Y3fPayVxeDjV8p3yp2YYjoXL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738951; c=relaxed/simple; bh=oqTjgZO+W1UzsOe79uc/PF43jC2mJyk1Zod+Zl8WRFM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BvK5FRWjuEjMf9A/OLCKcLOyagCF7w+vCrEeUlSnGz13/2wNd7ibDO54A2a2j1pvF51tyyP+N6PzGJvsGReJnYiZKCgiVHqyk8pRjG9s//99R2IFghq+s8b8JIv2jN2H3Y3BI2l5t3eGGf9yA300pIz9UWa9FioNwyhKXp/xris= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=d0QhNL/m; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a3122b70439so389521966b.3 for ; Mon, 12 Feb 2024 03:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707738946; x=1708343746; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PqBKyioLpQMwRvtX600aSZdz3rsEJrSU++0tqKocH9w=; b=d0QhNL/mBW/YvGuuSYFBdqx83fMDvQ74MY0YKFgcdDSgGBNfWico0s2dWd9jPU7xvz KBQDkX3MEOppxO1KF5SxueiYx/tFlBBnQA8RcUdubaHKKsMOXrWOw9/rILhcxxWaVdxu RD5uSKF9oz0d16mo3Af3aX9DknhaJS6n2OMBmoDAyfsaWNo6E/bWjPCpxx9+GGB/S8YW fiobHmZCK/8D4VnQfOZ/9L+PEK3Ufb1fSUgx4yZzxfehOtsFBQMsW0t4q+bv1kV6BY5I TKRS4re8Z3I0dLaZvkdM/qIQJM8ZuobGIDBpGIcxPRZicSpue1fV9BtQ03MDOU8HyrKd Sy5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707738946; x=1708343746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PqBKyioLpQMwRvtX600aSZdz3rsEJrSU++0tqKocH9w=; b=AOtN507W+1LchAPSZ+56M6MDU2a5VeOCDR2Hwwrlws9DmHiJXeCCkMIZnnpcFUqvnd FHGYnIyPpcQ3wT8GlzF5Zjx234xf1/4luE1WP/HIh4z1QdAew2W+xw5gYv2ahXo5pqJ/ mZIegfgcVV46sysLQEIWe6CehuJvODV+FL5uoVByM+UhQYbat6xsNBsJ5DhWTdHJQrUb JTtqKMoSPUf1XjapGFnzg/soZFz1lBZ0eTKrf5PUOXVcTYZs8DM9OURCbzwlymgeP7Vi 1k6kzZpGRnUcPBJ6SUH0UqSDxvaAbjxVNysHH3S0Ra/khASJtGv3b0lh1qgMK1fWgLD3 ZuFg== X-Gm-Message-State: AOJu0Ywl8wDQfHRbEsSWKjkrCK/3NgufblyAVpT1AQW378K6n85i0Hiq 6qRtU/EexaAVUj7IUcrPXktSoEJ2k8YbjvKBG5Emf3Khd9E1v3a9PpxkyrwXfQxPq1O8jgOTKdb x X-Received: by 2002:a17:906:3489:b0:a3c:e69:a62b with SMTP id g9-20020a170906348900b00a3c0e69a62bmr4723747ejb.26.1707738945874; Mon, 12 Feb 2024 03:55:45 -0800 (PST) Received: from raven.blarg.de (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id m1-20020a17090607c100b00a36c3e2e52dsm139203ejc.61.2024.02.12.03.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:55:45 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v5 33/35] linux/kernel.h: move upper/lower_*_bits macros to wordpart.h Date: Mon, 12 Feb 2024 12:54:58 +0100 Message-Id: <20240212115500.2078463-34-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212115500.2078463-1-max.kellermann@ionos.com> References: <20240212115500.2078463-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Reducing dependencies on the header linux/kernel.h. Signed-off-by: Max Kellermann --- arch/arm64/include/asm/syscall.h | 2 +- arch/arm64/kvm/handle_exit.c | 2 +- drivers/bus/uniphier-system-bus.c | 2 +- drivers/irqchip/irq-gic-v3-its.c | 1 + drivers/spi/spi-pci1xxxx.c | 1 + fs/hfs/hfs_fs.h | 2 +- fs/hfsplus/hfsplus_fs.h | 2 +- include/drm/drm_fixed.h | 2 +- include/linux/dma-fence.h | 2 +- include/linux/goldfish.h | 2 +- include/linux/kernel.h | 29 +---------------------------- include/linux/qed/common_hsi.h | 1 + include/linux/wordpart.h | 28 ++++++++++++++++++++++++++++ include/rdma/uverbs_ioctl.h | 3 ++- include/soc/fsl/bman.h | 2 ++ include/soc/fsl/qman.h | 1 + 16 files changed, 45 insertions(+), 37 deletions(-) diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h index 107ada608694..e5f462cc1a54 100644 --- a/arch/arm64/include/asm/syscall.h +++ b/arch/arm64/include/asm/syscall.h @@ -8,7 +8,7 @@ #include #include #include -#include // for lower_32_bits() +#include // for lower_32_bits() typedef long (*syscall_fn_t)(const struct pt_regs *regs); diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index a82b4b31bb36..91bd5b701acf 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -10,7 +10,7 @@ #include #include -#include // for upper_32_bits(), lower_32_bits() +#include // for lower_32_bits(), upper_32_bits() #include #include diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c index 8cffdb089a6b..8949a7a5c170 100644 --- a/drivers/bus/uniphier-system-bus.c +++ b/drivers/bus/uniphier-system-bus.c @@ -6,7 +6,7 @@ #include #include // for upper_32_bits(), lower_32_bits() #include -#include // for upper_32_bits() +#include // for upper_32_bits() #include #include #include diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 1be09abac7cc..2b33edb78c26 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -30,6 +30,7 @@ #include #include #include +#include // for lower_32_bits(), upper_32_bits() #include #include diff --git a/drivers/spi/spi-pci1xxxx.c b/drivers/spi/spi-pci1xxxx.c index ab99aac85eb9..1ff89d726927 100644 --- a/drivers/spi/spi-pci1xxxx.c +++ b/drivers/spi/spi-pci1xxxx.c @@ -9,6 +9,7 @@ #include #include #include +#include // for upper_32_bits(), lower_32_bits() #include #include #include diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index 71ebbed52f5f..99e54ff4df83 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -17,7 +17,7 @@ #include #include -#include // for lower_32_bits() +#include // for lower_32_bits() #include #include #include diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 157dad01495f..79cac82d050e 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h @@ -21,7 +21,7 @@ #include #include #include -#include // for lower_32_bits() +#include // for lower_32_bits() #include "hfsplus_raw.h" #define DBG_BNODE_REFS 0x00000001 diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h index 0c9f917a4d4b..ff9a91fa40b6 100644 --- a/include/drm/drm_fixed.h +++ b/include/drm/drm_fixed.h @@ -25,7 +25,7 @@ #ifndef DRM_FIXED_H #define DRM_FIXED_H -#include +#include // for lower_32_bits() #include typedef union dfixed { diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 3081ff146d41..308d77098e21 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -16,7 +16,7 @@ #include #include #include -#include // for lower_32_bits() +#include // for lower_32_bits() #include #include #include diff --git a/include/linux/goldfish.h b/include/linux/goldfish.h index bcc17f95b906..8b2b3046f779 100644 --- a/include/linux/goldfish.h +++ b/include/linux/goldfish.h @@ -2,7 +2,7 @@ #ifndef __LINUX_GOLDFISH_H #define __LINUX_GOLDFISH_H -#include +#include // for lower_32_bits(), upper_32_bits() #include #include diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ac332f4deed9..6f436367dd16 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -47,34 +48,6 @@ } \ ) -/** - * upper_32_bits - return bits 32-63 of a number - * @n: the number we're accessing - * - * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress - * the "right shift count >= width of type" warning when that quantity is - * 32-bits. - */ -#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) - -/** - * lower_32_bits - return bits 0-31 of a number - * @n: the number we're accessing - */ -#define lower_32_bits(n) ((u32)((n) & 0xffffffff)) - -/** - * upper_16_bits - return bits 16-31 of a number - * @n: the number we're accessing - */ -#define upper_16_bits(n) ((u16)((n) >> 16)) - -/** - * lower_16_bits - return bits 0-15 of a number - * @n: the number we're accessing - */ -#define lower_16_bits(n) ((u16)((n) & 0xffff)) - void do_exit(long error_code) __noreturn; extern int get_option(char **str, int *pint); diff --git a/include/linux/qed/common_hsi.h b/include/linux/qed/common_hsi.h index 827624840ee2..11482394d7f3 100644 --- a/include/linux/qed/common_hsi.h +++ b/include/linux/qed/common_hsi.h @@ -11,6 +11,7 @@ #include #include #include +#include // for upper_32_bits() /* dma_addr_t manip */ #define PTR_LO(x) ((u32)(((uintptr_t)(x)) & 0xffffffff)) diff --git a/include/linux/wordpart.h b/include/linux/wordpart.h index c9e6bd773ebd..a73f0c84a03a 100644 --- a/include/linux/wordpart.h +++ b/include/linux/wordpart.h @@ -10,4 +10,32 @@ */ #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) +/** + * upper_32_bits - return bits 32-63 of a number + * @n: the number we're accessing + * + * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress + * the "right shift count >= width of type" warning when that quantity is + * 32-bits. + */ +#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) + +/** + * lower_32_bits - return bits 0-31 of a number + * @n: the number we're accessing + */ +#define lower_32_bits(n) ((u32)((n) & 0xffffffff)) + +/** + * upper_16_bits - return bits 16-31 of a number + * @n: the number we're accessing + */ +#define upper_16_bits(n) ((u16)((n) >> 16)) + +/** + * lower_16_bits - return bits 0-15 of a number + * @n: the number we're accessing + */ +#define lower_16_bits(n) ((u16)((n) & 0xffff)) + #endif // _LINUX_WORDPART_H diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 049f381b16c0..6d7776438ef6 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -7,8 +7,9 @@ #define _UVERBS_IOCTL_ #include -#include // for u64_to_user_ptr(), upper_32_bits(), lower_32_bits() +#include // for u64_to_user_ptr() #include +#include #include #include #include diff --git a/include/soc/fsl/bman.h b/include/soc/fsl/bman.h index 173e4049d963..b01d8c0ac204 100644 --- a/include/soc/fsl/bman.h +++ b/include/soc/fsl/bman.h @@ -31,6 +31,8 @@ #ifndef __FSL_BMAN_H #define __FSL_BMAN_H +#include // for upper_32_bits() + /* wrapper for 48-bit buffers */ struct bm_buffer { union { diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h index 0d3d6beb7fdb..c5230a844114 100644 --- a/include/soc/fsl/qman.h +++ b/include/soc/fsl/qman.h @@ -33,6 +33,7 @@ #include #include +#include // for upper_32_bits() /* Hardware constants */ #define QM_CHANNEL_SWPORTAL0 0 -- 2.39.2