Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2701629yba; Mon, 6 May 2019 10:11:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI80RH+BTpjHo8noK/w1n6VKJFjKASmgj6o25we9kaHV4w1bInpzzw/uU+q09fqgoZilKr X-Received: by 2002:a05:6a00:cc:: with SMTP id e12mr35062631pfj.207.1557162699277; Mon, 06 May 2019 10:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557162699; cv=none; d=google.com; s=arc-20160816; b=QtJ9YerE2utClFo8ni9f8PI24kSz75rvfDzLPBVGCT4nNcDqmMd6Hn5sRJpNUmivXu BfCHQ+Z5ZSQLJf6Tft4lFAbU3xqcC8jVOPaMUdJrfz26UVDQjPx3eDAFvzcZi8Q8fHMo qD8kdi1OK+hqpqJRYvogalTv5eRQDJ9j//55Lt5GqCkfUCYNERIcmMiwXvwJbAK0MkSv blZVrRNa6sJNRVEAL+2DCmNpk8be6H5hMkzhV1ecJIGOV/z3ttUKA+3jI0U4TsUX5RGz EgfXbkbBPOd2lW2BZCcwEiVsWx8du3xkv0Ha3pXXB/ABxr1KdATvabtc7Qq4/Gw1PYxq PQ3Q== 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=kz9z+vrxRss6ADc2Ryf9GPPnaohJY3L9Zi4wQlG1zCNq5daFvSkz/ycTKUONWH1avo wHGdh+yWdytac8ySL7aU50B/jMGIyCfwVzqn6ZQClEMdHoSwXf58NMKu+p6LZm/OpGcp KssH2nwY7H5j5NvvYiAO6V+mjGA/nP5bu/AGXPLWoo0q7ao0kD83pzVklILEGY/BKwnu Bd79BvNF+/kUtkW0LK5Q1OpQ7iRoRzimKItEWCQzUPl4THaIm9OuZatzKu1fALxgXW9M uW5IVa5k0CJwtQvJ8xqi0Wrewync6mPhVFouOwo+YaxSmRjskTp65hHLhX429j2k9q4h de2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sH1CFh69; 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 c139si16830514pfb.161.2019.05.06.10.11.23; Mon, 06 May 2019 10:11:39 -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=sH1CFh69; 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 S1727248AbfEFRKO (ORCPT + 99 others); Mon, 6 May 2019 13:10:14 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46652 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727198AbfEFRKM (ORCPT ); Mon, 6 May 2019 13:10:12 -0400 Received: by mail-pl1-f195.google.com with SMTP id bi2so6663091plb.13; Mon, 06 May 2019 10:10:12 -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=sH1CFh69/1vzhJ4mvrmpiIBYsz/lqzE8RXLBEqSOa7HJa554r5XY2L42UFRDsHOIAj YxiTKhOaLsl8gQrDbOMMFfHS0iNMZPCQeIrTXA6K8lBlaaFpTe/Gzcr99pCVN4ByaIKH foXk7q9aSZQMUzcontxQ3YnHLCNcsEerM0woPSGMOOIxPwVTV9KSGdGB93v9QELzf4HC nP+REXAJVqLIjeD8wwkqEPSe8PYCtHUVs5sptmyx7h1q66XakwaVIAV8/GuWBmckew+W nWVPUAfMtZxvUmmvy/U8Q26RHmEmIOBLadl251QF603OKgP/RivV4K8FrN9doHAxBVQa S1Fw== 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=YTOwPgZGgSy/ZRmw6z7dFeq1lFoXSOwxw+0darUQU0txkb0Dt/Ssagjth+HM/0456N qPlOZvm+d75bTioeqtrX0y6lixKMTYkpFO1tAJr4F6fLFYrAD2jGDWU+YTnsjZB7HFBG eF+RNPv7JkFRGuYGSFWtq+y4GmKjwc8GPeofxitY5Oj/oyjHbDVc/U4XtnT9pPhaDT5c QLwvcFG0XRLzgaeZwziiIOtNJGHP0jaAuTIPmklDAngrGz01pyQ07uFPVKt1nQTFlDOe YvqqEAk6eBFXB7XVZ7bl2bJcH4tbprZi2l6YNb6kXs1rzFJluynCAU8foY8sCP4IScju oLzw== X-Gm-Message-State: APjAAAUiamlZa6p69j/mfAauKHucZS4lUXaCsz0ywvvFOZKzabCnMQbD xJa19cJK/on6yQ44WrESqrg= X-Received: by 2002:a17:902:6b:: with SMTP id 98mr33768516pla.271.1557162611917; Mon, 06 May 2019 10:10:11 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id h13sm11045680pgk.55.2019.05.06.10.10.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 06 May 2019 10:10:11 -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 v3 06/27] Documentation: x86: convert entry_64.txt to reST Date: Tue, 7 May 2019 01:09:02 +0800 Message-Id: <20190506170923.7117-7-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190506170923.7117-1-changbin.du@gmail.com> References: <20190506170923.7117-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