rpms/kernel/devel dma-api-debug-fixes.patch, NONE, 1.1.6.2 linux-2.6-pci-sysfs-remove-id.patch, NONE, 1.1.6.2 linux-2.6-sony-laptop-rfkill.patch, NONE, 1.2.6.2 linux-2.6-tracehook.patch, NONE, 1.8.6.2 linux-2.6-utrace-ftrace.patch, NONE, 1.2.6.2 linux-2.6.29.tar.bz2.sign, NONE, 1.1.6.2 .cvsignore, 1.1014.2.7, 1.1014.2.8 Makefile, 1.97.6.1, 1.97.6.2 TODO, 1.54.6.2, 1.54.6.3 config-generic, 1.238.6.10, 1.238.6.11 config-powerpc-generic, 1.33.6.3, 1.33.6.4 config-x86-generic, 1.68.6.3, 1.68.6.4 config-x86_64-generic, 1.68.2.3, 1.68.2.4 drm-modesetting-radeon.patch, 1.54.6.6, 1.54.6.7 drm-next.patch, 1.6.6.4, 1.6.6.5 drm-nouveau.patch, 1.8.6.4, 1.8.6.5 kernel.spec, 1.1294.2.12, 1.1294.2.13 linux-2.6-acpi-video-didl-intel-outputs.patch, 1.1.2.2, 1.1.2.3 linux-2.6-btrfs-experimental-branch.patch, 1.1.2.2, 1.1.2.3 linux-2.6-utrace.patch, 1.107, 1.107.6.1 linux-2.6-v4l-dvb-experimental.patch, 1.2.2.2, 1.2.2.3 linux-2.6-v4l-dvb-fixes.patch, 1.2.8.4, 1.2.8.5 linux-2.6-v4l-dvb-update.patch, 1.1.2.6, 1.1.2.7 sources, 1.976.2.8, 1.976.2.9 upstream, 1.888.2.7, 1.888.2.8 xen.pvops.patch, 1.1.2.11, 1.1.2.12 xen.pvops.post.patch, 1.1.2.5, 1.1.2.6 xen.pvops.pre.patch, 1.1.2.5, 1.1.2.6 build-with-fno-dwarf2-cfi-asm.patch, 1.1.2.2, NONE linux-2.6-ext4-extent-header-check-fix.patch, 1.1.2.2, NONE linux-2.6-ext4-print-warning-once.patch, 1.1.2.2, NONE linux-2.6-hdpvr.patch, 1.4.6.1, NONE linux-2.6-net-tulip-interrupt.patch, 1.1, NONE linux-2.6-net-velocity-dma.patch, 1.1.2.2, NONE linux-2.6.28.tar.bz2.sign, 1.1, NONE patch-2.6.29-rc8-git2.bz2.sign, 1.1.2.2, NONE patch-2.6.29-rc8.bz2.sign, 1.1.2.2, NONE

Michael Young myoung at fedoraproject.org
Tue Mar 24 22:58:14 UTC 2009


Author: myoung

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25192

Modified Files:
      Tag: private-myoung-dom0-branch
	.cvsignore Makefile TODO config-generic config-powerpc-generic 
	config-x86-generic config-x86_64-generic 
	drm-modesetting-radeon.patch drm-next.patch drm-nouveau.patch 
	kernel.spec linux-2.6-acpi-video-didl-intel-outputs.patch 
	linux-2.6-btrfs-experimental-branch.patch 
	linux-2.6-utrace.patch linux-2.6-v4l-dvb-experimental.patch 
	linux-2.6-v4l-dvb-fixes.patch linux-2.6-v4l-dvb-update.patch 
	sources upstream xen.pvops.patch xen.pvops.post.patch 
	xen.pvops.pre.patch 
Added Files:
      Tag: private-myoung-dom0-branch
	dma-api-debug-fixes.patch linux-2.6-pci-sysfs-remove-id.patch 
	linux-2.6-sony-laptop-rfkill.patch linux-2.6-tracehook.patch 
	linux-2.6-utrace-ftrace.patch linux-2.6.29.tar.bz2.sign 
Removed Files:
      Tag: private-myoung-dom0-branch
	build-with-fno-dwarf2-cfi-asm.patch 
	linux-2.6-ext4-extent-header-check-fix.patch 
	linux-2.6-ext4-print-warning-once.patch linux-2.6-hdpvr.patch 
	linux-2.6-net-tulip-interrupt.patch 
	linux-2.6-net-velocity-dma.patch linux-2.6.28.tar.bz2.sign 
	patch-2.6.29-rc8-git2.bz2.sign patch-2.6.29-rc8.bz2.sign 
Log Message:
pvops update and renumber for 2.6.29


dma-api-debug-fixes.patch:

--- NEW FILE dma-api-debug-fixes.patch ---
commit 0dd54847af013a7fa91c60a9f909f76c3c812d22
Author: Jesse Brandeburg <jesse.brandeburg at intel.com>
Date:   Mon Mar 2 16:02:53 2009 -0800

    e1000e: fix unmap bug
    
    This is in reference to https://bugzilla.redhat.com/show_bug.cgi?id=484494
    Also addresses issue show in kerneloops
    
    The e1000e transmit code was calling pci_unmap_page on dma handles that it
    might have called pci_map_single on.
    
    Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
    Acked-by: Bruce Allan <bruce.w.allan at intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 91817d0..f99e01c 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -565,12 +565,10 @@ next_desc:
 static void e1000_put_txbuf(struct e1000_adapter *adapter,
 			     struct e1000_buffer *buffer_info)
 {
-	if (buffer_info->dma) {
-		pci_unmap_page(adapter->pdev, buffer_info->dma,
-			       buffer_info->length, PCI_DMA_TODEVICE);
-		buffer_info->dma = 0;
-	}
+	buffer_info->dma = 0;
 	if (buffer_info->skb) {
+		skb_dma_unmap(&adapter->pdev->dev, buffer_info->skb,
+		              DMA_TO_DEVICE);
 		dev_kfree_skb_any(buffer_info->skb);
 		buffer_info->skb = NULL;
 	}
@@ -683,6 +681,11 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
 		 * check with the clearing of time_stamp and movement of i
 		 */
 		adapter->detect_tx_hung = 0;
+		/*
+		 * read barrier to make sure that the ->dma member and time
+		 * stamp are updated fully
+		 */
+		smp_rmb();
 		if (tx_ring->buffer_info[eop].dma &&
 		    time_after(jiffies, tx_ring->buffer_info[eop].time_stamp
 			       + (adapter->tx_timeout_factor * HZ))
@@ -3831,15 +3834,25 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 			unsigned int mss)
 {
 	struct e1000_ring *tx_ring = adapter->tx_ring;
-	struct e1000_buffer *buffer_info;
-	unsigned int len = skb->len - skb->data_len;
-	unsigned int offset = 0, size, count = 0, i;
+	unsigned int len = skb_headlen(skb);
+	unsigned int offset, size, count = 0, i;
 	unsigned int f;
+	dma_addr_t map;
 
 	i = tx_ring->next_to_use;
 
+	if (skb_dma_map(&adapter->pdev->dev, skb, DMA_TO_DEVICE)) {
+		dev_err(&adapter->pdev->dev, "TX DMA map failed\n");
+		adapter->tx_dma_failed++;
+		dev_kfree_skb(skb);
+		return -2;
+	}
+
+	map = skb_shinfo(skb)->dma_maps[0];
+	offset = 0;
+
 	while (len) {
-		buffer_info = &tx_ring->buffer_info[i];
+		struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i];
 		size = min(len, max_per_txd);
 
 		/* Workaround for premature desc write-backs
@@ -3850,16 +3863,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 		buffer_info->length = size;
 		/* set time_stamp *before* dma to help avoid a possible race */
 		buffer_info->time_stamp = jiffies;
-		buffer_info->dma =
-			pci_map_single(adapter->pdev,
-				skb->data + offset,
-				size,
-				PCI_DMA_TODEVICE);
-		if (pci_dma_mapping_error(adapter->pdev, buffer_info->dma)) {
-			dev_err(&adapter->pdev->dev, "TX DMA map failed\n");
-			adapter->tx_dma_failed++;
-			return -1;
-		}
+		buffer_info->dma = map + offset;
 		buffer_info->next_to_watch = i;
 
 		len -= size;
@@ -3875,9 +3879,11 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 
 		frag = &skb_shinfo(skb)->frags[f];
 		len = frag->size;
-		offset = frag->page_offset;
+		map = skb_shinfo(skb)->dma_maps[f + 1];
+		offset = 0;
 
 		while (len) {
+			struct e1000_buffer *buffer_info;
 			buffer_info = &tx_ring->buffer_info[i];
 			size = min(len, max_per_txd);
 			/* Workaround for premature desc write-backs
@@ -3887,20 +3893,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 
 			buffer_info->length = size;
 			buffer_info->time_stamp = jiffies;
-			buffer_info->dma =
-				pci_map_page(adapter->pdev,
-					frag->page,
-					offset,
-					size,
-					PCI_DMA_TODEVICE);
-			if (pci_dma_mapping_error(adapter->pdev,
-						  buffer_info->dma)) {
-				dev_err(&adapter->pdev->dev,
-					"TX DMA page map failed\n");
-				adapter->tx_dma_failed++;
-				return -1;
-			}
-
+			buffer_info->dma = map + offset;
 			buffer_info->next_to_watch = i;
 
 			len -= size;
@@ -3920,6 +3913,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 
 	tx_ring->buffer_info[i].skb = skb;
 	tx_ring->buffer_info[first].next_to_watch = i;
+	smp_wmb();
 
 	return count;
 }

commit 33bfe0386ff55f5c1c9e18cbb84a17064168bc5c
Author: Jesse Brandeburg <jesse.brandeburg at intel.com>
Date:   Mon Mar 2 16:03:21 2009 -0800

    e1000: fix unmap bug
    
    This is in reference to the issue shown in kerneloops (search e1000 unmap)
    
    The e1000 transmit code was calling pci_unmap_page on dma handles that it
    might have called pci_map_single on.
    
    Same bug as e1000e
    
    Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
    Acked-by: Bruce Allan <bruce.w.allan at intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 6bd63cc..4976e11 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2056,14 +2056,10 @@ void e1000_free_all_tx_resources(struct e1000_adapter *adapter)
 static void e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter,
 					     struct e1000_buffer *buffer_info)
 {
-	if (buffer_info->dma) {
-		pci_unmap_page(adapter->pdev,
-				buffer_info->dma,
-				buffer_info->length,
-				PCI_DMA_TODEVICE);
-		buffer_info->dma = 0;
-	}
+	buffer_info->dma = 0;
 	if (buffer_info->skb) {
+		skb_dma_unmap(&adapter->pdev->dev, buffer_info->skb,
+		              DMA_TO_DEVICE);
 		dev_kfree_skb_any(buffer_info->skb);
 		buffer_info->skb = NULL;
 	}
@@ -2914,16 +2910,24 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 			unsigned int mss)
 {
 	struct e1000_hw *hw = &adapter->hw;
-	struct e1000_buffer *buffer_info;
-	unsigned int len = skb->len;
-	unsigned int offset = 0, size, count = 0, i;
+	unsigned int len = skb_headlen(skb);
+	unsigned int offset, size, count = 0, i;
 	unsigned int f;
-	len -= skb->data_len;
+	dma_addr_t map;
 
 	i = tx_ring->next_to_use;
 
+	if (skb_dma_map(&adapter->pdev->dev, skb, DMA_TO_DEVICE)) {
+		dev_err(&adapter->pdev->dev, "TX DMA map failed\n");
+		dev_kfree_skb(skb);
+		return -2;
+	}
+
+	map = skb_shinfo(skb)->dma_maps[0];
+	offset = 0;
+
 	while (len) {
-		buffer_info = &tx_ring->buffer_info[i];
+		struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i];
 		size = min(len, max_per_txd);
 		/* Workaround for Controller erratum --
 		 * descriptor for non-tso packet in a linear SKB that follows a
@@ -2956,11 +2960,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 			size -= 4;
 
 		buffer_info->length = size;
-		buffer_info->dma =
-			pci_map_single(adapter->pdev,
-				skb->data + offset,
-				size,
-				PCI_DMA_TODEVICE);
+		buffer_info->dma = map + offset;
 		buffer_info->time_stamp = jiffies;
 		buffer_info->next_to_watch = i;
 
@@ -2975,9 +2975,11 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 
 		frag = &skb_shinfo(skb)->frags[f];
 		len = frag->size;
-		offset = frag->page_offset;
+		map = skb_shinfo(skb)->dma_maps[f + 1];
+		offset = 0;
 
 		while (len) {
+			struct e1000_buffer *buffer_info;
 			buffer_info = &tx_ring->buffer_info[i];
 			size = min(len, max_per_txd);
 			/* Workaround for premature desc write-backs
@@ -2993,12 +2995,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 				size -= 4;
 
 			buffer_info->length = size;
-			buffer_info->dma =
-				pci_map_page(adapter->pdev,
-					frag->page,
-					offset,
-					size,
-					PCI_DMA_TODEVICE);
+			buffer_info->dma = map + offset;
 			buffer_info->time_stamp = jiffies;
 			buffer_info->next_to_watch = i;
 
@@ -3012,6 +3009,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
 	i = (i == 0) ? tx_ring->count - 1 : i - 1;
 	tx_ring->buffer_info[i].skb = skb;
 	tx_ring->buffer_info[first].next_to_watch = i;
+	smp_wmb();
 
 	return count;
 }
@@ -3869,6 +3867,11 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,
 		/* Detect a transmit hang in hardware, this serializes the
 		 * check with the clearing of time_stamp and movement of i */
 		adapter->detect_tx_hung = false;
+		/*
+		 * read barrier to make sure that the ->dma member and time
+		 * stamp are updated fully
+		 */
+		smp_rmb();
 		if (tx_ring->buffer_info[eop].dma &&
 		    time_after(jiffies, tx_ring->buffer_info[eop].time_stamp +
 		               (adapter->tx_timeout_factor * HZ))

linux-2.6-pci-sysfs-remove-id.patch:

--- NEW FILE linux-2.6-pci-sysfs-remove-id.patch ---
From: Chris Wright <chrisw at sous-sol.org>
Date: Tue, 24 Feb 2009 05:52:23 +0000 (-0800)
Subject: PCI: add remove_id sysfs entry
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjbarnes%2Fpci-2.6.git;a=commitdiff_plain;h=0994375e9614f78657031e04e30019b9cdb62795

PCI: add remove_id sysfs entry

This adds a remove_id sysfs entry to allow users of new_id to later
remove the added dynid.  One use case is management tools that want to
dynamically bind/unbind devices to pci-stub driver while devices are
assigned to KVM guests.  Rather than having to track which driver was
originally bound to the driver, a mangement tool can simply:

Guest uses device

Signed-off-by: Chris Wright <chrisw at sous-sol.org>
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---

diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index e638e15..3d29793 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -41,6 +41,22 @@ Description:
 		for the device and attempt to bind to it.  For example:
 		# echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
 
+What:		/sys/bus/pci/drivers/.../remove_id
+Date:		February 2009
+Contact:	Chris Wright <chrisw at sous-sol.org>
+Description:
+		Writing a device ID to this file will remove an ID
+		that was dynamically added via the new_id sysfs entry.
+		The format for the device ID is:
+		VVVV DDDD SVVV SDDD CCCC MMMM.	That is Vendor ID, Device
+		ID, Subsystem Vendor ID, Subsystem Device ID, Class,
+		and Class Mask.  The Vendor ID and Device ID fields are
+		required, the rest are optional.  After successfully
+		removing an ID, the driver will no longer support the
+		device.  This is useful to ensure auto probing won't
+		match the driver to the device.  For example:
+		# echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
+
 What:		/sys/bus/pci/devices/.../vpd
 Date:		February 2008
 Contact:	Ben Hutchings <bhutchings at solarflare.com>
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 93eac14..87a5ddb 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -99,6 +99,52 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
 }
 static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
 
+/**
+ * store_remove_id - remove a PCI device ID from this driver
+ * @driver: target device driver
+ * @buf: buffer for scanning device ID data
+ * @count: input size
+ *
+ * Removes a dynamic pci device ID to this driver.
+ */
+static ssize_t
+store_remove_id(struct device_driver *driver, const char *buf, size_t count)
+{
+	struct pci_dynid *dynid, *n;
+	struct pci_driver *pdrv = to_pci_driver(driver);
+	__u32 vendor, device, subvendor = PCI_ANY_ID,
+		subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
+	int fields = 0;
+	int retval = -ENODEV;
+
+	fields = sscanf(buf, "%x %x %x %x %x %x",
+			&vendor, &device, &subvendor, &subdevice,
+			&class, &class_mask);
+	if (fields < 2)
+		return -EINVAL;
+
+	spin_lock(&pdrv->dynids.lock);
+	list_for_each_entry_safe(dynid, n, &pdrv->dynids.list, node) {
+		struct pci_device_id *id = &dynid->id;
+		if ((id->vendor == vendor) &&
+		    (id->device == device) &&
+		    (subvendor == PCI_ANY_ID || id->subvendor == subvendor) &&
+		    (subdevice == PCI_ANY_ID || id->subdevice == subdevice) &&
+		    !((id->class ^ class) & class_mask)) {
+			list_del(&dynid->node);
+			kfree(dynid);
+			retval = 0;
+			break;
+		}
+	}
+	spin_unlock(&pdrv->dynids.lock);
+
+	if (retval)
+		return retval;
+	return count;
+}
+static DRIVER_ATTR(remove_id, S_IWUSR, NULL, store_remove_id);
+
 static void
 pci_free_dynids(struct pci_driver *drv)
 {
@@ -125,6 +171,20 @@ static void pci_remove_newid_file(struct pci_driver *drv)
 {
 	driver_remove_file(&drv->driver, &driver_attr_new_id);
 }
+
+static int
+pci_create_removeid_file(struct pci_driver *drv)
+{
+	int error = 0;
+	if (drv->probe != NULL)
+		error = driver_create_file(&drv->driver,&driver_attr_remove_id);
+	return error;
+}
+
+static void pci_remove_removeid_file(struct pci_driver *drv)
+{
+	driver_remove_file(&drv->driver, &driver_attr_remove_id);
+}
 #else /* !CONFIG_HOTPLUG */
 static inline void pci_free_dynids(struct pci_driver *drv) {}
 static inline int pci_create_newid_file(struct pci_driver *drv)
@@ -132,6 +192,11 @@ static inline int pci_create_newid_file(struct pci_driver *drv)
 	return 0;
 }
 static inline void pci_remove_newid_file(struct pci_driver *drv) {}
+static inline int pci_create_removeid_file(struct pci_driver *drv)
+{
+	return 0;
+}
+static inline void pci_remove_removeid_file(struct pci_driver *drv) {}
 #endif
 
 /**
@@ -852,13 +917,23 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
 	/* register with core */
 	error = driver_register(&drv->driver);
 	if (error)
-		return error;
+		goto out;
 
 	error = pci_create_newid_file(drv);
 	if (error)
-		driver_unregister(&drv->driver);
+		goto out_newid;
 
+	error = pci_create_removeid_file(drv);
+	if (error)
+		goto out_removeid;
+out:
 	return error;
+
+out_removeid:
+	pci_remove_newid_file(drv);
+out_newid:
+	driver_unregister(&drv->driver);
+	goto out;
 }
 
 /**
@@ -874,6 +949,7 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
 void
 pci_unregister_driver(struct pci_driver *drv)
 {
+	pci_remove_removeid_file(drv);
 	pci_remove_newid_file(drv);
 	driver_unregister(&drv->driver);
 	pci_free_dynids(drv);

linux-2.6-sony-laptop-rfkill.patch:

--- NEW FILE linux-2.6-sony-laptop-rfkill.patch ---
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 537959d..2d142d3 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -64,6 +64,7 @@
 #include <asm/uaccess.h>
 #include <linux/sonypi.h>
 #include <linux/sony-laptop.h>
+#include <linux/rfkill.h>
 #ifdef CONFIG_SONYPI_COMPAT
 #include <linux/poll.h>
 #include <linux/miscdevice.h>
@@ -123,6 +124,18 @@ MODULE_PARM_DESC(minor,
 		 "default is -1 (automatic)");
 #endif
 
+enum sony_nc_rfkill {
+	SONY_WIFI,
+	SONY_BLUETOOTH,
+	SONY_WWAN,
+	SONY_WIMAX,
+	SONY_RFKILL_MAX,
+};
+
+static struct rfkill *sony_rfkill_devices[SONY_RFKILL_MAX];
+static int sony_rfkill_address[SONY_RFKILL_MAX] = {0x300, 0x500, 0x700, 0x900};
+static void sony_nc_rfkill_update(void);
+
 /*********** Input Devices ***********/
 
 #define SONY_LAPTOP_BUF_SIZE	128
@@ -134,6 +147,7 @@ struct sony_laptop_input_s {
 	spinlock_t		fifo_lock;
 	struct workqueue_struct	*wq;
 };
+
 static struct sony_laptop_input_s sony_laptop_input = {
 	.users = ATOMIC_INIT(0),
 };
@@ -211,6 +225,7 @@ static int sony_laptop_input_index[] = {
 	48,	/* 61 SONYPI_EVENT_WIRELESS_OFF */
 	49,	/* 62 SONYPI_EVENT_ZOOM_IN_PRESSED */
 	50,	/* 63 SONYPI_EVENT_ZOOM_OUT_PRESSED */
+	51,	/* 64 SONYPI_EVENT_CD_EJECT_PRESSED */
 };
 
 static int sony_laptop_input_keycode_map[] = {
@@ -264,7 +279,8 @@ static int sony_laptop_input_keycode_map[] = {
 	KEY_WLAN,	/* 47 SONYPI_EVENT_WIRELESS_ON */
 	KEY_WLAN,	/* 48 SONYPI_EVENT_WIRELESS_OFF */
 	KEY_ZOOMIN,	/* 49 SONYPI_EVENT_ZOOM_IN_PRESSED */
-	KEY_ZOOMOUT	/* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */
+	KEY_ZOOMOUT,	/* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */
+	KEY_EJECTCD	/* 51 SONYPI_EVENT_CD_EJECT_PRESSED */
 };
 
 /* release buttons after a short delay if pressed */
@@ -689,6 +705,31 @@ static int acpi_callsetfunc(acpi_handle handle, char *name, int value,
 	return -1;
 }
 
+static int sony_find_snc_handle(int handle)
+{
+	int i;
+	int result;
+
+	for (i=0x20; i<0x30; i++) {
+		acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
+		if (result == handle)
+			return i-0x20;
+	}
+
+	return -1;
+}
+
+static int sony_call_snc_handle(int handle, int argument, int *result)
+{
+	int offset = sony_find_snc_handle(handle);
+
+	if (offset < 0)
+		return -1;
+
+	return acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
+				result);
+}
+
 /*
  * sony_nc_values input/output validate functions
  */
@@ -809,33 +850,11 @@ struct sony_nc_event {
 	u8	event;
 };
 
-static struct sony_nc_event *sony_nc_events;
-
-/* Vaio C* --maybe also FE*, N* and AR* ?-- special init sequence
- * for Fn keys
- */
-static int sony_nc_C_enable(const struct dmi_system_id *id)
-{
-	int result = 0;
-
-	printk(KERN_NOTICE DRV_PFX "detected %s\n", id->ident);
-
-	sony_nc_events = id->driver_data;
-
-	if (acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0x4, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x2, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0x10, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x0, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN03", 0x2, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x101, &result) < 0) {
-		printk(KERN_WARNING DRV_PFX "failed to initialize SNC, some "
-				"functionalities may be missing\n");
-		return 1;
-	}
-	return 0;
-}
-
-static struct sony_nc_event sony_C_events[] = {
+static struct sony_nc_event sony_nc_events[] = {
+	{ 0x90, SONYPI_EVENT_PKEY_P1 },
+	{ 0x10, SONYPI_EVENT_ANYBUTTON_RELEASED },
+	{ 0x91, SONYPI_EVENT_PKEY_P1 },
+	{ 0x11, SONYPI_EVENT_ANYBUTTON_RELEASED },
 	{ 0x81, SONYPI_EVENT_FNKEY_F1 },
 	{ 0x01, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x85, SONYPI_EVENT_FNKEY_F5 },
@@ -844,88 +863,53 @@ static struct sony_nc_event sony_C_events[] = {
 	{ 0x06, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x87, SONYPI_EVENT_FNKEY_F7 },
 	{ 0x07, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x89, SONYPI_EVENT_FNKEY_F9 },
+	{ 0x09, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x8A, SONYPI_EVENT_FNKEY_F10 },
 	{ 0x0A, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x8C, SONYPI_EVENT_FNKEY_F12 },
 	{ 0x0C, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x9f, SONYPI_EVENT_CD_EJECT_PRESSED },
+	{ 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED },
 	{ 0, 0 },
 };
 
-/* SNC-only model map */
-static const struct dmi_system_id sony_nc_ids[] = {
-		{
-			.ident = "Sony Vaio FE Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FE"),
-			},
-		},
-		{
-			.ident = "Sony Vaio FZ Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
-			},
-		},
-		{
-			.ident = "Sony Vaio C Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-C"),
-			},
-		},
-		{
-			.ident = "Sony Vaio N Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"),
-			},
-		},
-		{ }
-};
-
 /*
  * ACPI callbacks
  */
 static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
 {
-	struct sony_nc_event *evmap;
 	u32 ev = event;
 	int result;
 
-	if (ev == 0x92) {
-		/* read the key pressed from EC.GECR
-		 * A call to SN07 with 0x0202 will do it as well respecting
-		 * the current protocol on different OSes
-		 *
-		 * Note: the path for GECR may be
-		 *   \_SB.PCI0.LPCB.EC (C, FE, AR, N and friends)
-		 *   \_SB.PCI0.PIB.EC0 (VGN-FR notifications are sent directly, no GECR)
-		 *
-		 * TODO: we may want to do the same for the older GHKE -need
-		 *       dmi list- so this snippet may become one more callback.
-		 */
-		if (acpi_callsetfunc(handle, "SN07", 0x0202, &result) < 0)
-			dprintk("sony_acpi_notify, unable to decode event 0x%.2x\n", ev);
-		else
-			ev = result & 0xFF;
-	}
+	if (ev >= 0x90) {
+		/* New-style event */
+		int origev = ev;
+		ev -= 0x90;
 
-	if (sony_nc_events)
-		for (evmap = sony_nc_events; evmap->event; evmap++) {
-			if (evmap->data == ev) {
-				ev = evmap->event;
-				break;
+		if (sony_find_snc_handle(0x100) == ev) {
+			int i;
+
+			if (sony_call_snc_handle(0x100, 0x200, &result))
+				dprintk("sony_acpi_notify, unable to decode event 0x%.2x\n", ev);
+			else
+				ev = result & 0xFF;
+
+			for (i=0; sony_nc_events[i].event; i++) {
+				if (sony_nc_events[i].data == ev) {
+					ev = sony_nc_events[i].event;
+					break;
+				}
 			}
+
+			if (!sony_nc_events[i].data)
+				printk(KERN_INFO DRV_PFX
+				       "Unknown event: %x %x\n", origev, ev);
+		} else if (sony_find_snc_handle(0x124) == ev) {
+			sony_nc_rfkill_update();
+			return;
 		}
+	}
 
 	dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
 	sony_laptop_report_input_event(ev);
@@ -953,9 +937,24 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
 /*
  * ACPI device
  */
+static int sony_nc_function_setup(struct acpi_device *device) {
+	int result;
+
+	/* Enable all events */
+	acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0xffff, &result);
+
+	/* Setup hotkeys */
+	sony_call_snc_handle(0x0100, 0, &result);
+	sony_call_snc_handle(0x0101, 0, &result);
+	sony_call_snc_handle(0x0102, 0x100, &result);
+
+	return 0;
+}
+
 static int sony_nc_resume(struct acpi_device *device)
 {
 	struct sony_nc_value *item;
+	acpi_handle handle;
 
 	for (item = sony_nc_values; item->name; item++) {
 		int ret;
@@ -970,13 +969,188 @@ static int sony_nc_resume(struct acpi_device *device)
 		}
 	}
 
+	if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON",
+					 &handle))) {
+		if (acpi_callsetfunc(sony_nc_acpi_handle, "ECON", 1, NULL))
+			dprintk("ECON Method failed\n");
+	}
+
+	if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00",
+					 &handle))) {
+		dprintk("Doing SNC setup\n");
+		sony_nc_function_setup(device);
+	}
+
 	/* set the last requested brightness level */
 	if (sony_backlight_device &&
 			!sony_backlight_update_status(sony_backlight_device))
 		printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
 
