From patchwork Mon Aug 12 00:59:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 13759956 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 008FBC52D7F for ; Mon, 12 Aug 2024 01:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=l0EaYGpYBenPXDKsozAtEBG6XpHeGjLsLTMkK9CHP2Q=; b=Qc6wuO92XnnSAt KQvaDl6GbarZL3Ygu3B9xGtwQ5HJdF1X1vpK2szn3n+2W0Yc3ux42aQE0I59EqWmfiSIJVmnvdhDV CNVCoWbUlyeAhdnhQMe0ljo7VoqEgh6oy49gUr7gMOkKKwH6jABtbnPVtm50JDIMOs1KwAPhWdtrq +zh7up44PQCPU+aEVrb4S93aaeH8rTTbDmL1UY4malecoSfrukRr5zXl03+gy800PWWCEAshYYSL8 h6BtNPb0W9KQpK6u9CMimza40nCV2vKvV+vGnrDS8qiMXXgmEgyB82V5sAKsDDCfC1UwHTEIDMl3m TNSP3skNImaNjkvV6quQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJRR-0000000Gagc-3kPy; Mon, 12 Aug 2024 01:01:45 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJPl-0000000GZvh-10Z7 for linux-riscv@lists.infradead.org; Mon, 12 Aug 2024 01:00:02 +0000 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-70942ebcc29so2689470a34.0 for ; Sun, 11 Aug 2024 18:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1723424400; x=1724029200; darn=lists.infradead.org; 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=kH+4pIB9prP9kOEprexbBfphBFyJQXg0yq2xsmagq1s=; b=fsHg+BNGa4pU0EbwsuGDK9Dbd7Jx+VUmA6ZothC+3Ns3J5+fyjlsqN4N/KlGcUP1im NLKwLTaihUthRFk8rdYUuzguMJSfQxDKU4MQOWWX2UQNUZSwghBG7khNXD8RXNnPkstt rqzrLyRgvUkw2dr12YLe/S5ZOAXMPcSdVl05+R+vtGgsaB7KGPd2s2ZLir4IEPpVhdbu Z+q177XahcMYUV2SFYFfwi8O+9otEEQKHrXdsQNjDBlvkYKizw4E00wEJdPzMwsgxosm qqgB2VQ4EDa6scjfjez1bvq/I5fx9aq/W+gAPjq8RvQLjHuxysJ6/045Q7ec5gqDt47/ aAYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723424400; x=1724029200; 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=kH+4pIB9prP9kOEprexbBfphBFyJQXg0yq2xsmagq1s=; b=siB3SGP1EKdbLhwE0kdvFcO2ZXtWOPG4lcbg3Z8T+VRL5XoFIQZoymGqzi9H7scqNg YToggrKL/gukvk6nTHWRejn7NxBxlXieyoM17vlnYuNaTBJ1Rj8VOmNMJnTGkQJNHlJQ ZD1WH07nn6tNeE0VPq9IAy9If8nS3sESbCqH/h7IVGqDzHdlzxCjiEheVir3hAk9EyZ2 bF6i+hdJzLxle6z3AZNLuNzMlZmp8CSDoAl2QHltMcOvSCTSmZYIbJ7SoJz2UQzILq4X +ghfRzeVFCMTPDPCl1/Z//zGkABdaUb/0o44W6FBlOmCdkoM2F4++ENj0ka8QqvWnyZu CssQ== X-Forwarded-Encrypted: i=1; AJvYcCVlEAiYsThgyPvs08adNMHgGdHd18qMfvPZGu+8mHLxkhzyA/ylO4cAYSvvuR2SM40CQZvajoU2tipUbxY4Zx+r59jnakL9Gm73miLk4F2i X-Gm-Message-State: AOJu0YxaoocbbmHCikoeBJk/tfS/RmtbkHgODIy8PtzzuggVUeGAq3hd cB+RyOCNEVlcbmQDcEPN8IVmNFb8Wo26Pn82w2/+qqQarfgLEl1JT6n9eiLcVfE= X-Google-Smtp-Source: AGHT+IHrAlknP9L5C6h6kRrSytyVyD8ukh4CBeZCWs5vO7PGS1mxPUN26YUu6El93VBg0yE0hzkTrQ== X-Received: by 2002:a05:6830:6c0f:b0:708:8c07:c646 with SMTP id 46e09a7af769-70b748745c5mr11624369a34.33.1723424400027; Sun, 11 Aug 2024 18:00:00 -0700 (PDT) Received: from sunil-pc.tail07344b.ts.net ([106.51.198.16]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c3dbe8cbdcsm3074062a12.61.2024.08.11.17.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 17:59:59 -0700 (PDT) From: Sunil V L To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH v8 03/17] ACPI: bus: Add acpi_riscv_init() function Date: Mon, 12 Aug 2024 06:29:15 +0530 Message-ID: <20240812005929.113499-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812005929.113499-1-sunilvl@ventanamicro.com> References: <20240812005929.113499-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240811_180001_316799_47428D16 X-CRM114-Status: GOOD ( 15.81 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Haibo Xu , "Rafael J . Wysocki" , Anup Patel , Atish Kumar Patra , Robert Moore , Samuel Holland , Conor Dooley , Palmer Dabbelt , Drew Fustini , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Paul Walmsley , Bjorn Helgaas , Thomas Gleixner , Andrew Jones , Will Deacon , Len Brown Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add a new function for RISC-V to do architecture specific initialization similar to acpi_arm_init(). Some of the ACPI tables are architecture specific and there is no reason trying to find them on other architectures. So, add acpi_riscv_init() similar to acpi_arm_init(). Signed-off-by: Sunil V L Tested-by: Björn Töpel --- drivers/acpi/bus.c | 1 + drivers/acpi/riscv/Makefile | 2 +- drivers/acpi/riscv/init.c | 11 +++++++++++ include/linux/acpi.h | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 drivers/acpi/riscv/init.c diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 284bc2e03580..48d277657203 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1459,6 +1459,7 @@ static int __init acpi_init(void) acpi_hest_init(); acpi_ghes_init(); acpi_arm_init(); + acpi_riscv_init(); acpi_scan_init(); acpi_ec_init(); acpi_debugfs_init(); diff --git a/drivers/acpi/riscv/Makefile b/drivers/acpi/riscv/Makefile index 86b0925f612d..877de00d1b50 100644 --- a/drivers/acpi/riscv/Makefile +++ b/drivers/acpi/riscv/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-y += rhct.o +obj-y += rhct.o init.o obj-$(CONFIG_ACPI_PROCESSOR_IDLE) += cpuidle.o obj-$(CONFIG_ACPI_CPPC_LIB) += cppc.o diff --git a/drivers/acpi/riscv/init.c b/drivers/acpi/riscv/init.c new file mode 100644 index 000000000000..a875a76aa44c --- /dev/null +++ b/drivers/acpi/riscv/init.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023-2024, Ventana Micro Systems Inc + * Author: Sunil V L + */ + +#include + +void __init acpi_riscv_init(void) +{ +} diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 3fff86f95c2f..892025d873f0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1531,6 +1531,12 @@ void acpi_arm_init(void); static inline void acpi_arm_init(void) { } #endif +#ifdef CONFIG_RISCV +void acpi_riscv_init(void); +#else +static inline void acpi_riscv_init(void) { } +#endif + #ifdef CONFIG_ACPI_PCC void acpi_init_pcc(void); #else