rpms/kernel/devel acpi-ec-merge-irq-and-poll-modes.patch, NONE, 1.1.2.1 acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch, NONE, 1.1.2.1 acpi-ec-use-burst-mode-only-for-msi-notebooks.patch, NONE, 1.1.2.1 dlm-fix-connection-close-handling.patch, NONE, 1.1.2.1 drm-default-mode.patch, NONE, 1.1.2.1 drm-i915-fix-sync-to-vbl-when-vga-is-off.patch, NONE, 1.1.2.2 drm-i915-fix-tvmode-oops.patch, NONE, 1.1.2.1 drm-next-b390f944.patch, NONE, 1.1.2.1 drm-radeon-misc-fixes.patch, NONE, 1.1.2.1 drm-radeon-rv410-test-fix.patch, NONE, 1.1.2.1 ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch, NONE, 1.1.2.2 fbcon-lower-debug.patch, NONE, 1.1.2.1 highmem-fix-arm-powerpc-kmap_types.patch, NONE, 1.1.2.1 ipv4-fix-null-ptr-deref-in-ip_fragment.patch, NONE, 1.1.2.1 linux-2.6-ath9k-fixes.patch, NONE, 1.1.2.2 linux-2.6-iommu-another-hp-screwup.patch, NONE, 1.1.2.1 linux-2.6-iommu-dmar-all-1s.patch, NONE, 1.1.2.1 linux-2.6-iommu-hp-cantiga-resume.patch, NONE, 1.1.2.1 linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch, NONE, 1.1.2.1 linux-2.6.31-nfsd-proot.patch, NONE, 1.1.2.1 sched-deal-with-low-load-in-wake-affine.patch, NONE, 1.1.2.1 sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch, NONE, 1.1.2.1 sched-remove-shortcut-from-select-task-rq-fair.patch, NONE, 1.1.2.1 sched-retune-scheduler-latency-defaults.patch, NONE, 1.1.2.1 sched-update-the-clock-of-runqueue-select-task-rq-selected.patch, NONE, 1.1.2.1 Makefile, 1.97.6.10, 1.97.6.11 config-generic, 1.238.6.46, 1.238.6.47 drm-nouveau.patch, 1.8.6.24, 1.8.6.25 kernel.spec, 1.1294.2.80, 1.1294.2.81 linux-2.6-execshield.patch, 1.102.6.3, 1.102.6.4 linux-2.6-iommu-at-zero.patch, 1.1.2.1, 1.1.2.2 lirc-2.6.31.patch, 1.2.2.4, 1.2.2.5 sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch, 1.2.2.2, 1.2.2.3 xen.pvops.patch, 1.1.2.50, 1.1.2.51 xen.pvops.post.patch, 1.1.2.33, 1.1.2.34 xen.pvops.pre.patch, 1.1.2.19, 1.1.2.20 drm-disable-r600-aspm.patch, 1.1.2.1, NONE drm-next-ea1495a6.patch, 1.1.2.1, NONE drm-r600-lenovo-w500-fix.patch, 1.1.2.1, NONE drm-radeon-agp-font-fix.patch, 1.1.2.1, NONE drm-radeon-fix-agp-resume.patch, 1.1.2.1, NONE drm-radeon-fix-ring-rmw-issue.patch, 1.1.2.1, NONE linux-2.6-nfsd4-proots.patch, 1.1.2.4, NONE linux-2.6-sysrq-c.patch, 1.4, NONE

myoung myoung at fedoraproject.org
Wed Dec 9 21:44:25 UTC 2009


Author: myoung

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

Modified Files:
      Tag: private-myoung-dom0-branch
	Makefile config-generic drm-nouveau.patch kernel.spec 
	linux-2.6-execshield.patch linux-2.6-iommu-at-zero.patch 
	lirc-2.6.31.patch 
	sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch 
	xen.pvops.patch xen.pvops.post.patch xen.pvops.pre.patch 
Added Files:
      Tag: private-myoung-dom0-branch
	acpi-ec-merge-irq-and-poll-modes.patch 
	acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch 
	acpi-ec-use-burst-mode-only-for-msi-notebooks.patch 
	dlm-fix-connection-close-handling.patch drm-default-mode.patch 
	drm-i915-fix-sync-to-vbl-when-vga-is-off.patch 
	drm-i915-fix-tvmode-oops.patch drm-next-b390f944.patch 
	drm-radeon-misc-fixes.patch drm-radeon-rv410-test-fix.patch 
	ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch 
	fbcon-lower-debug.patch 
	highmem-fix-arm-powerpc-kmap_types.patch 
	ipv4-fix-null-ptr-deref-in-ip_fragment.patch 
	linux-2.6-ath9k-fixes.patch 
	linux-2.6-iommu-another-hp-screwup.patch 
	linux-2.6-iommu-dmar-all-1s.patch 
	linux-2.6-iommu-hp-cantiga-resume.patch 
	linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch 
	linux-2.6.31-nfsd-proot.patch 
	sched-deal-with-low-load-in-wake-affine.patch 
	sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch 
	sched-remove-shortcut-from-select-task-rq-fair.patch 
	sched-retune-scheduler-latency-defaults.patch 
	sched-update-the-clock-of-runqueue-select-task-rq-selected.patch 
Removed Files:
      Tag: private-myoung-dom0-branch
	drm-disable-r600-aspm.patch drm-next-ea1495a6.patch 
	drm-r600-lenovo-w500-fix.patch drm-radeon-agp-font-fix.patch 
	drm-radeon-fix-agp-resume.patch 
	drm-radeon-fix-ring-rmw-issue.patch 
	linux-2.6-nfsd4-proots.patch linux-2.6-sysrq-c.patch 
Log Message:
update to latest pvops patch


acpi-ec-merge-irq-and-poll-modes.patch:
 ec.c |  140 ++++++++++++++++++++++---------------------------------------------
 1 file changed, 46 insertions(+), 94 deletions(-)

--- NEW FILE acpi-ec-merge-irq-and-poll-modes.patch ---
From: Alexey Starikovskiy <astarikovskiy at suse.de>
Date: Sat, 29 Aug 2009 23:06:14 +0000 (+0400)
Subject: ACPI: EC: Merge IRQ and POLL modes
X-Git-Tag: v2.6.32-rc1~171^2~11^2~2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=2a84cb9852f52c0cd1c48bca41a8792d44ad06cc

ACPI: EC: Merge IRQ and POLL modes

In general, EC transaction should complete in less than 1ms, thus it is possible to merge wait for
1ms in poll mode and 1ms of interrupt transaction timeout.
Still, driver will wait 500ms for EC to complete transaction.

This significantly simplifies driver and makes it immune to problematic EC interrupt
implementations.

It also may lessen kernel start-up time by 500ms.

References: http://bugzilla.kernel.org/show_bug.cgi?id=12949

Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 391f331..839b542 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -68,15 +68,13 @@ enum ec_command {
 #define ACPI_EC_DELAY		500	/* Wait 500ms max. during EC ops */
 #define ACPI_EC_UDELAY_GLK	1000	/* Wait 1ms max. to get global lock */
 #define ACPI_EC_CDELAY		10	/* Wait 10us before polling EC */
+#define ACPI_EC_MSI_UDELAY	550	/* Wait 550us for MSI EC */
 
 #define ACPI_EC_STORM_THRESHOLD 8	/* number of false interrupts
 					   per one transaction */
 
 enum {
 	EC_FLAGS_QUERY_PENDING,		/* Query is pending */
-	EC_FLAGS_GPE_MODE,		/* Expect GPE to be sent
-					 * for status change */
-	EC_FLAGS_NO_GPE,		/* Don't use GPE mode */
 	EC_FLAGS_GPE_STORM,		/* GPE storm detected */
 	EC_FLAGS_HANDLERS_INSTALLED	/* Handlers for GPE and
 					 * OpReg are installed */
@@ -170,7 +168,7 @@ static void start_transaction(struct acpi_ec *ec)
 	acpi_ec_write_cmd(ec, ec->curr->command);
 }
 
-static void gpe_transaction(struct acpi_ec *ec, u8 status)
+static void advance_transaction(struct acpi_ec *ec, u8 status)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&ec->curr_lock, flags);
@@ -201,29 +199,6 @@ unlock:
 	spin_unlock_irqrestore(&ec->curr_lock, flags);
 }
 
-static int acpi_ec_wait(struct acpi_ec *ec)
-{
-	if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
-			       msecs_to_jiffies(ACPI_EC_DELAY)))
-		return 0;
-	/* try restart command if we get any false interrupts */
-	if (ec->curr->irq_count &&
-	    (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) {
-		pr_debug(PREFIX "controller reset, restart transaction\n");
-		start_transaction(ec);
-		if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
-					msecs_to_jiffies(ACPI_EC_DELAY)))
-			return 0;
-	}
-	/* missing GPEs, switch back to poll mode */
-	if (printk_ratelimit())
-		pr_info(PREFIX "missing confirmations, "
-				"switch off interrupt mode.\n");
-	set_bit(EC_FLAGS_NO_GPE, &ec->flags);
-	clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
-	return 1;
-}
-
 static void acpi_ec_gpe_query(void *ec_cxt);
 
 static int ec_check_sci(struct acpi_ec *ec, u8 state)
@@ -236,43 +211,51 @@ static int ec_check_sci(struct acpi_ec *ec, u8 state)
 	return 0;
 }
 
-static void ec_delay(void)
-{
-	/* EC in MSI notebooks don't tolerate delays other than 550 usec */
-	if (EC_FLAGS_MSI)
-		udelay(ACPI_EC_DELAY);
-	else
-		/* Use shortest sleep available */
-		msleep(1);
-}
-
 static int ec_poll(struct acpi_ec *ec)
 {
-	unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
-	udelay(ACPI_EC_CDELAY);
-	while (time_before(jiffies, delay)) {
-		gpe_transaction(ec, acpi_ec_read_status(ec));
-		ec_delay();
-		if (ec_transaction_done(ec))
-			return 0;
+	unsigned long flags;
+	int repeat = 2; /* number of command restarts */
+	while (repeat--) {
+		unsigned long delay = jiffies +
+			msecs_to_jiffies(ACPI_EC_DELAY);
+		do {
+			/* don't sleep with disabled interrupts */
+			if (EC_FLAGS_MSI || irqs_disabled()) {
+				udelay(ACPI_EC_MSI_UDELAY);
+				if (ec_transaction_done(ec))
+					return 0;
+			} else {
+				if (wait_event_timeout(ec->wait,
+						ec_transaction_done(ec),
+						msecs_to_jiffies(1)))
+					return 0;
+			}
+			advance_transaction(ec, acpi_ec_read_status(ec));
+		} while (time_before(jiffies, delay));
+		if (!ec->curr->irq_count ||
+		    (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
+			break;
+		/* try restart command if we get any false interrupts */
+		pr_debug(PREFIX "controller reset, restart transaction\n");
+		spin_lock_irqsave(&ec->curr_lock, flags);
+		start_transaction(ec);
+		spin_unlock_irqrestore(&ec->curr_lock, flags);
 	}
 	return -ETIME;
 }
 
 static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
-					struct transaction *t,
-					int force_poll)
+					struct transaction *t)
 {
 	unsigned long tmp;
 	int ret = 0;
 	pr_debug(PREFIX "transaction start\n");
 	/* disable GPE during transaction if storm is detected */
 	if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
-		clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 		acpi_disable_gpe(NULL, ec->gpe);
 	}
 	if (EC_FLAGS_MSI)
-		udelay(ACPI_EC_DELAY);
+		udelay(ACPI_EC_MSI_UDELAY);
 	/* start transaction */
 	spin_lock_irqsave(&ec->curr_lock, tmp);
 	/* following two actions should be kept atomic */
@@ -281,11 +264,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
 	if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
 		clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
 	spin_unlock_irqrestore(&ec->curr_lock, tmp);
-	/* if we selected poll mode or failed in GPE-mode do a poll loop */
-	if (force_poll ||
-	    !test_bit(EC_FLAGS_GPE_MODE, &ec->flags) ||
-	    acpi_ec_wait(ec))
-		ret = ec_poll(ec);
+	ret = ec_poll(ec);
 	pr_debug(PREFIX "transaction end\n");
 	spin_lock_irqsave(&ec->curr_lock, tmp);
 	ec->curr = NULL;
@@ -295,8 +274,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
 		ec_check_sci(ec, acpi_ec_read_status(ec));
 		/* it is safe to enable GPE outside of transaction */
 		acpi_enable_gpe(NULL, ec->gpe);
-	} else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
-		   t->irq_count > ACPI_EC_STORM_THRESHOLD) {
+	} else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) {
 		pr_info(PREFIX "GPE storm detected, "
 			"transactions will use polling mode\n");
 		set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
@@ -314,16 +292,14 @@ static int ec_wait_ibf0(struct acpi_ec *ec)
 {
 	unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
 	/* interrupt wait manually if GPE mode is not active */
-	unsigned long timeout = test_bit(EC_FLAGS_GPE_MODE, &ec->flags) ?
-		msecs_to_jiffies(ACPI_EC_DELAY) : msecs_to_jiffies(1);
 	while (time_before(jiffies, delay))
-		if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), timeout))
+		if (wait_event_timeout(ec->wait, ec_check_ibf0(ec),
+					msecs_to_jiffies(1)))
 			return 0;
 	return -ETIME;
 }
 
-static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t,
-			       int force_poll)
+static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
 {
 	int status;
 	u32 glk;
@@ -345,7 +321,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t,
 		status = -ETIME;
 		goto end;
 	}
-	status = acpi_ec_transaction_unlocked(ec, t, force_poll);
+	status = acpi_ec_transaction_unlocked(ec, t);
 end:
 	if (ec->global_lock)
 		acpi_release_global_lock(glk);
@@ -365,7 +341,7 @@ static int acpi_ec_burst_enable(struct acpi_ec *ec)
 				.wdata = NULL, .rdata = &d,
 				.wlen = 0, .rlen = 1};
 
-	return acpi_ec_transaction(ec, &t, 0);
+	return acpi_ec_transaction(ec, &t);
 }
 
 static int acpi_ec_burst_disable(struct acpi_ec *ec)
@@ -375,7 +351,7 @@ static int acpi_ec_burst_disable(struct acpi_ec *ec)
 				.wlen = 0, .rlen = 0};
 
 	return (acpi_ec_read_status(ec) & ACPI_EC_FLAG_BURST) ?
-				acpi_ec_transaction(ec, &t, 0) : 0;
+				acpi_ec_transaction(ec, &t) : 0;
 }
 
 static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 * data)
@@ -386,7 +362,7 @@ static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 * data)
 				.wdata = &address, .rdata = &d,
 				.wlen = 1, .rlen = 1};
 
-	result = acpi_ec_transaction(ec, &t, 0);
+	result = acpi_ec_transaction(ec, &t);
 	*data = d;
 	return result;
 }
@@ -398,7 +374,7 @@ static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
 				.wdata = wdata, .rdata = NULL,
 				.wlen = 2, .rlen = 0};
 
-	return acpi_ec_transaction(ec, &t, 0);
+	return acpi_ec_transaction(ec, &t);
 }
 
 /*
@@ -466,7 +442,7 @@ int ec_transaction(u8 command,
 	if (!first_ec)
 		return -ENODEV;
 
-	return acpi_ec_transaction(first_ec, &t, force_poll);
+	return acpi_ec_transaction(first_ec, &t);
 }
 
 EXPORT_SYMBOL(ec_transaction);
@@ -487,7 +463,7 @@ static int acpi_ec_query(struct acpi_ec *ec, u8 * data)
 	 * bit to be cleared (and thus clearing the interrupt source).
 	 */
 
-	result = acpi_ec_transaction(ec, &t, 0);
+	result = acpi_ec_transaction(ec, &t);
 	if (result)
 		return result;
 
@@ -570,28 +546,10 @@ static u32 acpi_ec_gpe_handler(void *data)
 	pr_debug(PREFIX "~~~> interrupt\n");
 	status = acpi_ec_read_status(ec);
 
-	if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) {
-		gpe_transaction(ec, status);
-		if (ec_transaction_done(ec) &&
-		    (status & ACPI_EC_FLAG_IBF) == 0)
-			wake_up(&ec->wait);
-	}
-
+	advance_transaction(ec, status);
+	if (ec_transaction_done(ec) && (status & ACPI_EC_FLAG_IBF) == 0)
+		wake_up(&ec->wait);
 	ec_check_sci(ec, status);
-	if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
-	    !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) {
-		/* this is non-query, must be confirmation */
-		if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
-			if (printk_ratelimit())
-				pr_info(PREFIX "non-query interrupt received,"
-					" switching to interrupt mode\n");
-		} else {
-			/* hush, STORM switches the mode every transaction */
-			pr_debug(PREFIX "non-query interrupt received,"
-				" switching to interrupt mode\n");
-		}
-		set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
-	}
 	return ACPI_INTERRUPT_HANDLED;
 }
 
@@ -837,8 +795,6 @@ static int acpi_ec_add(struct acpi_device *device)
 	acpi_ec_add_fs(device);
 	pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
 			  ec->gpe, ec->command_addr, ec->data_addr);
-	pr_info(PREFIX "driver started in %s mode\n",
-		(test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll");
 	return 0;
 }
 
@@ -1054,8 +1010,6 @@ static int acpi_ec_suspend(struct acpi_device *device, pm_message_t state)
 {
 	struct acpi_ec *ec = acpi_driver_data(device);
 	/* Stop using GPE */
-	set_bit(EC_FLAGS_NO_GPE, &ec->flags);
-	clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 	acpi_disable_gpe(NULL, ec->gpe);
 	return 0;
 }
@@ -1064,8 +1018,6 @@ static int acpi_ec_resume(struct acpi_device *device)
 {
 	struct acpi_ec *ec = acpi_driver_data(device);
 	/* Enable use of GPE back */
-	clear_bit(EC_FLAGS_NO_GPE, &ec->flags);
-	set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 	acpi_enable_gpe(NULL, ec->gpe);
 	return 0;
 }

acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch:
 ec.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- NEW FILE acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch ---
From: Alexey Starikovskiy <astarikovskiy at suse.de>
Date: Thu, 1 Oct 2009 22:53:15 +0000 (+0400)
Subject: ACPI: EC: Restart command even if no interrupts from EC
X-Git-Tag: v2.6.32-rc3~4^2~2^2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e12ac3d018dd8f20a075f552020

ACPI: EC: Restart command even if no interrupts from EC

EC may forget a command without sending any "reset" interrupt,
thus we need to lessen the requirement for transaction restart.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14247
Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index f707960..8a4897d 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -232,10 +232,8 @@ static int ec_poll(struct acpi_ec *ec)
 			}
 			advance_transaction(ec, acpi_ec_read_status(ec));
 		} while (time_before(jiffies, delay));
-		if (!ec->curr->irq_count ||
-		    (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
+		if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)
 			break;
-		/* try restart command if we get any false interrupts */
 		pr_debug(PREFIX "controller reset, restart transaction\n");
 		spin_lock_irqsave(&ec->curr_lock, flags);
 		start_transaction(ec);

acpi-ec-use-burst-mode-only-for-msi-notebooks.patch:
 ec.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- NEW FILE acpi-ec-use-burst-mode-only-for-msi-notebooks.patch ---
From: Alexey Starikovskiy <astarikovskiy at suse.de>
Date: Fri, 28 Aug 2009 19:29:44 +0000 (+0400)
Subject: ACPI: EC: use BURST mode only for MSI notebooks
X-Git-Tag: v2.6.32-rc1~171^2~11^2~1
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6a63b06f3c494cc87eade97f081300bda60acec7

ACPI: EC: use BURST mode only for MSI notebooks

Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 839b542..788db78 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -575,7 +575,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
 	if (bits != 8 && acpi_strict)
 		return AE_BAD_PARAMETER;
 
-	acpi_ec_burst_enable(ec);
+	if (EC_FLAGS_MSI)
+		acpi_ec_burst_enable(ec);
 
 	if (function == ACPI_READ) {
 		result = acpi_ec_read(ec, address, &temp);
@@ -596,7 +597,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
 		}
 	}
 
-	acpi_ec_burst_disable(ec);
+	if (EC_FLAGS_MSI)
+		acpi_ec_burst_disable(ec);
 
 	switch (result) {
 	case -EINVAL:

dlm-fix-connection-close-handling.patch:
 lowcomms.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

--- NEW FILE dlm-fix-connection-close-handling.patch ---
From: Lars Marowsky-Bree <lmb at suse.de>
Date: Tue, 11 Aug 2009 21:18:23 +0000 (-0500)
Subject: dlm: fix connection close handling
X-Git-Tag: v2.6.32-rc1~646^2~1
X-Git-Url: http://git.kernel.org/gitweb.cgi?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=063c4c99630c0b06afad080d2a18bda64172c1a2

dlm: fix connection close handling

Closing a connection to a node can create problems if there are
outstanding messages for that node.  The problems include dlm_send
spinning attempting to reconnect, or BUG from tcp_connect_to_sock()
attempting to use a partially closed connection.

To cleanly close a connection, we now first attempt to send any pending
messages, cancel any remaining workqueue work, and flag the connection
as closed to avoid reconnect attempts.

Signed-off-by: Lars Marowsky-Bree <lmb at suse.de>
Signed-off-by: Christine Caulfield <ccaulfie at redhat.com>
Signed-off-by: David Teigland <teigland at redhat.com>
---

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 210d52c..bda690c 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -106,6 +106,7 @@ struct connection {
 #define CF_CONNECT_PENDING 3
 #define CF_INIT_PENDING 4
 #define CF_IS_OTHERCON 5
+#define CF_CLOSE 6
 	struct list_head writequeue;  /* List of outgoing writequeue_entries */
 	spinlock_t writequeue_lock;
 	int (*rx_action) (struct connection *);	/* What to do when active */
@@ -299,6 +300,8 @@ static void lowcomms_write_space(struct sock *sk)
 
 static inline void lowcomms_connect_sock(struct connection *con)
 {
+	if (test_bit(CF_CLOSE, &con->flags))
+		return;
 	if (!test_and_set_bit(CF_CONNECT_PENDING, &con->flags))
 		queue_work(send_workqueue, &con->swork);
 }
@@ -1368,6 +1371,13 @@ int dlm_lowcomms_close(int nodeid)
 	log_print("closing connection to node %d", nodeid);
 	con = nodeid2con(nodeid, 0);
 	if (con) {
+		clear_bit(CF_CONNECT_PENDING, &con->flags);
+		clear_bit(CF_WRITE_PENDING, &con->flags);
+		set_bit(CF_CLOSE, &con->flags);
+		if (cancel_work_sync(&con->swork))
+			log_print("canceled swork for node %d", nodeid);
+		if (cancel_work_sync(&con->rwork))
+			log_print("canceled rwork for node %d", nodeid);
 		clean_one_writequeue(con);
 		close_connection(con, true);
 	}
@@ -1393,9 +1403,10 @@ static void process_send_sockets(struct work_struct *work)
 
 	if (test_and_clear_bit(CF_CONNECT_PENDING, &con->flags)) {
 		con->connect_action(con);
+		set_bit(CF_WRITE_PENDING, &con->flags);
 	}
-	clear_bit(CF_WRITE_PENDING, &con->flags);
-	send_to_sock(con);
+	if (test_and_clear_bit(CF_WRITE_PENDING, &con->flags))
+		send_to_sock(con);
 }
 
 

drm-default-mode.patch:
 drm_crtc_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE drm-default-mode.patch ---
diff -up linux-2.6.31.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx linux-2.6.31.noarch/drivers/gpu/drm/drm_crtc_helper.c
--- linux-2.6.31.noarch/drivers/gpu/drm/drm_crtc_helper.c.jx	2009-11-23 13:33:35.000000000 -0500
+++ linux-2.6.31.noarch/drivers/gpu/drm/drm_crtc_helper.c	2009-11-23 13:34:38.000000000 -0500
@@ -109,7 +109,7 @@ int drm_helper_probe_single_connector_mo
 
 	count = (*connector_funcs->get_modes)(connector);
 	if (!count) {
-		count = drm_add_modes_noedid(connector, 800, 600);
+		count = drm_add_modes_noedid(connector, 1024, 768);
 		if (!count)
 			return 0;
 	}

drm-i915-fix-sync-to-vbl-when-vga-is-off.patch:
 drivers/gpu/drm/drm_irq.c            |   34 ++++++++++++++++++++++++++--------
 drivers/gpu/drm/i915/intel_display.c |    1 +
 include/drm/drmP.h                   |    1 +
 3 files changed, 28 insertions(+), 8 deletions(-)

--- NEW FILE drm-i915-fix-sync-to-vbl-when-vga-is-off.patch ---
>From patchwork Mon Nov  9 04:51:22 2009
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: drm/i915: Fix sync to vblank when VGA output is turned off
Date: Mon, 09 Nov 2009 04:51:22 -0000
From: Li Peng <peng.li at linux.intel.com>
X-Patchwork-Id: 58658

In current vblank-wait implementation, if we turn off VGA output,
drm_wait_vblank will still wait on the disabled pipe until timeout,
because vblank on the pipe is assumed be enabled. This would cause
slow system response on some system such as moblin.

This patch resolve the issue by adding a drm helper function
drm_vblank_off which explicitly clear vblank_enabled[crtc], wake up
any waiting queue and save last vblank counter before turning off
crtc. It also slightly change drm_vblank_get to ensure that we will
will return immediately if trying to wait on a disabled pipe.

Signed-off-by: Li Peng <peng.li at intel.com>
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

---
drivers/gpu/drm/drm_irq.c            |   34 ++++++++++++++++++++++++++--------
 drivers/gpu/drm/i915/intel_display.c |    1 +
 include/drm/drmP.h                   |    1 +
 3 files changed, 28 insertions(+), 8 deletions(-)

diff -Nur linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c linux-2.6.31.noarch~/drivers/gpu/drm/drm_irq.c
--- linux-2.6.31.noarch/drivers/gpu/drm/drm_irq.c	2009-11-30 14:08:56.000000000 -0500
+++ linux-2.6.31.noarch~/drivers/gpu/drm/drm_irq.c	2009-11-30 14:08:23.000000000 -0500
@@ -429,15 +429,21 @@
 
 	spin_lock_irqsave(&dev->vbl_lock, irqflags);
 	/* Going from 0->1 means we have to enable interrupts again */
-	if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1 &&
-	    !dev->vblank_enabled[crtc]) {
-		ret = dev->driver->enable_vblank(dev, crtc);
-		DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret);
-		if (ret)
+	if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1) {
+		if (!dev->vblank_enabled[crtc]) {
+			ret = dev->driver->enable_vblank(dev, crtc);
+			DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret);
+			if (ret)
+				atomic_dec(&dev->vblank_refcount[crtc]);
+			else {
+				dev->vblank_enabled[crtc] = 1;
+				drm_update_vblank_count(dev, crtc);
+			}
+		}
+	} else {
+		if (!dev->vblank_enabled[crtc]) {
 			atomic_dec(&dev->vblank_refcount[crtc]);
-		else {
-			dev->vblank_enabled[crtc] = 1;
-			drm_update_vblank_count(dev, crtc);
+			ret = -EINVAL;
 		}
 	}
 	spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
@@ -464,6 +470,18 @@
 }
 EXPORT_SYMBOL(drm_vblank_put);
 
+void drm_vblank_off(struct drm_device *dev, int crtc)
+{
+	unsigned long irqflags;
+
+	spin_lock_irqsave(&dev->vbl_lock, irqflags);
+	DRM_WAKEUP(&dev->vbl_queue[crtc]);
+	dev->vblank_enabled[crtc] = 0;
+	dev->last_vblank[crtc] = dev->driver->get_vblank_counter(dev, crtc);
+	spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
+}
+EXPORT_SYMBOL(drm_vblank_off);
+
 /**
  * drm_vblank_pre_modeset - account for vblanks across mode sets
  * @dev: DRM device
diff -Nur linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c linux-2.6.31.noarch~/drivers/gpu/drm/i915/intel_display.c
--- linux-2.6.31.noarch/drivers/gpu/drm/i915/intel_display.c	2009-11-30 14:08:56.000000000 -0500
+++ linux-2.6.31.noarch~/drivers/gpu/drm/i915/intel_display.c	2009-11-30 14:08:23.000000000 -0500
@@ -1599,6 +1599,7 @@
 		intel_update_watermarks(dev);
 		/* Give the overlay scaler a chance to disable if it's on this pipe */
 		//intel_crtc_dpms_video(crtc, FALSE); TODO
+		drm_vblank_off(dev, pipe);
 
 		/* Disable the VGA plane that we never use */
 		i915_disable_vga(dev);
diff -Nur linux-2.6.31.noarch/include/drm/drmP.h linux-2.6.31.noarch~/include/drm/drmP.h
--- linux-2.6.31.noarch/include/drm/drmP.h	2009-11-30 14:08:56.000000000 -0500
+++ linux-2.6.31.noarch~/include/drm/drmP.h	2009-11-30 14:08:23.000000000 -0500
@@ -1295,6 +1295,7 @@
 extern void drm_handle_vblank(struct drm_device *dev, int crtc);
 extern int drm_vblank_get(struct drm_device *dev, int crtc);
 extern void drm_vblank_put(struct drm_device *dev, int crtc);
+extern void drm_vblank_off(struct drm_device *dev, int crtc);
 extern void drm_vblank_cleanup(struct drm_device *dev);
 /* Modesetting support */
 extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);

drm-i915-fix-tvmode-oops.patch:
 intel_tv.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

--- NEW FILE drm-i915-fix-tvmode-oops.patch ---
From: Chris Wilson <chris at chris-wilson.co.uk>
To: stable at kernel.org
Cc: Chris Wilson <chris at chris-wilson.co.uk>, David Woodhouse <dwmw2 at infradead.org>, Zhenyu Wang <zhenyu.z.wang at intel.com>
Subject: [PATCH] drm/i915: Avoid NULL dereference with component_only tv_modes
Date: Fri, 27 Nov 2009 14:22:04 +0000
Message-Id: <1259331724-6646-1-git-send-email-chris at chris-wilson.co.uk>

In commit d2d9f2324, the guard for a valid video mode was removed. This
caused the regression:

  kernel crash during kms graphic boot on Intel GM4500 platform
  https://bugzilla.redhat.com/show_bug.cgi?id=540218

This patches changes the logic slightly not to rely on a coupled
variable, but to just check whether the video_modes is valid before
dereferencing.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Zhenyu Wang <zhenyu.z.wang at intel.com>
[ickle: Actually reference the correct bug report]
---
 drivers/gpu/drm/i915/intel_tv.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index a0e4bc4..d7465ca 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1213,20 +1213,17 @@ intel_tv_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
 		tv_ctl |= TV_TRILEVEL_SYNC;
 	if (tv_mode->pal_burst)
 		tv_ctl |= TV_PAL_BURST;
+
 	scctl1 = 0;
-	/* dda1 implies valid video levels */
-	if (tv_mode->dda1_inc) {
+	if (tv_mode->dda1_inc)
 		scctl1 |= TV_SC_DDA1_EN;
-	}
-
 	if (tv_mode->dda2_inc)
 		scctl1 |= TV_SC_DDA2_EN;
-
 	if (tv_mode->dda3_inc)
 		scctl1 |= TV_SC_DDA3_EN;
-
 	scctl1 |= tv_mode->sc_reset;
-	scctl1 |= video_levels->burst << TV_BURST_LEVEL_SHIFT;
+	if (video_levels)
+		scctl1 |= video_levels->burst << TV_BURST_LEVEL_SHIFT;
 	scctl1 |= tv_mode->dda1_inc << TV_SCDDA1_INC_SHIFT;
 
 	scctl2 = tv_mode->dda2_size << TV_SCDDA2_SIZE_SHIFT |
-- 
1.6.5.3



drm-next-b390f944.patch:
 b/drivers/gpu/drm/Kconfig                         |   18 
 b/drivers/gpu/drm/Makefile                        |    8 
 b/drivers/gpu/drm/drm_bufs.c                      |    4 
 b/drivers/gpu/drm/drm_cache.c                     |   46 
 b/drivers/gpu/drm/drm_crtc.c                      |   78 
 b/drivers/gpu/drm/drm_crtc_helper.c               |  308 
 b/drivers/gpu/drm/drm_drv.c                       |    4 
 b/drivers/gpu/drm/drm_edid.c                      |  557 
 b/drivers/gpu/drm/drm_encoder_slave.c             |  116 
 b/drivers/gpu/drm/drm_fb_helper.c                 | 1030 
 b/drivers/gpu/drm/drm_gem.c                       |   13 
 b/drivers/gpu/drm/drm_mm.c                        |   30 
 b/drivers/gpu/drm/drm_modes.c                     |  434 
 b/drivers/gpu/drm/drm_proc.c                      |   17 
 b/drivers/gpu/drm/drm_sysfs.c                     |   28 
 b/drivers/gpu/drm/i915/Makefile                   |    2 
 b/drivers/gpu/drm/i915/i915_debugfs.c             |  445 
 b/drivers/gpu/drm/i915/i915_dma.c                 |  100 
 b/drivers/gpu/drm/i915/i915_drv.c                 |    9 
 b/drivers/gpu/drm/i915/i915_drv.h                 |   62 
 b/drivers/gpu/drm/i915/i915_gem.c                 |   14 
 b/drivers/gpu/drm/i915/i915_gem_tiling.c          |   65 
 b/drivers/gpu/drm/i915/i915_irq.c                 |   21 
 b/drivers/gpu/drm/i915/i915_reg.h                 |  139 
 b/drivers/gpu/drm/i915/i915_suspend.c             |    4 
 b/drivers/gpu/drm/i915/intel_bios.c               |    8 
 b/drivers/gpu/drm/i915/intel_crt.c                |   28 
 b/drivers/gpu/drm/i915/intel_display.c            |  608 
 b/drivers/gpu/drm/i915/intel_drv.h                |    9 
 b/drivers/gpu/drm/i915/intel_fb.c                 |  748 
 b/drivers/gpu/drm/i915/intel_i2c.c                |    8 
 b/drivers/gpu/drm/i915/intel_lvds.c               |   22 
 b/drivers/gpu/drm/i915/intel_sdvo.c               |  239 
 b/drivers/gpu/drm/i915/intel_tv.c                 |   30 
 b/drivers/gpu/drm/mga/mga_dma.c                   |    4 
 b/drivers/gpu/drm/mga/mga_drv.h                   |    1 
 b/drivers/gpu/drm/mga/mga_warp.c                  |  180 
 b/drivers/gpu/drm/r128/r128_cce.c                 |  116 
 b/drivers/gpu/drm/r128/r128_drv.h                 |    8 
 b/drivers/gpu/drm/r128/r128_state.c               |   36 
 b/drivers/gpu/drm/radeon/.gitignore               |    3 
 b/drivers/gpu/drm/radeon/Kconfig                  |    1 
 b/drivers/gpu/drm/radeon/Makefile                 |   43 
 b/drivers/gpu/drm/radeon/atom.c                   |    1 
 b/drivers/gpu/drm/radeon/atombios.h               |   13 
 b/drivers/gpu/drm/radeon/atombios_crtc.c          |  366 
 b/drivers/gpu/drm/radeon/avivod.h                 |   60 
 b/drivers/gpu/drm/radeon/mkregtable.c             |  720 
 b/drivers/gpu/drm/radeon/r100.c                   | 1768 +
 b/drivers/gpu/drm/radeon/r100_track.h             |  183 
 b/drivers/gpu/drm/radeon/r100d.h                  |  714 
 b/drivers/gpu/drm/radeon/r200.c                   |  454 
 b/drivers/gpu/drm/radeon/r300.c                   |  985 
 b/drivers/gpu/drm/radeon/r300d.h                  |  306 
 b/drivers/gpu/drm/radeon/r420.c                   |  305 
 b/drivers/gpu/drm/radeon/r420d.h                  |  249 
 b/drivers/gpu/drm/radeon/r500_reg.h               |   12 
 b/drivers/gpu/drm/radeon/r520.c                   |  286 
 b/drivers/gpu/drm/radeon/r520d.h                  |  187 
 b/drivers/gpu/drm/radeon/r600.c                   | 1847 +
 b/drivers/gpu/drm/radeon/r600_blit.c              |  858 
 b/drivers/gpu/drm/radeon/r600_blit_kms.c          |  805 
 b/drivers/gpu/drm/radeon/r600_blit_shaders.c      | 1072 +
 b/drivers/gpu/drm/radeon/r600_blit_shaders.h      |   14 
 b/drivers/gpu/drm/radeon/r600_cp.c                |  541 
 b/drivers/gpu/drm/radeon/r600_cs.c                |  783 
 b/drivers/gpu/drm/radeon/r600d.h                  |  667 
 b/drivers/gpu/drm/radeon/radeon.h                 |  454 
 b/drivers/gpu/drm/radeon/radeon_agp.c             |   12 
 b/drivers/gpu/drm/radeon/radeon_asic.h            |  386 
 b/drivers/gpu/drm/radeon/radeon_atombios.c        |  434 
 b/drivers/gpu/drm/radeon/radeon_benchmark.c       |    4 
 b/drivers/gpu/drm/radeon/radeon_bios.c            |   46 
 b/drivers/gpu/drm/radeon/radeon_clocks.c          |   28 
 b/drivers/gpu/drm/radeon/radeon_combios.c         |  717 
 b/drivers/gpu/drm/radeon/radeon_connectors.c      |  751 
 b/drivers/gpu/drm/radeon/radeon_cp.c              |  151 
 b/drivers/gpu/drm/radeon/radeon_cs.c              |  104 
 b/drivers/gpu/drm/radeon/radeon_cursor.c          |   10 
 b/drivers/gpu/drm/radeon/radeon_device.c          |  352 
 b/drivers/gpu/drm/radeon/radeon_display.c         |  193 
 b/drivers/gpu/drm/radeon/radeon_drv.c             |   28 
 b/drivers/gpu/drm/radeon/radeon_drv.h             |  216 
 b/drivers/gpu/drm/radeon/radeon_encoders.c        |  309 
 b/drivers/gpu/drm/radeon/radeon_family.h          |   97 
 b/drivers/gpu/drm/radeon/radeon_fb.c              |  701 
 b/drivers/gpu/drm/radeon/radeon_fence.c           |   49 
 b/drivers/gpu/drm/radeon/radeon_gart.c            |   29 
 b/drivers/gpu/drm/radeon/radeon_gem.c             |   10 
 b/drivers/gpu/drm/radeon/radeon_i2c.c             |  109 
 b/drivers/gpu/drm/radeon/radeon_ioc32.c           |   15 
 b/drivers/gpu/drm/radeon/radeon_irq.c             |   18 
 b/drivers/gpu/drm/radeon/radeon_irq_kms.c         |   16 
 b/drivers/gpu/drm/radeon/radeon_kms.c             |   74 
 b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c     |  152 
 b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c |  505 
 b/drivers/gpu/drm/radeon/radeon_legacy_tv.c       |  904 
 b/drivers/gpu/drm/radeon/radeon_mode.h            |  170 
 b/drivers/gpu/drm/radeon/radeon_object.c          |   28 
 b/drivers/gpu/drm/radeon/radeon_object.h          |    1 
 b/drivers/gpu/drm/radeon/radeon_pm.c              |   65 
 b/drivers/gpu/drm/radeon/radeon_reg.h             |  126 
 b/drivers/gpu/drm/radeon/radeon_ring.c            |  143 
 b/drivers/gpu/drm/radeon/radeon_state.c           |   23 
 b/drivers/gpu/drm/radeon/radeon_test.c            |    6 
 b/drivers/gpu/drm/radeon/radeon_ttm.c             |  101 
 b/drivers/gpu/drm/radeon/reg_srcs/r100            |  105 
 b/drivers/gpu/drm/radeon/reg_srcs/r200            |  184 
 b/drivers/gpu/drm/radeon/reg_srcs/r300            |  729 
 b/drivers/gpu/drm/radeon/reg_srcs/rn50            |   30 
 b/drivers/gpu/drm/radeon/reg_srcs/rs600           |  729 
 b/drivers/gpu/drm/radeon/reg_srcs/rv515           |  486 
 b/drivers/gpu/drm/radeon/rs100d.h                 |   40 
 b/drivers/gpu/drm/radeon/rs400.c                  |  331 
 b/drivers/gpu/drm/radeon/rs400d.h                 |  160 
 b/drivers/gpu/drm/radeon/rs600.c                  |  610 
 b/drivers/gpu/drm/radeon/rs600d.h                 |  470 
 b/drivers/gpu/drm/radeon/rs690.c                  |  359 
 b/drivers/gpu/drm/radeon/rs690d.h                 |  307 
 b/drivers/gpu/drm/radeon/rv200d.h                 |   36 
 b/drivers/gpu/drm/radeon/rv250d.h                 |  123 
 b/drivers/gpu/drm/radeon/rv350d.h                 |   52 
 b/drivers/gpu/drm/radeon/rv515.c                  |  882 
 b/drivers/gpu/drm/radeon/rv515d.h                 |  603 
 b/drivers/gpu/drm/radeon/rv770.c                  | 1063 -
 b/drivers/gpu/drm/radeon/rv770d.h                 |  346 
 b/drivers/gpu/drm/ttm/ttm_bo.c                    |  295 
 b/drivers/gpu/drm/ttm/ttm_bo_util.c               |    4 
 b/drivers/gpu/drm/ttm/ttm_global.c                |    6 
 b/drivers/gpu/drm/ttm/ttm_memory.c                |  508 
 b/drivers/gpu/drm/ttm/ttm_module.c                |   58 
 b/drivers/gpu/drm/ttm/ttm_tt.c                    |  105 
 b/drivers/video/fbmem.c                           |    2 
 b/firmware/Makefile                               |   16 
 b/firmware/WHENCE                                 |  121 
 b/firmware/matrox/g200_warp.H16                   |   28 
 b/firmware/matrox/g400_warp.H16                   |   44 
 b/firmware/r128/r128_cce.bin.ihex                 |  129 
 b/firmware/radeon/R100_cp.bin.ihex                |  130 
 b/firmware/radeon/R200_cp.bin.ihex                |  130 
 b/firmware/radeon/R300_cp.bin.ihex                |  130 
 b/firmware/radeon/R420_cp.bin.ihex                |  130 
 b/firmware/radeon/R520_cp.bin.ihex                |  130 
 b/firmware/radeon/R600_me.bin.ihex                | 1345 +
 b/firmware/radeon/R600_pfp.bin.ihex               |  145 
 b/firmware/radeon/RS600_cp.bin.ihex               |  130 
 b/firmware/radeon/RS690_cp.bin.ihex               |  130 
 b/firmware/radeon/RS780_me.bin.ihex               | 1345 +
 b/firmware/radeon/RS780_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV610_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV610_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV620_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV620_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV630_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV630_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV635_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV635_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV670_me.bin.ihex               | 1345 +
 b/firmware/radeon/RV670_pfp.bin.ihex              |  145 
 b/firmware/radeon/RV710_me.bin.ihex               |  341 
 b/firmware/radeon/RV710_pfp.bin.ihex              |  213 
 b/firmware/radeon/RV730_me.bin.ihex               |  341 
 b/firmware/radeon/RV730_pfp.bin.ihex              |  213 
 b/firmware/radeon/RV770_me.bin.ihex               |  341 
 b/firmware/radeon/RV770_pfp.bin.ihex              |  213 
 b/include/drm/drmP.h                              |   54 
 b/include/drm/drm_cache.h                         |   38 
 b/include/drm/drm_crtc.h                          |   28 
 b/include/drm/drm_crtc_helper.h                   |   10 
 b/include/drm/drm_encoder_slave.h                 |  162 
 b/include/drm/drm_fb_helper.h                     |  111 
 b/include/drm/drm_mm.h                            |    7 
 b/include/drm/drm_mode.h                          |   11 
 b/include/drm/drm_pciids.h                        |    4 
 b/include/drm/drm_sysfs.h                         |   12 
 b/include/drm/radeon_drm.h                        |   12 
 b/include/drm/ttm/ttm_bo_api.h                    |   13 
 b/include/drm/ttm/ttm_bo_driver.h                 |   94 
 b/include/drm/ttm/ttm_memory.h                    |   43 
 b/include/drm/ttm/ttm_module.h                    |    2 
 drivers/gpu/drm/i915/i915_gem_debugfs.c           |  396 
 drivers/gpu/drm/mga/mga_ucode.h                   |11645 ----------
 drivers/gpu/drm/radeon/r300.h                     |   36 
 drivers/gpu/drm/radeon/r600_microcode.h           |23297 ----------------------
 drivers/gpu/drm/radeon/radeon_microcode.h         | 1844 -
 drivers/gpu/drm/radeon/radeon_share.h             |   39 
 drivers/gpu/drm/radeon/rs690r.h                   |   99 
 drivers/gpu/drm/radeon/rs780.c                    |  102 
 drivers/gpu/drm/radeon/rv515r.h                   |  170 
 189 files changed, 42507 insertions(+), 44062 deletions(-)

--- NEW FILE drm-next-b390f944.patch ---
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 39b393d..e4d971c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -18,6 +18,14 @@ menuconfig DRM
 	  details.  You should also select and configure AGP
 	  (/dev/agpgart) support.
 
+config DRM_KMS_HELPER
+	tristate
+	depends on DRM
+	select FB
+	select FRAMEBUFFER_CONSOLE if !EMBEDDED
+	help
+	  FB and CRTC helpers for KMS drivers.
+
 config DRM_TTM
 	tristate
 	depends on DRM
@@ -36,6 +44,7 @@ config DRM_TDFX
 config DRM_R128
 	tristate "ATI Rage 128"
 	depends on DRM && PCI
+	select FW_LOADER
 	help
 	  Choose this option if you have an ATI Rage 128 graphics card.  If M
 	  is selected, the module will be called r128.  AGP support for
@@ -47,8 +56,9 @@ config DRM_RADEON
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select FB
-	select FRAMEBUFFER_CONSOLE if !EMBEDDED
+	select FW_LOADER
+        select DRM_KMS_HELPER
+        select DRM_TTM
 	help
 	  Choose this option if you have an ATI Radeon graphics card.  There
 	  are both PCI and AGP versions.  You don't need to choose this to
@@ -82,11 +92,10 @@ config DRM_I830
 config DRM_I915
 	tristate "i915 driver"
 	depends on AGP_INTEL
+	select DRM_KMS_HELPER
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select FB
-	select FRAMEBUFFER_CONSOLE if !EMBEDDED
 	# i915 depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
 	select VIDEO_OUTPUT_CONTROL if ACPI
@@ -116,6 +125,7 @@ endchoice
 config DRM_MGA
 	tristate "Matrox g200/g400"
 	depends on DRM
+	select FW_LOADER
 	help
 	  Choose this option if you have a Matrox G200, G400 or G450 graphics
 	  card.  If M is selected, the module will be called mga.  AGP
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index fe23f29..3c8827a 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -10,11 +10,15 @@ drm-y       :=	drm_auth.o drm_bufs.o drm_cache.o \
 		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
 		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
 		drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
-		drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o \
-		drm_info.o drm_debugfs.o
+		drm_crtc.o drm_modes.o drm_edid.o \
+		drm_info.o drm_debugfs.o drm_encoder_slave.o
 
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 
+drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o
+
+obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
+
 obj-$(CONFIG_DRM)	+= drm.o
 obj-$(CONFIG_DRM_TTM)	+= ttm/
 obj-$(CONFIG_DRM_TDFX)	+= tdfx/
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 6246e3f..3d09e30 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -310,10 +310,10 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
 			  (unsigned long long)map->offset, map->size);
 
 		break;
+	}
 	case _DRM_GEM:
-		DRM_ERROR("tried to rmmap GEM object\n");
+		DRM_ERROR("tried to addmap GEM object\n");
 		break;
-	}
 	case _DRM_SCATTER_GATHER:
 		if (!dev->sg) {
 			kfree(map);
diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 0e994a0..0e3bd5b 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -45,6 +45,23 @@ drm_clflush_page(struct page *page)
 		clflush(page_virtual + i);
 	kunmap_atomic(page_virtual, KM_USER0);
 }
+
+static void drm_cache_flush_clflush(struct page *pages[],
+				    unsigned long num_pages)
+{
+	unsigned long i;
+
+	mb();
+	for (i = 0; i < num_pages; i++)
+		drm_clflush_page(*pages++);
+	mb();
+}
+
+static void
+drm_clflush_ipi_handler(void *null)
+{
+	wbinvd();
+}
 #endif
 
 void
@@ -53,17 +70,30 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
 
 #if defined(CONFIG_X86)
 	if (cpu_has_clflush) {
-		unsigned long i;
-
-		mb();
-		for (i = 0; i < num_pages; ++i)
-			drm_clflush_page(*pages++);
-		mb();
-
+		drm_cache_flush_clflush(pages, num_pages);
 		return;
 	}
 
-	wbinvd();
+	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
+		printk(KERN_ERR "Timed out waiting for cache flush.\n");
+
+#elif defined(__powerpc__)
+	unsigned long i;
+	for (i = 0; i < num_pages; i++) {
+		struct page *page = pages[i];
+		void *page_virtual;
+
+		if (unlikely(page == NULL))
+			continue;
+
+		page_virtual = kmap_atomic(page, KM_USER0);
+		flush_dcache_range((unsigned long)page_virtual,
+				   (unsigned long)page_virtual + PAGE_SIZE);
+		kunmap_atomic(page_virtual, KM_USER0);
+	}
+#else
+	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
+	WARN_ON_ONCE(1);
 #endif
 }
 EXPORT_SYMBOL(drm_clflush_pages);
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2f631c7..5cae0b3 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
  */
 static struct drm_prop_enum_list drm_scaling_mode_enum_list[] =
 {
-	{ DRM_MODE_SCALE_NON_GPU, "Non-GPU" },
-	{ DRM_MODE_SCALE_FULLSCREEN, "Fullscreen" },
-	{ DRM_MODE_SCALE_NO_SCALE, "No scale" },
-	{ DRM_MODE_SCALE_ASPECT, "Aspect" },
+	{ DRM_MODE_SCALE_NONE, "None" },
+	{ DRM_MODE_SCALE_FULLSCREEN, "Full" },
+	{ DRM_MODE_SCALE_CENTER, "Center" },
+	{ DRM_MODE_SCALE_ASPECT, "Full aspect" },
 };
 
 static struct drm_prop_enum_list drm_dithering_mode_enum_list[] =
@@ -108,6 +108,7 @@ static struct drm_prop_enum_list drm_tv_select_enum_list[] =
 	{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_SVIDEO,    "SVIDEO"    }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
+	{ DRM_MODE_SUBCONNECTOR_SCART,     "SCART"     }, /* TV-out */
 };
 
 DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list)
@@ -118,6 +119,7 @@ static struct drm_prop_enum_list drm_tv_subconnector_enum_list[] =
 	{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_SVIDEO,    "SVIDEO"    }, /* TV-out */
 	{ DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
+	{ DRM_MODE_SUBCONNECTOR_SCART,     "SCART"     }, /* TV-out */
 };
[...95922 lines suppressed...]
+ */
+
+struct ttm_bo_global {
+
+	/**
+	 * Constant after init.
+	 */
+
+	struct kobject kobj;
+	struct ttm_mem_global *mem_glob;
+	struct page *dummy_read_page;
+	struct ttm_mem_shrink shrink;
+	size_t ttm_bo_extra_size;
+	size_t ttm_bo_size;
+	struct mutex device_list_mutex;
+	spinlock_t lru_lock;
+
+	/**
+	 * Protected by device_list_mutex.
+	 */
+	struct list_head device_list;
+
+	/**
+	 * Protected by the lru_lock.
+	 */
+	struct list_head swap_lru;
+
+	/**
+	 * Internal protection.
+	 */
+	atomic_t bo_count;
+};
+
+
+#define TTM_NUM_MEM_TYPES 8
+
+#define TTM_BO_PRIV_FLAG_MOVING  0	/* Buffer object is moving and needs
+					   idling before CPU mapping */
+#define TTM_BO_PRIV_FLAG_MAX 1
+/**
+ * struct ttm_bo_device - Buffer object driver device-specific data.
+ *
+ * @driver: Pointer to a struct ttm_bo_driver struct setup by the driver.
  * @man: An array of mem_type_managers.
  * @addr_space_mm: Range manager for the device address space.
  * lru_lock: Spinlock that protects the buffer+device lru lists and
@@ -399,32 +449,21 @@ struct ttm_bo_device {
 	/*
 	 * Constant after bo device init / atomic.
 	 */
-
-	struct ttm_mem_global *mem_glob;
+	struct list_head device_list;
+	struct ttm_bo_global *glob;
 	struct ttm_bo_driver *driver;
-	struct page *dummy_read_page;
-	struct ttm_mem_shrink shrink;
-
-	size_t ttm_bo_extra_size;
-	size_t ttm_bo_size;
-
 	rwlock_t vm_lock;
+	struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
 	/*
 	 * Protected by the vm lock.
 	 */
-	struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
 	struct rb_root addr_space_rb;
 	struct drm_mm addr_space_mm;
 
 	/*
-	 * Might want to change this to one lock per manager.
-	 */
-	spinlock_t lru_lock;
-	/*
-	 * Protected by the lru lock.
+	 * Protected by the global:lru lock.
 	 */
 	struct list_head ddestroy;
-	struct list_head swap_lru;
 
 	/*
 	 * Protected by load / firstopen / lastclose /unload sync.
@@ -640,6 +679,9 @@ extern int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
 			     unsigned long *bus_offset,
 			     unsigned long *bus_size);
 
+extern void ttm_bo_global_release(struct ttm_global_reference *ref);
+extern int ttm_bo_global_init(struct ttm_global_reference *ref);
+
 extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
 
 /**
@@ -657,7 +699,7 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
  * !0: Failure.
  */
 extern int ttm_bo_device_init(struct ttm_bo_device *bdev,
-			      struct ttm_mem_global *mem_glob,
+			      struct ttm_bo_global *glob,
 			      struct ttm_bo_driver *driver,
 			      uint64_t file_page_offset, bool need_dma32);
 
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index d8b8f04..6983a7c 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -32,6 +32,7 @@
 #include <linux/spinlock.h>
 #include <linux/wait.h>
 #include <linux/errno.h>
+#include <linux/kobject.h>
 
 /**
  * struct ttm_mem_shrink - callback to shrink TTM memory usage.
@@ -60,34 +61,33 @@ struct ttm_mem_shrink {
  * @queue: Wait queue for processes suspended waiting for memory.
  * @lock: Lock to protect the @shrink - and the memory accounting members,
  * that is, essentially the whole structure with some exceptions.
- * @emer_memory: Lowmem memory limit available for root.
- * @max_memory: Lowmem memory limit available for non-root.
- * @swap_limit: Lowmem memory limit where the shrink workqueue kicks in.
- * @used_memory: Currently used lowmem memory.
- * @used_total_memory: Currently used total (lowmem + highmem) memory.
- * @total_memory_swap_limit: Total memory limit where the shrink workqueue
- * kicks in.
- * @max_total_memory: Total memory available to non-root processes.
- * @emer_total_memory: Total memory available to root processes.
+ * @zones: Array of pointers to accounting zones.
+ * @num_zones: Number of populated entries in the @zones array.
+ * @zone_kernel: Pointer to the kernel zone.
+ * @zone_highmem: Pointer to the highmem zone if there is one.
+ * @zone_dma32: Pointer to the dma32 zone if there is one.
  *
  * Note that this structure is not per device. It should be global for all
  * graphics devices.
  */
 
