]> git.neil.brown.name Git - history.git/commitdiff
Import 2.1.129pre6 2.1.129pre6
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:22 +0000 (15:17 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:22 +0000 (15:17 -0500)
arch/i386/defconfig
arch/i386/kernel/entry.S
drivers/macintosh/macserial.c
fs/proc/kmsg.c
include/asm-i386/unistd.h
kernel/printk.c
mm/Makefile
mm/mrecow.c [deleted file]
mm/page_io.c
net/econet/econet.c

index 9fadb16d59341e0a8d5caa34e91d6d4af3470f7b..78351e2d5a2ff7731e3c860e90f87dd0aa8db233 100644 (file)
@@ -275,6 +275,7 @@ CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 # CONFIG_CODA_FS is not set
 # CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_NTFS_FS is not set
 # CONFIG_SYSV_FS is not set
index fd6ca20590b15ab778dd44017a1636b60d4a587b..aa95a0b60b34aa30e73d8415f690e603efb86ab9 100644 (file)
@@ -559,7 +559,6 @@ ENTRY(sys_call_table)
        .long SYMBOL_NAME(sys_sendfile)
        .long SYMBOL_NAME(sys_ni_syscall)               /* streams1 */
        .long SYMBOL_NAME(sys_ni_syscall)               /* streams2 */
-       .long SYMBOL_NAME(sys_mrecow)           /* 190 */
 
        /*
         * NOTE!! This doesn' thave to be exact - we just have
@@ -567,6 +566,6 @@ ENTRY(sys_call_table)
         * entries. Don't panic if you notice that this hasn't
         * been shrunk every time we add a new system call.
         */
-       .rept NR_syscalls-190
+       .rept NR_syscalls-189
                .long SYMBOL_NAME(sys_ni_syscall)
        .endr
index bfb75e3b75d8cc284a211306387529ab7bbcd1d9..5af8ad871d455c27833457653321bdffdc730036 100644 (file)
@@ -86,8 +86,7 @@ static DECLARE_TASK_QUEUE(tq_serial);
 static struct tty_driver serial_driver, callout_driver;
 static int serial_refcount;
 
-/* serial supmac_irq_hw *) 0xf3000010,
-btype definitions */
+/* serial subtype definitions */
 #define SERIAL_TYPE_NORMAL     1
 #define SERIAL_TYPE_CALLOUT    2
 
index ff8ec4877173671bfd3cdc4ef74a913ea8698055..71c5316a94207e4d6a597f0d59c978cecae00fe8 100644 (file)
 extern unsigned long log_size;
 extern struct wait_queue * log_wait;
 
-asmlinkage int sys_syslog(int type, char * bug, int count);
+extern int do_syslog(int type, char * bug, int count);
 
 static int kmsg_open(struct inode * inode, struct file * file)
 {
-       return sys_syslog(1,NULL,0);
+       return do_syslog(1,NULL,0);
 }
 
 static int kmsg_release(struct inode * inode, struct file * file)
 {
-       (void) sys_syslog(0,NULL,0);
+       (void) do_syslog(0,NULL,0);
        return 0;
 }
 
 static ssize_t kmsg_read(struct file * file, char * buf,
                         size_t count, loff_t *ppos)
 {
-       return sys_syslog(2,buf,count);
+       return do_syslog(2,buf,count);
 }
 
 static unsigned int kmsg_poll(struct file *file, poll_table * wait)
index a0b8372e9967653ec719d16fb86be67b957e09e7..0f0115dc59091219e2f49f6abe891fe065a269f7 100644 (file)
 #define __NR_sendfile          187
 #define __NR_getpmsg           188     /* some people actually want streams */
 #define __NR_putpmsg           189     /* some people actually want streams */
-#define __NR_mrecow            190
 
 /* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
 
index 66c09926c06460c6aed216fab7e37af7eeff243c..3c8cda649b6b153e434205bfd2c8d2a573f7f7be 100644 (file)
@@ -105,7 +105,7 @@ void __init console_setup(char *str, int *ints)
 
 
 /*
- * Commands to sys_syslog:
+ * Commands to do_syslog:
  *
  *     0 -- Close the log.  Currently a NOP.
  *     1 -- Open the log. Currently a NOP.
@@ -117,7 +117,7 @@ void __init console_setup(char *str, int *ints)
  *     7 -- Enable printk's to console
  *     8 -- Set level of messages printed to console
  */
-asmlinkage int sys_syslog(int type, char * buf, int len)
+int do_syslog(int type, char * buf, int len)
 {
        unsigned long i, j, count, flags;
        int do_clear = 0;
@@ -125,8 +125,6 @@ asmlinkage int sys_syslog(int type, char * buf, int len)
        int error = -EPERM;
 
        lock_kernel();
-       if ((type != 3) && !capable(CAP_SYS_ADMIN))
-               goto out;
        error = 0;
        switch (type) {
        case 0:         /* Close log */
@@ -228,6 +226,14 @@ out:
        return error;
 }
 
+asmlinkage int sys_syslog(int type, char * buf, int len)
+{
+       if ((type != 3) && !capable(CAP_SYS_ADMIN))
+               return -EPERM;
+       return do_syslog(type, buf, len);
+}
+
+
 spinlock_t console_lock;
 
 asmlinkage int printk(const char *fmt, ...)
index eb548f6c552d766b030ace700c66342c50df2395..c64eefbd2ed3c7ae0618646b46f17ed149590559 100644 (file)
@@ -9,7 +9,7 @@
 
 O_TARGET := mm.o
 O_OBJS  := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \
-           vmalloc.o slab.o mrecow.o \
+           vmalloc.o slab.o \
            swap.o vmscan.o page_io.o page_alloc.o swap_state.o swapfile.o
 
 include $(TOPDIR)/Rules.make
diff --git a/mm/mrecow.c b/mm/mrecow.c
deleted file mode 100644 (file)
index 16e239c..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- *     linux/mm/recow.c
- *
- * Copyright (C) 1998 Linus Torvalds
- */
-
-#include <linux/mm.h>
-#include <linux/smp_lock.h>
-
-#include <asm/pgtable.h>
-
-/*
- * This implements the "re-COW" system call.
- *
- * "re-cow" - synchronize two page-aligned areas with each other,
- * returning the first offset at which they differ. This is useful
- * for doing large memory compares. One example is simulating a
- * VGA device under DOSEMU, where you cache the old state of the
- * screen, and let DOSEMU have a private copy that it can change.
- *
- * When you want to synchronize the real screen with the private
- * simulation, you "re-cow()" the areas and see where the changes
- * have been. It will not only tell you what pages have been modified,
- * it will also share pages if they are the same..
- *
- * Doing this in user mode is prohibitive, as we need to access
- * the page tables in order to do this efficiently.
- */
-
-#define verify_recow(mm, vma, addr, len) do { \
-       vma = find_vma(mm, addr); \
-       if (!vma || (vma->vm_flags & VM_SHARED) || addr < vma->vm_start || vma->vm_end - addr < len) \
-               goto badvma; \
-} while (0)
-
-static int do_compare(struct mm_struct *mm, pte_t * firstpte, unsigned long addr)
-{
-       pgd_t * pgd;
-
-       pgd = pgd_offset(mm, addr);
-       if (!pgd_none(*pgd)) {
-               pmd_t * pmd = pmd_offset(pgd, addr);
-               if (!pmd_none(*pmd)) {
-                       pte_t * pte = pte_offset(pmd, addr);
-                       pte_t entry = *pte;
-                       if (pte_present(entry)) {
-                               unsigned long page1 = pte_page(*firstpte);
-                               unsigned long page2 = pte_page(entry);
-
-                               if (page1 == page2)
-                                       return 1;
-
-                               if (!memcmp((void *) page1, (void *) page2, PAGE_SIZE)) {
-                                       entry = pte_wrprotect(entry);
-                                       *firstpte = entry;
-                                       *pte = entry;
-                                       atomic_inc(&mem_map[MAP_NR(page2)].count);
-                                       free_page(page1);
-                                       return 2;
-                               }
-                       }
-               }
-       }
-       return 0;
-}
-
-/*
- * NOTE! We return zero for all "special" cases, 
- * so that if something is not present for any
- * reason the user has to compare that by hand.
- */
-static int same_page(struct mm_struct *mm, unsigned long addr1, unsigned long addr2)
-{
-       pgd_t * pgd;
-
-       pgd = pgd_offset(mm, addr1);
-       if (!pgd_none(*pgd)) {
-               pmd_t * pmd = pmd_offset(pgd, addr1);
-               if (!pmd_none(*pmd)) {
-                       pte_t * pte = pte_offset(pmd, addr1);
-                       if (pte_present(*pte))
-                               return do_compare(mm, pte, addr2);
-               }
-       }
-       return 0;
-}
-
-asmlinkage long sys_mrecow(unsigned long addr1, unsigned long addr2, size_t len)
-{
-       int shared = 0;
-       long retval;
-       struct mm_struct *mm = current->mm;
-       struct vm_area_struct *vma1, *vma2;
-
-       /*
-        * Everything has to be page-aligned..
-        */
-       if ((addr1 | addr2 | len) & ~PAGE_MASK)
-               return -EINVAL;
-
-       /* Make sure we're not aliased (trivially the same for the whole length) */
-       if (addr1 == addr2)
-               return len;
-
-       down(&mm->mmap_sem);
-
-       /*
-        * We require that the comparison areas are fully contained
-        * within the vm_area_structs, and that they are both private
-        * mappings..
-        */
-       retval = -EFAULT;
-       verify_recow(mm, vma1, addr1, len);
-       verify_recow(mm, vma2, addr2, len);
-
-       /*
-        * We need to have the same page protections on both
-        * areas, otherwise we'll mess up when we combine pages.
-        *
-        * Right now we also only allow this on anonymous areas,
-        * I don't know if we'd want to expand it to other things
-        * at some point.
-        */
-       retval = -EINVAL;
-       if (pgprot_val(vma1->vm_page_prot) != pgprot_val(vma2->vm_page_prot))
-               goto badvma;
-       if (vma1->vm_file || vma2->vm_file)
-               goto badvma;
-
-       /*
-        * Ok, start the page walk..
-        */
-       lock_kernel();
-       retval = 0;
-       while (len) {
-               int same = same_page(mm, addr1, addr2);
-               if (!same)
-                       break;
-
-               shared |= same;
-               len -= PAGE_SIZE;
-               retval += PAGE_SIZE;
-               addr1 += PAGE_SIZE;
-               addr2 += PAGE_SIZE;
-       }
-       unlock_kernel();
-       if (shared)
-               flush_tlb_mm(mm);
-
-badvma:
-       up(&mm->mmap_sem);
-       return retval;
-}
-
-
index 44f592df8f6539ebfe8a755049dfe751eb4a89bf..1dc8c66d8925e15de19ebc2f02ffb8992d6f8842 100644 (file)
@@ -66,6 +66,11 @@ void rw_swap_page(int rw, unsigned long entry, char * buf, int wait)
                printk("Internal error: bad swap-device\n");
                return;
        }