-	/* re-initialize models with specific requirements */
-	dmi_check_system(sony_nc_ids);
+	return 0;
+}
+
+static void sony_nc_rfkill_cleanup(void)
+{
+	int i;
+
+	for (i=0; i<SONY_RFKILL_MAX; i++) {
+		if (sony_rfkill_devices[i])
+			rfkill_unregister(sony_rfkill_devices[i]);
+	}
+}
+
+static int sony_nc_rfkill_get(void *data, enum rfkill_state *state)
+{
+	int result;
+	int argument = sony_rfkill_address[(long) data];
+
+	sony_call_snc_handle(0x124, 0x200, &result);
+	if (result & 0x1) {
+		sony_call_snc_handle(0x124, argument, &result);
+		if (result & 0xf)
+			*state = RFKILL_STATE_UNBLOCKED;
+		else
+			*state = RFKILL_STATE_SOFT_BLOCKED;
+	} else {
+		*state = RFKILL_STATE_HARD_BLOCKED;
+	}
+
+	return 0;
+}
+
+static int sony_nc_rfkill_set(void *data, enum rfkill_state state)
+{
+	int result;
+	int argument = sony_rfkill_address[(long) data] + 0x100;
+
+	if (state == RFKILL_STATE_UNBLOCKED)
+		argument |= 0xff0000;
+
+	return sony_call_snc_handle(0x124, argument, &result);
+}
+
+static int sony_nc_setup_wifi_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+	struct rfkill *sony_wifi_rfkill;
+
+	sony_wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN);
+	if (!sony_wifi_rfkill)
+		return -1;
+	sony_wifi_rfkill->name = "sony-wifi";
+	sony_wifi_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wifi_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wifi_rfkill->user_claim_unsupported = 1;
+	sony_wifi_rfkill->data = (void *)SONY_WIFI;
+	err = rfkill_register(sony_wifi_rfkill);
+	if (err)
+		rfkill_free(sony_wifi_rfkill);
+	else
+		sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill;
+	return err;
+}
+
+static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+	struct rfkill *sony_bluetooth_rfkill;
+
+	sony_bluetooth_rfkill = rfkill_allocate(&device->dev,
+						RFKILL_TYPE_BLUETOOTH);
+	if (!sony_bluetooth_rfkill)
+		return -1;
+	sony_bluetooth_rfkill->name = "sony-bluetooth";
+	sony_bluetooth_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_bluetooth_rfkill->get_state = sony_nc_rfkill_get;
+	sony_bluetooth_rfkill->user_claim_unsupported = 1;
+	sony_bluetooth_rfkill->data = (void *)SONY_BLUETOOTH;
+	err = rfkill_register(sony_bluetooth_rfkill);
+	if (err)
+		rfkill_free(sony_bluetooth_rfkill);
+	else
+		sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill;
+	return err;
+}
+
+static int sony_nc_setup_wwan_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+	struct rfkill *sony_wwan_rfkill;
+
+	sony_wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WWAN);
+	if (!sony_wwan_rfkill)
+		return -1;
+	sony_wwan_rfkill->name = "sony-wwan";
+	sony_wwan_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wwan_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wwan_rfkill->user_claim_unsupported = 1;
+	sony_wwan_rfkill->data = (void *)SONY_WWAN;
+	err = rfkill_register(sony_wwan_rfkill);
+	if (err)
+		rfkill_free(sony_wwan_rfkill);
+	else
+		sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill;
+	return err;
+}
+
+static int sony_nc_setup_wimax_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+	struct rfkill *sony_wimax_rfkill;
+
+	sony_wimax_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WIMAX);
+	if (!sony_wimax_rfkill)
+		return -1;
+	sony_wimax_rfkill->name = "sony-wimax";
+	sony_wimax_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wimax_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wimax_rfkill->user_claim_unsupported = 1;
+	sony_wimax_rfkill->data = (void *)SONY_WIMAX;
+	err = rfkill_register(sony_wimax_rfkill);
+	if (err)
+		rfkill_free(sony_wimax_rfkill);
+	else
+		sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill;
+	return err;
+}
+
+static void sony_nc_rfkill_update()
+{
+	int i;
+	enum rfkill_state state;
+
+	for (i=0; i<SONY_RFKILL_MAX; i++) {
+		if (sony_rfkill_devices[i]) {
+			sony_rfkill_devices[i]->
+				get_state(sony_rfkill_devices[i]->data,
+					  &state);
+			rfkill_force_state(sony_rfkill_devices[i], state);
+		}
+	}
+}
+
+static int sony_nc_rfkill_setup(struct acpi_device *device)
+{
+	int result, ret;
+
+	if (sony_find_snc_handle(0x124) == -1)
+		return -1;
+
+	ret = sony_call_snc_handle(0x124, 0xb00, &result);
+	if (ret) {
+		printk(KERN_INFO DRV_PFX
+		       "Unable to enumerate rfkill devices: %x\n", ret);
+		return ret;
+	}
+
+	if (result & 0x1)
+		sony_nc_setup_wifi_rfkill(device);
+	if (result & 0x2)
+		sony_nc_setup_bluetooth_rfkill(device);
+	if (result & 0x1c)
+		sony_nc_setup_wwan_rfkill(device);
+	if (result & 0x20)
+		sony_nc_setup_wimax_rfkill(device);
 
 	return 0;
 }
@@ -1024,6 +1198,19 @@ static int sony_nc_add(struct acpi_device *device)
 			dprintk("_INI Method failed\n");
 	}
 
+	if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON",
+					 &handle))) {
+		if (acpi_callsetfunc(sony_nc_acpi_handle, "ECON", 1, NULL))
+			dprintk("ECON Method failed\n");
+	}
+
+	if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00",
+					 &handle))) {
+		dprintk("Doing SNC setup\n");
+		sony_nc_function_setup(device);
+		sony_nc_rfkill_setup(device);
+	}
+
 	/* setup input devices and helper fifo */
 	result = sony_laptop_setup_input(device);
 	if (result) {
@@ -1063,9 +1250,6 @@ static int sony_nc_add(struct acpi_device *device)
 
 	}
 
-	/* initialize models with specific requirements */
-	dmi_check_system(sony_nc_ids);
-
 	result = sony_pf_add();
 	if (result)
 		goto outbacklight;
@@ -1131,6 +1315,7 @@ static int sony_nc_add(struct acpi_device *device)
 	sony_laptop_remove_input();
 
       outwalk:
+	sony_nc_rfkill_cleanup();
 	return result;
 }
 
@@ -1156,6 +1341,7 @@ static int sony_nc_remove(struct acpi_device *device, int type)
 
 	sony_pf_remove();
 	sony_laptop_remove_input();
+	sony_nc_rfkill_cleanup();
 	dprintk(SONY_NC_DRIVER_NAME " removed.\n");
 
 	return 0;
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index f41ffd7..8458dbe 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -103,6 +103,7 @@
 #define SONYPI_EVENT_WIRELESS_OFF		61
 #define SONYPI_EVENT_ZOOM_IN_PRESSED		62
 #define SONYPI_EVENT_ZOOM_OUT_PRESSED		63
+#define SONYPI_EVENT_CD_EJECT_PRESSED		64
 
 /* get/set brightness */
 #define SONYPI_IOCGBRT		_IOR('v', 0, __u8)

linux-2.6-tracehook.patch:

--- NEW FILE linux-2.6-tracehook.patch ---
signals: tracehook_notify_jctl change

This changes tracehook_notify_jctl() so it's called with the siglock held,
and changes its argument and return value definition.  These clean-ups make
it a better fit for what new tracing hooks need to check.

Tracing needs the siglock here, held from the time TASK_STOPPED was set,
to avoid potential SIGCONT races if it wants to allow any blocking in its
tracing hooks.

This also folds the finish_stop() function into its caller do_signal_stop().
The function is short, called only once and only unconditionally.  It aids
readability to fold it in.

Signed-off-by: Roland McGrath <roland at redhat.com>
---
 include/linux/tracehook.h |   25 ++++++++++------
 kernel/signal.c           |   69 +++++++++++++++++++++++----------------------
 2 files changed, 51 insertions(+), 43 deletions(-)

diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 6186a78..b622498 100644  
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -1,7 +1,7 @@
 /*
  * Tracing hooks
  *
- * Copyright (C) 2008 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2008-2009 Red Hat, Inc.  All rights reserved.
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
@@ -469,22 +469,29 @@ static inline int tracehook_get_signal(s
 
 /**
  * tracehook_notify_jctl - report about job control stop/continue
- * @notify:		nonzero if this is the last thread in the group to stop
+ * @notify:		zero, %CLD_STOPPED or %CLD_CONTINUED
  * @why:		%CLD_STOPPED or %CLD_CONTINUED
  *
  * This is called when we might call do_notify_parent_cldstop().
- * It's called when about to stop for job control; we are already in
- * %TASK_STOPPED state, about to call schedule().  It's also called when
- * a delayed %CLD_STOPPED or %CLD_CONTINUED report is ready to be made.
  *
- * Return nonzero to generate a %SIGCHLD with @why, which is
- * normal if @notify is nonzero.
+ * @notify is zero if we would not ordinarily send a %SIGCHLD,
+ * or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD.
  *
- * Called with no locks held.
+ * @why is %CLD_STOPPED when about to stop for job control;
+ * we are already in %TASK_STOPPED state, about to call schedule().
+ * It might also be that we have just exited (check %PF_EXITING),
+ * but need to report that a group-wide stop is complete.
+ *
+ * @why is %CLD_CONTINUED when waking up after job control stop and
+ * ready to make a delayed @notify report.
+ *
+ * Return the %CLD_* value for %SIGCHLD, or zero to generate no signal.
+ *
+ * Called with the siglock held.
  */
 static inline int tracehook_notify_jctl(int notify, int why)
 {
-	return notify || (current->ptrace & PT_PTRACED);
+	return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
 }
 
 #define DEATH_REAP			-1
diff --git a/kernel/signal.c b/kernel/signal.c
index 2a74fe8..9a0d98f 100644  
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -691,7 +691,7 @@ static int prepare_signal(int sig, struc
 
 		if (why) {
 			/*
-			 * The first thread which returns from finish_stop()
+			 * The first thread which returns from do_signal_stop()
 			 * will take ->siglock, notice SIGNAL_CLD_MASK, and
 			 * notify its parent. See get_signal_to_deliver().
 			 */
@@ -1629,29 +1629,6 @@ void ptrace_notify(int exit_code)
 	spin_unlock_irq(&current->sighand->siglock);
 }
 
-static void
-finish_stop(int stop_count)
-{
-	/*
-	 * If there are no other threads in the group, or if there is
-	 * a group stop in progress and we are the last to stop,
-	 * report to the parent.  When ptraced, every thread reports itself.
-	 */
-	if (tracehook_notify_jctl(stop_count == 0, CLD_STOPPED)) {
-		read_lock(&tasklist_lock);
-		do_notify_parent_cldstop(current, CLD_STOPPED);
-		read_unlock(&tasklist_lock);
-	}
-
-	do {
-		schedule();
-	} while (try_to_freeze());
-	/*
-	 * Now we don't run again until continued.
-	 */
-	current->exit_code = 0;
-}
-
 /*
  * This performs the stopping for SIGSTOP and other stop signals.
  * We have to stop all threads in the thread group.
@@ -1662,6 +1639,7 @@ static int do_signal_stop(int signr)
 {
 	struct signal_struct *sig = current->signal;
 	int stop_count;
+	int notify;
 
 	if (sig->group_stop_count > 0) {
 		/*
@@ -1701,8 +1679,30 @@ static int do_signal_stop(int signr)
 	current->exit_code = sig->group_exit_code;
 	__set_current_state(TASK_STOPPED);
 
+	/*
+	 * If there are no other threads in the group, or if there is
+	 * a group stop in progress and we are the last to stop,
+	 * report to the parent.  When ptraced, every thread reports itself.
+	 */
+	notify = tracehook_notify_jctl(stop_count == 0 ? CLD_STOPPED : 0,
+				       CLD_STOPPED);
+
 	spin_unlock_irq(&current->sighand->siglock);
-	finish_stop(stop_count);
+
+	if (notify) {
+		read_lock(&tasklist_lock);
+		do_notify_parent_cldstop(current, notify);
+		read_unlock(&tasklist_lock);
+	}
+
+	do {
+		schedule();
+	} while (try_to_freeze());
+	/*
+	 * Now we don't run again until continued.
+	 */
+	current->exit_code = 0;
+
 	return 1;
 }
 
@@ -1771,14 +1771,15 @@ relock:
 		int why = (signal->flags & SIGNAL_STOP_CONTINUED)
 				? CLD_CONTINUED : CLD_STOPPED;
 		signal->flags &= ~SIGNAL_CLD_MASK;
-		spin_unlock_irq(&sighand->siglock);
 
-		if (unlikely(!tracehook_notify_jctl(1, why)))
-			goto relock;
+		why = tracehook_notify_jctl(why, CLD_CONTINUED);
+		spin_unlock_irq(&sighand->siglock);
 
-		read_lock(&tasklist_lock);
-		do_notify_parent_cldstop(current->group_leader, why);
-		read_unlock(&tasklist_lock);
+		if (why) {
+			read_lock(&tasklist_lock);
+			do_notify_parent_cldstop(current->group_leader, why);
+			read_unlock(&tasklist_lock);
+		}
 		goto relock;
 	}
 
@@ -1936,14 +1937,14 @@ void exit_signals(struct task_struct *ts
 	if (unlikely(tsk->signal->group_stop_count) &&
 			!--tsk->signal->group_stop_count) {
 		tsk->signal->flags = SIGNAL_STOP_STOPPED;
-		group_stop = 1;
+		group_stop = tracehook_notify_jctl(CLD_STOPPED, CLD_STOPPED);
 	}
 out:
 	spin_unlock_irq(&tsk->sighand->siglock);
 
-	if (unlikely(group_stop) && tracehook_notify_jctl(1, CLD_STOPPED)) {
+	if (unlikely(group_stop)) {
 		read_lock(&tasklist_lock);
-		do_notify_parent_cldstop(tsk, CLD_STOPPED);
+		do_notify_parent_cldstop(tsk, group_stop);
 		read_unlock(&tasklist_lock);
 	}
 }

linux-2.6-utrace-ftrace.patch:

--- NEW FILE linux-2.6-utrace-ftrace.patch ---
utrace-based ftrace "process" engine, v2

This is v2 of the prototype utrace-ftrace interface.  This code is
based on Roland McGrath's utrace API, which provides programmatic
hooks to the in-tree tracehook layer.  This new patch interfaces many
of those events to ftrace, as configured by a small number of debugfs
controls.  Here's the /debugfs/tracing/process_trace_README:

process event tracer mini-HOWTO

1. Select process hierarchy to monitor.  Other processes will be
completely unaffected.  Leave at 0 for system-wide tracing.
%  echo NNN > process_follow_pid

2. Determine which process event traces are potentially desired.
syscall and signal tracing slow down monitored processes.
%  echo 0 > process_trace_{syscalls,signals,lifecycle}

3. Add any final uid- or taskcomm-based filtering.  Non-matching
processes will skip trace messages, but will still be slowed.
%  echo NNN > process_trace_uid_filter # -1: unrestricted
%  echo ls > process_trace_taskcomm_filter # empty: unrestricted

4. Start tracing.
%  echo process > current_tracer

5. Examine trace.
%  cat trace

6. Stop tracing.
%  echo nop > current_tracer

Signed-off-by: Frank Ch. Eigler <fche at redhat.com>
---
 include/linux/processtrace.h |   41 +++
 kernel/trace/Kconfig         |    9 +
 kernel/trace/Makefile        |    1 +
 kernel/trace/trace.h         |    8 +
 kernel/trace/trace_process.c |  601 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 660 insertions(+), 0 deletions(-)

diff --git a/include/linux/processtrace.h b/include/linux/processtrace.h
new file mode 100644
index ...f2b7d94 100644  
--- /dev/null
+++ b/include/linux/processtrace.h
@@ -0,0 +1,41 @@
+#ifndef PROCESSTRACE_H
+#define PROCESSTRACE_H
+
+#include <linux/types.h>
+#include <linux/list.h>
+
+struct process_trace_entry {
+	unsigned char opcode;	/* one of _UTRACE_EVENT_* */
+	char comm[TASK_COMM_LEN]; /* XXX: should be in/via trace_entry */
+	union {
+		struct {
+			pid_t child;
+			unsigned long flags;
+		} trace_clone;
+		struct {
+			long code;
+		} trace_exit;
+		struct {
+		} trace_exec;
+		struct {
+			int si_signo;
+			int si_errno;
+			int si_code;
+		} trace_signal;
+		struct {
+			long callno;
+			unsigned long args[6];
+		} trace_syscall_entry;
+		struct {
+			long rc;
+			long error;
+		} trace_syscall_exit;
+	};
+};
+
+/* in kernel/trace/trace_process.c */
+
+extern void enable_process_trace(void);
+extern void disable_process_trace(void);
+
+#endif /* PROCESSTRACE_H */
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 34e707e..8a92d6f 100644  
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -150,6 +150,15 @@ config CONTEXT_SWITCH_TRACER
 	  This tracer gets called from the context switch and records
 	  all switching of tasks.
 
+config PROCESS_TRACER
+	bool "Trace process events via utrace"
+	depends on DEBUG_KERNEL
+	select TRACING
+	select UTRACE
+	help
+	  This tracer provides trace records from process events
+	  accessible to utrace: lifecycle, system calls, and signals.
+
 config BOOT_TRACER
 	bool "Trace boot initcalls"
 	depends on DEBUG_KERNEL
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index 349d5a9..a774db2 100644  
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -33,5 +33,6 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += t
 obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
 obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o
 obj-$(CONFIG_POWER_TRACER) += trace_power.o
+obj-$(CONFIG_PROCESS_TRACER) += trace_process.o
 
 libftrace-y := ftrace.o
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 4d3d381..c4d2e7f 100644  
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -7,6 +7,7 @@
 #include <linux/clocksource.h>
 #include <linux/ring_buffer.h>
 #include <linux/mmiotrace.h>
+#include <linux/processtrace.h>
 #include <linux/ftrace.h>
 #include <trace/boot.h>
 
@@ -30,6 +31,7 @@ enum trace_type {
 	TRACE_USER_STACK,
 	TRACE_HW_BRANCHES,
 	TRACE_POWER,
+        TRACE_PROCESS,
 
 	__TRACE_LAST_TYPE
 };
@@ -170,6 +172,11 @@ struct trace_power {
 	struct power_trace	state_data;
 };
 
+struct trace_process {
+	struct trace_entry		ent;
+	struct process_trace_entry	event;
+};
+
 /*
  * trace_flag_type is an enumeration that holds different
  * states when a trace occurs. These are:
@@ -280,6 +287,7 @@ extern void __ftrace_bad_type(void);
 			  TRACE_GRAPH_RET);		\
 		IF_ASSIGN(var, ent, struct hw_branch_entry, TRACE_HW_BRANCHES);\
  		IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
+		IF_ASSIGN(var, ent, struct trace_process, TRACE_PROCESS); \
 		__ftrace_bad_type();					\
 	} while (0)
 
diff --git a/kernel/trace/trace_process.c b/kernel/trace/trace_process.c
new file mode 100644
index ...0820e56 100644  
--- /dev/null
+++ b/kernel/trace/trace_process.c
@@ -0,0 +1,601 @@
+/*
+ * utrace-based process event tracing
+ * Copyright (C) 2009 Red Hat Inc.
+ * By Frank Ch. Eigler <fche at redhat.com>
+ *
+ * Based on mmio ftrace engine by Pekka Paalanen
+ * and utrace-syscall-tracing prototype by Ananth Mavinakayanahalli
+ */
+
+/* #define DEBUG 1 */
+
+#include <linux/kernel.h>
+#include <linux/utrace.h>
+#include <linux/uaccess.h>
+#include <linux/debugfs.h>
+#include <asm/syscall.h>
+
+#include "trace.h"
+
+/* A process must match these filters in order to be traced. */
+static char trace_taskcomm_filter[TASK_COMM_LEN]; /* \0: unrestricted */
+static u32 trace_taskuid_filter = -1; /* -1: unrestricted */
+static u32 trace_lifecycle_p = 1;
+static u32 trace_syscalls_p = 1;
+static u32 trace_signals_p = 1;
+
+/* A process must be a direct child of given pid in order to be
+   followed. */
+static u32 process_follow_pid; /* 0: unrestricted/systemwide */
+
+/* XXX: lock the above? */
+
+
+/* trace data collection */
+
+static struct trace_array *process_trace_array;
+
+static void process_reset_data(struct trace_array *tr)
+{
+	pr_debug("in %s\n", __func__);
+	tracing_reset_online_cpus(tr);
+}
+
+static int process_trace_init(struct trace_array *tr)
+{
+	pr_debug("in %s\n", __func__);
+	process_trace_array = tr;
+	process_reset_data(tr);
+	enable_process_trace();
+	return 0;
+}
+
+static void process_trace_reset(struct trace_array *tr)
+{
+	pr_debug("in %s\n", __func__);
+	disable_process_trace();
+	process_reset_data(tr);
+	process_trace_array = NULL;
+}
+
+static void process_trace_start(struct trace_array *tr)
+{
+	pr_debug("in %s\n", __func__);
+	process_reset_data(tr);
+}
+
+static void __trace_processtrace(struct trace_array *tr,
+				struct trace_array_cpu *data,
+				struct process_trace_entry *ent)
+{
+	struct ring_buffer_event *event;
+	struct trace_process *entry;
+	unsigned long irq_flags;
+
+	event	= ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),
+					   &irq_flags);
+	if (!event)
+		return;
+	entry	= ring_buffer_event_data(event);
+	tracing_generic_entry_update(&entry->ent, 0, preempt_count());
+	entry->ent.cpu			= raw_smp_processor_id();
+	entry->ent.type			= TRACE_PROCESS;
+	strlcpy(ent->comm, current->comm, TASK_COMM_LEN);
+	entry->event			= *ent;
+	ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
+
+	trace_wake_up();
+}
+
+void process_trace(struct process_trace_entry *ent)
+{
+	struct trace_array *tr = process_trace_array;
+	struct trace_array_cpu *data;
+
+	preempt_disable();
+	data = tr->data[smp_processor_id()];
+	__trace_processtrace(tr, data, ent);
+	preempt_enable();
+}
+
+
+/* trace data rendering */
+
+static void process_pipe_open(struct trace_iterator *iter)
+{
+	struct trace_seq *s = &iter->seq;
+	pr_debug("in %s\n", __func__);
+	trace_seq_printf(s, "VERSION 200901\n");
+}
+
+static void process_close(struct trace_iterator *iter)
+{
+	iter->private = NULL;
+}
+
+static ssize_t process_read(struct trace_iterator *iter, struct file *filp,
+				char __user *ubuf, size_t cnt, loff_t *ppos)
+{
+	ssize_t ret;
+	struct trace_seq *s = &iter->seq;
+	ret = trace_seq_to_user(s, ubuf, cnt);
+	return (ret == -EBUSY) ? 0 : ret;
+}
+
+static enum print_line_t process_print(struct trace_iterator *iter)
+{
+	struct trace_entry *entry = iter->ent;
+	struct trace_process *field;
+	struct trace_seq *s	= &iter->seq;
+	unsigned long long t	= ns2usecs(iter->ts);
+	unsigned long usec_rem	= do_div(t, 1000000ULL);
+	unsigned secs		= (unsigned long)t;
+	int ret = 1;
+
+	trace_assign_type(field, entry);
+
+	/* XXX: If print_lat_fmt() were not static, we wouldn't have
+	   to duplicate this. */
+	trace_seq_printf(s, "%16s %5d %3d %9lu.%06ld ",
+			 field->event.comm,
+			 entry->pid, entry->cpu,
+			 secs,
+			 usec_rem);
+
+	switch (field->event.opcode) {
+	case _UTRACE_EVENT_CLONE:
+		ret = trace_seq_printf(s, "fork %d flags 0x%lx\n",
+				       field->event.trace_clone.child,
+				       field->event.trace_clone.flags);
+		break;
+	case _UTRACE_EVENT_EXEC:
+		ret = trace_seq_printf(s, "exec\n");
+		break;
+	case _UTRACE_EVENT_EXIT:
+		ret = trace_seq_printf(s, "exit %ld\n",
+				       field->event.trace_exit.code);
+		break;
+	case _UTRACE_EVENT_SIGNAL:
+		ret = trace_seq_printf(s, "signal %d errno %d code 0x%x\n",
+				       field->event.trace_signal.si_signo,
+				       field->event.trace_signal.si_errno,
+				       field->event.trace_signal.si_code);
+		break;
+	case _UTRACE_EVENT_SYSCALL_ENTRY:
+		ret = trace_seq_printf(s, "syscall %ld [0x%lx 0x%lx 0x%lx"
+					  " 0x%lx 0x%lx 0x%lx]\n",
+				      field->event.trace_syscall_entry.callno,
+				      field->event.trace_syscall_entry.args[0],
+				      field->event.trace_syscall_entry.args[1],
+				      field->event.trace_syscall_entry.args[2],
+				      field->event.trace_syscall_entry.args[3],
+				      field->event.trace_syscall_entry.args[4],
+				      field->event.trace_syscall_entry.args[5]);
+		break;
+	case _UTRACE_EVENT_SYSCALL_EXIT:
+		ret = trace_seq_printf(s, "syscall rc %ld error %ld\n",
+				       field->event.trace_syscall_exit.rc,
+				       field->event.trace_syscall_exit.error);
+		break;
+	default:
+		ret = trace_seq_printf(s, "process code %d?\n",
+				       field->event.opcode);
+		break;
+	}
+	if (ret)
+		return TRACE_TYPE_HANDLED;
+	return TRACE_TYPE_HANDLED;
+}
+
+
+static enum print_line_t process_print_line(struct trace_iterator *iter)
+{
+	switch (iter->ent->type) {
+	case TRACE_PROCESS:
+		return process_print(iter);
+	default:
+		return TRACE_TYPE_HANDLED; /* ignore unknown entries */
+	}
+}
+
+static struct tracer process_tracer = {
+	.name		= "process",
+	.init		= process_trace_init,
+	.reset		= process_trace_reset,
+	.start		= process_trace_start,
+	.pipe_open	= process_pipe_open,
+	.close		= process_close,
+	.read		= process_read,
+	.print_line	= process_print_line,
+};
+
+
+
+/* utrace backend */
+
+/* Should tracing apply to given task?	Compare against filter
+   values. */
+static int trace_test(struct task_struct *tsk)
+{
+	if (trace_taskcomm_filter[0]
+	    && strncmp(trace_taskcomm_filter, tsk->comm, TASK_COMM_LEN))
+		return 0;
+
+	if (trace_taskuid_filter != (u32)-1
+	    && trace_taskuid_filter != task_uid(tsk))
+		return 0;
+
+	return 1;
+}
+
+
+static const struct utrace_engine_ops process_trace_ops;
+
+static void process_trace_tryattach(struct task_struct *tsk)
+{
+	struct utrace_engine *engine;
+
+	pr_debug("in %s\n", __func__);
+	engine = utrace_attach_task(tsk,
+				    UTRACE_ATTACH_CREATE |
+				    UTRACE_ATTACH_EXCLUSIVE,
+				    &process_trace_ops, NULL);
+	if (IS_ERR(engine) || (engine == NULL)) {
+		pr_warning("utrace_attach_task %d (rc %p)\n",
+			   tsk->pid, engine);
+	} else {
+		int rc;
+
+		/* We always hook cost-free events. */
+		unsigned long events =
+			UTRACE_EVENT(CLONE) |
+			UTRACE_EVENT(EXEC) |
+			UTRACE_EVENT(EXIT);
+
+		/* Penalizing events are individually controlled, so that
+		   utrace doesn't even take the monitored threads off their
+		   fast paths, nor bother call our callbacks. */
+		if (trace_syscalls_p)
+			events |= UTRACE_EVENT_SYSCALL;
+		if (trace_signals_p)
+			events |= UTRACE_EVENT_SIGNAL_ALL;
+
+		rc = utrace_set_events(tsk, engine, events);
+		if (rc == -EINPROGRESS)
+			rc = utrace_barrier(tsk, engine);
+		if (rc)
+			pr_warning("utrace_set_events/barrier rc %d\n", rc);
+
+		utrace_engine_put(engine);
+		pr_debug("attached in %s to %s(%d)\n", __func__,
+			 tsk->comm, tsk->pid);
+	}
+}
+
+
+u32 process_trace_report_clone(enum utrace_resume_action action,
+			       struct utrace_engine *engine,
+			       struct task_struct *parent,
+			       unsigned long clone_flags,
+			       struct task_struct *child)
+{
+	if (trace_lifecycle_p && trace_test(parent)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_CLONE;
+		ent.trace_clone.child = child->pid;
+		ent.trace_clone.flags = clone_flags;
+		process_trace(&ent);
+	}
+
+	process_trace_tryattach(child);
+
+	return UTRACE_RESUME;
+}
+
+
+u32 process_trace_report_syscall_entry(u32 action,
+				       struct utrace_engine *engine,
+				       struct task_struct *task,
+				       struct pt_regs *regs)
+{
+	if (trace_syscalls_p && trace_test(task)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_SYSCALL_ENTRY;
+		ent.trace_syscall_entry.callno = syscall_get_nr(task, regs);
+		syscall_get_arguments(task, regs, 0, 6,
+				      ent.trace_syscall_entry.args);
+		process_trace(&ent);
+	}
+
+	return UTRACE_RESUME;
+}
+
+
+u32 process_trace_report_syscall_exit(enum utrace_resume_action action,
+				   struct utrace_engine *engine,
+				   struct task_struct *task,
+				   struct pt_regs *regs)
+{
+	if (trace_syscalls_p && trace_test(task)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_SYSCALL_EXIT;
+		ent.trace_syscall_exit.rc =
+			syscall_get_return_value(task, regs);
+		ent.trace_syscall_exit.error = syscall_get_error(task, regs);
+		process_trace(&ent);
+	}
+
+	return UTRACE_RESUME;
+}
+
+
+u32 process_trace_report_exec(enum utrace_resume_action action,
+			      struct utrace_engine *engine,
+			      struct task_struct *task,
+			      const struct linux_binfmt *fmt,
+			      const struct linux_binprm *bprm,
+			      struct pt_regs *regs)
+{
+	if (trace_lifecycle_p && trace_test(task)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_EXEC;
+		process_trace(&ent);
+	}
+
+	/* We're already attached; no need for a new tryattach. */
+
+	return UTRACE_RESUME;
+}
+
+
+u32 process_trace_report_signal(u32 action,
+				struct utrace_engine *engine,
+				struct task_struct *task,
+				struct pt_regs *regs,
+				siginfo_t *info,
+				const struct k_sigaction *orig_ka,
+				struct k_sigaction *return_ka)
+{
+	if (trace_signals_p && trace_test(task)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_SIGNAL;
+		ent.trace_signal.si_signo = info->si_signo;
+		ent.trace_signal.si_errno = info->si_errno;
+		ent.trace_signal.si_code = info->si_code;
+		process_trace(&ent);
+	}
+
+	/* We're already attached, so no need for a new tryattach. */
+
+	return UTRACE_RESUME | utrace_signal_action(action);
+}
+
+
+u32 process_trace_report_exit(enum utrace_resume_action action,
+			      struct utrace_engine *engine,
+			      struct task_struct *task,
+			      long orig_code, long *code)
+{
+	if (trace_lifecycle_p && trace_test(task)) {
+		struct process_trace_entry ent;
+		ent.opcode = _UTRACE_EVENT_EXIT;
+		ent.trace_exit.code = orig_code;
+		process_trace(&ent);
+	}
+
+	/* There is no need to explicitly attach or detach here. */
+
+	return UTRACE_RESUME;
+}
+
+
+void enable_process_trace()
+{
+	struct task_struct *grp, *tsk;
+
+	pr_debug("in %s\n", __func__);
+	rcu_read_lock();
+	do_each_thread(grp, tsk) {
+		/* Skip over kernel threads. */
+		if (tsk->flags & PF_KTHREAD)
+			continue;
+
+		if (process_follow_pid) {
+			if (tsk->tgid == process_follow_pid ||
+			    tsk->parent->tgid == process_follow_pid)
+				process_trace_tryattach(tsk);
+		} else {
+			process_trace_tryattach(tsk);
+		}
+	} while_each_thread(grp, tsk);
+	rcu_read_unlock();
+}
+
+void disable_process_trace()
+{
+	struct utrace_engine *engine;
+	struct task_struct *grp, *tsk;
+	int rc;
+
+	pr_debug("in %s\n", __func__);
+	rcu_read_lock();
+	do_each_thread(grp, tsk) {
+		/* Find matching engine, if any.  Returns -ENOENT for
+		   unattached threads. */
+		engine = utrace_attach_task(tsk, UTRACE_ATTACH_MATCH_OPS,
+					    &process_trace_ops, 0);
+		if (IS_ERR(engine)) {
+			if (PTR_ERR(engine) != -ENOENT)
+				pr_warning("utrace_attach_task %d (rc %ld)\n",
+					   tsk->pid, -PTR_ERR(engine));
+		} else if (engine == NULL) {
+			pr_warning("utrace_attach_task %d (null engine)\n",
+				   tsk->pid);
+		} else {
+			/* Found one of our own engines.  Detach.  */
+			rc = utrace_control(tsk, engine, UTRACE_DETACH);
+			switch (rc) {
+			case 0:		    /* success */
+				break;
+			case -ESRCH:	    /* REAP callback already begun */
+			case -EALREADY:	    /* DEATH callback already begun */
+				break;
+			default:
+				rc = -rc;
+				pr_warning("utrace_detach %d (rc %d)\n",
+					   tsk->pid, rc);
+				break;
+			}
+			utrace_engine_put(engine);
+			pr_debug("detached in %s from %s(%d)\n", __func__,
+				 tsk->comm, tsk->pid);
+		}
+	} while_each_thread(grp, tsk);
+	rcu_read_unlock();
+}
+
+
+static const struct utrace_engine_ops process_trace_ops = {
+	.report_clone = process_trace_report_clone,
+	.report_exec = process_trace_report_exec,
+	.report_exit = process_trace_report_exit,
+	.report_signal = process_trace_report_signal,
+	.report_syscall_entry = process_trace_report_syscall_entry,
+	.report_syscall_exit = process_trace_report_syscall_exit,
+};
+
+
+
+/* control interfaces */
+
+
+static ssize_t
+trace_taskcomm_filter_read(struct file *filp, char __user *ubuf,
+			   size_t cnt, loff_t *ppos)
+{
+	return simple_read_from_buffer(ubuf, cnt, ppos,
+				       trace_taskcomm_filter, TASK_COMM_LEN);
+}
+
+
+static ssize_t
+trace_taskcomm_filter_write(struct file *filp, const char __user *ubuf,
+			    size_t cnt, loff_t *fpos)
+{
+	char *end;
+
+	if (cnt > TASK_COMM_LEN)
+		cnt = TASK_COMM_LEN;
+
+	if (copy_from_user(trace_taskcomm_filter, ubuf, cnt))
+		return -EFAULT;
+
+	/* Cut from the first nil or newline. */
+	trace_taskcomm_filter[cnt] = '\0';
+	end = strchr(trace_taskcomm_filter, '\n');
+	if (end)
+		*end = '\0';
+
+	*fpos += cnt;
+	return cnt;
+}
+
+
+static const struct file_operations trace_taskcomm_filter_fops = {
+	.open		= tracing_open_generic,
+	.read		= trace_taskcomm_filter_read,
+	.write		= trace_taskcomm_filter_write,
+};
+
+
+
+static char README_text[] =
+	"process event tracer mini-HOWTO\n"
+	"\n"
+	"1. Select process hierarchy to monitor.  Other processes will be\n"
+	"   completely unaffected.  Leave at 0 for system-wide tracing.\n"
+	"#  echo NNN > process_follow_pid\n"
+	"\n"
+	"2. Determine which process event traces are potentially desired.\n"
+	"   syscall and signal tracing slow down monitored processes.\n"
+	"#  echo 0 > process_trace_{syscalls,signals,lifecycle}\n"
+	"\n"
+	"3. Add any final uid- or taskcomm-based filtering.  Non-matching\n"
+	"   processes will skip trace messages, but will still be slowed.\n"
+	"#  echo NNN > process_trace_uid_filter # -1: unrestricted \n"
+	"#  echo ls > process_trace_taskcomm_filter # empty: unrestricted\n"
+	"\n"
+	"4. Start tracing.\n"
+	"#  echo process > current_tracer\n"
+	"\n"
+	"5. Examine trace.\n"
+	"#  cat trace\n"
+	"\n"
+	"6. Stop tracing.\n"
+	"#  echo nop > current_tracer\n"
+	;
+
+static struct debugfs_blob_wrapper README_blob = {
+	.data = README_text,
+	.size = sizeof(README_text),
+};
+
+
+static __init int init_process_trace(void)
+{
+	struct dentry *d_tracer;
+	struct dentry *entry;
+
+	d_tracer = tracing_init_dentry();
+
+	entry = debugfs_create_blob("process_trace_README", 0444, d_tracer,
+				    &README_blob);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_README' entry\n");
+
+	/* Control for scoping process following. */
+	entry = debugfs_create_u32("process_follow_pid", 0644, d_tracer,
+				   &process_follow_pid);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_follow_pid' entry\n");
+
+	/* Process-level filters */
+	entry = debugfs_create_file("process_trace_taskcomm_filter", 0644,
+				    d_tracer, NULL,
+				    &trace_taskcomm_filter_fops);
+	/* XXX: it'd be nice to have a read/write debugfs_create_blob. */
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_taskcomm_filter' entry\n");
+
+	entry = debugfs_create_u32("process_trace_uid_filter", 0644, d_tracer,
+				   &trace_taskuid_filter);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_uid_filter' entry\n");
+
+	/* Event-level filters. */
+	entry = debugfs_create_u32("process_trace_lifecycle", 0644, d_tracer,
+				   &trace_lifecycle_p);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_lifecycle' entry\n");
+
+	entry = debugfs_create_u32("process_trace_syscalls", 0644, d_tracer,
+				   &trace_syscalls_p);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_syscalls' entry\n");
+
+	entry = debugfs_create_u32("process_trace_signals", 0644, d_tracer,
+				   &trace_signals_p);
+	if (!entry)
+		pr_warning("Could not create debugfs "
+			   "'process_trace_signals' entry\n");
+
+	return register_tracer(&process_tracer);
+}
+
+device_initcall(init_process_trace);


