Re: [uml-devel] actually useful backtrace from a CPU-chewing hang

2008-05-01 Thread Jeff Dike
On Wed, Apr 30, 2008 at 10:49:27PM +0100, Nix wrote:
> Done, and tested by stepping the time (five seconds --- five seconds per
> day! I have pendulum clocks that keep better time than that!), and,
> oops, instant loop as before, with this debugging patch applied, which
> did not fire...

Hmmm.  I stepped the time (date -set "now+5sec") and nothing bad
happened.  Is that more or less what you did?

Can you send me your config?

Jeff

-- 
Work email - jdike at linux dot intel dot com

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


Re: [uml-devel] arch/um/Makefile:100: *** missing separator. Stop.

2008-05-01 Thread Jeff Dike
On Thu, May 01, 2008 at 07:35:32AM +0800, Peter Teoh wrote:
> /mnt/hd0/download/linux-2.6-latest>make -v
> GNU Make 3.81
> Copyright (C) 2006  Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> 
> This program built for i686-redhat-linux-gnu
> /mnt/hd0/download/linux-2.6-latest>which make
> /usr/bin/make
> 
> Any ideas?   

No.  Something must be odd on your end.  Can you script a session
where you download the source and make this happen, then post it?  I'd
like to see a completely from-scratch session.

   Jeff

-- 
Work email - jdike at linux dot intel dot com

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


Re: [uml-devel] arch/um/Makefile:100: *** missing separator. Stop.

2008-05-01 Thread Peter Teoh
On Thu, May 1, 2008 at 11:15 PM, Jeff Dike <[EMAIL PROTECTED]> wrote:
> On Thu, May 01, 2008 at 07:35:32AM +0800, Peter Teoh wrote:
>  > /mnt/hd0/download/linux-2.6-latest>make -v
>  > GNU Make 3.81
>  > Copyright (C) 2006  Free Software Foundation, Inc.
>  > This is free software; see the source for copying conditions.
>  > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>  > PARTICULAR PURPOSE.
>  >
>  > This program built for i686-redhat-linux-gnu
>  > /mnt/hd0/download/linux-2.6-latest>which make
>  > /usr/bin/make
>  >
>  > Any ideas?
>
>  No.  Something must be odd on your end.  Can you script a session
>  where you download the source and make this happen, then post it?  I'd
>  like to see a completely from-scratch session.
>
Ok, I tried on many different tree - linus tree, sched-devel, vfs tree
etc, and the linus tree repeated on 3 different machines - all having
the same problem as above.

Then I tried a specific stable version - 2.6.24.2.tar.bz2 as downloaded:

Filesize:
-rw-r--r-- 1 root root 46735221 Feb 15 23:27 ../linux-2.6.24.2.tar.bz2

md5sum ../linux-2.6.24.2*bz2
dd573a2fae55624ed92fa49c17583964  ../linux-2.6.24.2.tar.bz2

And after entering "strace make ARCH=um" I got the following:

/mnt/hd0/download/tmtm/linux-2.6.24.2>strace make ARCH=um
execve("/usr/bin/make", ["make", "ARCH=um"], [/* 43 vars */]) = 0
brk(0)  = 0x807
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=85363, ...}) = 0
mmap2(NULL, 85363, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fe6000
close(3)= 0
open("/lib/libc.so.6", O_RDONLY)= 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\?W\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1589908, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fe5000
mmap2(0x55e000, 1308068, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x55e000
mmap2(0x698000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13a) = 0x698000
mmap2(0x69b000, 9636, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x69b000
close(3)= 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fe4000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fe46c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0x698000, 8192, PROT_READ) = 0
mprotect(0x55a000, 4096, PROT_READ) = 0
munmap(0xb7fe6000, 85363)   = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
brk(0)  = 0x807
brk(0x8091000)  = 0x8091000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=56458800, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7de4000
close(3)= 0
rt_sigaction(SIGHUP, {0x804aaa0, [HUP], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x804aaa0, [QUIT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x804aaa0, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x804aaa0, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGXCPU, {0x804aaa0, [XCPU], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGXFSZ, {0x804aaa0, [XFSZ], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
getcwd("/mnt/hd0/download/tmtm/linux-2.6.24.2", 4096) = 38
stat64("/usr/include", {st_mode=S_IFDIR|S_ISGID|0755, st_size=20480, ...}) = 0
stat64("/usr/gnu/include", 0xbfcf7b4c)  = -1 ENOENT (No such file or directory)
stat64("/usr/local/include", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/include", {st_mode=S_IFDIR|S_ISGID|0755, st_size=20480, ...}) = 0
rt_sigaction(SIGCHLD, {0x8053810, [CHLD], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x8055980, [USR1], SA_RESTART}, {SIG_DFL}, 8) = 0
stat64(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 32 entries */, 4096)   = 960
getdents64(3, /* 0 entries */, 4096)= 0
close(3)= 0
open("Makefile", O_RDONLY|O_LARGEFILE)  = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=53162, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7ffa000
read(3, "VERSION = 2\nPATCHLEVEL = 6\nSUBLE"..., 4096) = 4096
read(3, "o above invocation of make\nskip-"..., 4096) = 4096
pipe([4, 5])= 0
vfork() = 17197
close(5)   

Re: [uml-devel] arch/um/Makefile:100: *** missing separator. Stop.

2008-05-01 Thread Peter Teoh
In case if anyone is wondering what this line 107 means in the arch/um/Makefile:

104 ifneq ($(KBUILD_SRC),)
105 $(shell mkdir -p $(ARCH_DIR) && ln -fsn
$(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
106 else
107 $(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch)
108 endif

Different version of Linux kernel tried, will always end up at the
same line above, btw, although the line number can be different.

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


Re: [uml-devel] actually useful backtrace from a CPU-chewing hang

2008-05-01 Thread Nix
On 1 May 2008, Jeff Dike outgrape:

> On Wed, Apr 30, 2008 at 10:49:27PM +0100, Nix wrote:
>> Done, and tested by stepping the time (five seconds --- five seconds per
>> day! I have pendulum clocks that keep better time than that!), and,
>> oops, instant loop as before, with this debugging patch applied, which
>> did not fire...
>
> Hmmm.  I stepped the time (date -set "now+5sec") and nothing bad
> happened.  Is that more or less what you did?

loki:/tmp# /usr/bin/ntpdate -bv hades
30 Apr 22:45:52 ntpdate[8833]: ntpdate [EMAIL PROTECTED] Fri Feb 22 18:37:11 
UTC 2008 (1)
30 Apr 22:45:52 ntpdate[8833]: step time server 192.168.14.18 offset -5.728539 
sec

so in effect yes :)

Hm. A five-second skip forwards via date --set works fine. A five-second
skip *backwards*, and instant boom.

(I suspect from earlier failures that sometimes time-slewing can cause
this too, because normally I run ntpd all the time, and that should only
slew the time under normal circumstances, never skip it: yet UML
2.6.24+ visited hang city every few days.)

I've been busy birthdaying today, but tomorrow I'll instrument things
and figure out just where a backward skip hangs and why (assuming you
haven't already done so: it's my own damn fault for being so laggardly,
I should have done this weeks ago).

> Can you send me your config?

Here:

CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig"
CONFIG_GENERIC_HARDIRQS=y
CONFIG_UML=y
CONFIG_MMU=y
CONFIG_NO_IOMEM=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_IRQ_RELEASE_METHOD=y
CONFIG_HZ=100
CONFIG_MPENTIUMIII=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_P6_NOP=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=6
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_UML_X86=y
CONFIG_X86_32=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_ARCH_HAS_SC_SIGNALS=y
CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_LD_SCRIPT_DYN=y
CONFIG_BINFMT_ELF=y
CONFIG_MCONSOLE=y
CONFIG_KERNEL_STACK_ORDER=2
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=128
CONFIG_LOCALVERSION=""
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_USER_SCHED=y
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_BLOCK=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_DEFAULT_DEADLINE=y
CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_CLASSIC_RCU=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_UBD=y
CONFIG_BLK_DEV_COW_COMMON=y
CONFIG_STDERR_CONSOLE=y
CONFIG_STDIO_CONSOLE=y
CONFIG_SSL=y
CONFIG_NULL_CHAN=y
CONFIG_PORT_CHAN=y
CONFIG_PTY_CHAN=y
CONFIG_TTY_CHAN=y
CONFIG_XTERM_CHAN=y
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CON_CHAN="tty"
CONFIG_SSL_CHAN="pty"
CONFIG_UNIX98_PTYS=y
CONFIG_UML_RANDOM=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_SYN_COOKIES=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_HASHLIM

[uml-devel] [Patch] (Resend) arch/um/kernel/irq.c: clean up some functions

2008-05-01 Thread WANG Cong

Make activate_fd() and free_irq_by_irq_and_dev() static.
Remove init_aio_irq() since it has no users.

Compile testing passed.

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---
  arch/um/include/irq_kern.h |2 --
  arch/um/include/irq_user.h |2 --
  arch/um/kernel/irq.c   |   35 ++-
  3 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h
index 4f77559..fba3895 100644
--- a/arch/um/include/irq_kern.h
+++ b/arch/um/include/irq_kern.h
@@ -13,8 +13,6 @@ extern int um_request_irq(unsigned int irq, int fd, int type,
  irq_handler_t handler,
  unsigned long irqflags,  const char * devname,
  void *dev_id);
-extern int init_aio_irq(int irq, char *name,
-   irq_handler_t handler);

  #endif

diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h
index e60b318..c6c784d 100644
--- a/arch/um/include/irq_user.h
+++ b/arch/um/include/irq_user.h
@@ -21,8 +21,6 @@ struct irq_fd {
  enum { IRQ_READ, IRQ_WRITE };

  extern void sigio_handler(int sig, struct uml_pt_regs *regs);
-extern int activate_fd(int irq, int fd, int type, void *dev_id);
-extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id);
  extern void free_irq_by_fd(int fd);
  extern void reactivate_fd(int fd, int irqnum);
  extern void deactivate_fd(int fd, int irqnum);
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 91587f8..3d7aad0 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -102,7 +102,7 @@ void sigio_handler(int sig, struct uml_pt_regs *regs)

  static DEFINE_SPINLOCK(irq_lock);

-int activate_fd(int irq, int fd, int type, void *dev_id)
+static int activate_fd(int irq, int fd, int type, void *dev_id)
  {
struct pollfd *tmp_pfd;
struct irq_fd *new_fd, *irq_fd;
@@ -216,7 +216,7 @@ static int same_irq_and_dev(struct irq_fd *irq, void *d)
return ((irq->irq == data->irq) && (irq->id == data->dev));
  }

-void free_irq_by_irq_and_dev(unsigned int irq, void *dev)
+static void free_irq_by_irq_and_dev(unsigned int irq, void *dev)
  {
struct irq_and_dev data = ((struct irq_and_dev) { .irq  = irq,
  .dev  = dev });
@@ -403,37 +403,6 @@ void __init init_IRQ(void)
}
  }

-int init_aio_irq(int irq, char *name, irq_handler_t handler)
-{
-   int fds[2], err;
-
-   err = os_pipe(fds, 1, 1);
-   if (err) {
-   printk(KERN_ERR "init_aio_irq - os_pipe failed, err = %d\n",
-  -err);
-   goto out;
-   }
-
-   err = um_request_irq(irq, fds[0], IRQ_READ, handler,
-IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name,
-(void *) (long) fds[0]);
-   if (err) {
-   printk(KERN_ERR "init_aio_irq - : um_request_irq failed, "
-  "err = %d\n",
-  err);
-   goto out_close;
-   }
-
-   err = fds[1];
-   goto out;
-
- out_close:
-   os_close_file(fds[0]);
-   os_close_file(fds[1]);
- out:
-   return err;
-}
-
  /*
   * IRQ stack entry and exit:
   *
-- 
1.5.2.4


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [Patch] (Resend) arch/um/kernel/mem.c: remove arch_validate()

2008-05-01 Thread WANG Cong

Remove arch_validate(), because no one uses it.
Remove useless macro HAVE_ARCH_VALIDATE.
Make the variable 'empty_bad_page' static.

Compile testing passed.

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---
  arch/um/kernel/ksyms.c |1 -
  arch/um/kernel/mem.c   |   33 +
  include/asm-um/page.h  |3 ---
  3 files changed, 1 insertions(+), 36 deletions(-)

diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
index 66e2a30..cc1b5f1 100644
--- a/arch/um/kernel/ksyms.c
+++ b/arch/um/kernel/ksyms.c
@@ -18,7 +18,6 @@ EXPORT_SYMBOL(get_signals);
  EXPORT_SYMBOL(kernel_thread);
  EXPORT_SYMBOL(sys_waitpid);
  EXPORT_SYMBOL(flush_tlb_range);
-EXPORT_SYMBOL(arch_validate);

  EXPORT_SYMBOL(high_physmem);
  EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 2eea1ff..88fc1c8 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -21,7 +21,7 @@
  /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
  unsigned long *empty_zero_page = NULL;
  /* allocated in paging_init and unchanged thereafter */
-unsigned long *empty_bad_page = NULL;
+static unsigned long *empty_bad_page = NULL;

  /*
   * Initialized during boot, and readonly for initializing page tables
@@ -240,37 +240,6 @@ void __init paging_init(void)
  #endif
  }

-struct page *arch_validate(struct page *page, gfp_t mask, int order)
-{
-   unsigned long addr, zero = 0;
-   int i;
-
- again:
-   if (page == NULL)
-   return page;
-   if (PageHighMem(page))
-   return page;
-
-   addr = (unsigned long) page_address(page);
-   for (i = 0; i < (1 << order); i++) {
-   current->thread.fault_addr = (void *) addr;
-   if (__do_copy_to_user((void __user *) addr, &zero,
-sizeof(zero),
-¤t->thread.fault_addr,
-¤t->thread.fault_catcher)) {
-   if (!(mask & __GFP_WAIT))
-   return NULL;
-   else break;
-   }
-   addr += PAGE_SIZE;
-   }
-
-   if (i == (1 << order))
-   return page;
-   page = alloc_pages(mask, order);
-   goto again;
-}
-
  /*
   * This can't do anything because nothing in the kernel image can be freed
   * since it's not in kernel physical memory.
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 381f96b..4b489e3 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -114,9 +114,6 @@ extern unsigned long uml_physmem;
  #define pfn_valid(pfn) ((pfn) < max_mapnr)
  #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v)))

-extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
-#define HAVE_ARCH_VALIDATE
-
  #include 
  #include 

-- 
1.5.2.4

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [Patch] (Resend) UML: make several more things static

2008-05-01 Thread WANG Cong

Make some variables and functions static, since they don't need
to be global.

Remove an unused function - arch/um/kernel/time.c::sched_clock().

Clean the style a bit as complained by checkpatch.pl.

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>


---
  arch/um/include/skas/skas.h |1 -
  arch/um/include/um_uaccess.h|1 -
  arch/um/kernel/physmem.c|2 +-
  arch/um/kernel/ptrace.c |2 +-
  arch/um/kernel/time.c   |8 
  arch/um/kernel/uaccess.c|2 +-
  arch/um/os-Linux/sigio.c|2 +-
  arch/um/os-Linux/signal.c   |2 +-
  arch/um/os-Linux/skas/process.c |2 +-
  arch/um/os-Linux/umid.c |2 +-
  arch/um/sys-i386/bugs.c |2 +-
  arch/um/sys-i386/checksum.S |5 ++---
  arch/um/sys-i386/ldt.c  |4 ++--
  include/asm-um/ptrace-generic.h |3 ---
  14 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h
index b073f8a..64d2c74 100644
--- a/arch/um/include/skas/skas.h
+++ b/arch/um/include/skas/skas.h
@@ -16,7 +16,6 @@ extern int user_thread(unsigned long stack, int flags);
  extern void new_thread_handler(void);
  extern void handle_syscall(struct uml_pt_regs *regs);
  extern int new_mm(unsigned long stack);
-extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
  extern long execute_syscall_skas(void *r);
  extern unsigned long current_stub_stack(void);

diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h
index 2b6fc8e..45c0499 100644
--- a/arch/um/include/um_uaccess.h
+++ b/arch/um/include/um_uaccess.h
@@ -34,7 +34,6 @@ extern int copy_to_user(void __user *to, const void *from, 
int n);

  extern int __do_copy_to_user(void *to, const void *from, int n,
 void **fault_addr, jmp_buf **fault_catcher);
-extern void __do_copy(void *to, const void *from, int n);

  /*
   * strncpy_from_user: - Copy a NUL terminated string from userspace.
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index 9757085..a1a9090 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -185,7 +185,7 @@ unsigned long find_iomem(char *driver, unsigned long 
*len_out)
return 0;
  }

-int setup_iomem(void)
+static int setup_iomem(void)
  {
struct iomem_region *region = iomem_regions;
unsigned long iomem_start = high_physmem + PAGE_SIZE;
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 47b57b4..15e8b7c 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -225,7 +225,7 @@ long arch_ptrace(struct task_struct *child, long request, 
long addr, long data)
return ret;
  }

-void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
+static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
  int error_code)
  {
struct siginfo info;
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index e066e84..353c174 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -12,14 +12,6 @@
  #include "kern_util.h"
  #include "os.h"

-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-   return (unsigned long long)jiffies_64 * (NSEC_PER_SEC / HZ);
-}
-
  void timer_handler(int sig, struct uml_pt_regs *regs)
  {
unsigned long flags;
diff --git a/arch/um/kernel/uaccess.c b/arch/um/kernel/uaccess.c
index f0f4b04..dd33f04 100644
--- a/arch/um/kernel/uaccess.c
+++ b/arch/um/kernel/uaccess.c
@@ -12,7 +12,7 @@
  #include 
  #include "os.h"

-void __do_copy(void *to, const void *from, int n)
+static void __do_copy(void *to, const void *from, int n)
  {
memcpy(to, from, n);
  }
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index abf47a7..07705c1 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -523,7 +523,7 @@ static void tty_close(int master, int slave)
printk(UM_KERN_CONT "No, enabling workaround\n");
  }

-void __init check_sigio(void)
+static void __init check_sigio(void)
  {
if ((access("/dev/ptmx", R_OK) < 0) &&
(access("/dev/ptyp0", R_OK) < 0)) {
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 3f1694b..1a3d233 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -125,7 +125,7 @@ void set_sigstack(void *sig_stack, int size)
panic("enabling signal stack failed, errno = %d\n", errno);
  }

-void (*handlers[_NSIG])(int sig, struct sigcontext *sc);
+static void (*handlers[_NSIG])(int sig, struct sigcontext *sc);

  void handle_signal(int sig, struct sigcontext *sc)
  {
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 1e8cba6..87d05fb 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -96,7 +96,7 @@ bad_wait:

  extern unsigned long curre

[uml-devel] [Patch] UML: Fix inconsistence due to tty_operation change

2008-05-01 Thread WANG Cong

'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
This can also shut up comipler warnings.

Cc: Jeff Dike <[EMAIL PROTECTED]>
Signed-off-by: WANG Cong <[EMAIL PROTECTED]>

---

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 10b86e1..5047490 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
line_flush_buffer(tty);
  }

-void line_put_char(struct tty_struct *tty, unsigned char ch)
+int line_put_char(struct tty_struct *tty, unsigned char ch)
  {
-   line_write(tty, &ch, sizeof(ch));
+   return line_write(tty, &ch, sizeof(ch));
  }

  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 1223f2c..979b73e 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int 
sizeof_lines,
  char *init, char **error_out);
  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
  int len);
-extern void line_put_char(struct tty_struct *tty, unsigned char ch);
+extern int line_put_char(struct tty_struct *tty, unsigned char ch);
  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
  extern int line_chars_in_buffer(struct tty_struct *tty);
  extern void line_flush_buffer(struct tty_struct *tty);

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel