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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69C2CC433E0 for ; Wed, 10 Mar 2021 15:00:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAA2164EFE for ; Wed, 10 Mar 2021 15:00:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAA2164EFE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=b50LvOmiS4oeiDLyeUMesXLvwe1ZOu7rVxcOiYDg1PU=; b=fLbQMjMg0C8mUKP0cJ8qpVeD0 jA48gfb02XLCrsNz20cYIpdN/Hl7+0Z+oYi/BF+psyAPHnQU5SK3b4PjjiPXEgN1SEY5Opu0Xb8bx wvBMvJ8ZeOCC7zSJhVfw1ohvKGNNSZCF7kPNburaiSZBIo0RHpM6mjwwP67ocL3jtVIijlmPv0MWD AMFqg7X+Z3Y3CsMAIc7lM477ohaojaGTYtTHIz82oR7ObgCHGM5ltWukm1k98yDKI9oM4Gkx8wwos BQL9lMna/DhfnfMrV0RL4LJR6YgEV48R2g2ZLAV/FKfwqsFY2p8al6NpI+PjgkhYGdbAF9GV/j2WB 8EWcLuHfg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lK0Iu-00744X-30; Wed, 10 Mar 2021 14:59:16 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lK0Io-007438-Tc for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 14:59:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nCSk/kTayjqMafiLa1zeviIbw4QWdPqrZ0nPieuKqrU=; b=dKb893JWFwN5M+UEgAm/8gDV9 1QE1wWO0lfMKzS7YFXgiw70Ei2XDNMzNtOVpznLrtoQHkt4BwclB1Xj9zOd9mBoprsB5fL0XWNTrr mXmpK3V3bBi/sSW6Zz67AhdSu0m/d7Z8bvDXDRSZmxqgS99leZIubNv4SJEhyUz8Eq/SslLscgoo2 1pjl3XLKtExu4JVdrL5qehzU3fP+hD2FicHQ1b1UZGaPwBXouUvhs+NxrXkJqQXjmxfabyf04IAjw 0wzdJ2Az6nFS8Ixx01O190T9hLgF9BY1nB1z92CMsSdeEoir/E33MMurJvOuKvKfNMI+5ouvSihpk Z97jl+Y1A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:50724) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lK0Ij-0004YW-Kk; Wed, 10 Mar 2021 14:59:05 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lK0Ii-0000nR-K0; Wed, 10 Mar 2021 14:59:04 +0000 Date: Wed, 10 Mar 2021 14:59:04 +0000 From: Russell King - ARM Linux admin To: Jan Kardell Cc: Linux ARM , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Tony Lindgren , Andrew Morton , linux-mm@kvack.org Subject: Re: arm: lockdep complaining about locks allocations in static memory Message-ID: <20210310145904.GA1470@shell.armlinux.org.uk> References: <6df24716-8b41-8e9a-f2f4-a0f5d49643bd@telliq.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6df24716-8b41-8e9a-f2f4-a0f5d49643bd@telliq.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_145911_067321_208325F9 X-CRM114-Status: GOOD ( 23.44 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 10, 2021 at 02:54:30PM +0100, Jan Kardell wrote: > Hi, > > During work lift the software and kernel versions on our custom TI am3352 > board I started to see lockdep warnings after enabling CONFIG_PREEMT. > Lockdep seems to think the memory that previously was initmem is static > memory. I'm using linux 5.4, as that is what is used in the next OpenWrt > version. > > [ 92.198989] WARNING: CPU: 0 PID: 2015 at kernel/locking/lockdep.c:1119 > alloc_netdev_mqs+0xb4/0x3b0 > > I guess CONFIG_PREEMT just changes the timing of allocations, and is > otherwise irrelevant. > > This was fixed for s390 in linux 5.2 commit > 7a5da02de8d6eafba99556f8c98e5313edebb449 by adding the function > arch_is_kernel_initmem_freed(). Later a very similar change was made for > powerpc, and a different solution for x86. I now believe that is needed for > arm as well. Though I don't know the inner workings of arm memory management > so I don't know if an identical solution to s390 will do for arm, but my > experiments suggests it works for am335x. The commit message for s390 says > "virt == phys", but that seems not to be the case for my arm system. I don't see any reason this couldn't be added to arm, but it needs someone to create and test a patch - which implies that they need to have a problem that needs to be solved. As you seem to be experiencing the problem, it seems you are well suited to this. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel