From patchwork Wed Jul 11 11:29:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10519413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4916E6032A for ; Wed, 11 Jul 2018 11:30:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FE5628D22 for ; Wed, 11 Jul 2018 11:30:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E01628D2C; Wed, 11 Jul 2018 11:30:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFD7828D36 for ; Wed, 11 Jul 2018 11:30:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75FB66B026D; Wed, 11 Jul 2018 07:30:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 70F6B6B026E; Wed, 11 Jul 2018 07:30:05 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D8166B026F; Wed, 11 Jul 2018 07:30:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by kanga.kvack.org (Postfix) with ESMTP id F13F56B026D for ; Wed, 11 Jul 2018 07:30:04 -0400 (EDT) Received: by mail-ed1-f71.google.com with SMTP id r21-v6so4648859edp.23 for ; Wed, 11 Jul 2018 04:30:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=aIqyKZx9QGdx7LOKRgxZTEORc/kctYIq0OvYeC/VUCc=; b=AEufbPEPLZ8lljM3dTb/fLcHzjEPtK0CDuGsEhrrZzPUko+UsyDRIGszOv93By6z54 fi0kyl4F4JQGrkgakEGFVuumn+Vgai5vYZtUmszLolagtf2mJJw9jqO7ILDrsAZ8rUrR AvNBo1ylBj4ztAvV2jmbVU86OkTyug4MUDE3np1tqfL25Q9MUgbZlr/NgDH266vRgo3h TW/n3g4cOG2AVxoMGYeHsUhbJg/Sz46CjM/Lm1vcJHUyo89AfJhXTO7OZyPvdzX3k+lr QVeoFfdpRC25choXkav+xwh4LtmZyCeq8F7k75nDnZ/vfUzo5HJroEqrPUE2zt/mMDbH 1MUA== X-Gm-Message-State: APt69E2GRpB5DZPfkuzKg/0tgq+TEiKfvP1ZltAxrBurs6+piaTlWllG YDQ9tz9VUtAJJJrchGKEcDgWejuXOv8yO36x8sCIFgP9RfcJ2qyvRpn8XCWr+l2UPI/xpnpyonr 8ktwPZFBKLLrrAo29sB3TNL7FXy+cSp+yASqLoINf/omwgneKwQZb3NkjJ9bicPwSDw== X-Received: by 2002:a50:955e:: with SMTP id v30-v6mr31596744eda.268.1531308604562; Wed, 11 Jul 2018 04:30:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf0hjJ+nfGl/zOyhj3ZWNUGV+I3tBvluYMSqRbhyCOpYvga1yHgmD/0kO7njOgIcxNuVi8P X-Received: by 2002:a50:955e:: with SMTP id v30-v6mr31596711eda.268.1531308603933; Wed, 11 Jul 2018 04:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531308603; cv=none; d=google.com; s=arc-20160816; b=btf7PSWNIqIQskHuJ32kQRnUqOdIDoQFY2He96xMNL6o8k/IrOfQhsea9h51zTz/7a JPt+g6zX9S8Z/GumS2LrHmw2KytiLdcj8RNcS8QHGUIAwul6MIXz4QLk0iOLPCRu9Mz8 CCq1/eFwA0xNhKNFCceDEpvIEs+JXlfcEvmwbUsqOSpxOqXfNwyhfJWqr/63e9rTZ83f ya52jNVqL3KTULb/AK531JtH2Ftquci9rMaz7A+76v4iA/HnMK6ZfUBEsKv1xFCeyGRn EtC5l07L04QTNg+HO5N+fIYtCgL3DUsTYoPyDaQQ282/VQVvjIg8n3F1FkonXnrFA7K5 GuRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=aIqyKZx9QGdx7LOKRgxZTEORc/kctYIq0OvYeC/VUCc=; b=X7b3ujNkF3CWL6nrX2rqoUfPZz0atDfNHhk4CQn/VzjBIm0JM8r7eGs89C0kjFMwfc g6ludNc+wD5MAyoTXHewnOzFqG6aBi73lPsWt9i1CSug4i8ViYZoivfZAC33yxvwkZ67 Y6M4xhYdh9lJfHqbSyX/gY82BX8rZAQoio1eiKtXGi7EGpC84cJbtMP1S+qZg/bfiiUF FyfUtqYAgjJWNwHtyshuUeZqBGd1LTRt+Yihg9PgIdFCdvKxiZIL5e1YaoGeL3rvBCTH s2JqtrnhFbsAZjFAAmQ2rhtIS0mrjH7TG/bp9FKam4RQSWrCMvLGZSMO0St1523Hkx6Y 1NDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=T1m8QWSK; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: from theia.8bytes.org (8bytes.org. [81.169.241.247]) by mx.google.com with ESMTPS id j60-v6si7188705edb.63.2018.07.11.04.30.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 04:30:03 -0700 (PDT) Received-SPF: pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) client-ip=81.169.241.247; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=T1m8QWSK; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: by theia.8bytes.org (Postfix, from userid 1000) id 8E0AF684; Wed, 11 Jul 2018 13:29:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1531308599; bh=pdJphKqrJrdhCHnjF29WnK2jNYpxwmenjYXPOsr8GlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T1m8QWSKDq6jJObwbmBeOnIrtyJhTyDgdQ51SVJeEq6EBqkS+vAGRG8Rk7jXeYU/N 2W8TeKUU9IjnyYZ26TVMxa3AiG7SVgovXE2iV9ROqRjpeGZDvc+L3zPTRF1wNBbpml oKnqnD1LPsoCGtRlFm6ghpgiAfsMY0tnCeHNuO+0mTJ9R7DTi8xeGX2ifquUGQ3slj m6/aoVg6kFwlKaVZZD1G/JfK3ItRqPvQtHgPD+sjvnga9B4d86VBObIBv4RRH8W+qi PJlkg7sq0GNsvEzs4jgpEcd+zyHvrGn5ipzJeLzE0Fp1An4ZrKK0CZ7Kmv3gXWRBzw NswZ0ZNfLtluw== From: Joerg Roedel To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 01/39] x86/asm-offsets: Move TSS_sp0 and TSS_sp1 to asm-offsets.c Date: Wed, 11 Jul 2018 13:29:08 +0200 Message-Id: <1531308586-29340-2-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531308586-29340-1-git-send-email-joro@8bytes.org> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Joerg Roedel These offsets will be used in 32 bit assembly code as well, so make them available for all of x86 code. Signed-off-by: Joerg Roedel Reviewed-by: Andy Lutomirski --- arch/x86/kernel/asm-offsets.c | 4 ++++ arch/x86/kernel/asm-offsets_64.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c index dcb008c..a1e1628 100644 --- a/arch/x86/kernel/asm-offsets.c +++ b/arch/x86/kernel/asm-offsets.c @@ -103,4 +103,8 @@ void common(void) { OFFSET(CPU_ENTRY_AREA_entry_trampoline, cpu_entry_area, entry_trampoline); OFFSET(CPU_ENTRY_AREA_entry_stack, cpu_entry_area, entry_stack_page); DEFINE(SIZEOF_entry_stack, sizeof(struct entry_stack)); + + /* Offset for sp0 and sp1 into the tss_struct */ + OFFSET(TSS_sp0, tss_struct, x86_tss.sp0); + OFFSET(TSS_sp1, tss_struct, x86_tss.sp1); } diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index b2dcd16..3b9405e 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c @@ -65,8 +65,6 @@ int main(void) #undef ENTRY OFFSET(TSS_ist, tss_struct, x86_tss.ist); - OFFSET(TSS_sp0, tss_struct, x86_tss.sp0); - OFFSET(TSS_sp1, tss_struct, x86_tss.sp1); BLANK(); #ifdef CONFIG_STACKPROTECTOR