+#define TTM_MEM_MAX_ZONES 2
+struct ttm_mem_zone;
 struct ttm_mem_global {
+	struct kobject kobj;
 	struct ttm_mem_shrink *shrink;
 	struct workqueue_struct *swap_queue;
 	struct work_struct work;
 	wait_queue_head_t queue;
 	spinlock_t lock;
-	uint64_t emer_memory;
-	uint64_t max_memory;
-	uint64_t swap_limit;
-	uint64_t used_memory;
-	uint64_t used_total_memory;
-	uint64_t total_memory_swap_limit;
-	uint64_t max_total_memory;
-	uint64_t emer_total_memory;
+	struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES];
+	unsigned int num_zones;
+	struct ttm_mem_zone *zone_kernel;
+#ifdef CONFIG_HIGHMEM
+	struct ttm_mem_zone *zone_highmem;
+#else
+	struct ttm_mem_zone *zone_dma32;
+#endif
 };
 
 /**
@@ -146,8 +146,13 @@ static inline void ttm_mem_unregister_shrink(struct ttm_mem_global *glob,
 extern int ttm_mem_global_init(struct ttm_mem_global *glob);
 extern void ttm_mem_global_release(struct ttm_mem_global *glob);
 extern int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory,
-				bool no_wait, bool interruptible, bool himem);
+				bool no_wait, bool interruptible);
 extern void ttm_mem_global_free(struct ttm_mem_global *glob,
-				uint64_t amount, bool himem);
+				uint64_t amount);
+extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
+				     struct page *page,
+				     bool no_wait, bool interruptible);
+extern void ttm_mem_global_free_page(struct ttm_mem_global *glob,
+				     struct page *page);
 extern size_t ttm_round_pot(size_t size);
 #endif
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h
index d1d4338..cf416ae 100644
--- a/include/drm/ttm/ttm_module.h
+++ b/include/drm/ttm/ttm_module.h
@@ -32,6 +32,7 @@
 #define _TTM_MODULE_H_
 
 #include <linux/kernel.h>
+struct kobject;
 
 #define TTM_PFX "[TTM] "
 
@@ -54,5 +55,6 @@ extern void ttm_global_init(void);
 extern void ttm_global_release(void);
 extern int ttm_global_item_ref(struct ttm_global_reference *ref);
 extern void ttm_global_item_unref(struct ttm_global_reference *ref);
+extern struct kobject *ttm_get_kobj(void);
 
 #endif /* _TTM_MODULE_H_ */

drm-radeon-misc-fixes.patch:
 b/drivers/gpu/drm/radeon/radeon_connectors.c  |    6 ++++++
 b/drivers/gpu/drm/radeon/radeon_encoders.c    |    4 ++--
 b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |   11 ++++-------
 drivers/gpu/drm/radeon/radeon_legacy_crtc.c   |   23 ++++++++++++-----------
 4 files changed, 24 insertions(+), 20 deletions(-)

--- NEW FILE drm-radeon-misc-fixes.patch ---
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index ec2f3ff..7ab3c50 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1053,6 +1053,9 @@ radeon_add_atom_connector(struct drm_device *dev,
 			drm_connector_attach_property(&radeon_connector->base,
 						      rdev->mode_info.load_detect_property,
 						      1);
+			drm_connector_attach_property(&radeon_connector->base,
+						      rdev->mode_info.tv_std_property,
+						      1);
 		}
 		break;
 	case DRM_MODE_CONNECTOR_LVDS:
@@ -1193,6 +1196,9 @@ radeon_add_legacy_connector(struct drm_device *dev,
 			drm_connector_attach_property(&radeon_connector->base,
 						      rdev->mode_info.load_detect_property,
 						      1);
+			drm_connector_attach_property(&radeon_connector->base,
+						      rdev->mode_info.tv_std_property,
+						      1);
 		}
 		break;
 	case DRM_MODE_CONNECTOR_LVDS:
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index c27f6bd..291f6dd 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -950,12 +950,12 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
 	if (is_dig) {
 		switch (mode) {
 		case DRM_MODE_DPMS_ON:
-			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE);
+			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT);
 			break;
 		case DRM_MODE_DPMS_STANDBY:
 		case DRM_MODE_DPMS_SUSPEND:
 		case DRM_MODE_DPMS_OFF:
