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.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 082A3C433E6 for ; Wed, 10 Mar 2021 14:59:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6A19664E38 for ; Wed, 10 Mar 2021 14:59:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A19664E38 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DACDE8D01B6; Wed, 10 Mar 2021 09:59:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D845F8D01A6; Wed, 10 Mar 2021 09:59:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C73C98D01B6; Wed, 10 Mar 2021 09:59:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id AACAD8D01A6 for ; Wed, 10 Mar 2021 09:59:10 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5DD6618021448 for ; Wed, 10 Mar 2021 14:59:10 +0000 (UTC) X-FDA: 77904272460.16.959AE6E Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf03.hostedemail.com (Postfix) with ESMTP id 80733C0007D9 for ; Wed, 10 Mar 2021 14:59:07 +0000 (UTC) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6df24716-8b41-8e9a-f2f4-a0f5d49643bd@telliq.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: 4dogfxsa1g7tddq8ywq9kt9cdizzoq4h X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 80733C0007D9 Received-SPF: none (armlinux.org.uk>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=pandora.armlinux.org.uk; client-ip=78.32.30.218 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615388347-517156 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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!