Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3790230yba; Tue, 23 Apr 2019 09:38:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjcD1wWTo+DJoKsFSTbaCW8DR8jHKwN4GYdTu2GSc0Q9syr6U340ITIRD4vWZqmopzG1sd X-Received: by 2002:a65:4105:: with SMTP id w5mr25220710pgp.222.1556037509704; Tue, 23 Apr 2019 09:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556037509; cv=none; d=google.com; s=arc-20160816; b=ke8u1PrHA8rbQ7YKwhJpnjIOuv3b6YxWg/O/mn/0N6nA7k7q+5zTKzxJo932g6vLSp hbQYQO4eJSJTCJzewcb0B7eLPkwc7TQipixA4kSkTX9JsyodGGsoePCWNEdJxOwrbBmG TScmV+SiXaRrt5PbU37IfWBaNMXdR/4GIWgsTNN3n8R5gvcbUCMCnVlsD3ASsQDKciHm MlFc6xBqXhEBpEva17/alXyHNEA7vv8pnREtcIXCV+npCO8nJ4bi0VpK88pztPDVPxHx h1o2gAS2Zn9LQxpzv96drsVbB/3ZPUBd/oMHmjwQIn44xAr51AItF+KMzTfsOPBftgqN 9u5A== 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=Qw8iXfD3ItYngoQYik6Jp498D9sHvHA3oeNnrYYHbk4=; b=EpAnA/xWFaEVYobnmaEvPAK5/7Z5uReS2SmDOSFDpUilMgmLGC1e0R0S4aWaQWTmPQ 8JBSZ/QOOOt9lh+jEwdepJuHagc04v57HMY/+F5YfmBgDGmFK/szmHhdAKHx+AU4t8jZ uRQRqA9Z457/yy09LbL3N/iS6e6dsoCMBGRhssDcvFu1AJXAQAZOyLtYzLVTLIo9nqvj jZdBcytsRehWEwVILUN4yfGDJMV5GrwyGoXUZKxuzSCM5l2+Uxl9m9mTTAtPiUKVOus6 lxF16I3Fq2qCn+MpETap4BZPoISWIKsFoX6tb0ZttuX6k6lNwP64xqboSv5T2BPnEfEJ eauQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I0mzGnYK; 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 g3si16124248plp.369.2019.04.23.09.38.13; Tue, 23 Apr 2019 09:38:29 -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=I0mzGnYK; 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 S1729309AbfDWQhY (ORCPT + 99 others); Tue, 23 Apr 2019 12:37:24 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33899 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729222AbfDWQhW (ORCPT ); Tue, 23 Apr 2019 12:37:22 -0400 Received: by mail-pg1-f196.google.com with SMTP id v12so7894186pgq.1; Tue, 23 Apr 2019 09:37:21 -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=Qw8iXfD3ItYngoQYik6Jp498D9sHvHA3oeNnrYYHbk4=; b=I0mzGnYKH8rT9JVDTiND3OLdyKZBv8Wdt4EI9qxW9p4RmNVGlwhHctrXvjjdh7vpSg mxRmxyTOefmI5byVYQSORXjqYmy/dP2/AiAyynRK8RgjPe/SsH0GkbJEZUYIqB6Nxtg4 eaoA3j3f1g5JCf4I/9F3AlAgg7VRFG8j/NAL8RJ/HJ6py57skbUfhYPfn+UompLjczhM fiuL+TQ52EJ425WPZ4RjlBSK2EH9gB8dUiVSRycPlnfMgJM0bewVsE3sRxa46lerinRr HLNDs6WKdbp3hXlP+RJUOXswPNCkCkXIMMOWgKOWsJpvEEsX9b0B6uA3ENhiLIt6txDw SGXw== 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=Qw8iXfD3ItYngoQYik6Jp498D9sHvHA3oeNnrYYHbk4=; b=edQOuW6tTd7z7b8mARLZyYnBakhQP9s25d56UWC7CCMjlvPIVESMoy7QysCSEei6xv kv4xGWvLfqnxCWtDkfIezOkDuH6dvCSYlOtjO7UqB4cnGIHmsorfP2x/H2cpDNrpExow Ec4r1FLf6LQIcQruoZ173bNDpF7xqAEJnmU50mkUf8G8gInHBurh4ZLXGk2Hn+92Brn1 DEWV/XTXEbvD8/exrYh7whz1sdx/OGkcTHGTFIbfjwbWXRByz+j1wtd19memWH3U0DNC D2jU0/dY4tCPL3KziVr6YOWVpoFUPHdbTWSG32y/gflSLP7LlWILAt+J2qt8BfltoWt8 DYDA== X-Gm-Message-State: APjAAAVTp9n9F8YBXWHfnxrIrKTMBiFh7lJnvdieCBfxi76ooSqY1Rka fEFhlL7w0wjPD06wVISrTkE= X-Received: by 2002:a63:5020:: with SMTP id e32mr12883649pgb.215.1556037441246; Tue, 23 Apr 2019 09:37:21 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id v1sm24364801pff.81.2019.04.23.09.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 09:37:20 -0700 (PDT) From: Changbin Du To: Jonathan Corbet Cc: Bjorn Helgaas , rjw@rjwysocki.net, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, fenghua.yu@intel.com, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, mchehab+samsung@kernel.org, Changbin Du Subject: [PATCH v4 42/63] Documentation: x86: convert entry_64.txt to reST Date: Wed, 24 Apr 2019 00:29:11 +0800 Message-Id: <20190423162932.21428-43-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423162932.21428-1-changbin.du@gmail.com> References: <20190423162932.21428-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 --- 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 489f4f4179c4..8a666c5abc85 100644 --- a/Documentation/x86/index.rst +++ b/Documentation/x86/index.rst @@ -12,3 +12,4 @@ Linux x86 Support topology exception-tables kernel-stacks + entry_64 -- 2.20.1