Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5377914rdb; Wed, 13 Dec 2023 07:08:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdZp5/BvKVnk47fIhXqlYhysIwqOOuUheolP6OTGErKAI99CkvrDeOI74/hvOQejzClfRh X-Received: by 2002:a17:902:6f02:b0:1d1:cbbf:8ebb with SMTP id w2-20020a1709026f0200b001d1cbbf8ebbmr3919236plk.40.1702480083565; Wed, 13 Dec 2023 07:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702480083; cv=none; d=google.com; s=arc-20160816; b=I2MlB0WDqTBYR+5dA3CVo33wzc0s1cbDaDO6IueTKlhSPx/2/jM5Amz1KeGJqbgQdO bjgu9Ph5bywz0wUD9uSqw6rOK7ivYMq+nbDkJlwMcotOnQtvHMU9WxQbwbzZjH9vJRSX pyaCDnkHAFY9d2r3PiQWfRcqxfdHKTOsrtjYn7NjnJ7IRP887JmaQlUcmucTv0Ahc7yi FyqeeNNUcFel1PeslMMT3wAcZtm5gd1StJcgUI1lkVTY6M08IdY4bIhWzqwZyRrhhLAU 0UErFxMGGxl786ruN8eE4qPa4s1PMoTNijZu8CSnSmNgGFFucvh3Enw8QpXi4TQs1Tdm AmYA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=Tr7IYPITuxAPWl4EKzGwdZNRtItdCX54g+L6fr6UUJQ=; fh=RDfrbwf8ZT+P55g4ZBAZq1GBZKl5hqgAiT5lUkoXrYc=; b=TrkSQ9gtHO+pgARV3/8ZQt38TwGnK9YUuKXS57LeLF/gV7aQ3VKr5C3gZ+UUIQ/0S/ FN9V+DBpsTD7cxmRtgKjW++fEs4wFKmuitUdDzr0+10PlgR4Y3WfuBIS+Mp7GTWuQG0f sTZH5/iZ3HW62+wPoXMxnBzXWEGdhZTumUh1TndT+9ZZrf0rLOblA0n6/+F7asoUmOO0 XS4YIVo9FvwVvsu8qgA/7EDjX04fL2BDe/KpYiBOCwivDdm68cP7mskU3ABf1vSrrhmE /FE641DtCA26OM3EuSBeCI7xuiO+9J1VJbyaDcQhylbLoF8gUm03z3gILDi7DrtS/ljZ At9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=pfptdkimsnps header.b="vGu3Yx/y"; dkim=pass header.i=@synopsys.com header.s=mail header.b=bUaHVxQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=synopsys.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id m19-20020a656a13000000b005c663eae37asi10161484pgu.252.2023.12.13.07.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 07:08:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=pfptdkimsnps header.b="vGu3Yx/y"; dkim=pass header.i=@synopsys.com header.s=mail header.b=bUaHVxQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=synopsys.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 66063814557D; Wed, 13 Dec 2023 07:07:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442110AbjLMPHq (ORCPT + 99 others); Wed, 13 Dec 2023 10:07:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442073AbjLMPHo (ORCPT ); Wed, 13 Dec 2023 10:07:44 -0500 Received: from mx0a-00230701.pphosted.com (mx0a-00230701.pphosted.com [148.163.156.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EAE0B0 for ; Wed, 13 Dec 2023 07:07:49 -0800 (PST) Received: from pps.filterd (m0098571.ppops.net [127.0.0.1]) by mx0a-00230701.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BDETVOQ002775; Wed, 13 Dec 2023 07:07:33 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=pfptdkimsnps; bh=Tr7IYPITuxAPWl4EK zGwdZNRtItdCX54g+L6fr6UUJQ=; b=vGu3Yx/yzm/mY6SOHOT/o42XwXl1I5Uo+ hfS52RQiNOfK+Vxyp0znaDAm2WjaZyGU16y639I5rDIFhr6JQEFKPlZarFNjJIn5 nRY451Wh6pXjiuzG4kMinH4qpznkPC4ow99keg3xIfeCL5uveVcyHYexW8pryjKn ootwCGgWXRRxrSj9PtJ7pMYbcB8gcDx6FxVwjefNMBKfCrLhsNQHijUCdoBhZ72H VhrwWyOak+hzPk758l96tQMVcJQWgVOA6aVy36050UarQR+lOS+By/ArfQfK5I/B NJaIXAAPf7TALcOAtWm7BPxJ00WoQxRvej2X3dzvTKKO9iairVz6A== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0a-00230701.pphosted.com (PPS) with ESMTPS id 3uxnyx0dqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 07:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1702480052; bh=7RvO1yPLoi3+j1sn4inWAZ+9901WN8LfuW7qtiFW94E=; h=From:To:Cc:Subject:Date:From; b=bUaHVxQodscb9VOuNT/T1ioZ3/filOfVm154k30A8sKlqgvITySxh2hfIL/e+xATf aGEKBcew/jelR4p8pt6Oeag8PSZF+G1Bg7679cAgcvaF8oZldCS7y7Lzczmu+7BO8/ 2kL1ApMIJhW8ToeGdLcr+xzOdfwN/dmKKKlpoLH6H/9pDk+RN1+Q1XrSk4MVB8VGs3 g0ZvM9P7hkUePVWue+OZ1PkCQkaM9TAovtzCIwJVhPsLbw2/XV+UvUlBLkkndSoolG Gt/HqDu5fAzlyG53nVD7SrprFmByZBjDY+pfMfnYUq5kgqpoj1BhyqBqNqTFjI619R lQnvWaNOxW5bQ== Received: from mailhost.synopsys.com (sv1-mailhost2.synopsys.com [10.205.2.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 6357A4048E; Wed, 13 Dec 2023 15:07:31 +0000 (UTC) Received: from SNPS-o0WHuHJU73.internal.synopsys.com (snps-o0whuhju73.internal.synopsys.com [10.116.105.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by mailhost.synopsys.com (Postfix) with ESMTPSA id 79F02A0073; Wed, 13 Dec 2023 15:07:29 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Pavel Kozlov To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Vineet Gupta , Pavel Kozlov Subject: [PATCH] ARC: add hugetlb definitions Date: Wed, 13 Dec 2023 19:07:10 +0400 Message-Id: <20231213150710.13574-1-kozlov@synopsys.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: 8TCG7J6bXDDtw1NvaVsrMf5Zc-vH120n X-Proofpoint-ORIG-GUID: 8TCG7J6bXDDtw1NvaVsrMf5Zc-vH120n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=539 mlxscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312130107 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 07:07:59 -0800 (PST) From: Pavel Kozlov Add hugetlb definitions if THP enabled. ARC doesn't support HugeTLB FS but it supports THP. Some kernel code such as pagemap uses hugetlb definitions with THP. This patch fixes ARC build issue (HPAGE_SIZE undeclared error) with TRANSPARENT_HUGEPAGE enabled. Signed-off-by: Pavel Kozlov --- arch/arc/include/asm/hugepage.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arc/include/asm/hugepage.h b/arch/arc/include/asm/hugepage.h index ef8d4166370c..8a2441670a8f 100644 --- a/arch/arc/include/asm/hugepage.h +++ b/arch/arc/include/asm/hugepage.h @@ -10,6 +10,13 @@ #include #include +/* + * Hugetlb definitions. + */ +#define HPAGE_SHIFT PMD_SHIFT +#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT) +#define HPAGE_MASK (~(HPAGE_SIZE - 1)) + static inline pte_t pmd_pte(pmd_t pmd) { return __pte(pmd_val(pmd)); -- 2.25.1