Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1260319pxa; Thu, 20 Aug 2020 07:01:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzra//MRWQRkrIGZOlaueGmszBH5k3sDxBfwmvp8t63qsSkkkwAZIv77/SP3i9O9SayeLL X-Received: by 2002:a17:906:990c:: with SMTP id zl12mr3299660ejb.488.1597932066058; Thu, 20 Aug 2020 07:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597932066; cv=none; d=google.com; s=arc-20160816; b=0+ug4mhNQ/4k2DU6nq6MDdwHJPrCuPeLcLMJehDY20iYK1mlx604zRXeBNJkKBIMkQ nKJ34IBn7nKUUFTO4UalOS5akz81xjMRcnsaUhHs+FY8h5DIpzg+t6xElwjfHmVivjS/ PNcAfAtzyRlKArOpeCOJtOydMNRyVCVIgQhNN/jruefFL7ymWQkfT50vn10TlnYfVwbF VwpRMK6rQt1JkAFhu2LgPWMAy5cMTM3DH47RIqE2cRbRDtjcG/t3oJXGnxWbb8k5iXTK WhY3XsyF/yOpPRN4c1NzQckX1r6hePTo/Q9Ud42+TkWWvCGMkdy+DANjZ+sjVcNzKBms XYrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vd3pxt8XcuG8K38otNfX6V3AkPjGlMQScDGB/d2vwpU=; b=PKTbY1QSwK2QE5956/4DVYH9b4plABQuFmcMO3fsaQ4r+wCwMj+0IleCeNQEtRv0iB prU+6Hm2IGUpxr4+LVn71oVaxcMWNeUmHycjKn3kMIRZ1u9gaZuBiWV5ZLsmJcs5Lgwf 18kOFbUMX13ocBQvfXSsQrt5v/p37Cc+YG47OGX+qgIgQLjebOpVsUXZbFAHvFp+Pt8k gdNnmycy8qXIDYGn6Tsj9wXTvdNZxn26/vwQkDsgowag3NrsSL1zW4p0scH30n56I4Jy e3dOYz0Irz9wt8635V3TWB2QUDcl/oAFmy/OJvOecod3yUhq3v0XKcHMiobPxVaCWJe9 0jsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Qx/hW8em"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl25si1235803ejb.424.2020.08.20.07.00.41; Thu, 20 Aug 2020 07:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Qx/hW8em"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728556AbgHTN4c (ORCPT + 99 others); Thu, 20 Aug 2020 09:56:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727837AbgHTJ0A (ORCPT ); Thu, 20 Aug 2020 05:26:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F7F922CB1; Thu, 20 Aug 2020 09:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915547; bh=80d02pedfTpF3cSJbY6um8Fk5bv/JNoyRNqEAFcDkBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qx/hW8emA96RT36kpAlp1/7Q9dCmormy3W9B6c+4Bhu8jajBfzEtEEoUtEt5EZ8R3 zSLVWdXKVTsAVKKXVNe3EA+kITtj8KNUs0R64mlnMRLyo7K6+soT3il1ah5t24ux// lmFdLj6PDdOYrGBU/xYgOgi4gwIT2mWT9Z4b3uGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Michael Ellerman Subject: [PATCH 5.8 052/232] powerpc: Fix circular dependency between percpu.h and mmu.h Date: Thu, 20 Aug 2020 11:18:23 +0200 Message-Id: <20200820091615.301098609@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Ellerman commit 0c83b277ada72b585e6a3e52b067669df15bcedb upstream. Recently random.h started including percpu.h (see commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity")), which broke corenet64_smp_defconfig: In file included from /linux/arch/powerpc/include/asm/paca.h:18, from /linux/arch/powerpc/include/asm/percpu.h:13, from /linux/include/linux/random.h:14, from /linux/lib/uuid.c:14: /linux/arch/powerpc/include/asm/mmu.h:139:22: error: unknown type name 'next_tlbcam_idx' 139 | DECLARE_PER_CPU(int, next_tlbcam_idx); This is due to a circular header dependency: asm/mmu.h includes asm/percpu.h, which includes asm/paca.h, which includes asm/mmu.h Which means DECLARE_PER_CPU() isn't defined when mmu.h needs it. We can fix it by moving the include of paca.h below the include of asm-generic/percpu.h. This moves the include of paca.h out of the #ifdef __powerpc64__, but that is OK because paca.h is almost entirely inside #ifdef CONFIG_PPC64 anyway. It also moves the include of paca.h out of the #ifdef CONFIG_SMP, which could possibly break something, but seems to have no ill effects. Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity") Cc: stable@vger.kernel.org # v5.8 Reported-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804130558.292328-1-mpe@ellerman.id.au Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/percpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/powerpc/include/asm/percpu.h +++ b/arch/powerpc/include/asm/percpu.h @@ -10,8 +10,6 @@ #ifdef CONFIG_SMP -#include - #define __my_cpu_offset local_paca->data_offset #endif /* CONFIG_SMP */ @@ -19,4 +17,6 @@ #include +#include + #endif /* _ASM_POWERPC_PERCPU_H_ */