+
+       /* Don't allow too many pending pages in flight.. */
+       if (atomic_read(&nr_async_pages) > SWAP_CLUSTER_MAX)
+               wait = 1;
+
        p = &swap_info[type];
        offset = SWP_OFFSET(entry);
        if (offset >= p->max) {
index 01861d8e4cb82f6721d0474caf61eee23b136acb..8a3a72ae7eaa8de494cad0ca3dd76e8e7473bcdd 100644 (file)
@@ -706,22 +706,13 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
                case SIOCSIFHWBROADCAST:
                        return(dev_ioctl(cmd,(void *) arg));
 
-
                case SIOCSIFADDR:
                case SIOCGIFADDR:
                        return ec_dev_ioctl(sock, cmd, (void *)arg);
                        break;
 
                default:
-                       if ((cmd >= SIOCDEVPRIVATE) &&
-                           (cmd <= (SIOCDEVPRIVATE + 15)))
-                               return(dev_ioctl(cmd,(void *) arg));
-
-#ifdef CONFIG_NET_RADIO
-                       if((cmd >= SIOCIWFIRST) && (cmd <= SIOCIWLAST))
-                               return(dev_ioctl(cmd,(void *) arg));
-#endif
-                       return -EOPNOTSUPP;
+                       return(dev_ioctl(cmd,(void *) arg));
        }
        /*NOTREACHED*/
        return 0;