From patchwork Wed Mar 29 15:51:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668497 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CB21C77B76 for ; Wed, 29 Mar 2023 15:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbjC2PxS (ORCPT ); Wed, 29 Mar 2023 11:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbjC2Pw4 (ORCPT ); Wed, 29 Mar 2023 11:52:56 -0400 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DB00526F; Wed, 29 Mar 2023 08:52:50 -0700 (PDT) Received: by mail-oi1-f175.google.com with SMTP id bm2so11933321oib.4; Wed, 29 Mar 2023 08:52:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105169; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UL9zh/S00J+cmPfrAtv4vflOTxQVISfijtGfdl2R3L0=; b=2GqYyDasVdp/d4qbKmAOFqsFPZSzX5fckvQYEsoNS98Mgb3oc8V2Z0uwhphSSzdisi CG7L20Wh2/vqvvRSk6KqHfh6cMXBr+CKhQvW1NEEFtuadvCdtGTWF3wBoFADNzdnw4fV 5sjZDwAmrJOwj3MjGIJ5WH1ACBZ0HP7XisLzfh+aHyjee1j01PWn/+CbU1ezatMt9qZM NLZtDhbiXoix9K5VTMiIkuCw8HX9V42RQ6Jos1D5MCDYoNOyS2fNk0WMgfoTucaFgYK5 1q+1q7r71yJmu2k6CTKRDCESzsERW/NboaSjuoInZtF5+ftUTKyLRjc3OLqiJAXUQOkx sUEQ== X-Gm-Message-State: AAQBX9espMAlD35h2SCtd8sHALKdMISL4xOmKdCDX4Ig+9BSogrzZV0P arZ0IAK+Yvvf7olqNRx/Gw== X-Google-Smtp-Source: AKy350YWPg6naXojJ+dh5QDGD5h6eaepx41Bc/m1xdmR3LQVsEP9dglulW7uPvOZ4q19z4rMeJNnvA== X-Received: by 2002:a05:6808:4da:b0:386:9883:ca9d with SMTP id a26-20020a05680804da00b003869883ca9dmr1291968oie.2.1680105169571; Wed, 29 Mar 2023 08:52:49 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id v184-20020acadec1000000b003871471f894sm10161090oig.27.2023.03.29.08.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:52:49 -0700 (PDT) Received: (nullmailer pid 3198065 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:51:59 -0500 Subject: [PATCH 02/19] of: Move of_device_(add|register|unregister) to of_platform.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-2-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org As of_device_(add|register|unregister) functions work on struct platform_device, they should be declared in of_platform.h instead. This move is transparent for now as both headers include each other. Signed-off-by: Rob Herring --- include/linux/of_device.h | 4 ---- include/linux/of_platform.h | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/of_device.h b/include/linux/of_device.h index f4b57614979d..e4aa61cb2bd0 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -26,10 +26,6 @@ static inline int of_driver_match_device(struct device *dev, return of_match_device(drv->of_match_table, dev) != NULL; } -extern int of_device_add(struct platform_device *pdev); -extern int of_device_register(struct platform_device *ofdev); -extern void of_device_unregister(struct platform_device *ofdev); - extern const void *of_device_get_match_data(const struct device *dev); extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len); diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index d15b6cd5e1c3..8ac5cb933dc3 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -52,6 +52,11 @@ extern const struct of_device_id of_default_bus_match_table[]; extern struct platform_device *of_device_alloc(struct device_node *np, const char *bus_id, struct device *parent); + +extern int of_device_add(struct platform_device *pdev); +extern int of_device_register(struct platform_device *ofdev); +extern void of_device_unregister(struct platform_device *ofdev); + #ifdef CONFIG_OF extern struct platform_device *of_find_device_by_node(struct device_node *np); #else From patchwork Wed Mar 29 15:52:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668493 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9440C77B72 for ; Wed, 29 Mar 2023 15:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230424AbjC2Pxt (ORCPT ); Wed, 29 Mar 2023 11:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbjC2PxS (ORCPT ); Wed, 29 Mar 2023 11:53:18 -0400 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325791FD3; Wed, 29 Mar 2023 08:53:17 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id cm7-20020a056830650700b006a11f365d13so7134427otb.0; Wed, 29 Mar 2023 08:53:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105196; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tWmtLeCB2PTcAHpGNr0ZZYDBf99xMHUdOSjMIZXheFk=; b=gT+gIRABipFTEumNuWr5OL4/LCOnJwyueWpyK6R4odBzFtJLcFWfuB3HLqw4JPYcfb Ehucm1O/0IUGKFHv8c0l8s3s9eU2ee2s4igCVbjadowvVW6nbl6NJcCHJkg8MplO8Eh3 anfkbGqG5CXPo3dv3cV5wT9e99eelVaodzOOU3dsHjvbjYMGGsdVK5mW8SPjbU03wDfU y8XGfyUu1FF+ChZEXzBo0TOUqahIcplqC5srwW8PSNdRnmOYOW25UT1zDh/7MCVzISVq s8BDVXAbCaaK7cEmWV7D3q4msqEWxoRaSGjf/vsRUElHzm+1pBML8c0shEI19K6yMYnl 6Eiw== X-Gm-Message-State: AO0yUKV2NI1lPw0Wrsju9M7Zvo/8ZtfH98jRbPf93rmLFEdoTNxcwron BMn2QThOjvoYArCE4zKMuQ== X-Google-Smtp-Source: AKy350by63hvThVx+G6CTPOFFLOe4lmhMruBxp6akfw7h8ZCmJHsyJFTMVn+Dn/8by4Bc4xtRU8hFQ== X-Received: by 2002:a05:6830:1695:b0:694:3972:dbae with SMTP id k21-20020a056830169500b006943972dbaemr9305044otr.2.1680105196435; Wed, 29 Mar 2023 08:53:16 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id q4-20020a9d4b04000000b0069f509ad088sm5047619otf.65.2023.03.29.08.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:16 -0700 (PDT) Received: (nullmailer pid 3198067 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:00 -0500 Subject: [PATCH 03/19] of: Move of_device_get_match_data() declaration MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-3-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org of_device.h mostly defines functions for bus drivers whereas of_device_get_match_data() is used by drivers. Let's move it to of.h. Signed-off-by: Rob Herring --- include/linux/of.h | 2 ++ include/linux/of_device.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 36cf94596eba..b7118d68c73a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -416,6 +416,8 @@ extern int of_detach_node(struct device_node *); #define of_match_ptr(_ptr) (_ptr) +extern const void *of_device_get_match_data(const struct device *dev); + /* * struct property *prop; * const __be32 *p; diff --git a/include/linux/of_device.h b/include/linux/of_device.h index e4aa61cb2bd0..6af4c3acd502 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -26,8 +26,6 @@ static inline int of_driver_match_device(struct device *dev, return of_match_device(drv->of_match_table, dev) != NULL; } -extern const void *of_device_get_match_data(const struct device *dev); - extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len); extern int of_device_request_module(struct device *dev); From patchwork Wed Mar 29 15:52:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668490 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9864C77B70 for ; Wed, 29 Mar 2023 15:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231378AbjC2Px4 (ORCPT ); Wed, 29 Mar 2023 11:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbjC2Pxc (ORCPT ); Wed, 29 Mar 2023 11:53:32 -0400 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A48010F0; Wed, 29 Mar 2023 08:53:30 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id f17so11896705oiw.10; Wed, 29 Mar 2023 08:53:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105210; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k/jkzEqUMbBSjs4kiPLKjfNJkvrHk6Wvng20abXkerU=; b=tUJq2+Alhn+7qjRe9IAk4aMyRRKiOLe4PWj3snvPWWZ+i3uVNOOmtWcL/e8bDUp4P4 GLcl5SuQnfBcc7tNn6aMgQQcnT7XwvTISzPKvcsxg5uQ8AXdiuiVqYVEhiNL+OkIb7xx JLnN5BAsu67DQ/HMvtxYmHnSAME27bXv3RdRQEWOlV0dtKVA26s6agEunl1DxBN3BmpI IO4l4OaQr9BDBm9e7OX5tLI29KnRBh1phVQE0PtKFr58zlMnRmt+ImuD0wxwRea/7BzB 1SzAKhlmlPv6nbhOklMvQjWf3zX11ODv8Rk7uyyY7bmlQiofN0qhNFM51241niPk7YgC oLhw== X-Gm-Message-State: AO0yUKVqMKmT0iE6p7nPqAyV3ybUsPFTPHmSvVpeHEEQLtdVy38IlHlN Y12bOX0rmDCQvV+YLqFWMw== X-Google-Smtp-Source: AK7set/MTp3w22+pQb2OMPwzzF/wsNsFes87Jt9z1LBQnRiVFzJLKTuWRe65EFeSlZ8Hu0XY5YYhjg== X-Received: by 2002:a54:4f03:0:b0:386:ef98:e5d5 with SMTP id e3-20020a544f03000000b00386ef98e5d5mr8728584oiy.24.1680105209619; Wed, 29 Mar 2023 08:53:29 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id 7-20020aca0907000000b00386b8b1448dsm9015456oij.34.2023.03.29.08.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:29 -0700 (PDT) Received: (nullmailer pid 3198069 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:01 -0500 Subject: [PATCH 04/19] of: Move CPU node related functions to their own file MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-4-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org drivers/of/base.c is quite long and we've accumulated a number of CPU node functions. Let's move them to a new file, cpu.c, along with the lone of_cpu_device_node_get() in of_device.h. Moving the declaration has no effect yet as of.h is included by of_device.h. This serves as preparation to disentangle the includes in of_device.h and of_platform.h. Signed-off-by: Rob Herring --- drivers/of/Makefile | 2 +- drivers/of/base.c | 187 ----------------------------------------- drivers/of/cpu.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/of.h | 19 +++-- include/linux/of_device.h | 14 ---- 5 files changed, 223 insertions(+), 209 deletions(-) diff --git a/drivers/of/Makefile b/drivers/of/Makefile index e0360a44306e..10f704592561 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y = base.o device.o platform.o property.o +obj-y = base.o cpu.o device.o platform.o property.o obj-$(CONFIG_OF_KOBJ) += kobj.o obj-$(CONFIG_OF_DYNAMIC) += dynamic.o obj-$(CONFIG_OF_FLATTREE) += fdt.o diff --git a/drivers/of/base.c b/drivers/of/base.c index ac6fde53342f..7f1720af813c 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -286,193 +286,6 @@ const void *of_get_property(const struct device_node *np, const char *name, } EXPORT_SYMBOL(of_get_property); -/** - * of_get_cpu_hwid - Get the hardware ID from a CPU device node - * - * @cpun: CPU number(logical index) for which device node is required - * @thread: The local thread number to get the hardware ID for. - * - * Return: The hardware ID for the CPU node or ~0ULL if not found. - */ -u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread) -{ - const __be32 *cell; - int ac, len; - - ac = of_n_addr_cells(cpun); - cell = of_get_property(cpun, "reg", &len); - if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len)) - return ~0ULL; - - cell += ac * thread; - return of_read_number(cell, ac); -} - -/* - * arch_match_cpu_phys_id - Match the given logical CPU and physical id - * - * @cpu: logical cpu index of a core/thread - * @phys_id: physical identifier of a core/thread - * - * CPU logical to physical index mapping is architecture specific. - * However this __weak function provides a default match of physical - * id to logical cpu index. phys_id provided here is usually values read - * from the device tree which must match the hardware internal registers. - * - * Returns true if the physical identifier and the logical cpu index - * correspond to the same core/thread, false otherwise. - */ -bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id) -{ - return (u32)phys_id == cpu; -} - -/* - * Checks if the given "prop_name" property holds the physical id of the - * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not - * NULL, local thread number within the core is returned in it. - */ -static bool __of_find_n_match_cpu_property(struct device_node *cpun, - const char *prop_name, int cpu, unsigned int *thread) -{ - const __be32 *cell; - int ac, prop_len, tid; - u64 hwid; - - ac = of_n_addr_cells(cpun); - cell = of_get_property(cpun, prop_name, &prop_len); - if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0)) - return true; - if (!cell || !ac) - return false; - prop_len /= sizeof(*cell) * ac; - for (tid = 0; tid < prop_len; tid++) { - hwid = of_read_number(cell, ac); - if (arch_match_cpu_phys_id(cpu, hwid)) { - if (thread) - *thread = tid; - return true; - } - cell += ac; - } - return false; -} - -/* - * arch_find_n_match_cpu_physical_id - See if the given device node is - * for the cpu corresponding to logical cpu 'cpu'. Return true if so, - * else false. If 'thread' is non-NULL, the local thread number within the - * core is returned in it. - */ -bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun, - int cpu, unsigned int *thread) -{ - /* Check for non-standard "ibm,ppc-interrupt-server#s" property - * for thread ids on PowerPC. If it doesn't exist fallback to - * standard "reg" property. - */ - if (IS_ENABLED(CONFIG_PPC) && - __of_find_n_match_cpu_property(cpun, - "ibm,ppc-interrupt-server#s", - cpu, thread)) - return true; - - return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread); -} - -/** - * of_get_cpu_node - Get device node associated with the given logical CPU - * - * @cpu: CPU number(logical index) for which device node is required - * @thread: if not NULL, local thread number within the physical core is - * returned - * - * The main purpose of this function is to retrieve the device node for the - * given logical CPU index. It should be used to initialize the of_node in - * cpu device. Once of_node in cpu device is populated, all the further - * references can use that instead. - * - * CPU logical to physical index mapping is architecture specific and is built - * before booting secondary cores. This function uses arch_match_cpu_phys_id - * which can be overridden by architecture specific implementation. - * - * Return: A node pointer for the logical cpu with refcount incremented, use - * of_node_put() on it when done. Returns NULL if not found. - */ -struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) -{ - struct device_node *cpun; - - for_each_of_cpu_node(cpun) { - if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread)) - return cpun; - } - return NULL; -} -EXPORT_SYMBOL(of_get_cpu_node); - -/** - * of_cpu_node_to_id: Get the logical CPU number for a given device_node - * - * @cpu_node: Pointer to the device_node for CPU. - * - * Return: The logical CPU number of the given CPU device_node or -ENODEV if the - * CPU is not found. - */ -int of_cpu_node_to_id(struct device_node *cpu_node) -{ - int cpu; - bool found = false; - struct device_node *np; - - for_each_possible_cpu(cpu) { - np = of_cpu_device_node_get(cpu); - found = (cpu_node == np); - of_node_put(np); - if (found) - return cpu; - } - - return -ENODEV; -} -EXPORT_SYMBOL(of_cpu_node_to_id); - -/** - * of_get_cpu_state_node - Get CPU's idle state node at the given index - * - * @cpu_node: The device node for the CPU - * @index: The index in the list of the idle states - * - * Two generic methods can be used to describe a CPU's idle states, either via - * a flattened description through the "cpu-idle-states" binding or via the - * hierarchical layout, using the "power-domains" and the "domain-idle-states" - * bindings. This function check for both and returns the idle state node for - * the requested index. - * - * Return: An idle state node if found at @index. The refcount is incremented - * for it, so call of_node_put() on it when done. Returns NULL if not found. - */ -struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, - int index) -{ - struct of_phandle_args args; - int err; - - err = of_parse_phandle_with_args(cpu_node, "power-domains", - "#power-domain-cells", 0, &args); - if (!err) { - struct device_node *state_node = - of_parse_phandle(args.np, "domain-idle-states", index); - - of_node_put(args.np); - if (state_node) - return state_node; - } - - return of_parse_phandle(cpu_node, "cpu-idle-states", index); -} -EXPORT_SYMBOL(of_get_cpu_state_node); - /** * __of_device_is_compatible() - Check if the node matches given constraints * @device: pointer to node diff --git a/drivers/of/cpu.c b/drivers/of/cpu.c new file mode 100644 index 000000000000..d17b2f851082 --- /dev/null +++ b/drivers/of/cpu.c @@ -0,0 +1,210 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include +#include + +/** + * of_get_cpu_hwid - Get the hardware ID from a CPU device node + * + * @cpun: CPU number(logical index) for which device node is required + * @thread: The local thread number to get the hardware ID for. + * + * Return: The hardware ID for the CPU node or ~0ULL if not found. + */ +u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread) +{ + const __be32 *cell; + int ac, len; + + ac = of_n_addr_cells(cpun); + cell = of_get_property(cpun, "reg", &len); + if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len)) + return ~0ULL; + + cell += ac * thread; + return of_read_number(cell, ac); +} + +/* + * arch_match_cpu_phys_id - Match the given logical CPU and physical id + * + * @cpu: logical cpu index of a core/thread + * @phys_id: physical identifier of a core/thread + * + * CPU logical to physical index mapping is architecture specific. + * However this __weak function provides a default match of physical + * id to logical cpu index. phys_id provided here is usually values read + * from the device tree which must match the hardware internal registers. + * + * Returns true if the physical identifier and the logical cpu index + * correspond to the same core/thread, false otherwise. + */ +bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id) +{ + return (u32)phys_id == cpu; +} + +/* + * Checks if the given "prop_name" property holds the physical id of the + * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not + * NULL, local thread number within the core is returned in it. + */ +static bool __of_find_n_match_cpu_property(struct device_node *cpun, + const char *prop_name, int cpu, unsigned int *thread) +{ + const __be32 *cell; + int ac, prop_len, tid; + u64 hwid; + + ac = of_n_addr_cells(cpun); + cell = of_get_property(cpun, prop_name, &prop_len); + if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0)) + return true; + if (!cell || !ac) + return false; + prop_len /= sizeof(*cell) * ac; + for (tid = 0; tid < prop_len; tid++) { + hwid = of_read_number(cell, ac); + if (arch_match_cpu_phys_id(cpu, hwid)) { + if (thread) + *thread = tid; + return true; + } + cell += ac; + } + return false; +} + +/* + * arch_find_n_match_cpu_physical_id - See if the given device node is + * for the cpu corresponding to logical cpu 'cpu'. Return true if so, + * else false. If 'thread' is non-NULL, the local thread number within the + * core is returned in it. + */ +bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun, + int cpu, unsigned int *thread) +{ + /* Check for non-standard "ibm,ppc-interrupt-server#s" property + * for thread ids on PowerPC. If it doesn't exist fallback to + * standard "reg" property. + */ + if (IS_ENABLED(CONFIG_PPC) && + __of_find_n_match_cpu_property(cpun, + "ibm,ppc-interrupt-server#s", + cpu, thread)) + return true; + + return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread); +} + +/** + * of_get_cpu_node - Get device node associated with the given logical CPU + * + * @cpu: CPU number(logical index) for which device node is required + * @thread: if not NULL, local thread number within the physical core is + * returned + * + * The main purpose of this function is to retrieve the device node for the + * given logical CPU index. It should be used to initialize the of_node in + * cpu device. Once of_node in cpu device is populated, all the further + * references can use that instead. + * + * CPU logical to physical index mapping is architecture specific and is built + * before booting secondary cores. This function uses arch_match_cpu_phys_id + * which can be overridden by architecture specific implementation. + * + * Return: A node pointer for the logical cpu with refcount incremented, use + * of_node_put() on it when done. Returns NULL if not found. + */ +struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) +{ + struct device_node *cpun; + + for_each_of_cpu_node(cpun) { + if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread)) + return cpun; + } + return NULL; +} +EXPORT_SYMBOL(of_get_cpu_node); + +/** + * of_cpu_device_node_get: Get the CPU device_node for a given logical CPU number + * + * @cpu: The logical CPU number + * + * Return: Pointer to the device_node for CPU with its reference count + * incremented of the given logical CPU number or NULL if the CPU device_node + * is not found. + */ +struct device_node *of_cpu_device_node_get(int cpu) +{ + struct device *cpu_dev; + cpu_dev = get_cpu_device(cpu); + if (!cpu_dev) + return of_get_cpu_node(cpu, NULL); + return of_node_get(cpu_dev->of_node); +} +EXPORT_SYMBOL(of_cpu_device_node_get); + +/** + * of_cpu_node_to_id: Get the logical CPU number for a given device_node + * + * @cpu_node: Pointer to the device_node for CPU. + * + * Return: The logical CPU number of the given CPU device_node or -ENODEV if the + * CPU is not found. + */ +int of_cpu_node_to_id(struct device_node *cpu_node) +{ + int cpu; + bool found = false; + struct device_node *np; + + for_each_possible_cpu(cpu) { + np = of_cpu_device_node_get(cpu); + found = (cpu_node == np); + of_node_put(np); + if (found) + return cpu; + } + + return -ENODEV; +} +EXPORT_SYMBOL(of_cpu_node_to_id); + +/** + * of_get_cpu_state_node - Get CPU's idle state node at the given index + * + * @cpu_node: The device node for the CPU + * @index: The index in the list of the idle states + * + * Two generic methods can be used to describe a CPU's idle states, either via + * a flattened description through the "cpu-idle-states" binding or via the + * hierarchical layout, using the "power-domains" and the "domain-idle-states" + * bindings. This function check for both and returns the idle state node for + * the requested index. + * + * Return: An idle state node if found at @index. The refcount is incremented + * for it, so call of_node_put() on it when done. Returns NULL if not found. + */ +struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, + int index) +{ + struct of_phandle_args args; + int err; + + err = of_parse_phandle_with_args(cpu_node, "power-domains", + "#power-domain-cells", 0, &args); + if (!err) { + struct device_node *state_node = + of_parse_phandle(args.np, "domain-idle-states", index); + + of_node_put(args.np); + if (state_node) + return state_node; + } + + return of_parse_phandle(cpu_node, "cpu-idle-states", index); +} +EXPORT_SYMBOL(of_get_cpu_state_node); diff --git a/include/linux/of.h b/include/linux/of.h index b7118d68c73a..1f1e847a1c13 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -359,6 +359,8 @@ extern const void *of_get_property(const struct device_node *node, const char *name, int *lenp); extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); +extern struct device_node *of_cpu_device_node_get(int cpu); +extern int of_cpu_node_to_id(struct device_node *np); extern struct device_node *of_get_next_cpu_node(struct device_node *prev); extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, int index); @@ -439,8 +441,6 @@ const char *of_prop_next_string(struct property *prop, const char *cur); bool of_console_check(struct device_node *dn, char *name, int index); -extern int of_cpu_node_to_id(struct device_node *np); - int of_map_id(struct device_node *np, u32 id, const char *map_name, const char *map_mask_name, struct device_node **target, u32 *id_out); @@ -635,6 +635,16 @@ static inline struct device_node *of_get_cpu_node(int cpu, return NULL; } +static inline struct device_node *of_cpu_device_node_get(int cpu) +{ + return NULL; +} + +static inline int of_cpu_node_to_id(struct device_node *np) +{ + return -ENODEV; +} + static inline struct device_node *of_get_next_cpu_node(struct device_node *prev) { return NULL; @@ -837,11 +847,6 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag { } -static inline int of_cpu_node_to_id(struct device_node *np) -{ - return -ENODEV; -} - static inline int of_map_id(struct device_node *np, u32 id, const char *map_name, const char *map_mask_name, struct device_node **target, u32 *id_out) diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 6af4c3acd502..910951a22eb4 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -32,15 +32,6 @@ extern int of_device_request_module(struct device *dev); extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env); extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env); -static inline struct device_node *of_cpu_device_node_get(int cpu) -{ - struct device *cpu_dev; - cpu_dev = get_cpu_device(cpu); - if (!cpu_dev) - return of_get_cpu_node(cpu, NULL); - return of_node_get(cpu_dev->of_node); -} - int of_dma_configure_id(struct device *dev, struct device_node *np, bool force_dma, const u32 *id); @@ -89,11 +80,6 @@ static inline const struct of_device_id *of_match_device( return NULL; } -static inline struct device_node *of_cpu_device_node_get(int cpu) -{ - return NULL; -} - static inline int of_dma_configure_id(struct device *dev, struct device_node *np, bool force_dma, From patchwork Wed Mar 29 15:52:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668499 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18511C77B6F for ; Wed, 29 Mar 2023 15:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbjC2PxO (ORCPT ); Wed, 29 Mar 2023 11:53:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231159AbjC2PxK (ORCPT ); Wed, 29 Mar 2023 11:53:10 -0400 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DF774C13; Wed, 29 Mar 2023 08:52:59 -0700 (PDT) Received: by mail-oo1-f46.google.com with SMTP id o26-20020a4ad49a000000b0053964a84b0fso2496041oos.7; Wed, 29 Mar 2023 08:52:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105178; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xaKQY99G3HY+F9cltbrOFgoelmJMxNBfQJcO0sLBgas=; b=PKDFlgAjacJH7C1CRe1m0Q/BWtr57PTdq7iEGG8xwqMX68KjF8kKS/WJo4ITAT0hOU aGwliu2FVDDg+3QXHcI8zsZEt2GfM9lB1/QfOa0avByoJ3rv0CEDJqBMHfFfjBQQ2/Sh hBFtQjjAvbdmAfr3EULWxF910GnmrDUC8yZhBAonDGKKZRKxV5ypSfpG33RehXWDYgu4 VXGQttPWOAMFNIWxNfUqQnjPGF+axRf51orBaCy1BJV2UuoITU0e+Ul6/hLRrUw8ty0Z Q7y9uisGKVN+n/tzhhNEQ/hQ+sB1TAja2NEpU+FhhEDBKZ2/kTkSdSPWJXBKNzbkWFTW QMDQ== X-Gm-Message-State: AO0yUKWOBvSw1LJ23fQo/U8R814Yem1pVgc1zy/bri661zHx+46plfXX ti50etPI3Y+YteUOsnQipQ== X-Google-Smtp-Source: AK7set/NHlve/5dROzrE0RjwFIfWzeZwZim5jtRZxJnjvVhB2968rp1PLl6KK6w8FucuWDAPMr2x9Q== X-Received: by 2002:a4a:890d:0:b0:51a:6ea9:5053 with SMTP id f13-20020a4a890d000000b0051a6ea95053mr8240938ooi.9.1680105178376; Wed, 29 Mar 2023 08:52:58 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id c192-20020a4a4fc9000000b0053b88b03e24sm8091146oob.18.2023.03.29.08.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:52:58 -0700 (PDT) Received: (nullmailer pid 3198071 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:02 -0500 Subject: [PATCH 05/19] of: Drop unnecessary includes in headers MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-5-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Drop unnecessary includes in DT headers. Some simply aren't needed and some can be replaced with forward declarations. Signed-off-by: Rob Herring --- include/linux/of.h | 5 ++--- include/linux/of_device.h | 3 ++- include/linux/of_platform.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 1f1e847a1c13..96979c67c5fa 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -16,13 +16,10 @@ #include #include #include -#include -#include #include #include #include -#include typedef u32 phandle; typedef u32 ihandle; @@ -1517,6 +1514,8 @@ enum of_reconfig_change { OF_RECONFIG_CHANGE_REMOVE, }; +struct notifier_block; + #ifdef CONFIG_OF_DYNAMIC extern int of_reconfig_notifier_register(struct notifier_block *); extern int of_reconfig_notifier_unregister(struct notifier_block *); diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 910951a22eb4..5cdafe19dc80 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -7,9 +7,10 @@ #include /* temporary until merge */ #include -#include struct device; +struct of_device_id; +struct kobj_uevent_env; #ifdef CONFIG_OF extern const struct of_device_id *of_match_device( diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 8ac5cb933dc3..d8045bcfc35e 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -6,12 +6,13 @@ * */ -#include #include -#include #include #include +struct device; +struct of_device_id; + /** * struct of_dev_auxdata - lookup table entry for device names & platform_data * @compatible: compatible value of node to match against node From patchwork Wed Mar 29 15:52:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668494 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73F05C761AF for ; Wed, 29 Mar 2023 15:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbjC2Pxs (ORCPT ); Wed, 29 Mar 2023 11:53:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbjC2PxT (ORCPT ); Wed, 29 Mar 2023 11:53:19 -0400 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB83114; Wed, 29 Mar 2023 08:53:19 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id l39-20020a9d1b2a000000b006a121324abdso6856136otl.7; Wed, 29 Mar 2023 08:53:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105198; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=avhGoClAu60FK+4OH3axA1tPVPlExeBA2pd36OTtZtE=; b=4hmXUkZK1Jo0vkxbQBklysI/LPTAzAR1f9B0fsSTs0g2bQZxaYBRzNA0L5TeEKOuGk tbDegycH8Gc8qcmC7/RmHUxXuWOKlJOJk8VYV/mW0uEqocVoOPm1xS1Pxz+uU+xmsPuC lgz97t+ydmVhxI5SbAqrBylcu/hfzkX/kb3urG+/ixbG5qa8+ad+VEZ9BFI8aldcwwiZ DQ3clKfDXru2LymxqiC8zO+zQbQT4HSB8yiRtnH1R5GRyysb6KJ3k8U+C+igEEX+JyhL ePrLqehyUvCkutqZS0rW4WIjN/xERpD1YZDlq9KVzFO/VHYKR6X+ODu/OA3zOf/inYET 33/A== X-Gm-Message-State: AO0yUKWv8J8kCVln1j+fiYxMckcjr+1yTde2eB+xSeyDrbRDcwJgmfEh SdzuU+yxG9dfJbzsk82Jpg== X-Google-Smtp-Source: AK7set+ZOHjqyI4LzxgjdsE15Cx5pZk+wokjAG0VqGy5aA+Dncm2MiNsSACjR/bJ9bGa9YBaDIKZXg== X-Received: by 2002:a9d:67c6:0:b0:697:ef66:e7f4 with SMTP id c6-20020a9d67c6000000b00697ef66e7f4mr9233955otn.24.1680105198532; Wed, 29 Mar 2023 08:53:18 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s14-20020a9d758e000000b006a154373578sm2278866otk.39.2023.03.29.08.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:18 -0700 (PDT) Received: (nullmailer pid 3198079 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:06 -0500 Subject: [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-9-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Signed-off-by: Rob Herring Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- Please ack and I will take the series via the DT tree. --- arch/riscv/kernel/cacheinfo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 3a13113f1b29..e3829d2de5d9 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -5,7 +5,6 @@ #include #include -#include #include static struct riscv_cacheinfo_ops *rv_cache_ops; From patchwork Wed Mar 29 15:52:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668496 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD62AC7EE25 for ; Wed, 29 Mar 2023 15:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjC2PxX (ORCPT ); Wed, 29 Mar 2023 11:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbjC2PxO (ORCPT ); Wed, 29 Mar 2023 11:53:14 -0400 Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B5771FD8; Wed, 29 Mar 2023 08:53:10 -0700 (PDT) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-17997ccf711so16697497fac.0; Wed, 29 Mar 2023 08:53:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105190; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o+n6GH4Nk3FkonjtkMjc2Nc5AHFrGJ7ZcCh9y20RfPM=; b=t16RGkAGgM9KhBHOlaER2V+7DfsbXQipFXyB1gauZKY6Cwndf4VNz4qV75x3vnhXGH 4XtnhmSDGQBj6AGwoPAWN+UoDiSj0b71dJ0lRt4PB8Ri4hwa+g3R8iw+C2BMZKOhHBtT xFobQe+npj/NrXtPl2R+PKJ239ZAOjW2rZvKriB0vUJ/yTXpi6YAxYb3G1t5wyyb1wSf zwYUkGXklGpJDqmiYIJDADHEXldWskcmnnmGPb94NIGUMCqs3yHSRqhoyIpTwYkBwrqO FcUokPjo5jsuKxuPXxNTHtaY2Ad2Wndgi4wsiGADdAZbEqyXRTMqvH6ii+DawVq+nX2U 8VpQ== X-Gm-Message-State: AAQBX9fV6KjCDp6IC4I+CrDdx4KbKiSeeeSnn/YYLdaQrg6jlnyTQn48 8INlOsQAEq9tJUmmZwqlEg== X-Google-Smtp-Source: AK7set9TWw7WlWpaVRoaXna+i6jfLH3b5BBVKHUpgOSqr1CxQaOSf7zeRp9d9vawXGilKhjHZUk1VQ== X-Received: by 2002:a05:6870:a2d4:b0:17a:a959:ea2c with SMTP id w20-20020a056870a2d400b0017aa959ea2cmr12910266oak.34.1680105189867; Wed, 29 Mar 2023 08:53:09 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id y18-20020a056830109200b0069fb033f577sm7210819oto.51.2023.03.29.08.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:09 -0700 (PDT) Received: (nullmailer pid 3198081 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:07 -0500 Subject: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-10-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Update the includes to use of.h instead of of_device.h. Signed-off-by: Rob Herring --- Please ack and I will take the series via the DT tree. --- drivers/base/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index f6573c335f4c..a5f7a1063411 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Wed Mar 29 15:52:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668491 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BBB2C7EE25 for ; Wed, 29 Mar 2023 15:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231366AbjC2Px4 (ORCPT ); Wed, 29 Mar 2023 11:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjC2Px3 (ORCPT ); Wed, 29 Mar 2023 11:53:29 -0400 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE401BEF; Wed, 29 Mar 2023 08:53:28 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id f17so11896537oiw.10; Wed, 29 Mar 2023 08:53:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105207; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=022ntgbo/qozcpOEnF6DlWHlLfWcIn+6VTfzUh5A9FY=; b=E10H5Ql4USSrSqO9s4wDEtERp85yxhNrPdUDzgLMtM9E6HKtur8OqeZR/fsKytYsDE GSdvXDV5kAaAjbbDpUNPzsxw2EmrsbkK0ioYXrHf4a8qpSlY+v7y9eF8EXmeMxHbustq YYqNAvyUabUaZvsF+ReyzO9wcuYrAhE5uefoN8HWfkFuFmy/shbmSieJbzCclR5/5UnW qhOpyhNqVAWhTU1LzsSyt04yKsWg+EpRG2tZx44vrzPTcwSSr2xLpa/a6swiKxedsGZP LE5OLJQXZF/tzSXvNZKYK0s7OgsRKgaP2XcMpE218MStNYJ/xNdPgDkvVHJftF//oL2I enww== X-Gm-Message-State: AO0yUKW5Ccyfsu4GjAIAfoxoC+8XTfYGzH+7qNn5VRyl7FJnbfyo2TsM nyPMmEXF0h017kKTRUZGcA== X-Google-Smtp-Source: AK7set+mgwqrtp3sj8LCfLB0ZJyIWcTnGcbFer41ylAZRGD0ZYDF+G/GFDHWLU149fBQcrWXcPEKPQ== X-Received: by 2002:a05:6808:616:b0:386:db46:f6fb with SMTP id y22-20020a056808061600b00386db46f6fbmr8106850oih.17.1680105207535; Wed, 29 Mar 2023 08:53:27 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id l8-20020a056808020800b003874631e249sm8002092oie.36.2023.03.29.08.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:26 -0700 (PDT) Received: (nullmailer pid 3198085 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:09 -0500 Subject: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-12-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Signed-off-by: Rob Herring Acked-by: Daniel Lezcano --- Please ack and I will take the series via the DT tree. --- drivers/thermal/cpuidle_cooling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c index 4f41102e8b16..6f6daead485e 100644 --- a/drivers/thermal/cpuidle_cooling.c +++ b/drivers/thermal/cpuidle_cooling.c @@ -7,12 +7,13 @@ */ #define pr_fmt(fmt) "cpuidle cooling: " fmt +#include #include #include #include #include #include -#include +#include #include #include From patchwork Wed Mar 29 15:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668492 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79463C77B7F for ; Wed, 29 Mar 2023 15:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231337AbjC2Pxy (ORCPT ); Wed, 29 Mar 2023 11:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbjC2PxY (ORCPT ); Wed, 29 Mar 2023 11:53:24 -0400 Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8A7894; Wed, 29 Mar 2023 08:53:23 -0700 (PDT) Received: by mail-ot1-f47.google.com with SMTP id 61-20020a9d02c3000000b0069fe8de3139so8451454otl.1; Wed, 29 Mar 2023 08:53:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105203; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GcRNyMomlVIyDJBO4v13lmumWoZCHsVn17zoo+wPdkk=; b=JcuCBpIzgihULYhOc1Ur+hGhyYGwvtuCpYrTecfzIkA3LXkM57CD2d3Ay9oCjyabSF Ea0nY+fBWM2la6FW0CRXvEw7lCbLF1l1VTK24MouFE/Bf58EjfGF1OF66neagMS6HBVZ qZfnaJnrHwJHhXgdPGXX+cW+lyEjAHKrcu58eS5ka2jSZgv8qEEGsTecV1CqkidcVPXh IwAhH01NazwjsSwbMiBf1zx8E2lLU1ANDdYW+FzAB/U9DIWeXThMROUF16KDdcXnF38J FmAw255IXi0iLkdg0vnYsN7uuCgmXCFAaV8eHdDZNZZN7HwCtPXiXKvmNqS3KNLVEQeP qmCA== X-Gm-Message-State: AO0yUKV/1jDjD2fVHRPN5N8SfPPuSbGddbxG9Dko0OYg54YWSqNkQu4t 0tvocvEAk5Bl0jWYU8gd4Q== X-Google-Smtp-Source: AK7set+G4RUI7e7LVlBDXGQ8p8x17CahM2R0t8c+RybdcRc83FcjeXtVKZHsxX3oO+Yqeus+IJNu+w== X-Received: by 2002:a05:6830:124e:b0:68e:da51:2cb2 with SMTP id s14-20020a056830124e00b0068eda512cb2mr10233310otp.37.1680105202916; Wed, 29 Mar 2023 08:53:22 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id y26-20020a056830209a00b006a06e7972ebsm6242943otq.38.2023.03.29.08.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:53:22 -0700 (PDT) Received: (nullmailer pid 3198087 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:10 -0500 Subject: [PATCH 13/19] soc: mediatek: mtk-svs: Add explicit include for cpu.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-13-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Removing the include of cpu.h from of_device.h (included by of_platform.h) causes an error: drivers/soc/mediatek/mtk-svs.c:2134:41: error: implicit declaration of function 'get_cpu_device'; did you mean 'get_swap_device'? [-Werror=implicit-function-declaration] of_platform.h is still needed for of_find_device_by_node(). Signed-off-by: Rob Herring --- Please ack and I will take the series via the DT tree. --- drivers/soc/mediatek/mtk-svs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index f26eb2f637d5..1b7579a5bec6 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include From patchwork Wed Mar 29 15:52:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 668495 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AA0BC7EE2D for ; Wed, 29 Mar 2023 15:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231199AbjC2PxW (ORCPT ); Wed, 29 Mar 2023 11:53:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjC2Pw7 (ORCPT ); Wed, 29 Mar 2023 11:52:59 -0400 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC7885258; Wed, 29 Mar 2023 08:52:52 -0700 (PDT) Received: by mail-oo1-f51.google.com with SMTP id l7-20020a4abe07000000b0053e1205c84bso2136682oop.9; Wed, 29 Mar 2023 08:52:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680105172; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hUvdSWvlelGy1WbXkwFcUNCtjmz5cL2Z3yoJim8fyN4=; b=aODX/6ADRviQrEpvD9jvFMaqnQIU0s6qdxBGaa+80aOFrEi2GGSBI3hn8jldFN5/Fe aQH8vhvbeRlSsLHGsZWQmtkppZuI3yletOQPg3utpNptIZR0++A8ZSQMm9ucWJrxyE7g z1v/bazbW4FW7ea5DAHNfxqnESnBXKJF36TRk0mvrqkl77IhEnnjx8DgbR/u61kWoCuu sRURc8o2nP9+WWLmx4C1uE6i942K94R1XVILAGBz0vImq4+SaSgsoRhCQX9SvGzxKLC6 G/XUdGloaGJjsFjF14HPc+p5oTVejWAKfKlcBMVwqKXRmIWHfrD6UpWiIpYAhkfRPcLB 2xCg== X-Gm-Message-State: AO0yUKW6H+7kkywF6lx3NheJqIKiSUgKPi9QaQkse32gaRNbj1y/4jiX dgRisqBYYKsbLzrh4DcKbrxw3fvkpQ== X-Google-Smtp-Source: AK7set8fZmNpueyLlqRjeVxsIcrGmIm7sG0omBAJB7zOEj3TTntZfmKbMnjZiGlZRcAnzZ6+ha8iMg== X-Received: by 2002:a4a:4191:0:b0:538:4d29:30cb with SMTP id x139-20020a4a4191000000b005384d2930cbmr9034039ooa.8.1680105171818; Wed, 29 Mar 2023 08:52:51 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id 129-20020a4a1887000000b005252d376caesm13850273ooo.22.2023.03.29.08.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:52:51 -0700 (PDT) Received: (nullmailer pid 3198095 invoked by uid 1000); Wed, 29 Mar 2023 15:52:45 -0000 From: Rob Herring Date: Wed, 29 Mar 2023 10:52:14 -0500 Subject: [PATCH 17/19] irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h MIME-Version: 1.0 Message-Id: <20230329-dt-cpu-header-cleanups-v1-17-581e2605fe47@kernel.org> References: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> In-Reply-To: <20230329-dt-cpu-header-cleanups-v1-0-581e2605fe47@kernel.org> To: "David S. Miller" , Rob Herring , Frank Rowand , Russell King , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Amit Daniel Kachhap , Viresh Kumar , Lukasz Luba , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thierry Reding , Jonathan Hunter , Yangtao Li , Lorenzo Pieralisi , Sudeep Holla , Andy Gross , Bjorn Andersson , Konrad Dybcio , Anup Patel , Huacai Chen , Jiaxun Yang , Marc Zyngier , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org X-Mailer: b4 0.13-dev Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Removing the include of cpu.h from of_device.h causes an error: drivers/irqchip/irq-loongson-eiointc.c:420:9: error: implicit declaration of function 'cpuhp_setup_state_nocalls' [-Werror=implicit-function-declaration] This driver doesn't even use DT, so all the DT includes can be dropped. Signed-off-by: Rob Herring --- Please ack and I will take the series via the DT tree. --- drivers/irqchip/irq-loongson-eiointc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index d15fd38c1756..fd9d87f1470e 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -7,16 +7,13 @@ #define pr_fmt(fmt) "eiointc: " fmt +#include #include #include #include #include #include #include -#include -#include -#include -#include #include #define EIOINTC_REG_NODEMAP 0x14a0