Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646031 > unrolled thread
| Started by | Babu Moger <babu.moger@oracle.com> |
|---|---|
| First post | 2017-05-20 02:20 +0200 |
| Last post | 2017-05-23 01:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c Babu Moger <babu.moger@oracle.com> - 2017-05-20 02:20 +0200
Re: [PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c David Miller <davem@davemloft.net> - 2017-05-22 21:10 +0200
Re: [PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c Babu Moger <babu.moger@oracle.com> - 2017-05-23 00:00 +0200
Re: [PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c David Miller <davem@davemloft.net> - 2017-05-23 01:10 +0200
| From | Babu Moger <babu.moger@oracle.com> |
|---|---|
| Date | 2017-05-20 02:20 +0200 |
| Subject | [PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c |
| Message-ID | <tJ0hI-1Ey-13@gated-at.bofh.it> |
Some architectures use the following guard in include file
"asm/spinlock_types.h" to discourage including the file directly.
Saw these compile errors on SPARC when queued rwlock feature is enabled.
CC kernel/locking/qrwlock.o
In file included from ./include/asm-generic/qrwlock_types.h:5,
from ./arch/sparc/include/asm/qrwlock.h:4,
from kernel/locking/qrwlock.c:24:
./arch/sparc/include/asm/spinlock_types.h:5:3: error:
#error "please don't include this file directly"
Re-arrange the includes in qrwlock_types.h and include spinlock.h
in qrwlock.c to fix it.
Also will be removing this stanza from SPARC. Stay tuned.
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
include/asm-generic/qrwlock_types.h | 6 +++---
kernel/locking/qrwlock.c | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/asm-generic/qrwlock_types.h b/include/asm-generic/qrwlock_types.h
index 0abc6b6..3988c7d 100644
--- a/include/asm-generic/qrwlock_types.h
+++ b/include/asm-generic/qrwlock_types.h
@@ -1,9 +1,6 @@
#ifndef __ASM_GENERIC_QRWLOCK_TYPES_H
#define __ASM_GENERIC_QRWLOCK_TYPES_H
-#include <linux/types.h>
-#include <asm/spinlock_types.h>
-
/*
* The queue read/write lock data structure
*/
@@ -18,4 +15,7 @@
.wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
}
+#include <linux/types.h>
+#include <linux/spinlock_types.h>
+
#endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */
diff --git a/kernel/locking/qrwlock.c b/kernel/locking/qrwlock.c
index cc3ed0c..2655f26 100644
--- a/kernel/locking/qrwlock.c
+++ b/kernel/locking/qrwlock.c
@@ -20,6 +20,7 @@
#include <linux/cpumask.h>
#include <linux/percpu.h>
#include <linux/hardirq.h>
+#include <linux/spinlock.h>
#include <asm/qrwlock.h>
/*
--
1.7.1
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-05-22 21:10 +0200 |
| Message-ID | <tK0Sl-19u-7@gated-at.bofh.it> |
| In reply to | #1646031 |
From: Babu Moger <babu.moger@oracle.com> Date: Fri, 19 May 2017 18:16:55 -0600 > Some architectures use the following guard in include file > "asm/spinlock_types.h" to discourage including the file directly. > > Saw these compile errors on SPARC when queued rwlock feature is enabled. > > CC kernel/locking/qrwlock.o > In file included from ./include/asm-generic/qrwlock_types.h:5, > from ./arch/sparc/include/asm/qrwlock.h:4, > from kernel/locking/qrwlock.c:24: > ./arch/sparc/include/asm/spinlock_types.h:5:3: error: > #error "please don't include this file directly" > > Re-arrange the includes in qrwlock_types.h and include spinlock.h > in qrwlock.c to fix it. > > Also will be removing this stanza from SPARC. Stay tuned. > > Signed-off-by: Babu Moger <babu.moger@oracle.com> > Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com> > Reviewed-by: Jane Chu <jane.chu@oracle.com> > Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> > Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com> In my feedback I said to remove that check from sparc's asm/spinlock_types.h header. Which you do in patch #2 But that means this patch #1 here is no longer necessary, since we conform to the hearder scheme used by other architectures using queued locks. So please remove this patch from the series. Thank you.
[toc] | [prev] | [next] | [standalone]
| From | Babu Moger <babu.moger@oracle.com> |
|---|---|
| Date | 2017-05-23 00:00 +0200 |
| Message-ID | <tK3wS-2DV-21@gated-at.bofh.it> |
| In reply to | #1647271 |
On 5/22/2017 2:03 PM, David Miller wrote: > From: Babu Moger <babu.moger@oracle.com> > Date: Fri, 19 May 2017 18:16:55 -0600 > >> Some architectures use the following guard in include file >> "asm/spinlock_types.h" to discourage including the file directly. >> >> Saw these compile errors on SPARC when queued rwlock feature is enabled. >> >> CC kernel/locking/qrwlock.o >> In file included from ./include/asm-generic/qrwlock_types.h:5, >> from ./arch/sparc/include/asm/qrwlock.h:4, >> from kernel/locking/qrwlock.c:24: >> ./arch/sparc/include/asm/spinlock_types.h:5:3: error: >> #error "please don't include this file directly" >> >> Re-arrange the includes in qrwlock_types.h and include spinlock.h >> in qrwlock.c to fix it. >> >> Also will be removing this stanza from SPARC. Stay tuned. >> >> Signed-off-by: Babu Moger <babu.moger@oracle.com> >> Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com> >> Reviewed-by: Jane Chu <jane.chu@oracle.com> >> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> >> Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com> > In my feedback I said to remove that check from > sparc's asm/spinlock_types.h header. > > Which you do in patch #2 > > But that means this patch #1 here is no longer necessary, since we > conform to the hearder scheme used by other architectures using queued > locks. > > So please remove this patch from the series. Sorry. I did not make it clear. Patch #2 addresses this following problem. ./arch/sparc/include/asm/spinlock_types.h:5:3: error: #error "please don't include this file directly" But we still have this following problem. So we needed part of the patch #1. CC kernel/locking/qrwlock.o kernel/locking/qrwlock.c: In function ‘queued_read_lock_slowpath’: kernel/locking/qrwlock.c:89: error: implicit declaration of function ‘arch_spin_lock’ kernel/locking/qrwlock.c:102: error: implicit declaration of function ‘arch_spin_unlock’ make[4]: *** [kernel/locking/qrwlock.o] Error 1 To address this we need following change. ============================================ diff --git a/kernel/locking/qrwlock.c b/kernel/locking/qrwlock.c index cc3ed0c..2655f26 100644 --- a/kernel/locking/qrwlock.c +++ b/kernel/locking/qrwlock.c @@ -20,6 +20,7 @@ #include <linux/cpumask.h> #include <linux/percpu.h> #include <linux/hardirq.h> +#include <linux/spinlock.h> #include <asm/qrwlock.h> /* I will update the patch set with the above information. Does that work? > Thank you.
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-05-23 01:10 +0200 |
| Message-ID | <tK4CB-3wR-3@gated-at.bofh.it> |
| In reply to | #1647434 |
From: Babu Moger <babu.moger@oracle.com> Date: Mon, 22 May 2017 16:57:39 -0500 > I will update the patch set with the above information. Does that > work? Yes it does, I didn't realize there were multiple problems. Thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web