From patchwork Tue Apr 2 13:26:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13614113 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 A33BCCD128D for ; Tue, 2 Apr 2024 13:27:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1337A6B0095; Tue, 2 Apr 2024 09:27:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0BBEB6B009A; Tue, 2 Apr 2024 09:27:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E78A96B009B; Tue, 2 Apr 2024 09:27:22 -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 CCE536B0095 for ; Tue, 2 Apr 2024 09:27:22 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 975851A0712 for ; Tue, 2 Apr 2024 13:27:22 +0000 (UTC) X-FDA: 81964668324.20.1E2B093 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf08.hostedemail.com (Postfix) with ESMTP id BDCB5160027 for ; Tue, 2 Apr 2024 13:27:20 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MWlxYNsx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712064440; 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:in-reply-to: references:references:dkim-signature; bh=/zlJk86kk+e6v/0Hhm5prLyYwej1Vl0sY7sp0RzGlSU=; b=y83uF/tjoUb7XYtXMzcS1eHLwrzd4QBDJbS5NHhBOEy6w0kPPC8l/y1hT3K49KlJzr9ZU2 2Z9uer45xoziz2/axfPHNM62GvrcS2vm8CvSOZXA9nOqBLZPbuh1ZWGXPQLxQrm3oDhvg/ 72g4PkJKBYAkSsVLUpni48uTOzrWcc8= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MWlxYNsx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712064440; a=rsa-sha256; cv=none; b=hoYhVSkK+U2z7AfmENwB62eFv6bqLFC8C2+wwPLMdSaATfbFHQhX9X5nGspJuy30prF6aQ cHv3L5Pn7YnEqlJ+KbB0FZ+rvYuZ0d3IefI2WVJb/dp6nSD5GQdSwia9j0i1fH8hJGJ4DE rwMpg1F8fbJHPZU5R30tKUu8fjpOVM4= Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-56c404da0ebso7482902a12.0 for ; Tue, 02 Apr 2024 06:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712064439; x=1712669239; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=/zlJk86kk+e6v/0Hhm5prLyYwej1Vl0sY7sp0RzGlSU=; b=MWlxYNsx04GP/icbfZkHiyObGGUf0klmvFNbL1OHRSd6Fcerbrm9MC8S+3BDkxBl6g fddRYznsEWaJjTMsroSDZfKwj+1faeUt+iv2zUqxKy1MilRp20ogHkrY4a/QymrDCnXD cJQRtK4Q+LwO4ZQKbUqODtnLDqKryDMLoZ8Be0T55P1zmk5jiD03vs4COVxnRwkN04fT 7N2iGjiOLdRDXJddHpU4QWtEwX5BbG3rY7gSYvVxuBrd4Sk6aflqMelv4gsCA6xp1NUT PamHTdi2wnLBZ00qH1MEfePib6eihs+1q/QeA94VDoJ4TwOnykgD6ChNi1JTNwv3Q49f IoAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712064439; x=1712669239; h=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=/zlJk86kk+e6v/0Hhm5prLyYwej1Vl0sY7sp0RzGlSU=; b=pL3bY/ZfozXa0OjK5tWrH8NVFC36xKSos83ntauhKZ0QWs0R7TwoKSN3JEdSz/vh2p rclRLR6fM8mYIGBfM9wqjPM947VGl0V/j0bQOAXx4irRtWgDs/nwYjsRgBtF1fcx0RxP jXeHY9a0SiQidlpB1Gdil8F3/utz9O91PfoH7kf6WbvE8hxTrniKx65YIpwTpJyhpU6i VADSS55XNPAjen3Vrt+nFYGaxmtI5WEh80/J4jjJbRMs/Upi7v9yypWjXvCiPmbZLxB6 OMV/UJL3aK6deqLMnCSSHYHaWHOlsMnMHNsqAFLM8VaVx+otjQuOwhlsY2QjcDMEQR0A vBKw== X-Forwarded-Encrypted: i=1; AJvYcCXb0aNeXAR46tkhyu7DZBun8LNqoVTPnr4CDpb/L1u7dmXcyGC9KHVLa7FDfo+1b+HRP1fypI6ZQaMwyHXPPcOvjuM= X-Gm-Message-State: AOJu0YxqJ8ZkBWt54Oc23RDRfHmgok+MbnJuR94K04HEPFy7kAw8U++w vrdll1UAoRxO18oNsfjlOK5eTG6cNVvyl+GQeV96WHibd38vceer X-Google-Smtp-Source: AGHT+IGVGxd08nxJspeKCBa/sUfV4wRq6nZEH6TtddNfET39FJsuKrlK0+PJ5UXPJTlZxDo0ZOFcYA== X-Received: by 2002:a05:6402:348a:b0:568:9d96:b2d1 with SMTP id v10-20020a056402348a00b005689d96b2d1mr9264446edc.32.1712064438815; Tue, 02 Apr 2024 06:27:18 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id y11-20020aa7c24b000000b0056bdec673c3sm6942782edo.38.2024.04.02.06.27.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 06:27:17 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, rppt@kernel.org, rongtao@cestc.cn Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wei Yang , Yajun Deng Subject: [PATCH 1/3] memblock tests: fix undefined reference to `early_pfn_to_nid' Date: Tue, 2 Apr 2024 13:26:59 +0000 Message-Id: <20240402132701.29744-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240402132701.29744-1-richard.weiyang@gmail.com> References: <20240402132701.29744-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: BDCB5160027 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: n8o1f6hhcsn9gthyudj7sxgfu73ijcfn X-HE-Tag: 1712064440-177936 X-HE-Meta: U2FsdGVkX19h89sCVltTJeVmM/yqXJ+55LFdFfcp70wPsue0NEEANrnQNoIxysqqto32h5+8gzbaWUkQRVhZ5EcYghQHbGb5fqVOrRCLA5Sw5ToYbyhiRcKrz+AgrkwwDF3Hwox7fs4bM7/ZR7TqDVMaxQUUKY6/gWKUys8CYQ9YyltSIOzZICjL+cfOcApBkh3O5rT0/F6L0RMjVPhIXk6dRyIrRZAMSJt5m4dBNcnVR017+xUOPWlznHB8z8igasLpReP9Lsh613Yy1fpP03SWpC7OdF/NTviJ4TpmowRS/jWUWqDzONsjALI1kMzMFCLghiTLpqvfqVBaAXEXMIuVRuECg0351NOIm/6fXfvk5Xn7QKB05UgN28fzsIaMEHtGgaDoZIBg48WU/3Oa+YVqQP/pWeK5qGdfdxqhJpbp0AjZRdc2Dzjjj6Xj+aGyc/JnoYGFllz2CzqCnsPcVVAu8hlXLAxTAl9y7CrcIYHQagY0tYMDM44fIMqvd7z27BCJa3rd5p7kgRTjIDs8rDnMsZ3hRNwBBYjBBtBcXZzUF9LftXurdrOWWh49TkXS9XpHaNxY4M59MRG9Jl2vbLwenX/LP+covPXo04elxUdOpcHieJD4LhUeyEz9f34bCuSM0eY+vvh+qYCSsrLlCqWj5KO6t4UKcugTu89Jjnepad1SD/4BPcQA6lyeZmUbNXf1Jc3xHmKnv5SBjWMYzvGfuqV9zjVR/r8yQNulaBoDCVQJDatnYP0taTvBODv4bJBa/QvPLUGSDZn9QZz3jvzs/ybeusnB2JbA5A2++weVeWpwIly5EbgQcPzwQ1UoiGJ30M8bJIaTs0U23am5QC4gSBrrkdDhYguW2J9GqrqSJqbEgViWChKKUKZeZYWmYH9qOc6xylRESIRyZdruXAeaglkUNYei97LvE9S7BSC4X2QnXZyjT42KNfVf0BlQex87xQgUx0xGhA2+CCs JMwXYIuq 1Z7TdxfKBHaeF2X1L3aFhX+OOi8gtTNfCZ30tmLg6iKxM+HBFmFCFbRcBPPGfN4iKymn640hdSjPzF5gCbMRYODYkIWfLc3nZN7esbsI86o26ZrC7iI73xOH9bOHYyVNoK0lV48svNd+kaRFXKQWO/eqXKauh3eWoYeKTxhjdWt8mwADdUlAr3xsKacwjxRY5RZkwe2gmbLCXb/sviLBbmBUp0TEFtLR4FdQxA7BbgdaClwyEgMcRPezAr+v4QsYt5A677MvlyMyH1JLPtMUxILBOZl1hYKCP8vUA4yK0RLUa9MaogAQcsLipo9k0Gj9qqWzc7y+YPwIPgtWQzmkIw73BafieaLDCiNhA11ZtzlBWE3S6OdO8brhuorfPcHmuPmGRrCNV8sIi7Yt0+3t50d4fdh5S2M7g0eCeOphEb9lsyFWhiF1OXiQA7+vo6xbIJL5PLjfY3YP/dmfzn1XetKiLQizXD+S0oNDan0MdgJdWlddO0kLz/BbFdZIpCP/selB+3LBPxQ07geJVKKn2OtsrQFZKdxIYGiW/KAMVHkffFkp2rmwA/ZYeEir9UC4A8UNdHeuYwCvGmP0JLMxX39eY4CoILuVW77kQHINu6lPjj2s= 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 6a9531c3a880 ("memblock: fix crash when reserved memory is not added to memory") introduce the usage of early_pfn_to_nid, which is not defined in memblock tests. The original definition of early_pfn_to_nid is defined in mm.h, so let add this in the corresponding mm.h. Signed-off-by: Wei Yang CC: Yajun Deng CC: Mike Rapoport --- tools/include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index f3c82ab5b14c..7d73da098047 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count) { } +static inline int early_pfn_to_nid(unsigned long pfn) +{ + return 0; +} + #endif From patchwork Tue Apr 2 13:27:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13614114 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 D8B97C6FD1F for ; Tue, 2 Apr 2024 13:27:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 537F06B009F; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 466AC6B009E; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26A866B009D; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id F1A5A6B009B for ; Tue, 2 Apr 2024 09:27:24 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BF0B1A0B8E for ; Tue, 2 Apr 2024 13:27:24 +0000 (UTC) X-FDA: 81964668408.11.44F33CB Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf20.hostedemail.com (Postfix) with ESMTP id E36A91C001B for ; Tue, 2 Apr 2024 13:27:21 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=By05eGv1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712064442; 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:in-reply-to: references:references:dkim-signature; bh=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; b=QtXZpU4EotXHIYho5ieRNWBkD8eNZf9YgtmGe9b+X/8G0aBYYAg/g/4APFgPd55xqHW1qG 6hGPY061QNsDUb2VmIL5VXcZ/NzE3aNn/QUZcf41APBezu9OqIVipN3C709kcnTHwHS9EM CDCmxCrHZe7YpKMYGfAvZIdhfdkosUI= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=By05eGv1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712064442; a=rsa-sha256; cv=none; b=eAvJpYFnIhO//wOjP7UwBCA0n1SHmjrFUH8vzdiRa0pzd6yEiTsE5tvYNjfP8NU4k486S9 4HDQAZzswCfhUDE/MoSbCTRhBeuWmGGig+tsel+9T7MD/MHNNMOKBC6NGZ+HleZ/tDrNe+ 3+GaE2C/NovM/eaF9kUYjeOIJaKV6KI= Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a4e40fad4fdso396368666b.2 for ; Tue, 02 Apr 2024 06:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712064440; x=1712669240; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; b=By05eGv1Ggf9Dbu9RVkKtOShJCDw55yevddUVlBX4fWITYucFusR2OKcICukZ5jnqI VMLppbgVz7+yO5yRw7/h5xGi7CECTh5l5rf97UNPr8bFWNEV9FYZ4RvUlLYD2nIFZ+va BvJpIWzPWFGZs/nQXlS1c24D5UqgLjcNutjOPGTJlZRw5eSQftw/dhpnMEl65CZKen08 UT6lKBiKwHrfXlW/VugQWOTzKrKohu3tqOVHJd5fn2iHIuT1ZMikLWnHIJ8UlcfIcPek uxeosfJyOcXsU94BxvgWqvD6DW+27/DNYKe4/aQ3UyVDTLb/Q4QzehTypC23UCCyddGH uTlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712064440; x=1712669240; h=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=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; b=bu8dwBL3O/9oc4EGJV+46PPYJaT0FFDUWHh17g2+whRscEcrCHN/f7133O+dE0GMF/ sIuhv67QxF2xwYPNcyK96Ltkt5mMgJOB0ifZDMVdpZ9oJ2Z9CjuoeXNoP9eMvzrI2XFr p/gINm+jGgGJHoXwScr1vknTzn4tvZsmMH7OLWxjtW/rxKTql8STfmXhNU84EX5YbFa+ ojQ8F/8PEMmnujmcXHDrOTIZejzm74tVWBruDLv+KZIqJ4yr20lVUhq6ypwI8Q3peEpE g7lLCYNkRcGkEbJ1mWGPiZp7h6LZfXJ9N+WISiVhGnyOzjUqK0sl8E6Ys1xlnGOh/5G1 GbFA== X-Forwarded-Encrypted: i=1; AJvYcCXpkwhFKVBkj7i5kRz3Wjl2+No9cXUC/ecL4D+7DQ5Nl4fbrffFyUJs7oiyrBhydJ5UKxoJNDqYJftqiVLLXA2YMak= X-Gm-Message-State: AOJu0Yx64whWGwSjViDztDAJliqCq0nVV6EpMh1ZZyNnAKHmOsBRfHrR dQ5xloqI4yMHCYrhzSmWkRRPC9Bvwn6qhnRV+RcXe8tUSnnrLzMN X-Google-Smtp-Source: AGHT+IFh6Iw2TrL0kjEkoE4UmamEPUEI6XGozO1yFO9A91flOMzrYblCqI4/31CIdw8aKkhQg2lR8g== X-Received: by 2002:a17:906:b1c5:b0:a46:cee9:e412 with SMTP id bv5-20020a170906b1c500b00a46cee9e412mr7005460ejb.15.1712064440404; Tue, 02 Apr 2024 06:27:20 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id q27-20020a17090622db00b00a46a9425fe5sm6499992eja.212.2024.04.02.06.27.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 06:27:19 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, rppt@kernel.org, rongtao@cestc.cn Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wei Yang , Song Shuai Subject: [PATCH 2/3] memblock tests: fix undefined reference to `panic' Date: Tue, 2 Apr 2024 13:27:00 +0000 Message-Id: <20240402132701.29744-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240402132701.29744-1-richard.weiyang@gmail.com> References: <20240402132701.29744-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: E36A91C001B X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: hupodtdw97kiacfu5h6pzjfr3o674p7t X-HE-Tag: 1712064441-442313 X-HE-Meta: U2FsdGVkX18tOAraNM11zRQ8mCYFRgA77Y3vM/QpCFifHw4f3dW6aJecD2B4g8pi0sGi0AsxUm1wN/YoiRlGeTH4hah83CnSMLtipI6sBd+91Bl307txQbwsqIWVsU6yh/PrGM9nnGSM2NRyLzjVVymvQlpZpq9SH24H7ye6cUmY9CcyGlYITZiVKGUE5bIyprCTAKHtTtlYQVThiqMuWG8ZA99AI1+nsz0XPnbz6/s3DF/D1RCVy/xDksBAhS59gUH7D7txRbqbCaUanoYC4ZfDJydgfBaFlmm1NAYtnu8hBOFbNeaoUgz2M3TRcD9KAytxW+jZ/5B5ExvgPE+XzdxCqRhifeiP7klRRlIFzAbuJtKPyZCu1uxDj/2m1F+QUfacFD2a25fFesk7t3RVeG6bprvqW7x6iG6KRjMxAVfOZXtCfJwOB2a+FRna64T4fiYwpo+8oSWnHGguoWY68Ft1AXPoiFqHOrXwZZLaMMMlU8mHaazS4HYhzwTN2URPuPXmP6lIfMUvKFd4za1A6atlHAyW+KMR6oJkEugus8J4Fm/hzBLWx5UUG4jFxgt1Xz66GnCf2nuSx/235GJ3xh7Pvbz/tHOC5gpQRgBai5+5Y2/oWGsMOmQMfS+tzWIiopOaFKwwdAVXzfQGQJ+hAj8eCIEsXkW/68xR6zjTgvIirVJCxqlr6hWPrmuuFhqCz7k0ftWj8LEKGg5gz/8+/3LRmjeAScFlVESDY95vw7Jabl008MuF93iKes1t8z6k7vxuq71KymdphwdJoNyg5yH1c9XAbgFeDdWprYzZUrhlm4oQIjE4XNKZHAYUy0Wobb337+JEn9VIOb6JODFBSjq8KGc+B8kthuDOkAFdipbAtTwzCUrZhR4jSFIIEGZLYu0hK4SfTBledelSZ/sRbMenJmLiUNkio33iOmCLRwz8qrBTw7fZoUIOIy4dBkzVBl4MgfWOywbieb+huO5 q5wYvACt rmEZX1UQLWeD8ECC7vhla+xU2Z8Qzjh73nS158X4K7qI25NRPKKqvVKivJqw8Vl7hxV5/5Z19bVJiLF1YIbP5RP//dHTRyI8gDjrZc8iaCDCsRBD5Tqw/ltqXkGht3ApchOi1wdg0vQccbPVIF+a0+oYLpoDUVOLIGwfnBtdZL1FAHh83+LTOfRVBvtGMt0bB0BKcWti7zT/VHthLQc5XCbL3OSO9bdO42t/EDZWQD5iNXlq09DnXPH/E42FLg2ZjAP9V0ZIUUHQASumjSk49QMyKaSO2SH9n3I8QZQmHZgoaORYrDDtIxXX5WK71GiwV2spgbLmIaeJqg6x0nQPUNdyTyVJ4VmAN8SxpRa7QgnbhVGKw2vOoT4aVX/r0ZjMCcW1Wh81UeBXoYm9uE58f0LsG/xyViYdMb5TfDTkW/a7qhfC96cnbTCzrMDzDoGBWrkV1CeEPr8Yoppiz4vofYeQAqoDBSfGyG6ZxFNkokU41TZlr7tioslLfb8FnxNnI/hkqx81E8tD2rVujSkABe6En3DzzoV0GuuOyajqD7vX8cjXp+gaw1H6WI7nXVALYxIG2PXHOCvCe++8CxCEpjAv3UKLYWi4il2qbes61Zyf1n7P5V+XEeNhfOA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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 e96c6b8f212a ("memblock: report failures when memblock_can_resize is not set") introduced the usage of panic, which is not defined in memblock test. Let's define it directly in panic.h to fix it. Signed-off-by: Wei Yang CC: Song Shuai CC: Mike Rapoport --- tools/include/linux/kernel.h | 1 + tools/include/linux/panic.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tools/include/linux/panic.h diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h index 4b0673bf52c2..07cfad817d53 100644 --- a/tools/include/linux/kernel.h +++ b/tools/include/linux/kernel.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/tools/include/linux/panic.h b/tools/include/linux/panic.h new file mode 100644 index 000000000000..9c8f17a41ce8 --- /dev/null +++ b/tools/include/linux/panic.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _TOOLS_LINUX_PANIC_H +#define _TOOLS_LINUX_PANIC_H + +#include +#include +#include + +static inline void panic(const char *fmt, ...) +{ + va_list argp; + + va_start(argp, fmt); + vfprintf(stderr, fmt, argp); + va_end(argp); + exit(-1); +} + +#endif From patchwork Tue Apr 2 13:27:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13614115 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 1B6BFCD128D for ; Tue, 2 Apr 2024 13:27:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 835BC6B009B; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BF086B009D; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 529506B009C; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 305A86B009B for ; Tue, 2 Apr 2024 09:27:25 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E85C2405BB for ; Tue, 2 Apr 2024 13:27:24 +0000 (UTC) X-FDA: 81964668408.18.9F25CB0 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by imf25.hostedemail.com (Postfix) with ESMTP id 16A48A000D for ; Tue, 2 Apr 2024 13:27:22 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CmvzRW2E; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712064443; 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:in-reply-to: references:references:dkim-signature; bh=B6ALcUhn3bkfonAFTQyhGpgkfckA9UhL/OB/3gO2UMI=; b=sk2QJj6x2yuqBwrZQn3i+3d3lvmAPIN4Mp5jHG8n9gOiKsNrgC1ih++ybjONWlEHV3x4oL 1wJWeGxJohhIzxkUaQgWMhbQvBtAGOsfm+Z+cbgcjjCJSVbz5tF+PERUIYbu89FtyRRvVq 8MX4WAz1Wnv20q3yR9SRlpIredg+MzY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CmvzRW2E; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712064443; a=rsa-sha256; cv=none; b=A57PnCEreOnc1wVBgzDSjYCk3nASuPa+s9HEgGxuCPXowJhRg2ZKj2Oq/Dc91u1PpkeMel dqrJ98pCcHj7kMqFPge1OOUzCUuqcZEShYV1Hsds94JuS1bbJCrgbpOVTkqRMKTSh7T1F8 CCtUTAODTmSGMYz0wZGXdjZDe2N+G9c= Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a4e60a64abcso330652566b.1 for ; Tue, 02 Apr 2024 06:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712064442; x=1712669242; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=B6ALcUhn3bkfonAFTQyhGpgkfckA9UhL/OB/3gO2UMI=; b=CmvzRW2EBfn3OGmmuLXpiUrIN2lUqdZnab52BtJMbXA26Sgryafx1yiQhi0WnlS6L7 ncI+GSFkrKY+cXk2i55Ig2+JU6f+TMyn/hOWTqhA1SYEHxtX9/qR9D+s9G7On92fG6NG /yyamw4sQZ+KrQ59SFEXnpwWN2XMJCJVA2zBF+rMu1AYWUAgByYQxbwOpBDrM1DaOPET QlXI3CaX1v7M6w5T3q7hJxv4wY2f8K/g+svwyr5KeoteLJHds/yIOeDUoxV55PYKmhWh pu5aY8EUNbsT9FGYzFnW2c2MtUsXclROTAXd9eh19VVFPA57+C5fLmRgrbcDYspjszcF 6Ewg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712064442; x=1712669242; h=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=B6ALcUhn3bkfonAFTQyhGpgkfckA9UhL/OB/3gO2UMI=; b=qiB+psLH0HrmicLp+xc0uM7316D2bIIFBAiHTy7AFAP0RmFm9Rk4qB0mM/DLZRFiTB O+z//BAs5yMGcNWu7I7N1Pm3N16MNnVgcB0lI0xocMymhS9x4LyKHxZBiRDqepy5jZpD UwSKiC3kG3p39qecXZ1UaWvBLFhXoW8AM1NuhTSerAGxHugFPMYg8QHsekLOtH47rVFp zOZpjSEyc4gpeOgfI2vEs3owzXVGDQbWywqJdMpGkYYvHeXOsbsMgJ8azQzacV5dIqUt sz2MSKby1w7651GhIEI/mf0pUbqgwFbZOcI97jzOg/9gIaGW4bwhIJN6D0gTG3IbY4Nk v+2Q== X-Forwarded-Encrypted: i=1; AJvYcCVNvfXfEUVRmMAhyrsXxgf+bA7VSVobXgdJKlx6E3BMlNTsPHIKLofdWnKnWwypYNfh+Riy5zWPwyLhlbqurFWrtB0= X-Gm-Message-State: AOJu0Yxh0NqND45bZ2VU93SZiTJp1gYWaUyJUrVzjUj+KNVPN+GW6g9K kAB33CE7mzmIHzgfpwiM7gu9ikBUNipc0ST9w5xZLAj/HPq/EDb5 X-Google-Smtp-Source: AGHT+IFTabiMBzV2DetNy6rdQODxSmUfHTAHQgfA3KyyBQOMZScRczY67MoRnE4oSPyLwrU+ldb6Rw== X-Received: by 2002:a17:906:2892:b0:a4e:7d0e:f62d with SMTP id o18-20020a170906289200b00a4e7d0ef62dmr3372904ejd.13.1712064441572; Tue, 02 Apr 2024 06:27:21 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id lw7-20020a170906bcc700b00a4df01f4232sm6534084ejb.189.2024.04.02.06.27.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 06:27:21 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, rppt@kernel.org, rongtao@cestc.cn Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wei Yang , Suren Baghdasaryan , Michal Hocko Subject: [PATCH 3/3] memblock tests: fix undefined reference to `BIT' Date: Tue, 2 Apr 2024 13:27:01 +0000 Message-Id: <20240402132701.29744-4-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240402132701.29744-1-richard.weiyang@gmail.com> References: <20240402132701.29744-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: 16A48A000D X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: innjj7hf38do1spyss5sxo3kdcxn4zay X-HE-Tag: 1712064442-653615 X-HE-Meta: U2FsdGVkX184bhiCM6D9aYX7iVspq6ffQDluKYICVYHb/81FCC+kS95/F9PJ5WPfSU4DE57S1Fp8F28+n+Nw0l+zdwVrI1cgR1uO12DE6FLytVDIxvCKSZ8UFxX9NL8Zm6HqvskQ4DYUGgCyMHAo0yDBhybi8HzAD6SQCxCxmKqzKQStYni21Sev4ollGq8BZKDhxnabz1IJiIGA2QrARJxVCvHO2WH99XC/FwSogBWwOMIURf5cqNAsoE6nyVQAZi1RO488ymZOlFcLNExCNHOJ4hy1TuWqv3gNlcgMEu0nDjH2YCtPEhlGoVRGGIY2sXNAUfloGctkmKcYMqk0pEyXe8uuQvl4hhhgw6ZeYkJ4A998uWWU3xhSaqf+OoIsyoHcE0ispaz4NJSnU+mgdf8+3UGcoXfpDGNRK1zxtifvjjM2EguQ7Bl+qagBvvHdmAmqslEQRpJJ7navy3xqj3kNELTAi2gvrucxNDSEuWglIX6VMNxkfrjrq/9b8rmmvyIpg+r6Cy/bTVH5GxXddWCDrki6Pq30CRdswcOowEC7hGZzJlI3BlbjvwL57BCdy00BSpkY/+HFqbEpaL24SC0gR4klmQk+6lGPVY7izniT+869blhW6fj4xjIu2F8o6j2+pKCyZCleXrIQubK6AtarnMxUvwdgbaMoBy44s7+SQJPmQfnP03Bu7w2uSUVvBy+ONMv9yQQriunRQ0P5dGmNkNH00rKzFho7a0KhIy1VH9YCB3vIYX6RZyF4VbPynaxVeeXtf++074uMmWIXtC+7u0+wW1fnOgxQ+BGuF57eyIf8T12KTY9aKYgG2RL7RwuZG+oZnsGQBCim5rGIuLL+w0mAf9RZW6a2OaYVtsLvIbDDs5o4SMjOq+mH0OQs/pOWq7IAhn07dHCezGmWfb9lpx+RB6txrZNRi2eOyCCssw3kgLpQqb1oeRkz5+EYWAD65hYkVSV4xKcb2t2 cYU/RZlx iiaiWwBOwc6x/Qa5HhC+QMs7b3ik21/ajRpUSx6bSh+TNeEfEqWYMsZYmBqzlP73bNdDo4AlDHHOBQtdOR95jvhUjOW6IZgQnbSM4B5FXmKZoCfoktZyZvEMvKfPfMT1bHB/KbaXfMQKAS/123TRxsHt+k3yZIhbiVySch5cAih5IYdsbpMzWlwvJFtvEyQXKcSvLTt5+O/pyjnSQxyR2cvIVwTUkYU/Fbw/9CTD9ZVrr6bznDqGVjY1n24LZgGYweygcDeWG2hbIwCPYutBJ4gSAyH/1ggqYKX66XDfvBzpM4DX2+0DobZGTcT/3eW/EWcwoTvJBLaiqT7hD2VwDCpB5e79BaXrh9DKmSpGcfu67/Ep4uf4fzUBa5wGTRr3ZDmKYna0zYHx0SqrCA3UHiHjMTLYJEPNGXp3J5OmcVsp2Ic2b8DprrN1LFHv0OamB5UAzZZqJpcM0TGBEbYJ8VoUTO9Wx1Jg84Q6DtF8VpaGk+o59robSVige/BOA26TegzUWYkFiHkOn0G8i0AddSQfmbKl4rgnnE4fN/JwIKVVaQKEJQi5ccafdBh08U8ZptZxrIyaA7ts3Weu7pD3gP9c3Tg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001160, 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 772dd0342727 ("mm: enumerate all gfp flags") define gfp flags with the help of BIT, while gfp_types.h doesn't include header file for the definition. This through an error on building memblock tests. Let's include linux/bits.h to fix it. Signed-off-by: Wei Yang CC: Suren Baghdasaryan CC: Michal Hocko --- include/linux/gfp_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h index 868c8fb1bbc1..13becafe41df 100644 --- a/include/linux/gfp_types.h +++ b/include/linux/gfp_types.h @@ -2,6 +2,8 @@ #ifndef __LINUX_GFP_TYPES_H #define __LINUX_GFP_TYPES_H +#include + /* The typedef is in types.h but we want the documentation here */ #if 0 /**