-			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE);
+			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT);
 			break;
 		}
 	} else {
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index 6634769..c5c5c02 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -647,12 +647,8 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod
 		uint32_t crtc2_gen_cntl;
 		uint32_t disp2_merge_cntl;
 
-		/* check to see if TV DAC is enabled for another crtc and keep it enabled */
-		if (RREG32(RADEON_CRTC2_GEN_CNTL) & RADEON_CRTC2_CRT2_ON)
-			crtc2_gen_cntl = RADEON_CRTC2_CRT2_ON;
-		else
-			crtc2_gen_cntl = 0;
-
+		/* if TV DAC is enabled for another crtc and keep it enabled */
+		crtc2_gen_cntl = RREG32(RADEON_CRTC2_GEN_CNTL) & 0x00718080;
 		crtc2_gen_cntl |= ((format << 8)
 				   | RADEON_CRTC2_VSYNC_DIS
 				   | RADEON_CRTC2_HSYNC_DIS
@@ -681,7 +677,8 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod
 		uint32_t crtc_ext_cntl;
 		uint32_t disp_merge_cntl;
 
-		crtc_gen_cntl = (RADEON_CRTC_EXT_DISP_EN
+		crtc_gen_cntl = RREG32(RADEON_CRTC_GEN_CNTL) & 0x00718000;
+		crtc_gen_cntl |= (RADEON_CRTC_EXT_DISP_EN
 				 | (format << 8)
 				 | RADEON_CRTC_DISP_REQ_EN_B
 				 | ((mode->flags & DRM_MODE_FLAG_DBLSCAN)
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index c1e1706..6f3ff8b 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -796,18 +796,20 @@ static void radeon_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
 			if (encoder->encoder_type != DRM_MODE_ENCODER_DAC)
 				pll_flags |= RADEON_PLL_NO_ODD_POST_DIV;
 			if (encoder->encoder_type == DRM_MODE_ENCODER_LVDS) {
-				struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
-				struct radeon_encoder_lvds *lvds = (struct radeon_encoder_lvds *)radeon_encoder->enc_priv;
-				if (lvds) {
-					if (lvds->use_bios_dividers) {
-						pll_ref_div = lvds->panel_ref_divider;
-						pll_fb_post_div   = (lvds->panel_fb_divider |
-								     (lvds->panel_post_divider << 16));
-						htotal_cntl  = 0;
-						use_bios_divs = true;
+				if (!rdev->is_atom_bios) {
+					struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
+					struct radeon_encoder_lvds *lvds = (struct radeon_encoder_lvds *)radeon_encoder->enc_priv;
+					if (lvds) {
+						if (lvds->use_bios_dividers) {
+							pll_ref_div = lvds->panel_ref_divider;
+							pll_fb_post_div   = (lvds->panel_fb_divider |
+									     (lvds->panel_post_divider << 16));
+							htotal_cntl  = 0;
+							use_bios_divs = true;
+						}
 					}
+					pll_flags |= RADEON_PLL_USE_REF_DIV;
 				}
-				pll_flags |= RADEON_PLL_USE_REF_DIV;
 			}
 		}
 	}
-- 
1.5.6.3


drm-radeon-rv410-test-fix.patch:
 atombios_crtc.c          |    4 ----
 radeon_legacy_encoders.c |    4 ----
 2 files changed, 8 deletions(-)

--- NEW FILE drm-radeon-rv410-test-fix.patch ---
>From 5eecd2f0071edd335977b1ce15fd73b804f17e3c Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher at gmail.com>
Date: Wed, 2 Dec 2009 17:56:41 -0500
Subject: [PATCH] drm/radeon/kms: further r4xx lvds fixes

- Let the driver calculate the ref div
- Use the driver programmed pll dividers

Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c          |    4 ----
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c |    3 ---
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 89ac438..7a8cd93 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -457,10 +457,6 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
 				if (encoder->encoder_type !=
 				    DRM_MODE_ENCODER_DAC)
 					pll_flags |= RADEON_PLL_NO_ODD_POST_DIV;
-				if (!ASIC_IS_AVIVO(rdev)
-				    && (encoder->encoder_type ==
-					DRM_MODE_ENCODER_LVDS))
-					pll_flags |= RADEON_PLL_USE_REF_DIV;
 			}
 			radeon_encoder = to_radeon_encoder(encoder);
 			break;
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index df00515..7c7c009 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -181,9 +181,6 @@ static void radeon_legacy_lvds_mode_set(struct drm_encoder *encoder,
 	WREG32(RADEON_LVDS_PLL_CNTL, lvds_pll_cntl);
 	WREG32(RADEON_LVDS_SS_GEN_CNTL, lvds_ss_gen_cntl);
 
-	if (rdev->family == CHIP_RV410)
-		WREG32(RADEON_CLOCK_CNTL_INDEX, 0);
-
 	if (rdev->is_atom_bios)
 		radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id);
 	else
-- 
1.5.6.3


ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch:
 ioctl.c       |   33 ++++++++++++++++++++-------------
 move_extent.c |    7 +++++++
 2 files changed, 27 insertions(+), 13 deletions(-)

--- NEW FILE ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch ---
>From 910123ba363623f15ffb5d05dd87bdf06d08c609 Mon Sep 17 00:00:00 2001
From: Akira Fujita <a-fujita at rs.jp.nec.com>
Date: Sun, 6 Dec 2009 23:38:31 -0500
Subject: [PATCH] ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT

This patch fixes three problems in the handling of the
EXT4_IOC_MOVE_EXT ioctl:

1. In current EXT4_IOC_MOVE_EXT, there are read access mode checks for
original and donor files, but they allow the illegal write access to
donor file, since donor file is overwritten by original file data.  To
fix this problem, change access mode checks of original (r->r/w) and
donor (r->w) files.

2.  Disallow the use of donor files that have a setuid or setgid bits.

3.  Call mnt_want_write() and mnt_drop_write() before and after
ext4_move_extents() calling to get write access to a mount.

Signed-off-by: Akira Fujita <a-fujita at rs.jp.nec.com>
Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
---

 fs/ext4/ioctl.c       |   28 ++++++++++++++++++----------
 fs/ext4/move_extent.c |    7 +++++++
 2 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7050a9c..f5b1d3c 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -221,32 +221,39 @@ setversion_out:
 		struct file *donor_filp;
 		int err;
 
+		if (!(filp->f_mode & FMODE_READ) ||
+		    !(filp->f_mode & FMODE_WRITE))
+			return -EBADF;
+
 		if (copy_from_user(&me,
 			(struct move_extent __user *)arg, sizeof(me)))
 			return -EFAULT;
+		me.moved_len = 0;
 
 		donor_filp = fget(me.donor_fd);
 		if (!donor_filp)
 			return -EBADF;
 
-		if (!capable(CAP_DAC_OVERRIDE)) {
-			if ((current->real_cred->fsuid != inode->i_uid) ||
-				!(inode->i_mode & S_IRUSR) ||
-				!(donor_filp->f_dentry->d_inode->i_mode &
-				S_IRUSR)) {
-				fput(donor_filp);
-				return -EACCES;
-			}
+		if (!(donor_filp->f_mode & FMODE_WRITE)) {
+			err = -EBADF;
+			goto mext_out;
 		}
 
+		err = mnt_want_write(filp->f_path.mnt);
+		if (err)
+			goto mext_out;
+
 		err = ext4_move_extents(filp, donor_filp, me.orig_start,
 					me.donor_start, me.len, &me.moved_len);
-		fput(donor_filp);
+		mnt_drop_write(filp->f_path.mnt);
+		if (me.moved_len > 0)
+			file_remove_suid(donor_filp);
 
-		if (!err)
-			if (copy_to_user((struct move_extent *)arg,
-				&me, sizeof(me)))
-				return -EFAULT;
+		if (copy_to_user((struct move_extent *)arg, &me, sizeof(me)))
+			err = -EFAULT;
+
+mext_out:
+		fput(donor_filp);
 		return err;
 	}
 
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index bbf2dd9..c5250b5 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -905,6 +905,13 @@ mext_check_arguments(struct inode *orig_inode,
 		return -EINVAL;
 	}
 
+	if (donor_inode->i_mode & (S_ISUID|S_ISGID)) {
+		ext4_debug("ext4 move extent: suid or sgid is set"
+			   " to donor file [ino:orig %lu, donor %lu]\n",
+			   orig_inode->i_ino, donor_inode->i_ino);
+		return -EINVAL;
+	}
+
 	/* Ext4 move extent does not support swapfile */
 	if (IS_SWAPFILE(orig_inode) || IS_SWAPFILE(donor_inode)) {
 		ext4_debug("ext4 move extent: The argument files should "

fbcon-lower-debug.patch:
 fbmem.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE fbcon-lower-debug.patch ---
>From 8a5ab3097defb36df5fc485e38faf288de7e9e1f Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs at redhat.com>
Date: Thu, 19 Nov 2009 10:48:12 +1000
Subject: [PATCH] fbcon: lower debug level of message when kicking generic driver off the hw

---
 drivers/video/fbmem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 750c71f..aa11abf 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1497,7 +1497,7 @@ register_framebuffer(struct fb_info *fb_info)
 
 		if (registered_fb[i]->flags & FBINFO_MISC_FIRMWARE) {
 			if (fb_do_apertures_overlap(registered_fb[i], fb_info)) {
-				printk(KERN_ERR "fb: conflicting fb hw usage "
+				printk(KERN_INFO "fb: conflicting fb hw usage "
 				       "%s vs %s - removing generic driver\n",
 				       fb_info->fix.id,
 				       registered_fb[i]->fix.id);
-- 
1.6.5.2


highmem-fix-arm-powerpc-kmap_types.patch:
 arm/include/asm/kmap_types.h     |    6 ++++++
 powerpc/include/asm/kmap_types.h |    7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

--- NEW FILE highmem-fix-arm-powerpc-kmap_types.patch ---
>From 37197359d55c867af776d4eb941ee143a1667889 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle at ihatethathostname.lab.bos.redhat.com>
Date: Thu, 19 Nov 2009 09:58:45 -0500
Subject: [PATCH] fixes for arm & powerpc kmap types

cribbed from rmk
---
 arch/arm/include/asm/kmap_types.h     |    6 ++++++
 arch/powerpc/include/asm/kmap_types.h |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h
index d16ec97..fc085ba 100644
--- a/arch/arm/include/asm/kmap_types.h
+++ b/arch/arm/include/asm/kmap_types.h
@@ -22,4 +22,10 @@ enum km_type {
 	KM_TYPE_NR
 };
 
+#ifdef CONFIG_DEBUG_HIGHMEM
+#define KM_NMI	(-1)
+#define KM_NMI_PTE	(-1)
+#define KM_IRQ_PTE	(-1)
+#endif
+
 #endif
diff --git a/arch/powerpc/include/asm/kmap_types.h b/arch/powerpc/include/asm/kmap_types.h
index b6bac6f..5e041a8 100644
--- a/arch/powerpc/include/asm/kmap_types.h
+++ b/arch/powerpc/include/asm/kmap_types.h
@@ -29,5 +29,11 @@ enum km_type {
 	KM_TYPE_NR
 };
 
+#ifdef CONFIG_DEBUG_HIGHMEM
+#define KM_NMI	(-1)
+#define KM_NMI_PTE	(-1)
+#define KM_IRQ_PTE	(-1)
+#endif
+
 #endif	/* __KERNEL__ */
 #endif	/* _ASM_POWERPC_KMAP_TYPES_H */
-- 
1.6.5.2


ipv4-fix-null-ptr-deref-in-ip_fragment.patch:
 ip_fragment.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE ipv4-fix-null-ptr-deref-in-ip_fragment.patch ---
From: David Ford <david at blue-labs.org>
Date: Mon, 30 Nov 2009 07:02:22 +0000 (-0800)
Subject: ipv4: additional update of dev_net(dev) to struct *net in ip_fragment.c, NULL ptr... 
X-Git-Tag: v2.6.32~40^2~6
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=bbf31bf18d34caa87dd01f08bf713635593697f2

ipv4: additional update of dev_net(dev) to struct *net in ip_fragment.c, NULL ptr OOPS

ipv4 ip_frag_reasm(), fully replace 'dev_net(dev)' with 'net', defined
previously patched into 2.6.29.

Between 2.6.28.10 and 2.6.29, net/ipv4/ip_fragment.c was patched,
changing from dev_net(dev) to container_of(...).  Unfortunately the goto
section (out_fail) on oversized packets inside ip_frag_reasm() didn't
get touched up as well.  Oversized IP packets cause a NULL pointer
dereference and immediate hang.

I discovered this running openvasd and my previous email on this is
titled:  NULL pointer dereference at 2.6.32-rc8:net/ipv4/ip_fragment.c:566

Signed-off-by: David Ford <david at blue-labs.org>
Signed-off-by: David S. Miller <davem at davemloft.net>
---

diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 575f9bd..d3fe10b 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -563,7 +563,7 @@ out_oversize:
 		printk(KERN_INFO "Oversized IP packet from %pI4.\n",
 			&qp->saddr);
 out_fail:
-	IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMFAILS);
+	IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS);
 	return err;
 }
 

linux-2.6-ath9k-fixes.patch:
 ath9k.h |    3 +++
 hw.c    |   11 ++++++++++-
 hw.h    |    1 +
 mac.c   |   38 ++++++++++++++++++++++++++++++++++++--
 mac.h   |   14 +++++++++++++-
 main.c  |   18 +++++++++++++++++-
 rc.c    |   12 ++++++++----
 reg.h   |   15 ++++++++++++---
 xmit.c  |   26 +++++++++++++++++++++++++-
 9 files changed, 125 insertions(+), 13 deletions(-)

--- NEW FILE linux-2.6-ath9k-fixes.patch ---
Backports of the following commits pending for 2.6.33...

commit f4709fdf683e1ed37b321c258b614ebe39752bf3
Author: Luis R. Rodriguez <lrodriguez at atheros.com>
Date:   Tue Nov 24 21:37:57 2009 -0500

    ath9k: Fix maximum tx fifo settings for single stream devices
    
    Atheros single stream AR9285 and AR9271 have half the PCU TX FIFO
    buffer size of that of dual stream devices. Dual stream devices
    have a max PCU TX FIFO size of 8 KB while single stream devices
    have 4 KB. Single stream devices have an issue though and require
    hardware only to use half of the amount of its capable PCU TX FIFO
    size, 2 KB and this requires a change in software.
    
    Technically a change would not have been required (except for frame
    burst considerations of 128 bytes) if these devices would have been
    able to use the full 4 KB of the PCU TX FIFO size but our systems
    engineers recommend 2 KB to be used only. We enforce this through
    software by reducing the max frame triggger level to 2 KB.
    
    Fixing the max frame trigger level should then have a few benefits:
    
      * The PER will now be adjusted as designed for underruns when the
        max trigger level is reached. This should help alleviate the
        bus as the rate control algorithm chooses a slower rate which
        should ensure frames are transmitted properly under high system
        bus load.
    
      * The poll we use on our TX queues should now trigger and work
        as designed for single stream devices. The hardware passes
        data from each TX queue on the PCU TX FIFO queue respecting each
        queue's priority. The new trigger level ensures this seeding of
        the PCU TX FIFO queue occurs as designed which could mean avoiding
        false resets and actually reseting hw correctly when a TX queue
        is indeed stuck.
    
      * Some undocumented / unsupported behaviour could have been triggered
        when the max trigger level level was being set to 4 KB on single
        stream devices. Its not clear what this issue was to me yet.
    
    Cc: Kyungwan Nam <kyungwan.nam at atheros.com>
    Cc: Bennyam Malavazi <bennyam.malavazi at atheros.com>
    Cc: Stephen Chen <stephen.chen at atheros.com>
    Cc: Shan Palanisamy <shan.palanisamy at atheros.com>
    Cc: Paul Shaw <paul.shaw at atheros.com>
    Signed-off-by: Vasanthakumar Thiagarajan <vasanth at atheros.com>
    Signed-off-by: Luis R. Rodriguez <lrodriguez at atheros.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>

commit e7824a50662f7f79b1a739f705b4d906c31cf221
Author: Luis R. Rodriguez <lrodriguez at atheros.com>
Date:   Tue Nov 24 02:53:25 2009 -0500

    ath9k: fix processing of TX PS null data frames
    
    When mac80211 was telling us to go into Powersave we listened
    and immediately turned RX off. This meant hardware would not
    see the ACKs from the AP we're associated with and hardware
    we'd end up retransmiting the null data frame in a loop
    helplessly.
    
    Fix this by keeping track of the transmitted nullfunc frames
    and only when we are sure the AP has sent back an ACK do we
    go ahead and shut RX off.
    
    Signed-off-by: Vasanthakumar Thiagarajan <vasanth at atheros.com>
    Signed-off-by: Vivek Natarajan <Vivek.Natarajan at atheros.com>
    Signed-off-by: Luis R. Rodriguez <lrodriguez at atheros.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>

commit 332c556633b8c5fb4e890b1783122f2315526590
Author: Sujith <Sujith.Manoharan at atheros.com>
Date:   Fri Oct 9 09:51:28 2009 +0530

    ath9k: Fix TX hang poll routine
    
    When TX is hung, the chip is reset. Ensure that
    the chip is awake by using the PS wrappers.
    
    Signed-off-by: Sujith <Sujith.Manoharan at atheros.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>

diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/ath9k.h.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/ath9k.h
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/ath9k.h.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/ath9k.h	2009-12-02 15:24:37.000000000 -0500
@@ -137,6 +137,7 @@ struct ath_buf {
 	dma_addr_t bf_daddr;		/* physical addr of desc */
 	dma_addr_t bf_buf_addr;		/* physical addr of data buffer */
 	bool bf_stale;
+	bool bf_isnullfunc;
 	u16 bf_flags;
 	struct ath_buf_state bf_state;
 	dma_addr_t bf_dmacontext;
@@ -506,6 +507,8 @@ struct ath_led {
 #define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17)
 #define SC_OP_WAIT_FOR_TX_ACK   BIT(18)
 #define SC_OP_BEACON_SYNC       BIT(19)
+#define SC_OP_NULLFUNC_COMPLETED BIT(22)
+#define SC_OP_PS_ENABLED	BIT(23)
 
 struct ath_bus_ops {
 	void		(*read_cachesize)(struct ath_softc *sc, int *csz);
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.c.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.c
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.c	2009-12-02 15:13:27.000000000 -0500
@@ -657,6 +657,11 @@ static struct ath_hw *ath9k_hw_do_attach
 	DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
 		ah->config.serialize_regmode);
 
+	if (AR_SREV_9285(ah))
+		ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD >> 1;
+	else
+		ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD;
+
 	if ((ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCI) &&
 	    (ah->hw_version.macVersion != AR_SREV_VERSION_5416_PCIE) &&
 	    (ah->hw_version.macVersion != AR_SREV_VERSION_9160) &&
@@ -3367,7 +3372,11 @@ void ath9k_hw_fill_cap_info(struct ath_h
 		pCap->keycache_size = AR_KEYTABLE_SIZE;
 
 	pCap->hw_caps |= ATH9K_HW_CAP_FASTCC;
-	pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD;
+
+	if (AR_SREV_9285(ah))
+		pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1;
+	else
+		pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD;
 
 	if (AR_SREV_9285_10_OR_LATER(ah))
 		pCap->num_gpio_pins = AR9285_NUM_GPIO;
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.h.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.h
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.h.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/hw.h	2009-12-02 15:08:03.000000000 -0500
@@ -205,6 +205,7 @@ struct ath9k_ops_config {
 #define AR_SPUR_FEEQ_BOUND_HT20 10
 	int spurmode;
 	u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
+	u8 max_txtrig_level;
 };
 
 enum ath9k_int {
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.c.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.c
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.c	2009-12-02 15:13:56.000000000 -0500
@@ -70,12 +70,37 @@ u32 ath9k_hw_numtxpending(struct ath_hw 
 	return npend;
 }
 
+/**
+ * ath9k_hw_updatetxtriglevel - adjusts the frame trigger level
+ *
+ * @ah: atheros hardware struct
+ * @bIncTrigLevel: whether or not the frame trigger level should be updated
+ *
+ * The frame trigger level specifies the minimum number of bytes,
+ * in units of 64 bytes, that must be DMA'ed into the PCU TX FIFO
+ * before the PCU will initiate sending the frame on the air. This can
+ * mean we initiate transmit before a full frame is on the PCU TX FIFO.
+ * Resets to 0x1 (meaning 64 bytes or a full frame, whichever occurs
+ * first)
+ *
+ * Caution must be taken to ensure to set the frame trigger level based
+ * on the DMA request size. For example if the DMA request size is set to
+ * 128 bytes the trigger level cannot exceed 6 * 64 = 384. This is because
+ * there need to be enough space in the tx FIFO for the requested transfer
+ * size. Hence the tx FIFO will stop with 512 - 128 = 384 bytes. If we set
+ * the threshold to a value beyond 6, then the transmit will hang.
+ *
+ * Current dual   stream devices have a PCU TX FIFO size of 8 KB.
+ * Current single stream devices have a PCU TX FIFO size of 4 KB, however,
+ * there is a hardware issue which forces us to use 2 KB instead so the
+ * frame trigger level must not exceed 2 KB for these chipsets.
+ */
 bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel)
 {
 	u32 txcfg, curLevel, newLevel;
 	enum ath9k_int omask;
 
-	if (ah->tx_trig_level >= MAX_TX_FIFO_THRESHOLD)
+	if (ah->tx_trig_level >= ah->config.max_txtrig_level)
 		return false;
 
 	omask = ath9k_hw_set_interrupts(ah, ah->mask_reg & ~ATH9K_INT_GLOBAL);
@@ -84,7 +109,7 @@ bool ath9k_hw_updatetxtriglevel(struct a
 	curLevel = MS(txcfg, AR_FTRIG);
 	newLevel = curLevel;
 	if (bIncTrigLevel) {
-		if (curLevel < MAX_TX_FIFO_THRESHOLD)
+		if (curLevel < ah->config.max_txtrig_level)
 			newLevel++;
 	} else if (curLevel > MIN_TX_FIFO_THRESHOLD)
 		newLevel--;
@@ -229,6 +254,8 @@ int ath9k_hw_txprocdesc(struct ath_hw *a
 	ds->ds_txstat.ts_status = 0;
 	ds->ds_txstat.ts_flags = 0;
 
+	if (ads->ds_txstatus1 & AR_FrmXmitOK)
+		ds->ds_txstat.ts_status |= ATH9K_TX_ACKED;
 	if (ads->ds_txstatus1 & AR_ExcessiveRetries)
 		ds->ds_txstat.ts_status |= ATH9K_TXERR_XRETRY;
 	if (ads->ds_txstatus1 & AR_Filtered)
@@ -889,6 +916,13 @@ bool ath9k_hw_setuprxdesc(struct ath_hw 
 	return true;
 }
 
+/*
+ * This can stop or re-enables RX.
+ *
+ * If bool is set this will kill any frame which is currently being
+ * transferred between the MAC and baseband and also prevent any new
+ * frames from getting started.
+ */
 bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set)
 {
 	u32 reg;
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.h.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.h
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.h.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/mac.h	2009-12-02 15:13:56.000000000 -0500
@@ -76,6 +76,7 @@
 #define ATH9K_TXERR_FIFO           0x04
 #define ATH9K_TXERR_XTXOP          0x08
 #define ATH9K_TXERR_TIMER_EXPIRED  0x10
+#define ATH9K_TX_ACKED		   0x20
 
 #define ATH9K_TX_BA                0x01
 #define ATH9K_TX_PWRMGMT           0x02
@@ -85,9 +86,15 @@
 #define ATH9K_TX_SW_ABORTED        0x40
 #define ATH9K_TX_SW_FILTERED       0x80
 
+/* 64 bytes */
 #define MIN_TX_FIFO_THRESHOLD   0x1
+
+/*
+ * Single stream device AR9285 and AR9271 require 2 KB
+ * to work around a hardware issue, all other devices
+ * have can use the max 4 KB limit.
+ */
 #define MAX_TX_FIFO_THRESHOLD   ((4096 / 64) - 1)
-#define INIT_TX_FIFO_THRESHOLD  MIN_TX_FIFO_THRESHOLD
 
 struct ath_tx_status {
 	u32 ts_tstamp;
@@ -380,6 +387,11 @@ struct ar5416_desc {
 #define AR_TxBaStatus       0x40000000
 #define AR_TxStatusRsvd01   0x80000000
 
+/*
+ * AR_FrmXmitOK - Frame transmission success flag. If set, the frame was
+ * transmitted successfully. If clear, no ACK or BA was received to indicate
+ * successful transmission when we were expecting an ACK or BA.
+ */
 #define AR_FrmXmitOK            0x00000001
 #define AR_ExcessiveRetries     0x00000002
 #define AR_FIFOUnderrun         0x00000004
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/main.c.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/main.c
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/main.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/main.c	2009-12-02 15:23:02.000000000 -0500
@@ -2252,8 +2252,15 @@ static int ath9k_config(struct ieee80211
 
 	mutex_lock(&sc->mutex);
 
+	/*
+	 * We just prepare to enable PS. We have to wait until our AP has
+	 * ACK'd our null data frame to disable RX otherwise we'll ignore
+	 * those ACKs and end up retransmitting the same null data frames.
+	 * IEEE80211_CONF_CHANGE_PS is only passed by mac80211 for STA mode.
+	 */
 	if (changed & IEEE80211_CONF_CHANGE_PS) {
 		if (conf->flags & IEEE80211_CONF_PS) {
+			sc->sc_flags |= SC_OP_PS_ENABLED;
 			if (!(ah->caps.hw_caps &
 			      ATH9K_HW_CAP_AUTOSLEEP)) {
 				if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
@@ -2261,11 +2268,20 @@ static int ath9k_config(struct ieee80211
 					ath9k_hw_set_interrupts(sc->sc_ah,
 							sc->imask);
 				}
+			}
+			/*
+			 * At this point we know hardware has received an ACK
+			 * of a previously sent null data frame.
+			 */
+			if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) {
+				sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED;
+				ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
 				ath9k_hw_setrxabort(sc->sc_ah, 1);
 			}
-			ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
 		} else {
 			ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
+			sc->sc_flags &= ~(SC_OP_PS_ENABLED |
+					  SC_OP_NULLFUNC_COMPLETED);
 			if (!(ah->caps.hw_caps &
 			      ATH9K_HW_CAP_AUTOSLEEP)) {
 				ath9k_hw_setrxabort(sc->sc_ah, 0);
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/rc.c.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/rc.c
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/rc.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/rc.c	2009-12-02 15:11:15.000000000 -0500
@@ -1519,10 +1519,14 @@ static void ath_tx_status(void *priv, st
 		goto exit;
 
 	/*
-	 * If underrun error is seen assume it as an excessive retry only
-	 * if prefetch trigger level have reached the max (0x3f for 5416)
-	 * Adjust the long retry as if the frame was tried ATH_11N_TXMAXTRY
-	 * times. This affects how ratectrl updates PER for the failed rate.
+	 * If an underrun error is seen assume it as an excessive retry only
+	 * if max frame trigger level has been reached (2 KB for singel stream,
+	 * and 4 KB for dual stream). Adjust the long retry as if the frame was
+	 * tried hw->max_rate_tries times to affect how ratectrl updates PER for
+	 * the failed rate. In case of congestion on the bus penalizing these
+	 * type of underruns should help hardware actually transmit new frames
+	 * successfully by eventually preferring slower rates. This itself
+	 * should also alleviate congestion on the bus.
 	 */
 	if (tx_info_priv->tx.ts_flags &
 	    (ATH9K_TX_DATA_UNDERRUN | ATH9K_TX_DELIM_UNDERRUN) &&
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/reg.h.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/reg.h
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/reg.h.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/reg.h	2009-12-02 15:13:56.000000000 -0500
@@ -1216,13 +1216,22 @@ enum {
 #define AR_MCAST_FIL0       0x8040
 #define AR_MCAST_FIL1       0x8044
 
+/*
+ * AR_DIAG_SW - Register which can be used for diagnostics and testing purposes.
+ *
+ * The force RX abort (AR_DIAG_RX_ABORT, bit 25) can be used in conjunction with
+ * RX block (AR_DIAG_RX_DIS, bit 5) to help fast channel change to shut down
+ * receive. The force RX abort bit will kill any frame which is currently being
+ * transferred between the MAC and baseband. The RX block bit (AR_DIAG_RX_DIS)
+ * will prevent any new frames from getting started.
+ */
 #define AR_DIAG_SW                  0x8048
 #define AR_DIAG_CACHE_ACK           0x00000001
 #define AR_DIAG_ACK_DIS             0x00000002
 #define AR_DIAG_CTS_DIS             0x00000004
 #define AR_DIAG_ENCRYPT_DIS         0x00000008
 #define AR_DIAG_DECRYPT_DIS         0x00000010
-#define AR_DIAG_RX_DIS              0x00000020
+#define AR_DIAG_RX_DIS              0x00000020 /* RX block */
 #define AR_DIAG_LOOP_BACK           0x00000040
 #define AR_DIAG_CORR_FCS            0x00000080
 #define AR_DIAG_CHAN_INFO           0x00000100
@@ -1231,12 +1240,12 @@ enum {
 #define AR_DIAG_FRAME_NV0           0x00020000
 #define AR_DIAG_OBS_PT_SEL1         0x000C0000
 #define AR_DIAG_OBS_PT_SEL1_S       18
-#define AR_DIAG_FORCE_RX_CLEAR      0x00100000
+#define AR_DIAG_FORCE_RX_CLEAR      0x00100000 /* force rx_clear high */
 #define AR_DIAG_IGNORE_VIRT_CS      0x00200000
 #define AR_DIAG_FORCE_CH_IDLE_HIGH  0x00400000
 #define AR_DIAG_EIFS_CTRL_ENA       0x00800000
 #define AR_DIAG_DUAL_CHAIN_INFO     0x01000000
-#define AR_DIAG_RX_ABORT            0x02000000
+#define AR_DIAG_RX_ABORT            0x02000000 /* Force RX abort */
 #define AR_DIAG_SATURATE_CYCLE_CNT  0x04000000
 #define AR_DIAG_OBS_PT_SEL2         0x08000000
 #define AR_DIAG_RX_CLEAR_CTL_LOW    0x10000000
diff -up linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/xmit.c.orig linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/xmit.c
--- linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/xmit.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.noarch/drivers/net/wireless/ath/ath9k/xmit.c	2009-12-02 15:29:20.000000000 -0500
@@ -434,8 +434,11 @@ static void ath_tx_complete_aggr(struct 
 
 	rcu_read_unlock();
 
-	if (needreset)
+	if (needreset) {
+		ath9k_ps_wakeup(sc);
 		ath_reset(sc, false);
+		ath9k_ps_restore(sc);
+	}
 }
 
 static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
@@ -1587,6 +1590,14 @@ static int ath_tx_setup_buffer(struct ie
 	}
 
 	bf->bf_buf_addr = bf->bf_dmacontext;
+
+	/* tag if this is a nullfunc frame to enable PS when AP acks it */
+	if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc)) {
+		bf->bf_isnullfunc = true;
+		sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED;
+	} else
+		bf->bf_isnullfunc = false;
+
 	return 0;
 }
 
@@ -1996,6 +2007,19 @@ static void ath_tx_processq(struct ath_s
 			txq->axq_gatingds = NULL;
 
 		/*
+		 * We now know the nullfunc frame has been ACKed so we
+		 * can disable RX.
+		 */
+		if (bf->bf_isnullfunc &&
+		    (ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) {
+			if ((sc->sc_flags & SC_OP_PS_ENABLED)) {
+				ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
+				ath9k_hw_setrxabort(sc->sc_ah, 1);
+			} else
+				sc->sc_flags |= SC_OP_NULLFUNC_COMPLETED;
+		}
+
+		/*
 		 * Remove ath_buf's of the same transmit unit from txq,
 		 * however leave the last descriptor back as the holding
 		 * descriptor for hw.

linux-2.6-iommu-another-hp-screwup.patch:
 intel-iommu.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- NEW FILE linux-2.6-iommu-another-hp-screwup.patch ---
--- linux-2.6.31.x86_64/drivers/pci/intel-iommu.c.orig	2009-11-25 09:49:19.000000000 +0000
+++ linux-2.6.31.x86_64/drivers/pci/intel-iommu.c	2009-11-25 10:15:45.000000000 +0000
@@ -1990,6 +1990,16 @@ static int iommu_prepare_identity_map(st
 	       "IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n",
 	       pci_name(pdev), start, end);
 	
+	if (end < start) {
+		WARN(1, "Your BIOS is broken; RMRR ends before it starts!\n"
+			"BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			dmi_get_system_info(DMI_BIOS_VENDOR),
+			dmi_get_system_info(DMI_BIOS_VERSION),
+		     dmi_get_system_info(DMI_PRODUCT_VERSION));
+		ret = -EIO;
+		goto error;
+	}
+
 	if (end >> agaw_to_width(domain->agaw)) {
 		WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n"
 		     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",

linux-2.6-iommu-dmar-all-1s.patch:
 dmar.c |   32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-iommu-dmar-all-1s.patch ---
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index e5f8fc1..87417e2 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -583,6 +583,9 @@ int __init check_zero_address(void)
 		}
 
 		if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) {
+			void __iomem *addr;
+			u64 cap, ecap;
+
 			drhd = (void *)entry_header;
 			if (!drhd->address) {
 				/* Promote an attitude of violence to a BIOS engineer today */
@@ -591,10 +594,27 @@ int __init check_zero_address(void)
 				     dmi_get_system_info(DMI_BIOS_VENDOR),
 				     dmi_get_system_info(DMI_BIOS_VERSION),
 				     dmi_get_system_info(DMI_PRODUCT_VERSION));
-				dmar_disabled = 1;
-				return 0;
+				goto failed;
+			}
+
+			addr = early_ioremap(drhd->address, VTD_PAGE_SIZE);
+			if (!addr ) {
+				printk("IOMMU: can't validate: %llx\n", drhd->address);
+				goto failed;
+			}
+			cap = dmar_readq(addr + DMAR_CAP_REG);
+			ecap = dmar_readq(addr + DMAR_ECAP_REG);
+			early_iounmap(addr, VTD_PAGE_SIZE);
+			if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) {
+				/* Promote an attitude of violence to a BIOS engineer today */
+				WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n"
+				     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+				      drhd->address,
+				      dmi_get_system_info(DMI_BIOS_VENDOR),
+				      dmi_get_system_info(DMI_BIOS_VERSION),
+				      dmi_get_system_info(DMI_PRODUCT_VERSION));
+				goto failed;
 			}
-			break;
 		}
 
 		entry_header = ((void *)entry_header + entry_header->length);
@@ -600,6 +622,12 @@ int __init check_zero_address(void)
 		entry_header = ((void *)entry_header + entry_header->length);
 	}
 	return 1;
+
+failed:
+#ifdef CONFIG_DMAR
+	dmar_disabled = 1;
+#endif
+	return 0;
 }
 
 void __init detect_intel_iommu(void)

linux-2.6-iommu-hp-cantiga-resume.patch:
 intel-iommu.c |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

--- NEW FILE linux-2.6-iommu-hp-cantiga-resume.patch ---
--- linux-2.6.31.x86_64/drivers/pci/intel-iommu.c.orig	2009-11-25 10:37:05.000000000 +0000
+++ linux-2.6.31.x86_64/drivers/pci/intel-iommu.c	2009-11-26 07:20:04.000000000 +0000
@@ -3073,6 +3073,36 @@ static void __init init_no_remapping_dev
 }
 
 #ifdef CONFIG_SUSPEND
+
+/*
+ * On Cantiga, the dedicated IOMMU for the integrated graphics won't
+ * come back unless the MMIO BAR for the gfx device (00:02.0) is enabled.
+ * And some HP BIOSes don't restore it on resume. Linux will restore it
+ * later, but that's too late -- we need to reinitialise the IOMMU first.
+ */
+void cantiga_gfx_bar_enable(struct dmar_drhd_unit *drhd)
+{
+	int i;
+	uint32_t mmiobar;
+
+	for (i = 0; i < drhd->devices_cnt; i++) {
+		if (!drhd->devices[i] ||
+		    drhd->devices[i]->vendor != 0x8086 ||
+		    drhd->devices[i]->device != 0x2a42)
+			continue;
+
+		pci_read_config_dword(drhd->devices[i], PCI_BASE_ADDRESS_0,
+				      &mmiobar);
+		if (!(mmiobar & PCI_BASE_ADDRESS_MEM_MASK) &&
+		    pci_resource_start(drhd->devices[i], 0)) {
+			WARN(1, "BIOS failed to restore BARs for integrated graphics device; fixing...\n");
+			pci_write_config_dword(drhd->devices[i],
+					       PCI_BASE_ADDRESS_0,
+					       pci_resource_start(drhd->devices[i], 0) | mmiobar);
+		}
+	}
+}
+
 static int init_iommu_hw(void)
 {
 	struct dmar_drhd_unit *drhd;
@@ -3091,6 +3121,9 @@ static int init_iommu_hw(void)
 					   DMA_CCMD_GLOBAL_INVL);
 		iommu->flush.flush_iotlb(iommu, 0, 0, 0,
 					 DMA_TLB_GLOBAL_FLUSH);
+
+		cantiga_gfx_bar_enable(drhd);
+
 		iommu_enable_translation(iommu);
 		iommu_disable_protect_mem_regions(iommu);
 	}

linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch:
 dmar.c |   33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

--- NEW FILE linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch ---
--- linux-2.6.31.x86_64/drivers/pci/dmar.c.orig	2009-11-25 09:49:15.000000000 +0000
+++ linux-2.6.31.x86_64/drivers/pci/dmar.c	2009-11-25 10:17:44.000000000 +0000
@@ -564,6 +564,8 @@ int __init dmar_table_init(void)
 	return 0;
 }
 
+static int bios_warned;
+
 int __init check_zero_address(void)
 {
 	struct acpi_table_dmar *dmar;
@@ -594,6 +596,7 @@ int __init check_zero_address(void)
 				     dmi_get_system_info(DMI_BIOS_VENDOR),
 				     dmi_get_system_info(DMI_BIOS_VERSION),
 				     dmi_get_system_info(DMI_PRODUCT_VERSION));
+				bios_warned = 1;
 				goto failed;
 			}
 
@@ -613,6 +616,7 @@ int __init check_zero_address(void)
 				      dmi_get_system_info(DMI_BIOS_VENDOR),
 				      dmi_get_system_info(DMI_BIOS_VERSION),
 				      dmi_get_system_info(DMI_PRODUCT_VERSION));
+				bios_warned = 1;
 				goto failed;
 			}
 		}
@@ -670,6 +674,18 @@ int alloc_iommu(struct dmar_drhd_unit *d
 	int agaw = 0;
 	int msagaw = 0;
 
+	if (!drhd->reg_base_addr) {
+		if (!bios_warned) {
+			WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n"
+			     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			     dmi_get_system_info(DMI_BIOS_VENDOR),
+			     dmi_get_system_info(DMI_BIOS_VERSION),
+			     dmi_get_system_info(DMI_PRODUCT_VERSION));
+			bios_warned = 1;
+		}
+		return -EINVAL;
+	}
+
 	iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
 	if (!iommu)
 		return -ENOMEM;
@@ -686,13 +702,16 @@ int alloc_iommu(struct dmar_drhd_unit *d
 	iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG);
 
 	if (iommu->cap == (uint64_t)-1 && iommu->ecap == (uint64_t)-1) {
-		/* Promote an attitude of violence to a BIOS engineer today */
-		WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n"
-		     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
-		     drhd->reg_base_addr,
-		     dmi_get_system_info(DMI_BIOS_VENDOR),
-		     dmi_get_system_info(DMI_BIOS_VERSION),
-		     dmi_get_system_info(DMI_PRODUCT_VERSION));
+		if (!bios_warned) {
+			/* Promote an attitude of violence to a BIOS engineer today */
+			WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n"
+			     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			     drhd->reg_base_addr,
+			     dmi_get_system_info(DMI_BIOS_VENDOR),
+			     dmi_get_system_info(DMI_BIOS_VERSION),
+			     dmi_get_system_info(DMI_PRODUCT_VERSION));
+			bios_warned = 1;
+		}
 		goto err_unmap;
 	}
 

linux-2.6.31-nfsd-proot.patch:
 fs/nfsd/export.c            |    9 ++++++---
 fs/nfsd/nfs4xdr.c           |   10 +++++++---
 fs/nfsd/nfsfh.c             |   37 +++++++++++++++++++++++++++++++++++++
 fs/nfsd/vfs.c               |   30 ++++++++++++++++++++++++++----
 include/linux/nfsd/export.h |   12 +++++++++++-
 include/linux/nfsd/nfsd.h   |    5 +++++
 6 files changed, 92 insertions(+), 11 deletions(-)

--- NEW FILE linux-2.6.31-nfsd-proot.patch ---
diff -up linux-2.6.31.i686/fs/nfsd/export.c.save linux-2.6.31.i686/fs/nfsd/export.c
--- linux-2.6.31.i686/fs/nfsd/export.c.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/fs/nfsd/export.c	2009-12-07 12:15:32.000000000 -0500
@@ -362,10 +362,12 @@ static struct svc_export *svc_export_loo
 static int check_export(struct inode *inode, int flags, unsigned char *uuid)
 {
 
-	/* We currently export only dirs and regular files.
-	 * This is what umountd does.
+	/*
+	 * We currently export only dirs, regular files, and (for v4
+	 * pseudoroot) symlinks.
 	 */
 	if (!S_ISDIR(inode->i_mode) &&
+	    !S_ISLNK(inode->i_mode) &&
 	    !S_ISREG(inode->i_mode))
 		return -ENOTDIR;
 
@@ -1413,6 +1415,7 @@ static struct flags {
 	{ NFSEXP_CROSSMOUNT, {"crossmnt", ""}},
 	{ NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}},
 	{ NFSEXP_NOAUTHNLM, {"insecure_locks", ""}},
+	{ NFSEXP_V4ROOT, {"v4root", ""}},
 #ifdef MSNFS
 	{ NFSEXP_MSNFS, {"msnfs", ""}},
 #endif
@@ -1493,7 +1496,7 @@ static int e_show(struct seq_file *m, vo
 	struct svc_export *exp = container_of(cp, struct svc_export, h);
 
 	if (p == SEQ_START_TOKEN) {
-		seq_puts(m, "# Version 1.1\n");
+		seq_puts(m, "# Version 1.2\n");
 		seq_puts(m, "# Path Client(Flags) # IPs\n");
 		return 0;
 	}
diff -up linux-2.6.31.i686/fs/nfsd/nfs4xdr.c.save linux-2.6.31.i686/fs/nfsd/nfs4xdr.c
--- linux-2.6.31.i686/fs/nfsd/nfs4xdr.c.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/fs/nfsd/nfs4xdr.c	2009-12-07 12:15:32.000000000 -0500
@@ -2206,11 +2206,14 @@ nfsd4_encode_dirent_fattr(struct nfsd4_r
 	 * we will not follow the cross mount and will fill the attribtutes
 	 * directly from the mountpoint dentry.
 	 */
-	if (d_mountpoint(dentry) && !attributes_need_mount(cd->rd_bmval))
-		ignore_crossmnt = 1;
-	else if (d_mountpoint(dentry)) {
+	if (nfsd_mountpoint(dentry, exp)) {
 		int err;
 
+		if (!(exp->ex_flags & NFSEXP_V4ROOT)
+				&& !attributes_need_mount(cd->rd_bmval)) {
+			ignore_crossmnt = 1;
+			goto out_encode;
+		}
 		/*
 		 * Why the heck aren't we just using nfsd_lookup??
 		 * Different "."/".." handling?  Something else?
@@ -2226,6 +2229,7 @@ nfsd4_encode_dirent_fattr(struct nfsd4_r
 			goto out_put;
 
 	}
+out_encode:
 	nfserr = nfsd4_encode_fattr(NULL, exp, dentry, p, buflen, cd->rd_bmval,
 					cd->rd_rqstp, ignore_crossmnt);
 out_put:
diff -up linux-2.6.31.i686/fs/nfsd/nfsfh.c.save linux-2.6.31.i686/fs/nfsd/nfsfh.c
--- linux-2.6.31.i686/fs/nfsd/nfsfh.c.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/fs/nfsd/nfsfh.c	2009-12-07 12:15:32.000000000 -0500
@@ -109,6 +109,36 @@ static __be32 nfsd_setuser_and_check_por
 	return nfserrno(nfsd_setuser(rqstp, exp));
 }
 
+static inline __be32 check_pseudo_root(struct svc_rqst *rqstp,
+	struct dentry *dentry, struct svc_export *exp)
+{
+	if (!(exp->ex_flags & NFSEXP_V4ROOT))
+		return nfs_ok;
+	/*
+	 * v2/v3 clients have no need for the V4ROOT export--they use
+	 * the mount protocl instead; also, further V4ROOT checks may be
+	 * in v4-specific code, in which case v2/v3 clients could bypass
+	 * them.
+	 */
+	if (!nfsd_v4client(rqstp))
+		return nfserr_stale;
+	/*
+	 * We're exposing only the directories and symlinks that have to be
+	 * traversed on the way to real exports:
+	 */
+	if (unlikely(!S_ISDIR(dentry->d_inode->i_mode) &&
+		     !S_ISLNK(dentry->d_inode->i_mode)))
+		return nfserr_stale;
+	/*
+	 * A pseudoroot export gives permission to access only one
+	 * single directory; the kernel has to make another upcall
+	 * before granting access to anything else under it:
+	 */
+	if (unlikely(dentry != exp->ex_path.dentry))
+		return nfserr_stale;
+	return nfs_ok;
+}
+
 /*
  * Use the given filehandle to look up the corresponding export and
  * dentry.  On success, the results are used to set fh_export and
@@ -317,6 +347,13 @@ fh_verify(struct svc_rqst *rqstp, struct
 			goto out;
 	}
 
+	/*
+	 * Do some spoof checking if we are on the pseudo root
+	 */
+	error = check_pseudo_root(rqstp, dentry, exp);
+	if (error)
+		goto out;
+
 	error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type);
 	if (error)
 		goto out;
diff -up linux-2.6.31.i686/fs/nfsd/vfs.c.save linux-2.6.31.i686/fs/nfsd/vfs.c
--- linux-2.6.31.i686/fs/nfsd/vfs.c.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/fs/nfsd/vfs.c	2009-12-07 12:22:32.000000000 -0500
@@ -110,12 +110,21 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, s
 
 	exp2 = rqst_exp_get_by_name(rqstp, &path);
 	if (IS_ERR(exp2)) {
-		if (PTR_ERR(exp2) != -ENOENT)
-			err = PTR_ERR(exp2);
+		err = PTR_ERR(exp2);
+		/*
+		 * We normally allow NFS clients to continue
+		 * "underneath" a mountpoint that is not exported.
+		 * The exception is V4ROOT, where no traversal is ever
+		 * allowed without an explicit export of the new
+		 * directory.
+		 */
+		if (err == -ENOENT && !(exp->ex_flags & NFSEXP_V4ROOT))
+			err = 0;
 		path_put(&path);
 		goto out;
 	}
-	if ((exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2)) {
+	if (nfsd_v4client(rqstp) ||
+		(exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2)) {
 		/* successfully crossed mount point */
 		/*
 		 * This is subtle: path.dentry is *not* on path.mnt
@@ -134,6 +143,19 @@ out:
 	return err;
 }
 
+/*
+ * For nfsd purposes, we treat V4ROOT exports as though there was an
+ * export at *every* directory.
+ */
+int nfsd_mountpoint(struct dentry *dentry, struct svc_export *exp)
+{
+	if (d_mountpoint(dentry))
+		return 1;
+	if (!(exp->ex_flags & NFSEXP_V4ROOT))
+		return 0;
+	return dentry->d_inode != NULL;
+}
+
 __be32
 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
 		   const char *name, unsigned int len,
@@ -201,7 +223,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqst
 		/*
 		 * check if we have crossed a mount point ...
 		 */
-		if (d_mountpoint(dentry)) {
+		if (nfsd_mountpoint(dentry, exp)) {
 			if ((host_err = nfsd_cross_mnt(rqstp, &dentry, &exp))) {
 				dput(dentry);
 				goto out_nfserr;
diff -up linux-2.6.31.i686/include/linux/nfsd/export.h.save linux-2.6.31.i686/include/linux/nfsd/export.h
--- linux-2.6.31.i686/include/linux/nfsd/export.h.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/include/linux/nfsd/export.h	2009-12-07 12:15:39.000000000 -0500
@@ -39,7 +39,17 @@
 #define NFSEXP_FSID		0x2000
 #define	NFSEXP_CROSSMOUNT	0x4000
 #define	NFSEXP_NOACL		0x8000	/* reserved for possible ACL related use */
-#define NFSEXP_ALLFLAGS		0xFE3F
+/*
+ * The NFSEXP_V4ROOT flag causes the kernel to give access only to NFSv4
+ * clients, and only to the single directory that is the root of the
+ * export; further lookup and readdir operations are treated as if every
+ * subdirectory was a mountpoint, and ignored if they are not themselves
+ * exported.  This is used by nfsd and mountd to construct the NFSv4
+ * pseudofilesystem, which provides access only to paths leading to each
+ * exported filesystem.
+ */
+#define	NFSEXP_V4ROOT		0x10000
+#define NFSEXP_ALLFLAGS		0x1FE3F
 
 /* The flags that may vary depending on security flavor: */
 #define NFSEXP_SECINFO_FLAGS	(NFSEXP_READONLY | NFSEXP_ROOTSQUASH \
diff -up linux-2.6.31.i686/include/linux/nfsd/nfsd.h.save linux-2.6.31.i686/include/linux/nfsd/nfsd.h
--- linux-2.6.31.i686/include/linux/nfsd/nfsd.h.save	2009-12-07 12:13:28.000000000 -0500
+++ linux-2.6.31.i686/include/linux/nfsd/nfsd.h	2009-12-07 12:15:39.000000000 -0500
@@ -83,6 +83,7 @@ __be32		 nfsd_lookup_dentry(struct svc_r
 				struct svc_export **, struct dentry **);
 __be32		nfsd_setattr(struct svc_rqst *, struct svc_fh *,
 				struct iattr *, int, time_t);
+int nfsd_mountpoint(struct dentry *, struct svc_export *);
 #ifdef CONFIG_NFSD_V4
 __be32          nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
                     struct nfs4_acl *);
@@ -391,6 +392,10 @@ static inline u32 nfsd_suppattrs2(u32 mi
 	return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD2
 			    : NFSD4_SUPPORTED_ATTRS_WORD2;
 }
+static inline int nfsd_v4client(struct svc_rqst *rq)
+{
+	return rq->rq_prog == NFS_PROGRAM && rq->rq_vers == 4;
+}
 
 /* These will return ERR_INVAL if specified in GETATTR or READDIR. */
 #define NFSD_WRITEONLY_ATTRS_WORD1							    \

sched-deal-with-low-load-in-wake-affine.patch:
 sched_fair.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- NEW FILE sched-deal-with-low-load-in-wake-affine.patch ---
From: Peter Zijlstra <a.p.zijlstra at chello.nl>
Date: Mon, 7 Sep 2009 16:28:05 +0000 (+0200)
Subject: sched: Deal with low-load in wake_affine()
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=71a29aa7b600595d0ef373ea605ac656876d1f2f

sched: Deal with low-load in wake_affine()

wake_affine() would always fail under low-load situations where
both prev and this were idle, because adding a single task will
always be a significant imbalance, even if there's nothing
around that could balance it.

Deal with this by allowing imbalance when there's nothing you
can do about it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index d7fda41..cc97ea4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1262,7 +1262,17 @@ wake_affine(struct sched_domain *this_sd, struct rq *this_rq,
 	tg = task_group(p);
 	weight = p->se.load.weight;
 
-	balanced = 100*(tl + effective_load(tg, this_cpu, weight, weight)) <=
+	/*
+	 * In low-load situations, where prev_cpu is idle and this_cpu is idle
+	 * due to the sync cause above having dropped tl to 0, we'll always have
+	 * an imbalance, but there's really nothing you can do about that, so
+	 * that's good too.
+	 *
+	 * Otherwise check if either cpus are near enough in load to allow this
+	 * task to be woken on this_cpu.
+	 */
+	balanced = !tl ||
+		100*(tl + effective_load(tg, this_cpu, weight, weight)) <=
 		imbalance*(load + effective_load(tg, prev_cpu, 0, weight));
 
 	/*

sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch:
 sched_fair.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch ---
From: Mike Galbraith <efault at gmx.de>
Date: Tue, 8 Sep 2009 09:12:28 +0000 (+0200)
Subject: sched: Ensure that a child can't gain time over it's parent after fork()
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b5d9d734a53e0204aab0089079cbde2a1285a38f

sched: Ensure that a child can't gain time over it's parent after fork()

A fork/exec load is usually "pass the baton", so the child
should never be placed behind the parent.  With START_DEBIT we
make room for the new task, but with child_runs_first, that
room comes out of the _parent's_ hide. There's nothing to say
that the parent wasn't ahead of min_vruntime at fork() time,
which means that the "baton carrier", who is essentially the
parent in drag, can gain time and increase scheduling latencies
for waiters.

With NEW_FAIR_SLEEPERS + START_DEBIT + child_runs_first
enabled, we essentially pass the sleeper fairness off to the
child, which is fine, but if we don't base placement on the
parent's updated vruntime, we can end up compounding latency
woes if the child itself then does fork/exec.  The debit
incurred at fork doesn't hurt the parent who is then going to
sleep and maybe exit, but the child who acquires the error
harms all comers.

This improves latencies of make -j<n> kernel build workloads.

Reported-by: Jens Axboe <jens.axboe at oracle.com>
Signed-off-by: Mike Galbraith <efault at gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index cc97ea4..e386e5d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -728,11 +728,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 
 			vruntime -= thresh;
 		}
-
-		/* ensure we never gain time by being placed backwards. */
-		vruntime = max_vruntime(se->vruntime, vruntime);
 	}
 
+	/* ensure we never gain time by being placed backwards. */
+	vruntime = max_vruntime(se->vruntime, vruntime);
+
 	se->vruntime = vruntime;
 }
 
@@ -1756,6 +1756,8 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
 	sched_info_queued(p);
 
 	update_curr(cfs_rq);
+	if (curr)
+		se->vruntime = curr->vruntime;
 	place_entity(cfs_rq, se, 1);
 
 	/* 'curr' will be NULL if the child belongs to a different group */

sched-remove-shortcut-from-select-task-rq-fair.patch:
 sched_fair.c |    2 --
 1 file changed, 2 deletions(-)

--- NEW FILE sched-remove-shortcut-from-select-task-rq-fair.patch ---
From: Peter Zijlstra <a.p.zijlstra at chello.nl>
Date: Mon, 7 Sep 2009 16:12:06 +0000 (+0200)
Subject: sched: Remove short cut from select_task_rq_fair()
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cdd2ab3de4301728b20efd6225681d3ff591a938

sched: Remove short cut from select_task_rq_fair()

select_task_rq_fair() incorrectly skips the wake_affine()
logic, remove this.

When prev_cpu == this_cpu, the code jumps straight to the
wake_idle() logic, this doesn't give the wake_affine() logic
the chance to pin the task to this cpu.

Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 2ff850f..d7fda41 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1305,8 +1305,6 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
 	this_rq		= cpu_rq(this_cpu);
 	new_cpu		= prev_cpu;
 
-	if (prev_cpu == this_cpu)
-		goto out;
 	/*
 	 * 'this_sd' is the first domain that both
 	 * this_cpu and prev_cpu are present in:

sched-retune-scheduler-latency-defaults.patch:
 sched_fair.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE sched-retune-scheduler-latency-defaults.patch ---
From: Mike Galbraith <efault at gmx.de>
Date: Wed, 9 Sep 2009 13:41:37 +0000 (+0200)
Subject: sched: Re-tune the scheduler latency defaults to decrease worst-case latencies
X-Git-Tag: v2.6.32-rc1~719^2~3
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=172e082a9111ea504ee34cbba26284a5ebdc53a7

sched: Re-tune the scheduler latency defaults to decrease worst-case latencies

Reduce the latency target from 20 msecs to 5 msecs.

Why? Larger latencies increase spread, which is good for scaling,
but bad for worst case latency.

We still have the ilog(nr_cpus) rule to scale up on bigger
server boxes.

Signed-off-by: Mike Galbraith <efault at gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
LKML-Reference: <1252486344.28645.18.camel at marge.simson.net>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index af325a3..26fadb4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -24,7 +24,7 @@
 
 /*
  * Targeted preemption latency for CPU-bound tasks:
- * (default: 20ms * (1 + ilog(ncpus)), units: nanoseconds)
+ * (default: 5ms * (1 + ilog(ncpus)), units: nanoseconds)
  *
  * NOTE: this latency value is not the same as the concept of
  * 'timeslice length' - timeslices in CFS are of variable length
@@ -34,13 +34,13 @@
  * (to see the precise effective timeslice length of your workload,
  *  run vmstat and monitor the context-switches (cs) field)
  */
-unsigned int sysctl_sched_latency = 20000000ULL;
+unsigned int sysctl_sched_latency = 5000000ULL;
 
 /*
  * Minimal preemption granularity for CPU-bound tasks:
- * (default: 4 msec * (1 + ilog(ncpus)), units: nanoseconds)
+ * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
  */
-unsigned int sysctl_sched_min_granularity = 4000000ULL;
+unsigned int sysctl_sched_min_granularity = 1000000ULL;
 
 /*
  * is kept at sysctl_sched_latency / sysctl_sched_min_granularity
@@ -63,13 +63,13 @@ unsigned int __read_mostly sysctl_sched_compat_yield;
 
 /*
  * SCHED_OTHER wake-up granularity.
- * (default: 5 msec * (1 + ilog(ncpus)), units: nanoseconds)
+ * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
  *
  * This option delays the preemption effects of decoupled workloads
  * and reduces their over-scheduling. Synchronous workloads will still
  * have immediate wakeup/sleep latencies.
  */
-unsigned int sysctl_sched_wakeup_granularity = 5000000UL;
+unsigned int sysctl_sched_wakeup_granularity = 1000000UL;
 
 const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
 

sched-update-the-clock-of-runqueue-select-task-rq-selected.patch:
 sched.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- NEW FILE sched-update-the-clock-of-runqueue-select-task-rq-selected.patch ---
From: Mike Galbraith <efault at gmx.de>
Date: Fri, 9 Oct 2009 06:35:03 +0000 (+0200)
Subject: sched: Update the clock of runqueue select_task_rq() selected
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=f5dc375

sched: Update the clock of runqueue select_task_rq() selected

[ backport to 2.6.3[01] : <cebbert at redhat.com> ]

In try_to_wake_up(), we update the runqueue clock, but
select_task_rq() may select a different runqueue than the one we
updated, leaving the new runqueue's clock stale for a bit.

This patch cures occasional huge latencies reported by latencytop
when coming out of idle on a mostly idle NO_HZ box.

Signed-off-by: Mike Galbraith <efault at gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
LKML-Reference: <1255070103.7639.30.camel at marge.simson.net>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2344,7 +2344,7 @@ static int try_to_wake_up(struct task_st
 	int cpu, orig_cpu, this_cpu, success = 0;
 	unsigned long flags;
 	long old_state;
-	struct rq *rq;
+	struct rq *rq, *orig_rq;
 
 	if (!sched_feat(SYNC_WAKEUPS))
 		sync = 0;
@@ -2366,7 +2366,7 @@ static int try_to_wake_up(struct task_st
 #endif
 
 	smp_wmb();
-	rq = task_rq_lock(p, &flags);
+	rq = orig_rq = task_rq_lock(p, &flags);
 	update_rq_clock(rq);
 	old_state = p->state;
 	if (!(old_state & state))
@@ -2389,6 +2389,8 @@ static int try_to_wake_up(struct task_st
 		task_rq_unlock(rq, &flags);
 		/* might preempt at this point */
 		rq = task_rq_lock(p, &flags);
+		if (rq != orig_rq)
+			update_rq_clock(rq);
 		old_state = p->state;
 		if (!(old_state & state))
 			goto out;


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.97.6.10
retrieving revision 1.97.6.11
diff -u -p -r1.97.6.10 -r1.97.6.11
--- Makefile	8 Nov 2009 22:36:35 -0000	1.97.6.10
+++ Makefile	9 Dec 2009 21:44:00 -0000	1.97.6.11
@@ -15,7 +15,7 @@ UPSTREAM_CHECKS = sign
 TARGETS		= download
 
 define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
 endef
 
 MAKEFILE_COMMON := $(shell $(find-makefile-common))


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.238.6.46
retrieving revision 1.238.6.47
diff -u -p -r1.238.6.46 -r1.238.6.47
--- config-generic	12 Nov 2009 23:01:04 -0000	1.238.6.46
+++ config-generic	9 Dec 2009 21:44:00 -0000	1.238.6.47
@@ -3786,8 +3786,7 @@ CONFIG_MARKERS=y
 CONFIG_DEFAULT_RELATIME=y
 
 # LIRC
-CONFIG_INPUT_LIRC=y
-CONFIG_LIRC_DEV=m
+CONFIG_INPUT_LIRC=m
 CONFIG_LIRC_BT829=m
 CONFIG_LIRC_ENE0100=m
 CONFIG_LIRC_I2C=m
@@ -4079,3 +4078,7 @@ CONFIG_XEN_NETDEV2_FRONTEND=y
 CONFIG_XEN_NETDEV2_BYPASSABLE=y
 CONFIG_XEN_NETDEV2_BYPASS_ENDPOINT=y
 CONFIG_XEN_NETDEV2_AUTOMATIC_BYPASS=y
+CONFIG_NETFILTER_XT_TARGET_IMQ=m
+CONFIG_IMQ=m
+CONFIG_XEN_BLKDEV_TAP=m
+CONFIG_IMQ_NUM_DEVS=16

drm-nouveau.patch:
 drivers/gpu/drm/Kconfig                     |   56 
 drivers/gpu/drm/Makefile                    |    2 
 drivers/gpu/drm/i2c/Makefile                |    4 
 drivers/gpu/drm/i2c/ch7006_drv.c            |  531 
 drivers/gpu/drm/i2c/ch7006_mode.c           |  473 
 drivers/gpu/drm/i2c/ch7006_priv.h           |  344 
 drivers/gpu/drm/nouveau/Makefile            |   30 
 drivers/gpu/drm/nouveau/nouveau_acpi.c      |  125 
 drivers/gpu/drm/nouveau/nouveau_backlight.c |  155 
 drivers/gpu/drm/nouveau/nouveau_bios.c      | 6050 ++++++
 drivers/gpu/drm/nouveau/nouveau_bios.h      |  289 
 drivers/gpu/drm/nouveau/nouveau_bo.c        |  663 
 drivers/gpu/drm/nouveau/nouveau_calc.c      |  478 
 drivers/gpu/drm/nouveau/nouveau_channel.c   |  468 
 drivers/gpu/drm/nouveau/nouveau_connector.c |  812 
 drivers/gpu/drm/nouveau/nouveau_connector.h |   54 
 drivers/gpu/drm/nouveau/nouveau_crtc.h      |   95 
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  155 
 drivers/gpu/drm/nouveau/nouveau_display.c   |  115 
 drivers/gpu/drm/nouveau/nouveau_dma.c       |  206 
 drivers/gpu/drm/nouveau/nouveau_dma.h       |  157 
 drivers/gpu/drm/nouveau/nouveau_drv.c       |  413 
 drivers/gpu/drm/nouveau/nouveau_drv.h       | 1270 +
 drivers/gpu/drm/nouveau/nouveau_encoder.h   |   66 
 drivers/gpu/drm/nouveau/nouveau_fb.h        |   47 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  380 
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |   47 
 drivers/gpu/drm/nouveau/nouveau_fence.c     |  262 
 drivers/gpu/drm/nouveau/nouveau_gem.c       |  976 +
 drivers/gpu/drm/nouveau/nouveau_hw.c        | 1080 +
 drivers/gpu/drm/nouveau/nouveau_hw.h        |  455 
 drivers/gpu/drm/nouveau/nouveau_i2c.c       |  257 
 drivers/gpu/drm/nouveau/nouveau_i2c.h       |   45 
 drivers/gpu/drm/nouveau/nouveau_ioc32.c     |   72 
 drivers/gpu/drm/nouveau/nouveau_irq.c       |  702 
 drivers/gpu/drm/nouveau/nouveau_mem.c       |  583 
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |  196 
 drivers/gpu/drm/nouveau/nouveau_object.c    | 1294 +
 drivers/gpu/drm/nouveau/nouveau_reg.h       |  788 
 drivers/gpu/drm/nouveau/nouveau_sgdma.c     |  321 
 drivers/gpu/drm/nouveau/nouveau_state.c     |  865 
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  131 
 drivers/gpu/drm/nouveau/nv04_crtc.c         | 1002 +
 drivers/gpu/drm/nouveau/nv04_cursor.c       |   70 
 drivers/gpu/drm/nouveau/nv04_dac.c          |  528 
 drivers/gpu/drm/nouveau/nv04_dfp.c          |  621 
 drivers/gpu/drm/nouveau/nv04_display.c      |  293 
 drivers/gpu/drm/nouveau/nv04_fb.c           |   21 
 drivers/gpu/drm/nouveau/nv04_fbcon.c        |  316 
 drivers/gpu/drm/nouveau/nv04_fifo.c         |  271 
 drivers/gpu/drm/nouveau/nv04_graph.c        |  579 
 drivers/gpu/drm/nouveau/nv04_instmem.c      |  208 
 drivers/gpu/drm/nouveau/nv04_mc.c           |   20 
 drivers/gpu/drm/nouveau/nv04_timer.c        |   51 
 drivers/gpu/drm/nouveau/nv04_tv.c           |  305 
 drivers/gpu/drm/nouveau/nv10_fb.c           |   24 
 drivers/gpu/drm/nouveau/nv10_fifo.c         |  260 
 drivers/gpu/drm/nouveau/nv10_graph.c        |  892 
 drivers/gpu/drm/nouveau/nv17_gpio.c         |   92 
 drivers/gpu/drm/nouveau/nv17_tv.c           |  681 
 drivers/gpu/drm/nouveau/nv17_tv.h           |  156 
 drivers/gpu/drm/nouveau/nv17_tv_modes.c     |  583 
 drivers/gpu/drm/nouveau/nv20_graph.c        |  780 
 drivers/gpu/drm/nouveau/nv40_fb.c           |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c         |  314 
 drivers/gpu/drm/nouveau/nv40_graph.c        | 2240 ++
 drivers/gpu/drm/nouveau/nv40_mc.c           |   38 
 drivers/gpu/drm/nouveau/nv50_crtc.c         |  769 
 drivers/gpu/drm/nouveau/nv50_cursor.c       |  156 
 drivers/gpu/drm/nouveau/nv50_dac.c          |  304 
 drivers/gpu/drm/nouveau/nv50_display.c      |  998 +
 drivers/gpu/drm/nouveau/nv50_display.h      |   46 
 drivers/gpu/drm/nouveau/nv50_evo.h          |  113 
 drivers/gpu/drm/nouveau/nv50_fbcon.c        |  273 
 drivers/gpu/drm/nouveau/nv50_fifo.c         |  494 
 drivers/gpu/drm/nouveau/nv50_graph.c        |  470 
 drivers/gpu/drm/nouveau/nv50_grctx.h        |26832 ++++++++++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv50_instmem.c      |  509 
 drivers/gpu/drm/nouveau/nv50_mc.c           |   40 
 drivers/gpu/drm/nouveau/nv50_sor.c          |  269 
 drivers/gpu/drm/nouveau/nvreg.h             |  535 
 drivers/gpu/drm/ttm/ttm_bo.c                |    4 
 include/drm/Kbuild                          |    1 
 include/drm/i2c/ch7006.h                    |   86 
 include/drm/nouveau_drm.h                   |  220 
 85 files changed, 64038 insertions(+)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.8.6.24 -r 1.8.6.25 drm-nouveau.patchIndex: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.8.6.24
retrieving revision 1.8.6.25
diff -u -p -r1.8.6.24 -r1.8.6.25
--- drm-nouveau.patch	8 Nov 2009 22:36:37 -0000	1.8.6.24
+++ drm-nouveau.patch	9 Dec 2009 21:44:01 -0000	1.8.6.25
@@ -1450,10 +1450,10 @@ index 0000000..b06d3d9
 +#endif
 diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
 new file mode 100644
-index 0000000..e12b4ff
+index 0000000..fd75226
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/Makefile
-@@ -0,0 +1,29 @@
+@@ -0,0 +1,30 @@
 +#
 +# Makefile for the drm device driver.  This driver provides support for the
 +# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
@@ -1475,7 +1475,8 @@ index 0000000..e12b4ff
 +             nv50_crtc.o nv50_dac.o nv50_sor.o \
 +             nv50_cursor.o nv50_display.o nv50_fbcon.o \
 +             nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \
-+             nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o
++             nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \
++             nv17_gpio.o
 +
 +nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o
 +nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
@@ -1485,7 +1486,7 @@ index 0000000..e12b4ff
 +obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
 diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
 new file mode 100644
-index 0000000..ec0f2f3
+index 0000000..1cf4882
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
 @@ -0,0 +1,125 @@
@@ -1553,7 +1554,7 @@ index 0000000..ec0f2f3
 +
 +	err = acpi_evaluate_object(handle, "_DSM", &input, &output);
 +	if (err) {
-+		NV_ERROR(dev, "failed to evaluate _DSM: %d\n", err);
++		NV_INFO(dev, "failed to evaluate _DSM: %d\n", err);
 +		return err;
 +	}
 +
@@ -1777,10 +1778,10 @@ index 0000000..20564f8
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..34d193e
+index 0000000..0b5dc12
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,5716 @@
+@@ -0,0 +1,6050 @@
 +/*
 + * Copyright 2005-2006 Erik Waling
 + * Copyright 2006 Stephane Marchesin
@@ -1869,11 +1870,12 @@ index 0000000..34d193e
 +
 +static void load_vbios_prom(struct drm_device *dev, uint8_t *data)
 +{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +	uint32_t pci_nv_20, save_pci_nv_20;
 +	int pcir_ptr;
 +	int i;
 +
-+	if (nv_arch(dev) >= NV_50)
++	if (dev_priv->card_type >= NV_50)
 +		pci_nv_20 = 0x88050;
 +	else
 +		pci_nv_20 = NV_PBUS_PCI_NV_20;
@@ -1912,10 +1914,11 @@ index 0000000..34d193e
 +
 +static void load_vbios_pramin(struct drm_device *dev, uint8_t *data)
 +{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +	uint32_t old_bar0_pramin = 0;
 +	int i;
 +
-+	if (nv_arch(dev) >= NV_50) {
++	if (dev_priv->card_type >= NV_50) {
 +		uint32_t vbios_vram = (nv_rd32(dev, 0x619f04) & ~0xff) << 8;
 +
 +		if (!vbios_vram)
@@ -1934,7 +1937,7 @@ index 0000000..34d193e
 +		data[i] = nv_rd08(dev, NV_PRAMIN_OFFSET + i);
 +
 +out:
-+	if (nv_arch(dev) >= NV_50)
++	if (dev_priv->card_type >= NV_50)
 +		nv_wr32(dev, 0x1700, old_bar0_pramin);
 +}
 +
@@ -2074,18 +2077,21 @@ index 0000000..34d193e
 +static uint32_t
 +munge_reg(struct nvbios *bios, uint32_t reg)
 +{
-+	if (nv_arch(bios->dev) < NV_50)
-+		return reg;
++	struct drm_nouveau_private *dev_priv = bios->dev->dev_private;
++	struct dcb_entry *dcbent = bios->display.output;
 +
-+	if (!(reg & 0x40000000))
++	if (dev_priv->card_type < NV_50)
 +		return reg;
 +
-+	BUG_ON(!bios->display.output);
++	if (reg & 0x40000000) {
++		BUG_ON(!dcbent);
 +
-+	if (reg & 0x40000000)
-+		reg += (ffs(bios->display.output->or) - 1) * 0x800;
++		reg += (ffs(dcbent->or) - 1) * 0x800;
++		if ((reg & 0x20000000) && !(dcbent->sorconf.link & 1))
++			reg += 0x00000080;
++	}
 +
-+	reg &= ~0x40000000;
++	reg &= ~0x60000000;
 +	return reg;
 +}
 +
@@ -4255,103 +4261,146 @@ index 0000000..34d193e
 +}
 +
 +static bool
-+init_87(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++init_ram_restrict_pll(struct nvbios *bios, uint16_t offset,
++		      struct init_exec *iexec)
 +{
 +	/*
-+	 * INIT_87   opcode: 0x87 ('')
++	 * INIT_RAM_RESTRICT_PLL   opcode: 0x87 ('')
 +	 *
 +	 * offset      (8 bit): opcode
-+	 * offset + 1  (8 bit): unknown
-+	 * offset + 4 (32 bit): unknown entry 0
++	 * offset + 1  (8 bit): PLL type
++	 * offset + 2 (32 bit): frequency 0
 +	 *
-+	 * Unknown function.  Stubbed here as one of my cards can resume
-+	 * fine without it, but we'd still want to run the remainder
-+	 * of the script instead of aborting.
++	 * Uses the RAMCFG strap of PEXTDEV_BOOT as an index into the table at
++	 * ram_restrict_table_ptr.  The value read from there is used to select
++	 * a frequency from the table starting at 'frequency 0' to be
++	 * programmed into the PLL corresponding to 'type'.
 +	 *
-+	 * Starting from offset+4 there are BIT_M+2 32-bit entries.
++	 * The PLL limits table on cards using this opcode has a mapping of
++	 * 'type' to the relevant registers.
 +	 */
 +
-+	NV_WARN(bios->dev, "INIT_87 stubbed!\n");
++	struct drm_device *dev = bios->dev;
++	uint32_t strap = (bios_rd32(bios, NV_PEXTDEV_BOOT_0) & 0x0000003c) >> 2;
++	uint8_t index = bios->data[bios->ram_restrict_tbl_ptr + strap];
++	uint8_t type = bios->data[offset + 1];
++	uint32_t freq = ROM32(bios->data[offset + 2 + (index * 4)]);
++	uint8_t *pll_limits = &bios->data[bios->pll_limit_tbl_ptr], *entry;
++	int i;
++
++	if (!iexec->execute)
++		return true;
++
++	if (!bios->pll_limit_tbl_ptr || (pll_limits[0] & 0xf0) != 0x30) {
++		NV_ERROR(dev, "PLL limits table not version 3.x\n");
++		return true; /* deliberate, allow default clocks to remain */
++	}
++
++	entry = pll_limits + pll_limits[1];
++	for (i = 0; i < pll_limits[3]; i++, entry += pll_limits[2]) {
++		if (entry[0] == type) {
++			uint32_t reg = ROM32(entry[3]);
++
++			BIOSLOG(bios, "0x%04X: "
++				      "Type %02x Reg 0x%08x Freq %dKHz\n",
++				offset, type, reg, freq);
++
++			setPLL(bios, reg, freq);
++			return true;
++		}
++	}
++
++	NV_ERROR(dev, "PLL type 0x%02x not found in PLL limits table", type);
 +	return true;
 +}
 +
 +static bool
-+init_8e(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++init_8c(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
 +{
 +	/*
-+	 * INIT_8E   opcode: 0x8E ('')
++	 * INIT_8C   opcode: 0x8C ('')
[...6785 lines suppressed...]
++	0x0001, 0x00001e00,
++	0x0007, 0x00000000,
++	0x0001, 0x00000004,
++	0x0127, 0x00000000,
++	0x0001, 0x00000004,
++	0x0007, 0x00000000,
++	0x0001, 0x00000080,
++	0x0007, 0x00000000,
++	0x0001, 0x00000004,
++	0x0007, 0x00000000,
++	0x0001, 0x03020100,
++	0x0007, 0x00000000,
++	0x0001, 0x00000003,
++	0x0007, 0x00000000,
++	0x0001, 0x00001e00,
++	0x0007, 0x00000000,
++	0x0001, 0x00000004,
++	0x0027, 0x00000000,
++	0x0001, 0x00000004,
++	0x0007, 0x00000000,
++	0x0001, 0x00000003,
++	0x001f, 0x00000000,
++	0x0001, 0x00000004,
++	0x0101, 0x00000000,
++	0x0001, 0x00000021,
++	0x0007, 0x00000000,
++	0x0001, 0x00000001,
++	0x0007, 0x00000000,
++	0x0001, 0x00000002,
++	0x0007, 0x00000000,
++	0x0001, 0x00000100,
 +	0x0007, 0x00000000,
 +	0x0001, 0x00000100,
 +	0x0007, 0x00000000,
@@ -54981,8 +58146,10 @@ index 0000000..62914d8
 +	0x0001, 0x00000000,
 +	0x0001, 0x00000800,
 +	0x0005, 0x00000000,
++	0x0002, 0x00000001,
++	0x0001, 0x000e0080,
 +	0x0001, 0x00000004,
-+	0x0009, 0x00000000,
++	0x0006, 0x00000000,
 +	0x0001, 0x00000002,
 +	0x0001, 0x00000001,
 +	0x0003, 0x00000000,
@@ -54998,10 +58165,14 @@ index 0000000..62914d8
 +	0x0001, 0x00000000,
 +	0x0002, 0x00000001,
 +	0x0001, 0x00000000,
++	0x0003, 0x00000001,
++	0x0001, 0x00000004,
++	0x0003, 0x00000001,
 +	0x0001, 0x00000007,
-+	0x0007, 0x00000000,
 +	0x0001, 0x00000001,
-+	0x0008, 0x00000000,
++	0x0001, 0x00000007,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
 +	0x0001, 0x00000001,
 +	0x0001, 0x00000100,
 +	0x0001, 0x00000000,
@@ -55024,16 +58195,34 @@ index 0000000..62914d8
 +	0x0001, 0x00000008,
 +	0x0001, 0x00000014,
 +	0x0001, 0x00000000,
++	0x0001, 0x00000029,
 +	0x0001, 0x00000027,
-+	0x0007, 0x00000000,
++	0x0001, 0x00000026,
++	0x0001, 0x00000008,
++	0x0001, 0x00000004,
++	0x0001, 0x00000027,
++	0x0002, 0x00000000,
 +	0x0001, 0x00000001,
-+	0x0017, 0x00000000,
++	0x0001, 0x00000002,
++	0x0001, 0x00000003,
++	0x0001, 0x00000004,
++	0x0001, 0x00000005,
++	0x0001, 0x00000006,
++	0x0001, 0x00000007,
++	0x0001, 0x00000001,
++	0x0010, 0x00000000,
 +	0x0001, 0x000000cf,
 +	0x000b, 0x00000000,
++	0x0001, 0x00000080,
++	0x0002, 0x00000004,
++	0x0001, 0x00000003,
 +	0x0001, 0x00000001,
-+	0x0006, 0x00000000,
++	0x0002, 0x00000000,
++	0x0001, 0x00000012,
++	0x0001, 0x00000010,
++	0x0001, 0x0000000c,
 +	0x0001, 0x00000001,
-+	0x0006, 0x00000000,
++	0x0003, 0x00000000,
 +	0x0001, 0x00000004,
 +	0x0001, 0x00000002,
 +	0x0001, 0x00000004,
@@ -55052,10 +58241,14 @@ index 0000000..62914d8
 +	0x0004, 0x00000000,
 +	0x0001, 0x00000001,
 +	0x0001, 0x00000000,
++	0x0001, 0x00000002,
++	0x0001, 0x00001000,
++	0x0001, 0x00000e00,
++	0x0001, 0x00001000,
 +	0x0001, 0x00001e00,
-+	0x0005, 0x00000000,
-+	0x0001, 0x00000001,
-+	0x0007, 0x00000000,
++	0x0001, 0x00000000,
++	0x0005, 0x00000001,
++	0x0003, 0x00000000,
 +	0x0001, 0x00000200,
 +	0x0001, 0x00000000,
 +	0x0001, 0x00000001,
@@ -55181,12 +58374,28 @@ index 0000000..62914d8
 +	0x0003, 0x00000000,
 +	0x0001, 0x07ffffff,
 +	0x0006, 0x00000000,
++	0x0001, 0x00120407,
++	0x0001, 0x05091507,
++	0x0001, 0x05010202,
 +	0x0001, 0x00030201,
-+	0x0009, 0x00000000,
++	0x0006, 0x00000000,
++	0x0001, 0x00000040,
++	0x0001, 0x0d0c0b0a,
++	0x0001, 0x00141210,
++	0x0001, 0x000001f0,
++	0x0001, 0x00000001,
++	0x0001, 0x00000003,
 +	0x0001, 0x00008000,
-+	0x0007, 0x00000000,
++	0x0001, 0x00000000,
++	0x0001, 0x00039e00,
++	0x0001, 0x00000100,
++	0x0001, 0x00003800,
++	0x0001, 0x003fe006,
++	0x0001, 0x003fe000,
++	0x0001, 0x00404040,
++	0x0001, 0x0cf7f007,
 +	0x0001, 0x02bf7fff,
-+	0x0010, 0x00000000,
++	0x0009, 0x00000000,
 +	0x0001, 0x00000004,
 +	0x0004, 0x00000000,
 +	0x0001, 0x0000003f,
@@ -56236,7 +59445,7 @@ index 0000000..62914d8
 +	0x005000cb, 0x0048004d, ~0
 +};
 +
-+static unsigned nvac_ctxvals[] = {
++static uint32_t nvac_ctxvals[] = {
 +	0x0043, 0x00000000,
 +	0x0001, 0x00000030,
 +	0x0007, 0x00000000,
@@ -57585,7 +60794,7 @@ index 0000000..62914d8
 +	0x0070000e, 0x0070001c, 0x0060000c, ~0
 +};
 +
-+static unsigned nv94_ctxvals[] = {
++static uint32_t nv94_ctxvals[] = {
 +	0x0043, 0x00000000,
 +	0x0001, 0x00000030,
 +	0x0008, 0x00000000,
@@ -60192,10 +63401,10 @@ index 0000000..e0a9c3f
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
 new file mode 100644
-index 0000000..d7fab7d
+index 0000000..ef9dc02
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -0,0 +1,265 @@
+@@ -0,0 +1,269 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -60353,9 +63562,13 @@ index 0000000..d7fab7d
 +
 +	switch (nv_encoder->dcb->type) {
 +	case OUTPUT_TMDS:
-+		mode_ctl |= NV50_EVO_SOR_MODE_CTRL_TMDS;
-+		if (adjusted_mode->clock > 165000)
-+			mode_ctl |= NV50_EVO_SOR_MODE_CTRL_TMDS_DUAL_LINK;
++		if (nv_encoder->dcb->sorconf.link & 1) {
++			if (adjusted_mode->clock < 165000)
++				mode_ctl = 0x0100;
++			else
++				mode_ctl = 0x0500;
++		} else
++			mode_ctl = 0x0200;
 +		break;
 +	default:
 +		break;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.80
retrieving revision 1.1294.2.81
diff -u -p -r1.1294.2.80 -r1.1294.2.81
--- kernel.spec	13 Nov 2009 18:34:49 -0000	1.1294.2.80
+++ kernel.spec	9 Dec 2009 21:44:04 -0000	1.1294.2.81
@@ -624,12 +624,14 @@ Patch30: sched-introduce-SCHED_RESET_ON_
 
 Patch31: disable-stackprotector-all.patch
 
-Patch41: linux-2.6-sysrq-c.patch
-
 # Intel IOMMU fixes/workarounds
 Patch100: linux-2.6-die-closed-source-bios-muppets-die.patch
 Patch101: linux-2.6-intel-iommu-updates.patch
 Patch102: linux-2.6-iommu-at-zero.patch
+Patch103: linux-2.6-iommu-dmar-all-1s.patch
+Patch104: linux-2.6-iommu-another-hp-screwup.patch
+Patch105: linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch
+Patch106: linux-2.6-iommu-hp-cantiga-resume.patch
 
 Patch141: linux-2.6-ps3-storage-alias.patch
 Patch143: linux-2.6-g5-therm-shutdown.patch
@@ -681,12 +683,18 @@ Patch670: linux-2.6-ata-quirk.patch
 Patch671: linux-2.6-ahci-export-capabilities.patch
 
 Patch680: prism54-remove-pci-dev-table.patch
+Patch681: linux-2.6-ath9k-fixes.patch
 
 Patch800: linux-2.6-crash-driver.patch
 
 Patch900: linux-2.6-pci-cacheline-sizing.patch
 
+# ACPI
 Patch1100: linux-2.6.31-cpuidle-faster-io.patch
+# EC fixes from 2.6.32 (#492699, #525681)
+Patch1110: acpi-ec-merge-irq-and-poll-modes.patch
+Patch1120: acpi-ec-use-burst-mode-only-for-msi-notebooks.patch
+Patch1130: acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch
 
 Patch1515: lirc-2.6.31.patch
 Patch1517: hdpvr-ir-enable.patch
@@ -706,7 +714,7 @@ Patch1586: linux-2.6-virtio_blk-add-supp
 
 # nouveau + drm fixes
 Patch1810: kms-offb-handoff.patch
-Patch1812: drm-next-ea1495a6.patch
+Patch1812: drm-next-b390f944.patch
 Patch1813: drm-radeon-pm.patch
 Patch1814: drm-nouveau.patch
 Patch1818: drm-i915-resume-force-mode.patch
@@ -714,20 +722,23 @@ Patch1818: drm-i915-resume-force-mode.pa
 Patch1824: drm-intel-next.patch
 Patch1825: drm-intel-pm.patch
 Patch1826: drm-intel-no-tv-hotplug.patch
-Patch1827: drm-disable-r600-aspm.patch
-Patch1828: drm-radeon-agp-font-fix.patch
-Patch1829: drm-radeon-fix-ring-rmw-issue.patch
-Patch1830: drm-r600-lenovo-w500-fix.patch
+Patch1827: drm-i915-fix-tvmode-oops.patch
 Patch1831: drm-conservative-fallback-modes.patch
 Patch1832: drm-edid-retry.patch
-Patch1833: drm-radeon-fix-agp-resume.patch
 Patch1834: drm-edid-header-fixup.patch
+Patch1835: drm-default-mode.patch
+Patch1837: drm-i915-fix-sync-to-vbl-when-vga-is-off.patch
+Patch1839: drm-radeon-misc-fixes.patch
+Patch1840: drm-radeon-rv410-test-fix.patch
 
 # vga arb
 Patch1900: linux-2.6-vga-arb.patch
 Patch1901: drm-vga-arb.patch
 Patch1902: drm-radeon-kms-arbiter-return-ignore.patch
 
+# make harmless fbcon debug less loud
+Patch1903: fbcon-lower-debug.patch
+
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
 
@@ -750,7 +761,7 @@ Patch2904: v4l-dvb-fix-cx25840-firmware-
 Patch3000: linux-2.6-btrfs-upstream.patch
 
 # NFSv4
-Patch3050: linux-2.6-nfsd4-proots.patch
+Patch3050: linux-2.6.31-nfsd-proot.patch
 Patch3060: linux-2.6-nfs4-ver4opt.patch
 Patch3061: linux-2.6-nfs4-callback-hidden.patch
 
@@ -764,6 +775,15 @@ Patch12012: linux-2.6-rtc-show-hctosys.p
 Patch12013: linux-2.6-rfkill-all.patch
 Patch12014: linux-2.6-selinux-module-load-perms.patch
 
+# sched fixes cherry-picked from 2.6.32
+Patch13100: sched-deal-with-low-load-in-wake-affine.patch
+Patch13101: sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch
+Patch13102: sched-remove-shortcut-from-select-task-rq-fair.patch
+# latency defaults from 2.6.32
+Patch13110: sched-retune-scheduler-latency-defaults.patch
+# Fix huge wakeup latencies
+Patch13120: sched-update-the-clock-of-runqueue-select-task-rq-selected.patch
+
 # patches headed for -stable
 
 # make perf counter API available to userspace (#527264)
@@ -788,6 +808,15 @@ Patch14456: tg3-06-fix-5906-transmit-han
 
 Patch14460: highmem-Fix-debug_kmap_atomic-to-also-handle-KM_IRQ_.patch
 Patch14461: highmem-Fix-race-in-debug_kmap_atomic-which-could-ca.patch
+Patch14462: highmem-fix-arm-powerpc-kmap_types.patch
+
+Patch14463: dlm-fix-connection-close-handling.patch
+
+# rhbz#544144 [bbf31bf18d34caa87dd01f08bf713635593697f2]
+Patch14464: ipv4-fix-null-ptr-deref-in-ip_fragment.patch
+
+# rhbz#544471
+Patch14465: ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch
 
 Patch19997: xen.pvops.pre.patch
 Patch19998: xen.pvops.patch
@@ -1212,8 +1241,6 @@ ApplyPatch linux-2.6-utrace.patch
 ApplyPatch sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch
 
 ApplyPatch disable-stackprotector-all.patch
-# enable sysrq-c on all kernels, not only kexec
-#ApplyPatch linux-2.6-sysrq-c.patch
 
 # Architecture patches
 # x86(-64)
@@ -1230,6 +1257,13 @@ ApplyPatch linux-2.6-die-closed-source-b
 # all 0xFF, and claims that there's an IOMMU there.
 ApplyPatch linux-2.6-intel-iommu-updates.patch
 ApplyPatch linux-2.6-iommu-at-zero.patch
+ApplyPatch linux-2.6-iommu-dmar-all-1s.patch
+# Check for RMRRs which end before they start
+ApplyPatch linux-2.6-iommu-another-hp-screwup.patch
+# Apply the 'at zero' and 'all 0xFF' sanity checks for intr_remap too
+ApplyPatch linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch
+# Fix up MMIO BAR for integrated graphics on HP laptops on resume (#536675)
+ApplyPatch linux-2.6-iommu-hp-cantiga-resume.patch
 
 #
 # PowerPC
@@ -1270,7 +1304,7 @@ ApplyPatch linux-2.6-btrfs-upstream.patc
 # eCryptfs
 
 # NFSv4
-ApplyPatch linux-2.6-nfsd4-proots.patch
+ApplyPatch linux-2.6.31-nfsd-proot.patch
 ApplyPatch linux-2.6-nfs4-ver4opt.patch
 ApplyPatch linux-2.6-nfs4-callback-hidden.patch
 
@@ -1283,6 +1317,12 @@ ApplyPatch linux-2.6-usb-uvc-autosuspend
 # ACPI
 ApplyPatch linux-2.6-defaults-acpi-video.patch
 ApplyPatch linux-2.6-acpi-video-dos.patch
+# cpuidle: Fix the menu governor to boost IO performance
+ApplyPatch linux-2.6.31-cpuidle-faster-io.patch
+# EC fixes from 2.6.32 (#492699, #525681)
+ApplyPatch acpi-ec-merge-irq-and-poll-modes.patch
+ApplyPatch acpi-ec-use-burst-mode-only-for-msi-notebooks.patch
+ApplyPatch acpi-ec-restart-command-even-if-no-interrupts-from-ec.patch
 
 # Various low-impact patches to aid debugging.
 ApplyPatch linux-2.6-debug-sizeof-structs.patch
@@ -1360,15 +1400,15 @@ ApplyPatch linux-2.6-ahci-export-capabil
 # prism54: remove pci modinfo device table
 ApplyPatch prism54-remove-pci-dev-table.patch
 
+# ath9k: add fixes suggested by upstream maintainer
+ApplyPatch linux-2.6-ath9k-fixes.patch
+
 # /dev/crash driver.
 ApplyPatch linux-2.6-crash-driver.patch
 
 # Determine cacheline sizes in a generic manner.
 ApplyPatch linux-2.6-pci-cacheline-sizing.patch
 
-# cpuidle: Fix the menu governor to boost IO performance
-ApplyPatch linux-2.6.31-cpuidle-faster-io.patch
-
 # http://www.lirc.org/
 ApplyPatch lirc-2.6.31.patch
 # enable IR receiver on Hauppauge HD PVR (v4l-dvb merge pending)
@@ -1398,14 +1438,13 @@ ApplyPatch linux-2.6-e1000-ich9.patch
 
 # Nouveau DRM + drm fixes
 ApplyPatch kms-offb-handoff.patch
-ApplyPatch drm-next-ea1495a6.patch
-ApplyPatch drm-radeon-agp-font-fix.patch
-ApplyPatch drm-radeon-fix-ring-rmw-issue.patch
-ApplyPatch drm-r600-lenovo-w500-fix.patch
+ApplyPatch drm-next-b390f944.patch
+ApplyPatch drm-radeon-misc-fixes.patch
+ApplyPatch drm-radeon-rv410-test-fix.patch
 ApplyPatch drm-conservative-fallback-modes.patch
-ApplyPatch drm-radeon-fix-agp-resume.patch
 ApplyPatch drm-edid-retry.patch
 ApplyPatch drm-edid-header-fixup.patch
+ApplyPatch drm-default-mode.patch
 
 ApplyPatch drm-nouveau.patch
 # pm broken on my thinkpad t60p - airlied
@@ -1415,6 +1454,8 @@ ApplyOptionalPatch drm-intel-next.patch
 #this appears to be upstream - mjg59?
 #ApplyPatch drm-intel-pm.patch
 ApplyPatch drm-intel-no-tv-hotplug.patch
+ApplyPatch drm-i915-fix-tvmode-oops.patch
+ApplyPatch drm-i915-fix-sync-to-vbl-when-vga-is-off.patch
 #ApplyPatch drm-disable-r600-aspm.patch
 
 # VGA arb + drm
@@ -1422,6 +1463,9 @@ ApplyPatch linux-2.6-vga-arb.patch
 ApplyPatch drm-vga-arb.patch
 ApplyPatch drm-radeon-kms-arbiter-return-ignore.patch
 
+# Lower debug level of fbcon handover messages (rh#538526)
+ApplyPatch fbcon-lower-debug.patch
+
 # linux1394 git patches
 # apply if non-empty
 ApplyOptionalPatch linux-2.6-firewire-git-update.patch
@@ -1465,8 +1509,26 @@ ApplyPatch tg3-04-prevent-tx-bd-corrupti
 ApplyPatch tg3-05-assign-flags-to-fixes-in-start_xmit_dma_bug.patch
 ApplyPatch tg3-06-fix-5906-transmit-hangs.patch
 
-#ApplyPatch highmem-Fix-debug_kmap_atomic-to-also-handle-KM_IRQ_.patch
-#ApplyPatch highmem-Fix-race-in-debug_kmap_atomic-which-could-ca.patch
+# sched fixes cherry-picked from 2.6.32
+ApplyPatch sched-deal-with-low-load-in-wake-affine.patch
+ApplyPatch sched-ensure-child-cant-gain-time-over-its-parent-after-fork.patch
+ApplyPatch sched-remove-shortcut-from-select-task-rq-fair.patch
+# latency defaults from 2.6.32
+ApplyPatch sched-retune-scheduler-latency-defaults.patch
+# fix wakeup latency
+ApplyPatch sched-update-the-clock-of-runqueue-select-task-rq-selected.patch
+
+ApplyPatch highmem-Fix-debug_kmap_atomic-to-also-handle-KM_IRQ_.patch
+ApplyPatch highmem-Fix-race-in-debug_kmap_atomic-which-could-ca.patch
+ApplyPatch highmem-fix-arm-powerpc-kmap_types.patch
+
+ApplyPatch dlm-fix-connection-close-handling.patch
+
+# rhbz#544144
+ApplyPatch ipv4-fix-null-ptr-deref-in-ip_fragment.patch
+
+# rhbz#544471
+ApplyPatch ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch
 
 ApplyPatch xen.pvops.pre.patch
 ApplyPatch xen.pvops.patch
@@ -2120,6 +2182,126 @@ fi
 # and build.
 
 %changelog
+* Wed Dec 09 2009 Michael Young <m.a.young at durham.ac.uk>
+- update to latest pvops patch
+
+* Wed Dec 09 2009 Kyle McMartin <kyle at redhat.com> 2.6.31.6-166
+- ext4-fix-insufficient-checks-in-EXT4_IOC_MOVE_EXT.patch: CVE-2009-4131
+  fix insufficient permission checking which could result in arbitrary
+  data corruption by a local unprivileged user.
+
+* Tue Dec  8 2009 Steve Dickson <steved at redhat.com> 2.6.31.6-165
+- nfsd: Updated to latest pseudo root code fixing rhbz# 538609
+
+* Mon Dec 07 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-164
+- nouveau: fix NV17 breakage caused by NVA8 fixes
+- nouveau: use ratelimit for GPU error message
+
+* Fri Dec 04 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-163
+- nouveau: reduce debug level of some warning messages (rh#543883)
+- nouveau: modesetting fixes on nva5/nva8
+- nouveau: suspend/resume fixes on nva5/nva8 (bios opcode 0x8d)
+- nouveau: cleanup chipset/arch handling, fail init on unknown chipsets
+- nouveau: fix failure to detect some outputs when dcb table is odd
+- nouveau: eliminate unnecessary cursor state changes on nv50
+
+* Thu Dec 03 2009 Kyle McMartin <kyle at redhat.com> 2.6.31.6-162
+- ipv4-fix-null-ptr-deref-in-ip_fragment.patch: null ptr deref
+  bug fix.
+
+* Thu Dec 03 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-161
+- rv410 LVDS on resume test fix from AMD (#541562)
+
+* Wed Dec 02 2009 John W. Linville <linville at redhat.com> 2.6.31.6-160
+- ath9k: add fixes suggested by upstream maintainer
+
+* Wed Dec 02 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-159
+- drm-radeon-misc-fixes.patch: r400 LVDS, r600 digital dpms, cursor fix, tv property
+
+* Wed Dec 02 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-158
+- nouveau: more complete lvds script selection on >=G80 (rh#522690, rh#529859)
+- nouveau: more complete tmds script selection on >=G80 (rh#537853)
+- nouveau: TV detection fixes
+
+* Tue Dec 01 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-157
+- div/0 fix harder (#540593) - also ignore unposted GPUs with no BIOS
+
+* Tue Dec 01 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-156
+- drm-next: fixes LVDS resume on r4xx, div/0 on no bios (#540593)
+  lockup on tv-out only startup.
+
+* Mon Nov 30 2009 Kyle McMartin <kyle at redhat.com>
+- drm-i915-fix-sync-to-vbl-when-vga-is-off.patch: add (rhbz#541670)
+
+* Sun Nov 29 2009 Kyle McMartin <kyle at redhat.com>
+- Drop linux-2.6-sysrq-c.patch, made consistent upstream.
+
+* Fri Nov 27 2009 Jarod Wilson <jarod at redhat.com> 2.6.31.6-153
+- add device name to lirc_zilog, fixes issues w/multiple target devices
+- add lirc_imon pure input mode support for onboard decode devices
+
+* Wed Nov 26 2009 David Woodhouse <David.Woodhouse at intel.com> 2.6.31.6-152
+- Fix intel_tv_mode_set oops (#540218)
+
+* Wed Nov 26 2009 David Woodhouse <David.Woodhouse at intel.com> 2.6.31.6-151
+- VT-d: Work around yet more HP BIOS brokenness (#536675)
+
+* Wed Nov 25 2009 Kyle McMartin <kyle at redhat.com>
+- dlm: fix connection close handling.
+  Fix by lmb, requested by fabio.
+
+* Wed Nov 25 2009 David Woodhouse <David.Woodhouse at intel.com> 2.6.31.6-149
+- VT-d: Work around more HP BIOS brokenness.
+
+* Tue Nov 24 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-148
+- radeon: flush HDP cache on rendering wait - fixes r600 rendercheck failure
+
+* Mon Nov 23 2009 Adam Jackson <ajax at redhat.com>
+- drm-default-mode.patch: Default to 1024x768 to match UMS. (#538761)
+
+* Mon Nov 23 2009 Roland McGrath <roland at redhat.com> 2.6.31.6-146
+- Fix oops in x86-32 kernel's iret handling for bogus user %cs. (#540580)
+
+* Fri Nov 21 2009 Kyle McMartin <kyle at redhat.com>
+- Fix up ssp' highmem fixes with fixes for arm & ppc.
+
+* Thu Nov 20 2009 Chris Wright <chrisw at redhat.com> 2.6.31.6-144
+- VT-d: another fallback for another BIOS bug (#524808)
+
+* Thu Nov 19 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-142
+- Oops, add new patch to spec file
+
+* Thu Nov 19 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-141
+- Lower debug level of fbcon handover messages (rh#538526)
+
+* Thu Nov 19 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-140
+- drm-next-44c83571.patch: oops pulled the wrong tree into my f12 tree
+
+* Thu Nov 19 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.6-139
+- nouveau: s/r fixes on chipsets using bios opcode 0x87
+- nouveau: fixes to bios opcode 0x8e
+- nouveau: hopefully fix nv1x context switching issues (rh#526577)
+- nouveau: support for NVA5 (GeForce G220)
+- nouveau: fixes for NVAA support
+
+* Thu Nov 19 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-138
+- drm-next-d56672a9.patch: fix some rn50 cloning issues
+
+* Wed Nov 18 2009 David Woodhouse <David.Woodhouse at intel.com> 2.6.31.6-137
+- Actually force the IOMMU not to be used when we detect the HP/Acer bug.
+
+* Tue Nov 17 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.6-136
+- ACPI embedded controller fixes from Fedora 11.
+
+* Tue Nov 17 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.6-135
+- Scheduler fixes and latency tuning patches from F-11.
+
+* Tue Nov 17 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-134
+- glad to see edid retry patch was compiled.
+
+* Tue Nov 17 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-133
+- drm-next-984d1f3c.patch: rebase with upstream fixes - drop all merged
+
 * Fri Nov 13 2009 Michael Young <m.a.young at durham.ac.uk>
 - fix typo in drm-edid-retry.patch
 

linux-2.6-execshield.patch:
 arch/x86/include/asm/desc.h      |   25 +++++++
 arch/x86/include/asm/mmu.h       |    7 ++
 arch/x86/include/asm/paravirt.h  |    9 ++
 arch/x86/include/asm/processor.h |    3 
 arch/x86/kernel/cpu/common.c     |   14 ++++
 arch/x86/kernel/paravirt.c       |    3 
 arch/x86/kernel/process_32.c     |   48 ++++++++++++++
 arch/x86/kernel/traps.c          |  129 ++++++++++++++++++++++++++++++++++++---
 arch/x86/mm/init.c               |    6 +
 arch/x86/mm/init_32.c            |   48 ++++++++++++++
 arch/x86/mm/mmap.c               |    5 +
 arch/x86/mm/tlb.c                |    7 ++
 arch/x86/vdso/vdso32-setup.c     |    2 
 arch/x86/xen/enlighten.c         |   21 ++++++
 fs/binfmt_elf.c                  |   21 +++++-
 include/linux/mm.h               |    8 ++
 include/linux/mm_types.h         |    3 
 include/linux/resource.h         |    5 +
 include/linux/sched.h            |    7 ++
 kernel/sysctl.c                  |   28 ++++++++
 mm/mmap.c                        |  121 ++++++++++++++++++++++++++++++++++--
 mm/mprotect.c                    |   10 ++-
 mm/mremap.c                      |    4 -
 23 files changed, 506 insertions(+), 28 deletions(-)

Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-execshield.patch,v
retrieving revision 1.102.6.3
retrieving revision 1.102.6.4
diff -u -p -r1.102.6.3 -r1.102.6.4
--- linux-2.6-execshield.patch	27 Jun 2009 11:05:15 -0000	1.102.6.3
+++ linux-2.6-execshield.patch	9 Dec 2009 21:44:04 -0000	1.102.6.4
@@ -381,7 +381,7 @@ index 07d60c8..41e9129 100644
 +			info.si_errno = 0;
 +			info.si_code = ILL_BADSTK;
 +			info.si_addr = 0;
-+			do_trap(32, SIGSEGV, "iret exception", 0, error_code, &info);
++			do_trap(32, SIGSEGV, "iret exception", regs, error_code, &info);
 +	}
  }
  #endif

linux-2.6-iommu-at-zero.patch:
 dmar.c |   50 ++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 40 insertions(+), 10 deletions(-)

Index: linux-2.6-iommu-at-zero.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/linux-2.6-iommu-at-zero.patch,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.1 -r1.1.2.2
--- linux-2.6-iommu-at-zero.patch	8 Nov 2009 22:36:41 -0000	1.1.2.1
+++ linux-2.6-iommu-at-zero.patch	9 Dec 2009 21:44:04 -0000	1.1.2.2
@@ -18,7 +18,7 @@ index 22b02c6..e5f8fc1 100644
  	dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL);
  	if (!dmaru)
  		return -ENOMEM;
-@@ -591,12 +582,50 @@ int __init dmar_table_init(void)
+@@ -591,12 +582,51 @@ int __init dmar_table_init(void)
  	return 0;
  }
  
@@ -49,6 +49,7 @@ index 22b02c6..e5f8fc1 100644
 +				     dmi_get_system_info(DMI_BIOS_VENDOR),
 +				     dmi_get_system_info(DMI_BIOS_VERSION),
 +				     dmi_get_system_info(DMI_PRODUCT_VERSION));
++				dmar_disabled = 1;
 +				return 0;
 +			}
 +			break;

lirc-2.6.31.patch:
 MAINTAINERS                           |    9 
 drivers/input/Kconfig                 |    2 
 drivers/input/Makefile                |    2 
 drivers/input/lirc/Kconfig            |  114 +
 drivers/input/lirc/Makefile           |   21 
 drivers/input/lirc/lirc.h             |  100 +
 drivers/input/lirc/lirc_bt829.c       |  383 +++++
 drivers/input/lirc/lirc_dev.c         |  837 +++++++++++
 drivers/input/lirc/lirc_dev.h         |  194 ++
 drivers/input/lirc/lirc_ene0100.c     |  645 ++++++++
 drivers/input/lirc/lirc_ene0100.h     |  169 ++
 drivers/input/lirc/lirc_i2c.c         |  538 +++++++
 drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++
 drivers/input/lirc/lirc_imon.c        | 2467 ++++++++++++++++++++++++++++++++++
 drivers/input/lirc/lirc_imon.h        |  209 ++
 drivers/input/lirc/lirc_it87.c        |  986 +++++++++++++
 drivers/input/lirc/lirc_it87.h        |  116 +
 drivers/input/lirc/lirc_ite8709.c     |  540 +++++++
 drivers/input/lirc/lirc_mceusb.c      | 1232 ++++++++++++++++
 drivers/input/lirc/lirc_parallel.c    |  709 +++++++++
 drivers/input/lirc/lirc_parallel.h    |   26 
 drivers/input/lirc/lirc_sasem.c       |  931 ++++++++++++
 drivers/input/lirc/lirc_serial.c      | 1316 ++++++++++++++++++
 drivers/input/lirc/lirc_sir.c         | 1283 +++++++++++++++++
 drivers/input/lirc/lirc_streamzap.c   |  794 ++++++++++
 drivers/input/lirc/lirc_ttusbir.c     |  397 +++++
 drivers/input/lirc/lirc_zilog.c       | 1396 +++++++++++++++++++
 27 files changed, 15972 insertions(+)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.2.2.4 -r 1.2.2.5 lirc-2.6.31.patchIndex: lirc-2.6.31.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/lirc-2.6.31.patch,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -p -r1.2.2.4 -r1.2.2.5
--- lirc-2.6.31.patch	16 Oct 2009 16:09:25 -0000	1.2.2.4
+++ lirc-2.6.31.patch	9 Dec 2009 21:44:04 -0000	1.2.2.5
@@ -1,6 +1,6 @@
 Linux Infrared Remote Control drivers -- http://www.lirc.org
 
-Last updated: Thursday, September 03, 2009
+Last updated: Friday, November 27, 2009
 
 From http://git.wilsonet.com/linux-2.6-lirc.git/
 
@@ -10,36 +10,37 @@ Signed-off-by: Jarod Wilson <jarod at redha
  MAINTAINERS                           |    9 +
  drivers/input/Kconfig                 |    2 +
  drivers/input/Makefile                |    2 +
- drivers/input/lirc/Kconfig            |  119 ++
+ drivers/input/lirc/Kconfig            |  114 ++
  drivers/input/lirc/Makefile           |   21 +
  drivers/input/lirc/lirc.h             |  100 ++
- drivers/input/lirc/lirc_bt829.c       |  383 ++++++
- drivers/input/lirc/lirc_dev.c         |  839 ++++++++++++
- drivers/input/lirc/lirc_dev.h         |  184 +++
- drivers/input/lirc/lirc_ene0100.c     |  644 +++++++++
+ drivers/input/lirc/lirc_bt829.c       |  383 +++++
+ drivers/input/lirc/lirc_dev.c         |  837 +++++++++++
+ drivers/input/lirc/lirc_dev.h         |  194 +++
+ drivers/input/lirc/lirc_ene0100.c     |  645 +++++++++
  drivers/input/lirc/lirc_ene0100.h     |  169 +++
- drivers/input/lirc/lirc_i2c.c         |  537 ++++++++
+ drivers/input/lirc/lirc_i2c.c         |  538 +++++++
  drivers/input/lirc/lirc_igorplugusb.c |  556 ++++++++
- drivers/input/lirc/lirc_imon.c        | 2301 +++++++++++++++++++++++++++++++++
- drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++
+ drivers/input/lirc/lirc_imon.c        | 2467 +++++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_imon.h        |  209 +++
+ drivers/input/lirc/lirc_it87.c        |  986 +++++++++++++
  drivers/input/lirc/lirc_it87.h        |  116 ++
- drivers/input/lirc/lirc_ite8709.c     |  539 ++++++++
- drivers/input/lirc/lirc_mceusb.c      | 1242 ++++++++++++++++++
+ drivers/input/lirc/lirc_ite8709.c     |  540 +++++++
+ drivers/input/lirc/lirc_mceusb.c      | 1232 ++++++++++++++++
  drivers/input/lirc/lirc_parallel.c    |  709 ++++++++++
  drivers/input/lirc/lirc_parallel.h    |   26 +
  drivers/input/lirc/lirc_sasem.c       |  931 +++++++++++++
- drivers/input/lirc/lirc_serial.c      | 1316 +++++++++++++++++++
- drivers/input/lirc/lirc_sir.c         | 1283 ++++++++++++++++++
- drivers/input/lirc/lirc_streamzap.c   |  794 ++++++++++++
+ drivers/input/lirc/lirc_serial.c      | 1316 ++++++++++++++++++
+ drivers/input/lirc/lirc_sir.c         | 1283 +++++++++++++++++
+ drivers/input/lirc/lirc_streamzap.c   |  794 +++++++++++
  drivers/input/lirc/lirc_ttusbir.c     |  397 ++++++
- drivers/input/lirc/lirc_zilog.c       | 1395 ++++++++++++++++++++
- 26 files changed, 15600 insertions(+), 0 deletions(-)
+ drivers/input/lirc/lirc_zilog.c       | 1396 +++++++++++++++++++
+ 27 files changed, 15972 insertions(+), 0 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 8dca9d8..f25dc26 100644
+index 81d68d5..f6af1bd 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -3129,6 +3129,15 @@ W:	http://www.pasemi.com/
+@@ -3219,6 +3219,15 @@ W:	http://www.pasemi.com/
  L:	linuxppc-dev at ozlabs.org
  S:	Supported
  
@@ -80,15 +81,15 @@ index 4c9c745..99e2b5e 100644
 +obj-$(CONFIG_INPUT_LIRC)       += lirc/
 diff --git a/drivers/input/lirc/Kconfig b/drivers/input/lirc/Kconfig
 new file mode 100644
-index 0000000..ab13cfe
+index 0000000..8678018
 --- /dev/null
 +++ b/drivers/input/lirc/Kconfig
-@@ -0,0 +1,119 @@
+@@ -0,0 +1,114 @@
 +#
 +# LIRC driver(s) configuration
 +#
 +menuconfig INPUT_LIRC
-+	bool "Linux Infrared Remote Control IR receiver/transmitter drivers"
++	tristate "Linux Infrared Remote Control IR receiver/transmitter drivers"
 +	help
 +	  Say Y here, and all supported Linux Infrared Remote Control IR and
 +	  RF receiver and transmitter drivers will be displayed. When paired
@@ -97,20 +98,15 @@ index 0000000..ab13cfe
 +
 +if INPUT_LIRC
 +
-+config LIRC_DEV
-+	tristate "LIRC device loadable module support"
-+	help
-+	  LIRC device loadable module support, required for most LIRC drivers
-+
 +config LIRC_BT829
 +        tristate "BT829 based hardware"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for the IR interface on BT829-based hardware
 +
 +config LIRC_ENE0100
 +	tristate "ENE KB3924/ENE0100 CIR Port Reciever"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  This is a driver for CIR port handled by ENE KB3924 embedded
 +	  controller found on some notebooks.
@@ -118,56 +114,56 @@ index 0000000..ab13cfe
 +
 +config LIRC_I2C
 +	tristate "I2C Based IR Receivers"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for I2C-based IR receivers, such as those commonly
 +	  found onboard Hauppauge PVR-150/250/350 video capture cards
 +
 +config LIRC_IGORPLUGUSB
 +	tristate "Igor Cesko's USB IR Receiver"
-+	depends on LIRC_DEV && USB
++	depends on INPUT_LIRC && USB
 +	help
 +	  Driver for Igor Cesko's USB IR Receiver
 +
 +config LIRC_IMON
-+	tristate "Soundgraph IMON Receiver"
-+	depends on LIRC_DEV
++	tristate "SoundGraph iMON Receiver and Display"
++	depends on INPUT_LIRC
 +	help
-+	  Driver for the Soundgraph IMON IR Receiver
++	  Driver for the SoundGraph iMON IR Receiver and Display
 +
 +config LIRC_IT87
 +	tristate "ITE IT87XX CIR Port Receiver"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for the ITE IT87xx IR Receiver
 +
 +config LIRC_ITE8709
 +	tristate "ITE8709 CIR Port Receiver"
-+	depends on LIRC_DEV && PNP
++	depends on INPUT_LIRC && PNP
 +	help
 +	  Driver for the ITE8709 IR Receiver
 +
 +config LIRC_MCEUSB
 +	tristate "Windows Media Center Ed. USB IR Transceiver"
-+	depends on LIRC_DEV && USB
++	depends on INPUT_LIRC && USB
 +	help
 +	  Driver for Windows Media Center Ed. USB IR Transceivers
 +
 +config LIRC_PARALLEL
 +	tristate "Homebrew Parallel Port Receiver"
-+	depends on LIRC_DEV && !SMP
++	depends on INPUT_LIRC && !SMP
 +	help
 +	  Driver for Homebrew Parallel Port Receivers
 +
 +config LIRC_SASEM
 +	tristate "Sasem USB IR Remote"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module
 +
 +config LIRC_SERIAL
 +	tristate "Homebrew Serial Port Receiver"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for Homebrew Serial Port Receivers
 +
@@ -180,32 +176,32 @@ index 0000000..ab13cfe
 +
 +config LIRC_SIR
 +	tristate "Built-in SIR IrDA port"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for the SIR IrDA port
 +
 +config LIRC_STREAMZAP
 +	tristate "Streamzap PC Receiver"
-+	depends on LIRC_DEV
++	depends on INPUT_LIRC
 +	help
 +	  Driver for the Streamzap PC Receiver
 +
 +config LIRC_TTUSBIR
 +	tristate "Technotrend USB IR Receiver"
-+	depends on LIRC_DEV && USB
[...1952 lines suppressed...]
-+	dprintk("%s - ret = %d status = 0x%x 0x%x\n", __func__,
++	dev_dbg(ir->d->dev, "%s - ret = %d status = 0x%x 0x%x\n", __func__,
 +		ret, data[0], data[1]);
 +
 +	/*
@@ -8526,29 +8903,29 @@ index 0000000..8b48a56
 +	ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0),
 +			      USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0,
 +			      data, 2, HZ * 3);
-+	dprintk("%s - ret = %d, devnum = %d\n",
++	dev_dbg(ir->d->dev, "%s - ret = %d, devnum = %d\n",
 +		__func__, ret, ir->usbdev->devnum);
-+	dprintk("%s - data[0] = %d, data[1] = %d\n",
++	dev_dbg(ir->d->dev, "%s - data[0] = %d, data[1] = %d\n",
 +		__func__, data[0], data[1]);
 +
-+	/* set feature */
++	/* set feature: bit rate 38400 bps */
 +	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 +			      USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
 +			      0xc04e, 0x0000, NULL, 0, HZ * 3);
 +
-+	dprintk("%s - ret = %d\n", __func__, ret);
++	dev_dbg(ir->d->dev, "%s - ret = %d\n", __func__, ret);
 +
-+	/* strange: bRequest == 4 */
++	/* bRequest 4: set char length to 8 bits */
 +	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 +			      4, USB_TYPE_VENDOR,
 +			      0x0808, 0x0000, NULL, 0, HZ * 3);
-+	dprintk("%s - retB = %d\n", __func__, ret);
++	dev_dbg(ir->d->dev, "%s - retB = %d\n", __func__, ret);
 +
-+	/* strange: bRequest == 2 */
++	/* bRequest 2: set handshaking to use DTR/DSR */
 +	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 +			      2, USB_TYPE_VENDOR,
 +			      0x0000, 0x0100, NULL, 0, HZ * 3);
-+	dprintk("%s - retC = %d\n", __func__, ret);
++	dev_dbg(ir->d->dev, "%s - retC = %d\n", __func__, ret);
 +
 +	return ret;
 +
@@ -8574,7 +8951,7 @@ index 0000000..8b48a56
 +	int is_pinnacle;
 +	int is_microsoft_gen1;
 +
-+	dprintk(DRIVER_NAME ": %s called\n", __func__);
++	dev_dbg(&intf->dev, ": %s called\n", __func__);
 +
 +	usb_reset_device(dev);
 +
@@ -8598,7 +8975,7 @@ index 0000000..8b48a56
 +			|| ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
 +			    == USB_ENDPOINT_XFER_INT))) {
 +
-+			dprintk(DRIVER_NAME ": acceptable inbound endpoint "
++			dev_dbg(&intf->dev, ": acceptable inbound endpoint "
 +				"found\n");
 +			ep_in = ep;
 +			ep_in->bmAttributes = USB_ENDPOINT_XFER_INT;
@@ -8620,7 +8997,7 @@ index 0000000..8b48a56
 +			|| ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
 +			    == USB_ENDPOINT_XFER_INT))) {
 +
-+			dprintk(DRIVER_NAME ": acceptable outbound endpoint "
++			dev_dbg(&intf->dev, ": acceptable outbound endpoint "
 +				"found\n");
 +			ep_out = ep;
 +			ep_out->bmAttributes = USB_ENDPOINT_XFER_INT;
@@ -8635,7 +9012,7 @@ index 0000000..8b48a56
 +		}
 +	}
 +	if (ep_in == NULL) {
-+		dprintk(DRIVER_NAME ": inbound and/or endpoint not found\n");
++		dev_dbg(&intf->dev, ": inbound and/or endpoint not found\n");
 +		return -ENODEV;
 +	}
 +
@@ -8679,7 +9056,7 @@ index 0000000..8b48a56
 +		goto mem_failure_switch;
 +	}
 +
-+	strcpy(driver->name, DRIVER_NAME " ");
++	strcpy(driver->name, DRIVER_NAME);
 +	driver->minor = -1;
 +	driver->features = LIRC_CAN_SEND_PULSE |
 +		LIRC_CAN_SET_TRANSMITTER_MASK |
@@ -8717,8 +9094,7 @@ index 0000000..8b48a56
 +	case 2:
 +		kfree(ir);
 +	case 1:
-+		printk(DRIVER_NAME "[%d]: out of memory (code=%d)\n",
-+			devnum, mem_failure);
++		dev_info(&intf->dev, "out of memory (code=%d)\n", mem_failure);
 +		return -ENOMEM;
 +	}
 +
@@ -8752,8 +9128,6 @@ index 0000000..8b48a56
 +			  buf, sizeof(buf)) > 0)
 +		snprintf(name + strlen(name), sizeof(name) - strlen(name),
 +			 " %s", buf);
-+	printk(DRIVER_NAME "[%d]: %s on usb%d:%d\n", devnum, name,
-+	       dev->bus->busnum, devnum);
 +
 +	/* inbound data */
 +	usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in,
@@ -8775,8 +9149,7 @@ index 0000000..8b48a56
 +		 */
 +
 +		usbret = usb_reset_configuration(dev);
-+		printk(DRIVER_NAME "[%d]: usb reset config ret %x\n",
-+		       devnum, usbret);
++		dev_info(ir->d->dev, "usb reset config ret %x\n", usbret);
 +
 +		/*
 +		 * its possible we really should wait for a return
@@ -8817,6 +9190,9 @@ index 0000000..8b48a56
 +
 +	usb_set_intfdata(intf, ir);
 +
++	dev_info(ir->d->dev, "Registered %s on usb%d:%d\n", name,
++		 dev->bus->busnum, devnum);
++
 +	return 0;
 +}
 +
@@ -8846,7 +9222,7 @@ index 0000000..8b48a56
 +static int mceusb_dev_suspend(struct usb_interface *intf, pm_message_t message)
 +{
 +	struct mceusb_dev *ir = usb_get_intfdata(intf);
-+	printk(DRIVER_NAME "[%d]: suspend\n", ir->devnum);
++	dev_info(ir->d->dev, "suspend\n");
 +	usb_kill_urb(ir->urb_in);
 +	return 0;
 +}
@@ -8854,7 +9230,7 @@ index 0000000..8b48a56
 +static int mceusb_dev_resume(struct usb_interface *intf)
 +{
 +	struct mceusb_dev *ir = usb_get_intfdata(intf);
-+	printk(DRIVER_NAME "[%d]: resume\n", ir->devnum);
++	dev_info(ir->d->dev, "resume\n");
 +	if (usb_submit_urb(ir->urb_in, GFP_ATOMIC))
 +		return -EIO;
 +	return 0;
@@ -8876,11 +9252,13 @@ index 0000000..8b48a56
 +
 +	printk(KERN_INFO DRIVER_NAME ": " DRIVER_DESC " " DRIVER_VERSION "\n");
 +	printk(KERN_INFO DRIVER_NAME ": " DRIVER_AUTHOR "\n");
-+	dprintk(DRIVER_NAME ": debug mode enabled\n");
++	if (debug)
++		printk(KERN_DEBUG DRIVER_NAME ": debug mode enabled\n");
 +
 +	i = usb_register(&mceusb_dev_driver);
 +	if (i < 0) {
-+		printk(DRIVER_NAME ": usb register failed, result = %d\n", i);
++		printk(KERN_ERR DRIVER_NAME
++		       ": usb register failed, result = %d\n", i);
 +		return -ENODEV;
 +	}
 +
@@ -11912,7 +12290,7 @@ index 0000000..d602e90
 +MODULE_PARM_DESC(debug, "Enable debugging messages");
 diff --git a/drivers/input/lirc/lirc_sir.c b/drivers/input/lirc/lirc_sir.c
 new file mode 100644
-index 0000000..b497642
+index 0000000..d28d006
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_sir.c
 @@ -0,0 +1,1283 @@
@@ -12292,7 +12670,7 @@ index 0000000..b497642
 +	case LIRC_SET_SEND_DUTY_CYCLE:
 +		retval = get_user(ivalue, (unsigned int *) arg);
 +		if (retval)
-+			return reetval;
++			return retval;
 +		if (ivalue <= 0 || ivalue > 100)
 +			return -EINVAL;
 +		/* (ivalue/100)*(1000000/freq) */
@@ -14404,10 +14782,10 @@ index 0000000..2955bad
 +module_exit(ttusbir_exit_module);
 diff --git a/drivers/input/lirc/lirc_zilog.c b/drivers/input/lirc/lirc_zilog.c
 new file mode 100644
-index 0000000..c4080f5
+index 0000000..b19c447
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_zilog.c
-@@ -0,0 +1,1395 @@
+@@ -0,0 +1,1396 @@
 +/*
 + * i2c IR lirc driver for devices with zilog IR processors
 + *
@@ -15703,6 +16081,7 @@ index 0000000..c4080f5
 +	ir->l.fops	  = &lirc_fops;
 +	ir->l.data	  = ir;
 +	ir->l.minor       = minor;
++	ir->l.dev         = &adap->dev;
 +	ir->l.sample_rate = 0;
 +
 +	/* register with lirc */

sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch:
 include/linux/sched.h |    6 +++++
 kernel/sched.c        |   54 ++++++++++++++++++++++++++++++++++++++++++--------
 2 files changed, 52 insertions(+), 8 deletions(-)

Index: sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -p -r1.2.2.2 -r1.2.2.3
--- sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch	27 Jun 2009 11:05:16 -0000	1.2.2.2
+++ sched-introduce-SCHED_RESET_ON_FORK-scheduling-policy-flag.patch	9 Dec 2009 21:44:05 -0000	1.2.2.3
@@ -1,3 +1,33 @@
+Rollup of:
+
+
+From: Lennart Poettering <lennart at poettering.net>
+Date: Mon, 15 Jun 2009 15:17:47 +0000 (+0200)
+Subject: sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag
+X-Git-Tag: v2.6.32-rc1~719^2~55
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=ca94c442535a44d508c99a77e54f21a59f4fc462
+
+sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag
+
+
+From: Mike Galbraith <efault at gmx.de>
+Date: Wed, 17 Jun 2009 08:46:01 +0000 (+0200)
+Subject: sched: Clean up SCHED_RESET_ON_FORK
+X-Git-Tag: v2.6.32-rc1~719^2~54
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b9dc29e72fd3dc2a739ce8eafd958220d0745734
+
+sched: Clean up SCHED_RESET_ON_FORK
+
+
+From: Mike Galbraith <efault at gmx.de>
+Date: Wed, 17 Jun 2009 08:48:02 +0000 (+0200)
+Subject: sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
+X-Git-Tag: v2.6.32-rc1~719^2~53
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6c697bdf08a09ce461e305a22362973036e95db3
+
+sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
+
+
 diff --git a/include/linux/sched.h b/include/linux/sched.h
 index 4d07542..5ba2c37 100644
 --- a/include/linux/sched.h

xen.pvops.patch:
 arch/x86/Kconfig                                     |   14 
 arch/x86/Makefile                                    |    2 
 arch/x86/include/asm/agp.h                           |   17 
 arch/x86/include/asm/e820.h                          |    2 
 arch/x86/include/asm/fixmap.h                        |   25 
 arch/x86/include/asm/hpet.h                          |    2 
 arch/x86/include/asm/i387.h                          |    1 
 arch/x86/include/asm/io.h                            |   15 
 arch/x86/include/asm/io_apic.h                       |    7 
 arch/x86/include/asm/microcode.h                     |    9 
 arch/x86/include/asm/mmu.h                           |    3 
 arch/x86/include/asm/paravirt.h                      |  720 --------
 arch/x86/include/asm/paravirt_types.h                |  724 ++++++++
 arch/x86/include/asm/pci.h                           |    9 
 arch/x86/include/asm/pci_x86.h                       |    2 
 arch/x86/include/asm/pgtable.h                       |    6 
 arch/x86/include/asm/processor.h                     |    4 
 arch/x86/include/asm/pvclock.h                       |    6 
 arch/x86/include/asm/syscalls.h                      |    8 
 arch/x86/include/asm/tlbflush.h                      |    6 
 arch/x86/include/asm/vgtod.h                         |   64 
 arch/x86/include/asm/vsyscall.h                      |   32 
 arch/x86/include/asm/xen/hypercall.h                 |   44 
 arch/x86/include/asm/xen/interface.h                 |    8 
 arch/x86/include/asm/xen/interface_32.h              |    5 
 arch/x86/include/asm/xen/interface_64.h              |   13 
 arch/x86/include/asm/xen/iommu.h                     |   12 
 arch/x86/include/asm/xen/page.h                      |   16 
 arch/x86/include/asm/xen/pci.h                       |   58 
 arch/x86/include/asm/xen/swiotlb.h                   |   10 
 arch/x86/kernel/Makefile                             |    6 
 arch/x86/kernel/acpi/boot.c                          |   18 
 arch/x86/kernel/acpi/processor.c                     |   14 
 arch/x86/kernel/acpi/sleep.c                         |    2 
 arch/x86/kernel/apic/io_apic.c                       |   68 
 arch/x86/kernel/cpu/mtrr/Makefile                    |    1 
 arch/x86/kernel/cpu/mtrr/amd.c                       |    6 
 arch/x86/kernel/cpu/mtrr/centaur.c                   |    6 
 arch/x86/kernel/cpu/mtrr/cyrix.c                     |    6 
 arch/x86/kernel/cpu/mtrr/generic.c                   |   10 
 arch/x86/kernel/cpu/mtrr/main.c                      |   19 
 arch/x86/kernel/cpu/mtrr/mtrr.h                      |   11 
 arch/x86/kernel/cpu/mtrr/xen.c                       |  104 +
 arch/x86/kernel/e820.c                               |   30 
 arch/x86/kernel/hpet.c                               |    8 
 arch/x86/kernel/ioport.c                             |   40 
 arch/x86/kernel/kvmclock.c                           |    7 
 arch/x86/kernel/ldt.c                                |    3 
 arch/x86/kernel/microcode_core.c                     |    5 
 arch/x86/kernel/microcode_xen.c                      |  200 ++
 arch/x86/kernel/paravirt.c                           |    1 
 arch/x86/kernel/pci-dma.c                            |    6 
 arch/x86/kernel/pci-swiotlb.c                        |   25 
 arch/x86/kernel/process.c                            |   27 
 arch/x86/kernel/process_32.c                         |   27 
 arch/x86/kernel/process_64.c                         |   33 
 arch/x86/kernel/pvclock.c                            |  190 +-
 arch/x86/kernel/setup.c                              |    4 
 arch/x86/kernel/traps.c                              |   33 
 arch/x86/kernel/tsc.c                                |    4 
 arch/x86/kernel/vsyscall_64.c                        |   91 -
 arch/x86/mm/Makefile                                 |    7 
 arch/x86/mm/gup.c                                    |    5 
 arch/x86/mm/init_32.c                                |   42 
 arch/x86/mm/ioremap.c                                |   72 
 arch/x86/mm/pat.c                                    |    2 
 arch/x86/mm/pgtable.c                                |   18 
 arch/x86/mm/physaddr.c                               |   70 
 arch/x86/mm/physaddr.h                               |   10 
 arch/x86/mm/tlb.c                                    |   35 
 arch/x86/pci/Makefile                                |    1 
 arch/x86/pci/common.c                                |   18 
 arch/x86/pci/i386.c                                  |    3 
 arch/x86/pci/init.c                                  |    6 
 arch/x86/pci/xen.c                                   |   66 
 arch/x86/vdso/vclock_gettime.c                       |   46 
 arch/x86/vdso/vgetcpu.c                              |   17 
 arch/x86/xen/Kconfig                                 |   38 
 arch/x86/xen/Makefile                                |    5 
 arch/x86/xen/apic.c                                  |   57 
 arch/x86/xen/enlighten.c                             |  120 +
 arch/x86/xen/grant-table.c                           |   38 
 arch/x86/xen/mmu.c                                   |  491 +++++
 arch/x86/xen/pci-swiotlb.c                           |  997 +++++++++++
 arch/x86/xen/pci.c                                   |  153 +
 arch/x86/xen/setup.c                                 |  115 +
 arch/x86/xen/smp.c                                   |    5 
 arch/x86/xen/suspend.c                               |   17 
 arch/x86/xen/time.c                                  |   68 
 arch/x86/xen/vga.c                                   |   67 
 arch/x86/xen/xen-asm_64.S                            |    4 
 arch/x86/xen/xen-ops.h                               |   29 
 block/blk-core.c                                     |    2 
 drivers/acpi/acpica/hwsleep.c                        |   17 
 drivers/acpi/processor_core.c                        |  347 +++
 drivers/acpi/processor_idle.c                        |  103 +
 drivers/acpi/processor_perflib.c                     |  123 +
 drivers/acpi/sleep.c                                 |   19 
 drivers/block/Kconfig                                |    1 
 drivers/block/xen-blkfront.c                         |   14 
 drivers/char/agp/intel-agp.c                         |   17 
 drivers/char/hvc_xen.c                               |  120 +
 drivers/gpu/drm/drm_drv.c                            |    2 
 drivers/gpu/drm/drm_gem.c                            |    2 
 drivers/gpu/drm/drm_scatter.c                        |   67 
 drivers/gpu/drm/ttm/ttm_bo_vm.c                      |    2 
 drivers/input/Kconfig                                |    1 
 drivers/input/xen-kbdfront.c                         |    2 
 drivers/net/Kconfig                                  |  174 ++
 drivers/net/Makefile                                 |    2 
 drivers/net/imq.c                                    |  594 ++++++
 drivers/net/xen-netchannel2/Makefile                 |   25 
 drivers/net/xen-netchannel2/autobypass.c             |  316 +++
 drivers/net/xen-netchannel2/bypass.c                 |  823 +++++++++
 drivers/net/xen-netchannel2/bypassee.c               |  803 +++++++++
 drivers/net/xen-netchannel2/chan.c                   |  843 +++++++++
 drivers/net/xen-netchannel2/netback2.c               |  482 +++++
 drivers/net/xen-netchannel2/netchan2.c               |   32 
 drivers/net/xen-netchannel2/netchannel2_core.h       |  796 +++++++++
 drivers/net/xen-netchannel2/netchannel2_endpoint.h   |   63 
 drivers/net/xen-netchannel2/netchannel2_uspace.h     |   17 
 drivers/net/xen-netchannel2/netfront2.c              |  514 +++++
 drivers/net/xen-netchannel2/offload.c                |  181 ++
 drivers/net/xen-netchannel2/poll.c                   |   59 
 drivers/net/xen-netchannel2/receiver_map.c           |  787 +++++++++
 drivers/net/xen-netchannel2/recv_packet.c            |  333 +++
 drivers/net/xen-netchannel2/rscb.c                   |  435 +++++
 drivers/net/xen-netchannel2/tools/destroy_bypass.c   |   25 
 drivers/net/xen-netchannel2/tools/establish_bypass.c |   31 
 drivers/net/xen-netchannel2/util.c                   |  241 ++
 drivers/net/xen-netchannel2/xmit_packet.c            |  374 ++++
 drivers/net/xen-netfront.c                           |   10 
 drivers/pci/Kconfig                                  |    9 
 drivers/pci/Makefile                                 |    4 
 drivers/pci/msi.c                                    |    5 
 drivers/pci/xen-iommu.c                              |  274 +++
 drivers/pci/xen-pcifront.c                           | 1134 +++++++++++++
 drivers/video/Kconfig                                |    1 
 drivers/video/broadsheetfb.c                         |    2 
 drivers/video/fb_defio.c                             |    4 
 drivers/video/hecubafb.c                             |    2 
 drivers/video/metronomefb.c                          |    2 
 drivers/video/xen-fbfront.c                          |    4 
 drivers/xen/Kconfig                                  |  125 +
 drivers/xen/Makefile                                 |   28 
 drivers/xen/acpi.c                                   |   23 
 drivers/xen/acpi_processor.c                         |  336 +++
 drivers/xen/balloon.c                                |  314 ++-
 drivers/xen/biomerge.c                               |   14 
 drivers/xen/blkback/Makefile                         |    3 
 drivers/xen/blkback/blkback-pagemap.c                |  104 +
 drivers/xen/blkback/blkback-pagemap.h                |   20 
 drivers/xen/blkback/blkback.c                        |  673 +++++++
 drivers/xen/blkback/common.h                         |  143 +
 drivers/xen/blkback/interface.c                      |  186 ++
 drivers/xen/blkback/vbd.c                            |  118 +
 drivers/xen/blkback/xenbus.c                         |  541 ++++++
 drivers/xen/blktap/Makefile                          |    3 
 drivers/xen/blktap/blktap.h                          |  243 ++
 drivers/xen/blktap/control.c                         |  280 +++
 drivers/xen/blktap/device.c                          | 1140 +++++++++++++
 drivers/xen/blktap/request.c                         |  298 +++
 drivers/xen/blktap/ring.c                            |  615 +++++++
 drivers/xen/blktap/sysfs.c                           |  452 +++++
 drivers/xen/blktap/wait_queue.c                      |   40 
 drivers/xen/events.c                                 |  527 +++++-
 drivers/xen/evtchn.c                                 |   82 
 drivers/xen/features.c                               |    2 
 drivers/xen/gntdev.c                                 |  625 +++++++
 drivers/xen/grant-table.c                            |  491 +++++
 drivers/xen/live_maps.c                              |   61 
 drivers/xen/manage.c                                 |   37 
 drivers/xen/mce.c                                    |  213 ++
 drivers/xen/netback/Makefile                         |    3 
 drivers/xen/netback/common.h                         |  223 ++
 drivers/xen/netback/interface.c                      |  401 ++++
 drivers/xen/netback/netback.c                        | 1650 +++++++++++++++++++
 drivers/xen/netback/xenbus.c                         |  470 +++++
 drivers/xen/pci.c                                    |  124 +
 drivers/xen/pciback/Makefile                         |   17 
 drivers/xen/pciback/conf_space.c                     |  435 +++++
 drivers/xen/pciback/conf_space.h                     |  126 +
 drivers/xen/pciback/conf_space_capability.c          |   66 
 drivers/xen/pciback/conf_space_capability.h          |   26 
 drivers/xen/pciback/conf_space_capability_msi.c      |   84 
 drivers/xen/pciback/conf_space_capability_pm.c       |  113 +
 drivers/xen/pciback/conf_space_capability_vpd.c      |   40 
 drivers/xen/pciback/conf_space_header.c              |  318 +++
 drivers/xen/pciback/conf_space_quirks.c              |  140 +
 drivers/xen/pciback/conf_space_quirks.h              |   35 
 drivers/xen/pciback/controller.c                     |  442 +++++
 drivers/xen/pciback/passthrough.c                    |  178 ++
 drivers/xen/pciback/pci_stub.c                       | 1307 +++++++++++++++
 drivers/xen/pciback/pciback.h                        |  133 +
 drivers/xen/pciback/pciback_ops.c                    |  130 +
 drivers/xen/pciback/slot.c                           |  191 ++
 drivers/xen/pciback/vpci.c                           |  244 ++
 drivers/xen/pciback/xenbus.c                         |  709 ++++++++
 drivers/xen/pcpu.c                                   |  420 ++++
 drivers/xen/xenbus/Makefile                          |    5 
 drivers/xen/xenbus/xenbus_client.c                   |   15 
 drivers/xen/xenbus/xenbus_comms.c                    |    1 
 drivers/xen/xenbus/xenbus_probe.c                    |  384 +---
 drivers/xen/xenbus/xenbus_probe.h                    |   29 
 drivers/xen/xenbus/xenbus_probe_backend.c            |  298 +++
 drivers/xen/xenbus/xenbus_probe_frontend.c           |  292 +++
 drivers/xen/xenbus/xenbus_xs.c                       |  187 ++
 drivers/xen/xenfs/Makefile                           |    3 
 drivers/xen/xenfs/privcmd.c                          |  403 ++++
 drivers/xen/xenfs/super.c                            |   98 +
 drivers/xen/xenfs/xenfs.h                            |    3 
 drivers/xen/xenfs/xenstored.c                        |   67 
 include/acpi/processor.h                             |   17 
 include/asm-generic/pci.h                            |    2 
 include/drm/drmP.h                                   |    2 
 include/linux/fb.h                                   |    1 
 include/linux/imq.h                                  |   13 
 include/linux/interrupt.h                            |    1 
 include/linux/mm.h                                   |   15 
 include/linux/netdevice.h                            |    1 
 include/linux/netfilter/xt_IMQ.h                     |    9 
 include/linux/netfilter_ipv4/ipt_IMQ.h               |   10 
 include/linux/netfilter_ipv6/ip6t_IMQ.h              |   10 
 include/linux/page-flags.h                           |   18 
 include/linux/sched.h                                |   15 
 include/linux/skbuff.h                               |   22 
 include/linux/swiotlb.h                              |    1 
 include/net/netfilter/nf_queue.h                     |   12 
 include/xen/Kbuild                                   |    1 
 include/xen/acpi.h                                   |   79 
 include/xen/balloon.h                                |    8 
 include/xen/blkif.h                                  |  123 +
 include/xen/events.h                                 |   32 
 include/xen/gntdev.h                                 |  119 +
 include/xen/grant_table.h                            |   80 
 include/xen/interface/grant_table.h                  |  195 ++
 include/xen/interface/io/netchannel2.h               |  342 +++
 include/xen/interface/io/pciif.h                     |  124 +
 include/xen/interface/io/ring.h                      |    3 
 include/xen/interface/io/uring.h                     |  426 ++++
 include/xen/interface/io/xenbus.h                    |    8 
 include/xen/interface/memory.h                       |   92 +
 include/xen/interface/physdev.h                      |   51 
 include/xen/interface/platform.h                     |  363 ++++
 include/xen/interface/vcpu.h                         |   41 
 include/xen/interface/xen-mca.h                      |  429 ++++
 include/xen/interface/xen.h                          |   45 
 include/xen/live_maps.h                              |  165 +
 include/xen/pcpu.h                                   |   30 
 include/xen/privcmd.h                                |   80 
 include/xen/swiotlb.h                                |  102 +
 include/xen/xen-ops.h                                |   11 
 include/xen/xenbus.h                                 |    4 
 kernel/irq/manage.c                                  |    3 
 kernel/sched.c                                       |   14 
 lib/swiotlb.c                                        |    5 
 mm/memory.c                                          |   42 
 mm/mmap.c                                            |   12 
 mm/page_alloc.c                                      |   14 
 net/core/dev.c                                       |   13 
 net/core/skbuff.c                                    |   96 +
 net/netfilter/Kconfig                                |   12 
 net/netfilter/Makefile                               |    1 
 net/netfilter/nf_queue.c                             |   52 
 net/netfilter/xt_IMQ.c                               |   73 
 265 files changed, 34863 insertions(+), 1834 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.1.2.50 -r 1.1.2.51 xen.pvops.patchIndex: xen.pvops.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.patch,v
retrieving revision 1.1.2.50
retrieving revision 1.1.2.51
diff -u -p -r1.1.2.50 -r1.1.2.51
--- xen.pvops.patch	12 Nov 2009 23:01:10 -0000	1.1.2.50
+++ xen.pvops.patch	9 Dec 2009 21:44:05 -0000	1.1.2.51
@@ -158,7 +158,7 @@ index 7b2d71d..026ee10 100644
   * 'index to address' translation. If anyone tries to use the idx
   * directly without translation, we catch the bug with a NULL-deference
 diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h
-index 1c22cb0..be24e01 100644
+index 1c22cb0..ed15247 100644
 --- a/arch/x86/include/asm/hpet.h
 +++ b/arch/x86/include/asm/hpet.h
 @@ -67,6 +67,7 @@ extern unsigned long hpet_address;
@@ -173,7 +173,7 @@ index 1c22cb0..be24e01 100644
  #else /* CONFIG_HPET_TIMER */
  
  static inline int hpet_enable(void) { return 0; }
-+static inline int disable_hpet(char *) { return 0; }
++static inline int disable_hpet(char *s) { return 0; }
  static inline int is_hpet_enabled(void) { return 0; }
  #define hpet_readl(a) 0
  
@@ -263,6 +263,20 @@ index ef51b50..e15fca1 100644
 +#endif
 +
  #endif /* _ASM_X86_MICROCODE_H */
+diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
+index 80a1dee..67eaa91 100644
+--- a/arch/x86/include/asm/mmu.h
++++ b/arch/x86/include/asm/mmu.h
+@@ -13,6 +13,9 @@ typedef struct {
+ 	int size;
+ 	struct mutex lock;
+ 	void *vdso;
++#ifdef CONFIG_XEN
++	int has_foreign_mappings;
++#endif
+ } mm_context_t;
+ 
+ #ifdef CONFIG_SMP
 diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
 index 43b8adb..e8420a2 100644
 --- a/arch/x86/include/asm/paravirt.h
@@ -1823,7 +1837,7 @@ index b399988..30cbf49 100644
  extern void __init dmi_check_skip_isa_align(void);
  
 diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
-index 1674807..3658a86 100644
+index 1674807..c751eeb 100644
 --- a/arch/x86/include/asm/pgtable.h
 +++ b/arch/x86/include/asm/pgtable.h
 @@ -402,6 +402,9 @@ static inline unsigned long pages_to_mb(unsigned long npg)
@@ -1836,6 +1850,16 @@ index 1674807..3658a86 100644
  #if PAGETABLE_LEVELS > 2
  static inline int pud_none(pud_t pud)
  {
+@@ -626,6 +629,9 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
+        memcpy(dst, src, count * sizeof(pgd_t));
+ }
+ 
++int create_lookup_pte_addr(struct mm_struct *mm,
++                           unsigned long address,
++                           uint64_t *ptep);
+ 
+ #include <asm-generic/pgtable.h>
+ #endif	/* __ASSEMBLY__ */
 diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
 index e597ecc..f7d2c8f 100644
 --- a/arch/x86/include/asm/processor.h
@@ -2459,7 +2483,7 @@ index 6b8ca3a..d47c54f 100644
  
  	set_fixmap_nocache(FIX_APIC_BASE, address);
 diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
-index d296f4a..721272b 100644
+index d296f4a..05ef6a6 100644
 --- a/arch/x86/kernel/acpi/processor.c
 +++ b/arch/x86/kernel/acpi/processor.c
 @@ -11,6 +11,7 @@
@@ -2470,16 +2494,26 @@ index d296f4a..721272b 100644
  
  static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
  {
-@@ -78,6 +79,9 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
- {
- 	struct cpuinfo_x86 *c = &cpu_data(pr->id);
+@@ -87,6 +88,19 @@ void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
  
-+	if (xen_pv_domain())
-+		c = &cpu_data(0);
+ EXPORT_SYMBOL(arch_acpi_processor_init_pdc);
+ 
++/* Initialize _PDC data based on the CPU vendor */
++void xen_arch_acpi_processor_init_pdc(struct acpi_processor *pr)
++{
++	struct cpuinfo_x86 *c = &cpu_data(0);
++
++	pr->pdc = NULL;
++	if (c->x86_vendor == X86_VENDOR_INTEL)
++		init_intel_pdc(pr, c);
 +
- 	pr->pdc = NULL;
- 	if (c->x86_vendor == X86_VENDOR_INTEL)
- 		init_intel_pdc(pr, c);
++	return;
++}
++EXPORT_SYMBOL(xen_arch_acpi_processor_init_pdc);
++
+ void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr)
+ {
+ 	if (pr->pdc) {
 diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
 index ca93638..9eff23c 100644
 --- a/arch/x86/kernel/acpi/sleep.c
@@ -3110,6 +3144,20 @@ index e5efcdc..f1310e3 100644
  }
  
  /*
+diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
+index 71f1d99..d9ea853 100644
+--- a/arch/x86/kernel/ldt.c
++++ b/arch/x86/kernel/ldt.c
+@@ -109,6 +109,9 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+ 
+ 	mutex_init(&mm->context.lock);
+ 	mm->context.size = 0;
++#ifdef CONFIG_XEN
++	mm->context.has_foreign_mappings = 0;
++#endif
+ 	old_mm = current->mm;
+ 	if (old_mm && old_mm->context.size > 0) {
+ 		mutex_lock(&old_mm->context.lock);
 diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
 index 9371448..4cb6bbd 100644
 --- a/arch/x86/kernel/microcode_core.c
@@ -3593,10 +3641,10 @@ index ebefb54..a28279d 100644
  }
  
 diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
-index 03801f2..f47f91e 100644
+index 03801f2..1b5d3e8 100644
 --- a/arch/x86/kernel/pvclock.c
 +++ b/arch/x86/kernel/pvclock.c
-@@ -17,21 +17,12 @@
+@@ -17,27 +17,19 @@
  
  #include <linux/kernel.h>
  #include <linux/percpu.h>
@@ -3623,7 +3671,15 @@ index 03801f2..f47f91e 100644
  
  /*
   * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
-@@ -71,30 +62,11 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
+  * yielding a 64-bit result.
+  */
+-static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
++static __always_inline
++u64 scale_delta(u64 delta, u32 mul_frac, int shift)
+ {
+ 	u64 product;
+ #ifdef __i386__
+@@ -71,30 +63,11 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
  	return product;
  }
  
@@ -3658,7 +3714,7 @@ index 03801f2..f47f91e 100644
  }
  
  unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
-@@ -109,18 +81,30 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
+@@ -109,18 +82,30 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
  	return pv_tsc_khz;
  }
  
@@ -3696,7 +3752,7 @@ index 03801f2..f47f91e 100644
  	} while (version != src->version);
  
  	return ret;
-@@ -151,3 +135,118 @@ void pvclock_read_wallclock(struct pvclock_wall_clock *wall_clock,
+@@ -151,3 +136,118 @@ void pvclock_read_wallclock(struct pvclock_wall_clock *wall_clock,
  
  	set_normalized_timespec(ts, now.tv_sec, now.tv_nsec);
  }
@@ -4045,6 +4101,22 @@ index 0088329..dbd1f6a 100644
  
  # Make sure __phys_addr has no stackprotector
  nostackp := $(call cc-option, -fno-stack-protector)
+diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
+index 71da1bc..892b8eb 100644
+--- a/arch/x86/mm/gup.c
++++ b/arch/x86/mm/gup.c
+@@ -313,6 +313,11 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
+ 		goto slow_irqon;
+ #endif
+ 
++#ifdef CONFIG_XEN
++	if (unlikely(mm->context.has_foreign_mappings))
[...7859 lines suppressed...]
+ config NETFILTER_XT_TARGET_MARK
+ 	tristate '"MARK" target support'
+ 	default m if NETFILTER_ADVANCED=n
+diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
+index 49f62ee..43f0664 100644
+--- a/net/netfilter/Makefile
++++ b/net/netfilter/Makefile
+@@ -46,6 +46,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
++obj-$(CONFIG_NETFILTER_XT_TARGET_IMQ) += xt_IMQ.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o
+diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
+index 3a6fd77..bba774c 100644
+--- a/net/netfilter/nf_queue.c
++++ b/net/netfilter/nf_queue.c
+@@ -20,6 +20,26 @@ static const struct nf_queue_handler *queue_handler[NFPROTO_NUMPROTO] __read_mos
+ 
+ static DEFINE_MUTEX(queue_handler_mutex);
+ 
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++static const struct nf_queue_handler *queue_imq_handler;
++
++void nf_register_queue_imq_handler(const struct nf_queue_handler *qh)
++{
++	mutex_lock(&queue_handler_mutex);
++	rcu_assign_pointer(queue_imq_handler, qh);
++	mutex_unlock(&queue_handler_mutex);
++}
++EXPORT_SYMBOL(nf_register_queue_imq_handler);
++
++void nf_unregister_queue_imq_handler(void)
++{
++	mutex_lock(&queue_handler_mutex);
++	rcu_assign_pointer(queue_imq_handler, NULL);
++	mutex_unlock(&queue_handler_mutex);
++}
++EXPORT_SYMBOL(nf_unregister_queue_imq_handler);
++#endif
++
+ /* return EBUSY when somebody else is registered, return EEXIST if the
+  * same handler is registered, return 0 in case of success. */
+ int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
+@@ -80,7 +100,7 @@ void nf_unregister_queue_handlers(const struct nf_queue_handler *qh)
+ }
+ EXPORT_SYMBOL_GPL(nf_unregister_queue_handlers);
+ 
+-static void nf_queue_entry_release_refs(struct nf_queue_entry *entry)
++void nf_queue_entry_release_refs(struct nf_queue_entry *entry)
+ {
+ 	/* Release those devices we held, or Alexey will kill me. */
+ 	if (entry->indev)
+@@ -100,6 +120,7 @@ static void nf_queue_entry_release_refs(struct nf_queue_entry *entry)
+ 	/* Drop reference to owner of hook which queued us. */
+ 	module_put(entry->elem->owner);
+ }
++EXPORT_SYMBOL_GPL(nf_queue_entry_release_refs);
+ 
+ /*
+  * Any packet that leaves via this function must come back
+@@ -121,12 +142,26 @@ static int __nf_queue(struct sk_buff *skb,
+ #endif
+ 	const struct nf_afinfo *afinfo;
+ 	const struct nf_queue_handler *qh;
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++	const struct nf_queue_handler *qih = NULL;
++#endif
+ 
+ 	/* QUEUE == DROP if noone is waiting, to be safe. */
+ 	rcu_read_lock();
+ 
+ 	qh = rcu_dereference(queue_handler[pf]);
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
++	if (pf == PF_INET || pf == PF_INET6)
++#else
++	if (pf == PF_INET)
++#endif
++		qih = rcu_dereference(queue_imq_handler);
++
++	if (!qh && !qih)
++#else /* !IMQ */
+ 	if (!qh)
++#endif
+ 		goto err_unlock;
+ 
+ 	afinfo = nf_get_afinfo(pf);
+@@ -145,6 +180,10 @@ static int __nf_queue(struct sk_buff *skb,
+ 		.indev	= indev,
+ 		.outdev	= outdev,
+ 		.okfn	= okfn,
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++		.next_outfn = qh ? qh->outfn : NULL,
++		.next_queuenum = queuenum,
++#endif
+ 	};
+ 
+ 	/* If it's going away, ignore hook. */
+@@ -170,8 +209,19 @@ static int __nf_queue(struct sk_buff *skb,
+ 	}
+ #endif
+ 	afinfo->saveroute(skb, entry);
++
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++	if (qih) {
++		status = qih->outfn(entry, queuenum);
++		goto imq_skip_queue;
++	}
++#endif
++
+ 	status = qh->outfn(entry, queuenum);
+ 
++#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
++imq_skip_queue:
++#endif
+ 	rcu_read_unlock();
+ 
+ 	if (status < 0) {
+diff --git a/net/netfilter/xt_IMQ.c b/net/netfilter/xt_IMQ.c
+new file mode 100644
+index 0000000..4d58d83
+--- /dev/null
++++ b/net/netfilter/xt_IMQ.c
+@@ -0,0 +1,73 @@
++/*
++ * This target marks packets to be enqueued to an imq device
++ */
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/netfilter/x_tables.h>
++#include <linux/netfilter/xt_IMQ.h>
++#include <linux/imq.h>
++
++static unsigned int imq_target(struct sk_buff *pskb,
++				const struct xt_target_param *par)
++{
++	const struct xt_imq_info *mr = par->targinfo;
++
++	pskb->imq_flags = (mr->todev & IMQ_F_IFMASK) | IMQ_F_ENQUEUE;
++
++	return XT_CONTINUE;
++}
++
++static bool imq_checkentry(const struct xt_tgchk_param *par)
++{
++	struct xt_imq_info *mr = par->targinfo;
++
++	if (mr->todev > IMQ_MAX_DEVS - 1) {
++		printk(KERN_WARNING
++		       "IMQ: invalid device specified, highest is %u\n",
++		       IMQ_MAX_DEVS - 1);
++		return 0;
++	}
++
++	return 1;
++}
++
++static struct xt_target xt_imq_reg[] __read_mostly = {
++	{
++		.name           = "IMQ",
++		.family		= AF_INET,
++		.checkentry     = imq_checkentry,
++		.target         = imq_target,
++		.targetsize	= sizeof(struct xt_imq_info),
++		.table		= "mangle",
++		.me             = THIS_MODULE
++	},
++	{
++		.name           = "IMQ",
++		.family		= AF_INET6,
++		.checkentry     = imq_checkentry,
++		.target         = imq_target,
++		.targetsize	= sizeof(struct xt_imq_info),
++		.table		= "mangle",
++		.me             = THIS_MODULE
++	},
++};
++
++static int __init imq_init(void)
++{
++	return xt_register_targets(xt_imq_reg, ARRAY_SIZE(xt_imq_reg));
++}
++
++static void __exit imq_fini(void)
++{
++	xt_unregister_targets(xt_imq_reg, ARRAY_SIZE(xt_imq_reg));
++}
++
++module_init(imq_init);
++module_exit(imq_fini);
++
++MODULE_AUTHOR("http://www.linuximq.net");
++MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("ipt_IMQ");
++MODULE_ALIAS("ip6t_IMQ");
++

xen.pvops.post.patch:
 arch/x86/include/asm/mmu.h              |    4 ++++
 b/arch/x86/include/asm/paravirt_types.h |    3 +++
 b/arch/x86/kernel/process_32.c          |    2 ++
 b/arch/x86/pci/common.c                 |   16 ++++++++++++++++
 drivers/gpu/drm/drm_gem.c               |    1 -
 drivers/pci/pci.h                       |    2 ++
 include/linux/mm.h                      |    1 +
 linux-2.6.31.noarch/arch/x86/Makefile   |    1 -
 linux-2.6.31.x86_64/drivers/net/Kconfig |    1 +
 9 files changed, 29 insertions(+), 2 deletions(-)

Index: xen.pvops.post.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.post.patch,v
retrieving revision 1.1.2.33
retrieving revision 1.1.2.34
diff -u -p -r1.1.2.33 -r1.1.2.34
--- xen.pvops.post.patch	12 Nov 2009 23:01:13 -0000	1.1.2.33
+++ xen.pvops.post.patch	9 Dec 2009 21:44:09 -0000	1.1.2.34
@@ -68,18 +68,6 @@ index 2202b62..f371fe8 100644
  }
  
  int __init pcibios_init(void)
-diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
-index ffe8f43..230c9ff 100644
---- a/drivers/gpu/drm/drm_gem.c
-+++ b/drivers/gpu/drm/drm_gem.c
-@@ -539,7 +539,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
- 	vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
- 	vma->vm_ops = obj->dev->driver->gem_vm_ops;
- 	vma->vm_private_data = map->handle;
--	/* FIXME: use pgprot_writecombine when available */
- 	vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
- 
- 	/* Take a ref for this mapping of the object, so that the fault
 diff -up linux-2.6.31.noarch/arch/x86/Makefile.dave linux-2.6.31.noarch/arch/x86/Makefile
 --- linux-2.6.31.noarch/arch/x86/Makefile.dave	2009-09-09 18:13:59.000000000 -0400
 +++ linux-2.6.31.noarch/arch/x86/Makefile	2009-10-23 17:04:30.000000000 -0400
@@ -101,13 +89,36 @@ diff -up linux-2.6.31.noarch/arch/x86/Ma
  	help
  	  Xen netchannel2 driver support.  This allows a domain to act as
  	  either the backend or frontend part of a netchannel2 connection.
---- linux-2.6.31.x86_64/drivers/xen/events.c.orig	2009-11-12 20:01:11.000000000 +0000
-+++ linux-2.6.31.x86_64/drivers/xen/events.c	2009-11-12 20:50:12.000000000 +0000
-@@ -749,6 +749,7 @@
- {
- 	return gsi_from_irq(irq);
- }
-+EXPORT_SYMBOL_GPL(xen_gsi_from_irq);
+--- a/drivers/gpu/drm/drm_gem.c
++++ b/drivers/gpu/drm/drm_gem.c
+@@ -539,7 +539,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
+ 	vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
+ 	vma->vm_ops = obj->dev->driver->gem_vm_ops;
+ 	vma->vm_private_data = map->handle;
+-	/* FIXME: use pgprot_writecombine when available */
+ 	vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
  
- int bind_evtchn_to_irq(unsigned int evtchn)
- {
+ 	/* Take a ref for this mapping of the object, so that the fault
+--- a/arch/x86/include/asm/mmu.h
++++ b/arch/x86/include/asm/mmu.h
+@@ -13,6 +13,10 @@
+ 	int size;
+ 	struct mutex lock;
+ 	void *vdso;
++#ifdef CONFIG_X86_32
++	struct desc_struct user_cs;
++	unsigned long exec_limit;
++#endif
+ #ifdef CONFIG_XEN
+ 	int has_foreign_mappings;
+ #endif
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -105,6 +105,7 @@ extern unsigned int kobjsize(const void *objp);
+ #define VM_MIXEDMAP	0x10000000	/* Can contain "struct page" and pure PFN pages */
+ #define VM_SAO		0x20000000	/* Strong Access Ordering (powerpc) */
+ #define VM_PFN_AT_MMAP	0x40000000	/* PFNMAP vma that is fully mapped at mmap time */
++#define VM_MERGEABLE	0x80000000	/* KSM may merge identical pages */
+ #ifdef CONFIG_XEN
+ #define VM_FOREIGN	0x80000000      /* Has pages belonging to another VM */
+ struct vm_foreign_map {

xen.pvops.pre.patch:
 arch/x86/include/asm/mmu.h            |    4 ----
 b/arch/x86/include/asm/paravirt.h     |    3 ---
 b/arch/x86/kernel/process_32.c        |    3 +--
 b/arch/x86/pci/common.c               |   16 ----------------
 drivers/gpu/drm/drm_gem.c             |    3 ++-
 drivers/pci/pci.h                     |    2 --
 include/linux/mm.h                    |    1 -
 linux-2.6.31.noarch/arch/x86/Makefile |    1 +
 8 files changed, 4 insertions(+), 29 deletions(-)

Index: xen.pvops.pre.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.pre.patch,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -p -r1.1.2.19 -r1.1.2.20
--- xen.pvops.pre.patch	8 Nov 2009 22:36:45 -0000	1.1.2.19
+++ xen.pvops.pre.patch	9 Dec 2009 21:44:09 -0000	1.1.2.20
@@ -1,10 +1,11 @@
 temporarily revert various Fedora changes so that the pvops patch applies cleanly
 Affected patches;
 linux-2.6-defaults-pci_no_msi.patch - drivers/pci/pci.h
-linux-2.6-execshield.patch - arch/x86/include/asm/paravirt.h arch/x86/kernel/process_32.c
+linux-2.6-execshield.patch - arch/x86/include/asm/paravirt.h arch/x86/kernel/process_32.c arch/x86/include/asm/mmu.h
 linux-2.6-pci-cacheline-sizing.patch - arch/x86/pci/common.c
-drm-next-4c57edba4.patch - drivers/gpu/drm/drm_gem.c
 disable-stackprotector-all.patch - arch/x86/Makefile
+drm-next-b390f944.patch - drivers/gpu/drm/drm_gem.c
+linux-2.6-ksm.patch - include/linux/mm.h
 
 --- a/drivers/pci/pci.h	2009-04-24 20:46:50.000000000 +0100
 +++ b/drivers/pci/pci.h	2009-04-23 20:13:43.000000000 +0100
@@ -75,18 +76,6 @@ index 2202b62..f371fe8 100644
  	pcibios_resource_survey();
  
  	if (pci_bf_sort >= pci_force_bf)
-diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
-index ffe8f43..230c9ff 100644
---- a/drivers/gpu/drm/drm_gem.c
-+++ b/drivers/gpu/drm/drm_gem.c
-@@ -539,6 +539,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
- 	vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
- 	vma->vm_ops = obj->dev->driver->gem_vm_ops;
- 	vma->vm_private_data = map->handle;
-+	/* FIXME: use pgprot_writecombine when available */
- 	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
- 
- 	/* Take a ref for this mapping of the object, so that the fault
 diff -up linux-2.6.31.noarch/arch/x86/Makefile.dave linux-2.6.31.noarch/arch/x86/Makefile
 --- linux-2.6.31.noarch/arch/x86/Makefile.dave	2009-09-09 18:13:59.000000000 -0400
 +++ linux-2.6.31.noarch/arch/x86/Makefile	2009-10-23 17:04:30.000000000 -0400
@@ -98,3 +87,38 @@ diff -up linux-2.6.31.noarch/arch/x86/Ma
                  KBUILD_CFLAGS += $(stackp-y)
          else
                  $(warning stack protector enabled but no compiler support)
+--- a/drivers/gpu/drm/drm_gem.c
++++ b/drivers/gpu/drm/drm_gem.c
+@@ -539,7 +539,8 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
+ 	vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
+ 	vma->vm_ops = obj->dev->driver->gem_vm_ops;
+ 	vma->vm_private_data = map->handle;
+-	vma->vm_page_prot =  pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
++	/* FIXME: use pgprot_writecombine when available */
++	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+ 
+ 	/* Take a ref for this mapping of the object, so that the fault
+ 	 * handler can dereference the mmap offset's pointer to the object.
+--- a/arch/x86/include/asm/mmu.h
++++ b/arch/x86/include/asm/mmu.h
+@@ -13,10 +13,6 @@
+ 	int size;
+ 	struct mutex lock;
+ 	void *vdso;
+-#ifdef CONFIG_X86_32
+-	struct desc_struct user_cs;
+-	unsigned long exec_limit;
+-#endif
+ } mm_context_t;
+ 
+ #ifdef CONFIG_SMP
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -105,7 +105,6 @@ extern unsigned int kobjsize(const void *objp);
+ #define VM_MIXEDMAP	0x10000000	/* Can contain "struct page" and pure PFN pages */
+ #define VM_SAO		0x20000000	/* Strong Access Ordering (powerpc) */
+ #define VM_PFN_AT_MMAP	0x40000000	/* PFNMAP vma that is fully mapped at mmap time */
+-#define VM_MERGEABLE	0x80000000	/* KSM may merge identical pages */
+ 
+ #ifndef VM_STACK_DEFAULT_FLAGS		/* arch can override this */
+ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS


--- drm-disable-r600-aspm.patch DELETED ---


--- drm-next-ea1495a6.patch DELETED ---


--- drm-r600-lenovo-w500-fix.patch DELETED ---


--- drm-radeon-agp-font-fix.patch DELETED ---


--- drm-radeon-fix-agp-resume.patch DELETED ---


--- drm-radeon-fix-ring-rmw-issue.patch DELETED ---


--- linux-2.6-nfsd4-proots.patch DELETED ---


--- linux-2.6-sysrq-c.patch DELETED ---




More information about the fedora-extras-commits mailing list