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=-13.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 39D8AC004C9 for ; Tue, 7 May 2019 22:52:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 5CC1E20C01 for ; Tue, 7 May 2019 22:52:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QpLCCGwM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CC1E20C01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44zFHr0s3KzDqP1 for ; Wed, 8 May 2019 08:52:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=yury.norov@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QpLCCGwM"; dkim-atps=neutral Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (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 44zFGF5MpgzDqLT for ; Wed, 8 May 2019 08:51:29 +1000 (AEST) Received: by mail-pl1-x643.google.com with SMTP id g9so1475606plm.6 for ; Tue, 07 May 2019 15:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zqjU7Kqphpvey584m7PYkn4clDjLsGfPvcRFWol1jUw=; b=QpLCCGwMqhVERlHz2h8cPPE5/geeHbfdAPQfGoqNtq2z5wglciwshLpXhmAVsKaFSw lIMtHGDVZo7++JRdjrfCCst3KKZUEdp0aUfI8Z0cW25aLR/DBnVAxrtdOFjZCfu6XUJw sCgkEyvyXfqTq91STfwwu26tyeR8rna1xe4R7vLmzjTXFT2ycSJjs4KG5793YqS6ASMZ o5wS/YkLzgEZcFyyVMPC91mfWOIeBGa90Ts6FmpTf0X9c0wlwiGaqOdaH2uNOq8TcNWC ax6qRS+HBFzjcaH0ET9iVH1QZ3ldp+aUPMAj2FU3bXgoPmQkMNJ96CChuuCaKvA74wVX WQ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zqjU7Kqphpvey584m7PYkn4clDjLsGfPvcRFWol1jUw=; b=jCb2Pwl1JSP/YK/RoBJki1da3t0m59YgRvBCvTuacgoJ4YUIMyheBPQOsfyoqeWaRU D+fp5FKm0nMpp2YXdL74Y161C/Tdg3TMGILpzyNl4v/lRpb//lo9P/J+SG3RxaDTX73k EoL8W+taRJt1L6/7B4MPvDjKml9MSgRcUMGWc7Nekfh5mKrso49SkDaqHFjaUlzzgLQa YBRWJOoK6pmh9Wb34Z6aauDGAjkO8Q+D81H1QVL/uskIqfniugAp46lvjuGV5KgEkqte 9BlNIlgFi8Mkb3D2lDWPuSFCvwM2Y3DlWbGp/bje3Hih7jLwnZyCBWzH0JSgX5HexjWz NLmg== X-Gm-Message-State: APjAAAVPjSwUA6jZBj8kjDr2tyfyh2KAw2GcQedztQ5jCU25GJ7nsHqu ujNVpjMyLjBKNBCBHpiybo4= X-Google-Smtp-Source: APXvYqxOHVoT3+eSkoT/sHSCD3EM9x42XnLI9W5qBxIp/iNIOiJsrzdiJ2SmN3NZi3fIiQPqv+GMVA== X-Received: by 2002:a17:902:2bc5:: with SMTP id l63mr44418160plb.202.1557269486243; Tue, 07 May 2019 15:51:26 -0700 (PDT) Received: from localhost ([2601:640:2:82fb:19d3:11c4:475e:3daa]) by smtp.gmail.com with ESMTPSA id z124sm19980997pfz.116.2019.05.07.15.51.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 15:51:25 -0700 (PDT) From: Yury Norov X-Google-Original-From: Yury Norov To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Breno Leitao , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc: restore current_thread_info() Date: Tue, 7 May 2019 15:51:21 -0700 Message-Id: <20190507225121.18676-1-ynorov@marvell.com> X-Mailer: git-send-email 2.17.1 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: Yury Norov , Yury Norov Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Commit ed1cd6deb013 ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK") removes the function current_thread_info(). It's wrong because the function is used in non-arch code and is part of API. For my series of arm64/ilp32, after applying the patch https://github.com/norov/linux/commit/b269e51eee66ffec3008a3effb12363b91754e49 it causes build break. This patch restores current_thread_info(). Signed-off-by: Yury Norov --- arch/powerpc/include/asm/thread_info.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 8e1d0195ac36..f700bc80a607 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -19,6 +19,7 @@ #ifndef __ASSEMBLY__ #include +#include #include #include #include @@ -57,6 +58,11 @@ struct thread_info { #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) /* how to get the thread information struct from C */ +static inline struct thread_info *current_thread_info(void) +{ + return (struct thread_info *)current; +} + extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #ifdef CONFIG_PPC_BOOK3S_64 -- 2.17.1