* [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h>.
@ 2010-07-02 17:41 Chris Metcalf
2010-07-02 17:41 ` Chris Metcalf
2010-07-04 16:56 ` Matthew Wilcox
0 siblings, 2 replies; 3+ messages in thread
From: Chris Metcalf @ 2010-07-02 17:41 UTC (permalink / raw)
To: linux-kernel, linux-arch, Linus Torvalds
Cc: Matthew Wilcox, Christoph Hellwig, Alexey Dobriyan, Arnd Bergmann
This allows a list_head (or hlist_head, etc.) to be used from places
that used to be impractical, in particular <asm/processor.h>, which
used to cause include file recursion: <linux/list.h> includes
<linux/prefetch.h>, which always includes <asm/processor.h> for the
prefetch macros, as well as <asm/system.h>, which often includes
<asm/processor.h> directly or indirectly.
This avoids a lot of painful workaround hackery on the tile
architecture, where we use a list_head in the thread_struct to chain
together tasks that are activated on a particular hardwall.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
Folks on the Cc: list who commented on the -v1 patch, let me know
if I can add your Acked-by to this patch. Thanks.
include/linux/list.h | 13 +------------
include/linux/types.h | 12 ++++++++++++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/linux/list.h b/include/linux/list.h
index 8392884..bc43e8a 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
+#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/poison.h>
#include <linux/prefetch.h>
@@ -16,10 +17,6 @@
* using the generic single-entry routines.
*/
-struct list_head {
- struct list_head *next, *prev;
-};
-
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
@@ -551,14 +548,6 @@ static inline void list_splice_tail_init(struct list_head *list,
* You lose the ability to access the tail in O(1).
*/
-struct hlist_head {
- struct hlist_node *first;
-};
-
-struct hlist_node {
- struct hlist_node *next, **pprev;
-};
-
#define HLIST_HEAD_INIT { .first = NULL }
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
diff --git a/include/linux/types.h b/include/linux/types.h
index 23d237a..336cc39 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -197,6 +197,18 @@ typedef struct {
} atomic64_t;
#endif
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+struct hlist_head {
+ struct hlist_node *first;
+};
+
+struct hlist_node {
+ struct hlist_node *next, **pprev;
+};
+
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h>.
2010-07-02 17:41 [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h> Chris Metcalf
@ 2010-07-02 17:41 ` Chris Metcalf
2010-07-04 16:56 ` Matthew Wilcox
1 sibling, 0 replies; 3+ messages in thread
From: Chris Metcalf @ 2010-07-02 17:41 UTC (permalink / raw)
To: linux-kernel, linux-arch, Linus Torvalds
Cc: Matthew Wilcox, Christoph Hellwig, Alexey Dobriyan, Arnd Bergmann
This allows a list_head (or hlist_head, etc.) to be used from places
that used to be impractical, in particular <asm/processor.h>, which
used to cause include file recursion: <linux/list.h> includes
<linux/prefetch.h>, which always includes <asm/processor.h> for the
prefetch macros, as well as <asm/system.h>, which often includes
<asm/processor.h> directly or indirectly.
This avoids a lot of painful workaround hackery on the tile
architecture, where we use a list_head in the thread_struct to chain
together tasks that are activated on a particular hardwall.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
Folks on the Cc: list who commented on the -v1 patch, let me know
if I can add your Acked-by to this patch. Thanks.
include/linux/list.h | 13 +------------
include/linux/types.h | 12 ++++++++++++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/linux/list.h b/include/linux/list.h
index 8392884..bc43e8a 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
+#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/poison.h>
#include <linux/prefetch.h>
@@ -16,10 +17,6 @@
* using the generic single-entry routines.
*/
-struct list_head {
- struct list_head *next, *prev;
-};
-
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
@@ -551,14 +548,6 @@ static inline void list_splice_tail_init(struct list_head *list,
* You lose the ability to access the tail in O(1).
*/
-struct hlist_head {
- struct hlist_node *first;
-};
-
-struct hlist_node {
- struct hlist_node *next, **pprev;
-};
-
#define HLIST_HEAD_INIT { .first = NULL }
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
diff --git a/include/linux/types.h b/include/linux/types.h
index 23d237a..336cc39 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -197,6 +197,18 @@ typedef struct {
} atomic64_t;
#endif
+struct list_head {
+ struct list_head *next, *prev;
+};
+
+struct hlist_head {
+ struct hlist_node *first;
+};
+
+struct hlist_node {
+ struct hlist_node *next, **pprev;
+};
+
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h>.
2010-07-02 17:41 [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h> Chris Metcalf
2010-07-02 17:41 ` Chris Metcalf
@ 2010-07-04 16:56 ` Matthew Wilcox
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2010-07-04 16:56 UTC (permalink / raw)
To: Chris Metcalf
Cc: linux-kernel, linux-arch, Linus Torvalds, Christoph Hellwig,
Alexey Dobriyan, Arnd Bergmann
On Fri, Jul 02, 2010 at 01:41:14PM -0400, Chris Metcalf wrote:
> This allows a list_head (or hlist_head, etc.) to be used from places
> that used to be impractical, in particular <asm/processor.h>, which
> used to cause include file recursion: <linux/list.h> includes
> <linux/prefetch.h>, which always includes <asm/processor.h> for the
> prefetch macros, as well as <asm/system.h>, which often includes
> <asm/processor.h> directly or indirectly.
>
> This avoids a lot of painful workaround hackery on the tile
> architecture, where we use a list_head in the thread_struct to chain
> together tasks that are activated on a particular hardwall.
>
> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-04 16:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02 17:41 [PATCH -v2] Move list types from <linux/list.h> to <linux/types.h> Chris Metcalf
2010-07-02 17:41 ` Chris Metcalf
2010-07-04 16:56 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).