Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp800619pxb; Tue, 14 Sep 2021 09:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrDIq2VewVHdezlwDQLyw6BIwnQpmzJRpfAMPOhsYu4bM3sTPSflA/jCRQVTlgTs4S+eTP X-Received: by 2002:a05:6512:e9e:: with SMTP id bi30mr1214222lfb.78.1631635280980; Tue, 14 Sep 2021 09:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631635280; cv=none; d=google.com; s=arc-20160816; b=kZiiFwM2z5UmD7Qx4wFB4YKcJlKiiysHS3DDmlAsefRiRPW/bou2KJEDAx2gghKRO3 YQSI0X9bKRhs4YBdoFUzsJWg57bm9klt2A4gKFAHmhPlg0sRlr2aOTWvOnzzB8LuB8wl uBofDgJDnQ1iKfwGO50QQCeYPtsQZB37CbMVFu31rN0hKmAFcaM7XqXG4fSw0o4Lyxg0 DNcGvTKd7IUF6WLW8RA3w4N4wtRVaCuF4Ye422xp4v9REAH11dNBknh7rkrpzZewBeDB tBX6jhKTiXSwT3yqXRbnVzHcbEd+2rDNR5Lo0GlmxnwMm4pe7uyFrQXpw9vSbbRQIiz0 bvbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XpWi4volfcYSm2oFWphGxI70Xoc4gQDszmXfggbAPag=; b=gHlRmnaGJ1Kv8ZTgPdcabflHeyonI50cTYIYzk9TSlHwHjMn1g2SKVj7LxCSlt+zvU bfTqRsRO9E+5h4ul5PV54H/Ty590tv2sW8s8OC3L/vpYxx1FxbrFYIG/p6uiQAvMc/qQ okIMkfIYxQi8MdSGAYffhjS1+1vmqDFkJKUGIFUBoE99Zko4/kj/QV7nDlRNiD0c14+X PsFeSbmfPhGdxLfN9vuZO689A1gLj0O+flOdSOj+Lt1dO8GUhhOMO+HTSAHumreARa2q WoJgsqC2DwC2hYnaYvBLlmBjxvaEhJS8Jg8mKkfqpPZXCKM9x6fvLvjtNTtzeegfOcxm Uzbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bXLrDvRw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si13300927ljn.128.2021.09.14.09.00.49; Tue, 14 Sep 2021 09:01:20 -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=@linux-foundation.org header.s=google header.b=bXLrDvRw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234786AbhINQAg (ORCPT + 99 others); Tue, 14 Sep 2021 12:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232986AbhINQAf (ORCPT ); Tue, 14 Sep 2021 12:00:35 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F95C061574 for ; Tue, 14 Sep 2021 08:59:18 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id x27so29881090lfu.5 for ; Tue, 14 Sep 2021 08:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XpWi4volfcYSm2oFWphGxI70Xoc4gQDszmXfggbAPag=; b=bXLrDvRwiE9LUrsUdTaOb8qv3MpstEI39Z126QnyB2PTkNIRA+z5Ylw/tbECp2MHmV gX1JHV2JOFK1e1MJCTTlwV1kibUe3fFGD3LyBUKt18UoGfT0okDbQ+10t1fJme/j5P5U D2vgNrnv1RgcRafeCGUDJ8RsTcI/ITO4E3K7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XpWi4volfcYSm2oFWphGxI70Xoc4gQDszmXfggbAPag=; b=Ni0pxraCdHc8/Lucom68EsX5DkECLs/JJm7YoriB1NaKhnkYY/HGzJcmrHcAj2M6cR 4EzHHI/1Vs3uhFLu7Wp2bLTot+hpi0aeimRu8et+ttW1beWIRylVwGm/EZMXkSJyaDad NcTF1X+G15Tdo3BRoq/4IMHH0/C2Ty2l5ypFnSWiUSTsV7uC5JrR0PlompQReh+IHwN7 g1bH7yAJMTCjhnK1tmvRbxAJGZaBoPxG/ueg8SUWvFBWgJ94HDREo3suPJ3u/otwfkID QREE/DSDNQ27kgU6LjtVM0uQILrQMxEXqNqre5PVaNeWuO0kZ7DGQHLDhbD9A7I8ijEx PO+Q== X-Gm-Message-State: AOAM532Qid4V6Wof/BlMgdY6/EfYOXYyvfhpGiaCy7F9/QIpCC7cbiOX mEoIoMx35BJxjMdp9WF/kUqANmqwgU+KNEJYRCM= X-Received: by 2002:a05:6512:3d94:: with SMTP id k20mr13667220lfv.260.1631635156175; Tue, 14 Sep 2021 08:59:16 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id f7sm565131lfv.96.2021.09.14.08.59.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:59:14 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id s3so24825874ljp.11 for ; Tue, 14 Sep 2021 08:59:14 -0700 (PDT) X-Received: by 2002:a2e:8107:: with SMTP id d7mr16501365ljg.68.1631635154125; Tue, 14 Sep 2021 08:59:14 -0700 (PDT) MIME-Version: 1.0 References: <20210914121036.3975026-1-ardb@kernel.org> <20210914121036.3975026-6-ardb@kernel.org> In-Reply-To: From: Linus Torvalds Date: Tue, 14 Sep 2021 08:58:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 5/8] sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y To: Ard Biesheuvel Cc: Linux Kernel Mailing List , Keith Packard , Russell King , Catalin Marinas , 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 , Arnd Bergmann , Linux ARM , linuxppc-dev , linux-riscv , linux-s390 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 8:53 AM Ard Biesheuvel wrote: > > task_cpu() takes a 'const struct task_struct *', whereas > task_thread_info() takes a 'struct task_struct *'. Oh, annoying, but that's easily fixed. Just make that static inline struct thread_info *task_thread_info(struct task_struct *task) .. be a simple #define task_thread_info(tsk) (&(tsk)->thread_info) instead. That actually then matches the !THREAD_INFO_IN_TASK case anyway. Make the commit comment be about how that fixes the type problem. Because while in many cases inline functions are superior to macros, it clearly isn't the case in this case. Linus