linux-um archives
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Richard Weinberger <richard@nod.at>
Cc: randy.dunlap@oracle.com,
	user-mode-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, mhocko@suse.cz,
	akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: Re: [uml-devel] [PATCH] um: Clean up vm-flags.h
Date: Thu, 16 Jun 2011 12:27:38 -0700	[thread overview]
Message-ID: <20110616122738.697a7c12.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1308250867-12497-1-git-send-email-richard@nod.at>

On Thu, 16 Jun 2011 21:01:07 +0200 Richard Weinberger wrote:

> There is no need to define VM_{STACK,DATA}_DEFAULT_FLAGS as
> variable.
> It's also useless to test for TIF_IA32 as 64bit UML has no
> IA32 emulation.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> CC: randy.dunlap@oracle.com

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks.

> CC: mhocko@suse.cz
> CC: torvalds@linux-foundation.org
> ---
>  arch/um/sys-x86_64/Makefile                 |    2 +-
>  arch/um/sys-x86_64/mem.c                    |   16 ----------------
>  arch/um/sys-x86_64/shared/sysdep/vm-flags.h |   26 ++++----------------------
>  3 files changed, 5 insertions(+), 39 deletions(-)
>  delete mode 100644 arch/um/sys-x86_64/mem.c
> 
> diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile
> index c1ea9eb..63fe0d2 100644
> --- a/arch/um/sys-x86_64/Makefile
> +++ b/arch/um/sys-x86_64/Makefile
> @@ -4,7 +4,7 @@
>  # Licensed under the GPL
>  #
>  
> -obj-y = bug.o bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \
> +obj-y = bug.o bugs.o delay.o fault.o ldt.o ptrace.o ptrace_user.o \
>  	setjmp.o signal.o stub.o stub_segv.o syscalls.o syscall_table.o \
>  	sysrq.o ksyms.o tls.o
>  
> diff --git a/arch/um/sys-x86_64/mem.c b/arch/um/sys-x86_64/mem.c
> deleted file mode 100644
> index 3f8df8a..0000000
> --- a/arch/um/sys-x86_64/mem.c
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/*
> - * Copyright 2003 PathScale, Inc.
> - *
> - * Licensed under the GPL
> - */
> -
> -#include "linux/mm.h"
> -#include "asm/page.h"
> -#include "asm/mman.h"
> -
> -unsigned long vm_stack_flags = __VM_STACK_FLAGS;
> -unsigned long vm_stack_flags32 = __VM_STACK_FLAGS;
> -unsigned long vm_data_default_flags = __VM_DATA_DEFAULT_FLAGS;
> -unsigned long vm_data_default_flags32 = __VM_DATA_DEFAULT_FLAGS;
> -unsigned long vm_force_exec32 = PROT_EXEC;
> -
> diff --git a/arch/um/sys-x86_64/shared/sysdep/vm-flags.h b/arch/um/sys-x86_64/shared/sysdep/vm-flags.h
> index 3213edf..3978e55 100644
> --- a/arch/um/sys-x86_64/shared/sysdep/vm-flags.h
> +++ b/arch/um/sys-x86_64/shared/sysdep/vm-flags.h
> @@ -7,27 +7,9 @@
>  #ifndef __VM_FLAGS_X86_64_H
>  #define __VM_FLAGS_X86_64_H
>  
> -#define __VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
> -				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
> -#define __VM_STACK_FLAGS 	(VM_GROWSDOWN | VM_READ | VM_WRITE | \
> -				 VM_EXEC | VM_MAYREAD | VM_MAYWRITE | \
> -				 VM_MAYEXEC)
> -
> -extern unsigned long vm_stack_flags, vm_stack_flags32;
> -extern unsigned long vm_data_default_flags, vm_data_default_flags32;
> -extern unsigned long vm_force_exec32;
> -
> -#ifdef TIF_IA32
> -#define VM_DATA_DEFAULT_FLAGS \
> -	(test_thread_flag(TIF_IA32) ? vm_data_default_flags32 : \
> -	  vm_data_default_flags)
> -
> -#define VM_STACK_DEFAULT_FLAGS \
> -	(test_thread_flag(TIF_IA32) ? vm_stack_flags32 : vm_stack_flags)
> -#endif
> -
> -#define VM_DATA_DEFAULT_FLAGS vm_data_default_flags
> -
> -#define VM_STACK_DEFAULT_FLAGS vm_stack_flags
> +#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
> +	VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
> +#define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_READ | VM_WRITE | \
> +	VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
>  
>  #endif
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


      reply	other threads:[~2011-06-16 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 19:01 [PATCH] um: Clean up vm-flags.h Richard Weinberger
2011-06-16 19:27 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110616122738.697a7c12.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=richard@nod.at \
    --cc=torvalds@linux-foundation.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox