Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1174466rdb; Wed, 24 Jan 2024 07:06:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5qo/JDrYZ5IztEygzEydLACICw4NnYhiFZPowySZUy2bPJxKqnL6IJyHvj1oQgfxL1VG3 X-Received: by 2002:a05:6a20:1588:b0:19c:6e1b:9781 with SMTP id h8-20020a056a20158800b0019c6e1b9781mr563034pzj.39.1706108794643; Wed, 24 Jan 2024 07:06:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706108794; cv=pass; d=google.com; s=arc-20160816; b=wEGWe1HV/VyUslsrPcKzS1ePI1AvL7NTeFjAFkccKmISgmBv5r0nv4zaDRR8+2EIok ze0+tuuiFx+OAFZX961u5MJOeh8JCcc1WmwRCWvQd9CjqdLLlPb8RZkysWrsRYtKX4S8 oct8/WNVCTJ9fyKMQ2w7znPLKMGFWdPckEh/QcyZhNWgR62pjblOCalN7Pr7T+19Exou +FE5+VaBFsTgOPYxb3wPuEdqgtmEGd39GGc5lcB+qEtbvy9z67j2cwkL5kqJY0od0d1w r16j3Bnkl56OKzKdflX6Q13RO6XwGkke6Y6jdwBGSbzu9J1sg9LDhIcf0XIQRnM9cM20 cB2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=EcCDn9p6624hUGtKn7vzLlpwjj7rK9jJdRM6h2sH1F4=; fh=LkfBra3th0TNG5AZXofmwKMHQEK1EdepIyBjOeCb7ks=; b=u5Lr9Y/wD4vBUrb2kC9r19doJ7QiDlWy4SZoexRTxz7CSMGBK6yZcaaYpyA0SYQRtz WFn6rHvo0rWVC5x1Mh1kzoaNaWjO3bJlp8Yx8fWs3707rocdnBTkFA/ob461uIP+PKVs IvBfaDcPiQDZ3YE7nf+dXb1tLZ/sc/meMB+JH1xgHWagF5C30ZMrF7rlQpUVeLtSJbHu YtdX2Sh57Am25UDf3xc/Yy9B+aUsf+c7l++RbkwASk8SAtDDuC4mQ+FjluBLXRtNYDTS V2X+NJhleWDfBRNbekTLCgMLaxkbQiE6cadGRaFv2YMabC/5+5NAabtxlaZZKdGAGg2l WibA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-37109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w37-20020a631625000000b005cd811e2ffesi11961566pgl.18.2024.01.24.07.06.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 07:06:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-37109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C4298B2A8B7 for ; Wed, 24 Jan 2024 14:26:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B05D37C09C; Wed, 24 Jan 2024 14:26:31 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F05667A717; Wed, 24 Jan 2024 14:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706106391; cv=none; b=c0AjvIXvUjfRfeLX2qAhdfOdRpCzAg3QvNWMUCH8oxQYnlt0Q5S0Df8mL+uUfKTBOoWlzQP5rXn+BMtd4ri208xJv9edCoJlvzXpCYGYifKRpAwih//ZKZ/FQNuuApzdZktGDbscf66T7cUoFIXV9wUJxmK0moT4FmewVju2EFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706106391; c=relaxed/simple; bh=XxIR8G6KchKU6wk5xqbi4STGiKxsOiyyqLu0eG/Irxw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NWGEFXmag6aWv5xYPNgqHNULwSIxdHUNEwW7oVk7ciuX19Zk/1FxASI8x85iKEhHlAcJa1hcZD8d/vKEyEA5fT/fzujSItpBb4jAS2VG7KaMPOgZX5ND7NOiDN3jnrB82fxKKbXk2xZnMRK8avjBuCTybB+ONSS96Mm1+yeCjtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4TKmSz02qNzsWJK; Wed, 24 Jan 2024 22:25:23 +0800 (CST) Received: from dggpeml500021.china.huawei.com (unknown [7.185.36.21]) by mail.maildlp.com (Postfix) with ESMTPS id 1284F14011A; Wed, 24 Jan 2024 22:26:26 +0800 (CST) Received: from huawei.com (10.175.127.227) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Jan 2024 22:26:25 +0800 From: Baokun Li To: CC: , , , , , , , , , , , , , kernel test robot Subject: [PATCH v2 3/3] asm-generic: remove extra type checking in acquire/release for non-SMP case Date: Wed, 24 Jan 2024 22:28:57 +0800 Message-ID: <20240124142857.4146716-4-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240124142857.4146716-1-libaokun1@huawei.com> References: <20240124142857.4146716-1-libaokun1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500021.china.huawei.com (7.185.36.21) If CONFIG_SMP is not enabled, the smp_load_acquire/smp_store_release is implemented as READ_ONCE/READ_ONCE and barrier() and type checking. READ_ONCE/READ_ONCE already checks the pointer type, and then checks it more stringently outside, but the non-SMP case simply isn't relevant, so remove the extra compiletime_assert_atomic_type() to avoid compilation errors. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401230837.TXro0PHi-lkp@intel.com/ Suggested-by: Linus Torvalds Signed-off-by: Baokun Li --- include/asm-generic/barrier.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h index 961f4d88f9ef..0c0695763bea 100644 --- a/include/asm-generic/barrier.h +++ b/include/asm-generic/barrier.h @@ -193,7 +193,6 @@ do { \ #ifndef smp_store_release #define smp_store_release(p, v) \ do { \ - compiletime_assert_atomic_type(*p); \ barrier(); \ WRITE_ONCE(*p, v); \ } while (0) @@ -203,7 +202,6 @@ do { \ #define smp_load_acquire(p) \ ({ \ __unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*p); \ - compiletime_assert_atomic_type(*p); \ barrier(); \ (typeof(*p))___p1; \ }) -- 2.31.1