From patchwork Wed Jul 18 09:40:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10531787 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 B6ED460547 for ; Wed, 18 Jul 2018 09:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8C5028FD5 for ; Wed, 18 Jul 2018 09:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BD4C29077; Wed, 18 Jul 2018 09:41:28 +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 8CCAB28FD5 for ; Wed, 18 Jul 2018 09:41:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7ECFF6B026B; Wed, 18 Jul 2018 05:41:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 79DC06B026D; Wed, 18 Jul 2018 05:41:23 -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 664B26B026E; Wed, 18 Jul 2018 05:41:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 0516C6B026B for ; Wed, 18 Jul 2018 05:41:23 -0400 (EDT) Received: by mail-ed1-f69.google.com with SMTP id p7-v6so1687710eds.19 for ; Wed, 18 Jul 2018 02:41:22 -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=RFDqhADx8GK2kugkZj5Y75LbDcSOVCJo1MV4o9qm70k=; b=oaexZzFX1n1KkjGngqIOvJb7sDx2RYjJXmVxJWRs/rPDjqyo5w5q9esErI+c3uNlIQ qV9+6h3L9fUze0QlTlD9dvplLksQFE2hPj5091bE7s8pe4EbflpGAnSrDbVnDhTcedOR RsGQLkFDYVpmIQ9RlOyMQyv/do6jIaRLaKwlMWBuztaHKxCC81xc+fUyx7OlhFapp/We ShztrA322VdQfWA/Ouv6KKNIz4kf55ovrR6Nkavkuqnog210KpTOHhWqS4EpIyim2GJ/ hI9OsW9gcSUbwr3KKgLbuS5gFhxH+6TyahvBQcn+Sx5FOS0t5YZdDDHERl9mz/2C06bq XwMg== X-Gm-Message-State: AOUpUlHSjyUSYq+7G+9koO8Vtkji4rGxl9I2c7szhDy6fTifprnxdwPt nOYYBmZrSVnW0zNfJjVVN9I+mmD9mk7NXVk9ULnLrhxZ7RAIIZMsmWuVt6MX5p/XWluiYrwFcdF RleJ4DWiKpn0f/iAmTMFah1UkHcm6LheUhjuQhf6cudqCs0OA/UzD2d4H6vtdOpps2A== X-Received: by 2002:a50:9704:: with SMTP id c4-v6mr6085789edb.246.1531906882585; Wed, 18 Jul 2018 02:41:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpch+qylS7s1Pw9TV7jZEnfQLN2HO9gMFvIF46gFCyyjZBmg9vcu7G8pCpeeMMjyB37H9L5i X-Received: by 2002:a50:9704:: with SMTP id c4-v6mr6085742edb.246.1531906881612; Wed, 18 Jul 2018 02:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531906881; cv=none; d=google.com; s=arc-20160816; b=UE9TYn7HfZmWxnWtX8Ks+lXyK9nrioFBAKLhLvDhousGM1nAf72Tg69IvDZdzu2YGv zUA23QyNiU7k0r4Zf5osYLe5KQ1Jq/1f4BZag679+02LJrJ7vE8WPTWOjYF76tBFj8xg Qf9kXcIoJxhHVBAYN8xeBOIXUfYvm6V8Y3LFNhn0DfA0m7PiGzylueTweEF63Xnj1zjO /OKZF9CNnU0zA7ZaAVhd0pqCU5WC2OO0u24/27S41sA1P2bA/646PNdCD+sH/BzetE9D j20UPWZ41ib2aMfurBj4EArizphFqo+dsw8CLrECVGrqifeDZeGBotjZRE+02Z0Ofh7Q qEMA== 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=RFDqhADx8GK2kugkZj5Y75LbDcSOVCJo1MV4o9qm70k=; b=xcWNo1BerMqxT6ouPjwdHLoGo7j8PaEpPn2fTiPtUvB0JwpFmeInlOgZlAJGVeuD2H +zHTR6kbfZMOz756PbdJSxQ//ZKIDm4rvu3P1ijACZWfCJiui/BfO8ArHxLNB3PPna6/ qd1qnDNetJ93uDie02/nZEBppfI7wH2nq1qRTF3zkZwKmzEThoE90eAKzA/vk0e923mh qObkwYH32bF8Fx1qO5sYnrb0NvXdFNsjxfysUujw1/HmUD7wkTOv4YATSMIZYt7oPjBf qe/pusOF4T+fW4yFfkphBQpv6dg1cuFGyafLRVrUE24N2wX313xsY2Z+Z5gCIf/nj9wn n6pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=M8aTQ7Rq; spf=pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 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. [2a01:238:4383:600:38bc:a715:4b6d:a889]) by mx.google.com with ESMTPS id y12-v6si394735edm.280.2018.07.18.02.41.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 02:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 as permitted sender) client-ip=2a01:238:4383:600:38bc:a715:4b6d:a889; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=M8aTQ7Rq; spf=pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 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 9A8E318A; Wed, 18 Jul 2018 11:41:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1531906878; bh=NngLWB5Zz/D4kTj1B09ex8GsGe2+fROaYrvmU++hPyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M8aTQ7RqY/7TZGeKke02i8VLzfX+YOndl2+JAKvc3E32+350LwLRl1RnNP5P8fjMY Gade0nVXHKjwKh89Lg6EsitddeeNOOJobPpk/XPPiPFA3+nVx5SwDTd8Cdr8yKjMoZ Mc8qCcrCKqrRam7Sf27vrf4jO0C1WPKdpHFQWdrywzKV8J1X34/FNQKiX1q6HuhxNO rjnk+y97NB44p97Wn7+rpnajqs7b/zBTXZjoUSahWjwN7lnHgoS2vVeUsEEL8N5t4P qjhDhJXrtm7sDCIFsnMiI1VA4dWHAF6Cir7pgTjsENWrUyc+cRDer3dcF7YxECaYoG MY/ISJBWrXISg== 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, 18 Jul 2018 11:40:38 +0200 Message-Id: <1531906876-13451-2-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531906876-13451-1-git-send-email-joro@8bytes.org> References: <1531906876-13451-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. Reviewed-by: Andy Lutomirski Signed-off-by: Joerg Roedel --- 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