--- NEW FILE linux-2.6.29.tar.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBJyBu6yGugalF9Dw4RAupRAJ931BZUr25fhvz3pe8gjqUk75dMggCbBhRH
on+UYURfgCCkE5v7iKMYvao=
=tHWy
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.1014.2.7
retrieving revision 1.1014.2.8
diff -u -r1.1014.2.7 -r1.1014.2.8
--- .cvsignore	17 Mar 2009 21:35:45 -0000	1.1014.2.7
+++ .cvsignore	24 Mar 2009 22:57:41 -0000	1.1014.2.8
@@ -3,7 +3,5 @@
 GNUmakefile
 kernel-2.6.*.config
 temp-*
-kernel-2.6.28
-linux-2.6.28.tar.bz2
-patch-2.6.29-rc8.bz2
-patch-2.6.29-rc8-git2.bz2
+kernel-2.6.29
+linux-2.6.29.tar.bz2


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.97.6.1
retrieving revision 1.97.6.2
diff -u -r1.97.6.1 -r1.97.6.2
--- Makefile	23 Feb 2009 20:07:04 -0000	1.97.6.1
+++ Makefile	24 Mar 2009 22:57:41 -0000	1.97.6.2
@@ -68,6 +68,8 @@
 	@perl -pi -e 's/# CONFIG_PM_TEST_SUSPEND is not set/CONFIG_PM_TEST_SUSPEND=y/' config-generic
 	@perl -pi -e 's/# CONFIG_BOOT_TRACER is not set/CONFIG_BOOT_TRACER=y/' config-generic
 	@perl -pi -e 's/# CONFIG_PCI_MSI_DEFAULT_ON is not set/CONFIG_PCI_MSI_DEFAULT_ON=y/' config-generic
+	@perl -pi -e 's/# CONFIG_B43_DEBUG is not set/CONFIG_B43_DEBUG=y/' config-generic
+	@perl -pi -e 's/# CONFIG_B43LEGACY_DEBUG is not set/CONFIG_B43LEGACY_DEBUG=y/' config-generic
 
 	@# just in case we're going from extremedebug -> debug
 	@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
@@ -110,6 +112,8 @@
 	@perl -pi -e 's/CONFIG_PM_TEST_SUSPEND=y/#\ CONFIG_PM_TEST_SUSPEND\ is\ not\ set/' config-generic
 	@perl -pi -e 's/CONFIG_BOOT_TRACER=y/#\ CONFIG_BOOT_TRACER\ is\ not\ set/' config-generic
 	@perl -pi -e 's/CONFIG_PCI_MSI_DEFAULT_ON=y/# CONFIG_PCI_MSI_DEFAULT_ON is not set/' config-generic
+	@perl -pi -e 's/CONFIG_B43_DEBUG=y/# CONFIG_B43_DEBUG is not set/' config-generic
+	@perl -pi -e 's/CONFIG_B43LEGACY_DEBUG=y/# CONFIG_B43LEGACY_DEBUG is not set/' config-generic
 
 	@perl -pi -e 's/CONFIG_NR_CPUS=512/CONFIG_NR_CPUS=64/' config-x86_64-generic
 
@@ -122,7 +126,7 @@
 
 reconfig:
 	@rm -f kernel-*-config
-	@VERSION="2.6.28" make -f Makefile.config configs
+	@VERSION="2.6.29" make -f Makefile.config configs
 	@scripts/reconfig.sh
 
 force-tag: $(SPECFILE) $(COMMON_DIR)/branches


Index: TODO
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/TODO,v
retrieving revision 1.54.6.2
retrieving revision 1.54.6.3
diff -u -r1.54.6.2 -r1.54.6.3
--- TODO	12 Mar 2009 20:38:55 -0000	1.54.6.2
+++ TODO	24 Mar 2009 22:57:41 -0000	1.54.6.3
@@ -18,9 +18,11 @@
 * linux-2.6-debug-spinlock-taint.patch
 * linux-2.6-debug-taint-vm.patch
 * linux-2.6-debug-vm-would-have-oomkilled.patch
-* linux-2.6-scsi-cpqarray-set-master.patch
 	Push for 2.6.29
 
+* linux-2.6-scsi-cpqarray-set-master.patch
+	Queued for 2.6.30 by Jens Axboe
+
 * linux-2.6-cdrom-door-status.patch
 	Getting some testing here before I go back to upstream with more
 	data.  See the thread at:
@@ -83,6 +85,9 @@
 	http://lkml.org/lkml/2006/8/2/208
 
 * linux-2.6-net-tulip-interrupt.patch
-	DEBUG_SHIRQ causes an oops.
-	Needs testing, if it works, it'll go upstream soon.
+	Queued by DaveM for next release.
 
+* linux-2.6-pci-sysfs-remove-id.patch
+        In jbarnes linux-next tree for 2.6.30
+        Need for KVM PCI device assignment
+        https://bugzilla.redhat.com/487103


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.238.6.10
retrieving revision 1.238.6.11
diff -u -r1.238.6.10 -r1.238.6.11
--- config-generic	17 Mar 2009 21:35:45 -0000	1.238.6.10
+++ config-generic	24 Mar 2009 22:57:41 -0000	1.238.6.11
@@ -1162,6 +1162,7 @@
 CONFIG_NET_VENDOR_3COM=y
 CONFIG_VORTEX=m
 CONFIG_TYPHOON=m
+CONFIG_DNET=m
 
 #
 # Tulip family network device support
@@ -1249,7 +1250,6 @@
 CONFIG_R8169=m
 CONFIG_R8169_NAPI=y
 CONFIG_R8169_VLAN=y
-# CONFIG_SFC is not set
 # CONFIG_SK98LIN is not set
 CONFIG_SKGE=m
 # CONFIG_SKGE_DEBUG is not set
@@ -1282,6 +1282,9 @@
 CONFIG_MLX4_EN=m
 # CONFIG_MLX4_DEBUG is not set
 CONFIG_QLGE=m
+CONFIG_SFC=m
+CONFIG_SFC_MTD=y
+CONFIG_BE2NET=m
 
 CONFIG_FDDI=y
 # CONFIG_DEFXX is not set
@@ -1339,6 +1342,7 @@
 # CONFIG_CFG80211_REG_DEBUG is not set
 CONFIG_NL80211=y
 CONFIG_LIB80211=m
+# CONFIG_LIB80211_DEBUG is not set
 CONFIG_WIRELESS=y
 # CONFIG_WIRELESS_OLD_REGULATORY is not set
 CONFIG_WIRELESS_EXT=y
@@ -2240,8 +2244,6 @@
 CONFIG_VIDEO_MXB=m
 CONFIG_VIDEO_OVCAMCHIP=m
 CONFIG_VIDEO_PVRUSB2_DVB=y
-CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR=y
-CONFIG_VIDEO_PVRUSB2_ONAIR_USB2=y
 CONFIG_VIDEO_HDPVR=m
 CONFIG_VIDEO_SAA5246A=m
 CONFIG_VIDEO_SAA5249=m
@@ -2261,8 +2263,6 @@
 CONFIG_VIDEO_ZORAN_LML33R10=m
 CONFIG_VIDEO_ZORAN_ZR36060=m
 CONFIG_VIDEO_FB_IVTV=m
-CONFIG_TUNER_3036=m
-# CONFIG_TUNER_TEA5761 is not set
 
 CONFIG_USB_VIDEO_CLASS=m
 CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
@@ -2275,14 +2275,13 @@
 CONFIG_RADIO_MAESTRO=m
 
 CONFIG_MEDIA_ATTACH=y
-# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
 
 #
 # Digital Video Broadcasting Devices
 #
 CONFIG_DVB_CAPTURE_DRIVERS=y
 CONFIG_DVB_CORE=m
-CONFIG_DVB_CORE_ATTACH=y
 
 # CONFIG_DVB_FE_CUSTOMISE is not set
 
@@ -2307,7 +2306,6 @@
 #
 CONFIG_DVB_AV7110=m
 CONFIG_DVB_AV7110_OSD=y
-# CONFIG_DVB_AV7110_FIRMWARE is not set
 CONFIG_DVB_BUDGET=m
 CONFIG_DVB_BUDGET_CI=m
 CONFIG_DVB_BUDGET_AV=m
@@ -2321,17 +2319,11 @@
 #
 # Supported FlexCopII (B2C2) Adapters
 #
-CONFIG_DVB_CINERGYT2=m
+CONFIG_DVB_USB_CINERGYT2=m
 CONFIG_DVB_B2C2_FLEXCOP=m
 CONFIG_DVB_B2C2_FLEXCOP_PCI=m
 CONFIG_DVB_B2C2_FLEXCOP_USB=m
 # CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-CONFIG_DVB_CINERGYT2_TUNING=y
-CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32
-CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512
-CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250
-CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y
-CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100
 CONFIG_DVB_USB=m
 # CONFIG_DVB_USB_DEBUG is not set
 CONFIG_DVB_USB_A800=m
@@ -2355,13 +2347,10 @@
 CONFIG_DVB_USB_VP702X=m
 CONFIG_DVB_USB_VP7045=m
 
-CONFIG_DVB_TUNER_MT2131
-CONFIG_DVB_TUNER_QT1010=m
-
 CONFIG_VIDEO_SAA7146=m
 CONFIG_VIDEO_SAA7146_VV=m
 CONFIG_VIDEO_TUNER=m
-# CONFIG_VIDEO_TUNER_CUSTOMIZE is not set
+# CONFIG_VIDEO_TUNER_CUSTOMISE is not set
 CONFIG_VIDEO_BTCX=m
 CONFIG_VIDEO_PVRUSB2=m
 CONFIG_VIDEO_PVRUSB2_24XXX=y
@@ -3626,11 +3615,11 @@
 CONFIG_UNUSED_SYMBOLS=y
 
 CONFIG_UTRACE=y
-CONFIG_UTRACE_PTRACE=y
 
 CONFIG_FTRACE=y
 CONFIG_IRQSOFF_TRACER=y
 CONFIG_SCHED_TRACER=y
+CONFIG_PROCESS_TRACER=y
 CONFIG_CONTEXT_SWITCH_TRACER=y
 CONFIG_DYNAMIC_FTRACE=y
 CONFIG_FTRACE_MCOUNT_RECORD=y


Index: config-powerpc-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-powerpc-generic,v
retrieving revision 1.33.6.3
retrieving revision 1.33.6.4
diff -u -r1.33.6.3 -r1.33.6.4
--- config-powerpc-generic	5 Mar 2009 01:30:21 -0000	1.33.6.3
+++ config-powerpc-generic	24 Mar 2009 22:57:41 -0000	1.33.6.4
@@ -38,9 +38,6 @@
 CONFIG_RTC_DRV_PPC=y
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
-CONFIG_BLK_DEV_IDE_PMAC=y
-CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
-CONFIG_BLK_DEV_IDEDMA_PMAC=y
 CONFIG_ELECTRA_IDE=y
 
 CONFIG_ADB=y
@@ -262,7 +259,7 @@
 CONFIG_QE_GPIO=y
 CONFIG_MPC8xxx_GPIO=y
 
-CONFIG_IDE_GD=m
+CONFIG_IDE_GD=y
 CONFIG_IDE_GD_ATA=y
 CONFIG_IDE_GD_ATAPI=y
 
@@ -291,7 +288,7 @@
 
 CONFIG_SIMPLE_GPIO=y
 
-CONFIG_MTD_PS3VRAM=m
+CONFIG_PS3_VRAM=m
 CONFIG_MDIO_GPIO=m
 CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL=m
 # CONFIG_DEBUG_GPIO is not set


Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86-generic,v
retrieving revision 1.68.6.3
retrieving revision 1.68.6.4
diff -u -r1.68.6.3 -r1.68.6.4
--- config-x86-generic	25 Feb 2009 23:14:05 -0000	1.68.6.3
+++ config-x86-generic	24 Mar 2009 22:57:41 -0000	1.68.6.4
@@ -217,7 +217,7 @@
 
 CONFIG_DEBUG_RODATA=y
 CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_4KSTACKS=y
+# CONFIG_4KSTACKS is not set
 CONFIG_DEBUG_NMI_TIMEOUT=5
 
 CONFIG_PCI_DIRECT=y
@@ -413,7 +413,8 @@
 CONFIG_SYSPROF_TRACER=y
 
 # CONFIG_X86_VERBOSE_BOOTUP is not set
-# CONFIG_MMIOTRACE is not set
+CONFIG_MMIOTRACE=y
+# CONFIG_MMIOTRACE_TEST is not set
 
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 


Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86_64-generic,v
retrieving revision 1.68.2.3
retrieving revision 1.68.2.4
diff -u -r1.68.2.3 -r1.68.2.4
--- config-x86_64-generic	25 Feb 2009 21:26:00 -0000	1.68.2.3
+++ config-x86_64-generic	24 Mar 2009 22:57:41 -0000	1.68.2.4
@@ -317,7 +317,8 @@
 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
 CONFIG_SYSPROF_TRACER=y
 # CONFIG_X86_VERBOSE_BOOTUP is not set
-# CONFIG_MMIOTRACE is not set
+CONFIG_MMIOTRACE=y
+# CONFIG_MMIOTRACE_TEST is not set
 
 CONFIG_X86_MPPARSE=y
 

drm-modesetting-radeon.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.54.6.6 -r 1.54.6.7 drm-modesetting-radeon.patch
Index: drm-modesetting-radeon.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-modesetting-radeon.patch,v
retrieving revision 1.54.6.6
retrieving revision 1.54.6.7
diff -u -r1.54.6.6 -r1.54.6.7
--- drm-modesetting-radeon.patch	17 Mar 2009 21:35:45 -0000	1.54.6.6
+++ drm-modesetting-radeon.patch	24 Mar 2009 22:57:41 -0000	1.54.6.7
@@ -1,4 +1,169 @@
-commit 784e2287e60f91c16814fbb757ea316b3027ddd1
+commit dea27f6e83efabdc3e37bc5a91d29d6dab893853
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Wed Mar 18 17:07:07 2009 +1000
+
+    radeon: fixup encoder oops due to wrong ordering on init calls
+
+commit 4a90f1edefee2cba39d135f2866e1bacc1ac647e
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Mar 19 00:16:00 2009 +1000
+
+    drm/ttm: re-org the whole cached/uncached allocator yet again.
+    
+    This removes the allocator type, and instead tracks when pages
+    were allocated from which pool and frees them back into that pool
+
+commit c8ae93fa4ac69112f4fc16477f73e0a98bba2765
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Sun Mar 15 18:26:42 2009 +1000
+
+    ttm: prefetch pages on pagefault
+
+commit f4df0e7870378ec40c268b95fb4b5d13533095fd
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:52:13 2009 -0400
+
+    radeon: make sure to free connector priv when done
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 96d923793eb924750b26e8ab2a4264131e17cd5b
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:36:16 2009 -0400
+
+    radeon: fix combios asic init
+    
+    - igp chips don't have asic_init3/4 or ram reset tables
+    - write out the detected ram size to the CONFIG_MEMSIZE register
+    - some r1xx chips require ram detection rather than reading size
+      from bios tables
+    - asic_init5 table isn't needed
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 68f14af742eda9fd28c920776ce5396e304f8a82
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:16:35 2009 -0400
+
+    radeon: rework bios scratch regsiter handling
+    
+    split bios scratch reg handling into 3 functions:
+    
+    - connected/active
+    - crtc to encoder mapping
+    - encoder dpms state
+    
+    Hook the functions in at the appropriate places in
+    the driver. DVI-I is a bit messy since we need to know
+    digital vs analog so we have to update the scratch regs
+    twice: once in detect() and again after we know digital/analog
+    in get_modes().
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 3ba04861b4d399a7c6e21f0a7279d5f087fc4a8c
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Sat Mar 14 16:43:14 2009 -0400
+
+    radeon: rework combios encoder/connector setup
+    
+    - along the same lines as atom
+    - re-enable atom and legacy paths for r4xx cards
+    - remove bios_connector struct
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 2ed15179f72e66a020a7f318cc4c3fa57865e4ba
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 16:02:01 2009 -0400
+
+    radeon: fix misleading messages
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit cb917ec2b585f5ac873ab2e6938da9a3b730c0a1
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 14:27:06 2009 -0400
+
+    atom: fix up encoder routines to deal with connector setup
+    
+    often times the links or lanes used are dependant on the
+    connector rather than the encoder.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit abe11890fc272189712f2e6268a8751e25b7b7b5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:43:03 2009 -0400
+
+    atom: re-enable quirks
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6a45dbd73c14735711f1803e8a3dd1063b7b3021
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:21:32 2009 -0400
+
+    object table: don't add ddc for tv/cv
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6fb018a3740510f140bcd5b6b89904e9d3167811
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:10:50 2009 -0400
+
+    radeon: major restructuring of atom output/connector setup
+    
+    - add connectors and encoders while parsing the bios tables.
+    - pull in fixed up object header parsing for r6xx+
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 034267381be779a1bbdb5f6f97c1471fb8538a04
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 4 13:02:26 2009 -0500
+
+    RS600 doesn't have DFP quirk in connector table
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit b7936094db13c736e4bee7494c2b99a8e5ced042
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 5 16:37:57 2009 -0500
+
+    R6xx/R7xx: don't mess with RADEON_HOST_PATH_CNTL
+    
+    these chips don't have this reg at this location.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit a1fdbf2f4de3988f5e3319ee9f267f7b27e8fc6e
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 16:50:19 2009 -0400
+
+    radeon: make sure to free enc_priv when done
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit d54586a52852497d82f322c536515d223697fdf4
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 15:43:16 2009 -0400
+
+    radeon: restructure encoders
+    
+    move encoder specific data into encoder specific structs
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 0215044d42faded71b8591a79550c0bf04908458
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 11:23:16 2009 -0400
+
+    radeon: atom modesetting updates
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 121d45a2e9562836138c658224def839bb166f68
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Mar 12 11:39:05 2009 +1000
 
@@ -17,7 +182,7 @@
     
     Signed-off-by: Tom "spot" Callaway <tcallawa at redhat.com>
 
-commit 42a73c53bce752bca305c4ec40bff9873042ba6d
+commit 36bbbdea9a2e77c1d1da7504bc5f03267d0e0d6c
 Author: Dave Airlie <airlied at dhcp-1-203.bne.redhat.com>
 Date:   Thu Mar 12 10:58:05 2009 +1000
 
@@ -26,7 +191,7 @@
     This makes the IB get routine a lot smarter and hopefully
     fixes some cases where it exits
 
-commit 64e61a039f5e28b5d288fd2b50d44d3d42327976
+commit 5047f54c5cf7cbd48c4894ba4950dbad158c3184
 Author: Dave Airlie <airlied at dhcp-1-203.bne.redhat.com>
 Date:   Thu Mar 12 10:57:17 2009 +1000
 
@@ -38,7 +203,7 @@
     
     only happens on r300 hw for me
[...9464 lines suppressed...]
++	struct radeon_native_mode native_mode;
++};
 +
-+	/* legacy primary dac */
-+	uint32_t ps2_pdac_adj;
-+
++struct radeon_encoder_tv_dac {
 +	/* legacy tv dac */
 +	uint32_t ps2_tvdac_adj;
 +	uint32_t ntsc_tvdac_adj;
 +	uint32_t pal_tvdac_adj;
++
 +	enum radeon_tv_std tv_std;
++};
 +
++struct radeon_encoder_int_tmds {
 +	/* legacy int tmds */
 +	struct radeon_tmds_pll tmds_pll[4];
 +};
 +
++struct radeon_encoder_atom_dig {
++	/* atom dig */
++	uint32_t transmitter_config;
++	bool coherent_mode;
++	/* atom lvds */
++	uint32_t lvds_misc;
++	uint16_t panel_pwr_delay;
++	/* panel mode */
++	struct radeon_native_mode native_mode;
++};
++
++struct radeon_encoder {
++	struct drm_encoder base;
++	uint32_t encoder_id;
++	uint32_t devices;
++	uint32_t flags;
++	enum radeon_rmx_type rmx_type;
++	struct radeon_native_mode native_mode;
++	void *enc_priv;
++};
++
++struct radeon_connector_atom_dig {
++	uint32_t igp_lane_info;
++	bool linkb;
++};
++
 +struct radeon_connector {
 +	struct drm_connector base;
++	uint32_t connector_id;
++	uint32_t devices;
 +	struct radeon_i2c_chan *ddc_bus;
 +	int use_digital;
++	void *con_priv;
 +};
 +
 +struct radeon_framebuffer {
@@ -29798,16 +31453,14 @@
 +			       uint32_t *post_div_p,
 +			       int flags);
 +
-+struct drm_encoder *radeon_encoder_lvtma_add(struct drm_device *dev, int bios_index);
-+struct drm_encoder *radeon_encoder_atom_dac_add(struct drm_device *dev, int bios_index, int dac_id, int with_tv);
-+struct drm_encoder *radeon_encoder_atom_tmds_add(struct drm_device *dev, int bios_index, int tmds_type);
 +struct drm_encoder *radeon_encoder_legacy_lvds_add(struct drm_device *dev, int bios_index);
 +struct drm_encoder *radeon_encoder_legacy_primary_dac_add(struct drm_device *dev, int bios_index, int with_tv);
 +struct drm_encoder *radeon_encoder_legacy_tv_dac_add(struct drm_device *dev, int bios_index, int with_tv);
 +struct drm_encoder *radeon_encoder_legacy_tmds_int_add(struct drm_device *dev, int bios_index);
 +struct drm_encoder *radeon_encoder_legacy_tmds_ext_add(struct drm_device *dev, int bios_index);
-+extern void atombios_ext_tmds_setup(struct drm_encoder *encoder,
-+				    struct drm_display_mode *mode);
++extern void atombios_external_tmds_setup(struct drm_encoder *encoder,
++					 struct drm_display_mode *mode);
++extern int atombios_get_encoder_mode(struct drm_encoder *encoder);
 +
 +extern void radeon_crtc_load_lut(struct drm_crtc *crtc);
 +extern int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
@@ -29833,18 +31486,31 @@
 +
 +extern bool radeon_atom_get_clock_info(struct drm_device *dev);
 +extern bool radeon_combios_get_clock_info(struct drm_device *dev);
-+extern void radeon_atombios_get_lvds_info(struct radeon_encoder *encoder);
-+extern void radeon_atombios_get_tmds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_lvds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tmds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_atom_dig *
++radeon_atombios_get_lvds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_int_tmds *
++radeon_atombios_get_tmds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_lvds *
++radeon_combios_get_lvds_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_int_tmds *
++radeon_combios_get_tmds_info(struct radeon_encoder *encoder);
 +extern void radeon_combios_get_ext_tmds_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tv_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_tv_dac_info(struct radeon_encoder *encoder);
-+extern bool radeon_combios_get_primary_dac_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_tv_dac *
++radeon_combios_get_tv_dac_info(struct radeon_encoder *encoder);
++extern struct radeon_encoder_primary_dac *
++radeon_combios_get_primary_dac_info(struct radeon_encoder *encoder);
 +extern void radeon_combios_output_lock(struct drm_encoder *encoder, bool lock);
 +extern void radeon_combios_initialize_bios_scratch_regs(struct drm_device *dev);
 +extern void radeon_atom_output_lock(struct drm_encoder *encoder, bool lock);
 +extern void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev);
++extern void
++radeon_atombios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc);
++extern void
++radeon_atombios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on);
++extern void
++radeon_combios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc);
++extern void
++radeon_combios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on);
 +extern void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
 +				     u16 blue, int regno);
 +struct drm_framebuffer *radeon_framebuffer_create(struct drm_device *dev,
@@ -29865,7 +31531,9 @@
 +void radeon_atom_dyn_clk_setup(struct drm_device *dev, int enable);
 +void radeon_combios_dyn_clk_setup(struct drm_device *dev, int enable);
 +void radeon_get_clock_info(struct drm_device *dev);
-+extern bool radeon_get_atom_connector_info_from_bios_connector_table(struct drm_device *dev);
++
++extern bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev);
++extern bool radeon_get_atom_connector_info_from_supported_devices_table(struct drm_device *dev);
 +
 +void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
 +			   struct drm_display_mode *mode,
@@ -30145,10 +31813,10 @@
 +
 diff --git a/drivers/gpu/drm/radeon/radeon_reg.h b/drivers/gpu/drm/radeon/radeon_reg.h
 new file mode 100644
-index 0000000..9ccf839
+index 0000000..0edb592
 --- /dev/null
 +++ b/drivers/gpu/drm/radeon/radeon_reg.h
-@@ -0,0 +1,5337 @@
+@@ -0,0 +1,5344 @@
 +/*
 + * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
 + *                VA Linux Systems Inc., Fremont, California.
@@ -30328,6 +31996,13 @@
 +#       define RADEON_CV1_CRTC_SHIFT        13
 +#       define RADEON_DFP2_CRTC_MASK        (1 << 14)
 +#       define RADEON_DFP2_CRTC_SHIFT       14
++#       define RADEON_ACC_REQ_LCD1          (1 << 16)
++#       define RADEON_ACC_REQ_CRT1          (1 << 17)
++#       define RADEON_ACC_REQ_TV1           (1 << 18)
++#       define RADEON_ACC_REQ_DFP1          (1 << 19)
++#       define RADEON_ACC_REQ_CRT2          (1 << 21)
++#       define RADEON_ACC_REQ_TV2           (1 << 22)
++#       define RADEON_ACC_REQ_DFP2          (1 << 23)
 +#define RADEON_BIOS_6_SCRATCH               0x0028
 +#       define RADEON_ACC_MODE_CHANGE       (1 << 2)
 +#       define RADEON_EXT_DESKTOP_MODE      (1 << 3)
@@ -35933,7 +37608,7 @@
  #endif
 diff --git a/include/drm/drm_objects.h b/include/drm/drm_objects.h
 new file mode 100644
-index 0000000..60016d6
+index 0000000..686a6c4
 --- /dev/null
 +++ b/include/drm/drm_objects.h
 @@ -0,0 +1,913 @@
@@ -36385,7 +38060,7 @@
 +extern void drm_ttm_fixup_caching(struct drm_ttm *ttm);
 +extern struct page *drm_ttm_get_page(struct drm_ttm *ttm, int index);
 +extern void drm_ttm_cache_flush(struct page *pages[], unsigned long num_pages);
-+extern int drm_ttm_populate(struct drm_ttm *ttm);
++extern int drm_ttm_populate(struct drm_ttm *ttm, int cached);
 +extern int drm_ttm_set_user(struct drm_ttm *ttm,
 +			    struct task_struct *tsk,
 +			    unsigned long start,
@@ -36452,6 +38127,10 @@
 + * intent was.
 + */
 +#define DRM_TTM_PAGE_USER_DMA   (1 << 8)
++/*
++ * The pages in this TTM were allocated cached
++ */
++#define DRM_TTM_PAGE_ALLOC_CACHED   (1 << 9)
 +
 +/***************************************************
 + * Buffer objects. (drm_bo.c, drm_bo_move.c)
@@ -36600,9 +38279,6 @@
 +#define _DRM_FLAG_MEMTYPE_CMA       0x00000010	/* Can't map aperture */
 +#define _DRM_FLAG_MEMTYPE_CSELECT   0x00000020	/* Select caching */
 +
-+#define _DRM_BM_ALLOCATOR_CACHED 0x0
-+#define _DRM_BM_ALLOCATOR_UNCACHED 0x1
-+
 +struct drm_buffer_manager {
 +	struct drm_bo_lock bm_lock;
 +	struct mutex evict_mutex;
@@ -36617,7 +38293,6 @@
 +	unsigned long cur_pages;
 +	atomic_t count;
 +	struct page *dummy_read_page;
-+	int allocator_type;
 +};
 +
 +struct drm_bo_driver {

drm-next.patch:

Index: drm-next.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-next.patch,v
retrieving revision 1.6.6.4
retrieving revision 1.6.6.5
diff -u -r1.6.6.4 -r1.6.6.5
--- drm-next.patch	17 Mar 2009 21:35:46 -0000	1.6.6.4
+++ drm-next.patch	24 Mar 2009 22:57:42 -0000	1.6.6.5
@@ -1,3 +1,14 @@
+commit 41f13fe81dd1b08723ab9f3fc3c7f29cfa81f1a5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 15:37:02 2009 -0400
+
+    drm/radeon: fix logic in r600_page_table_init() to match ati_gart
+    
+    This fixes page table init on rs600.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
 commit 06f0a488c1b642d3cd7769da66600e5148c3fad8
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Mar 13 09:35:32 2009 +1000
@@ -3949,7 +3960,7 @@
  	cmdbuf->bufsz -= sizeof(u64);
 diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
 new file mode 100644
-index 0000000..76eb0d5
+index 0000000..9d14eee
 --- /dev/null
 +++ b/drivers/gpu/drm/radeon/r600_cp.c
 @@ -0,0 +1,2253 @@
@@ -4127,7 +4138,6 @@
 +		if (entry->busaddr[i] == 0) {
 +			DRM_ERROR("unable to map PCIGART pages!\n");
 +			r600_page_table_cleanup(dev, gart_info);
-+			ret = -EINVAL;
 +			goto done;
 +		}
 +		entry_addr = entry->busaddr[i];
@@ -4146,6 +4156,7 @@
 +			entry_addr += ATI_PCIGART_PAGE_SIZE;
 +		}
 +	}
++	ret = 1;
 +done:
 +	return ret;
 +}
@@ -6050,7 +6061,7 @@
 +			  dev_priv->gart_info.addr,
 +			  dev_priv->pcigart_offset);
 +
-+		if (r600_page_table_init(dev)) {
++		if (!r600_page_table_init(dev)) {
 +			DRM_ERROR("Failed to init GART table\n");
 +			r600_do_cleanup_cp(dev);
 +			return -EINVAL;

drm-nouveau.patch:

Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.8.6.4
retrieving revision 1.8.6.5
diff -u -r1.8.6.4 -r1.8.6.5
--- drm-nouveau.patch	17 Mar 2009 21:35:46 -0000	1.8.6.4
+++ drm-nouveau.patch	24 Mar 2009 22:57:42 -0000	1.8.6.5
@@ -1445,10 +1445,10 @@
 +#endif /* __NOUVEAU_BIOS_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
 new file mode 100644
-index 0000000..dc52670
+index 0000000..c9bf513
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
-@@ -0,0 +1,414 @@
+@@ -0,0 +1,415 @@
 +/*
 + * Copyright 2007 Dave Airlied
 + * All Rights Reserved.
@@ -1612,10 +1612,11 @@
 +{
 +	struct drm_device *dev = bo->dev;
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	struct nouveau_channel *chan = dev_priv->fifos[bo->new_fence_class];
++	struct nouveau_channel *chan;
 +	uint64_t src_offset, dst_offset;
 +	uint32_t page_count;
 +
++	chan = nouveau_fence_channel(dev, bo->new_fence_class);
 +	if (!chan) {
 +		DRM_ERROR("channel %d non-existant, using kchan\n",
 +			  bo->fence_class);
@@ -1923,10 +1924,10 @@
 +#endif /* __NOUVEAU_CONNECTOR_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nouveau_crtc.h b/drivers/gpu/drm/nouveau/nouveau_crtc.h
 new file mode 100644
-index 0000000..53b9584
+index 0000000..5104431
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_crtc.h
-@@ -0,0 +1,64 @@
+@@ -0,0 +1,74 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -1970,7 +1971,15 @@
 +		uint32_t offset;
 +	} fb;
 +
-+	struct nv50_cursor *cursor;
++	struct {
++		struct drm_gem_object *gem;
++		bool visible;
++		uint32_t offset;
++		void (*set_offset)(struct nouveau_crtc *, uint32_t offset);
++		void (*set_pos)(struct nouveau_crtc *, int x, int y);
++		void (*hide)(struct nouveau_crtc *, bool update);
++		void (*show)(struct nouveau_crtc *, bool update);
++	} cursor;
 +
 +	struct {
 +		struct mem_block *mem;
@@ -1989,6 +1998,8 @@
 +#define to_nouveau_crtc(x) container_of((x), struct nouveau_crtc, base)
 +
 +int nv50_crtc_create(struct drm_device *dev, int index);
++int nv50_cursor_init(struct nouveau_crtc *);
++void nv50_cursor_fini(struct nouveau_crtc *);
 +
 +#endif /* __NOUVEAU_CRTC_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -2612,10 +2623,10 @@
 +MODULE_LICENSE("GPL and additional rights");
 diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
 new file mode 100644
-index 0000000..c281440
+index 0000000..fa22fd1
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
-@@ -0,0 +1,746 @@
+@@ -0,0 +1,750 @@
 +/*
 + * Copyright 2005 Stephane Marchesin.
 + * All Rights Reserved.
@@ -2965,6 +2976,7 @@
 +	struct list_head gpuobj_list;
 +
 +	void *display_priv; /* internal modesetting */
++	bool in_modeset;
 +
 +	struct bios bios;
 +
@@ -3304,6 +3316,8 @@
 +/* nouveau_fence.c */
 +extern struct drm_fence_driver nouveau_fence_driver;
 +extern void nouveau_fence_handler(struct drm_device *dev, int channel);
++extern struct nouveau_channel *
++nouveau_fence_channel(struct drm_device *dev, uint32_t fence_class);
 +
 +/* nouveau_gem.c */
 +extern int nouveau_gem_object_new(struct drm_gem_object *);
@@ -3312,6 +3326,7 @@
 +			   int size, int align, uint32_t domain,
 +			   struct drm_gem_object **);
 +extern int nouveau_gem_pin(struct drm_gem_object *, uint32_t domain);
++extern int nouveau_gem_unpin(struct drm_gem_object *);
 +extern int nouveau_gem_ioctl_new(struct drm_device *, void *,
 +				 struct drm_file *);
 +extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *,
@@ -4469,7 +4484,7 @@
 +
 diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
 new file mode 100644
-index 0000000..26f98c0
+index 0000000..6ba3c04
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
 @@ -0,0 +1,127 @@
@@ -4504,7 +4519,7 @@
 +#include "nouveau_drv.h"
 +#include "nouveau_dma.h"
 +
-+static struct nouveau_channel *
++struct nouveau_channel *
 +nouveau_fence_channel(struct drm_device *dev, uint32_t class)
 +{
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
@@ -5284,10 +5299,10 @@
 +int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls);
 diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
 new file mode 100644
-index 0000000..94a2dab
+index 0000000..80bc785
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
-@@ -0,0 +1,716 @@
+@@ -0,0 +1,727 @@
 +/*
 + * Copyright (C) 2008 Ben Skeggs.
 + * All Rights Reserved.
@@ -5444,6 +5459,17 @@
 +}
 +
 +int
++nouveau_gem_unpin(struct drm_gem_object *gem)
++{
++	struct nouveau_gem_object *ngem = gem->driver_private;
++	int ret;
++
++	ret = drm_bo_do_validate(ngem->bo, 0, DRM_BO_FLAG_NO_EVICT,
++				 DRM_BO_HINT_DONT_FENCE, 0);
++	return ret;
++}
++
++int
 +nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
 +		      struct drm_file *file_priv)
 +{
@@ -10409,10 +10435,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
 new file mode 100644
-index 0000000..2988664
+index 0000000..e3efc05
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
-@@ -0,0 +1,1038 @@
+@@ -0,0 +1,1039 @@
 +/*
 + * Copyright 2005 Stephane Marchesin
 + * Copyright 2008 Stuart Bennett
@@ -10485,11 +10511,12 @@
 +
 +		ret = drm_gem_object_name(dev, dev_priv->sfb_gem,
 +					  &dev_priv->sfbhack_handle);
++		mutex_lock(&dev->struct_mutex);
++		drm_gem_object_unreference(dev_priv->sfb_gem);
++		mutex_unlock(&dev->struct_mutex);
 +		if (ret) {
-+			mutex_lock(&dev->struct_mutex);
-+			drm_gem_object_unreference(dev_priv->sfb_gem);
-+			mutex_unlock(&dev->struct_mutex);
 +			dev_priv->sfb_gem = NULL;
++			return ret;
 +		}
 +		
 +		dev_priv->sfbhack_size = dev_priv->sfb_gem->size;
@@ -17274,10 +17301,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_connector.c b/drivers/gpu/drm/nouveau/nv50_connector.c
 new file mode 100644
-index 0000000..b7ce637
+index 0000000..27fea86
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_connector.c
-@@ -0,0 +1,588 @@
+@@ -0,0 +1,591 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -17820,7 +17847,10 @@
 +		break;
 +	}
 +
-+	connector->use_dithering = false;
++	if (type == DRM_MODE_CONNECTOR_LVDS)
++		connector->use_dithering = true;
++	else
++		connector->use_dithering = false;
 +
 +	if (i2c_index < 0xf) {
 +		i2c_index = dev_priv->dcb_table.i2c_read[i2c_index];
@@ -17868,10 +17898,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
 new file mode 100644
-index 0000000..707461d
+index 0000000..385a5a4
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -0,0 +1,765 @@
+@@ -0,0 +1,804 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -17908,7 +17938,6 @@
 +#include "nouveau_fb.h"
 +#include "nouveau_fbcon.h"
 +#include "nouveau_connector.h"
-+#include "nv50_cursor.h"
 +
 +#define NV50_LUT_INDEX(val, w) ((val << (8 - w)) | (val >> ((w << 1) - 8)))
 +static int
@@ -17958,7 +17987,7 @@
 +	return 0;
 +}
 +
-+static int
++int
 +nv50_crtc_blank(struct nouveau_crtc *crtc, bool blanked)
 +{
 +	struct drm_device *dev = crtc->base.dev;
@@ -17969,7 +17998,7 @@
 +	DRM_DEBUG("%s\n", blanked ? "blanked" : "unblanked");
 +
 +	if (blanked) {
-+		crtc->cursor->hide(crtc, false);
++		crtc->cursor.hide(crtc, false);
 +
 +		OUT_MODE(NV50_CRTC0_CLUT_MODE + offset,
 +			 NV50_CRTC0_CLUT_MODE_BLANK);
@@ -17981,11 +18010,11 @@
 +		OUT_MODE(NV50_CRTC0_BLANK_CTRL + offset,
 +			 NV50_CRTC0_BLANK_CTRL_BLANK);
 +	} else {
-+		crtc->cursor->set_offset(crtc);
-+		if (crtc->cursor->visible)
-+			crtc->cursor->show(crtc, false);
++		crtc->cursor.set_offset(crtc, crtc->cursor.offset);
++		if (crtc->cursor.visible)
++			crtc->cursor.show(crtc, false);
 +		else
-+			crtc->cursor->hide(crtc, false);
++			crtc->cursor.hide(crtc, false);
 +
 +		OUT_MODE(NV50_CRTC0_CLUT_MODE + offset, crtc->lut.depth == 8 ?
 +			 NV50_CRTC0_CLUT_MODE_OFF : NV50_CRTC0_CLUT_MODE_ON);
@@ -18284,7 +18313,7 @@
 +
 +	drm_crtc_cleanup(&crtc->base);
 +
-+	nv50_cursor_destroy(crtc);
++	nv50_cursor_fini(crtc);
 +
 +	if (crtc->lut.mem)
 +		nouveau_mem_free(drm_crtc->dev, crtc->lut.mem);
@@ -18305,10 +18334,23 @@
 +	if (width != 64 || height != 64)
 +		return -EINVAL;
 +
++	if (crtc->cursor.gem) {
++		nouveau_gem_unpin(crtc->cursor.gem);
++
++		mutex_lock(&dev->struct_mutex);
++		drm_gem_object_unreference(crtc->cursor.gem);
++		mutex_unlock(&dev->struct_mutex);
++		crtc->cursor.gem = NULL;
++	}
++
 +	if (buffer_handle) {
++		struct drm_nouveau_private *dev_priv = dev->dev_private;
++		struct nouveau_gem_object *ngem;
++
 +		gem = drm_gem_object_lookup(dev, file_priv, buffer_handle);
 +		if (!gem)
 +			return -EINVAL;
++		ngem = gem->driver_private;
 +
 +		ret = nouveau_gem_pin(gem, NOUVEAU_GEM_DOMAIN_VRAM);
 +		if (ret) {
@@ -18318,22 +18360,25 @@
 +			return ret;
 +		}
 +
-+		crtc->cursor->set_bo(crtc, gem);
-+		crtc->cursor->set_offset(crtc);
-+		ret = crtc->cursor->show(crtc, true);
++		crtc->cursor.offset = ngem->bo->offset -
++				      dev_priv->vm_vram_base;
++		crtc->cursor.set_offset(crtc, crtc->cursor.offset);
++		crtc->cursor.show(crtc, true);
++		crtc->cursor.gem = gem;
 +	} else {
-+		crtc->cursor->set_bo(crtc, NULL);
-+		crtc->cursor->hide(crtc, true);
++		crtc->cursor.hide(crtc, true);
 +	}
 +
 +	return ret;
 +}
 +
-+static int nv50_crtc_cursor_move(struct drm_crtc *drm_crtc, int x, int y)
++static int
++nv50_crtc_cursor_move(struct drm_crtc *drm_crtc, int x, int y)
 +{
 +	struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
 +
-+	return crtc->cursor->set_pos(crtc, x, y);
++	crtc->cursor.set_pos(crtc, x, y);
++	return 0;
 +}
 +
 +void
@@ -18365,25 +18410,39 @@
 +	nv50_crtc_lut_load(crtc);
 +}
 +
++static int
++nv50_crtc_helper_set_config(struct drm_mode_set *set)
++{
++	struct drm_nouveau_private *dev_priv = set->crtc->dev->dev_private;
++	int ret;
++
++	dev_priv->in_modeset = true;
++	ret = drm_crtc_helper_set_config(set);
++	dev_priv->in_modeset = false;
++	return ret;
++}
++
 +static const struct drm_crtc_funcs nv50_crtc_funcs = {
 +	.save = NULL,
 +	.restore = NULL,
 +	.cursor_set = nv50_crtc_cursor_set,
 +	.cursor_move = nv50_crtc_cursor_move,
 +	.gamma_set = nv50_crtc_gamma_set,
-+	.set_config = drm_crtc_helper_set_config,
++	.set_config = nv50_crtc_helper_set_config,
 +	.destroy = nv50_crtc_destroy,
 +};
 +
 +static void nv50_crtc_dpms(struct drm_crtc *drm_crtc, int mode)
 +{
++	struct drm_nouveau_private *dev_priv = drm_crtc->dev->dev_private;
++	struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
++
++	if (dev_priv->in_modeset)
++		nv50_crtc_blank(crtc, true);
 +}
 +
 +static void nv50_crtc_prepare(struct drm_crtc *drm_crtc)
 +{
-+	struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
-+
-+	nv50_crtc_blank(crtc, true);
 +}
 +
 +static void nv50_crtc_commit(struct drm_crtc *drm_crtc)
@@ -18414,6 +18473,16 @@
 +	struct nouveau_framebuffer *fb = to_nouveau_framebuffer(drm_fb);
 +	struct nouveau_gem_object *ngem = nouveau_gem_object(fb->gem);
 +	uint32_t offset = crtc->index * 0x400;
++	int ret;
++
++	ret = nouveau_gem_pin(fb->gem, NOUVEAU_GEM_DOMAIN_VRAM);
++	if (ret)
++		return ret;
++
++	if (old_fb) {
++		struct nouveau_framebuffer *fb = to_nouveau_framebuffer(old_fb);
++		nouveau_gem_unpin(fb->gem);
++	}
 +
 +	crtc->fb.offset = ngem->bo->offset - dev_priv->vm_vram_base;
 +
@@ -18634,15 +18703,15 @@
 +	drm_crtc_helper_add(&crtc->base, &nv50_crtc_helper_funcs);
 +	drm_mode_crtc_set_gamma_size(&crtc->base, 256);
 +
-+	nv50_cursor_create(crtc);
++	nv50_cursor_init(crtc);
 +	return 0;
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.c b/drivers/gpu/drm/nouveau/nv50_cursor.c
 new file mode 100644
-index 0000000..10736de
+index 0000000..61cf304
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_cursor.c
-@@ -0,0 +1,217 @@
+@@ -0,0 +1,146 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -18674,62 +18743,10 @@
 +#include "nouveau_reg.h"
 +#include "nouveau_drv.h"
 +#include "nouveau_crtc.h"
-+#include "nv50_cursor.h"
 +#include "nv50_display.h"
 +
-+static int nv50_cursor_enable(struct nouveau_crtc *crtc)
-+{
-+	struct drm_device *dev = crtc->base.dev;
-+	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	int idx = crtc->index;
-+
-+	DRM_DEBUG("\n");
-+
-+	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0x2000);
-+	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
-+		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK, 0)) {
-+		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS == 0\n");
-+		DRM_ERROR("CURSOR_CTRL2 = 0x%08x\n",
-+			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
-+		return -EBUSY;
-+	}
-+
-+	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index),
-+		NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_ON);
-+	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
-+		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE,
-+		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE)) {
-+		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS_ACTIVE(%d)\n", idx);
-+		DRM_ERROR("CURSOR_CTRL2(%d) = 0x%08x\n", idx,
-+			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
-+		return -EBUSY;
-+	}
-+
-+	return 0;
-+}
-+
-+static int nv50_cursor_disable(struct nouveau_crtc *crtc)
-+{
-+	struct drm_device *dev = crtc->base.dev;
-+	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	int idx = crtc->index;
-+
-+	DRM_DEBUG("\n");
-+
-+	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0);
-+	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
-+		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK, 0)) {
-+		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS == 0\n");
-+		DRM_ERROR("CURSOR_CTRL2 = 0x%08x\n",
-+			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
-+		return -EBUSY;
-+	}
-+
-+	return 0;
-+}
-+
-+/* Calling update or changing the stored cursor state is left to the higher level ioctl's. */
-+static int nv50_cursor_show(struct nouveau_crtc *crtc, bool update)
++static void
++nv50_cursor_show(struct nouveau_crtc *crtc, bool update)
 +{
 +	struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
 +	struct drm_device *dev = crtc->base.dev;
@@ -18737,13 +18754,6 @@
 +
 +	DRM_DEBUG("\n");
 +
-+	/* Better not show the cursor when we have none. */
-+	/* TODO: is cursor offset actually set? */
-+	if (!crtc->cursor->gem) {
-+		DRM_ERROR("No cursor available on crtc %d\n", crtc->index);
-+		return -EINVAL;
-+	}
-+
 +	if (dev_priv->chipset != 0x50)
 +		OUT_MODE(NV84_CRTC0_CURSOR_DMA + offset,
 +			 NV84_CRTC0_CURSOR_DMA_LOCAL);
@@ -18751,13 +18761,12 @@
 +			 
 +	if (update) {
 +		OUT_MODE(NV50_UPDATE_DISPLAY, 0);
-+		crtc->cursor->visible = true;
++		crtc->cursor.visible = true;
 +	}
-+
-+	return 0;
 +}
 +
-+static int nv50_cursor_hide(struct nouveau_crtc *crtc, bool update)
++static void
++nv50_cursor_hide(struct nouveau_crtc *crtc, bool update)
 +{
 +	struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
 +	struct drm_device *dev = crtc->base.dev;
@@ -18772,151 +18781,89 @@
 +
 +	if (update) {
 +		OUT_MODE(NV50_UPDATE_DISPLAY, 0);
-+		crtc->cursor->visible = false;
++		crtc->cursor.visible = false;
 +	}
-+
-+	return 0;
 +}
 +
-+static int nv50_cursor_set_pos(struct nouveau_crtc *crtc, int x, int y)
++static void
++nv50_cursor_set_pos(struct nouveau_crtc *crtc, int x, int y)
 +{
 +	struct drm_nouveau_private *dev_priv = crtc->base.dev->dev_private;
 +
-+	nv_wr32(NV50_HW_CURSOR_POS(crtc->index), ((y & 0xFFFF) << 16) | (x & 0xFFFF));
++	nv_wr32(NV50_HW_CURSOR_POS(crtc->index),
++		((y & 0xFFFF) << 16) | (x & 0xFFFF));
 +	/* Needed to make the cursor move. */
 +	nv_wr32(NV50_HW_CURSOR_POS_CTRL(crtc->index), 0);
-+
-+	return 0;
 +}
 +
-+static int nv50_cursor_set_offset(struct nouveau_crtc *crtc)
++static void
++nv50_cursor_set_offset(struct nouveau_crtc *crtc, uint32_t offset)
 +{
 +	struct drm_device *dev = crtc->base.dev;
-+	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	struct nouveau_gem_object *ngem = nouveau_gem_object(crtc->cursor->gem);
 +
 +	DRM_DEBUG("\n");
 +
-+	if (ngem) {
-+		OUT_MODE(NV50_CRTC0_CURSOR_OFFSET + crtc->index * 0x400,
-+			 (ngem->bo->offset - dev_priv->vm_vram_base) >> 8);
-+	} else {
-+		OUT_MODE(NV50_CRTC0_CURSOR_OFFSET + crtc->index * 0x400, 0);
-+	}
-+
-+	return 0;
++	OUT_MODE(NV50_CRTC0_CURSOR_OFFSET + crtc->index * 0x0400, offset >> 8);
 +}
 +
-+static int
-+nv50_cursor_set_bo(struct nouveau_crtc *crtc, struct drm_gem_object *gem)
++int
++nv50_cursor_init(struct nouveau_crtc *crtc)
 +{
-+	struct nv50_cursor *cursor = crtc->cursor;
++	struct drm_device *dev = crtc->base.dev;
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	int idx = crtc->index;
 +
-+	if (cursor->gem) {
-+		mutex_lock(&crtc->base.dev->struct_mutex);
-+		drm_gem_object_unreference(cursor->gem);
-+		mutex_unlock(&crtc->base.dev->struct_mutex);
++	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0x2000);
++	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
++		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK, 0)) {
++		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS == 0\n");
++		DRM_ERROR("CURSOR_CTRL2 = 0x%08x\n",
++			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
++		return -EBUSY;
++	}
 +
-+		cursor->gem = NULL;
++	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(crtc->index),
++		NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_ON);
++	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
++		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE,
++		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE)) {
++		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS_ACTIVE(%d)\n", idx);
++		DRM_ERROR("CURSOR_CTRL2(%d) = 0x%08x\n", idx,
++			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
++		return -EBUSY;
 +	}
 +
-+	cursor->gem = gem;
++	crtc->cursor.set_offset = nv50_cursor_set_offset;
++	crtc->cursor.set_pos = nv50_cursor_set_pos;
++	crtc->cursor.hide = nv50_cursor_hide;
++	crtc->cursor.show = nv50_cursor_show;
 +	return 0;
 +}
 +
-+int nv50_cursor_create(struct nouveau_crtc *crtc)
++void
++nv50_cursor_fini(struct nouveau_crtc *crtc)
 +{
-+	DRM_DEBUG("\n");
-+
-+	if (!crtc || crtc->cursor)
-+		return -EINVAL;
-+
-+	crtc->cursor = kzalloc(sizeof(struct nv50_cursor), GFP_KERNEL);
-+	if (!crtc->cursor)
-+		return -ENOMEM;
-+
-+	nv50_cursor_enable(crtc);
-+
-+	/* function pointers */
-+	crtc->cursor->show = nv50_cursor_show;
-+	crtc->cursor->hide = nv50_cursor_hide;
-+	crtc->cursor->set_pos = nv50_cursor_set_pos;
-+	crtc->cursor->set_offset = nv50_cursor_set_offset;
-+	crtc->cursor->set_bo = nv50_cursor_set_bo;
-+	return 0;
-+}
++	struct drm_device *dev = crtc->base.dev;
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	int idx = crtc->index;
 +
