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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 77B9CC433FE for ; Tue, 14 Sep 2021 15:59:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FF0961151 for ; Tue, 14 Sep 2021 15:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234946AbhINQAh (ORCPT ); Tue, 14 Sep 2021 12:00:37 -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-Google-Smtp-Source: ABdhPJy5pDzsndBmLt6Q2GuPPJoMuOudrfo6FoHF6B6m7psfe4pbgDiP74St57elPHMWhW7DDNtijw== 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 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=-4.1 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 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 846E1C433FE for ; Tue, 14 Sep 2021 15:59:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 545D260F8F for ; Tue, 14 Sep 2021 15:59:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 545D260F8F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZweGjcpsB7yE5fZVAcFcEP1ZihbKFi+d6s1gC8NlJPU=; b=GQaII6uNgFcuXP 8tQiSFnLu7OI03rhq0hzjKsV6xTO1ndS4ZbR8FDagLvHAoR0sQ+yHA0gbi4DZf41CfgJcNMf1gDQT 6Xp1mOMe+qY4GtjFepZJga1ZWtSGTNJSmmYTPaRaYix+1exp1GHBr5+ukp3IZ1Aenk8Newme1X1pm XopaGCidVg14WtKgb24XmY8i1gW3CvNzMv/67GiSuUsiOp/I1jYEmOCLvyac+wy729lzkJJbsd7db leXpgPl0wMIbinE35JUJ9ViEkaOKUH71YoqNxWHN0NSbYZ8kfQWMMBxipX/rtA1Uvh0NF4TewnlW0 pkyY2eei7aj50ACZX6mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAqJ-006LC5-AW; Tue, 14 Sep 2021 15:59:31 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAqF-006L90-VW for linux-riscv@lists.infradead.org; Tue, 14 Sep 2021 15:59:29 +0000 Received: by mail-lj1-x233.google.com with SMTP id q21so24846654ljj.6 for ; Tue, 14 Sep 2021 08:59:27 -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=2eNvD+BzWcaRQgdlkJKtskOJOfshVvgg0d6qfbq3UrmDXCKV4iL0SXTjzpU06X4J+w L1lVDlKBHH3SDefI8+bSQHnTe5YMd8qc9PePUB55YON2Wf/+eeSCfwaqYsJv0Yti9rin saSfwU3EGm7OSLbPT4WJDIqGtqBZDWZj11cVhvv9io3SPZ+PyaocvbDzRC8W7YxyrQ27 PltzT8P1R1Oi6VNdafKrq3x5XNZ2NCVuGg6YGeWyP0rJjBoM7dWrv78cGroPbpSyE2O/ CAZw1CLX9dYaYoGuLo59dFnw7R1wkiJKtm8Gp9nCWSGLz7ZYRPqLanUT0uiyGnoIv5Rz 4d+w== X-Gm-Message-State: AOAM532buXM3QMJ7rLCQgp2qz/0QHLl+lC4ehGWv5uTKbYzyO9PD2fFy Z08oCcUh5/FucoOYW6gknN4dD1kcc1Bxxabr9FQ= X-Google-Smtp-Source: ABdhPJxFlj4qnulO+ClZ6ltYPyuY8iKH3RwLNioNyJrttdISzn/dim311l9GZJIOVD37NNMk9nYfSg== X-Received: by 2002:a2e:a7d0:: with SMTP id x16mr15704130ljp.494.1631635165534; Tue, 14 Sep 2021 08:59:25 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id s10sm968988lfc.28.2021.09.14.08.59.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:59:25 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id k4so29882873lfj.7 for ; Tue, 14 Sep 2021 08:59:24 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_085928_050143_14445DC6 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 35342C433FE for ; Tue, 14 Sep 2021 16:00:09 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 70A1961155 for ; Tue, 14 Sep 2021 16:00:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 70A1961155 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4H87N66kmTz2yPT for ; Wed, 15 Sep 2021 02:00:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=bXLrDvRw; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2a00:1450:4864:20::236; helo=mail-lj1-x236.google.com; envelope-from=torvalds@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=bXLrDvRw; dkim-atps=neutral Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4H87MQ1kF8z2xxn for ; Wed, 15 Sep 2021 01:59:28 +1000 (AEST) Received: by mail-lj1-x236.google.com with SMTP id f2so24847626ljn.1 for ; Tue, 14 Sep 2021 08:59:28 -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=6nOPHNfgiMdiTi0B2K3aZrXIMHr9ybQz+d7gADdSSEbzf8+JcJe6n/V5qeMBqZEV5K AKY7y/6tlL5Suh9sNLfhVCYGGY41av+bv5XWOaneDIv/Bwl8sZXTPylQg7l8pN409+1b eTm2ViZGTbotlq+Ozcy1+mV88py/E+2WD14pAAwKCWbqJrCpf+19HHuXNDhmUYjGAfKL 4SSAD66FIGEuTnPyEbLCIhca7msDdD0NE4+f+IwiQSuvPwBDMLuZ8Tq2UKorfb38+lZw aqxY4fb/8b6sB1JpFd+jhe8LnYy5/TATgXUVub9KJWdb2qHZxc7pzsD02JMsxNazW+k7 H6jA== X-Gm-Message-State: AOAM531rq7o1L47hRvQ+T1M84KVZZhKb1DDTPyMrYSVEThdWnLoU9rVu rzVfy5nu+J66azRAB41SpEMdIsRo4qp8eKWdCuk= X-Google-Smtp-Source: ABdhPJw/qsG4reje+RXXyWydLZHAIRH/xx9oJK7KufmhCYCq0X+s6dlQDxWJfAKtmNUi/KalPriKmg== X-Received: by 2002:a05:651c:3dd:: with SMTP id f29mr16359738ljp.69.1631635165038; Tue, 14 Sep 2021 08:59:25 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id r2sm1386658ljj.14.2021.09.14.08.59.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:59:24 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id w4so24797281ljh.13 for ; Tue, 14 Sep 2021 08:59:24 -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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Paul Mackerras , linux-riscv , Will Deacon , linux-s390 , Arnd Bergmann , Russell King , Christian Borntraeger , Ingo Molnar , Catalin Marinas , Albert Ou , Kees Cook , Vasily Gorbik , Heiko Carstens , Keith Packard , Borislav Petkov , Andy Lutomirski , Paul Walmsley , Thomas Gleixner , Linux ARM , Linux Kernel Mailing List , Palmer Dabbelt , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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=-4.1 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 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 8C36FC433F5 for ; Tue, 14 Sep 2021 16:01:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5764760F9F for ; Tue, 14 Sep 2021 16:01:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5764760F9F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iL1+33Tht2Xba0GoUExedbO92Q11dzFzSFyw0DLFsLo=; b=Vp8Kf16zWTu12W vGCrtq5pVjvKpJ49nZqTvxWbsWyHGIKuBFaDKtoHItB9Q5vGcMOJISPNt17//6s8cvNOVkaSNJuIH QD6q88iLjHpJ7zE+t86tCK1o/0u99tS9K1nlYDM8uB3/iWdBUFpiHwwufnbDobtDnEvJtOVYALTzl xmUnecfHYt6YMYzyRLJp3MfPoKezB6MLSxzNISkm5YUB31mNZsZghNgKmaPbECMfNlzRz/2aGY+/6 a0SNGJicwVER/bMjYh6rz/BXRU5R9Hz7qd3VYYxR3lrScQrpHcszHOjeksj/X7//hznleY730LkbN MH3/Be+oYywvS18RYNEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAqV-006LFh-2v; Tue, 14 Sep 2021 15:59:43 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQAqF-006L98-TY for linux-arm-kernel@lists.infradead.org; Tue, 14 Sep 2021 15:59:29 +0000 Received: by mail-ej1-x62a.google.com with SMTP id x11so30129698ejv.0 for ; Tue, 14 Sep 2021 08:59:27 -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=sOQPfLv3V1DGffWV233RZG++BF9UdQpmI5tzDxvLADBkab+64mDSSn6z40bwF+LnSu dFSPMcvxf8j7VgN24h0d6iMZdT46/2JPhP6t7V9O/usY423fHkoc4VYBJRYM99bmc21E YvMNe8mlUZZU2fuT44qIwpxTkt+v1XaEsxpMZ7f1YchdrfuPAfwXjIRTG8ctoTZc3xlX MvRnt77n4zR3N8KlsTN08TTTi6SfTyFCJmgmDkBnQhiL3qr+XRn/Mer3IXyf4/9D4WoW iYf5uJZjdh9uJDNLA63MT0oPueAiDoNOPADNkSYIfJYLUsa5zxN+eoIqdtWyF7pbPDXd 6R3Q== X-Gm-Message-State: AOAM5311itUFAdsvV2V0k43z2wZi826leb4x2+vp/l7HrJnYwGPJJgtu QbhBFN4jupp6dRd4sAHtTIQb9+0gMziMzwvtMdA= X-Google-Smtp-Source: ABdhPJzU0foizBHn5+uT5FNkiKaErPOqrXl7wkIulm1IT986a2TdKRGVENQEtV/Zsw56Xg9tRaFl7A== X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr19685277eju.254.1631635165846; Tue, 14 Sep 2021 08:59:25 -0700 (PDT) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com. [209.85.218.52]) by smtp.gmail.com with ESMTPSA id g10sm5073931ejj.44.2021.09.14.08.59.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:59:25 -0700 (PDT) Received: by mail-ej1-f52.google.com with SMTP id qq21so24172291ejb.10 for ; Tue, 14 Sep 2021 08:59:25 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_085927_996732_DAF279A4 X-CRM114-Status: GOOD ( 12.17 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel