lkml.org 
[lkml]   [2018]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] doc:hacking: add labels
Date
Apparently some local links are not properly generated in locking.rst.
This patch use the ':ref:' directive to add the link to the section label.

Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
---
Documentation/kernel-hacking/locking.rst | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst
index f937c0fd11aa..574fc92a6f20 100644
--- a/Documentation/kernel-hacking/locking.rst
+++ b/Documentation/kernel-hacking/locking.rst
@@ -177,7 +177,7 @@ perfect world).

Note that you can also use :c:func:`spin_lock_irq()` or
:c:func:`spin_lock_irqsave()` here, which stop hardware interrupts
-as well: see `Hard IRQ Context <#hardirq-context>`__.
+as well: see :ref:`Hard IRQ Context <hardirq-context>`.

This works perfectly for UP as well: the spin lock vanishes, and this
macro simply becomes :c:func:`local_bh_disable()`
@@ -228,7 +228,7 @@ The Same Softirq
~~~~~~~~~~~~~~~~

The same softirq can run on the other CPUs: you can use a per-CPU array
-(see `Per-CPU Data <#per-cpu>`__) for better performance. If you're
+(see :ref:`Per-CPU Data <per-cpu>`) for better performance. If you're
going so far as to use a softirq, you probably care about scalable
performance enough to justify the extra complexity.

@@ -243,6 +243,8 @@ You'll need to use :c:func:`spin_lock()` and
tasklet, different softirq or the same or another softirq: any of them
could be running on a different CPU.

+.. _`hardirq-context`:
+
Hard IRQ Context
================

@@ -875,6 +877,8 @@ Alan Cox says, “Lock data, not code”.
Common Problems
===============

+.. _`deadlock`:
+
Deadlock: Simple and Advanced
-----------------------------

@@ -1247,6 +1251,8 @@ The benefit here is that the reference count is not written to: the
object is not altered in any way, which is much faster on SMP machines
due to caching.

+.. _`per-cpu`:
+
Per-CPU Data
------------

@@ -1294,6 +1300,8 @@ Naturally, this is slower than just a :c:func:`spin_lock_irq()`
call, so it only makes sense if this type of access happens extremely
rarely.

+.. _`sleeping-things`:
+
What Functions Are Safe To Call From Interrupts?
================================================

--
2.17.1
\
 
 \ /
  Last update: 2018-07-07 00:07    [W:0.070 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site