* [PATCH] default VM flags for upwards-growing stacks
@ 2002-10-16 18:42 Matthew Wilcox
2002-10-16 18:56 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2002-10-16 18:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
diff -urpNX build-tools/dontdiff linus-2.5/include/linux/mm.h parisc-2.5/include/linux/mm.h
--- linus-2.5/include/linux/mm.h Tue Oct 8 10:54:13 2002
+++ parisc-2.5/include/linux/mm.h Tue Oct 8 16:49:15 2002
@@ -106,7 +106,11 @@ struct vm_area_struct {
#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
-#define VM_STACK_FLAGS (0x00000100 | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
+#ifdef ARCH_STACK_GROWSUP
+#define VM_STACK_FLAGS (VM_GROWSUP | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
+#else
+#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
+#endif
#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK
--
Revolutions do not require corporate support.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] default VM flags for upwards-growing stacks
2002-10-16 18:42 [PATCH] default VM flags for upwards-growing stacks Matthew Wilcox
@ 2002-10-16 18:56 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2002-10-16 18:56 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Linus Torvalds, linux-kernel
Matthew Wilcox wrote:
> diff -urpNX build-tools/dontdiff linus-2.5/include/linux/mm.h parisc-2.5/include/linux/mm.h
> --- linus-2.5/include/linux/mm.h Tue Oct 8 10:54:13 2002
> +++ parisc-2.5/include/linux/mm.h Tue Oct 8 16:49:15 2002
> @@ -106,7 +106,11 @@ struct vm_area_struct {
> #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
> #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
>
> -#define VM_STACK_FLAGS (0x00000100 | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
> +#ifdef ARCH_STACK_GROWSUP
> +#define VM_STACK_FLAGS (VM_GROWSUP | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
> +#else
> +#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
> +#endif
is it worth it to crease a VM_GROW_DIR define instead?
then there is no ifdef in linux/mm.h, just an arch-dependent define.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-16 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-16 18:42 [PATCH] default VM flags for upwards-growing stacks Matthew Wilcox
2002-10-16 18:56 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox