Message ID | 20240111093058.121838-2-sunilvl@ventanamicro.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-23317-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1329836dyi; Thu, 11 Jan 2024 01:33:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IEw7vkGFNBqBn4ZC/IE5mjg6ld22t11afeLyY9k7S4XIvgC6I4Myyd3ckiUZ8rZQS8vMQMp X-Received: by 2002:a05:6830:605:b0:6dd:e92a:a7a3 with SMTP id w5-20020a056830060500b006dde92aa7a3mr848105oti.77.1704965602695; Thu, 11 Jan 2024 01:33:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704965602; cv=none; d=google.com; s=arc-20160816; b=0G2eYyn/cE6DDObVXyTABTIgxPPLdgEC8gOOkJFKiZkmWCzGmOWU3Lp1mTiBQpR7z4 n1dd1+l9R6Sq1ARiZFSaUyP24PduvpkBlHnsfRVJB0dzWMQ0WcGkZC6rJkFyJjP7MM2f jj1zRbAkL/rKEIiX5+4DjLiNKyFTWBGzHLyTocIv+AFbQ95BsMtQpey9tRySG/1DBGF4 icb9UdQu0lhIHMdghjz5VrDaJCKn1f2v71H4/5PtgCRdKOtADwMDR/4FLxK2z6RX01+d 4XBzDrG4EdWrNO/MBiQZQ9YX7RSOO6fTpbIitFD7hE2rV38D5RvOXarFBtv7hckQ6vYN Q+uQ== ARC-Message-Signature: i=1; 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=3co2sOHjGX4HJhNcpLPUh7fyfRHhZQUX9e33G8U5XOw=; fh=Ht2C34ikojivmsjwXjSqFBDmzjHdD6yX68Xa6Pv6fTI=; b=BQNrDpWAyiC1h3n7G5swJ7tWfv6PQVgCoQBP1IP8CJrO7m8D9+rWx/kn9906joNaNI 4RAZoLqErGeOukb0Wn/Bxt5BxeQwSWxGR/MFuIC28KKvaQn73EtLewHoRxXKqJMfKUOG cUexMqwv0oqYpHXW79oeCh/Y+QCaDr1+DISgPImy1Zi5Zk41pA8RW6khNqZvR/xoZHWv n77FJB761v8/MHth5ieg8CSi9wmZIV2kfVuvOccC/DgOZ4KTei5XNAAxitTi7nlEwUQv P96a4YxRhzfyoTQnG0ypYdQ0Ujcsj92dIQz2RSqfZQNVoB0ZmQn2xBf4A3tAns15LzIA KJug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mFCO27Jq; spf=pass (google.com: domain of linux-kernel+bounces-23317-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23317-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bz16-20020a056a02061000b005cd89d9fb14si757666pgb.357.2024.01.11.01.33.22 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 01:33:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23317-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mFCO27Jq; spf=pass (google.com: domain of linux-kernel+bounces-23317-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23317-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9E7C8283093 for <ouuuleilei@gmail.com>; Thu, 11 Jan 2024 09:32:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5432114F6B; Thu, 11 Jan 2024 09:31:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="mFCO27Jq" Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 A463612E6C for <linux-kernel@vger.kernel.org>; Thu, 11 Jan 2024 09:31:12 +0000 (UTC) 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-pj1-f46.google.com with SMTP id 98e67ed59e1d1-28c0536806fso4510113a91.0 for <linux-kernel@vger.kernel.org>; Thu, 11 Jan 2024 01:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1704965472; x=1705570272; 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=3co2sOHjGX4HJhNcpLPUh7fyfRHhZQUX9e33G8U5XOw=; b=mFCO27JqMW7qG7prHgGKDSJD9JAD2BLjWZzyChAaf6BY1Lj1bQJos0Qpy9QB5cLeNb JlqKP6vT9s2mOqrpRQPf8NbXVWytgMF0HOPJM4/wE2jhkMLomMk3GFMUJVstgt4N4Wl3 rWdsFpt2lWlUrtkfMtAjEaA7EMiOC8H8JEQgK6JsSDbqu/ca2gHQtvGzA2vK0PSzmlFu g4TKrW7tuQrYG079Ws4GRzSFV5Z9bjAEmTwHLBDktK7PfGDVHRTN3USO4H0hac0/f/X0 /r8JAJJgWeNXiSZRLVcKjNiSnfL2eFg4CPrcCoxqNys0KLeTjmAuRsS3MFaohK7UsCrG aNHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704965472; x=1705570272; 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=3co2sOHjGX4HJhNcpLPUh7fyfRHhZQUX9e33G8U5XOw=; b=txg0MoOriRzRE9xHg02iJ1ZRYQ7AHRoi7JkylM2c9ibyVbhOnzbBXGA3mpg4WNcXeA klIPct4t4KqCxPYtuoqdJ9oJro+fKr04EBpt6zgFvGmDKwZXCkUtZIhmq0VQkPpWG8ef oipFtIXTY+GXAn0lnnK4VCooRN/lwEuhFhuXAx+T2qQjR4ZDcC413GWchBnbd0q4g1YV zlUBP+h6fhflocgyta8vWJUlPSqF4plu3mKytfevWaVSAQf05vdArBRXvV86gZg2xnit h0s0+AYglVqFF/FR/0nDXzMHTnc1eDvxjXebnQYV9A81vK9phne91O4rdC87Jm5p7NoW W5XA== X-Gm-Message-State: AOJu0Yy93F+FETiuj0aqU7T9A8sBI6J3cOrmH5F2WjXxE5SICM+uLQko g6Jpfa0EPNBV2EnplZb08Lovk9RuD0arLA== X-Received: by 2002:a17:90a:2e82:b0:28c:134d:fca1 with SMTP id r2-20020a17090a2e8200b0028c134dfca1mr786132pjd.16.1704965471988; Thu, 11 Jan 2024 01:31:11 -0800 (PST) Received: from sunil-laptop.. ([106.51.188.200]) by smtp.gmail.com with ESMTPSA id jd2-20020a170903260200b001d4a7cf0673sm730566plb.117.2024.01.11.01.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 01:31:11 -0800 (PST) From: Sunil V L <sunilvl@ventanamicro.com> To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-riscv@lists.infradead.org Cc: "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Anup Patel <anup@brainfault.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Conor Dooley <conor@kernel.org>, Andrew Jones <ajones@ventanamicro.com>, Atish Kumar Patra <atishp@rivosinc.com>, Sunil V L <sunilvl@ventanamicro.com> Subject: [PATCH -next 1/2] ACPI: Enable ACPI_PROCESSOR for RISC-V Date: Thu, 11 Jan 2024 15:00:57 +0530 Message-Id: <20240111093058.121838-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240111093058.121838-1-sunilvl@ventanamicro.com> References: <20240111093058.121838-1-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787786011792693138 X-GMAIL-MSGID: 1787786011792693138 |
Series |
RISC-V: ACPI: Add LPI support
|
|
Commit Message
Sunil V L
Jan. 11, 2024, 9:30 a.m. UTC
The ACPI processor driver is not currently enabled for RISC-V.
This is required to enable CPU related functionalities like
LPI and CPPC. Hence, enable ACPI_PROCESSOR for RISC-V.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
drivers/acpi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Jan 11, 2024 at 03:00:57PM +0530, Sunil V L wrote: > The ACPI processor driver is not currently enabled for RISC-V. > This is required to enable CPU related functionalities like > LPI and CPPC. Hence, enable ACPI_PROCESSOR for RISC-V. > > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> > --- > drivers/acpi/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index f819e760ff19..9a920752171c 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -282,7 +282,7 @@ config ACPI_CPPC_LIB > > config ACPI_PROCESSOR > tristate "Processor" > - depends on X86 || ARM64 || LOONGARCH > + depends on X86 || ARM64 || LOONGARCH || RISCV > select ACPI_PROCESSOR_IDLE > select ACPI_CPU_FREQ_PSS if X86 || LOONGARCH > select THERMAL > -- > 2.34.1 > Hi Sunil, Typically we'll want the Kconfig changes to come at the end of a series, or squashed into the patch that adds support for it, otherwise there's risk of build breakage during bisection. In this case, we're safe because the two new functions (I looked ahead) have __weak versions when they're not present. Also, interestingly, it looks like this ancient line obj-$(CONFIG_ACPI_PROCESSOR) += processor.o in drivers/acpi/Makefile should be removed, since there's no drivers/acpi/processor.c file. I guess the make process silently filters object files which don't have corresponding source files? Maybe we should write a Makefile analyzer to see what other lines can be removed... Anyway, for this patch, which I'd prefer to be swapped in order with the other patch, or just squashed into the other patch, Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Thanks, drew
On Thu, Jan 11, 2024 at 11:00:12AM +0100, Andrew Jones wrote: > On Thu, Jan 11, 2024 at 03:00:57PM +0530, Sunil V L wrote: > > The ACPI processor driver is not currently enabled for RISC-V. > > This is required to enable CPU related functionalities like > > LPI and CPPC. Hence, enable ACPI_PROCESSOR for RISC-V. > > > > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> > > --- > > drivers/acpi/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > > index f819e760ff19..9a920752171c 100644 > > --- a/drivers/acpi/Kconfig > > +++ b/drivers/acpi/Kconfig > > @@ -282,7 +282,7 @@ config ACPI_CPPC_LIB > > > > config ACPI_PROCESSOR > > tristate "Processor" > > - depends on X86 || ARM64 || LOONGARCH > > + depends on X86 || ARM64 || LOONGARCH || RISCV > > select ACPI_PROCESSOR_IDLE > > select ACPI_CPU_FREQ_PSS if X86 || LOONGARCH > > select THERMAL > > -- > > 2.34.1 > > > > Hi Sunil, > > Typically we'll want the Kconfig changes to come at the end of a series, > or squashed into the patch that adds support for it, otherwise there's > risk of build breakage during bisection. In this case, we're safe because > the two new functions (I looked ahead) have __weak versions when they're > not present. > Sure. Let me swap the order of the patches. > Also, interestingly, it looks like this ancient line > > obj-$(CONFIG_ACPI_PROCESSOR) += processor.o > > in drivers/acpi/Makefile should be removed, since there's no > drivers/acpi/processor.c file. I guess the make process silently > filters object files which don't have corresponding source files? > Maybe we should write a Makefile analyzer to see what other lines > can be removed... > Interesting. Hi Rafael, any thoughts? > Anyway, for this patch, which I'd prefer to be swapped in order with > the other patch, or just squashed into the other patch, > I prefer to keep as 2 separate patches. I will swap the order. > Reviewed-by: Andrew Jones <ajones@ventanamicro.com> > Thanks! Sunil
On Thu, Jan 11, 2024 at 11:00:12AM +0100, Andrew Jones wrote: [...] > Also, interestingly, it looks like this ancient line > > obj-$(CONFIG_ACPI_PROCESSOR) += processor.o > > in drivers/acpi/Makefile should be removed, No > since there's no drivers/acpi/processor.c file. Correct, but .. > I guess the make process silently filters object files which don't have > corresponding source files? May be, but I doubt if that is the case here. processor.o is just aggregation of all processor_*.o and this will be the processor.ko when built as a module. -- Regards, Sudeep
On Thu, Jan 11, 2024 at 12:16:06PM +0000, Sudeep Holla wrote: > On Thu, Jan 11, 2024 at 11:00:12AM +0100, Andrew Jones wrote: > > [...] > > > Also, interestingly, it looks like this ancient line > > > > obj-$(CONFIG_ACPI_PROCESSOR) += processor.o > > > > in drivers/acpi/Makefile should be removed, > > No > > > since there's no drivers/acpi/processor.c file. > > Correct, but .. > > > I guess the make process silently filters object files which don't have > > corresponding source files? > > May be, but I doubt if that is the case here. > > processor.o is just aggregation of all processor_*.o and this will be > the processor.ko when built as a module. Oh, I see. I had tried looking for a processor.o after building, to see if it was something like that, but it still didn't appear. It didn't occur to me to also try ACPI_PROCESSOR as a module. I'll go put my head in some sand now. Thanks, drew
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f819e760ff19..9a920752171c 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -282,7 +282,7 @@ config ACPI_CPPC_LIB config ACPI_PROCESSOR tristate "Processor" - depends on X86 || ARM64 || LOONGARCH + depends on X86 || ARM64 || LOONGARCH || RISCV select ACPI_PROCESSOR_IDLE select ACPI_CPU_FREQ_PSS if X86 || LOONGARCH select THERMAL