Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2719017pxb; Tue, 21 Sep 2021 06:17:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4l7pjwHQ688AeAlc1DB4y95B7w2WvGjnewt9lJtQTpiLqcKxklSHa5OnoB1PcWNVTaLUI X-Received: by 2002:a17:906:dc0d:: with SMTP id yy13mr6870061ejb.88.1632230224906; Tue, 21 Sep 2021 06:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632230224; cv=none; d=google.com; s=arc-20160816; b=OcxtOF1VPRpijYRCub58gan+oHfzQHvMyzkckkoFm33k0c3QC016213eH4mdXB+oCg APxjyhjAJyEDQfPujCZf9gqDWEZuSqCOvMlL4MWeJn/8jjcct8lCx2pKeZjQOzHXKB7Z lvLGSCvnsKVXU08X2bknTfqK+QaYlayJIBZPQJinEjuD+lxGq4EAZ1SrcXytIpfmQh22 JqstIhCpvWb6OvWMSN/ya7+XlcBFE0Xk2yUb93UKikVV2gYXBYchsz0RtiDBBG/2iyUe LAG82LM9+Nc/mxfCLzVs9UfWceteXuv+UPsEHQ+261B9FRJKvw1ZSI1b6jopV0AeBt77 jFpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=nNn71pdvZiKoAJGJ/vusxlVyEml2/qVwaR/wAOoTpug=; b=yHeMMEvI0tIVlA6K3XDBkIWASsN2rAfvnVwpJLmqhSCeYMd6+R34tVAgTC9Z0XQl3n tn2o+1L/vRYsM88Xq09rUxBUAMUFfQAgU0cMlHeaxevTlOP6KOgYuHB6mGJ3j6bGlF6H NXbMfdoWmp1jIibZ6KkKc4Qti2LDnwWltUHlge831B34sWF1IAX1rVEbfIfGD62Z7YcZ ymvoyk0+nCf8F1KjdiPHkZBpqkfYnjUYwnIcT3MpR4xRFMfy6ieQmxnbGlyUlM+kE3GG iGPqFpk/Q4o7xbrJ9GBMJE95EgVh/WHFmC66MRjU3j8YcjQLymeaTWgL7aivW/k+TNwE 0aGQ== ARC-Authentication-Results: i=1; mx.google.com; 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si12969871ejr.349.2021.09.21.06.16.37; Tue, 21 Sep 2021 06:17:04 -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; 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232981AbhIUNNq (ORCPT + 99 others); Tue, 21 Sep 2021 09:13:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:43790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbhIUNNq (ORCPT ); Tue, 21 Sep 2021 09:13:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AFEFC61166; Tue, 21 Sep 2021 13:12:13 +0000 (UTC) Date: Tue, 21 Sep 2021 14:12:10 +0100 From: Catalin Marinas To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, Keith Packard , Russell King , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Kees Cook , Andy Lutomirski , Linus Torvalds , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: Re: [RFC PATCH 5/8] sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y Message-ID: References: <20210914121036.3975026-1-ardb@kernel.org> <20210914121036.3975026-6-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914121036.3975026-6-ardb@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 02:10:33PM +0200, Ard Biesheuvel wrote: > THREAD_INFO_IN_TASK moved the CPU field out of thread_info, but this > causes some issues on architectures that define raw_smp_processor_id() > in terms of this field, due to the fact that #include'ing linux/sched.h > to get at struct task_struct is problematic in terms of circular > dependencies. > > Given that thread_info and task_struct are the same data structure > anyway when THREAD_INFO_IN_TASK=y, let's move it back so that having > access to the type definition of struct thread_info is sufficient to > reference the CPU number of the current task. > > Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas