Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 21 Jun 2007 22:59:11 +0000 (15:59 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 21 Jun 2007 22:59:11 +0000 (15:59 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] intel_agp: don't load if no IGD and AGP port

arch/parisc/kernel/unwind.c
drivers/parisc/led.c
include/asm-parisc/system.h
include/linux/mm.h
kernel/posix-timers.c
mm/mmap.c

index e70f57e27643a0743254cfbf793c4b575b6a415c..322167737de75a7cfa261f12dcd8f31ad724cca4 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <asm/uaccess.h>
 #include <asm/assembly.h>
+#include <asm/asm-offsets.h>
+#include <asm/ptrace.h>
 
 #include <asm/unwind.h>
 
@@ -26,6 +28,8 @@
 #define dbg(x...)
 #endif
 
+#define KERNEL_START (KERNEL_BINARY_TEXT_START - 0x1000)
+
 extern struct unwind_table_entry __start___unwind[];
 extern struct unwind_table_entry __stop___unwind[];
 
@@ -197,6 +201,29 @@ static int unwind_init(void)
        return 0;
 }
 
+#ifdef CONFIG_64BIT
+#define get_func_addr(fptr) fptr[2]
+#else
+#define get_func_addr(fptr) fptr[0]
+#endif
+
+static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int frame_size)
+{
+       void handle_interruption(int, struct pt_regs *);
+       static unsigned long *hi = (unsigned long)&handle_interruption;
+
+       if (pc == get_func_addr(hi)) {
+               struct pt_regs *regs = (struct pt_regs *)(info->sp - frame_size - PT_SZ_ALGN);
+               dbg("Unwinding through handle_interruption()\n");
+               info->prev_sp = regs->gr[30];
+               info->prev_ip = regs->iaoq[0];
+
+               return 1;
+       }
+
+       return 0;
+}
+
 static void unwind_frame_regs(struct unwind_frame_info *info)
 {
        const struct unwind_table_entry *e;
@@ -310,13 +337,15 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
                        }
                }
 
-               info->prev_sp = info->sp - frame_size;
-               if (e->Millicode)
-                       info->rp = info->r31;
-               else if (rpoffset)
-                       info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
-               info->prev_ip = info->rp;
-               info->rp = 0;
+               if (!unwind_special(info, e->region_start, frame_size)) {
+                       info->prev_sp = info->sp - frame_size;
+                       if (e->Millicode)
+                               info->rp = info->r31;
+                       else if (rpoffset)
+                               info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
+                       info->prev_ip = info->rp;
+                       info->rp = 0;
+               }
 
                dbg("analyzing func @ %lx, setting prev_sp=%lx "
                    "prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp, 
index 98be2880757d90fe48a5e2947bada642568f3261..e5d7ed92d6f780ba746b177c14cf6eab9b814bfe 100644 (file)
@@ -195,12 +195,6 @@ static int led_proc_write(struct file *file, const char *buf,
 
        cur = lbuf;
 
-       /* skip initial spaces */
-       while (*cur && isspace(*cur))
-       {
-               cur++;
-       }
-
        switch ((long)data)
        {
        case LED_NOLCD:
index 7e9afa720d4389b31e5a4fc1e1164ec23df5def0..21fbfc5afd027a2ca6dc5e6ea7ad4415cfe03d1f 100644 (file)
@@ -188,7 +188,6 @@ static inline void set_eiem(unsigned long val)
 # define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
 #endif
 
-#define KERNEL_START (0x10100000 - 0x1000)
 #define arch_align_stack(x) (x)
 
 #endif
index e4183c6c7de3dca209ed8f99eb852719e3f31bfb..1c1207472bb45657553ff349cf081c44840b310c 100644 (file)
@@ -603,6 +603,10 @@ static inline struct address_space *page_mapping(struct page *page)
 
        if (unlikely(PageSwapCache(page)))
                mapping = &swapper_space;
+#ifdef CONFIG_SLUB
+       else if (unlikely(PageSlab(page)))
+               mapping = NULL;
+#endif
        else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
                mapping = NULL;
        return mapping;
index 588c99da030792babb3c643b89e645c8abebdb2b..329ce0172074a8270b662e3850118d08d42c0dc0 100644 (file)
@@ -353,9 +353,40 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
                 * it should be restarted.
                 */
                if (timr->it.real.interval.tv64 != 0) {
+                       ktime_t now = hrtimer_cb_get_time(timer);
+
+                       /*
+                        * FIXME: What we really want, is to stop this
+                        * timer completely and restart it in case the
+                        * SIG_IGN is removed. This is a non trivial
+                        * change which involves sighand locking
+                        * (sigh !), which we don't want to do late in
+                        * the release cycle.
+                        *
+                        * For now we just let timers with an interval
+                        * less than a jiffie expire every jiffie to
+                        * avoid softirq starvation in case of SIG_IGN
+                        * and a very small interval, which would put
+                        * the timer right back on the softirq pending
+                        * list. By moving now ahead of time we trick
+                        * hrtimer_forward() to expire the timer
+                        * later, while we still maintain the overrun
+                        * accuracy, but have some inconsistency in
+                        * the timer_gettime() case. This is at least
+                        * better than a starved softirq. A more
+                        * complex fix which solves also another related
+                        * inconsistency is already in the pipeline.
+                        */
+#ifdef CONFIG_HIGH_RES_TIMERS
+                       {
+                               ktime_t kj = ktime_set(0, NSEC_PER_SEC / HZ);
+
+                               if (timr->it.real.interval.tv64 < kj.tv64)
+                                       now = ktime_add(now, kj);
+                       }
+#endif
                        timr->it_overrun +=
-                               hrtimer_forward(timer,
-                                               hrtimer_cb_get_time(timer),
+                               hrtimer_forward(timer, now,
                                                timr->it.real.interval);
                        ret = HRTIMER_RESTART;
                        ++timr->it_requeue_pending;
index 68b9ad2ef1d6917c28721419627fa9fd4a29e3b3..906ed402f7cabda336a73d6d0d297b862b0d2932 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1536,9 +1536,14 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
         * vma->vm_start/vm_end cannot change under us because the caller
         * is required to hold the mmap_sem in read mode.  We need the
         * anon_vma lock to serialize against concurrent expand_stacks.
+        * Also guard against wrapping around to address 0.
         */
-       address += 4 + PAGE_SIZE - 1;
-       address &= PAGE_MASK;
+       if (address < PAGE_ALIGN(address+4))
+               address = PAGE_ALIGN(address+4);
+       else {
+               anon_vma_unlock(vma);
+               return -ENOMEM;
+       }
        error = 0;
 
        /* Somebody else might have raced and expanded it already */