-+int nv50_cursor_destroy(struct nouveau_crtc *crtc)
-+{
 +	DRM_DEBUG("\n");
 +
-+	if (!crtc || !crtc->cursor)
-+		return -EINVAL;
-+
-+	nv50_cursor_disable(crtc);
-+
-+	kfree(crtc->cursor);
-+	crtc->cursor = NULL;
-+
-+	return 0;
++	nv_wr32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0);
++	if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
++		     NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_MASK, 0)) {
++		DRM_ERROR("timeout: CURSOR_CTRL2_STATUS == 0\n");
++		DRM_ERROR("CURSOR_CTRL2 = 0x%08x\n",
++			  nv_rd32(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
++	}
 +}
-diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.h b/drivers/gpu/drm/nouveau/nv50_cursor.h
-new file mode 100644
-index 0000000..089a69c
---- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nv50_cursor.h
-@@ -0,0 +1,45 @@
-+/*
-+ * Copyright (C) 2008 Maarten Maathuis.
-+ * All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+#ifndef __NV50_CURSOR_H__
-+#define __NV50_CURSOR_H__
-+
-+struct nv50_cursor {
-+	struct drm_gem_object *gem;
-+	int x, y;
-+	bool visible;
-+
-+	int (*show) (struct nouveau_crtc *crtc, bool update);
-+	int (*hide) (struct nouveau_crtc *crtc, bool update);
-+	int (*set_pos) (struct nouveau_crtc *crtc, int x, int y);
-+	int (*set_offset) (struct nouveau_crtc *crtc);
-+	int (*set_bo) (struct nouveau_crtc *crtc, struct drm_gem_object *gem);
-+};
-+
-+int nv50_cursor_create(struct nouveau_crtc *crtc);
-+int nv50_cursor_destroy(struct nouveau_crtc *crtc);
 +
-+#endif /* __NV50_CURSOR_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c
 new file mode 100644
-index 0000000..98c378f
+index 0000000..31c73d2
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_dac.c
-@@ -0,0 +1,280 @@
+@@ -0,0 +1,284 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -19040,6 +18987,11 @@
 +
 +	DRM_DEBUG("or %d\n", or);
 +
++	if (dev_priv->in_modeset) {
++		nv50_dac_disconnect(encoder);
++		return;
++	}
++
 +	/* wait for it to be done */
 +	if (!nv_wait(NV50_PDISPLAY_DAC_REGS_DPMS_CTRL(or),
 +		     NV50_PDISPLAY_DAC_REGS_DPMS_CTRL_PENDING, 0)) {
@@ -19130,15 +19082,14 @@
 +		mode_ctl |= 0x100;
 +	}
 +
-+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
++	if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
 +		mode_ctl2 |= NV50_DAC_MODE_CTRL2_NHSYNC;
 +
-+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
++	if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
 +		mode_ctl2 |= NV50_DAC_MODE_CTRL2_NVSYNC;
 +
 +	OUT_MODE(NV50_DAC0_MODE_CTRL + offset, mode_ctl);
 +	OUT_MODE(NV50_DAC0_MODE_CTRL2 + offset, mode_ctl2);
-+	OUT_MODE(NV50_UPDATE_DISPLAY, 0);
 +}
 +
 +static const struct drm_encoder_helper_funcs nv50_dac_helper_funcs = {
@@ -19199,7 +19150,7 @@
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
 new file mode 100644
-index 0000000..ac69865
+index 0000000..40281e1
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_display.c
 @@ -0,0 +1,441 @@
@@ -19369,9 +19320,9 @@
 +	DRM_DEBUG("\n");
 +
 +	list_for_each_entry(drm_crtc, &dev->mode_config.crtc_list, head) {
-+		struct drm_crtc_helper_funcs *helper = drm_crtc->helper_private;
++		struct nouveau_crtc *crtc = to_nouveau_crtc(drm_crtc);
 +
-+		helper->dpms(drm_crtc, DRM_MODE_DPMS_OFF);
++		nv50_crtc_blank(crtc, true);
 +	}
 +
 +	OUT_MODE(NV50_UPDATE_DISPLAY, 0);
@@ -19646,10 +19597,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_display.h b/drivers/gpu/drm/nouveau/nv50_display.h
 new file mode 100644
-index 0000000..72fbf02
+index 0000000..4227f3f
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_display.h
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,44 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -19684,12 +19635,14 @@
 +#include "nouveau_drv.h"
 +#include "nouveau_dma.h"
 +#include "nouveau_reg.h"
++#include "nouveau_crtc.h"
 +#include "nv50_display_commands.h"
 +
 +void nv50_display_command(struct drm_device *dev, uint32_t mthd, uint32_t val);
 +struct nv50_display *nv50_get_display(struct drm_device *dev);
 +int nv50_display_create(struct drm_device *dev);
 +int nv50_display_destroy(struct drm_device *dev);
++int nv50_crtc_blank(struct nouveau_crtc *, bool blank);
 +
 +#endif /* __NV50_DISPLAY_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nv50_display_commands.h b/drivers/gpu/drm/nouveau/nv50_display_commands.h
@@ -42660,10 +42613,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
 new file mode 100644
-index 0000000..a147fb6
+index 0000000..ff3dd42
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -0,0 +1,274 @@
+@@ -0,0 +1,273 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -42746,6 +42699,11 @@
 +
 +	DRM_DEBUG("or %d\n", encoder->or);
 +
++	if (dev_priv->in_modeset) {
++		nv50_sor_disconnect(encoder);
++		return;
++	}
++
 +	/* wait for it to be done */
 +	if (!nv_wait(NV50_PDISPLAY_SOR_REGS_DPMS_CTRL(or),
 +		     NV50_PDISPLAY_SOR_REGS_DPMS_CTRL_PENDING, 0)) {
@@ -42813,15 +42771,10 @@
 +
 +static void nv50_sor_prepare(struct drm_encoder *drm_encoder)
 +{
-+	struct nouveau_encoder *encoder = to_nouveau_encoder(drm_encoder);
-+
-+	nv50_sor_dpms(drm_encoder, DRM_MODE_DPMS_OFF);
-+	nv50_sor_disconnect(encoder);
 +}
 +
 +static void nv50_sor_commit(struct drm_encoder *drm_encoder)
 +{
-+	nv50_sor_dpms(drm_encoder, DRM_MODE_DPMS_ON);
 +}
 +
 +static void nv50_sor_mode_set(struct drm_encoder *drm_encoder,
@@ -42840,7 +42793,7 @@
 +		mode_ctl |= NV50_SOR_MODE_CTRL_LVDS;
 +	} else {
 +		mode_ctl |= NV50_SOR_MODE_CTRL_TMDS;
-+		if (mode->clock > 165000)
++		if (adjusted_mode->clock > 165000)
 +			mode_ctl |= NV50_SOR_MODE_CTRL_TMDS_DUAL_LINK;
 +	}
 +
@@ -42849,14 +42802,13 @@
 +	else
 +		mode_ctl |= NV50_SOR_MODE_CTRL_CRTC0;
 +
-+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
++	if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
 +		mode_ctl |= NV50_SOR_MODE_CTRL_NHSYNC;
 +
-+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
++	if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
 +		mode_ctl |= NV50_SOR_MODE_CTRL_NVSYNC;
 +
 +	OUT_MODE(NV50_SOR0_MODE_CTRL + offset, mode_ctl);
-+	OUT_MODE(NV50_UPDATE_DISPLAY, 0);
 +}
 +
 +static const struct drm_encoder_helper_funcs nv50_sor_helper_funcs = {


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.12
retrieving revision 1.1294.2.13
diff -u -r1.1294.2.12 -r1.1294.2.13
--- kernel.spec	17 Mar 2009 21:35:47 -0000	1.1294.2.12
+++ kernel.spec	24 Mar 2009 22:57:43 -0000	1.1294.2.13
@@ -3,7 +3,7 @@
 # For a stable, released kernel, released_kernel should be 1. For rawhide
 # and/or a kernel built from an rc or git snapshot, released_kernel should
 # be 0.
-%define released_kernel 0
+%define released_kernel 1
 
 # Versions of various parts
 
@@ -24,14 +24,14 @@
 # 1.1205.1.1.  In this case we drop the initial 1, subtract fedora_cvs_origin
 # from the second number, and then append the rest of the RCS string as is.
 # Don't stare at the awk too long, you'll go blind.
-%define fedora_cvs_origin   1180
+%define fedora_cvs_origin   1293
 %define fedora_cvs_revision() %2
 %global fedora_build %(echo %{fedora_cvs_origin}.%{fedora_cvs_revision $Revision$} | awk -F . '{ OFS = "."; ORS = ""; print $3 - $1 ; i = 4 ; OFS = ""; while (i <= NF) { print ".", $i ; i++} }')
 
 # base_sublevel is the kernel version we're starting with and patching
 # on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
 # which yields a base_sublevel of 21.
-%define base_sublevel 28
+%define base_sublevel 29
 
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
@@ -56,9 +56,9 @@
 # The next upstream release sublevel (base_sublevel+1)
 %define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
 # The rc snapshot level
-%define rcrev 8
+%define rcrev 0
 # The git snapshot level
-%define gitrev 2
+%define gitrev 0
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif
@@ -579,9 +579,6 @@
 # build tweak for build ID magic, even for -vanilla
 Patch05: linux-2.6-makefile-after_link.patch
 
-# ppc64 goes kerspalt with .eh_frame
-Patch06: build-with-fno-dwarf2-cfi-asm.patch
-
 %if !%{nopatches}
 
 # revert upstream patches we get via other methods
@@ -593,10 +590,12 @@
 # Standalone patches
 Patch20: linux-2.6-hotfixes.patch
 
-
-Patch21: linux-2.6-utrace.patch
+Patch21: linux-2.6-tracehook.patch
+Patch22: linux-2.6-utrace.patch
+Patch23: linux-2.6-utrace-ftrace.patch
 
 Patch30: linux-2.6-debug-dma-api.patch
+Patch31: dma-api-debug-fixes.patch
 Patch41: linux-2.6-sysrq-c.patch
 
 Patch141: linux-2.6-ps3-storage-alias.patch
@@ -616,11 +615,13 @@
 Patch380: linux-2.6-defaults-pci_no_msi.patch
 Patch381: linux-2.6-pciehp-update.patch
 Patch382: linux-2.6-defaults-pciehp.patch
+Patch383: linux-2.6-pci-sysfs-remove-id.patch
 Patch390: linux-2.6-defaults-acpi-video.patch
 Patch391: linux-2.6-acpi-video-dos.patch
 Patch392: linux-2.6-acpi-strict-resources.patch
 Patch393: linux-2.6-hwmon-atk0110.patch
 Patch394: linux-2.6-acpi-video-didl-intel-outputs.patch
+Patch395: linux-2.6-sony-laptop-rfkill.patch
 Patch400: linux-2.6-scsi-cpqarray-set-master.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch451: linux-2.6-input-fix-toshiba-hotkeys.patch
@@ -664,11 +665,6 @@
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
 
-# Fix DEBUG_SHIRQ problem in tulip driver.  (454575)
-Patch2001: linux-2.6-net-tulip-interrupt.patch
-# Fix DMA alloc bug in velocity
-Patch2002: linux-2.6-net-velocity-dma.patch
-
 # linux1394 git patches
 Patch2200: linux-2.6-firewire-git-update.patch
 Patch2201: linux-2.6-firewire-git-pending.patch
@@ -677,15 +673,11 @@
 # silence the ACPI blacklist code
 Patch2802: linux-2.6-silence-acpi-blacklist.patch
 
-Patch2897: linux-2.6-hdpvr.patch
-
 Patch2899: linux-2.6-v4l-dvb-fixes.patch
 Patch2900: linux-2.6-v4l-dvb-update.patch
 Patch2901: linux-2.6-v4l-dvb-experimental.patch
 
 # fs fixes
-Patch2910: linux-2.6-ext4-extent-header-check-fix.patch
-Patch2911: linux-2.6-ext4-print-warning-once.patch
 Patch2920: linux-2.6-ext4-flush-on-close.patch
 Patch3000: linux-2.6-btrfs-experimental-branch.patch
 
@@ -1042,8 +1034,6 @@
 
 ApplyPatch linux-2.6-makefile-after_link.patch
 
-ApplyPatch build-with-fno-dwarf2-cfi-asm.patch
-
 #
 # misc small stuff to make things compile
 #
@@ -1066,10 +1056,13 @@
 ApplyPatch linux-2.6-hotfixes.patch
 
 # Roland's utrace ptrace replacement.
+ApplyPatch linux-2.6-tracehook.patch
 ApplyPatch linux-2.6-utrace.patch
+ApplyPatch linux-2.6-utrace-ftrace.patch
 
 # DMA API debugging
 #ApplyPatch linux-2.6-debug-dma-api.patch
+#ApplyPatch dma-api-debug-fixes.patch
 
 # enable sysrq-c on all kernels, not only kexec
 ApplyPatch linux-2.6-sysrq-c.patch
@@ -1108,9 +1101,6 @@
 #
 
 # ext4
-ApplyPatch linux-2.6-ext4-extent-header-check-fix.patch
-ApplyPatch linux-2.6-ext4-print-warning-once.patch
-
 ApplyPatch linux-2.6-ext4-flush-on-close.patch
 
 # xfs
@@ -1126,6 +1116,7 @@
 ApplyPatch linux-2.6-acpi-strict-resources.patch
 ApplyPatch linux-2.6-hwmon-atk0110.patch
 ApplyPatch linux-2.6-acpi-video-didl-intel-outputs.patch
+ApplyPatch linux-2.6-sony-laptop-rfkill.patch
 
 # Various low-impact patches to aid debugging.
 ApplyPatch linux-2.6-debug-sizeof-structs.patch
@@ -1144,6 +1135,8 @@
 #ApplyPatch linux-2.6-pciehp-update.patch
 # default to enabling passively listening for hotplug events
 #ApplyPatch linux-2.6-defaults-pciehp.patch
+# Add /sys/bus/pci/devices/*/remove_id
+ApplyPatch linux-2.6-pci-sysfs-remove-id.patch
 
 #
 # SCSI Bits.
@@ -1199,8 +1192,6 @@
 
 # http://www.lirc.org/
 ApplyPatch linux-2.6.29-lirc.patch
-# http://hg.jannau.net/hdpvr/
-ApplyPatch linux-2.6-hdpvr.patch
 
 # Fix the return code CD accesses when the CDROM drive door is closed
 # but the drive isn't yet ready.
@@ -1208,9 +1199,6 @@
 
 ApplyPatch linux-2.6-e1000-ich9.patch
 
-ApplyPatch linux-2.6-net-tulip-interrupt.patch
-ApplyPatch linux-2.6-net-velocity-dma.patch
-
 ApplyPatch agp-set_memory_ucwb.patch
 # Nouveau DRM + drm fixes
 ApplyPatch drm-next.patch
@@ -1828,6 +1816,95 @@
 # and build.
 
 %changelog
+* Tue Mar 24 2009 Michael Young <m.a.young at durham.ac.uk>
+- Update pvops patch and fix package numbering for 2.6.29
+
+* Tue Mar 24 2009 Josef Bacik <josef at toxicpanda.com>
+- fsync replay fixes for btrfs
+
+* Mon Mar 23 2009 Dave Jones <davej at redhat.com>
+- 2.6.29
+
+* Mon Mar 23 2009 Mauro Carvalho Chehab <mchehab at rehat.com>
+- Some fixes on drivers/media
+- Removed inexistent drivers/media items from config-generic
+- Cinergy T2 option were renamed. Use the current syntax
+
+* Mon Mar 23 2009 Matthew Garrett <mjg at redhat.com>
+- linux-2.6-sony-laptop-rfkill.patch
+   Update to support hotkeys and rfkill switch
+
+* Mon Mar 23 2009 Bill Nottingham <notting at redhat.com>
+- build ide-gd_mod in on PPC (#491380)
+
+* Mon Mar 23 2009 Mark McLoughlin <markmc at redhat.com>
+- Add /sys/bus/pci/devices/*/remove_id for KVM (#487103)
+
+* Mon Mar 23 2009 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.29-rc8-git6
+
+* Mon Mar 23 2009 Roland McGrath <roland at redhat.com>
+- utrace update, fixes /proc/pid/status format (#491508)
+
+* Mon Mar 23 2009 Ben Skeggs <bskeggs at redhat.com>
+- drm-nouveau.patch: fix GEM object leak, and display shutdown issue
+
+* Fri Mar 20 2009 Kyle McMartin <kyle at redhat.com>
+- Linux 2.6.29-rc8-git5
+
+* Thu Mar 19 2009 Mauro Carvalho Chehab <mchehab at redhat.com>
+- Removed v4l-build-fixes.patch
+
+* Thu Mar 19 2009 Mauro Carvalho Chehab <mchehab at redhat.com>
+- update v4l-dvb to reflect changes at linux-next
+
+* Thu Mar 19 2009 Matthew Garrett <mjg at redhat.com>
+- linux-2.6-acpi-video-didl-intel-outputs.patch
+   don't attempt to re-register the backlight device on resume
+- linux-2.6-sony-laptop-rfkill.patch
+   provide rfkill control on current vaios
+
+* Thu Mar 19 2009 Dave Jones <davej at redhat.com>
+- Switch x86-32 back to using 8k stacks.
+
+* Thu Mar 19 2009 Chuck Ebbert <cebbert at redhat.com>
+- Enable the sfc 10GbE network driver.
+
+* Thu Mar 19 2009 Kyle McMartin <kyle at redhat.com>
+- dma-api debug fixes for e1000 and e1000e from tip.
+- fix dma leak in tulip request_irq error path.
+
+* Thu Mar 19 2009 Kyle McMartin <kyle at redhat.com> 2.6.29-0.267.rc8.git4
+- build fixes for v4l tree.
+
+* Thu Mar 19 2009 Roland McGrath <roland at redhat.com> 2.6.29-0.266.rc8.git4
+- utrace update, add ftrace process-tracer widget, drop utrace-ptrace
+
+* Thu Mar 19 2009 Ben Skeggs <bskeggs at redhat.com>
+- drm-nouveau.patch: kms fixes and cleanups
+
+* Thu Mar 19 2009 Chuck Ebbert <cebbert at redhat.com>
+- 2.6.29-rc8-git4
+- Dropped patches, merged upstream:
+    linux-2.6-ext4-extent-header-check-fix.patch
+    linux-2.6-ext4-print-warning-once.patch
+    linux-2.6-net-velocity-dma.patch
+
+* Wed Mar 18 2009 Mauro Carvalho Chehab <mchehab at redhat.com>
+- merge hdpvr patch into v4l-dvb updates
+- update v4l-dvb to reflect changes at linux-next
+
+* Wed Mar 18 2009 Jarod Wilson <jarod at redhat.com>
+- Update hdpvr patch to version targeted for v4l-dvb merge
+- Re-sort patches to add hdpvr after v4l-dvb updates
+
+* Wed Mar 18 2009 Dave Airlie <airlied at redhat.com>
+- drm-next.patch: fix rs600 GART setup
+- drm-modesetting-radeon.patch: allocator fixups
+
+* Wed Mar 18 2009 Ben Skeggs <bskeggs at redhat.com>
+- enable CONFIG_MMIOTRACE on x86/x86_64
+
 * Tue Mar 17 2009 Michael Young <m.a.young at durham.ac.uk>
 - update pvops patch
 
@@ -1904,9 +1981,9 @@
   around insufficient flushing on i855 and i865 chipsets.
 
 * Wed Mar 11 2009 Steve Dickson <steved at redhat.com> 2.6.29-0.236.rc7.git4
-- Removed both the lockd-svc-register.patch and 
+- Removed both the lockd-svc-register.patch and
   sunrpc-ipv6-rpcbind.patch patches in favor of simply turning
-  off CONFIG_SUNRPC_REGISTER_V4 config variable. 
+  off CONFIG_SUNRPC_REGISTER_V4 config variable.
 
 * Wed Mar 11 2009 Eric Sandeen <sandeen at redhat.com> 2.6.29-0.235.rc7.git4
 - Fix incorrect header check values in ext4_ext_search_right()
@@ -2252,7 +2329,7 @@
 * Thu Feb 19 2009 Dave Jones <davej at redhat.com> 2.6.29-0.131.rc5.git3
 - 2.6.29-rc5-git3
 
-* Thu Feb 19 2009 Dave Airlie <airlied at redhat.com> 
+* Thu Feb 19 2009 Dave Airlie <airlied at redhat.com>
 - radeon: add module device table
 
 * Wed Feb 18 2009 Kyle McMartin <kyle at redhat.com>
@@ -2744,7 +2821,7 @@
 
 * Mon Dec 08 2008 Kyle McMartin <kyle at redhat.com>
 - properly fix headers in kernel-devel if headers are in arch/$arch/include,
-  sadly was not able to kill off %hdrarch since $Arch is undefined at the
+  sadly was not able to kill off %%hdrarch since $Arch is undefined at the
   time we need it for headers install.
 
 * Mon Dec 08 2008 Kyle McMartin <kyle at redhat.com>
@@ -4392,3 +4469,10 @@
 
 * Wed May 07 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.2-5
 - Add the patches queued for 2.6.25.3
+
+###
+# The following Emacs magic makes C-c C-e use UTC dates.
+# Local Variables:
+# rpm-change-log-uses-utc: t
+# End:
+###

linux-2.6-acpi-video-didl-intel-outputs.patch:

Index: linux-2.6-acpi-video-didl-intel-outputs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-acpi-video-didl-intel-outputs.patch,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- linux-2.6-acpi-video-didl-intel-outputs.patch	12 Mar 2009 20:38:57 -0000	1.1.2.2
+++ linux-2.6-acpi-video-didl-intel-outputs.patch	24 Mar 2009 22:57:43 -0000	1.1.2.3
@@ -1,4 +1,4 @@
-commit a0fdbca7264432e073f5cdde8bebbcba96165337
+commit e889ecd58e4f710ff48dd84272130f19ac577ee6
 Author: Matthew Garrett <mjg at redhat.com>
 Date:   Wed Mar 11 16:39:36 2009 +0000
 
@@ -78,7 +78,7 @@
  static void __exit acpi_video_exit(void)
  {
 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
-index 6dab63b..70a9904 100644
+index 6dab63b..5881b6a 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
 @@ -1144,8 +1144,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
@@ -95,13 +95,39 @@
  	}
  
 +	/* Must be done after probing outputs */
-+	intel_opregion_init(dev);
++	intel_opregion_init(dev, 0);
 +
  	return 0;
  
  out_iomapfree:
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index b293ef0..209592f 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -99,7 +99,7 @@ static int i915_resume(struct drm_device *dev)
+ 
+ 	i915_restore_state(dev);
+ 
+-	intel_opregion_init(dev);
++	intel_opregion_init(dev, 1);
+ 
+ 	/* KMS EnterVT equivalent */
+ 	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+index 17fa408..aee6f9e 100644
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
+@@ -654,7 +654,7 @@ extern int i915_restore_state(struct drm_device *dev);
+ 
+ #ifdef CONFIG_ACPI
+ /* i915_opregion.c */
+-extern int intel_opregion_init(struct drm_device *dev);
++extern int intel_opregion_init(struct drm_device *dev, int resume);
+ extern void intel_opregion_free(struct drm_device *dev);
+ extern void opregion_asle_intr(struct drm_device *dev);
+ extern void opregion_enable_asle(struct drm_device *dev);
 diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
-index ff01283..60b746f 100644
+index ff01283..6942772 100644
 --- a/drivers/gpu/drm/i915/i915_opregion.c
 +++ b/drivers/gpu/drm/i915/i915_opregion.c
 @@ -26,6 +26,7 @@
@@ -125,10 +151,11 @@
  static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
  {
  	struct drm_i915_private *dev_priv = dev->dev_private;
-@@ -282,6 +289,57 @@ static struct notifier_block intel_opregion_notifier = {
+@@ -282,7 +289,58 @@ static struct notifier_block intel_opregion_notifier = {
  	.notifier_call = intel_opregion_video_event,
  };
  
+-int intel_opregion_init(struct drm_device *dev)
 +/*
 + * Initialise the DIDL field in opregion. This passes a list of devices to
 + * the firmware. Values are defined by section B.4.2 of the ACPI specification
@@ -180,16 +207,18 @@
 +		opregion->acpi->didl[i] = 0;
 +}
 +
- int intel_opregion_init(struct drm_device *dev)
++int intel_opregion_init(struct drm_device *dev, int resume)
  {
  	struct drm_i915_private *dev_priv = dev->dev_private;
-@@ -312,6 +370,10 @@ int intel_opregion_init(struct drm_device *dev)
+ 	struct intel_opregion *opregion = &dev_priv->opregion;
+@@ -312,6 +370,11 @@ int intel_opregion_init(struct drm_device *dev)
  	if (mboxes & MBOX_ACPI) {
  		DRM_DEBUG("Public ACPI methods supported\n");
  		opregion->acpi = base + OPREGION_ACPI_OFFSET;
 +		if (drm_core_check_feature(dev, DRIVER_MODESET)) {
 +			intel_didl_outputs(dev);
-+			acpi_video_register();
++			if (!resume)
++				acpi_video_register();
 +		}
  	} else {
  		DRM_DEBUG("Public ACPI methods not supported\n");

linux-2.6-btrfs-experimental-branch.patch:

Index: linux-2.6-btrfs-experimental-branch.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-btrfs-experimental-branch.patch,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- linux-2.6-btrfs-experimental-branch.patch	17 Mar 2009 21:35:47 -0000	1.1.2.2
+++ linux-2.6-btrfs-experimental-branch.patch	24 Mar 2009 22:57:43 -0000	1.1.2.3
@@ -5205,3 +5205,946 @@
  out:
  	if (path)
  		btrfs_free_path(path);
+diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
+index 72677ce..3af4cfb 100644
+--- a/fs/btrfs/btrfs_inode.h
++++ b/fs/btrfs/btrfs_inode.h
+@@ -86,12 +86,6 @@ struct btrfs_inode {
+ 	 */
+ 	u64 logged_trans;
+ 
+-	/*
+-	 * trans that last made a change that should be fully fsync'd.  This
+-	 * gets reset to zero each time the inode is logged
+-	 */
+-	u64 log_dirty_trans;
+-
+ 	/* total number of bytes pending delalloc, used by stat to calc the
+ 	 * real block usage of the file
+ 	 */
+@@ -121,6 +115,13 @@ struct btrfs_inode {
+ 	/* the start of block group preferred for allocations. */
+ 	u64 block_group;
+ 
++	/* the fsync log has some corner cases that mean we have to check
++	 * directories to see if any unlinks have been done before
++	 * the directory was logged.  See tree-log.c for all the
++	 * details
++	 */
++	u64 last_unlink_trans;
++
+ 	struct inode vfs_inode;
+ };
+ 
+diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
+index 4ddce91..2737fac 100644
+--- a/fs/btrfs/ctree.h
++++ b/fs/btrfs/ctree.h
+@@ -695,7 +695,12 @@ struct btrfs_fs_info {
+ 
+ 	u64 generation;
+ 	u64 last_trans_committed;
+-	u64 last_trans_new_blockgroup;
++
++	/*
++	 * this is updated to the current trans every time a full commit
++	 * is required instead of the faster short fsync log commits
++	 */
++	u64 last_trans_log_full_commit;
+ 	u64 open_ioctl_trans;
+ 	unsigned long mount_opt;
+ 	u64 max_extent;
+diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
+index 8933d15..0c482e0 100644
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -5897,7 +5897,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
+ 
+ 	extent_root = root->fs_info->extent_root;
+ 
+-	root->fs_info->last_trans_new_blockgroup = trans->transid;
++	root->fs_info->last_trans_log_full_commit = trans->transid;
+ 
+ 	cache = kzalloc(sizeof(*cache), GFP_NOFS);
+ 	if (!cache)
+diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
+index f06c275..32d10a6 100644
+--- a/fs/btrfs/file.c
++++ b/fs/btrfs/file.c
+@@ -1173,8 +1173,11 @@ out_nolock:
+ 			ret = btrfs_log_dentry_safe(trans, root,
+ 						    file->f_dentry);
+ 			if (ret == 0) {
+-				btrfs_sync_log(trans, root);
+-				btrfs_end_transaction(trans, root);
++				ret = btrfs_sync_log(trans, root);
++				if (ret == 0)
++					btrfs_end_transaction(trans, root);
++				else
++					btrfs_commit_transaction(trans, root);
+ 			} else {
+ 				btrfs_commit_transaction(trans, root);
+ 			}
+@@ -1266,8 +1269,11 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
+ 	if (ret > 0) {
+ 		ret = btrfs_commit_transaction(trans, root);
+ 	} else {
+-		btrfs_sync_log(trans, root);
+-		ret = btrfs_end_transaction(trans, root);
++		ret = btrfs_sync_log(trans, root);
++		if (ret == 0)
++			ret = btrfs_end_transaction(trans, root);
++		else
++			ret = btrfs_commit_transaction(trans, root);
+ 	}
+ 	mutex_lock(&dentry->d_inode->i_mutex);
+ out:
+diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
+index 9b4faac..bffd79f 100644
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
+@@ -2246,8 +2246,6 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
+ 	ret = btrfs_del_inode_ref_in_log(trans, root, name, name_len,
+ 					 inode, dir->i_ino);
+ 	BUG_ON(ret != 0 && ret != -ENOENT);
+-	if (ret != -ENOENT)
+-		BTRFS_I(dir)->log_dirty_trans = trans->transid;
+ 
+ 	ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
+ 					   dir, index);
+@@ -2280,6 +2278,9 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
+ 	trans = btrfs_start_transaction(root, 1);
+ 
+ 	btrfs_set_trans_block_group(trans, dir);
++
++	btrfs_record_unlink_dir(trans, dir, dentry->d_inode, 0);
++
+ 	ret = btrfs_unlink_inode(trans, root, dir, dentry->d_inode,
+ 				 dentry->d_name.name, dentry->d_name.len);
+ 
+@@ -3042,7 +3043,7 @@ static noinline void init_btrfs_i(struct inode *inode)
+ 	bi->disk_i_size = 0;
+ 	bi->flags = 0;
+ 	bi->index_cnt = (u64)-1;
+-	bi->log_dirty_trans = 0;
++	bi->last_unlink_trans = 0;
+ 	extent_map_tree_init(&BTRFS_I(inode)->extent_tree, GFP_NOFS);
+ 	extent_io_tree_init(&BTRFS_I(inode)->io_tree,
+ 			     inode->i_mapping, GFP_NOFS);
+@@ -3786,6 +3787,8 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
+ 		drop_inode = 1;
+ 
+ 	nr = trans->blocks_used;
++
++	btrfs_log_new_name(trans, inode, NULL, dentry->d_parent);
+ 	btrfs_end_transaction_throttle(trans, root);
+ fail:
+ 	if (drop_inode) {
+@@ -4666,6 +4669,15 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+ 
+ 	trans = btrfs_start_transaction(root, 1);
+ 
++	/*
++	 * this is an ugly little race, but the rename is required to make
++	 * sure that if we crash, the inode is either at the old name
++	 * or the new one.  pinning the log transaction lets us make sure
++	 * we don't allow a log commit to come in after we unlink the
++	 * name but before we add the new name back in.
++	 */
++	btrfs_pin_log_trans(root);
++
+ 	btrfs_set_trans_block_group(trans, new_dir);
+ 
+ 	btrfs_inc_nlink(old_dentry->d_inode);
+@@ -4673,6 +4685,9 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+ 	new_dir->i_ctime = new_dir->i_mtime = ctime;
+ 	old_inode->i_ctime = ctime;
+ 
++	if (old_dentry->d_parent != new_dentry->d_parent)
++		btrfs_record_unlink_dir(trans, old_dir, old_inode, 1);
++
+ 	ret = btrfs_unlink_inode(trans, root, old_dir, old_dentry->d_inode,
+ 				 old_dentry->d_name.name,
+ 				 old_dentry->d_name.len);
+@@ -4704,7 +4719,14 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+ 	if (ret)
+ 		goto out_fail;
+ 
++	btrfs_log_new_name(trans, old_inode, old_dir,
++				       new_dentry->d_parent);
+ out_fail:
++
++	/* this btrfs_end_log_trans just allows the current
++	 * log-sub transaction to complete
++	 */
++	btrfs_end_log_trans(root);
+ 	btrfs_end_transaction_throttle(trans, root);
+ out_unlock:
+ 	return ret;
+diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
+index 9c462fb..fc9b87a 100644
+--- a/fs/btrfs/tree-log.c
++++ b/fs/btrfs/tree-log.c
+@@ -35,6 +35,49 @@
+ #define LOG_INODE_EXISTS 1
+ 
+ /*
++ * directory trouble cases
++ *
++ * 1) on rename or unlink, if the inode being unlinked isn't in the fsync
++ * log, we must force a full commit before doing an fsync of the directory
++ * where the unlink was done.
++ * ---> record transid of last unlink/rename per directory
++ *
++ * mkdir foo/some_dir
++ * normal commit
++ * rename foo/some_dir foo2/some_dir
++ * mkdir foo/some_dir
++ * fsync foo/some_dir/some_file
++ *
++ * The fsync above will unlink the original some_dir without recording
++ * it in its new location (foo2).  After a crash, some_dir will be gone
++ * unless the fsync of some_file forces a full commit
++ *
++ * 2) we must log any new names for any file or dir that is in the fsync
++ * log. ---> check inode while renaming/linking.
++ *
++ * 2a) we must log any new names for any file or dir during rename
++ * when the directory they are being removed from was logged.
++ * ---> check inode and old parent dir during rename
++ *
++ *  2a is actually the more important variant.  With the extra logging
++ *  a crash might unlink the old name without recreating the new one
++ *
++ * 3) after a crash, we must go through any directories with a link count
++ * of zero and redo the rm -rf
++ *
++ * mkdir f1/foo
++ * normal commit
++ * rm -rf f1/foo
++ * fsync(f1)
++ *
++ * The directory f1 was fully removed from the FS, but fsync was never
++ * called on f1, only its parent dir.  After a crash the rm -rf must
++ * be replayed.  This must be able to recurse down the entire
++ * directory tree.  The inode link count fixup code takes care of the
++ * ugly details.
++ */
++
++/*
+  * stages for the tree walking.  The first
+  * stage (0) is to only pin down the blocks we find
+  * the second stage (1) is to make sure that all the inodes
+@@ -47,12 +90,17 @@
+ #define LOG_WALK_REPLAY_INODES 1
+ #define LOG_WALK_REPLAY_ALL 2
+ 
+-static int __btrfs_log_inode(struct btrfs_trans_handle *trans,
++static int btrfs_log_inode(struct btrfs_trans_handle *trans,
+ 			     struct btrfs_root *root, struct inode *inode,
+ 			     int inode_only);
+ static int link_to_fixup_dir(struct btrfs_trans_handle *trans,
+ 			     struct btrfs_root *root,
+ 			     struct btrfs_path *path, u64 objectid);
++static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
++				       struct btrfs_root *root,
++				       struct btrfs_root *log,
++				       struct btrfs_path *path,
++				       u64 dirid, int del_all);
+ 
+ /*
+  * tree logging is a special write ahead log used to make sure that
+@@ -133,10 +181,25 @@ static int join_running_log_trans(struct btrfs_root *root)
+ }
+ 
+ /*
++ * This either makes the current running log transaction wait
++ * until you call btrfs_end_log_trans() or it makes any future
++ * log transactions wait until you call btrfs_end_log_trans()
++ */
++int btrfs_pin_log_trans(struct btrfs_root *root)
++{
++	int ret = -ENOENT;
++
++	mutex_lock(&root->log_mutex);
++	atomic_inc(&root->log_writers);
++	mutex_unlock(&root->log_mutex);
++	return ret;
++}
++
++/*
+  * indicate we're done making changes to the log tree
+  * and wake up anyone waiting to do a sync
+  */
+-static int end_log_trans(struct btrfs_root *root)
++int btrfs_end_log_trans(struct btrfs_root *root)
+ {
+ 	if (atomic_dec_and_test(&root->log_writers)) {
+ 		smp_mb();
+@@ -203,7 +266,6 @@ static int process_one_buffer(struct btrfs_root *log,
+ 		mutex_lock(&log->fs_info->pinned_mutex);
+ 		btrfs_update_pinned_extents(log->fs_info->extent_root,
+ 					    eb->start, eb->len, 1);
+-		mutex_unlock(&log->fs_info->pinned_mutex);
+ 	}
+ 
+ 	if (btrfs_buffer_uptodate(eb, gen)) {
+@@ -603,6 +665,7 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
+ 
+ 	ret = link_to_fixup_dir(trans, root, path, location.objectid);
+ 	BUG_ON(ret);
++
+ 	ret = btrfs_unlink_inode(trans, root, dir, inode, name, name_len);
+ 	BUG_ON(ret);
+ 	kfree(name);
+@@ -804,6 +867,7 @@ conflict_again:
+ 					    victim_name_len)) {
+ 				btrfs_inc_nlink(inode);
+ 				btrfs_release_path(root, path);
++
+ 				ret = btrfs_unlink_inode(trans, root, dir,
+ 							 inode, victim_name,
+ 							 victim_name_len);
+@@ -922,13 +986,20 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
+ 		key.offset--;
+ 		btrfs_release_path(root, path);
+ 	}
+-	btrfs_free_path(path);
++	btrfs_release_path(root, path);
+ 	if (nlink != inode->i_nlink) {
+ 		inode->i_nlink = nlink;
+ 		btrfs_update_inode(trans, root, inode);
+ 	}
+ 	BTRFS_I(inode)->index_cnt = (u64)-1;
+ 
++	if (inode->i_nlink == 0 && S_ISDIR(inode->i_mode)) {
++		ret = replay_dir_deletes(trans, root, NULL, path,
++					 inode->i_ino, 1);
++		BUG_ON(ret);
++	}
++	btrfs_free_path(path);
++
+ 	return 0;
+ }
+ 
+@@ -971,9 +1042,12 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,
+ 
+ 		iput(inode);
+ 
+-		if (key.offset == 0)
+-			break;
+-		key.offset--;
++		/*
++		 * fixup on a directory may create new entries,
++		 * make sure we always look for the highset possible
++		 * offset
++		 */
++		key.offset = (u64)-1;
+ 	}
+ 	btrfs_release_path(root, path);
+ 	return 0;
+@@ -1313,11 +1387,11 @@ again:
+ 		read_extent_buffer(eb, name, (unsigned long)(di + 1),
+ 				  name_len);
+ 		log_di = NULL;
+-		if (dir_key->type == BTRFS_DIR_ITEM_KEY) {
++		if (log && dir_key->type == BTRFS_DIR_ITEM_KEY) {
+ 			log_di = btrfs_lookup_dir_item(trans, log, log_path,
+ 						       dir_key->objectid,
+ 						       name, name_len, 0);
+-		} else if (dir_key->type == BTRFS_DIR_INDEX_KEY) {
++		} else if (log && dir_key->type == BTRFS_DIR_INDEX_KEY) {
+ 			log_di = btrfs_lookup_dir_index_item(trans, log,
+ 						     log_path,
+ 						     dir_key->objectid,
+@@ -1378,7 +1452,7 @@ static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
+ 				       struct btrfs_root *root,
+ 				       struct btrfs_root *log,
+ 				       struct btrfs_path *path,
+-				       u64 dirid)
++				       u64 dirid, int del_all)
+ {
+ 	u64 range_start;
+ 	u64 range_end;
+@@ -1408,10 +1482,14 @@ again:
+ 	range_start = 0;
+ 	range_end = 0;
+ 	while (1) {
+-		ret = find_dir_range(log, path, dirid, key_type,
+-				     &range_start, &range_end);
+-		if (ret != 0)
+-			break;
++		if (del_all)
++			range_end = (u64)-1;
++		else {
++			ret = find_dir_range(log, path, dirid, key_type,
++					     &range_start, &range_end);
++			if (ret != 0)
++				break;
++		}
+ 
+ 		dir_key.offset = range_start;
+ 		while (1) {
+@@ -1437,7 +1515,8 @@ again:
+ 				break;
+ 
+ 			ret = check_item_in_log(trans, root, log, path,
+-						log_path, dir, &found_key);
++						log_path, dir,
++						&found_key);
+ 			BUG_ON(ret);
+ 			if (found_key.offset == (u64)-1)
+ 				break;
+@@ -1514,7 +1593,7 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
+ 			mode = btrfs_inode_mode(eb, inode_item);
+ 			if (S_ISDIR(mode)) {
+ 				ret = replay_dir_deletes(wc->trans,
+-					 root, log, path, key.objectid);
++					 root, log, path, key.objectid, 0);
+ 				BUG_ON(ret);
+ 			}
+ 			ret = overwrite_item(wc->trans, root, path,
+@@ -1533,6 +1612,17 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
+ 					root, inode, inode->i_size,
+ 					BTRFS_EXTENT_DATA_KEY);
+ 				BUG_ON(ret);
++
++				/* if the nlink count is zero here, the iput
++				 * will free the inode.  We bump it to make
++				 * sure it doesn't get freed until the link
++				 * count fixup is done
++				 */
++				if (inode->i_nlink == 0) {
++					btrfs_inc_nlink(inode);
++					btrfs_update_inode(wc->trans,
++							   root, inode);
++				}
+ 				iput(inode);
+ 			}
+ 			ret = link_to_fixup_dir(wc->trans, root,
+@@ -1840,7 +1930,8 @@ static int update_log_root(struct btrfs_trans_handle *trans,
+ 	return ret;
+ }
+ 
+-static int wait_log_commit(struct btrfs_root *root, unsigned long transid)
++static int wait_log_commit(struct btrfs_trans_handle *trans,
++			   struct btrfs_root *root, unsigned long transid)
+ {
+ 	DEFINE_WAIT(wait);
+ 	int index = transid % 2;
+@@ -1854,9 +1945,12 @@ static int wait_log_commit(struct btrfs_root *root, unsigned long transid)
+ 		prepare_to_wait(&root->log_commit_wait[index],
+ 				&wait, TASK_UNINTERRUPTIBLE);
+ 		mutex_unlock(&root->log_mutex);
+-		if (root->log_transid < transid + 2 &&
++
++		if (root->fs_info->last_trans_log_full_commit !=
++		    trans->transid && root->log_transid < transid + 2 &&
+ 		    atomic_read(&root->log_commit[index]))
+ 			schedule();
++
+ 		finish_wait(&root->log_commit_wait[index], &wait);
+ 		mutex_lock(&root->log_mutex);
+ 	} while (root->log_transid < transid + 2 &&
+@@ -1864,14 +1958,16 @@ static int wait_log_commit(struct btrfs_root *root, unsigned long transid)
+ 	return 0;
+ }
+ 
+-static int wait_for_writer(struct btrfs_root *root)
++static int wait_for_writer(struct btrfs_trans_handle *trans,
++			   struct btrfs_root *root)
+ {
+ 	DEFINE_WAIT(wait);
+ 	while (atomic_read(&root->log_writers)) {
+ 		prepare_to_wait(&root->log_writer_wait,
+ 				&wait, TASK_UNINTERRUPTIBLE);
+ 		mutex_unlock(&root->log_mutex);
+-		if (atomic_read(&root->log_writers))
++		if (root->fs_info->last_trans_log_full_commit !=
++		    trans->transid && atomic_read(&root->log_writers))
+ 			schedule();
+ 		mutex_lock(&root->log_mutex);
+ 		finish_wait(&root->log_writer_wait, &wait);
+@@ -1882,7 +1978,14 @@ static int wait_for_writer(struct btrfs_root *root)
+ /*
+  * btrfs_sync_log does sends a given tree log down to the disk and
+  * updates the super blocks to record it.  When this call is done,
+- * you know that any inodes previously logged are safely on disk
++ * you know that any inodes previously logged are safely on disk only
++ * if it returns 0.
++ *
++ * Any other return value means you need to call btrfs_commit_transaction.
++ * Some of the edge cases for fsyncing directories that have had unlinks
++ * or renames done in the past mean that sometimes the only safe
++ * fsync is to commit the whole FS.  When btrfs_sync_log returns -EAGAIN,
++ * that has happened.
+  */
+ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 		   struct btrfs_root *root)
+@@ -1896,7 +1999,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 	mutex_lock(&root->log_mutex);
+ 	index1 = root->log_transid % 2;
+ 	if (atomic_read(&root->log_commit[index1])) {
+-		wait_log_commit(root, root->log_transid);
++		wait_log_commit(trans, root, root->log_transid);
+ 		mutex_unlock(&root->log_mutex);
+ 		return 0;
+ 	}
+@@ -1904,18 +2007,26 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 
+ 	/* wait for previous tree log sync to complete */
+ 	if (atomic_read(&root->log_commit[(index1 + 1) % 2]))
+-		wait_log_commit(root, root->log_transid - 1);
++		wait_log_commit(trans, root, root->log_transid - 1);
+ 
+ 	while (1) {
+ 		unsigned long batch = root->log_batch;
+ 		mutex_unlock(&root->log_mutex);
+ 		schedule_timeout_uninterruptible(1);
+ 		mutex_lock(&root->log_mutex);
+-		wait_for_writer(root);
++
++		wait_for_writer(trans, root);
+ 		if (batch == root->log_batch)
+ 			break;
+ 	}
+ 
++	/* bail out if we need to do a full commit */
++	if (root->fs_info->last_trans_log_full_commit == trans->transid) {
++		ret = -EAGAIN;
++		mutex_unlock(&root->log_mutex);
++		goto out;
++	}
++
+ 	ret = btrfs_write_and_wait_marked_extents(log, &log->dirty_log_pages);
+ 	BUG_ON(ret);
+ 
+@@ -1951,16 +2062,29 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 
+ 	index2 = log_root_tree->log_transid % 2;
+ 	if (atomic_read(&log_root_tree->log_commit[index2])) {
+-		wait_log_commit(log_root_tree, log_root_tree->log_transid);
++		wait_log_commit(trans, log_root_tree,
++				log_root_tree->log_transid);
+ 		mutex_unlock(&log_root_tree->log_mutex);
+ 		goto out;
+ 	}
+ 	atomic_set(&log_root_tree->log_commit[index2], 1);
+ 
+-	if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2]))
+-		wait_log_commit(log_root_tree, log_root_tree->log_transid - 1);
++	if (atomic_read(&log_root_tree->log_commit[(index2 + 1) % 2])) {
++		wait_log_commit(trans, log_root_tree,
++				log_root_tree->log_transid - 1);
++	}
++
++	wait_for_writer(trans, log_root_tree);
+ 
+-	wait_for_writer(log_root_tree);
++	/*
++	 * now that we've moved on to the tree of log tree roots,
++	 * check the full commit flag again
++	 */
++	if (root->fs_info->last_trans_log_full_commit == trans->transid) {
++		mutex_unlock(&log_root_tree->log_mutex);
++		ret = -EAGAIN;
++		goto out_wake_log_root;
++	}
+ 
+ 	ret = btrfs_write_and_wait_marked_extents(log_root_tree,
+ 				&log_root_tree->dirty_log_pages);
+@@ -1985,7 +2109,9 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 	 * in and cause problems either.
+ 	 */
+ 	write_ctree_super(trans, root->fs_info->tree_root, 2);
++	ret = 0;
+ 
++out_wake_log_root:
+ 	atomic_set(&log_root_tree->log_commit[index2], 0);
+ 	smp_mb();
+ 	if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
+@@ -1998,7 +2124,8 @@ out:
+ 	return 0;
+ }
+ 
+-/* * free all the extents used by the tree log.  This should be called
++/*
++ * free all the extents used by the tree log.  This should be called
+  * at commit time of the full transaction
+  */
+ int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root)
+@@ -2132,7 +2259,7 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
+ 
+ 	btrfs_free_path(path);
+ 	mutex_unlock(&BTRFS_I(dir)->log_mutex);
+-	end_log_trans(root);
++	btrfs_end_log_trans(root);
+ 
+ 	return 0;
+ }
+@@ -2159,7 +2286,7 @@ int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
+ 	ret = btrfs_del_inode_ref(trans, log, name, name_len, inode->i_ino,
+ 				  dirid, &index);
+ 	mutex_unlock(&BTRFS_I(inode)->log_mutex);
+-	end_log_trans(root);
++	btrfs_end_log_trans(root);
+ 
+ 	return ret;
+ }
+@@ -2559,7 +2686,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
+  *
+  * This handles both files and directories.
+  */
+-static int __btrfs_log_inode(struct btrfs_trans_handle *trans,
++static int btrfs_log_inode(struct btrfs_trans_handle *trans,
+ 			     struct btrfs_root *root, struct inode *inode,
+ 			     int inode_only)
+ {
+@@ -2585,28 +2712,17 @@ static int __btrfs_log_inode(struct btrfs_trans_handle *trans,
+ 	min_key.offset = 0;
+ 
+ 	max_key.objectid = inode->i_ino;
++
++	/* today the code can only do partial logging of directories */
++	if (!S_ISDIR(inode->i_mode))
++	    inode_only = LOG_INODE_ALL;
++
+ 	if (inode_only == LOG_INODE_EXISTS || S_ISDIR(inode->i_mode))
+ 		max_key.type = BTRFS_XATTR_ITEM_KEY;
+ 	else
+ 		max_key.type = (u8)-1;
+ 	max_key.offset = (u64)-1;
+ 
+-	/*
+-	 * if this inode has already been logged and we're in inode_only
+-	 * mode, we don't want to delete the things that have already
+-	 * been written to the log.
+-	 *
+-	 * But, if the inode has been through an inode_only log,
+-	 * the logged_trans field is not set.  This allows us to catch
+-	 * any new names for this inode in the backrefs by logging it
+-	 * again
+-	 */
+-	if (inode_only == LOG_INODE_EXISTS &&
+-	    BTRFS_I(inode)->logged_trans == trans->transid) {
+-		btrfs_free_path(path);
+-		btrfs_free_path(dst_path);
+-		goto out;
+-	}
+ 	mutex_lock(&BTRFS_I(inode)->log_mutex);
+ 
+ 	/*
+@@ -2693,7 +2809,6 @@ next_slot:
+ 	if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
+ 		btrfs_release_path(root, path);
+ 		btrfs_release_path(log, dst_path);
+-		BTRFS_I(inode)->log_dirty_trans = 0;
+ 		ret = log_directory_changes(trans, root, inode, path, dst_path);
+ 		BUG_ON(ret);
+ 	}
+@@ -2702,19 +2817,69 @@ next_slot:
+ 
+ 	btrfs_free_path(path);
+ 	btrfs_free_path(dst_path);
+-out:
+ 	return 0;
+ }
+ 
+-int btrfs_log_inode(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct inode *inode,
+-		    int inode_only)
++/*
++ * follow the dentry parent pointers up the chain and see if any
++ * of the directories in it require a full commit before they can
++ * be logged.  Returns zero if nothing special needs to be done or 1 if
++ * a full commit is required.
++ */
++static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans,
++					       struct inode *inode,
++					       struct dentry *parent,
++					       struct super_block *sb,
++					       u64 last_committed)
+ {
+-	int ret;
++	int ret = 0;
++	struct btrfs_root *root;
+ 
+-	start_log_trans(trans, root);
+-	ret = __btrfs_log_inode(trans, root, inode, inode_only);
+-	end_log_trans(root);
++	/*
++	 * for regular files, if its inode is already on disk, we don't
++	 * have to worry about the parents at all.  This is because
++	 * we can use the last_unlink_trans field to record renames
++	 * and other fun in this file.
++	 */
++	if (S_ISREG(inode->i_mode) &&
++	    BTRFS_I(inode)->generation <= last_committed &&
++	    BTRFS_I(inode)->last_unlink_trans <= last_committed)
++			goto out;
++
++	if (!S_ISDIR(inode->i_mode)) {
++		if (!parent || !parent->d_inode || sb != parent->d_inode->i_sb)
++			goto out;
++		inode = parent->d_inode;
++	}
++
++	while (1) {
++		BTRFS_I(inode)->logged_trans = trans->transid;
++		smp_mb();
++
++		if (BTRFS_I(inode)->last_unlink_trans > last_committed) {
++			root = BTRFS_I(inode)->root;
++
++			/*
++			 * make sure any commits to the log are forced
++			 * to be full commits
++			 */
++			root->fs_info->last_trans_log_full_commit =
++				trans->transid;
++			ret = 1;
++			break;
++		}
++
++		if (!parent || !parent->d_inode || sb != parent->d_inode->i_sb)
++			break;
++
++		if (parent == sb->s_root)
++			break;
++
++		parent = parent->d_parent;
++		inode = parent->d_inode;
++
++	}
++out:
+ 	return ret;
+ }
+ 
+@@ -2724,31 +2889,65 @@ int btrfs_log_inode(struct btrfs_trans_handle *trans,
+  * only logging is done of any parent directories that are older than
+  * the last committed transaction
+  */
+-int btrfs_log_dentry(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct dentry *dentry)
++int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
++		    struct btrfs_root *root, struct inode *inode,
++		    struct dentry *parent, int exists_only)
+ {
+-	int inode_only = LOG_INODE_ALL;
++	int inode_only = exists_only ? LOG_INODE_EXISTS : LOG_INODE_ALL;
+ 	struct super_block *sb;
+-	int ret;
++	int ret = 0;
++	u64 last_committed = root->fs_info->last_trans_committed;
++
++	sb = inode->i_sb;
++
++	if (root->fs_info->last_trans_log_full_commit >
++	    root->fs_info->last_trans_committed) {
++		ret = 1;
++		goto end_no_trans;
++	}
++
++	ret = check_parent_dirs_for_sync(trans, inode, parent,
++					 sb, last_committed);
++	if (ret)
++		goto end_no_trans;
+ 
+ 	start_log_trans(trans, root);
+-	sb = dentry->d_inode->i_sb;
+-	while (1) {
+-		ret = __btrfs_log_inode(trans, root, dentry->d_inode,
+-					inode_only);
+-		BUG_ON(ret);
+-		inode_only = LOG_INODE_EXISTS;
+ 
+-		dentry = dentry->d_parent;
+-		if (!dentry || !dentry->d_inode || sb != dentry->d_inode->i_sb)
++	ret = btrfs_log_inode(trans, root, inode, inode_only);
++	BUG_ON(ret);
++
++	/*
++	 * for regular files, if its inode is already on disk, we don't
++	 * have to worry about the parents at all.  This is because
++	 * we can use the last_unlink_trans field to record renames
++	 * and other fun in this file.
++	 */
++	if (S_ISREG(inode->i_mode) &&
++	    BTRFS_I(inode)->generation <= last_committed &&
++	    BTRFS_I(inode)->last_unlink_trans <= last_committed)
++			goto no_parent;
++
++	inode_only = LOG_INODE_EXISTS;
++	while (1) {
++		if (!parent || !parent->d_inode || sb != parent->d_inode->i_sb)
+ 			break;
+ 
+-		if (BTRFS_I(dentry->d_inode)->generation <=
+-		    root->fs_info->last_trans_committed)
++		inode = parent->d_inode;
++		if (BTRFS_I(inode)->generation >
++		    root->fs_info->last_trans_committed) {
++			ret = btrfs_log_inode(trans, root, inode, inode_only);
++			BUG_ON(ret);
++		}
++		if (parent == sb->s_root)
+ 			break;
++
++		parent = parent->d_parent;
+ 	}
+-	end_log_trans(root);
+-	return 0;
++no_parent:
++	ret = 0;
++	btrfs_end_log_trans(root);
++end_no_trans:
++	return ret;
+ }
+ 
+ /*
+@@ -2760,12 +2959,8 @@ int btrfs_log_dentry(struct btrfs_trans_handle *trans,
+ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
+ 			  struct btrfs_root *root, struct dentry *dentry)
+ {
+-	u64 gen;
+-	gen = root->fs_info->last_trans_new_blockgroup;
+-	if (gen > root->fs_info->last_trans_committed)
+-		return 1;
+-	else
+-		return btrfs_log_dentry(trans, root, dentry);
++	return btrfs_log_inode_parent(trans, root, dentry->d_inode,
++				      dentry->d_parent, 0);
+ }
+ 
+ /*
+@@ -2884,3 +3079,94 @@ again:
+ 	kfree(log_root_tree);
+ 	return 0;
+ }
++
++/*
++ * there are some corner cases where we want to force a full
++ * commit instead of allowing a directory to be logged.
++ *
++ * They revolve around files there were unlinked from the directory, and
++ * this function updates the parent directory so that a full commit is
++ * properly done if it is fsync'd later after the unlinks are done.
++ */
++void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
++			     struct inode *dir, struct inode *inode,
++			     int for_rename)
++{
++	/*
++	 * when we're logging a file, if it hasn't been renamed
++	 * or unlinked, and its inode is fully committed on disk,
++	 * we don't have to worry about walking up the directory chain
++	 * to log its parents.
++	 *
++	 * So, we use the last_unlink_trans field to put this transid
++	 * into the file.  When the file is logged we check it and
++	 * don't log the parents if the file is fully on disk.
++	 */
++	if (S_ISREG(inode->i_mode))
++		BTRFS_I(inode)->last_unlink_trans = trans->transid;
++
++	/*
++	 * if this directory was already logged any new
++	 * names for this file/dir will get recorded
++	 */
++	smp_mb();
++	if (BTRFS_I(dir)->logged_trans == trans->transid)
++		return;
++
++	/*
++	 * if the inode we're about to unlink was logged,
++	 * the log will be properly updated for any new names
++	 */
++	if (BTRFS_I(inode)->logged_trans == trans->transid)
++		return;
++
++	/*
++	 * when renaming files across directories, if the directory
++	 * there we're unlinking from gets fsync'd later on, there's
++	 * no way to find the destination directory later and fsync it
++	 * properly.  So, we have to be conservative and force commits
++	 * so the new name gets discovered.
++	 */
++	if (for_rename)
++		goto record;
++
++	/* we can safely do the unlink without any special recording */
++	return;
++
++record:
++	BTRFS_I(dir)->last_unlink_trans = trans->transid;
++}
++
++/*
++ * Call this after adding a new name for a file and it will properly
++ * update the log to reflect the new name.
++ *
++ * It will return zero if all goes well, and it will return 1 if a
++ * full transaction commit is required.
++ */
++int btrfs_log_new_name(struct btrfs_trans_handle *trans,
++			struct inode *inode, struct inode *old_dir,
++			struct dentry *parent)
++{
++	struct btrfs_root * root = BTRFS_I(inode)->root;
++
++	/*
++	 * this will force the logging code to walk the dentry chain
++	 * up for the file
++	 */
++	if (S_ISREG(inode->i_mode))
++		BTRFS_I(inode)->last_unlink_trans = trans->transid;
++
++	/*
++	 * if this inode hasn't been logged and directory we're renaming it
++	 * from hasn't been logged, we don't need to log it
++	 */
++	if (BTRFS_I(inode)->logged_trans <=
++	    root->fs_info->last_trans_committed &&
++	    (!old_dir || BTRFS_I(old_dir)->logged_trans <=
++		    root->fs_info->last_trans_committed))
++		return 0;
++
++	return btrfs_log_inode_parent(trans, root, inode, parent, 1);
++}
++
+diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h
+index b9409b3..d09c760 100644
+--- a/fs/btrfs/tree-log.h
++++ b/fs/btrfs/tree-log.h
+@@ -22,14 +22,9 @@
+ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 		   struct btrfs_root *root);
+ int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root);
+-int btrfs_log_dentry(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct dentry *dentry);
+ int btrfs_recover_log_trees(struct btrfs_root *tree_root);
+ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
+ 			  struct btrfs_root *root, struct dentry *dentry);
+-int btrfs_log_inode(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct inode *inode,
+-		    int inode_only);
+ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
+ 				 struct btrfs_root *root,
+ 				 const char *name, int name_len,
+@@ -38,4 +33,16 @@ int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
+ 			       struct btrfs_root *root,
+ 			       const char *name, int name_len,
+ 			       struct inode *inode, u64 dirid);
++int btrfs_join_running_log_trans(struct btrfs_root *root);
++int btrfs_end_log_trans(struct btrfs_root *root);
++int btrfs_pin_log_trans(struct btrfs_root *root);
++int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
++		    struct btrfs_root *root, struct inode *inode,
++		    struct dentry *parent, int exists_only);
++void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
++			     struct inode *dir, struct inode *inode,
++			     int for_rename);
++int btrfs_log_new_name(struct btrfs_trans_handle *trans,
++			struct inode *inode, struct inode *old_dir,
++			struct dentry *parent);
+ #endif

