From patchwork Mon Jun 3 01:57:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenbaodong X-Patchwork-Id: 10972121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B81E1398 for ; Mon, 3 Jun 2019 01:59:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B3892880C for ; Mon, 3 Jun 2019 01:59:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F5A028885; Mon, 3 Jun 2019 01:59:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7A0C2880C for ; Mon, 3 Jun 2019 01:58:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXcDx-0002Q7-Ur; Mon, 03 Jun 2019 01:57:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXcDx-0002Q1-3i for xen-devel@lists.xenproject.org; Mon, 03 Jun 2019 01:57:21 +0000 X-Inumbo-ID: e8205d4a-85a2-11e9-8f22-5ffccb4f699b Received: from mxnavi-mail.mxnavi.com (unknown [116.90.87.199]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e8205d4a-85a2-11e9-8f22-5ffccb4f699b; Mon, 03 Jun 2019 01:57:15 +0000 (UTC) Received: from localhost.localdomain (61.161.186.150) by mxnavi-mail.mxnavi.com (116.90.87.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Mon, 3 Jun 2019 09:55:01 +0800 From: Baodong Chen To: Date: Mon, 3 Jun 2019 09:57:04 +0800 Message-ID: <1559527024-7507-1-git-send-email-chenbaodong@mxnavi.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [61.161.186.150] X-ClientProxiedBy: mxnavi-mail.mxnavi.com (116.90.87.199) To mxnavi-mail.mxnavi.com (116.90.87.199) Subject: [Xen-devel] [PATCH RESEND] xen: cpu: change 'cpu_hotplug_[begin|done]' to inline function X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Baodong Chen Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Baodong Chen Acked-by: Jan Beulich --- xen/common/cpu.c | 10 ---------- xen/include/xen/cpu.h | 10 ++++++++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/xen/common/cpu.c b/xen/common/cpu.c index f388d89..a526b55 100644 --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -51,16 +51,6 @@ void put_cpu_maps(void) spin_unlock_recursive(&cpu_add_remove_lock); } -bool_t cpu_hotplug_begin(void) -{ - return get_cpu_maps(); -} - -void cpu_hotplug_done(void) -{ - put_cpu_maps(); -} - static NOTIFIER_HEAD(cpu_chain); void __init register_cpu_notifier(struct notifier_block *nb) diff --git a/xen/include/xen/cpu.h b/xen/include/xen/cpu.h index 4638c50..568d483 100644 --- a/xen/include/xen/cpu.h +++ b/xen/include/xen/cpu.h @@ -10,8 +10,14 @@ bool_t get_cpu_maps(void); void put_cpu_maps(void); /* Safely perform CPU hotplug and update cpu_online_map, etc. */ -bool_t cpu_hotplug_begin(void); -void cpu_hotplug_done(void); +static inline bool cpu_hotplug_begin(void) +{ + return get_cpu_maps(); +} +static inline void cpu_hotplug_done(void) +{ + put_cpu_maps(); +} /* Receive notification of CPU hotplug events. */ void register_cpu_notifier(struct notifier_block *nb);