Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1304169pxb; Sun, 19 Sep 2021 12:51:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUuvemwD4M9O7/RaD2uLBwwrLgkbuU8sPhGnAxj7beu2xVEAp9XiUZXqgJe0rbA9WeHvWk X-Received: by 2002:a05:6638:2183:: with SMTP id s3mr16989298jaj.11.1632081085478; Sun, 19 Sep 2021 12:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632081085; cv=none; d=google.com; s=arc-20160816; b=lbjhHWP4doZ9P52eAMRGIKovHd6yTGghsEQqcXQks7S5uEasudMKlp4/uh1wEyr8bH TBvrtjpW6LzWWVQhBcegijrF88hRFhx6URmU/0Rowrj2mGFccu0DjmFurjh08E5YH0BL th561xD5gLpL1Et2BAZCn6dKFrGqsRMmDcZuHq7cumn9zql+8wKK8/uPPJbjZ1/QOn3V 8TPIhSYEqNp6Vc7/n7MBhG7jGL4XoUKoG4/iqVY/BFhN99lf4marlmIg5I+PUssyD8ie wcCeW3L0hnNRTCXF+FjLdNyXnEzsqa/t4F43/upW/4d2jK/NZUw3pgbGW+10ZUk9NDp4 bUuQ== 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=/joGQdNC2N2dNh84qcUkN4z807uaMjxshBBAeQbTcZg=; b=j5+uBvSLRi3QGNSRWgnL9Qc2nsBqZlpduWetI214CdMgTYW/AhXJT3nTng0NJq4u8J FARNTITUQXGYJKDq4PIMus4cYpgBz04Qb/tGXRSX/qmpKQm2rI5H5QPZ0xqDVbh9JpG4 mFxmkJn/lJn45s6shK/UMfRVLr31U59n1KBCvLaQjDdtsX1ecyOuA3QpxIKa4igm7skC 4ycH3lzMu0SeDOIU5t2tqSZ7i2T1eE007SmRbTMMPh0PRShIAhwBZYkfF1W4VM7GAEUL 9aa6/zGpij2dxrAfkphzDH2pwqG2elzeDQvUEgZf3fUXMlih9Z0AOqUWto+hZEiFzUhY 3i2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=cw6S0SRn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si11258031ioz.60.2021.09.19.12.51.10; Sun, 19 Sep 2021 12:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=cw6S0SRn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbhISNOU (ORCPT + 99 others); Sun, 19 Sep 2021 09:14:20 -0400 Received: from vulcan.natalenko.name ([104.207.131.136]:40806 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhISNOS (ORCPT ); Sun, 19 Sep 2021 09:14:18 -0400 Received: from localhost (unknown [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id AA625BF2678; Sun, 19 Sep 2021 15:12:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1632057171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/joGQdNC2N2dNh84qcUkN4z807uaMjxshBBAeQbTcZg=; b=cw6S0SRniqaNmiqXzJQXeculZrOiEv6N3ufqssUSvlXSBjgcCFPJdsiz5iA7+q/4w/l/5z HBGP7hCqMFOQQFyqEQCqKg1a4WdWXjTkVlaeVli4WZ647YocRaTECmPIYZDHJ8Gqy+nuXU GU7wBKxFb5fFyHS1PX/XZUSYFeaIo9w= From: Oleksandr Natalenko To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Matthew Wilcox , Greg Kroah-Hartman , Miaohe Lin , Michal Hocko , Mel Gorman , Stephen Rothwell , David Laight Subject: [RFC v2 PATCH 1/3] mm: add PG2KB/KB2PG helper macros Date: Sun, 19 Sep 2021 15:12:46 +0200 Message-Id: <20210919131248.489798-2-oleksandr@natalenko.name> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210919131248.489798-1-oleksandr@natalenko.name> References: <20210919131248.489798-1-oleksandr@natalenko.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Oleksandr Natalenko --- include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 00bb2d938df4..0a7e950ac8aa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -98,6 +98,9 @@ extern int mmap_rnd_compat_bits __read_mostly; #include #include +#define PG2KB(x) ((x) << (PAGE_SHIFT - 10)) +#define KB2PG(x) ((x) >> (PAGE_SHIFT - 10)) + /* * Architectures that support memory tagging (assigning tags to memory regions, * embedding these tags into addresses that point to these memory regions, and -- 2.33.0