From patchwork Mon Jul 29 01:47:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2143C3DA49 for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8142F6B0085; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C4506B0088; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B3BA6B0089; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 515196B0085 for ; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0560D1202BA for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) X-FDA: 82391104362.19.5D70562 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf20.hostedemail.com (Postfix) with ESMTP id 4C4391C0011 for ; Mon, 29 Jul 2024 01:47:59 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="BPrNele/"; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217626; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=SSSqKf5Io6+hxyWT1TMyGbatrbXdtitMoWeB5xMHysBnwGH0nIU3ALtoS/9aMZ/VBHYGiS sMhh/Uhg4XIj/jI2qoBSkTHd6Cr07x2RLE/rrW7MewdDelsB37Ihhz8uIN13JYs7MujseS v8oLfIK5qtaC+S9efaG630WDfFpC+Jc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217626; a=rsa-sha256; cv=none; b=5Jq2UKyGN82LKwP+4By7HQzD5TMpk3zSReCCGruVCz35+Xn94MBbma51y4mxqjOHvQm7L0 q9op8ij6k+1wfFUJ1m8HE9WsZYdEuw8W4BproFQYXhWOov5IswM5Qk7IPpRj3Fgi4IUIMj 7v/QBY8YTslW98p/LnuZPOh34tUtRig= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="BPrNele/"; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52ef95ec938so3431125e87.3 for ; Sun, 28 Jul 2024 18:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217677; x=1722822477; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=BPrNele/lw8wH0mdJy2Ln98tooeaypPO9eeveKvlMdxzMA7kuemiZfa4qooXuitsuS QV79Q+Eu45Q6sAY+i6PyVi2BZ36qk4RF5gxXYNzZdOlK1nZuChTVQjyi7+lyq2+0Vsv0 hAZ+WoCXg/fGIDOP6MMLbecazX6mCYSscCyi+7vIStrKB7V79xP+eKbOt5A1xAG8lfwe vI2zsZnHFUigqZWkWZxElRcoW4b6QfBpOyc0yQbUTRP2txVNu4K/mjqtr4ujTk8KRkRh tky3mH3XUNBeyi9SIyTgGNZESjCBf+mJaMJKzARqko15LiHQ0bRyVn9CwkuyvCoUDMOC Bjyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217677; x=1722822477; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=Ts/FXYNK1PWEtLP8BfZgCuw4/0Ja5DQslhdoDwYqp+PqEHidnbbFVQYee6m2sRmGTp Kk6e3dwyV8mgcO1+0XFSOIKKQ38ERlW9/a3qfUsYa+Iv9EH9TJnLXqEFMaaPFEj43Jr1 M/XZs2yOiE80eVKqoW8Hgb36EPs9lYWqjWW6bTYzdWEZb6xgrcTelPrtW6Wj+6rvge8U e8tIgXbJI+SNDGVP/TgW1uF+nlqWvgIcHVz+6G9cc1bhjBiXngDIHfk6uyfEWiZI7yYW rP3lbCedIf6L4qTZKC2wzKbf9PbVhkTJTZcWYmHtTNvWUZMLPTGOVUYz8osEE5IAR7Pm CbbQ== X-Forwarded-Encrypted: i=1; AJvYcCVmnTE7a453PkQE9V8X/EMsqdIhk80yc2HiqEPwTkxLT5ZGAGvFurxM5MDImmV3lR+USdvGhAUvmVn/zKmMBCbfgDo= X-Gm-Message-State: AOJu0YwPAtdrI39TUCuXom8rmdrUrySotYQ4zAeQM/ISgbhI/V8ku3xE zOPZHSUf2CPZjLP7oDHLv91vvQxVWHRECWS0LaL3+hkJHr1QkAff X-Google-Smtp-Source: AGHT+IESUw+4w3oWeHrCw8KQxsl+nRkSsjjtNX7KBs4B1idaR3MyPaPXaloqUBplFPAHIcgYSmvDnQ== X-Received: by 2002:ac2:4c56:0:b0:52e:9b74:120 with SMTP id 2adb3069b0e04-5309b26b690mr5086361e87.19.1722217677030; Sun, 28 Jul 2024 18:47:57 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acadb8072sm441807966b.196.2024.07.28.18.47.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:47:56 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 1/5] memblock test: fix implicit declaration of function 'virt_to_phys' Date: Mon, 29 Jul 2024 01:47:21 +0000 Message-Id: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: spbo39azmq1uiqyu8t5bbaatsubzeo8w X-Rspamd-Queue-Id: 4C4391C0011 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1722217679-389917 X-HE-Meta: U2FsdGVkX190ijq3KdWwX9RznsBJuBwFG63gEm3eNE4kuo+G8w4fKe1hazQkBOKp6UOPUvfAHn0mYwEHyE8PJngki7hPNhKMS7MkhPdm1x3l8Jf5Pnjb/4OB6/Ubgim3WkRN0QI+8y8ivHDIaov1BjPvAyKDR2NpAx7jOwVQHHPVMnif6bE7JX0O/4tRVShSyLiVgk93EYseXWLPYanbP4q+u3lCB+W5u/uZx7ODn+CYXn974fDwX75CmyjLk3CAra4leI6qs0HZ8U1SqxF0o0v0ci203ztJ7ckwusIXYfRTx4zzCWFh59LSN/nyvocwTOWHMRoPqS4AftCyxEIaptnkf/PSLAYFn0awgXPfW0JjsQ6xi90x1buMgLmWSPyI6VF5P6NGe3TDud+zCMS/vDT/CuHMmGy43ZLPoy+aT99ppZRnkxP/RWI3DsA/MKNrey7F+3B2zcO71oltZUbON7VupdfhLUD3HMrF1++YGEgjpMLtiMWcDuqx1PH5DZ9NxsTyVK0jdFffRK660U1KBkD9zJOZ/LKZtt0XmDX7IjrytxYsKul8jKSYTFUl9+U1A1ia1+hu/KKWN02VZb+eskmKfmmfooeNEfuwUz2ktZn1XZR6eHbh/kfc1vXxOUIJ18xJ2JD+V8XPewyotbCcaUxnrNbypavtRwEdLOuuvtBEEUf2RwBs3A5sTUBvVQr5qBpIDg+pbVVJr7ZQ2aE6jMx+BzaJKHulC/IH/Daoec2nHBh+VuWIcReH4e31ld3CmuypjsdKKhajGa1KjtGgDUtu4rygnQz7niX0jeVsK4qjqtf63mgdQyNcDgN5bB5nqhvYXtKunjBcdcCgOEbFwai5h8Em5me1hiR6h97XP4denjmUcUoyRv8k7NIYzQkp1kEyruAn3DpZlqsNsM+0muqU/nfDTSQDQM6mD5gLvmtuR2kOKtSCFHBHs7N396SoMms8QFr+G+9FozMaz3S 6aNr2/vD dZfo92H/Je2KOAnX3KIkxY4ioS9/QBqxj//VCdhAoGn/rZOhRQ2Qz0FPQAX7r2R/9XmjQFE2PhJY7I5Qo//ZPaV4ZJxlDV3seKboMpRY+52SliBHbZ7GgQBjg7SucVhVm9yNCKd3KROF0HmSG8UJx/xQHKknefD1DVlIf4dhobRmMcLHcJhwPkKprn0qVxESpwM2tWfITmh/gnMpfZgnuMWpZMDyUoEk2q3S4+yrA3G0SrGCf11jSJjTfrIwM1kVibz9730hM+9B6NSdVQFZUTbXBfj/syYQjqLLVw7R4gfPjV3hJB3eQNvEgTt+wh2V+MNLWb3mscRCn3o1Zxd7AiFBBm0JyiaXafUsjK1BPzyOgieTMAQWwj5ca0p9Ez0xNsnbezsV6BCCZwoEUQBfCvVoFZH3gUaMFFZ06YdeczK5QHmOWdoXBKWz417OgIXT1if1Kp1IzRpz7/Ug= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000048, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 94ff46de4a73 ("memblock: Move late alloc warning down to phys alloc") introduce the usage of virt_to_phys(), which is not defined in memblock tests. Define it in mm.h to fix the build error. Signed-off-by: Wei Yang --- v2: move definition to mm.h --- tools/include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index cad4f2927983..9db45c5d00fc 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -20,6 +20,8 @@ #define pfn_to_page(pfn) ((void *)((pfn) * PAGE_SIZE)) #define phys_to_virt phys_to_virt +#define virt_to_phys(p) ((unsigned long)p) + static inline void *phys_to_virt(unsigned long address) { return __va(address);