* [uml-devel] [PATCH 1/2] UML - Use get_free_pages to allocate kernel stacks
@ 2007-06-19 18:42 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-06-19 18:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel
For some reason, I was using kmalloc instead of get_free_pages for
kernel stacks.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
include/asm-um/thread_info.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux-2.6.21-mm/include/asm-um/thread_info.h
===================================================================
--- linux-2.6.21-mm.orig/include/asm-um/thread_info.h 2007-06-19 12:23:16.000000000 -0400
+++ linux-2.6.21-mm/include/asm-um/thread_info.h 2007-06-19 14:06:36.000000000 -0400
@@ -54,8 +54,10 @@ static inline struct thread_info *curren
/* thread information allocation */
#define alloc_thread_info(tsk) \
- ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
-#define free_thread_info(ti) kfree(ti)
+ ((struct thread_info *) __get_free_pages(GFP_KERNEL, \
+ CONFIG_KERNEL_STACK_ORDER))
+#define free_thread_info(ti) \
+ free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER)
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/2] UML - Use get_free_pages to allocate kernel stacks
@ 2007-06-19 18:42 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-06-19 18:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel
For some reason, I was using kmalloc instead of get_free_pages for
kernel stacks.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
include/asm-um/thread_info.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux-2.6.21-mm/include/asm-um/thread_info.h
===================================================================
--- linux-2.6.21-mm.orig/include/asm-um/thread_info.h 2007-06-19 12:23:16.000000000 -0400
+++ linux-2.6.21-mm/include/asm-um/thread_info.h 2007-06-19 14:06:36.000000000 -0400
@@ -54,8 +54,10 @@ static inline struct thread_info *curren
/* thread information allocation */
#define alloc_thread_info(tsk) \
- ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
-#define free_thread_info(ti) kfree(ti)
+ ((struct thread_info *) __get_free_pages(GFP_KERNEL, \
+ CONFIG_KERNEL_STACK_ORDER))
+#define free_thread_info(ti) \
+ free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER)
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-19 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 18:42 [uml-devel] [PATCH 1/2] UML - Use get_free_pages to allocate kernel stacks Jeff Dike
2007-06-19 18:42 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.