From patchwork Fri Aug 2 01:09:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13750994 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 B8630C3DA4A for ; Fri, 2 Aug 2024 01:09:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 261576B007B; Thu, 1 Aug 2024 21:09:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2122B6B0083; Thu, 1 Aug 2024 21:09:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D9276B0085; Thu, 1 Aug 2024 21:09:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E573D6B007B for ; Thu, 1 Aug 2024 21:09:37 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 778AA140C10 for ; Fri, 2 Aug 2024 01:09:37 +0000 (UTC) X-FDA: 82405522794.16.718E8E9 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by imf06.hostedemail.com (Postfix) with ESMTP id C175E180013 for ; Fri, 2 Aug 2024 01:09:35 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kt9QIF0L; spf=pass (imf06.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722560946; a=rsa-sha256; cv=none; b=Yv8PRKrOb2mUhX9lxvVOUC6r1UIcL2INrGunvWqYZxL4hUp5tWI1ddBJYrgClrRjtObHeD uFFKsD6evtdLH1P2mkuH71+7mleQRhzInSy8yMTv6L28fSbw4UCenOvY+vNalhH2D1l/8B HU5L97bXwmt1nbWTj4d9YgkULtCzxaA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kt9QIF0L; spf=pass (imf06.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.45 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=1722560946; 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=E3htfNHgZGtTKSRwOgeGEYeAav5n0bsRhJ35ivdzxLI=; b=T3PhrT8safjOeyN0q9ypJEc0FI0raftGFM6gFXSqXQjxC3Krk8GTH0WxmOsHlbKFaulP4W ZdllXdjCG2Y5WIqbx/PEOxcNeH4LxLo42wqKeMF6x0zVRYkMHbYdlJ27D7+TKSLkTU+pmj 3XiL56h4P9jL/nQCHwxZEK6BRLJ6ON8= Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a7a91cdcc78so449873866b.3 for ; Thu, 01 Aug 2024 18:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722560974; x=1723165774; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E3htfNHgZGtTKSRwOgeGEYeAav5n0bsRhJ35ivdzxLI=; b=kt9QIF0LW49olq/64v9TdokwjzqJz+muLza3dlzD35OiVy9eBt7t4VdWPRN7hEs8YY 3biu3ftdOLcr+dmUaNKntn9gBO5JlZEgWzvsrNjEWwZpfCivvzKjZhCwi9IGnQzGf2FP Pj5tCwf8X0NP1wh+PKQ98NSLVCDOLe53ilRKLqsJeVzan0LCR/oTQmEfIlb43G2Uaycd dN181vWNHUlK4ga9hyIYzNtXoV1vghszU2dawE5G3D4BBaJmgBSnAL8d3ZabdqWMQxQs zeKWqpdi42JK8VbukFRZzxn4uXytLdwCZGxqIxKqHI+Tewg96nZdOgEoElheZ3Y+j8iu WEdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722560974; x=1723165774; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E3htfNHgZGtTKSRwOgeGEYeAav5n0bsRhJ35ivdzxLI=; b=QQi/1YARAICBMOD9aItr0JSHyY6qB00fYy/ZMvclNf51xGsTafboBMkU/Jw2/OThr6 ekyfdxb1C4iub3QX+gB+zYIG/je3jieAsfNwYMKfgWnn8+yzJAGQ2FWdZoXF60usmIVQ 1WrP5ohNEKqdl13vsb4zdrRKaSxBzOQwHskp45gzZiSI13zXi1RdWX/+ccpSxga1PoMe BJgq9/JvW4i1+MC9TAGxZ2UVeckdcUS5iBqznaG2ou9al74ayCobGX+2Hmeql0zjevBs oJtMuf3OdQG/1LVlcURGchPaXkfbenA6KDTXWucj8KfArLFfQGEug0B/+fe/c8t/EAS+ U8CA== X-Forwarded-Encrypted: i=1; AJvYcCWIiTxqzAQ9h3Kt76NyS+3N10mkWKw+cKD8m/wj9A01ZmEVKThT/ppJZng1ENE/idJx8scvcrX9dCX7E4dHFipZy0E= X-Gm-Message-State: AOJu0YxG+cFcLzysqNLTRCjF4WjCTlMjZy0cFOEmmvWY9hSP0L2oRZYI DednWt0RqoOad+p9qOBdakA4oe17YjWEtTPkKi10PGy2usUaB2Sd X-Google-Smtp-Source: AGHT+IGk96XkxqZGR+9KE5YgVgC2rAoZZFUtfBkFOOk5wXY+CwMv7bMbEr3HKxnVi8q3W4MAS0niTg== X-Received: by 2002:a05:6402:114e:b0:5a1:5692:b5f9 with SMTP id 4fb4d7f45d1cf-5b7f56fd3dbmr1500125a12.38.1722560973847; Thu, 01 Aug 2024 18:09:33 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b839b26d13sm406598a12.21.2024.08.01.18.09.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Aug 2024 18:09:33 -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 v3 1/5] memblock test: fix implicit declaration of function 'virt_to_phys' Date: Fri, 2 Aug 2024 01:09:19 +0000 Message-Id: <20240802010923.15577-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: 3w7aejnujhwkifc4dxcrex6kuibmbdzu X-Rspamd-Queue-Id: C175E180013 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1722560975-662369 X-HE-Meta: U2FsdGVkX19isgY8wMQgtM9Em0mBcOB8H+Z2h9U4Jvy1JgI1cqsMHIMV+PZwc2lGAUs0liSMNKG0fABfY9PfYaXiltuFqpMl5IzLXGR9uCSJMUDMJG0W8E4Q8apx+8NwUQyAIuOxbg8dn//x1S1sx21vQaej54L9sz/sjoduPA+16lSTPiUKS/TfoKkH830/8Mhb25YtAwzcxZvRTp8/dw5sbk1LxL/Xfc44G8eE5nL6Nhfi5vMtCqKurq29enFna30ivXT3/SC8DX/GWxidwpvo2+2r2Bp4oC7S4DO0RmJBVLVXYx1MCBGsEdgI31SrjIMLeWvWGp77hyZH4mOiLE1dwdEDX1+F5Y6rS+aEeMYjGJWP5w6FpTYI6WrnyDIgNkKZ1Dl7j1ATfJmqPjluRBCsL1GJOKk7Z7OmQafyPZINOBYyw9QGjGJbl4Q3sEyil1xkjWbW9ddfLxpwzHd4PXin+mJ6u4m386hao9+b571FfifkP1qVA+m3rD1PyYj1yHFKmc1XcLf7M5KXfIHLzPky5mpKrV/jlYjeonz2kSyQybKH0tqkZB+UOJ3tjSw/Er88t+PcOwFKVDiFZt88ZPHN+fWRQGXaEVHqceGEFd2M/75HbEv9lle3YidaXdkQTyDnMLtlSzJ94NNbN3/6FzpgaiUECj+QHA2W04UOF/eQGcYujm15VicDy12YB4ilkGdUygLAph5vh9q4IiTf6zjLBH5eQrESxb/5/BzPOkCxfFUzYDrRUOinGrKud2RaEmz1xYx7RlcTPc1mpI3Jw5qPFv+morD5QoOEg08b4eSe2LewYKtyID0fdJhcuLEyjrDR5M7nUixS9V/+yBQqzwmcd2QHK3Di8Y4rNtR/2DZ0aqtMQPVQd5v60eUGJ8aWr34YBBoQSEwkbXZhDsKBiQsyvDQCqIgw6QJOkmWpj0GAJYxQQbOMxQZ7BImMss86kdPF5RNqxIabuAUsdJV hW5R6Px8 2DPjPFtsoje2YTnnuACFbw7wkJolF1yNLSTxSxszkI16CoJIrXouuZ2DKdn6ztzloG5y2laMFko4/GNkGQk9RglGuZGEZ4P2WNLr9d2tD5+iWQHAK/FJ4MQ0SYFP7qe7MflsqWXOlmEAac5gF4R5Ac/cpLC+b9AJom5qWKzC5OtLwQsFq41PZ4FgnpaPQ4bMc2piu75jqzF54FZd4KVL8FWWT1+vTU+iYCvFPxEkt+iQSexT4o6b15HUcmRxiEvMgHDjX45e0Z3Y3gIinYUNE64jje1R/XfAPlJPByV70mldTevDvwMEWjkTlxT2fCgtlCnAahtnCEckl2/Divmkum4LeRslGhh4/zS4km3jblAAVq80qvb7jHlWAhfNOjSif5Y2dOCu9oVMMQBJtvDtNwlbuhZYqadgPIJEK1aNiLRlLA1KbAThcGci0Vz063xOT5Slh3mVmRTr3Tf4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 --- v3: use static inline as phys_to_virt v2: move definition to mm.h --- tools/include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index cad4f2927983..c9e915914add 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -25,6 +25,12 @@ static inline void *phys_to_virt(unsigned long address) return __va(address); } +#define virt_to_phys virt_to_phys +static inline phys_addr_t virt_to_phys(volatile void *address) +{ + return (unsigned long)address; +} + void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid); static inline void totalram_pages_inc(void)