linux-2.6-utrace.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.107 -r 1.107.6.1 linux-2.6-utrace.patch
Index: linux-2.6-utrace.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace.patch,v
retrieving revision 1.107
retrieving revision 1.107.6.1
diff -u -r1.107 -r1.107.6.1
--- linux-2.6-utrace.patch	8 Jan 2009 04:42:24 -0000	1.107
+++ linux-2.6-utrace.patch	24 Mar 2009 22:57:43 -0000	1.107.6.1
@@ -1,33 +1,60 @@
+utrace core
+
+This adds the utrace facility, a new modular interface in the kernel for
+implementing user thread tracing and debugging.  This fits on top of the
+tracehook_* layer, so the new code is well-isolated.
+
+The new interface is in <linux/utrace.h> and the DocBook utrace book
+describes it.  It allows for multiple separate tracing engines to work in
+parallel without interfering with each other.  Higher-level tracing
+facilities can be implemented as loadable kernel modules using this layer.
+
+The new facility is made optional under CONFIG_UTRACE.
+When this is not enabled, no new code is added.
+It can only be enabled on machines that have all the
+prerequisites and select CONFIG_HAVE_ARCH_TRACEHOOK.
+
+In this initial version, utrace and ptrace do not play together at all.
+If ptrace is attached to a thread, the attach calls in the utrace kernel
+API return -EBUSY.  If utrace is attached to a thread, the PTRACE_ATTACH
+or PTRACE_TRACEME request will return EBUSY to userland.  The old ptrace
+code is otherwise unchanged and nothing using ptrace should be affected
+by this patch as long as utrace is not used at the same time.  In the
+future we can clean up the ptrace implementation and rework it to use
+the utrace API.
+
+Signed-off-by: Roland McGrath <roland at redhat.com>
+---
  Documentation/DocBook/Makefile    |    2 +-
- Documentation/DocBook/utrace.tmpl |  571 ++++++++
+ Documentation/DocBook/utrace.tmpl |  571 +++++++++
  fs/proc/array.c                   |    3 +
- include/linux/ptrace.h            |   21 +
+ include/linux/init_task.h         |    1 +
  include/linux/sched.h             |    6 +
- include/linux/tracehook.h         |   68 +-
- include/linux/utrace.h            |  707 ++++++++++
- init/Kconfig                      |   26 +
+ include/linux/tracehook.h         |   50 +-
+ include/linux/utrace.h            |  692 +++++++++++
+ include/linux/utrace_struct.h     |   58 +
+ init/Kconfig                      |    9 +
  kernel/Makefile                   |    1 +
- kernel/ptrace.c                   |  791 +++++++++++-
- kernel/signal.c                   |   14 +-
- kernel/utrace.c                   | 2590 +++++++++++++++++++++++++++++++++++++
- 12 files changed, 4789 insertions(+), 11 deletions(-)
+ kernel/ptrace.c                   |   18 +-
+ kernel/utrace.c                   | 2348 +++++++++++++++++++++++++++++++++++++
+ 12 files changed, 3756 insertions(+), 3 deletions(-)
 
 diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
-index 0a08126..7570189 100644  
+index 1462ed8..f5da1b4 100644  
 --- a/Documentation/DocBook/Makefile
 +++ b/Documentation/DocBook/Makefile
 @@ -9,7 +9,7 @@
- DOCBOOKS := z8530book.xml mcabook.xml \
+ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
  	    kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
  	    procfs-guide.xml writing_usb_driver.xml networking.xml \
 -	    kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
 +	    kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml utrace.xml \
  	    gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
  	    genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
- 	    mac80211.xml debugobjects.xml sh.xml
+ 	    mac80211.xml debugobjects.xml sh.xml regulator.xml
 diff --git a/Documentation/DocBook/utrace.tmpl b/Documentation/DocBook/utrace.tmpl
 new file mode 100644
-index ...f253402 100644  
+index ...b802c55 100644  
 --- /dev/null
 +++ b/Documentation/DocBook/utrace.tmpl
 @@ -0,0 +1,571 @@
@@ -251,7 +278,7 @@
 +  <sect2 id="refcount"><title>Engine and task pointers</title>
 +  <para>
 +    The first sort of guarantee concerns the core data structures
