From patchwork Fri Jun 28 11:13:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongfeng Wang X-Patchwork-Id: 11021983 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 D0765924 for ; Fri, 28 Jun 2019 11:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C02F32834A for ; Fri, 28 Jun 2019 11:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B49B52873C; Fri, 28 Jun 2019 11:16:10 +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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C3502834A for ; Fri, 28 Jun 2019 11:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PCIItv0OVohBF2l8CrekYuSUBXRtChfP4xZaBEs2hew=; b=IrLSAR/t+a1sTi 8POvOfS+ouBfzlzuVANJfz1l+/BUNS2RevU4UkEIicbFEDBmYxmVS18e1ZpEKjOKPKkhIBfjbD7ul JZxhOtmdWXS/bENYp0oQ2EgEy9icfNBwzD56i79DAt8uDkho1stpZ7KldyEFzaUotUloGW/U/7MyA y8v03STkyLBHyIZm/xj2k9Njcq51M6w4acxXpULED3M9IqEZEPja7NU0I+5lIxOkbvOh+3BMyKwxV ZOgn6Y/38ZZoeFjcoSyXywjugPxtpdEllp8kQ2R0Jesr/oYJAO0iVmZzHsN+Oc72Qma6Gx/HGaY8K O4aFrRA8zDcrHrtQZQpw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgorR-0007XO-TI; Fri, 28 Jun 2019 11:16:09 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgorN-0007Un-Ow for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2019 11:16:07 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 061F98E3C0FF2DE709F3; Fri, 28 Jun 2019 19:15:56 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Fri, 28 Jun 2019 19:15:49 +0800 From: Xiongfeng Wang To: , , Subject: [PATCH RFC 0/3] Support CPU hotplug for ARM64 Date: Fri, 28 Jun 2019 19:13:09 +0800 Message-ID: <1561720392-45907-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190628_041606_040860_94957B39 X-CRM114-Status: UNSURE ( 6.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xiexiuqi@huawei.com, jonathan.cameron@huawei.com, john.garry@huawei.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, huawei.libin@huawei.com, guohanjun@huawei.com, wangxiongfeng2@huawei.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset mark all the GICC node in MADT as possible CPUs even though it is disabled. But only those enabled GICC node are marked as present CPUs. So that kernel will initialize some CPU related data structure in advance before the CPU is actually hot added into the system. This patchset also implement 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are needed to enable CPU hotplug. To support CPU hotplug, we need to add all the possible GICC node in MADT including those CPUs that are not present but may be hot added later. Those CPUs are marked as disabled in GICC nodes. Xiongfeng Wang (3): ACPI / scan: evaluate _STA for processors declared via ASL Device statement arm64: mark all the GICC nodes in MADT as possible cpu arm64: Add CPU hotplug support arch/arm64/kernel/acpi.c | 22 ++++++++++++++++++++++ arch/arm64/kernel/setup.c | 19 ++++++++++++++++++- arch/arm64/kernel/smp.c | 11 +++++------ drivers/acpi/scan.c | 12 ++++++++++++ 4 files changed, 57 insertions(+), 7 deletions(-)