Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4240201rwr; Mon, 8 May 2023 05:11:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VQ4HjE98YRqjYopTrqfcJVtzE+vfTmmqeSVbNCcKfCfq+hJsBcbljpcm0zjsfwxH8ObhU X-Received: by 2002:a17:90a:fd8c:b0:250:3ba9:ebde with SMTP id cx12-20020a17090afd8c00b002503ba9ebdemr9527164pjb.45.1683547909785; Mon, 08 May 2023 05:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683547909; cv=none; d=google.com; s=arc-20160816; b=DZtGqwd7Pz2wxwxFLxKYPXHU3C4mnaCMR7YCJa+qTgmBPA8gQb1+2OVVAsgrVLL4d1 TDuyls0T/6LWRLpaY1og7YAHcmo5sI2p+c53tW7Y1ExNKlZwClPcgUmTdHAQszpHl+09 sXk4fV461OVUgg2h8llyMammYO4sE0z/Zrj4UfdLE2TK3uu90yB8TFY96crIyvf54MQJ I+FNAhdHEiT/1o/hyDPkBaUdZgth4nCwBOCGbNX9s2gzdv6VEm8tZqSzFBYcuTx6aCcM wVPvWTYTnraGqwou0JXw7WFdKeC4R/wNTUiykfcqNKeisVgm9qsnFr+4CJO/q8447s1v HkGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yNB5noEZPasx/OngqcP7wy15OXtx85aYSDWecQ1qX3I=; b=BWVeA0CNFtAQLbvCR2lx8SXN0I+8lvUtKlxvk8yd5R33tvVaGCG++SkfBSVtxSnBLe K7lBCZz2bbh51PAwUKvvEMsw42nDjMRb1GQfXbiRy2jKRHTylObQh93rXjz5kUL9ghtP 4t7LN2YgOox1u0JPS8KLgdmyJ83iAatn0ETeW5mc1LcwcmKecMolg/t8F56uplKIGHjY wGKfW13/WbBuGHFZyOOoakrL98CBEOUFIvP1p3fw0AHKI79qzKbVAeFJm3rJYre3enG4 E3MtF8CZkxEjnVmPqt/AOmjs5IwPS9uQqRhMXlHiNyUmlH3cgZ1hEwVYqd1u+Z40YktM FnJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=bdUOpEXd; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs129-20020a632887000000b005074cff89b9si8448055pgb.250.2023.05.08.05.11.23; Mon, 08 May 2023 05:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=bdUOpEXd; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235033AbjEHL4D (ORCPT + 99 others); Mon, 8 May 2023 07:56:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236529AbjEHLzF (ORCPT ); Mon, 8 May 2023 07:55:05 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7928741555 for ; Mon, 8 May 2023 04:54:19 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1aaf21bb427so31037355ad.1 for ; Mon, 08 May 2023 04:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1683546858; x=1686138858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yNB5noEZPasx/OngqcP7wy15OXtx85aYSDWecQ1qX3I=; b=bdUOpEXd7GBDCNnXUsvG3ckYwryUiZjYQOSav9QR4GUG/8ayaYYTDJbjXmtRT0zXHg +eV9YbxhRW91B0jQB9sWuZdtdciKI6upjJ8I4udwA4rx3uxaZH3/cHQQIYX/BwmUfzpq NsqTsFR3sE7Sw5k7La5uhu2K1GfIJvVKlyUsE9CInG6jxddpYqF2680jb/sf33vgVttu fcjUSpTZANBOqnqT1fW/y+mY7OP8uyDjndoX8ITOfZTo5j6GWdLzl5yLKDZo9yepSUTZ j7MCN0w4HtF1A7pQPYPkQoqB1NHg8jHylF85r+oebUh2luVMl3g79mLXG0a54WpOSPgX TqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683546858; x=1686138858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yNB5noEZPasx/OngqcP7wy15OXtx85aYSDWecQ1qX3I=; b=T42o5OvV9Ec4FA3meRdJfYrp9oMgvupw2FkTiBIvJ6oIDpE58wRD4hvsRqNv0g1ZCu vRRfTapa7FYXBb42ja8reQMiOXREJ0cLCq6+NpFCwRmlKZZ4HilG6+6u/DgL2c+yeu6H sBoZ7sFqHMByqxylIm4N2pDun7igu5ZlqGl5ZPhz/VuyYUzUTfPhg4OO6cSTDdPlj7Q1 auJ6DslYs0DhK8gbK237vv/AMCESRsz/UaOfTHivqBCHP5lpmPA9WVmGcCz7ZP04R1LC GXJWxeHtvymlayCgVdWak8b8//eX2eCQNaTSoqvw8GHa9RgbvdzWMARRz6wvE9fesQJf 0lyQ== X-Gm-Message-State: AC+VfDzlQj1r+3+Z2OGUc3p/x752H3GpzpjzKL8KWxfopjCQQEmOHvNp V2zMWf1FxeSvXF/1KgNZEMIFRQ== X-Received: by 2002:a17:902:c40b:b0:1aa:fd48:f5e2 with SMTP id k11-20020a170902c40b00b001aafd48f5e2mr13594721plk.32.1683546858666; Mon, 08 May 2023 04:54:18 -0700 (PDT) Received: from sunil-laptop.. ([106.51.189.144]) by smtp.gmail.com with ESMTPSA id w9-20020a170902904900b001aaed524541sm7015149plz.227.2023.05.08.04.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 04:54:18 -0700 (PDT) From: Sunil V L To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Daniel Lezcano , Thomas Gleixner , Weili Qian , Zhou Wang , Herbert Xu , "David S . Miller" , Marc Zyngier , Maximilian Luz , Hans de Goede , Mark Gross , Nathan Chancellor , Nick Desaulniers , Tom Rix , Sunil V L , "Rafael J . Wysocki" , Conor Dooley , Andrew Jones , Palmer Dabbelt Subject: [PATCH V5 10/21] RISC-V: smpboot: Create wrapper setup_smp() Date: Mon, 8 May 2023 17:22:26 +0530 Message-Id: <20230508115237.216337-11-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230508115237.216337-1-sunilvl@ventanamicro.com> References: <20230508115237.216337-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org setup_smp() currently assumes DT-based platforms. To enable ACPI, first make this a wrapper function and move existing code to a separate DT-specific function. Signed-off-by: Sunil V L Acked-by: Rafael J. Wysocki Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Palmer Dabbelt --- arch/riscv/kernel/smpboot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 445a4efee267..a2e66126b733 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -70,7 +70,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) } } -void __init setup_smp(void) +static void __init of_parse_and_init_cpus(void) { struct device_node *dn; unsigned long hart; @@ -116,6 +116,11 @@ void __init setup_smp(void) } } +void __init setup_smp(void) +{ + of_parse_and_init_cpus(); +} + static int start_secondary_cpu(int cpu, struct task_struct *tidle) { if (cpu_ops[cpu]->cpu_start) -- 2.34.1