-+    themselves.  <structname>struct utrace_attached_engine</structname> is
++    themselves.  <structname>struct utrace_engine</structname> is
 +    a reference-counted data structure.  While you hold a reference, an
 +    engine pointer will always stay valid so that you can safely pass it to
 +    any <application>utrace</application> call.  Each call to
@@ -294,7 +321,7 @@
 +    <function>rcu_read_lock</function> nor any other lock is held while
 +    making a callback, it's always guaranteed that the <structname>struct
 +    task_struct</structname> and the <structname>struct
-+    utrace_attached_engine</structname> passed as arguments remain valid
++    utrace_engine</structname> passed as arguments remain valid
 +    until the callback function returns.
 +  </para>
 +
@@ -359,7 +386,7 @@
 +    <function>report_death</function> or <function>report_reap</function>
 +    callback will try to do the same.  <constant>utrace_detach</constant>
 +    returns <constant>-ESRCH</constant> when the <structname>struct
-+    utrace_attached_engine</structname> has already been detached, but is
++    utrace_engine</structname> has already been detached, but is
 +    still a valid pointer because of its reference count.  A tracing engine
 +    can use this to safely synchronize its own independent multiple threads
 +    of control with each other and with its event callbacks that detach.
@@ -623,71 +650,44 @@
  	task_lock(p);
  	if (p->files)
  		fdt = files_fdtable(p->files);
-diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
-index 98b93ca..9b0d5be 100644  
---- a/include/linux/ptrace.h
-+++ b/include/linux/ptrace.h
-@@ -121,6 +121,7 @@ static inline void ptrace_unlink(struct 
- int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data);
- int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data);
- 
-+#ifndef CONFIG_UTRACE_PTRACE
- /**
-  * task_ptrace - return %PT_* flags that apply to a task
-  * @task:	pointer to &task_struct in question
-@@ -154,6 +155,26 @@ static inline int ptrace_event(int mask,
- 	return 1;
- }
- 
-+static inline void ptrace_utrace_exit(struct task_struct *task)
-+{
-+}
-+
-+#else  /* CONFIG_UTRACE_PTRACE */
-+
-+static inline int task_ptrace(struct task_struct *task)
-+{
-+	return 0;
-+}
-+
-+static inline int ptrace_event(int mask, int event, unsigned long message)
-+{
-+	return 0;
-+}
-+
-+extern void ptrace_utrace_exit(struct task_struct *);
-+
-+#endif	/* !CONFIG_UTRACE_PTRACE */
-+
- /**
-  * ptrace_init_task - initialize ptrace state for a new child
-  * @child:		new child task
+diff --git a/include/linux/init_task.h b/include/linux/init_task.h
+index e752d97..39eebc8 100644  
+--- a/include/linux/init_task.h
++++ b/include/linux/init_task.h
+@@ -181,6 +181,7 @@ extern struct cred init_cred;
+ 		[PIDTYPE_SID]  = INIT_PID_LINK(PIDTYPE_SID),		\
+ 	},								\
+ 	.dirties = INIT_PROP_LOCAL_SINGLE(dirties),			\
++	INIT_UTRACE(tsk)						\
+ 	INIT_IDS							\
+ 	INIT_TRACE_IRQFLAGS						\
+ 	INIT_LOCKDEP							\
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index 4cae9b8..ca0861e 100644  
+index 011db2f..786ef2d 100644  
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1266,6 +1266,11 @@ struct task_struct {
+@@ -59,6 +59,7 @@ struct sched_param {
+ #include <linux/errno.h>
+ #include <linux/nodemask.h>
+ #include <linux/mm_types.h>
++#include <linux/utrace_struct.h>
+ 
+ #include <asm/system.h>
+ #include <asm/page.h>
+@@ -1287,6 +1288,11 @@ struct task_struct {
  #endif
  	seccomp_t seccomp;
  
 +#ifdef CONFIG_UTRACE
-+	struct utrace *utrace;
++	struct utrace utrace;
 +	unsigned long utrace_flags;
 +#endif
 +
  /* Thread group tracking */
     	u32 parent_exec_id;
     	u32 self_exec_id;
