]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Documentation: x86: convert entry_64.txt to reST
authorChangbin Du <changbin.du@gmail.com>
Wed, 8 May 2019 15:21:20 +0000 (23:21 +0800)
committerJonathan Corbet <corbet@lwn.net>
Wed, 8 May 2019 20:34:09 +0000 (14:34 -0600)
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 <changbin.du@gmail.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/x86/entry_64.rst [moved from Documentation/x86/entry_64.txt with 95% similarity]
Documentation/x86/index.rst

similarity index 95%
rename from Documentation/x86/entry_64.txt
rename to Documentation/x86/entry_64.rst
index c1df8eba9dfd4dca604dd11c06b40fa4413bc89b..a48b3f6ebbe87b67ffae0be3a64618d858d6fca4 100644 (file)
@@ -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:
 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
 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)
 
        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
        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
 
        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
        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
 
 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
index f6f4e0fc79f215220048ef012cf3bab55e846645..0e3e734587387a33a8958a5585cd96ed2793cebf 100644 (file)
@@ -12,3 +12,4 @@ x86-specific Documentation
    topology
    exception-tables
    kernel-stacks
    topology
    exception-tables
    kernel-stacks
+   entry_64