From 708d3edfbf67d2595acf567a27ff278cc9554950 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 2 Jun 2009 16:50:35 +1000 Subject: [PATCH] --- yaml --- r: 145481 b: refs/heads/master c: b8da7de56ca0ad34726478a50d138a29a9ff76cb h: refs/heads/master i: 145479: 3be261542fcd3247daadceca0bd1f49d6f06a1eb v: v3 --- [refs] | 2 +- trunk/arch/x86/lguest/Makefile | 1 - trunk/arch/x86/lguest/boot.c | 17 ++++------------- trunk/drivers/char/mem.c | 3 --- trunk/drivers/gpu/drm/drm_irq.c | 8 +++++++- trunk/drivers/gpu/drm/i915/i915_dma.c | 12 ++---------- 6 files changed, 14 insertions(+), 29 deletions(-) diff --git a/[refs] b/[refs] index 9b53ab208e69..21fce0469614 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 730c586ad5228c339949b2eb4e72b80ae167abc4 +refs/heads/master: b8da7de56ca0ad34726478a50d138a29a9ff76cb diff --git a/trunk/arch/x86/lguest/Makefile b/trunk/arch/x86/lguest/Makefile index 94e0e54056a9..27f0c9ed7f60 100644 --- a/trunk/arch/x86/lguest/Makefile +++ b/trunk/arch/x86/lguest/Makefile @@ -1,2 +1 @@ obj-y := i386_head.o boot.o -CFLAGS_boot.o := $(call cc-option, -fno-stack-protector) diff --git a/trunk/arch/x86/lguest/boot.c b/trunk/arch/x86/lguest/boot.c index 33a93b417396..ca7ec44bafc3 100644 --- a/trunk/arch/x86/lguest/boot.c +++ b/trunk/arch/x86/lguest/boot.c @@ -67,7 +67,6 @@ #include #include #include -#include #include /* for struct machine_ops */ /*G:010 Welcome to the Guest! @@ -1089,21 +1088,13 @@ __init void lguest_init(void) * lguest_init() where the rest of the fairly chaotic boot setup * occurs. */ - /* The stack protector is a weird thing where gcc places a canary - * value on the stack and then checks it on return. This file is - * compiled with -fno-stack-protector it, so we got this far without - * problems. The value of the canary is kept at offset 20 from the - * %gs register, so we need to set that up before calling C functions - * in other files. */ - setup_stack_canary_segment(0); - /* We could just call load_stack_canary_segment(), but we might as - * call switch_to_new_gdt() which loads the whole table and sets up - * the per-cpu segment descriptor register %fs as well. */ - switch_to_new_gdt(0); - /* As described in head_32.S, we map the first 128M of memory. */ max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT; + /* Load the %fs segment register (the per-cpu segment register) with + * the normal data segment to get through booting. */ + asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory"); + /* The Host<->Guest Switcher lives at the top of our address space, and * the Host told us how big it is when we made LGUEST_INIT hypercall: * it put the answer in lguest_data.reserve_mem */ diff --git a/trunk/drivers/char/mem.c b/trunk/drivers/char/mem.c index 65e12bca657c..8f05c38c2f06 100644 --- a/trunk/drivers/char/mem.c +++ b/trunk/drivers/char/mem.c @@ -694,9 +694,6 @@ static ssize_t read_zero(struct file * file, char __user * buf, written += chunk - unwritten; if (unwritten) break; - /* Consider changing this to just 'signal_pending()' with lots of testing */ - if (fatal_signal_pending(current)) - return written ? written : -EINTR; buf += chunk; count -= chunk; cond_resched(); diff --git a/trunk/drivers/gpu/drm/drm_irq.c b/trunk/drivers/gpu/drm/drm_irq.c index 93e677a481f5..fc8e5acd9d9a 100644 --- a/trunk/drivers/gpu/drm/drm_irq.c +++ b/trunk/drivers/gpu/drm/drm_irq.c @@ -196,6 +196,7 @@ int drm_irq_install(struct drm_device *dev) { int ret = 0; unsigned long sh_flags = 0; + char *irqname; if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) return -EINVAL; @@ -227,8 +228,13 @@ int drm_irq_install(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) sh_flags = IRQF_SHARED; + if (dev->devname) + irqname = dev->devname; + else + irqname = dev->driver->name; + ret = request_irq(drm_dev_to_irq(dev), dev->driver->irq_handler, - sh_flags, dev->devname, dev); + sh_flags, irqname, dev); if (ret < 0) { mutex_lock(&dev->struct_mutex); diff --git a/trunk/drivers/gpu/drm/i915/i915_dma.c b/trunk/drivers/gpu/drm/i915/i915_dma.c index 53d544552625..0ccb63ee50ee 100644 --- a/trunk/drivers/gpu/drm/i915/i915_dma.c +++ b/trunk/drivers/gpu/drm/i915/i915_dma.c @@ -987,12 +987,6 @@ static int i915_load_modeset_init(struct drm_device *dev) int fb_bar = IS_I9XX(dev) ? 2 : 0; int ret = 0; - dev->devname = kstrdup(DRIVER_NAME, GFP_KERNEL); - if (!dev->devname) { - ret = -ENOMEM; - goto out; - } - dev->mode_config.fb_base = drm_get_resource_start(dev, fb_bar) & 0xff000000; @@ -1006,7 +1000,7 @@ static int i915_load_modeset_init(struct drm_device *dev) ret = i915_probe_agp(dev, &agp_size, &prealloc_size); if (ret) - goto kfree_devname; + goto out; /* Basic memrange allocator for stolen space (aka vram) */ drm_mm_init(&dev_priv->vram, 0, prealloc_size); @@ -1024,7 +1018,7 @@ static int i915_load_modeset_init(struct drm_device *dev) ret = i915_gem_init_ringbuffer(dev); if (ret) - goto kfree_devname; + goto out; /* Allow hardware batchbuffers unless told otherwise. */ @@ -1056,8 +1050,6 @@ static int i915_load_modeset_init(struct drm_device *dev) destroy_ringbuffer: i915_gem_cleanup_ringbuffer(dev); -kfree_devname: - kfree(dev->devname); out: return ret; }