-@@ -1865,6 +1870,7 @@ extern int kill_pgrp(struct pid *pid, in
- extern int kill_pid(struct pid *pid, int sig, int priv);
- extern int kill_proc_info(int, struct siginfo *, pid_t);
- extern int do_notify_parent(struct task_struct *, int);
-+extern void do_notify_parent_cldstop(struct task_struct *, int);
- extern void force_sig(int, struct task_struct *);
- extern void force_sig_specific(int, struct task_struct *);
- extern int send_sig(int, struct task_struct *, int);
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
[...3323 lines suppressed...]
-+		if (unlikely(task->utrace != utrace)) {
-+			spin_unlock(&utrace->lock);
-+			cond_resched();
-+			return -1;
-+		}
 +
 +		splice_attaching(utrace);
 +
@@ -4718,6 +3652,7 @@
 +		 * interrupt path, so clear the flags asking for those.
 +		 */
 +		utrace->interrupt = utrace->report = utrace->signal_handler = 0;
++		utrace->stopped = 0;
 +
 +		/*
 +		 * Make sure signal_pending() only returns true
@@ -4746,41 +3681,20 @@
 +		event = 0;
 +		ka = NULL;
 +		memset(return_ka, 0, sizeof *return_ka);
-+	} else if ((task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) == 0) {
++	} else if ((task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) == 0 &&
++		   !utrace->stopped) {
 +		/*
-+		 * If noone is interested in intercepting signals,
++		 * If no engine is interested in intercepting signals,
 +		 * let the caller just dequeue them normally.
 +		 */
-+		rcu_read_unlock();
 +		return 0;
 +	} else {
 +		if (unlikely(utrace->stopped)) {
-+			/*
-+			 * We were just in TASK_STOPPED, so we have to
-+			 * check for the race mentioned above.
-+			 *
-+			 * RCU makes it safe to get the utrace->lock even
-+			 * if it's being freed.  Once we have that lock,
-+			 * either an external detach has finished and this
-+			 * struct has been freed, or else we know we are
-+			 * excluding any other detach attempt.  Since we
-+			 * are no longer in TASK_STOPPED now, all we needed
-+			 * the lock for was to order any utrace_do_stop()
-+			 * call after us.
-+			 */
 +			spin_unlock_irq(&task->sighand->siglock);
 +			spin_lock(&utrace->lock);
-+			rcu_read_unlock();
-+			if (unlikely(task->utrace != utrace)) {
-+				spin_unlock(&utrace->lock);
-+				cond_resched();
-+				return -1;
-+			}
 +			utrace->stopped = 0;
 +			spin_unlock(&utrace->lock);
 +			spin_lock_irq(&task->sighand->siglock);
-+		} else {
-+			rcu_read_unlock();
 +		}
 +
 +		/*
@@ -4829,8 +3743,8 @@
 +		}
 +
 +		/*
-+		 * Now that we know what event type this signal is,
-+		 * we can short-circuit if noone cares about those.
++		 * Now that we know what event type this signal is, we
++		 * can short-circuit if no engines care about those.
 +		 */
 +		if ((task->utrace_flags & (event | UTRACE_EVENT(QUIESCE))) == 0)
 +			return signr;
@@ -4845,7 +3759,10 @@
 +	/*
 +	 * This reporting pass chooses what signal disposition we'll act on.
 +	 */
-+	list_for_each_entry_safe(engine, next, &utrace->attached, entry) {
++	list_for_each_entry(engine, &utrace->attached, entry) {
++		/*
++		 * See start_callback() comment about this barrier.
++		 */
 +		utrace->reporting = engine;
 +		smp_mb();
 +
@@ -5021,7 +3938,7 @@
 + */
 +void utrace_signal_handler(struct task_struct *task, int stepping)
 +{
-+	struct utrace *utrace = task->utrace;
++	struct utrace *utrace = task_utrace_struct(task);
 +
 +	spin_lock(&utrace->lock);
 +
@@ -5030,7 +3947,7 @@
 +		utrace->interrupt = 1;
 +		set_tsk_thread_flag(task, TIF_SIGPENDING);
 +	} else {
-+		set_notify_resume(task);
++		set_tsk_thread_flag(task, TIF_NOTIFY_RESUME);
 +	}
 +
 +	spin_unlock(&utrace->lock);
@@ -5065,7 +3982,7 @@
 + * completed safely.
 + */
 +int utrace_prepare_examine(struct task_struct *target,
-+			   struct utrace_attached_engine *engine,
++			   struct utrace_engine *engine,
 +			   struct utrace_examiner *exam)
 +{
 +	int ret = 0;
@@ -5118,7 +4035,7 @@
 + * keeping @target stopped, or -%EAGAIN if @target woke up unexpectedly.
 + */
 +int utrace_finish_examine(struct task_struct *target,
-+			  struct utrace_attached_engine *engine,
++			  struct utrace_engine *engine,
 +			  struct utrace_examiner *exam)
 +{
 +	int ret = 0;
@@ -5153,73 +4070,14 @@
 +EXPORT_SYMBOL_GPL(task_user_regset_view);
 +
 +/*
-+ * Return the &struct task_struct for the task using ptrace on this one,
-+ * or %NULL.  Must be called with rcu_read_lock() held to keep the returned
-+ * struct alive.
-+ *
-+ * At exec time, this may be called with task_lock() still held from when
-+ * tracehook_unsafe_exec() was just called.  In that case it must give
-+ * results consistent with those unsafe_exec() results, i.e. non-%NULL if
-+ * any %LSM_UNSAFE_PTRACE_* bits were set.
-+ *
-+ * The value is also used to display after "TracerPid:" in /proc/PID/status,
-+ * where it is called with only rcu_read_lock() held.
-+ */
-+struct task_struct *utrace_tracer_task(struct task_struct *target)
-+{
-+	struct utrace *utrace;
-+	struct task_struct *tracer = NULL;
-+
-+	utrace = rcu_dereference(target->utrace);
-+	if (utrace != NULL) {
-+		struct list_head *pos, *next;
-+		struct utrace_attached_engine *engine;
-+		const struct utrace_engine_ops *ops;
-+		list_for_each_safe(pos, next, &utrace->attached) {
-+			engine = list_entry(pos, struct utrace_attached_engine,
-+					    entry);
-+			ops = rcu_dereference(engine->ops);
-+			if (ops->tracer_task) {
-+				tracer = (*ops->tracer_task)(engine, target);
-+				if (tracer != NULL)
-+					break;
-+			}
-+		}
-+	}
-+
-+	return tracer;
-+}
-+
-+/*
-+ * Called on the current task to return LSM_UNSAFE_* bits implied by tracing.
-+ * Called with task_lock() held.
-+ */
-+int utrace_unsafe_exec(struct task_struct *task)
-+{
-+	struct utrace *utrace = task->utrace;
-+	struct utrace_attached_engine *engine, *next;
-+	const struct utrace_engine_ops *ops;
-+	int unsafe = 0;
-+
-+	list_for_each_entry_safe(engine, next, &utrace->attached, entry) {
-+		ops = rcu_dereference(engine->ops);
-+		if (ops->unsafe_exec)
-+			unsafe |= (*ops->unsafe_exec)(engine, task);
-+	}
-+
-+	return unsafe;
-+}
-+
-+/*
 + * Called with rcu_read_lock() held.
 + */
 +void task_utrace_proc_status(struct seq_file *m, struct task_struct *p)
 +{
-+	struct utrace *utrace = rcu_dereference(p->utrace);
-+	if (unlikely(utrace))
-+		seq_printf(m, "Utrace: %lx%s%s%s\n",
-+			   p->utrace_flags,
-+			   utrace->stopped ? " (stopped)" : "",
-+			   utrace->report ? " (report)" : "",
-+			   utrace->interrupt ? " (interrupt)" : "");
++	struct utrace *utrace = &p->utrace;
++	seq_printf(m, "Utrace:\t%lx%s%s%s\n",
++		   p->utrace_flags,
++		   utrace->stopped ? " (stopped)" : "",
++		   utrace->report ? " (report)" : "",
++		   utrace->interrupt ? " (interrupt)" : "");
 +}

linux-2.6-v4l-dvb-experimental.patch:

Index: linux-2.6-v4l-dvb-experimental.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-experimental.patch,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -r1.2.2.2 -r1.2.2.3
--- linux-2.6-v4l-dvb-experimental.patch	17 Mar 2009 21:35:48 -0000	1.2.2.2
+++ linux-2.6-v4l-dvb-experimental.patch	24 Mar 2009 22:57:43 -0000	1.2.2.3
@@ -26,7 +26,7 @@
  
  source "drivers/media/video/usbvideo/Kconfig"
 diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
-index 02379f5..9e40396 100644
+index b904674..08765d8 100644
 --- a/drivers/media/video/Makefile
 +++ b/drivers/media/video/Makefile
 @@ -67,6 +67,7 @@ obj-$(CONFIG_VIDEO_MEYE) += meye.o
@@ -14614,16 +14614,14 @@
  		memcpy(buffer + 2, ptr, len);
  
 diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
-index e77f81b..3e107d5 100644
+index f27604a..f9d48c9 100644
 --- a/include/linux/i2c-id.h
 +++ b/include/linux/i2c-id.h
-@@ -87,7 +87,8 @@
+@@ -88,6 +88,7 @@
  #define I2C_HW_B_CX2341X	0x010020 /* Conexant CX2341X MPEG encoder cards */
  #define I2C_HW_B_CX23885	0x010022 /* conexant 23885 based tv cards (bus1) */
  #define I2C_HW_B_AU0828		0x010023 /* auvitek au0828 usb bridge */
--#define I2C_HW_B_HDPVR		0x010024 /* Hauppauge HD PVR */
 +#define I2C_HW_B_CX231XX	0x010024 /* Conexant CX231XX USB based cards */
-+#define I2C_HW_B_HDPVR		0x010025 /* Hauppauge HD PVR */
+ #define I2C_HW_B_HDPVR		0x010025 /* Hauppauge HD PVR */
  
  /* --- SGI adapters							*/
- #define I2C_HW_SGI_VINO		0x160000

linux-2.6-v4l-dvb-fixes.patch:

Index: linux-2.6-v4l-dvb-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-fixes.patch,v
retrieving revision 1.2.8.4
retrieving revision 1.2.8.5
diff -u -r1.2.8.4 -r1.2.8.5
--- linux-2.6-v4l-dvb-fixes.patch	17 Mar 2009 21:35:48 -0000	1.2.8.4
+++ linux-2.6-v4l-dvb-fixes.patch	24 Mar 2009 22:57:44 -0000	1.2.8.5
@@ -0,0 +1,16 @@
+Devin Heitmueller (1):
+      V4L/DVB (11141): em28xx: fix oops on ARM platform when allocating transfer buffers
+
+diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
+index 94fb1b6..f3c18ed 100644
+--- a/drivers/media/video/em28xx/em28xx-core.c
++++ b/drivers/media/video/em28xx/em28xx-core.c
+@@ -963,7 +963,7 @@ int em28xx_init_isoc(struct em28xx *dev, int max_packets,
+ 				 em28xx_irq_callback, dma_q, 1);
+ 
+ 		urb->number_of_packets = max_packets;
+-		urb->transfer_flags = URB_ISO_ASAP;
++		urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
+ 
+ 		k = 0;
+ 		for (j = 0; j < max_packets; j++) {

linux-2.6-v4l-dvb-update.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1.2.6 -r 1.1.2.7 linux-2.6-v4l-dvb-update.patch
Index: linux-2.6-v4l-dvb-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-update.patch,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- linux-2.6-v4l-dvb-update.patch	17 Mar 2009 21:35:48 -0000	1.1.2.6
+++ linux-2.6-v4l-dvb-update.patch	24 Mar 2009 22:57:44 -0000	1.1.2.7
@@ -1,12 +1,17 @@
-Abylay Ospan (3):
+Abylay Ospan (5):
       V4L/DVB (10796): Add init code for NetUP Dual DVB-S2 CI card
       V4L/DVB (10797): Add EEPROM code for NetUP Dual DVB-S2 CI card.
       V4L/DVB (10798): Add CIMax(R) SP2 Common Interface code for NetUP Dual DVB-S2 CI card
+      V4L/DVB (11056): Bug fix in NetUP: restore high address lines in CI
+      V4L/DVB (11057): Fix CiMax stability in Netup Dual DVB-S2 CI
 
 Adam Baker (2):
       V4L/DVB (10639): gspca - sq905: New subdriver.
       V4L/DVB (10829): Support alternate resolutions for sq905
 
+Alan McIvor (1):
+      V4L/DVB (11124): Add support for ProVideo PV-183 to bttv
+
 Alexey Klimov (18):
       V4L/DVB (10316): v4l/dvb: use usb_make_path in usb-radio drivers
       V4L/DVB (10324): em28xx: Correct mailing list
@@ -27,7 +32,7 @@
       V4L/DVB (10946): radio-rtrack2: fix double mutex_unlock
       V4L/DVB (10961): radio-terratec: remove linux/delay.h which hadn't been used.
 
-Andy Walls (40):
+Andy Walls (43):
       V4L/DVB (10274): cx18: Fix a PLL divisor update for the I2S master clock
       V4L/DVB (10275): cx18: Additional debug to display outgoing mailbox parameters
       V4L/DVB (10276): cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18
@@ -68,6 +73,9 @@
       V4L/DVB (10854): cx18: Correct comments about vertical and horizontal blanking timings
       V4L/DVB (10855): cx18: Fix VPS service register codes
       V4L/DVB (10856): cx18: Add interlock so sliced VBI insertion only happens for an MPEG PS
+      V4L/DVB (11042): v4l2-api: Add definitions for V4L2_MPEG_STREAM_VBI_FMT_IVTV payloads
+      V4L/DVB (11091): cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG stream
+      V4L/DVB (11092): cx18: Optimize processing of VBI buffers from the capture unit
 
 Antoine Jacquet (1):
       V4L/DVB (10263): zr364xx: add support for Aiptek DV T300
@@ -86,9 +94,42 @@
 Bruno Christo (1):
       V4L/DVB (10827): Add support for GeoVision GV-800(S)
 
-Devin Heitmueller (2):
+Devin Heitmueller (35):
       V4L/DVB (10320): dib0700: fix i2c error message to make data type clear
       V4L/DVB (10321): dib0700: Report dib0700_i2c_enumeration failures
+      V4L/DVB (11059): xc5000: fix bug for hybrid xc5000 devices with IF other than 5380
+      V4L/DVB (11060): au8522: rename the au8522.c source file
+      V4L/DVB (11061): au8522: move shared state and common functions into a separate header files
+      V4L/DVB (11062): au8522: fix register read/write high bits
+      V4L/DVB (11063): au8522: power down the digital demod when not in use
+      V4L/DVB (11064): au8522: make use of hybrid framework so analog/digital demod can share state
+      V4L/DVB (11065): au8522: add support for analog side of demodulator
+      V4L/DVB (11066): au0828: add support for analog functionality in bridge
+      V4L/DVB (11067): au0828: workaround a bug in the au0828 i2c handling
+      V4L/DVB (11068): au0828: add analog profile for the HVR-850
+      V4L/DVB (11069): au8522: add mutex protecting use of hybrid state
+      V4L/DVB (11070): au0828: Rework the way the analog video binding occurs
+      V4L/DVB (11071): tveeprom: add the xc5000 tuner to the tveeprom definition
+      V4L/DVB (11072): au0828: advertise only NTSC-M (as opposed to all NTSC standards)
+      V4L/DVB (11073): au0828: disable VBI code since it doesn't yet work
+      V4L/DVB (11074): au0828: fix i2c enumeration bug
+      V4L/DVB (11075): au0828: make register debug lines easier to read
+      V4L/DVB (11076): au0828: make g_chip_ident call work properly
+      V4L/DVB (11077): au0828: properly handle missing analog USB endpoint
+      V4L/DVB (11078): au0828: properly handle non-existent analog inputs
+      V4L/DVB (11079): au0828: fix panic on disconnect if analog initialization failed
+      V4L/DVB (11080): au0828: Convert to use v4l2_device/subdev framework
+      V4L/DVB (11081): au0828: make sure v4l2_device name is unique
+      V4L/DVB (11082): au0828: remove memset calls in v4l2 routines.
+      V4L/DVB (11083): au0828: remove some unneeded braces
+      V4L/DVB (11084): au0828: add entry for undefined input type
+      V4L/DVB (11085): au0828/au8522: Codingstyle fixes
+      V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
+      V4L/DVB (11088): au0828: finish videodev/subdev conversion
+      V4L/DVB (11089): au8522: finish conversion to v4l2_device/subdev
+      V4L/DVB (11139): em28xx: add remote control definition for HVR-900 (both versions)
+      V4L/DVB (11140): usbvision: fix oops on ARM platform when allocating transfer buffers
+      V4L/DVB (11142): au0828: fix oops on ARM platform when allocating transfer buffers
 
 Douglas Kosovic (1):
       V4L/DVB (10299): bttv: Add support for IVCE-8784 support for V4L2 bttv driver
@@ -126,7 +167,7 @@
       V4L/DVB (11026): sh-mobile-ceu-camera: set field to the value, configured at open()
       V4L/DVB (11027): soc-camera: configure drivers with a default format at probe time
 
-Hans Verkuil (124):
+Hans Verkuil (142):
       V4L/DVB (10231): v4l2-subdev: add v4l2_ext_controls support
       V4L/DVB (10244): v4l2: replace a few snprintfs with strlcpy
       V4L/DVB (10246): saa6752hs: convert to v4l2_subdev.
@@ -251,11 +292,29 @@
       V4L/DVB (10988): v4l2-dev: use parent field if the v4l2_device has no parent set.
       V4L/DVB (11021): v4l2-device: add a notify callback.
       V4L/DVB (11022): zoran/bt819: use new notify functionality.
+      V4L/DVB (11044): v4l2-device: add v4l2_device_disconnect
+      V4L/DVB (11045): v4l2: call v4l2_device_disconnect in USB drivers.
+      V4L/DVB (11046): bttv: convert to v4l2_device.
+      V4L/DVB (11047): cx88: convert to v4l2_device.
+      V4L/DVB (11048): zoran: fix incorrect return type of notify function.
+      V4L/DVB (11051): v4l-dvb: replace remaining references to the old mailinglist.
+      V4L/DVB (11052): bt819: remove an unused header
+      V4L/DVB (11053): saa7134: set v4l2_dev field of video_device
+      V4L/DVB (11098): v4l2-common: remove incorrect MODULE test
+      V4L/DVB (11100): au8522: fix compilation warning.
+      V4L/DVB (11112): v4l2-subdev: add support for TRY_FMT, ENUM_FMT and G/S_PARM.
+      V4L/DVB (11113): ov7670: convert to v4l2_subdev
+      V4L/DVB (11114): cafe_ccic: convert to v4l2_device.
+      V4L/DVB (11115): cafe_ccic: use v4l2_subdev to talk to the ov7670 sensor.
+      V4L/DVB (11116): ov7670: cleanup and remove legacy code.
+      V4L/DVB (11117): ov7670: add support to get/set registers
+      V4L/DVB (11118): cafe_ccic: replace debugfs with g/s_register ioctls.
+      V4L/DVB (11120): cafe_ccic: stick in a comment with a request for test results
 
 Hans Werner (1):
       V4L/DVB (10392): lnbp21: documentation about the system register
 
-Igor M. Liplianin (16):
+Igor M. Liplianin (18):
       V4L/DVB (10266): Add support for TurboSight TBS6920 DVB-S2 PCI-e card.
       V4L/DVB (10267): Add support for TeVii S470 DVB-S2 PCI-e card.
       V4L/DVB (10268): Proper implement set_voltage in cx24116.
@@ -272,6 +331,8 @@
       V4L/DVB (10805): Add support for NetUP Dual DVB-S2 CI card
       V4L/DVB (10808): Fix typo in lnbp21.c
       V4L/DVB (10871): stv0900: delete debug messages not related to stv0900 tuning algorythm
+      V4L/DVB (11054): Shorten some lines in stv0900 to less then 81 characters
+      V4L/DVB (11055): Fix typo in stv0900
 
 Indika Katugampala (1):
       V4L/DVB (10528): em28xx: support added for IO-DATA GV/MVP SZ - EMPIA-2820 chipset
@@ -279,7 +340,14 @@
 Jan Engelhardt (1):
       V4L/DVB (10391): dvb: constify VFTs
 
-Jean Delvare (7):
+Janne Grunau (5):
+      V4L/DVB (11095): adds V4L2_CID_SHARPNESS to v4l2_ctrl_query_fill()
+      V4L/DVB (11096): V4L2 Driver for the Hauppauge HD PVR usb capture device
+      V4L/DVB (11097): use video_ioctl2 as ioctl handler directly
+      V4L/DVB (11125): fix mispelled Hauppauge in HD PVR and PVR USB2 driver comments
+      V4L/DVB (11152): hdpvr: Fix build with Config_I2C not set
+
+Jean Delvare (8):
       V4L/DVB (10867): vino: fold i2c-algo-sgi code into vino.
       V4L/DVB (10931): zoran: Drop the lock_norm module parameter
       V4L/DVB (10932): zoran: Don't frighten users with failed buffer allocation
@@ -287,8 +355,9 @@
       V4L/DVB (10939): ir-kbd-i2c: Prevent general protection fault on rmmod
       V4L/DVB (10940): saa6588: Prevent general protection fault on rmmod
       V4L/DVB (10943): cx88: Prevent general protection fault on rmmod
+      V4L/DVB (11111a): MAINTAINERS: Drop references to deprecated video4linux list
 
-Jean-Francois Moine (58):
+Jean-Francois Moine (68):
       V4L/DVB (10332): gspca - main: Version change.
       V4L/DVB (10333): gspca - main and many subdrivers: Remove the epaddr variable.
       V4L/DVB (10337): gspca - common: Simplify the debug macros.
@@ -347,6 +416,16 @@
       V4L/DVB (10681): gspca - zc3xx: Bad probe of the ov7630c sensor.
       V4L/DVB (10787): gspca - mars: Bad webcam register values tied to saturation.
       V4L/DVB (10788): gspca - vc032x: Bad matrix for sensor mi1310_soc.
+      V4L/DVB (11039): gspca - most jpeg subdrivers: Change the JPEG header creation.
+      V4L/DVB (11040): gspca - most jpeg subdrivers: Have the JPEG quality settable.
+      V4L/DVB (11103): gspca - main: May have isochronous transfers on altsetting 0
+      V4L/DVB (11104): gspca - ov534: Bad frame pointer after adding the last packet
+      V4L/DVB (11105): gspca - ov534: Adjust the packet scan function
+      V4L/DVB (11106): gspca - ov534: New sensor ov965x and re-enable the webcam 06f8:3003
+      V4L/DVB (11143): gspca - t613: Bad sensor detection.
+      V4L/DVB (11144): gspca - t613: Don't re-read the ID registers at probe time.
+      V4L/DVB (11145): gspca - t613: Greater delay after om6802 reset.
+      V4L/DVB (11146): gspca - vc032x: Change the probe sequence.
 
 Jochen Friedrich (2):
       V4L/DVB (10452): Add Freescale MC44S803 tuner driver
@@ -398,7 +477,7 @@
       V4L/DVB (10823): saa7134: add DVB support for Avermedia A700 cards
       V4L/DVB (10948): flexcop-pci: Print a message in case the new stream watchdog detects a problem
 
-Mauro Carvalho Chehab (38):
+Mauro Carvalho Chehab (46):
       V4L/DVB (10211): vivi: Implements 4 inputs on vivi
       V4L/DVB (10298): remove err macro from few usb devices
       V4L/DVB (10305): videobuf-vmalloc: Fix: videobuf memory were never freed
@@ -436,6 +515,14 @@
       V4L/DVB (10907): avoid loading the entire videodev.h header on V4L2 drivers
       V4L/DVB (10951): xc5000: Fix CodingStyle errors introduced by the last patch
       V4L/DVB (10908): videobuf-core: also needs a minimal subset of V4L1 header
+      V4L/DVB (11108): get_dvb_firmware: Add option to download firmware for cx231xx
+      V4L/DVB (11109): au0828: Fix compilation when VIDEO_ADV_DEBUG = n
+      V4L/DVB (11110): au8522/au0828: Fix Kconfig dependencies
+      V4L/DVB (11111): dvb_dummy_fe: Fix compilation breakage
[...80394 lines suppressed...]
+@@ -1403,14 +1459,6 @@ struct v4l2_dbg_chip_ident {
  	__u32 revision;    /* chip revision, chip specific */
  } __attribute__ ((packed));
  
@@ -86543,7 +98895,7 @@
  /*
   *	I O C T L   C O D E S   F O R   V I D E O   D E V I C E S
   *
-@@ -1488,8 +1489,6 @@ struct v4l2_chip_ident_old {
+@@ -1488,8 +1536,6 @@ struct v4l2_chip_ident_old {
  /* Experimental, meant for debugging, testing and internal use.
     Never use this ioctl in applications! */
  #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
@@ -86869,7 +99221,7 @@
  
  extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
 diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
-index 9aaf652..43684f1 100644
+index 9aaf652..1be461a 100644
 --- a/include/media/v4l2-chip-ident.h
 +++ b/include/media/v4l2-chip-ident.h
 @@ -37,10 +37,8 @@ enum {
@@ -86884,7 +99236,7 @@
  	V4L2_IDENT_SAA7113 = 103,
  	V4L2_IDENT_SAA7114 = 104,
  	V4L2_IDENT_SAA7115 = 105,
-@@ -63,30 +61,88 @@ enum {
+@@ -63,44 +61,96 @@ enum {
  	V4L2_IDENT_OV7720 = 251,
  	V4L2_IDENT_OV7725 = 252,
  
@@ -86898,6 +99250,9 @@
  	V4L2_IDENT_CX23416 = 416,
  	V4L2_IDENT_CX23418 = 418,
  
++	/* module au0828 */
++	V4L2_IDENT_AU0828 = 828,
++
 +	/* module indycam: just ident 2000 */
 +	V4L2_IDENT_INDYCAM = 2000,
 +
@@ -86968,12 +99323,48 @@
  	/* module wm8775: just ident 8775 */
  	V4L2_IDENT_WM8775 = 8775,
  
+-	/* module tw9910: just ident 9910 */
+-	V4L2_IDENT_TW9910 = 9910,
+-
+-	/* module cs53132a: just ident 53132 */
+-	V4L2_IDENT_CS53l32A = 53132,
+-
+-	/* module upd64031a: just ident 64031 */
+-	V4L2_IDENT_UPD64031A = 64031,
 +	/* module tda9840: just ident 9840 */
 +	V4L2_IDENT_TDA9840 = 9840,
+ 
+-	/* module upd64083: just ident 64083 */
+-	V4L2_IDENT_UPD64083 = 64083,
++	/* module cafe_ccic, just ident 8801 */
++	V4L2_IDENT_CAFE = 8801,
+ 
+-	/* module m52790: just ident 52790 */
+-	V4L2_IDENT_M52790 = 52790,
++	/* module tw9910: just ident 9910 */
++	V4L2_IDENT_TW9910 = 9910,
+ 
+ 	/* module msp3400: reserved range 34000-34999 and 44000-44999 */
+ 	V4L2_IDENT_MSPX4XX  = 34000, /* generic MSPX4XX identifier, only
+@@ -178,6 +228,18 @@ enum {
+ 	V4L2_IDENT_MT9V022IX7ATC	= 45010, /* No way to detect "normal" I77ATx */
+ 	V4L2_IDENT_MT9V022IX7ATM	= 45015, /* and "lead free" IA7ATx chips */
+ 	V4L2_IDENT_MT9T031		= 45020,
++
++	/* module cs53132a: just ident 53132 */
++	V4L2_IDENT_CS53l32A = 53132,
++
++	/* module upd64031a: just ident 64031 */
++	V4L2_IDENT_UPD64031A = 64031,
 +
- 	/* module tw9910: just ident 9910 */
- 	V4L2_IDENT_TW9910 = 9910,
++	/* module upd64083: just ident 64083 */
++	V4L2_IDENT_UPD64083 = 64083,
++
++	/* module m52790: just ident 52790 */
++	V4L2_IDENT_M52790 = 52790,
+ };
  
+ #endif
 diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
 index 95e74f1..3a69056 100644
 --- a/include/media/v4l2-common.h
@@ -87026,7 +99417,7 @@
 +
  #endif /* V4L2_COMMON_H_ */
 diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
-index 55e41af..3d8e96f 100644
+index 55e41af..0dd3e8e 100644
 --- a/include/media/v4l2-device.h
 +++ b/include/media/v4l2-device.h
 @@ -33,7 +33,9 @@
@@ -87040,7 +99431,7 @@
  	struct device *dev;
  	/* used to keep track of the registered subdevs */
  	struct list_head subdevs;
-@@ -42,9 +44,14 @@ struct v4l2_device {
+@@ -42,33 +44,43 @@ struct v4l2_device {
  	spinlock_t lock;
  	/* unique device name, by default the driver name + bus ID */
  	char name[V4L2_DEVICE_NAME_SIZE];
@@ -87054,9 +99445,14 @@
 +   dev may be NULL in rare cases (ISA devices). In that case you
 +   must fill in the v4l2_dev->name field before calling this function. */
  int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
- /* Set v4l2_dev->dev->driver_data to NULL and unregister all sub-devices */
+-/* Set v4l2_dev->dev->driver_data to NULL and unregister all sub-devices */
++/* Set v4l2_dev->dev to NULL. Call when the USB parent disconnects.
++   Since the parent disappears this ensures that v4l2_dev doesn't have an
++   invalid parent pointer. */
++void v4l2_device_disconnect(struct v4l2_device *v4l2_dev);
++/* Unregister all sub-devices and any other resources related to v4l2_dev. */
  void v4l2_device_unregister(struct v4l2_device *v4l2_dev);
-@@ -52,23 +59,24 @@ void v4l2_device_unregister(struct v4l2_device *v4l2_dev);
+ 
  /* Register a subdev with a v4l2 device. While registered the subdev module
     is marked as in-use. An error is returned if the module is no longer
     loaded when you attempt to register it. */
@@ -87086,7 +99482,7 @@
  			if ((cond) && sd->ops->o && sd->ops->o->f) 	\
  				sd->ops->o->f(sd , ##args); 		\
  	} while (0)
-@@ -77,12 +85,12 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
+@@ -77,12 +89,12 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
     If the callback returns an error other than 0 or -ENOIOCTLCMD, then
     return with that error code. Note that you cannot add or delete a
     subdev while walking the subdevs list. */
@@ -87101,7 +99497,7 @@
  		if ((cond) && sd->ops->o && sd->ops->o->f) 		\
  			err = sd->ops->o->f(sd , ##args); 		\
  		if (err && err != -ENOIOCTLCMD)				\
-@@ -94,16 +102,16 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
+@@ -94,16 +106,16 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
  /* Call the specified callback for all subdevs matching grp_id (if 0, then
     match them all). Ignore any errors. Note that you cannot add or delete
     a subdev while walking the subdevs list. */
@@ -87143,7 +99539,7 @@
  				    int id, const char *name);
  /* Prints the ioctl in a human-readable format */
 diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
-index 37b09e5..1b97a2c 100644
+index 37b09e5..d7a72d2 100644
 --- a/include/media/v4l2-subdev.h
 +++ b/include/media/v4l2-subdev.h
 @@ -78,6 +78,9 @@ struct v4l2_subdev_core_ops {
@@ -87156,16 +99552,24 @@
  	int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
  	long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
  #ifdef CONFIG_VIDEO_ADV_DEBUG
-@@ -112,6 +115,8 @@ struct v4l2_subdev_video_ops {
+@@ -112,9 +115,15 @@ struct v4l2_subdev_video_ops {
  	int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
  	int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap);
  	int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
 +	int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
 +	int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
  	int (*s_stream)(struct v4l2_subdev *sd, int enable);
- 	int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
+-	int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
++	int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc);
  	int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
-@@ -132,7 +137,7 @@ struct v4l2_subdev_ops {
++	int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
++	int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
++	int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
++	int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
+ };
+ 
+ struct v4l2_subdev_ops {
+@@ -132,7 +141,7 @@ struct v4l2_subdev_ops {
  struct v4l2_subdev {
  	struct list_head list;
  	struct module *owner;
@@ -87174,7 +99578,7 @@
  	const struct v4l2_subdev_ops *ops;
  	/* name must be unique */
  	char name[V4L2_SUBDEV_NAME_SIZE];
-@@ -171,7 +176,7 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
+@@ -171,7 +180,7 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
  	/* ops->core MUST be set */
  	BUG_ON(!ops || !ops->core);
  	sd->ops = ops;
@@ -87183,7 +99587,7 @@
  	sd->name[0] = '\0';
  	sd->grp_id = 0;
  	sd->priv = NULL;
-@@ -186,4 +191,9 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
+@@ -186,4 +195,9 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
  	(!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ?	\
  		(sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD))
  


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.976.2.8
retrieving revision 1.976.2.9
diff -u -r1.976.2.8 -r1.976.2.9
--- sources	17 Mar 2009 21:35:51 -0000	1.976.2.8
+++ sources	24 Mar 2009 22:57:47 -0000	1.976.2.9
@@ -1,3 +1 @@
-d351e44709c9810b85e29b877f50968a  linux-2.6.28.tar.bz2
-0a86c29a637967fddeb1ba2ed8b33e59  patch-2.6.29-rc8.bz2
-682f205222f03b1a903fc437f9788cfa  patch-2.6.29-rc8-git2.bz2
+64921b5ff5cdadbccfcd3820f03be7d8  linux-2.6.29.tar.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.888.2.7
retrieving revision 1.888.2.8
diff -u -r1.888.2.7 -r1.888.2.8
--- upstream	17 Mar 2009 21:35:51 -0000	1.888.2.7
+++ upstream	24 Mar 2009 22:57:47 -0000	1.888.2.8
@@ -1,4 +1 @@
-linux-2.6.28.tar.bz2
-patch-2.6.29-rc8.bz2
-patch-2.6.29-rc8-git2.bz2
-
+linux-2.6.29.tar.bz2

xen.pvops.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1.2.11 -r 1.1.2.12 xen.pvops.patch
Index: xen.pvops.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.patch,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- xen.pvops.patch	17 Mar 2009 21:35:51 -0000	1.1.2.11
+++ xen.pvops.patch	24 Mar 2009 22:57:47 -0000	1.1.2.12
@@ -75,6 +75,120 @@
 +Users:
 +	kmemtrace-user - git://repo.or.cz/kmemtrace-user.git
 +
+diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
+index 2a3fcc5..d9aa43d 100644
+--- a/Documentation/DMA-API.txt
++++ b/Documentation/DMA-API.txt
+@@ -609,3 +609,109 @@ size is the size (and should be a page-sized multiple).
+ The return value will be either a pointer to the processor virtual
+ address of the memory, or an error (via PTR_ERR()) if any part of the
+ region is occupied.
++
++Part III - Debug drivers use of the DMA-API
++-------------------------------------------
++
++The DMA-API as described above as some constraints. DMA addresses must be
++released with the corresponding function with the same size for example. With
++the advent of hardware IOMMUs it becomes more and more important that drivers
++do not violate those constraints. In the worst case such a violation can
++result in data corruption up to destroyed filesystems.
++
++To debug drivers and find bugs in the usage of the DMA-API checking code can
++be compiled into the kernel which will tell the developer about those
++violations. If your architecture supports it you can select the "Enable
++debugging of DMA-API usage" option in your kernel configuration. Enabling this
++option has a performance impact. Do not enable it in production kernels.
++
++If you boot the resulting kernel will contain code which does some bookkeeping
++about what DMA memory was allocated for which device. If this code detects an
++error it prints a warning message with some details into your kernel log. An
++example warning message may look like this:
++
++------------[ cut here ]------------
++WARNING: at /data2/repos/linux-2.6-iommu/lib/dma-debug.c:448
++	check_unmap+0x203/0x490()
++Hardware name:
++forcedeth 0000:00:08.0: DMA-API: device driver frees DMA memory with wrong
++	function [device address=0x00000000640444be] [size=66 bytes] [mapped as
++single] [unmapped as page]
++Modules linked in: nfsd exportfs bridge stp llc r8169
++Pid: 0, comm: swapper Tainted: G        W  2.6.28-dmatest-09289-g8bb99c0 #1
++Call Trace:
++ <IRQ>  [<ffffffff80240b22>] warn_slowpath+0xf2/0x130
++ [<ffffffff80647b70>] _spin_unlock+0x10/0x30
++ [<ffffffff80537e75>] usb_hcd_link_urb_to_ep+0x75/0xc0
++ [<ffffffff80647c22>] _spin_unlock_irqrestore+0x12/0x40
++ [<ffffffff8055347f>] ohci_urb_enqueue+0x19f/0x7c0
++ [<ffffffff80252f96>] queue_work+0x56/0x60
++ [<ffffffff80237e10>] enqueue_task_fair+0x20/0x50
++ [<ffffffff80539279>] usb_hcd_submit_urb+0x379/0xbc0
++ [<ffffffff803b78c3>] cpumask_next_and+0x23/0x40
++ [<ffffffff80235177>] find_busiest_group+0x207/0x8a0
++ [<ffffffff8064784f>] _spin_lock_irqsave+0x1f/0x50
++ [<ffffffff803c7ea3>] check_unmap+0x203/0x490
++ [<ffffffff803c8259>] debug_dma_unmap_page+0x49/0x50
++ [<ffffffff80485f26>] nv_tx_done_optimized+0xc6/0x2c0
++ [<ffffffff80486c13>] nv_nic_irq_optimized+0x73/0x2b0
++ [<ffffffff8026df84>] handle_IRQ_event+0x34/0x70
++ [<ffffffff8026ffe9>] handle_edge_irq+0xc9/0x150
++ [<ffffffff8020e3ab>] do_IRQ+0xcb/0x1c0
++ [<ffffffff8020c093>] ret_from_intr+0x0/0xa
++ <EOI> <4>---[ end trace f6435a98e2a38c0e ]---
++
++The driver developer can find the driver and the device including a stacktrace
++of the DMA-API call which caused this warning.
++
++Per default only the first error will result in a warning message. All other
++errors will only silently counted. This limitation exist to prevent the code
++from flooding your kernel log. To support debugging a device driver this can
++be disabled via debugfs. See the debugfs interface documentation below for
++details.
++
++The debugfs directory for the DMA-API debugging code is called dma-api/. In
++this directory the following files can currently be found:
++
++	dma-api/all_errors	This file contains a numeric value. If this
++				value is not equal to zero the debugging code
++				will print a warning for every error it finds
++				into the kernel log. Be carefull with this
++				option. It can easily flood your logs.
++
++	dma-api/disabled	This read-only file contains the character 'Y'
++				if the debugging code is disabled. This can
++				happen when it runs out of memory or if it was
++				disabled at boot time
++
++	dma-api/error_count	This file is read-only and shows the total
++				numbers of errors found.
++
++	dma-api/num_errors	The number in this file shows how many
++				warnings will be printed to the kernel log
++				before it stops. This number is initialized to
++				one at system boot and be set by writing into
++				this file
++
++	dma-api/min_free_entries
++				This read-only file can be read to get the
++				minimum number of free dma_debug_entries the
++				allocator has ever seen. If this value goes
++				down to zero the code will disable itself
++				because it is not longer reliable.
++
++	dma-api/num_free_entries
++				The current number of free dma_debug_entries
++				in the allocator.
++
++If you have this code compiled into your kernel it will be enabled by default.
++If you want to boot without the bookkeeping anyway you can provide
++'dma_debug=off' as a boot parameter. This will disable DMA-API debugging.
++Notice that you can not enable it again at runtime. You have to reboot to do
++so.
++
++When the code disables itself at runtime this is most likely because it ran
++out of dma_debug_entries. These entries are preallocated at boot. The number
++of preallocated entries is defined per architecture. If it is too low for you
++boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
++architectural default.
 diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
 index 3a882d9..c671a01 100644
 --- a/Documentation/DocBook/genericirq.tmpl
@@ -1638,7 +1752,7 @@
 +More details can be found in the source code, in the
 +kernel/tracing/*.c files.
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 54f21a5..8869faa 100644
+index 54f21a5..1d8af36 100644
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
 @@ -49,6 +49,7 @@ parameter is applicable:
@@ -1649,9 +1763,20 @@
  	LIBATA  Libata driver is enabled
  	LP	Printer support is enabled.
  	LOOP	Loopback device support is enabled.
-@@ -492,10 +493,12 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -491,11 +492,23 @@ and is between 256 and 4096 characters. It is defined in the file
+ 			Range: 0 - 8192
  			Default: 64
  
++	dma_debug=off	If the kernel is compiled with DMA_API_DEBUG support
++			this option disables the debugging code at boot.
++
++	dma_debug_entries=<number>
++			This option allows to tune the number of preallocated
++			entries for DMA-API debugging code. One entry is
++			required per DMA-API allocation. Use this if the
++			DMA-API debugging code disables itself because the
++			architectural default is too low.
++
  	hpet=		[X86-32,HPET] option to control HPET usage
 -			Format: { enable (default) | disable | force }
 +			Format: { enable (default) | disable | force |
@@ -1663,7 +1788,7 @@
  
  	com20020=	[HW,NET] ARCnet - COM20020 chipset
  			Format:
-@@ -604,6 +607,9 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -604,6 +617,9 @@ and is between 256 and 4096 characters. It is defined in the file
  
  	debug_objects	[KNL] Enable object debugging
  
@@ -1673,7 +1798,7 @@
  	debugpat	[X86] Enable PAT debugging
  
  	decnet.addr=	[HW,NET]
-@@ -1047,6 +1053,15 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -1047,6 +1063,15 @@ and is between 256 and 4096 characters. It is defined in the file
  			use the HighMem zone if it exists, and the Normal
  			zone if it does not.
  
@@ -1689,7 +1814,7 @@
  	movablecore=nn[KMG]	[KNL,X86-32,IA-64,PPC,X86-64] This parameter
  			is similar to kernelcore except it specifies the
  			amount of memory used for migratable allocations.
-@@ -1310,8 +1325,13 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -1310,8 +1335,13 @@ and is between 256 and 4096 characters. It is defined in the file
  
  	memtest=	[KNL,X86] Enable memtest
  			Format: <integer>
@@ -1704,7 +1829,7 @@
  
  	meye.*=		[HW] Set MotionEye Camera parameters
  			See Documentation/video4linux/meye.txt.
-@@ -2329,6 +2349,8 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -2329,6 +2359,8 @@ and is between 256 and 4096 characters. It is defined in the file
  
  	tp720=		[HW,PS2]
  
@@ -2564,7 +2689,7 @@
 +If it does not work then please ask about it on the linux-kernel at vger.kernel.org
 +mailing list or contact the x86 maintainers.
 diff --git a/MAINTAINERS b/MAINTAINERS
[...18806 lines suppressed...]
+-			skb_drop_fraglist(skb);
++		if (shinfo->destructor)
++			shinfo->destructor(shinfo);
++		else {
++			kfree(skb_shinfo_to_head(shinfo));
++
++			if (shinfo->nr_frags) {
++				int i;
++				for (i = 0; i < shinfo->nr_frags; i++)
++					put_page(shinfo->frags[i].page);
++			}
++		}
++
++		if (shinfo->frag_list)
++			skb_drop_list(&shinfo->frag_list);
++
++		orig = shinfo->orig;
++		/* We hold a payload reference to our parent. */
++		nohdr = true;
++		clone = true;
++	} while ((shinfo = orig) != NULL);
++}
++
++static void skb_release_data(struct sk_buff *skb)
++{
++	shinfo_put(skb_shinfo(skb), skb->nohdr, skb->cloned);
++}
+ 
+-		kfree(skb->head);
++/* Now hold reference to older data, if has a destructor (recursively). */
++static void skb_ref_data_parent(struct sk_buff *parent,
++				struct skb_shared_info *shinfo)
++{
++	struct skb_shared_info *pshinfo = skb_shinfo(parent);
++
++	if (pshinfo->destructor || pshinfo->orig) {
++		shinfo->orig = pshinfo;
++		atomic_add((1 << SKB_DATAREF_SHIFT) + 1, &pshinfo->dataref);
++		parent->cloned = 1;
+ 	}
+ }
+ 
+@@ -600,6 +641,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
  		n = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
  		if (!n)
  			return NULL;
@@ -146493,6 +152248,50 @@
  		n->fclone = SKB_FCLONE_UNAVAILABLE;
  	}
  
+@@ -719,6 +763,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
+ 			get_page(skb_shinfo(n)->frags[i].page);
+ 		}
+ 		skb_shinfo(n)->nr_frags = i;
++		skb_ref_data_parent(skb, skb_shinfo(n));
+ 	}
+ 
+ 	if (skb_shinfo(skb)->frag_list) {
+@@ -786,6 +831,8 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
+ 	if (skb_shinfo(skb)->frag_list)
+ 		skb_clone_fraglist(skb);
+ 
++	skb_ref_data_parent(skb, (void *)(data + size));
++
+ 	skb_release_data(skb);
+ 
+ 	off = (data + nhead) - skb->head;
+@@ -808,6 +855,8 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
+ 	skb->hdr_len  = 0;
+ 	skb->nohdr    = 0;
+ 	atomic_set(&skb_shinfo(skb)->dataref, 1);
++	skb_shinfo(skb)->len = skb_end_pointer(skb) - skb->head;
++	skb_shinfo(skb)->destructor = NULL;
+ 	return 0;
+ 
+ nodata:
+@@ -2005,6 +2054,8 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len)
+ 		skb_split_inside_header(skb, skb1, len, pos);
+ 	else		/* Second chunk has no header, nothing to copy. */
+ 		skb_split_no_header(skb, skb1, len, pos);
++
++	skb_ref_data_parent(skb, skb_shinfo(skb1));
+ }
+ 
+ /* Shifting from/to a cloned skb is a no-go.
+@@ -2558,6 +2609,8 @@ skip_fraglist:
+ 		nskb->data_len = len - hsize;
+ 		nskb->len += nskb->data_len;
+ 		nskb->truesize += nskb->data_len;
++
++		skb_ref_data_parent(skb, skb_shinfo(nskb));
+ 	} while ((offset += len) < skb->len);
+ 
+ 	return segs;
 diff --git a/net/core/sock.c b/net/core/sock.c
 index 5f97caa..7f3561d 100644
 --- a/net/core/sock.c
@@ -146644,6 +152443,20 @@
  	}
  }
  
+diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
+index c51fed4..3bdd5bf 100644
+--- a/net/sunrpc/svc.c
++++ b/net/sunrpc/svc.c
+@@ -317,8 +317,7 @@ svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx)
+ 	}
+ 	case SVC_POOL_PERNODE:
+ 	{
+-		node_to_cpumask_ptr(nodecpumask, node);
+-		set_cpus_allowed_ptr(task, nodecpumask);
++		set_cpus_allowed_ptr(task, cpumask_of_node(node));
+ 		break;
+ 	}
+ 	}
 diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
 index 5c865e2..0414541 100644
 --- a/net/sunrpc/svcauth_unix.c
@@ -146936,81 +152749,6 @@
  	/* sort by initial order, so that other symbols are left undisturbed */
  	return sa->start_pos - sb->start_pos;
  }
-diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
-index 3e1057f..4f1b488 100644
---- a/scripts/kconfig/conf.c
-+++ b/scripts/kconfig/conf.c
-@@ -11,6 +11,7 @@
- #include <time.h>
- #include <unistd.h>
- #include <sys/stat.h>
-+#include <sys/time.h>
- 
- #define LKC_DIRECT_LINK
- #include "lkc.h"
-@@ -464,9 +465,21 @@ int main(int ac, char **av)
- 			input_mode = set_yes;
- 			break;
- 		case 'r':
-+		{
-+			struct timeval now;
-+			unsigned int seed;
-+
-+			/*
-+			 * Use microseconds derived seed:
-+			 */
-+			gettimeofday(&now, NULL);
-+
-+			seed = (unsigned int)(now.tv_sec*now.tv_usec);
-+			srand(seed);
-+
- 			input_mode = set_random;
--			srand(time(NULL));
- 			break;
-+		}
- 		case 'h':
- 			printf(_("See README for usage info\n"));
- 			exit(0);
-diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
-index 830d9ea..a3ceb80 100644
---- a/scripts/kconfig/confdata.c
-+++ b/scripts/kconfig/confdata.c
-@@ -863,21 +863,25 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)
- 
- 		sym_calc_value(csym);
- 		prop = sym_get_choice_prop(csym);
--		def = -1;
--		while (1) {
--			cnt = 0;
--			expr_list_for_each_sym(prop->expr, e, sym) {
--				if (sym->visible == no)
--					continue;
-+		cnt = 0;
-+		expr_list_for_each_sym(prop->expr, e, sym)
-+			cnt++;
-+
-+		def = (rand() % cnt);
-+
-+		cnt = 0;
-+		expr_list_for_each_sym(prop->expr, e, sym) {
-+			if (sym) {
- 				if (def == cnt++) {
-+					sym->def[S_DEF_USER].tri = yes;
- 					csym->def[S_DEF_USER].val = sym;
--					break;
-+				}
-+				else {
-+					sym->def[S_DEF_USER].tri = no;
- 				}
- 			}
--			if (def >= 0 || cnt < 2)
--				break;
--			def = (rand() % cnt) + 1;
- 		}
- 		csym->flags |= SYMBOL_DEF_USER;
-+		csym->flags &= ~(SYMBOL_VALID);
- 	}
- }
 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
 index 8892161..7e62303 100644
 --- a/scripts/mod/modpost.c

xen.pvops.post.patch:

Index: xen.pvops.post.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.post.patch,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- xen.pvops.post.patch	17 Mar 2009 21:35:53 -0000	1.1.2.5
+++ xen.pvops.post.patch	24 Mar 2009 22:57:49 -0000	1.1.2.6
@@ -854,6 +854,65 @@
  
  int test_taint(unsigned flag)
  {
+--- a/drivers/media/dvb/dvb-usb/Kconfig
++++ b/drivers/media/dvb/dvb-usb/Kconfig
+@@ -235,8 +239,8 @@ config DVB_USB_OPERA1
+ 	tristate "Afatech AF9005 DVB-T USB1.1 support"
+ 	depends on DVB_USB && EXPERIMENTAL
+ 	depends on 0
+-	select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
+-	select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
++	select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE
++	select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMISE
+ 	help
+ 	  Say Y here to support the Afatech AF9005 based DVB-T USB1.1 receiver
+ 	  and the TerraTec Cinergy T USB XE (Rev.1)
+--- a/kernel/trace/Kconfig
++++ b/kernel/trace/Kconfig
+@@ -150,6 +150,15 @@ config CONTEXT_SWITCH_TRACER
+ 	help
+ 	  Basic tracer to catch the syscall entry and exit events.
+ 
++config PROCESS_TRACER
++	bool "Trace process events via utrace"
++	depends on DEBUG_KERNEL
++	select TRACING
++	select UTRACE
++	help
++	  This tracer provides trace records from process events
++	  accessible to utrace: lifecycle, system calls, and signals.
++
+ config BOOT_TRACER
+ 	bool "Trace boot initcalls"
+ 	depends on DEBUG_KERNEL
+--- a/kernel/trace/Makefile
++++ b/kernel/trace/Makefile
+@@ -33,6 +33,7 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += t
+ obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
+ obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o
+ obj-$(CONFIG_POWER_TRACER) += trace_power.o
++obj-$(CONFIG_PROCESS_TRACER) += trace_process.o
+ obj-$(CONFIG_KMEMTRACE) += kmemtrace.o
+ obj-$(CONFIG_WORKQUEUE_TRACER) += trace_workqueue.o
+ obj-$(CONFIG_BLK_DEV_IO_TRACE)  += blktrace.o
+--- a/kernel/trace/trace.h
++++ b/kernel/trace/trace.h
+@@ -30,6 +31,7 @@ enum trace_type {
+ 	TRACE_KMEM_ALLOC,
+ 	TRACE_KMEM_FREE,
+ 	TRACE_POWER,
++        TRACE_PROCESS,
+ 	TRACE_BLK,
+ 
+ 	__TRACE_LAST_TYPE
+@@ -280,6 +287,7 @@ extern void __ftrace_bad_type(void);
+ 			  TRACE_GRAPH_RET);		\
+ 		IF_ASSIGN(var, ent, struct hw_branch_entry, TRACE_HW_BRANCHES);\
+ 		IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
++		IF_ASSIGN(var, ent, struct trace_process, TRACE_PROCESS); \
+ 		IF_ASSIGN(var, ent, struct kmemtrace_alloc_entry,	\
+ 			  TRACE_KMEM_ALLOC);	\
+ 		IF_ASSIGN(var, ent, struct kmemtrace_free_entry,	\
 --- a/localversion-tip	2009-02-17 19:49:34.000000000 +0000
 +++ /dev/null	2009-02-17 18:08:14.005240123 +0000
 @@ -1 +0,0 @@

xen.pvops.pre.patch:

Index: xen.pvops.pre.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.pre.patch,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- xen.pvops.pre.patch	17 Mar 2009 21:35:53 -0000	1.1.2.5
+++ xen.pvops.pre.patch	24 Mar 2009 22:57:49 -0000	1.1.2.6
@@ -5,6 +5,8 @@
 linux-2.6-defaults-pci_no_msi.patch - drivers/pci/pci.h
 drm-next.patch - drivers/gpu/drm/drm_proc.c
 linux-2.6-debug-taint-vm.patch - kernel/panic.c
+linux-2.6-v4l-dvb-update.patch - drivers/media/dvb/dvb-usb/Kconfig
+linux-2.6-utrace-ftrace.patch - kernel/trace/Kconfig kernel/trace/Makefile kernel/trace/trace.h
 
 --- a/arch/x86/mm/pat.c	2009-02-14 12:49:46.000000000 +0000
 +++ b/arch/x86/mm/pat.c	2009-02-14 09:16:34.000000000 +0000
@@ -860,3 +862,61 @@
  
  int test_taint(unsigned flag)
  {
+--- a/drivers/media/dvb/dvb-usb/Kconfig
++++ b/drivers/media/dvb/dvb-usb/Kconfig
+@@ -235,8 +239,8 @@ config DVB_USB_OPERA1
+ config DVB_USB_AF9005
+ 	tristate "Afatech AF9005 DVB-T USB1.1 support"
+ 	depends on DVB_USB && EXPERIMENTAL
+-	select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE
+-	select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMISE
++	select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
++	select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
+ 	help
+ 	  Say Y here to support the Afatech AF9005 based DVB-T USB1.1 receiver
+ 	  and the TerraTec Cinergy T USB XE (Rev.1)
+--- a/kernel/trace/Kconfig
++++ b/kernel/trace/Kconfig
+@@ -150,15 +150,6 @@ config CONTEXT_SWITCH_TRACER
+ 	  This tracer gets called from the context switch and records
+ 	  all switching of tasks.
+ 
+-config PROCESS_TRACER
+-	bool "Trace process events via utrace"
+-	depends on DEBUG_KERNEL
+-	select TRACING
+-	select UTRACE
+-	help
+-	  This tracer provides trace records from process events
+-	  accessible to utrace: lifecycle, system calls, and signals.
+-
+ config BOOT_TRACER
+ 	bool "Trace boot initcalls"
+ 	depends on DEBUG_KERNEL
+--- a/kernel/trace/Makefile
++++ b/kernel/trace/Makefile
+@@ -33,6 +33,5 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += t
+ obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
+ obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o
+ obj-$(CONFIG_POWER_TRACER) += trace_power.o
+-obj-$(CONFIG_PROCESS_TRACER) += trace_process.o
+ 
+ libftrace-y := ftrace.o
+--- a/kernel/trace/trace.h
++++ b/kernel/trace/trace.h
+@@ -30,7 +31,6 @@ enum trace_type {
+ 	TRACE_USER_STACK,
+ 	TRACE_HW_BRANCHES,
+ 	TRACE_POWER,
+-        TRACE_PROCESS,
+ 
+ 	__TRACE_LAST_TYPE
+ };
+@@ -280,7 +287,6 @@ extern void __ftrace_bad_type(void);
+ 			  TRACE_GRAPH_RET);		\
+ 		IF_ASSIGN(var, ent, struct hw_branch_entry, TRACE_HW_BRANCHES);\
+  		IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
+-		IF_ASSIGN(var, ent, struct trace_process, TRACE_PROCESS); \
+ 		__ftrace_bad_type();					\
+ 	} while (0)
+ 


--- build-with-fno-dwarf2-cfi-asm.patch DELETED ---


--- linux-2.6-ext4-extent-header-check-fix.patch DELETED ---


--- linux-2.6-ext4-print-warning-once.patch DELETED ---


--- linux-2.6-hdpvr.patch DELETED ---


--- linux-2.6-net-tulip-interrupt.patch DELETED ---


--- linux-2.6-net-velocity-dma.patch DELETED ---


--- linux-2.6.28.tar.bz2.sign DELETED ---


--- patch-2.6.29-rc8-git2.bz2.sign DELETED ---


--- patch-2.6.29-rc8.bz2.sign DELETED ---




More information about the fedora-extras-commits mailing list