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: 13759950 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 5F993C52D7C for ; Mon, 12 Aug 2024 01:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kH+4pIB9prP9kOEprexbBfphBFyJQXg0yq2xsmagq1s=; b=BWz/HVy8HYhaOXELJcS6DV2uub Fmmqu3YrSNVTTIj8JBFnU1dHSMO3JsBrV/7HtZV5d2E5tDRUhGPujiv2MhqDH6R9zVup5WPKLRx03 xC+udDGn91VqbtVzX0Y7LJHPTgdzScodsFB1j7w9LBHAsX9j3c6ntk9yqCFxG1lZR8wPPQNuyg0F7 FxG9YIC7l41/RRBLBQQ3KCdLzs3ksUQwS0NcKDzq8M0w2UlTlCA5mPvOPbMUBey/DX9ZI330P4+Dk BH0YHok3NapE/p1HZbanMswqAk23ji0f589w9+mmAbAVpF/3gmesm2BUiSnbdMD6pnspIBBMuU9M0 ymbaDlOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJS2-0000000Gawx-0hmp; Mon, 12 Aug 2024 01:02:22 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJPl-0000000GZve-116H for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 01:00:03 +0000 Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-70942ebcc29so2689468a34.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=Y0WJu9FPQ8klL9uW/Gwg/n4qNQcxuRnVsxehRYf0Gh5mMJSUqACHjUs1+vujYqPn2i Mt4t3AFQd9Zg/FKmpErRtoc96m3aBbNR0uOmBNsRgD6RGYXpOfJ5eFsGVGSYZM3Cc2AS JaQvQODsv9rpLIXhVLg+jKwABJzwjeaSrL9jiJR/ONx5VjhVVydXMlZfAgQWNYJYOQe2 lsp1G53Sn9r//uopJTnyg1sGbblMSA5lnOIPI/layuH0got3n6AjS6U76r32sl1Tpznc hE9t/L1CiEfPe3sTz/JajpBMR/O5s+ofZVRu+/IzOla2pF59B7Vy5VY626qf4aaypsMv jI8w== X-Forwarded-Encrypted: i=1; AJvYcCUGHgJ7zPWNao/v70Zxs8/srDQBDjPi1tLlxtYCkJTGyXGh+rxVu1eGBzCd96CFLQJBY8wsJPvz8pXHQMR0LCohiH2cFzkIMNpcd6lJs5eeHjbj3lg= X-Gm-Message-State: AOJu0YwdYT1oahyFAHqzfk0yOasxxJhTYToMVFMaZxG7tFbE87p5aG4p b39v+9yjxr8VcLW89Nf7nFZp4Mqln4gdw+T/2BWkfZ+8WXPDAQ1LveycM706W7o= 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 Cc: Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Robert Moore , Conor Dooley , Haibo Xu , Andrew Jones , Atish Kumar Patra , Drew Fustini , Sunil V L , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= 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_329565_D6E06654 X-CRM114-Status: GOOD ( 17.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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