From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755045AbbB0Ugl (ORCPT ); Fri, 27 Feb 2015 15:36:41 -0500 Received: from mga01.intel.com ([192.55.52.88]:12401 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753016AbbB0Ugk (ORCPT ); Fri, 27 Feb 2015 15:36:40 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,662,1418112000"; d="scan'208";a="691796568" Message-ID: <1425069373.9530.155.camel@schen9-desk2.jf.intel.com> Subject: [PATCH] smp: Remove CSD_FLAG_WAIT flag that's unused From: Tim Chen To: Peter Zijlstra , Andrew Morton Cc: Ingo Molnar , Andi Kleen , "H. Peter Anvin" , Thomas Gleixner , "Srivatsa S.Bhat" , linux-kernel@vger.kernel.org Date: Fri, 27 Feb 2015 12:36:13 -0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CSD_FLAG_WAIT is not serving any useful purpose as we do not use its value to decide if we are going to wait for a smp call to complete. We also never cleared it properly when we are done waiting to indicate that the wait is over. So the WARNING debug check in csd_unlock is also not serving useful purpose. Propose here to remove it to clean up the code. Thanks. Tim Signed-off-by: Tim Chen --- kernel/smp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index f38a1e6..b65420d 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -19,7 +19,6 @@ enum { CSD_FLAG_LOCK = 0x01, - CSD_FLAG_WAIT = 0x02, }; struct call_function_data { @@ -126,7 +125,7 @@ static void csd_lock(struct call_single_data *csd) static void csd_unlock(struct call_single_data *csd) { - WARN_ON((csd->flags & CSD_FLAG_WAIT) && !(csd->flags & CSD_FLAG_LOCK)); + WARN_ON(!(csd->flags & CSD_FLAG_LOCK)); /* * ensure we're all done before releasing data: @@ -173,9 +172,6 @@ static int generic_exec_single(int cpu, struct call_single_data *csd, csd->func = func; csd->info = info; - if (wait) - csd->flags |= CSD_FLAG_WAIT; - /* * The list addition should be visible before sending the IPI * handler locks the list to pull the entry off it because of -- 1.9.3