History

locking/arch: Move qrwlock.h include after qspinlock.h

include/asm-generic/qrwlock.h was trying to get arch_spin_is_locked via asm-generic/qspinlock.h. However, this does not work because architectures might be using queued rwlocks but not queued spinlocks (csky), or because they might be defining their own queued_* macros before including asm/qspinlock.h. To fix this, ensure that asm/spinlock.h always includes qrwlock.h after defining arch_spin_is_locked (either directly for csky, or via asm/qspinlock.h for other architectures). The only inclusion elsewhere is in kernel/locking/qrwlock.c. That one is really unnecessary because the file is only compiled in SMP configurations (config QUEUED_RWLOCKS depends on SMP) and in that case linux/spinlock.h already includes asm/qrwlock.h if needed, via asm/spinlock.h.

Waiman Long committed 5 years ago

Commit d8d0da41 parent 9294b8a6 files · +6 −6Browse files

Showing the changes to kernel (1 of 6 files). Show all

Unified · Split

kernel/locking/qrwlock.c+0−1
@@ -12,7 +12,6 @@ · 11 unmodified lines
12#include <linux/percpu.h>12#include <linux/percpu.h>
13#include <linux/hardirq.h>13#include <linux/hardirq.h>
14#include <linux/spinlock.h>14#include <linux/spinlock.h>
15#include <asm/qrwlock.h>
16 15
17/**16/**
18 * queued_read_lock_slowpath - acquire read lock of a queue rwlock17 * queued_read_lock_slowpath - acquire read lock of a queue rwlock

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t