From mboxrd@z Thu Jan 1 00:00:00 1970 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 65F15C54E4A for ; Fri, 8 Mar 2024 14:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0BavZVe35Cf9nqIROl5X/EpxQ/1bveDxKmklW4Zw3o4=; b=lAP3FXhtyaq1tv 2Z2XBM30EYTdgKwn6+KdtlP87DRyyVn5SOgYzlof30xQxnyk00iod1qIiLZ0AnjymaKq7rj+HEXRC 2TPv/c4vT53W0+5OsLVOkQ5KbTceNMNsZPL6QNMmx831FRMU0Gvy2+CMcF18PEx0XU+eV+nRFwplP cT5qVbRe5hX2huCCevxWgi4ATPeXJ3yURoOM9Pc+5iYCouytVBqqr1/QdkZ9xvJgPCsAa7nCTPMHY KNllwCgTPWB80BMuziuwNqL9QC8yqfDsrMetSVZ2z4H4JNNWDNjV9EeQGKIH7mjccZ/xIH1aQeQ3I 3c/V7OCvmtUQNfDCWztA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ribZk-00000009gPW-18wM; Fri, 08 Mar 2024 14:51:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ribZg-00000009gOS-1qCe for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 14:51:53 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6190160A29; Fri, 8 Mar 2024 14:51:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F0DDC433F1; Fri, 8 Mar 2024 14:51:46 +0000 (UTC) Date: Fri, 8 Mar 2024 14:51:44 +0000 From: Catalin Marinas To: Marek Szyprowski Cc: "Christoph Lameter (Ampere)" , Mark Rutland , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Viresh Kumar , Will Deacon , Jonathan.Cameron@huawei.com, Matteo.Carlini@arm.com, Valentin.Schneider@arm.com, akpm@linux-foundation.org, anshuman.khandual@arm.com, Eric Mackay , dave.kleikamp@oracle.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@armlinux.org.uk, robin.murphy@arm.com, vanshikonda@os.amperecomputing.com, yang@os.amperecomputing.com, Nishanth Menon , Stephen Boyd Subject: Re: [PATCH v3] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Message-ID: References: <37099a57-b655-3b3a-56d0-5f7fbd49d7db@gentwo.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_065152_595560_E9FE458A X-CRM114-Status: GOOD ( 25.31 ) 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: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 08, 2024 at 03:01:28PM +0100, Marek Szyprowski wrote: > This patch landed in today's linux-next as commit 0499a78369ad ("ARM64: = > Dynamically allocate cpumasks and increase supported CPUs to 512"). = > Unfortunately it triggers the following warning during boot on most of = > my ARM64-based test boards. Here is an example from Odroid-N2 board: > = > =A0------------[ cut here ]------------ > =A0WARNING: CPU: 4 PID: 63 at drivers/opp/core.c:2554 = > dev_pm_opp_set_config+0x390/0x710 > =A0Modules linked in: dw_hdmi_i2s_audio meson_gxl smsc onboard_usb_hub(+= ) = > rtc_pcf8563 panfrost snd_soc_meson_axg_sound_card drm_shmem_helper = > crct10dif_ce dwmac_generic snd_soc_meson_card_utils gpu_sched = > snd_soc_meson_g12a_toacodec snd_soc_meson_g12a_tohdmitx rc_odroid = > snd_soc_meson_codec_glue pwm_meson ao_cec_g12a meson_gxbb_wdt meson_ir = > snd_soc_meson_axg_frddr snd_soc_meson_axg_toddr snd_soc_meson_axg_tdmin = > meson_vdec(C) v4l2_mem2mem videobuf2_dma_contig snd_soc_meson_axg_tdmout = > videobuf2_memops axg_audio videobuf2_v4l2 sclk_div videodev = > reset_meson_audio_arb snd_soc_meson_axg_fifo clk_phase dwmac_meson8b = > stmmac_platform videobuf2_common mdio_mux_meson_g12a meson_drm = > meson_dw_hdmi rtc_meson_vrtc stmmac meson_ddr_pmu_g12 mc dw_hdmi = > drm_display_helper pcs_xpcs snd_soc_meson_t9015 meson_canvas gpio_fan = > display_connector snd_soc_meson_axg_tdm_interface = > snd_soc_simple_amplifier snd_soc_meson_axg_tdm_formatter nvmem_meson_efuse > =A0hub 1-1:1.0: USB hub found > =A0CPU: 4 PID: 63 Comm: kworker/u12:5 Tainted: G=A0=A0=A0=A0=A0=A0=A0=A0= C 6.8.0-rc3+ #14677 > =A0Hardware name: Hardkernel ODROID-N2 (DT) > =A0Workqueue: events_unbound deferred_probe_work_func > =A0pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=3D--) > =A0pc : dev_pm_opp_set_config+0x390/0x710 > =A0lr : dev_pm_opp_set_config+0x5c/0x710 > =A0... > =A0Call trace: > =A0 dev_pm_opp_set_config+0x390/0x710 > =A0 dt_cpufreq_probe+0x268/0x480 > =A0 platform_probe+0x68/0xd8 > =A0 really_probe+0x148/0x2b4 > =A0 __driver_probe_device+0x78/0x12c > =A0 driver_probe_device+0xdc/0x164 > =A0 __device_attach_driver+0xb8/0x138 > =A0 bus_for_each_drv+0x84/0xe0 > =A0 __device_attach+0xa8/0x1b0 > =A0 device_initial_probe+0x14/0x20 > =A0 bus_probe_device+0xb0/0xb4 > =A0 deferred_probe_work_func+0x8c/0xc8 > =A0 process_one_work+0x1ec/0x53c > =A0 worker_thread+0x298/0x408 > =A0 kthread+0x124/0x128 > =A0 ret_from_fork+0x10/0x20 > =A0irq event stamp: 317178 > =A0hardirqs last=A0 enabled at (317177): [] = > ktime_get_coarse_real_ts64+0x10c/0x110 > =A0hardirqs last disabled at (317178): [] el1_dbg+0x24= /0x8c > =A0softirqs last=A0 enabled at (315802): [] = > __do_softirq+0x4a0/0x4e8 > =A0softirqs last disabled at (315793): [] = > ____do_softirq+0x10/0x1c > =A0---[ end trace 0000000000000000 ]--- > =A0cpu cpu2: error -EBUSY: failed to set regulators > =A0cpufreq-dt: probe of cpufreq-dt failed with error -16 > = > It looks that cpufreq-dt and/or opp drivers needs some adjustments = > related with this change. That's strange. Is this with defconfig? I wonder whether NR_CPUS being larger caused the issue with this specific code. Otherwise CPUMASK_OFFSTACK may not work that well on arm64. > = > = > > --- > > > > > > Original post: https://www.spinics.net/lists/linux-mm/msg369701.html > > V2: https://lkml.org/lkml/2024/2/7/505 > > > > > > V1->V2 > > > > - Keep quotation marks > > - Remove whiltespace damage > > - Add tested by > > > > V2->V3: > > - Add test results > > - Rework descriptions > > > > > > =A0arch/arm64/Kconfig | 16 +++++++++++++++- > > =A01 file changed, 15 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index aa7c1d435139..4e767dede47d 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -1427,7 +1427,21 @@ config SCHED_SMT > > =A0config NR_CPUS > > =A0=A0=A0=A0 int "Maximum number of CPUs (2-4096)" > > =A0=A0=A0=A0 range 2 4096 > > -=A0=A0=A0 default "256" > > +=A0=A0=A0 default "512" > > + > > +# > > +# Determines the placement of cpumasks. > > +# > > +# With CPUMASK_OFFSTACK the cpumasks are dynamically allocated. > > +# Useful for machines with lots of core because it avoids increasing > > +# the size of many of the data structures in the kernel. > > +# > > +# If this is off then the cpumasks have a static sizes and are > > +# embedded within data structures. > > +# > > +=A0=A0=A0 config CPUMASK_OFFSTACK > > +=A0=A0=A0 def_bool y > > +=A0=A0=A0 depends on NR_CPUS > 256 > > > > =A0config HOTPLUG_CPU > > =A0=A0=A0=A0 bool "Support for hot-pluggable CPUs" > = > Best regards > -- = > Marek Szyprowski, PhD > Samsung R&D Institute Poland > = -- = Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel