From patchwork Fri Dec 27 22:22:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13922158 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 C5E3DE7718B for ; Fri, 27 Dec 2024 22:22:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B33306B0085; Fri, 27 Dec 2024 17:22:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AE3966B0088; Fri, 27 Dec 2024 17:22:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AB036B0089; Fri, 27 Dec 2024 17:22:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7C7D46B0085 for ; Fri, 27 Dec 2024 17:22:27 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 035B114034A for ; Fri, 27 Dec 2024 22:22:26 +0000 (UTC) X-FDA: 82942163514.14.38802D6 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by imf07.hostedemail.com (Postfix) with ESMTP id 2EC5E4000C for ; Fri, 27 Dec 2024 22:21:09 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=d1Un2hZ4; spf=pass (imf07.hostedemail.com: domain of 3nyhvZwYKCO4ikhUdRWeeWbU.SecbYdkn-ccalQSa.ehW@flex--surenb.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3nyhvZwYKCO4ikhUdRWeeWbU.SecbYdkn-ccalQSa.ehW@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735338112; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=S3YIhx1kis3t5L00tJpzKJMiDn2NcWa5gcGaiY7KHn0=; b=598iF1ntxXmX3576PepAPUe+xgFyoXk1T07v9K1xp9eQinPudqZ19D5Oavl3IF3YnF81QP RNvl0HRYvpGZZvFxeMfdv1v+Nixw0temtMT61lsz4vScRFWzE010c+rR/Q6WwDutSSQIz2 tfkXIe8e/yK6x8aZh+4vEpjgMXpqpag= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=d1Un2hZ4; spf=pass (imf07.hostedemail.com: domain of 3nyhvZwYKCO4ikhUdRWeeWbU.SecbYdkn-ccalQSa.ehW@flex--surenb.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3nyhvZwYKCO4ikhUdRWeeWbU.SecbYdkn-ccalQSa.ehW@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735338112; a=rsa-sha256; cv=none; b=Ou66bARmz7m44EEsFxFghY9dBOYmTC2O06N3tEi2etBafcLn0c8Ko3dQTOnMqga1B51Tkv lUo7zwiuMSy1MvdtODqKi0b7xDqXOojidgnFUt5jpDZqJLfailGXVKVuMVJi8dBDp74Dzs yibZPUCroOBPlJXClM4gYsBQq0QLsHg= Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2ef8c7ef51dso9512629a91.1 for ; Fri, 27 Dec 2024 14:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1735338144; x=1735942944; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=S3YIhx1kis3t5L00tJpzKJMiDn2NcWa5gcGaiY7KHn0=; b=d1Un2hZ4vUmpfep73D1WQlilgbIeAGN+DG9Otnpk//meUub1kAb3+Ae205yv1J6tBc RooHkRI/RTAfUe5RDt0+ZAeN9xnae7PzdrWIvmBjJWs4SuJCR1xRq1oqFifdPprjNapD owp6Ad5hGHHSbeH+fnJ8bbIU5HCaqAz43m2YUFVBDRqcWlyBhTDcHtY1Nk5yBBC9eLvG DbYnK9ygjsRWBWE50y2mWkw5AprS1AgrGy0HbyKrB7JFnV2lcda9oboO7klc5lrqmzMQ u9InxsGkBT34BKZmSQ1EyL5GPAiQ5QUngtCQ1nlYjAkRdi6MOgQ/gE5abHlnOUcUZ42p WlIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735338144; x=1735942944; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=S3YIhx1kis3t5L00tJpzKJMiDn2NcWa5gcGaiY7KHn0=; b=iZv1s62dE2rqzsZSH63KxRvhFTOr0MjUHGhf5oM8iSWed0SMiOFGOTRUoz5vLqm8HL Wf4P5fI70pqM+zQjMdf6hNbvf3LNWuYOTRezPbVtpM0vKVyjuZWcfYcbEiLJXMj6/xo5 HruuWwSqFz4NOAxhfctPCY5Q9IPqhSeJ0fW0uvTw9mNI5TdnHjbs+BfWaWSup7FFW3jK 8Qxx8neHnFF75xUif/pvf0+ftnVZ/6Nl1cLfCpR6hPwyZgIXOLwGqTti2gm3/OwJq+UL NHJMWVd3g1mgcgHQw3sJmqUNH8z65ZXcwQKu/JTbzrGZwTrHK/NkU/bLgbByg9ZX/4st Ul9Q== X-Forwarded-Encrypted: i=1; AJvYcCW3z+2P0zXE2A/flncm5g9mB/O1S3Vem6JLcROQIt1cew8/tolMCQHoqumHs7PnhZMk1jBrD3+8NQ==@kvack.org X-Gm-Message-State: AOJu0Yw2K5uGmksl19YVfHm5yb4qDpe/UOH6g9/3zBNkaji30cNdf7UW LURjCVVRbXVxvU8vjQ53m56I8iCi8r/Mapc7FNq4IJxDiRj8FIklW44UAtMSIGZEmlzyidp9/7J 3EQ== X-Google-Smtp-Source: AGHT+IG8FfIpKjagm1KOnTOA+o2Rfqw8ZqOAcZ8ufVkpQsvDM7z8NwLcXVPzUoRPXoopIKuCEHNMnz7wt6s= X-Received: from pjbqd4.prod.google.com ([2002:a17:90b:3cc4:b0:2ef:8f54:4254]) (user=surenb job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3a43:b0:2ee:94a0:255c with SMTP id 98e67ed59e1d1-2f4536d25fcmr43028889a91.13.1735338143914; Fri, 27 Dec 2024 14:22:23 -0800 (PST) Date: Fri, 27 Dec 2024 14:22:20 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <20241227222220.1726384-1-surenb@google.com> Subject: [PATCH 1/1] tools: fix atomic_set() definition to set the value correctly From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: liam.howlett@oracle.com, lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, surenb@google.com X-Rspamd-Queue-Id: 2EC5E4000C X-Rspamd-Server: rspam12 X-Stat-Signature: djh39ebzux4sepnjbgddctfmfy7p5byi X-Rspam-User: X-HE-Tag: 1735338069-336638 X-HE-Meta: U2FsdGVkX1/iVUiQXLg/kHF85y4Wyw4xJ2yThF7Kg7zhQip38DadzvouqGhc7Q/jlESLEocj/GeI1LbwdZ8kAqhUIwh+vBe2/zPhOtPa9BiGEch/G9+nWUTcddcYGPAD2do0wXTafwzYoHr1bhxuC3mcql5WZwQJYQ2zcd3MAdTRuf5DoxRxsaWD/xJBeGht51Dkkat9sNhoAegWun6XaqtmdO0vWUQEirtsStIxEtnBj/cp/SyG54RupQn4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ETZBhPBM3xIQTnwBEOG8GmiHWE41wJjKb0zjOmIGK5EY/i8p/zM7AsudQGHbZW1w+T+NvouD73wbd1e5uyPn4/hJb9J/xUL62RND0eOax5DJPziTklzVLRl8eLmHGB1KPlglnH8mtC3TVqGkcL0oMhvP1z+tCeJM9G+Mo+2AVPhtuXaJHwdIgocEbIGvDkvsn+4MTkGas4jUDWzozIwM9cPTnObdt6+Zke4qyuSVK0DwxLaa7YhJlWzJxzTzj3COO3jnnA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001258, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Currently vma test is failing because of the new vma_assert_attached() assertion. The check is failing because previous refcount_set() inside vma_mark_attached() is a NoOp. Fix the definition of atomic_set() to correctly set the value of the atomic. Fixes: 9325b8b5a1cb ("tools: add skeleton code for userland testing of VMA logic") Signed-off-by: Suren Baghdasaryan --- Applies over mm-unstable tools/testing/shared/linux/maple_tree.h | 2 +- tools/testing/vma/linux/atomic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/shared/linux/maple_tree.h b/tools/testing/shared/linux/maple_tree.h index 06c89bdcc515..f67d47d32857 100644 --- a/tools/testing/shared/linux/maple_tree.h +++ b/tools/testing/shared/linux/maple_tree.h @@ -2,6 +2,6 @@ #define atomic_t int32_t #define atomic_inc(x) uatomic_inc(x) #define atomic_read(x) uatomic_read(x) -#define atomic_set(x, y) do {} while (0) +#define atomic_set(x, y) uatomic_set(x, y) #define U8_MAX UCHAR_MAX #include "../../../../include/linux/maple_tree.h" diff --git a/tools/testing/vma/linux/atomic.h b/tools/testing/vma/linux/atomic.h index 2e2021553196..788c597c4fde 100644 --- a/tools/testing/vma/linux/atomic.h +++ b/tools/testing/vma/linux/atomic.h @@ -6,7 +6,7 @@ #define atomic_t int32_t #define atomic_inc(x) uatomic_inc(x) #define atomic_read(x) uatomic_read(x) -#define atomic_set(x, y) do {} while (0) +#define atomic_set(x, y) uatomic_set(x, y) #define U8_MAX UCHAR_MAX #ifndef atomic_cmpxchg_relaxed