Message ID | 20230130182225.2471414-13-sunilvl@ventanamicro.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2331382wrn; Mon, 30 Jan 2023 10:27:28 -0800 (PST) X-Google-Smtp-Source: AK7set/UCXDSdAAxUaa2+qeOurNuNNjjR8zPz/ZCBbhZd37K1lVimvEk9W3AngIwqVo8RffhMr5x X-Received: by 2002:a17:907:20b9:b0:887:9007:bdcf with SMTP id pw25-20020a17090720b900b008879007bdcfmr5454362ejb.41.1675103247870; Mon, 30 Jan 2023 10:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675103247; cv=none; d=google.com; s=arc-20160816; b=NPkyPp2N9D+Y4qoVCaj+44iaMzhO3SZ/yRKU3WZio0avulhMBFoYZN4VnSquQMOikj qk9Srl86jNQ5xK1eSN2f2gFQqd8GprjosDiofeSaut7rxuw2U3uPRNj+m4s2qZJqhWaz Q1H3B+t3FQ3mK+Nos8M8ZRsdXTUoTchTfB+7dFxBVr9p+V3oKYOY4/uoF42SQuhZkGDX qG9CT8Kx/0RBiWUxn/ZI2+GvPdQ2uayClHU4woIEamAEBF4rtILawgITB2OhUlf+rfHG Vn+z1qNkf7Lbkp0zF3VgfEt9G3I5Basur0M0Uy/Q5w2d+kyeYzGepeY3ETDgvpGGRO2o rKxw== 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=2V4bEO8aGCUnvICkvYFTtflr32JlbC6lkp0g+wowtbM=; b=Tx1BH+YoBPjB+UvvpJ+iB8pKOiWVWq3upeP1CtFpaPf7ESW4uHrgsB+yo/O6mQHRs2 6ylA2jQjZu9yn45cHQXms5+KRs43MzEon/4gLVQkao/DdZFUpvumFx4B7Tb5ZmvxSBTo C3Crr/aktzM6X3wM+2l0/dTDtkhEzmQ3mpT/Yum4ZkcDaXKmqE2vMGnu22QeoYPDk9OU G0FHhYcvN/EVOtkWfkfacxIWhk1ihl9BeT3hptZIiim1JDaHgkBMyajvWrYC055k2r8R 1uMaoarwfNxVeUqTJB0auZ2sb6ORgAbFdCJI9bzjePYOZi+73SFvbzs9vSAg2YWYweCP +Udw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=lk2FS4bi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id uj5-20020a170907c98500b0087bd62a6318si9230063ejc.439.2023.01.30.10.27.05; Mon, 30 Jan 2023 10:27:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=lk2FS4bi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237759AbjA3SZN (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Mon, 30 Jan 2023 13:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235633AbjA3SYA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Jan 2023 13:24:00 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE91445BF8 for <linux-kernel@vger.kernel.org>; Mon, 30 Jan 2023 10:23:29 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id c10-20020a17090a1d0a00b0022e63a94799so1469835pjd.2 for <linux-kernel@vger.kernel.org>; Mon, 30 Jan 2023 10:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; 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=2V4bEO8aGCUnvICkvYFTtflr32JlbC6lkp0g+wowtbM=; b=lk2FS4bi5tXkC1KwlB7IR9frYJNCQB46zRuLBebN5lBJ8cN3scRheCqCzNq02LquDZ T7s0yo1+o/et+QSWknYJCYgYVrAhIpx0Q9RFeIJULyKKzgmtGBS8BkeM/vl6wKvrBMjp mUvQzp6EXvFNRLO9+5Kiu1elg30zaPMBmDpWZO2NqlSDLjfGA8M/9cZI0DQaxiOgClDj 0kOWsS7nvZZg3rIfS/7ZgCLiyEXy42cw6D20wqCpo9xvkn4YN9s2Y8p41QXLbbX33pYG yt0yEkzirf4so3ujS3owGMIcP4HQ2+eRccoCcxPRQaOr8cvUU/UP8Tzs1QvpGKrSAhji ekYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2V4bEO8aGCUnvICkvYFTtflr32JlbC6lkp0g+wowtbM=; b=hLcMwO1k3/5kJn+d6f9XY3tfD6OCJ0nY2UdbA+9ajH7wGryRC4Tp0DEB0v9KnoOzTT ppV41DGg52EUC2TGj25UZKhbx/sGRLTTTD+SbE/9Cq4Odv8yMamS0M9W08ciPtmf1+ST f+/IOgf7Md0I7WLKU6mtl+o7o/1ClgMHeLHVF5lIIW5MbYATfuuTk29+izm3BeCkiLtk KtHPT+i4MCgdCqo7Fm0jY+cJeFU9I4SzboXUY2LVXF6W9zQPsWWqOk9LYaYAD4ZF+XDJ AHSnpa4fJ7jteU3m92uPlTr6jdp/TVyAU7D9+Fgb0h8ExBze6mwB+7B6XxluCTAYAU8m XCLA== X-Gm-Message-State: AO0yUKWzzfZVCNrWLSbLITIYUw0SCI8rxf1B5gz8yLGSz3oyaozaxurp gJkwCk/pmMYW3ABob/40WW4J5g== X-Received: by 2002:a05:6a20:8e19:b0:bc:db54:27d7 with SMTP id y25-20020a056a208e1900b000bcdb5427d7mr5597928pzj.59.1675103009111; Mon, 30 Jan 2023 10:23:29 -0800 (PST) Received: from kerodipc.Dlink ([49.206.9.96]) by smtp.gmail.com with ESMTPSA id j193-20020a638bca000000b00478162d9923sm7000291pge.13.2023.01.30.10.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 10:23:28 -0800 (PST) From: Sunil V L <sunilvl@ventanamicro.com> To: Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Jonathan Corbet <corbet@lwn.net> Cc: linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Anup Patel <apatel@ventanamicro.com>, Andrew Jones <ajones@ventanamicro.com>, Atish Patra <atishp@rivosinc.com>, Sunil V L <sunilvl@ventanamicro.com> Subject: [PATCH 12/24] RISC-V: ACPI: smpboot: Create wrapper smp_setup() Date: Mon, 30 Jan 2023 23:52:13 +0530 Message-Id: <20230130182225.2471414-13-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20230130182225.2471414-1-sunilvl@ventanamicro.com> References: <20230130182225.2471414-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 autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756473062962697273?= X-GMAIL-MSGID: =?utf-8?q?1756473062962697273?= |
Series |
Add basic ACPI support for RISC-V
|
|
Commit Message
Sunil V L
Jan. 30, 2023, 6:22 p.m. UTC
smp_setup() currently assumes DT based platforms. To enable ACPI,
first make this as a wrapper function and move existing code to
a separate DT specific function.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
arch/riscv/kernel/smpboot.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Comments
On Mon, Jan 30, 2023 at 11:52:13PM +0530, Sunil V L wrote: > Subject: RISC-V: ACPI: smpboot: Create wrapper smp_setup() As I pointed out the other day, this one of the patches that really doesn't warrant an ACPI: prefix. With that fixed: Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor. > smp_setup() currently assumes DT based platforms. To enable ACPI, > first make this as a wrapper function and move existing code to > a separate DT specific function. > > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> > --- > 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 00b53913d4c6..26214ddefaa4 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.38.0 >
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 00b53913d4c6..26214ddefaa4 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)