Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5140986yba; Wed, 8 May 2019 08:30:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyanetPdJ0LmwKLzxPICof1wzuskK0aMuZYTthNyk5EtgorsjjYCnWnwaC0ejp+WpusghJK X-Received: by 2002:aa7:914d:: with SMTP id 13mr49601649pfi.149.1557329405006; Wed, 08 May 2019 08:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557329404; cv=none; d=google.com; s=arc-20160816; b=CBmRGFGz1u+oa6MAsj7Kq8TRepigTKG4DztYNTSbcg3jZjKg3/cc4I2rbIv+WvT2ou dvc45VfH7FDe0KQWanAAJnhPrQoLfdxTuWpPEe5oYupcAtJmQJXZet0fd1DySmKZdHAv et/cTRrk+QKeoqYFy7nsiUV9T52s7Nwbp0dG3MLFUrSJwQTUThvNIKtGNpfE+xT3/Mn2 vQXLA/CJ+MxWO3WfXYEoPoW9kdy8uLWJGWqEawTAotdbxqDkyjNUsqV85+/HxhlsRO5i PDE1Lu9AXQRv4c9i1e07qhURoOEk0MYWX7sKVeD4pM9QOQSfTjx57IO7ri5DDNntYWt7 6sEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=894APrpOjqkRmf1J0VMgwVy+KCpHCnfK4NXUp7KFcxc=; b=Zl5IWWhrCb4U/D1K/br3vPvnp1bkkB49yHkK8z7Gg7rsYEGBfBJ5TbKj3+FsYgec8J EdaN3VVIgzZkqkg2f+hWCnnDyK4owLBfALyfFMo6EOwSIxzeHa0bM9X4hetzyX78vKy8 jDvna2TFdzB5vV+MsFl7qjOyBAqTrgiTxoRKGzJl2WJ4XvXpbbbt91GsurEoF0YRivrr 6oFQqokadoDh2gw8o/b/UvH2qwuOdqjxPpyyP1jD5Aj/MtxDQFk3b1QIIqDHkto7y6JD ybq8TIOgvt0YPu/8Hqei+hVQdsyTuKduSdexkue+inOfEZESInJOk4ZOZIDudfOUVzAl 190Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YDn2+nW7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si6171235pfh.227.2019.05.08.08.29.49; Wed, 08 May 2019 08:30:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YDn2+nW7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbfEHPWi (ORCPT + 99 others); Wed, 8 May 2019 11:22:38 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:34288 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbfEHPWi (ORCPT ); Wed, 8 May 2019 11:22:38 -0400 Received: by mail-pg1-f193.google.com with SMTP id c13so10281116pgt.1; Wed, 08 May 2019 08:22:38 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=894APrpOjqkRmf1J0VMgwVy+KCpHCnfK4NXUp7KFcxc=; b=YDn2+nW73kggpJVEGViqDkyNgT4jTwx9VBpGipglBFplCmGlrfEHhDMkApiDfzToee zwC8KWQT55zfuwBf/KxlvHBbYif1caUgobMy6znympRQLrpQOd1ySBcjnGEqOq73i7S1 eFe+ZjYbqWWhbNb7Xmt9RX/dL5d/3pJs6AsZdsTW1pi2J/OeW569D+DMZli1FGoSIYjQ i92D6Z0vgEzS9/b66ZlWs7epvuV873yinI+VoSi/WrAF+texlPWUVFqZpwCaRjdoqd2k fF5rw9wxK41je8DoQ7nbwMEIsvcpWaSPigzYWk4ICjbsV+3urSsT5n9Jj+p+PKlAlV6y V8aA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=894APrpOjqkRmf1J0VMgwVy+KCpHCnfK4NXUp7KFcxc=; b=a3EnYBfLywXqdMqBTc2x5HRL/XcLnUSdx2zCin52fXNIhb8xnCz5PfRCkW+JhNSFzR Pk5HxnSPJ2SJn7W/e5KdVTXXL++LnsG+qazIT684YbH2pXChlYlVYD/2BNQBck/hEvZW aftrReuy6Xyl7bjAyiLYPi7Eyn4wxzulviYdEYHQscKQTJ5UCtL9/xMDboMAmVCSEEkr Smb7pNv21qqkda+ldKtCIklfOLK1yR2HLQwPZluZYyh04fE9cAxJuLXeijGxZYPd8vXb ifu/iJuTkM0QiOwsWO/g4GE7h6XRe67ANn79OLuC41z6dsnEfMoVCBtUsFrzxFLR5MkS wrxQ== X-Gm-Message-State: APjAAAU4PrhWtUAm9z9+SomT7KG3q7QQyKSli5McNAy0B7xxp1zcB7lH tfsfpYU+9vKSZa6uaK8nLQY= X-Received: by 2002:a63:1654:: with SMTP id 20mr48256654pgw.166.1557328957725; Wed, 08 May 2019 08:22:37 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id o73sm7459360pfi.137.2019.05.08.08.22.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 08 May 2019 08:22:37 -0700 (PDT) From: Changbin Du To: corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Changbin Du , Mauro Carvalho Chehab Subject: [PATCH v4 06/27] Documentation: x86: convert entry_64.txt to reST Date: Wed, 8 May 2019 23:21:20 +0800 Message-Id: <20190508152141.8740-7-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190508152141.8740-1-changbin.du@gmail.com> References: <20190508152141.8740-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Reviewed-by: Mauro Carvalho Chehab --- Documentation/x86/{entry_64.txt => entry_64.rst} | 12 +++++++++--- Documentation/x86/index.rst | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) rename Documentation/x86/{entry_64.txt => entry_64.rst} (95%) diff --git a/Documentation/x86/entry_64.txt b/Documentation/x86/entry_64.rst similarity index 95% rename from Documentation/x86/entry_64.txt rename to Documentation/x86/entry_64.rst index c1df8eba9dfd..a48b3f6ebbe8 100644 --- a/Documentation/x86/entry_64.txt +++ b/Documentation/x86/entry_64.rst @@ -1,3 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============== +Kernel Entries +============== + This file documents some of the kernel entries in arch/x86/entry/entry_64.S. A lot of this explanation is adapted from an email from Ingo Molnar: @@ -59,7 +65,7 @@ Now, there's a secondary complication: there's a cheap way to test which mode the CPU is in and an expensive way. The cheap way is to pick this info off the entry frame on the kernel -stack, from the CS of the ptregs area of the kernel stack: +stack, from the CS of the ptregs area of the kernel stack:: xorl %ebx,%ebx testl $3,CS+8(%rsp) @@ -67,7 +73,7 @@ stack, from the CS of the ptregs area of the kernel stack: SWAPGS The expensive (paranoid) way is to read back the MSR_GS_BASE value -(which is what SWAPGS modifies): +(which is what SWAPGS modifies):: movl $1,%ebx movl $MSR_GS_BASE,%ecx @@ -76,7 +82,7 @@ The expensive (paranoid) way is to read back the MSR_GS_BASE value js 1f /* negative -> in kernel */ SWAPGS xorl %ebx,%ebx -1: ret + 1: ret If we are at an interrupt or user-trap/gate-alike boundary then we can use the faster check: the stack will be a reliable indicator of diff --git a/Documentation/x86/index.rst b/Documentation/x86/index.rst index f6f4e0fc79f2..0e3e73458738 100644 --- a/Documentation/x86/index.rst +++ b/Documentation/x86/index.rst @@ -12,3 +12,4 @@ x86-specific Documentation topology exception-tables kernel-stacks + entry_64 -- 2.20.1