Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp72876lqj; Sat, 1 Jun 2024 08:27:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4Y89KjVu3SIKMRaRo9BhC2sPYDhT2bIcSWPixMTZIre9V5K5+7Ypdc3oYPTvB7h21u/5OxMDgQYPscCFwsKMrJjEdvMGzvLqhOkbSvw== X-Google-Smtp-Source: AGHT+IGCSJTfXnOEq9YiUVN1TqqhRKwv2zC0bo5CQgTXk0c7RZDimyuVpkRMVoBKg+j030ntDdOG X-Received: by 2002:a17:906:3584:b0:a5a:8a63:9fee with SMTP id a640c23a62f3a-a681fc5c10fmr334532566b.3.1717255671028; Sat, 01 Jun 2024 08:27:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717255671; cv=pass; d=google.com; s=arc-20160816; b=dzYYFF7HwQohsZSppjhzQcdKCn7sThCfQ1notSP7lTRDgQwJIl0a6oBn25c3jYEs5d nsXHkanTn1HjAg1J/qv+zjvtm6MYyhNEikE65NcvzXsCVoq5oirmnaJ8MgGbYA19h3K7 DZ36cCjHYzy33QdJgrAOY5dKDCa/S3Ml59pRGmGTidMjx9H1i9G+SOF/8HUaS8kkpNq1 Xpf+0eUXy05xp3qc0PSic64AVnyB7PRMC41eJFBVCwljO9biYw7fE6dFM6q8g09CiGGt HxeOea7RBMl7sN9JmGXxj+m6bnFxfV+SoJXohD/jdCYdpfK1rq3vwBn/6IksIMgLznkX NlkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2XPxdT6K3q9avtvxcOF9k8RyQ+CxCpXPedgopG0VTh8=; fh=TnnzCZxnAQcP7ImPtd7cHPztpoZ8tlGPrVQWjXs0nCw=; b=Wv65aSaYkmfDhV9Rhpx2WpIJ9gCURNbHredWB9P+LM9wdRTvU8TVlHqRc7890vC9M8 PfYKcYyfiNU5Y9ZL2Cz7EhWFL+kqJj4l+doYBk1KAETOb9SLrDFJI+QEz3QR4TN64Ort ojFD1BMoZtbo9aHASwOVtyLUzdqc6+FodZpC8nwlZIRepSJewvJNabK82d/qb0tVv8bU tmS2aW7VxFIWZb0frHr1+0UfIWnf+cGDFwiArqsDiW5fT+QA+nQSHGAZcTpWjyIhlAu2 7PnK0NBd2Gn+YdPu765RNggV8OtfR6/hzXOVhQ3GqAkjnYvdDvtZiE9dJpBFKhHabMF1 xBIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=O7PYt8L0; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-197908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197908-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67ea8865ecsi205627766b.564.2024.06.01.08.27.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 08:27:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=O7PYt8L0; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-197908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197908-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 293791F2240F for ; Sat, 1 Jun 2024 15:05:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 785C6153503; Sat, 1 Jun 2024 15:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="O7PYt8L0" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 594AB15252E for ; Sat, 1 Jun 2024 15:04:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717254284; cv=none; b=Gy7LoY89RGR5NqZGw/ypCzItT7xNYDdG8vfugF62sLPGeWHs6wWPNFQLW6/W1N3HlT7W2fJUdhwbuWY/+6q+OTSknZbGq6zKDRwZLmLpbTHBJlARrB+dvbP89lvdX+mbtzfP8DRy75FIOf1BtWGpk9Zn8nthRL56qsVcPRdgwLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717254284; c=relaxed/simple; bh=E/skCHGNmdvJjDbFpcdffugM/MM2UFUg2zxVjQ3qBJA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nzw9anK3pmyPHPSxpdFJeAL51yw9vtK4p4U3416DEsdl5T7a62PtTuqMGXeD/d7F1smqDyEmfjqxFfm3G5iwrEe2Dwo6ODczxILuioc/PZeuP443sr6/KYn+tlE4z9fOUzv2AD31nQCk2cMHj1LLm4hKToapFPeOKh5DoedsxJ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=O7PYt8L0; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-652fd0bb5e6so2315495a12.0 for ; Sat, 01 Jun 2024 08:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717254283; x=1717859083; darn=vger.kernel.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=2XPxdT6K3q9avtvxcOF9k8RyQ+CxCpXPedgopG0VTh8=; b=O7PYt8L0hk/lo9IKdQq8YW8H+gDp6HttrRP4TbGvh0QAprsSNARoE5kcwKCsaUx9pO NXEpnxBLwR6uyuczUXojiQaLqxAIs84b/i0+u0WVQcC3OriNE1GtVfXWAOjv0dgqFFN6 VqlV1edEQZyK3rMPwfYi8iai/MnIzm6fETy9V1t1qm6w8oqzK1VZGRrDd+QwLOHowvIN 0nyRaDnPYUHRrjyw8wadICjCuxPoGZAks2kDpZVYi4Xvwf40iDbrBwlorsVsh2V8Dg12 Hn8MAbmoKmm8PzSttwMOYgmyqPQEwq6D1gYun85X67lPdOSUDB6WmF1xGJ2A1/x+kg20 Zo0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717254283; x=1717859083; 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=2XPxdT6K3q9avtvxcOF9k8RyQ+CxCpXPedgopG0VTh8=; b=i5jPSQ0Ax47YcIbbTF6DOkFo1WQu4ickfrDhxA42c4dqbJZex95NJgW92/d30vG7yc SHI/r0n01NNCU3IFbVgoIRoXpez99NNiYM10lA+yX3Uf+Aabz/sAOGaltrvVjHNWBIaQ VJB9sYDa0VCpYn1xSjEQ+PGfR0KVvvdTWZ0T8ULHIMXRQHvEfRjHO35djTKvJ1tH3Xgq PJACDq3QYDBpphaiZPKMPzRS5U39kaKtLPZLRDH96bbUxpyRPWkLZlAyi97Q3AMl1ZlB 5saKMO4dwYA2e/DgtKhB31lE+jhUGMzFHliBDlz4ESN4PS0S1XUBzJz2weA0Pq8uhqM2 nmiw== X-Forwarded-Encrypted: i=1; AJvYcCWPMQ+eA3Ic8PDfkihoNj+ePzCbQGWccqXvGgBM0DOkUq628DKar5qcJf9rtOQ58LAn7X5wsnHFdcT6WVovNZDjzqjtMyVUGVyCua80 X-Gm-Message-State: AOJu0YwyCZSD6cDHvrhbpOlwFloXvwgxSoXSWSP9UhVMiM2zxP37rdpQ htKp48lEVDI20pSdPNJW2EryL6h1OdiI4vQ597Hy0fQZftoCVVJiTQk+fw652FE= X-Received: by 2002:a05:6a20:3946:b0:1af:e3f1:9af7 with SMTP id adf61e73a8af0-1b26f204cfemr5557418637.36.1717254282646; Sat, 01 Jun 2024 08:04:42 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.237]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6c35a4ba741sm2559410a12.85.2024.06.01.08.04.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 08:04:42 -0700 (PDT) From: Sunil V L To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, acpica-devel@lists.linux.dev Cc: Catalin Marinas , 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 , Andrew Jones , Andy Shevchenko , Marc Zyngier , Atish Kumar Patra , Haibo1 Xu , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Sunil V L Subject: [PATCH v6 03/17] ACPI: bus: Add acpi_riscv_init function Date: Sat, 1 Jun 2024 20:33:57 +0530 Message-Id: <20240601150411.1929783-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240601150411.1929783-1-sunilvl@ventanamicro.com> References: <20240601150411.1929783-1-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Sunil V L --- drivers/acpi/bus.c | 1 + drivers/acpi/riscv/Makefile | 2 +- drivers/acpi/riscv/init.c | 12 ++++++++++++ include/linux/acpi.h | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 drivers/acpi/riscv/init.c diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 787eca838410..8d0710ade8c6 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1457,6 +1457,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..5f7571143245 --- /dev/null +++ b/drivers/acpi/riscv/init.c @@ -0,0 +1,12 @@ +// 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 ab3f2880d209..0c6d9539f737 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1520,6 +1520,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 -- 2.40.1