rpms/kernel/devel acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch, NONE, 1.1.2.1 acpi-revert-attach-device-to-handle-early.patch, NONE, 1.1.2.1 ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch, NONE, 1.1.2.1 improve-resource-counter-scalability.patch, NONE, 1.1.2.1 linux-2.6-nfs4-callback-hidden.patch, NONE, 1.1.2.2 patch-2.6.31.4.bz2.sign, NONE, 1.1.2.1 pci-increase-alignment-to-make-more-space.patch, NONE, 1.1.2.1 perf-make-perf-counter-h-available-to-userspace.patch, NONE, 1.1.2.1 .cvsignore, 1.1014.2.32, 1.1014.2.33 Makefile, 1.97.6.8, 1.97.6.9 config-generic, 1.238.6.41, 1.238.6.42 drm-nouveau.patch, 1.8.6.22, 1.8.6.23 kernel.spec, 1.1294.2.71, 1.1294.2.72 lirc-2.6.31.patch, 1.2.2.3, 1.2.2.4 sources, 1.976.2.33, 1.976.2.34 upstream, 1.888.2.32, 1.888.2.33 xen.pvops.patch, 1.1.2.45, 1.1.2.46

myoung myoung at fedoraproject.org
Fri Oct 16 16:09:43 UTC 2009


Author: myoung

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

Modified Files:
      Tag: private-myoung-dom0-branch
	.cvsignore Makefile config-generic drm-nouveau.patch 
	kernel.spec lirc-2.6.31.patch sources upstream xen.pvops.patch 
Added Files:
      Tag: private-myoung-dom0-branch
	acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch 
	acpi-revert-attach-device-to-handle-early.patch 
	ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch 
	improve-resource-counter-scalability.patch 
	linux-2.6-nfs4-callback-hidden.patch patch-2.6.31.4.bz2.sign 
	pci-increase-alignment-to-make-more-space.patch 
	perf-make-perf-counter-h-available-to-userspace.patch 
Log Message:
update pvops to 2.6.31.4


acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch:
 pci_root.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- NEW FILE acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch ---
From: Rafael J. Wysocki <rjw at sisk.pl>
Date: Mon, 12 Oct 2009 23:01:57 +0000 (+0200)
Subject: ACPI / PCI: Fix NULL pointer dereference in acpi_get_pci_dev() (rev. 2)
X-Git-Tag: v2.6.32-rc5~6^2~3^2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=497fb54f578efd2b479727bc88d5ef942c0a1e2d

ACPI / PCI: Fix NULL pointer dereference in acpi_get_pci_dev() (rev. 2)

acpi_get_pci_dev() may be called for a non-PCI device, in which case
it should return NULL.  However, it assumes that every handle it
finds in the ACPI CA name space, between given device handle and the
PCI root bridge handle, corresponds to a PCI-to-PCI bridge with an
existing secondary bus.  For this reason, when it finds a struct
pci_dev object corresponding to one of them, it doesn't check if
its 'subordinate' field is a valid pointer.  This obviously leads to
a NULL pointer dereference if acpi_get_pci_dev() is called for a
non-PCI device with a PCI parent which is not a bridge.

To fix this issue make acpi_get_pci_dev() check if pdev->subordinate
is not NULL for every device it finds on the path between the root
bridge and the device it's supposed to get to and return NULL if the
"target" device cannot be found.

http://bugzilla.kernel.org/show_bug.cgi?id=14129
(worked in 2.6.30, regression in 2.6.31)

Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
Reported-by: Danny Feng <dfeng at redhat.com>
Reviewed-by: Alex Chiang <achiang at hp.com>
Tested-by: chepioq <chepioq at gmail.com>
Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 3112221..1af8081 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -389,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
 
 		pbus = pdev->subordinate;
 		pci_dev_put(pdev);
+
+		/*
+		 * This function may be called for a non-PCI device that has a
+		 * PCI parent (eg. a disk under a PCI SATA controller).  In that
+		 * case pdev->subordinate will be NULL for the parent.
+		 */
+		if (!pbus) {
+			dev_dbg(&pdev->dev, "Not a PCI-to-PCI bridge\n");
+			pdev = NULL;
+			break;
+		}
 	}
 out:
 	list_for_each_entry_safe(node, tmp, &device_list, node)

acpi-revert-attach-device-to-handle-early.patch:
 scan.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

--- NEW FILE acpi-revert-attach-device-to-handle-early.patch ---
From: Len Brown <len.brown at intel.com>
Date: Sat, 5 Sep 2009 17:33:23 +0000 (-0400)
Subject: Revert "ACPI: Attach the ACPI device to the ACPI handle as early as possible"
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Flenb%2Flinux-acpi-2.6.git;a=commitdiff_plain;h=f61f925859c57f6175082aeeee17743c68558a6e

Revert "ACPI: Attach the ACPI device to the ACPI handle as early as possible"

This reverts commit eab4b645769fa2f8703f5a3cb0cc4ac090d347af.

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

Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 781435d..5dd702c 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1264,16 +1264,6 @@ acpi_add_single_object(struct acpi_device **child,
 	acpi_device_set_id(device, parent, handle, type);
 
 	/*
-	 * The ACPI device is attached to acpi handle before getting
-	 * the power/wakeup/peformance flags. Otherwise OS can't get
-	 * the corresponding ACPI device by the acpi handle in the course
-	 * of getting the power/wakeup/performance flags.
-	 */
-	result = acpi_device_set_context(device, type);
-	if (result)
-		goto end;
-
-	/*
 	 * Power Management
 	 * ----------------
 	 */
@@ -1303,6 +1293,8 @@ acpi_add_single_object(struct acpi_device **child,
 			goto end;
 	}
 
+	if ((result = acpi_device_set_context(device, type)))
+		goto end;
 
 	result = acpi_device_register(device, parent);
 


ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch:
 ahci.c |   52 ++--------------------------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)

--- NEW FILE ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch ---
ahci: revert "Restore SB600 sata controller 64 bit DMA"

revert commit 58a09b38cfcd700b796ea07ae3d2e0efbb28b561
("[libata] ahci: Restore SB600 SATA controller 64 bit DMA")

Upstream commit 58a09b38cfcd700b796ea07ae3d2e0efbb28b561 does
nearly the same thing but this patch is simplified.

Disables 64-bit DMA for _all_ boards, unlike 2.6.32 which adds a
whitelist. (The whitelist function requires a fairly large patch
that touches unrelated code.)

Doesn't revert the DMI part as other backported patches might need
the exported symbol.

Applies to 2.6.31.4

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -447,7 +447,8 @@
 	[board_ahci_sb600] =
 	{
 		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL |
-				 AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255),
+				 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
+				 AHCI_HFLAG_SECT255),
 		.flags		= AHCI_FLAG_COMMON,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= ATA_UDMA6,
@@ -2584,51 +2585,6 @@
 	}
 }
 
-/*
- * SB600 ahci controller on ASUS M2A-VM can't do 64bit DMA with older
- * BIOS.  The oldest version known to be broken is 0901 and working is
- * 1501 which was released on 2007-10-26.  Force 32bit DMA on anything
- * older than 1501.  Please read bko#9412 for more info.
- */
-static bool ahci_asus_m2a_vm_32bit_only(struct pci_dev *pdev)
-{
-	static const struct dmi_system_id sysids[] = {
-		{
-			.ident = "ASUS M2A-VM",
-			.matches = {
-				DMI_MATCH(DMI_BOARD_VENDOR,
-					  "ASUSTeK Computer INC."),
-				DMI_MATCH(DMI_BOARD_NAME, "M2A-VM"),
-			},
-		},
-		{ }
-	};
-	const char *cutoff_mmdd = "10/26";
-	const char *date;
-	int year;
-
-	if (pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(0x12, 0) ||
-	    !dmi_check_system(sysids))
-		return false;
-
-	/*
-	 * Argh.... both version and date are free form strings.
-	 * Let's hope they're using the same date format across
-	 * different versions.
-	 */
-	date = dmi_get_system_info(DMI_BIOS_DATE);
-	year = dmi_get_year(DMI_BIOS_DATE);
-	if (date && strlen(date) >= 10 && date[2] == '/' && date[5] == '/' &&
-	    (year > 2007 ||
-	     (year == 2007 && strncmp(date, cutoff_mmdd, 5) >= 0)))
-		return false;
-
-	dev_printk(KERN_WARNING, &pdev->dev, "ASUS M2A-VM: BIOS too old, "
-		   "forcing 32bit DMA, update BIOS\n");
-
-	return true;
-}
-
 static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
 {
 	static const struct dmi_system_id broken_systems[] = {
@@ -2789,10 +2745,6 @@
 	if (board_id == board_ahci_sb700 && pdev->revision >= 0x40)
 		hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL;
 
-	/* apply ASUS M2A_VM quirk */
-	if (ahci_asus_m2a_vm_32bit_only(pdev))
-		hpriv->flags |= AHCI_HFLAG_32BIT_ONLY;
-
 	if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev))
 		pci_intx(pdev, 1);
 

improve-resource-counter-scalability.patch:
 memcontrol.c |  127 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 106 insertions(+), 21 deletions(-)

--- NEW FILE improve-resource-counter-scalability.patch ---
This patch was sent to me by Balbir Singh, cc'd, who worked on the original
patch.  The patch results in a massive increase in performance on a 64p/32G
system.  The patch was successfully compiled and tested by me on fedora-latest.

>From the upstream commit:

"Data from Prarit (kernel compile with make -j64 on a 64
CPU/32G machine)

For a single run

Without patch

real 27m8.988s
user 87m24.916s
sys 382m6.037s

With patch

real    4m18.607s
user    84m58.943s
sys     50m52.682s

With config turned off

real    4m54.972s
user    90m13.456s
sys     50m19.711s

NOTE: The data looks counterintuitive due to the increased performance
with the patch, even over the config being turned off. We probably need
more runs, but so far all testing has shown that the patches definitely
help."

-------------------------------------------------------------------------------

Backport 0c3e73e84fe3f64cf1c2e8bb4e91e8901cbcdc38

From: Balbir Singh <balbir at linux.vnet.ibm.com>

(memcg: improve resource counter scalability) to 2.6.31.
It is a very useful patch for non-users of memory control
group as it reduces the overhead quite significantly.

Signed-off-by: Balbir Singh <balbir at linux.vnet.ibm.com>
---

 mm/memcontrol.c |  127 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 106 insertions(+), 21 deletions(-)


diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index fd4529d..4821be0 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -43,6 +43,7 @@
 
 struct cgroup_subsys mem_cgroup_subsys __read_mostly;
 #define MEM_CGROUP_RECLAIM_RETRIES	5
+struct mem_cgroup *root_mem_cgroup __read_mostly;
 
 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
 /* Turned on only when memory cgroup is enabled && really_do_swap_account = 1 */
@@ -66,6 +67,7 @@ enum mem_cgroup_stat_index {
 	MEM_CGROUP_STAT_MAPPED_FILE,  /* # of pages charged as file rss */
 	MEM_CGROUP_STAT_PGPGIN_COUNT,	/* # of pages paged in */
 	MEM_CGROUP_STAT_PGPGOUT_COUNT,	/* # of pages paged out */
+	MEM_CGROUP_STAT_SWAPOUT, /* # of pages, swapped out */
 
 	MEM_CGROUP_STAT_NSTATS,
 };
@@ -219,11 +221,24 @@ static void mem_cgroup_get(struct mem_cgroup *mem);
 static void mem_cgroup_put(struct mem_cgroup *mem);
 static struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *mem);
 
+static void mem_cgroup_swap_statistics(struct mem_cgroup *mem,
+					 bool charge)
+{
+	int val = (charge) ? 1 : -1;
+	struct mem_cgroup_stat *stat = &mem->stat;
+	struct mem_cgroup_stat_cpu *cpustat;
+	int cpu = get_cpu();
+
+	cpustat = &stat->cpustat[cpu];
+	__mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_SWAPOUT, val);
+	put_cpu();
+}
+
 static void mem_cgroup_charge_statistics(struct mem_cgroup *mem,
 					 struct page_cgroup *pc,
 					 bool charge)
 {
-	int val = (charge)? 1 : -1;
+	int val = (charge) ? 1 : -1;
 	struct mem_cgroup_stat *stat = &mem->stat;
 	struct mem_cgroup_stat_cpu *cpustat;
 	int cpu = get_cpu();
@@ -354,6 +369,11 @@ static int mem_cgroup_walk_tree(struct mem_cgroup *root, void *data,
 	return ret;
 }
 
+static inline bool mem_cgroup_is_root(struct mem_cgroup *mem)
+{
+	return (mem == root_mem_cgroup);
+}
+
 /*
  * Following LRU functions are allowed to be used without PCG_LOCK.
  * Operations are called by routine of global LRU independently from memcg.
@@ -996,9 +1016,11 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm,
 	VM_BUG_ON(css_is_removed(&mem->css));
 
 	while (1) {
-		int ret;
+		int ret = 0;
 		bool noswap = false;
 
+		if (mem_cgroup_is_root(mem))
+			goto done;
 		ret = res_counter_charge(&mem->res, PAGE_SIZE, &fail_res);
 		if (likely(!ret)) {
 			if (!do_swap_account)
@@ -1046,6 +1068,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm,
 			goto nomem;
 		}
 	}
+done:
 	return 0;
 nomem:
 	css_put(&mem->css);
@@ -1119,9 +1142,11 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
 	lock_page_cgroup(pc);
 	if (unlikely(PageCgroupUsed(pc))) {
 		unlock_page_cgroup(pc);
-		res_counter_uncharge(&mem->res, PAGE_SIZE);
-		if (do_swap_account)
-			res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+		if (!mem_cgroup_is_root(mem)) {
+			res_counter_uncharge(&mem->res, PAGE_SIZE);
+			if (do_swap_account)
+				res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+		}
 		css_put(&mem->css);
 		return;
 	}
@@ -1178,7 +1203,8 @@ static int mem_cgroup_move_account(struct page_cgroup *pc,
 	if (pc->mem_cgroup != from)
 		goto out;
 
-	res_counter_uncharge(&from->res, PAGE_SIZE);
+	if (!mem_cgroup_is_root(from))
+		res_counter_uncharge(&from->res, PAGE_SIZE);
 	mem_cgroup_charge_statistics(from, pc, false);
 
 	page = pc->page;
@@ -1197,7 +1223,7 @@ static int mem_cgroup_move_account(struct page_cgroup *pc,
 						1);
 	}
 
-	if (do_swap_account)
+	if (do_swap_account && !mem_cgroup_is_root(from))
 		res_counter_uncharge(&from->memsw, PAGE_SIZE);
 	css_put(&from->css);
 
@@ -1268,9 +1294,11 @@ uncharge:
 	/* drop extra refcnt by try_charge() */
 	css_put(&parent->css);
 	/* uncharge if move fails */
-	res_counter_uncharge(&parent->res, PAGE_SIZE);
-	if (do_swap_account)
-		res_counter_uncharge(&parent->memsw, PAGE_SIZE);
+	if (!mem_cgroup_is_root(parent)) {
+		res_counter_uncharge(&parent->res, PAGE_SIZE);
+		if (do_swap_account)
+			res_counter_uncharge(&parent->memsw, PAGE_SIZE);
+	}
 	return ret;
 }
 
@@ -1459,7 +1487,9 @@ __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,
 			 * This recorded memcg can be obsolete one. So, avoid
 			 * calling css_tryget
 			 */
-			res_counter_uncharge(&memcg->memsw, PAGE_SIZE);
+			if (!mem_cgroup_is_root(memcg))
+				res_counter_uncharge(&memcg->memsw, PAGE_SIZE);
+			mem_cgroup_swap_statistics(memcg, false);
 			mem_cgroup_put(memcg);
 		}
 		rcu_read_unlock();
@@ -1484,9 +1514,11 @@ void mem_cgroup_cancel_charge_swapin(struct mem_cgroup *mem)
 		return;
 	if (!mem)
 		return;
-	res_counter_uncharge(&mem->res, PAGE_SIZE);
-	if (do_swap_account)
-		res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+	if (!mem_cgroup_is_root(mem)) {
+		res_counter_uncharge(&mem->res, PAGE_SIZE);
+		if (do_swap_account)
+			res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+	}
 	css_put(&mem->css);
 }
 
@@ -1538,9 +1570,14 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
 		break;
 	}
 
-	res_counter_uncharge(&mem->res, PAGE_SIZE);
-	if (do_swap_account && (ctype != MEM_CGROUP_CHARGE_TYPE_SWAPOUT))
-		res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+	if (!mem_cgroup_is_root(mem)) {
+		res_counter_uncharge(&mem->res, PAGE_SIZE);
+		if (do_swap_account &&
+				(ctype != MEM_CGROUP_CHARGE_TYPE_SWAPOUT))
+			res_counter_uncharge(&mem->memsw, PAGE_SIZE);
+	}
+	if (ctype == MEM_CGROUP_CHARGE_TYPE_SWAPOUT)
+		mem_cgroup_swap_statistics(mem, true);
 	mem_cgroup_charge_statistics(mem, pc, false);
 
 	ClearPageCgroupUsed(pc);
@@ -1629,7 +1666,9 @@ void mem_cgroup_uncharge_swap(swp_entry_t ent)
 		 * We uncharge this because swap is freed.
 		 * This memcg can be obsolete one. We avoid calling css_tryget
 		 */
-		res_counter_uncharge(&memcg->memsw, PAGE_SIZE);
+		if (!mem_cgroup_is_root(memcg))
+			res_counter_uncharge(&memcg->memsw, PAGE_SIZE);
+		mem_cgroup_swap_statistics(memcg, false);
 		mem_cgroup_put(memcg);
 	}
 	rcu_read_unlock();
@@ -2046,20 +2085,64 @@ static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
 	return retval;
 }
 
+struct mem_cgroup_idx_data {
+	s64 val;
+	enum mem_cgroup_stat_index idx;
+};
+
+static int
+mem_cgroup_get_idx_stat(struct mem_cgroup *mem, void *data)
+{
+	struct mem_cgroup_idx_data *d = data;
+	d->val += mem_cgroup_read_stat(&mem->stat, d->idx);
+	return 0;
+}
+
+static void
+mem_cgroup_get_recursive_idx_stat(struct mem_cgroup *mem,
+				enum mem_cgroup_stat_index idx, s64 *val)
+{
+	struct mem_cgroup_idx_data d;
+	d.idx = idx;
+	d.val = 0;
+	mem_cgroup_walk_tree(mem, &d, mem_cgroup_get_idx_stat);
+	*val = d.val;
+}
+
 static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
 {
 	struct mem_cgroup *mem = mem_cgroup_from_cont(cont);
-	u64 val = 0;
+	u64 idx_val, val;
 	int type, name;
 
 	type = MEMFILE_TYPE(cft->private);
 	name = MEMFILE_ATTR(cft->private);
 	switch (type) {
 	case _MEM:
-		val = res_counter_read_u64(&mem->res, name);
+		if (name == RES_USAGE && mem_cgroup_is_root(mem)) {
+			mem_cgroup_get_recursive_idx_stat(mem,
+				MEM_CGROUP_STAT_CACHE, &idx_val);
+			val = idx_val;
+			mem_cgroup_get_recursive_idx_stat(mem,
+				MEM_CGROUP_STAT_RSS, &idx_val);
+			val += idx_val;
+			val <<= PAGE_SHIFT;
+		} else
+			val = res_counter_read_u64(&mem->res, name);
 		break;
 	case _MEMSWAP:
-		val = res_counter_read_u64(&mem->memsw, name);
+		if (name == RES_USAGE && mem_cgroup_is_root(mem)) {
+			mem_cgroup_get_recursive_idx_stat(mem,
+				MEM_CGROUP_STAT_CACHE, &idx_val);
+			val = idx_val;
+			mem_cgroup_get_recursive_idx_stat(mem,
+				MEM_CGROUP_STAT_RSS, &idx_val);
+			val += idx_val;
+			mem_cgroup_get_recursive_idx_stat(mem,
+				MEM_CGROUP_STAT_SWAPOUT, &idx_val);
+			val <<= PAGE_SHIFT;
+		} else
+			val = res_counter_read_u64(&mem->memsw, name);
 		break;
 	default:
 		BUG();
@@ -2548,6 +2631,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
 	/* root ? */
 	if (cont->parent == NULL) {
 		enable_swap_cgroup();
+		root_mem_cgroup = mem;
 		parent = NULL;
 	} else {
 		parent = mem_cgroup_from_cont(cont->parent);
@@ -2577,6 +2661,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
 	return &mem->css;
 free_out:
 	__mem_cgroup_free(mem);
+	root_mem_cgroup = NULL;
 	return ERR_PTR(error);
 }
 

_______________________________________________
Fedora-kernel-list mailing list
Fedora-kernel-list at redhat.com
https://www.redhat.com/mailman/listinfo/fedora-kernel-list


linux-2.6-nfs4-callback-hidden.patch:
 callback_xdr.c |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE linux-2.6-nfs4-callback-hidden.patch ---
Author: Steve Dickson <steved at redhat.com>
Date: Tue Oct 13 15:59:57 EDT 2009

To avoid hangs in the svc_unregister(), on version 4 mounts 
(and unmounts), when rpcbind is not running, make the nfs4 callback 
program an 'hidden' service by setting the 'vs_hidden' flag in the 
nfs4_callback_version structure. 

Signed-off-by: Steve Dickson <steved at redhat.com>

diff -up linux-2.6.31.x86_64/fs/nfs/callback_xdr.c.orig linux-2.6.31.x86_64/fs/nfs/callback_xdr.c
--- linux-2.6.31.x86_64/fs/nfs/callback_xdr.c.orig	2009-09-09 18:13:59.000000000 -0400
+++ linux-2.6.31.x86_64/fs/nfs/callback_xdr.c	2009-10-13 15:40:19.000000000 -0400
@@ -716,5 +716,6 @@ struct svc_version nfs4_callback_version
 	.vs_proc = nfs4_callback_procedures1,
 	.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
 	.vs_dispatch = NULL,
+	.vs_hidden = 1,
 };
 


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

iD8DBQBK07q9yGugalF9Dw4RAi20AJ9iL7DEv2KkeZaZNogGdrOkXmlEgwCfaQ9d
DefCbKNy2tKReB+f+pRqMy0=
=PG/w
-----END PGP SIGNATURE-----

pci-increase-alignment-to-make-more-space.patch:
 e820.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE pci-increase-alignment-to-make-more-space.patch ---
From: Yinghai Lu <yinghai at kernel.org>
Date: Sun, 11 Oct 2009 21:17:16 +0000 (-0700)
Subject: pci: increase alignment to make more space for hidden code
X-Git-Tag: v2.6.32-rc4~1
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=15b812f1d0a5ca8f5efe7f5882f468af10682ca8

pci: increase alignment to make more space for hidden code

As reported in

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

on some system when acpi are enabled, acpi clears some BAR for some
devices without reason, and kernel will need to allocate devices for
them.  It then apparently hits some undocumented resource conflict,
resulting in non-working devices.

Try to increase alignment to get more safe range for unassigned devices.

Signed-off-by: Yinghai Lu <yinghai at kernel.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 85419bb..d17d482 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1378,8 +1378,8 @@ static unsigned long ram_alignment(resource_size_t pos)
 	if (mb < 16)
 		return 1024*1024;
 
-	/* To 32MB for anything above that */
-	return 32*1024*1024;
+	/* To 64MB for anything above that */
+	return 64*1024*1024;
 }
 
 #define MAX_RESOURCE_SIZE ((resource_size_t)-1)

perf-make-perf-counter-h-available-to-userspace.patch:
 Kbuild |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE perf-make-perf-counter-h-available-to-userspace.patch ---
Make performance counter ABI definitions available to userspace.

For 2.6.31 only. The userspace parts are in perf_event.h in 2.6.32.

--- linux-2.6.31.noarch.orig/include/linux/Kbuild
+++ linux-2.6.31.noarch/include/linux/Kbuild
@@ -126,6 +126,7 @@ header-y += nfs_mount.h
 header-y += nl80211.h
 header-y += param.h
 header-y += pci_regs.h
+header-y += perf_counter.h
 header-y += pfkeyv2.h
 header-y += pg.h
 header-y += phantom.h


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.1014.2.32
retrieving revision 1.1014.2.33
diff -u -p -r1.1014.2.32 -r1.1014.2.33
--- .cvsignore	10 Oct 2009 15:04:07 -0000	1.1014.2.32
+++ .cvsignore	16 Oct 2009 16:09:19 -0000	1.1014.2.33
@@ -5,4 +5,4 @@ kernel-2.6.*.config
 temp-*
 kernel-2.6.31
 linux-2.6.31.tar.bz2
-patch-2.6.31.3.bz2
+patch-2.6.31.4.bz2


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.97.6.8
retrieving revision 1.97.6.9
diff -u -p -r1.97.6.8 -r1.97.6.9
--- Makefile	24 Sep 2009 21:05:05 -0000	1.97.6.8
+++ Makefile	16 Oct 2009 16:09:19 -0000	1.97.6.9
@@ -32,6 +32,12 @@ endif
 include $(MAKEFILE_COMMON)
 include Makefile.config
 
+ifndef KVERSION
+KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
+				print "2.6." $$3 \
+			 }' $(SPECFILE))
+endif
+
 extremedebug:
 	@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
 
@@ -130,7 +136,7 @@ rhel:
 
 reconfig:
 	@rm -f kernel-*-config
-	@VERSION="2.6.30" make -f Makefile.config configs
+	@VERSION=$(KVERSION) make -f Makefile.config configs
 	@scripts/reconfig.sh
 
 force-tag: $(SPECFILE) $(COMMON_DIR)/branches
@@ -173,12 +179,6 @@ srpm beehive-sprm: RELEASE := 0.$(varian
 endif
 endif
 
-ifndef KVERSION
-KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
-				print "2.6." $$3 \
-			 }' $(SPECFILE))
-endif
-
 #
 # Hacks for building kernel rpms from upstream code plus local GIT branches.
 # Use "make git/BRANCH/TARGET" like "make TARGET".


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.238.6.41
retrieving revision 1.238.6.42
diff -u -p -r1.238.6.41 -r1.238.6.42
--- config-generic	10 Oct 2009 15:04:07 -0000	1.238.6.41
+++ config-generic	16 Oct 2009 16:09:20 -0000	1.238.6.42
@@ -2247,6 +2247,7 @@ CONFIG_DRM_VIA=m
 CONFIG_DRM_NOUVEAU=m
 CONFIG_DRM_NOUVEAU_KMS=y
 CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+CONFIG_DRM_NOUVEAU_DEBUG=y
 CONFIG_DRM_I2C_CH7006=m
 
 #

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            |   29 
 drivers/gpu/drm/nouveau/nouveau_acpi.c      |  125 
 drivers/gpu/drm/nouveau/nouveau_backlight.c |  155 
 drivers/gpu/drm/nouveau/nouveau_bios.c      | 5709 +++++++
 drivers/gpu/drm/nouveau/nouveau_bios.h      |  236 
 drivers/gpu/drm/nouveau/nouveau_bo.c        |  620 
 drivers/gpu/drm/nouveau/nouveau_calc.c      |  626 
 drivers/gpu/drm/nouveau/nouveau_channel.c   |  464 
 drivers/gpu/drm/nouveau/nouveau_connector.c |  811 +
 drivers/gpu/drm/nouveau/nouveau_connector.h |   55 
 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       |  151 
 drivers/gpu/drm/nouveau/nouveau_drv.c       |  413 
 drivers/gpu/drm/nouveau/nouveau_drv.h       | 1283 +
 drivers/gpu/drm/nouveau/nouveau_encoder.h   |   66 
 drivers/gpu/drm/nouveau/nouveau_fb.h        |   47 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  381 
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |   49 
 drivers/gpu/drm/nouveau/nouveau_fence.c     |  262 
 drivers/gpu/drm/nouveau/nouveau_gem.c       |  954 +
 drivers/gpu/drm/nouveau/nouveau_hw.c        | 1078 +
 drivers/gpu/drm/nouveau/nouveau_hw.h        |  448 
 drivers/gpu/drm/nouveau/nouveau_i2c.c       |  256 
 drivers/gpu/drm/nouveau/nouveau_i2c.h       |   45 
 drivers/gpu/drm/nouveau/nouveau_ioc32.c     |   72 
 drivers/gpu/drm/nouveau/nouveau_irq.c       |  696 
 drivers/gpu/drm/nouveau/nouveau_mem.c       |  572 
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |  195 
 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     |  872 +
 drivers/gpu/drm/nouveau/nouveau_swmthd.h    |   33 
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  131 
 drivers/gpu/drm/nouveau/nv04_crtc.c         |  995 +
 drivers/gpu/drm/nouveau/nv04_cursor.c       |   70 
 drivers/gpu/drm/nouveau/nv04_dac.c          |  529 
 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      |  210 
 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        |  891 +
 drivers/gpu/drm/nouveau/nv17_tv.c           |  689 
 drivers/gpu/drm/nouveau/nv17_tv.h           |  156 
 drivers/gpu/drm/nouveau/nv17_tv_modes.c     |  583 
 drivers/gpu/drm/nouveau/nv20_graph.c        |  778 
 drivers/gpu/drm/nouveau/nv40_fb.c           |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c         |  314 
 drivers/gpu/drm/nouveau/nv40_graph.c        | 2239 ++
 drivers/gpu/drm/nouveau/nv40_mc.c           |   38 
 drivers/gpu/drm/nouveau/nv50_crtc.c         |  784 
 drivers/gpu/drm/nouveau/nv50_cursor.c       |  151 
 drivers/gpu/drm/nouveau/nv50_dac.c          |  295 
 drivers/gpu/drm/nouveau/nv50_display.c      |  902 +
 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         |  493 
 drivers/gpu/drm/nouveau/nv50_graph.c        |  465 
 drivers/gpu/drm/nouveau/nv50_grctx.h        |22284 ++++++++++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv50_instmem.c      |  508 
 drivers/gpu/drm/nouveau/nv50_mc.c           |   40 
 drivers/gpu/drm/nouveau/nv50_sor.c          |  254 
 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                   |  216 
 85 files changed, 58983 insertions(+)

Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.8.6.22
retrieving revision 1.8.6.23
diff -u -p -r1.8.6.22 -r1.8.6.23
--- drm-nouveau.patch	10 Oct 2009 15:04:10 -0000	1.8.6.22
+++ drm-nouveau.patch	16 Oct 2009 16:09:20 -0000	1.8.6.23
@@ -1,8 +1,8 @@
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index e4d971c..7fe8a4c 100644
+index e4d971c..62dd13c 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
-@@ -153,3 +153,48 @@ config DRM_SAVAGE
+@@ -153,3 +153,59 @@ config DRM_SAVAGE
  	help
  	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
  	  chipset. If M is selected the module will be called savage.
@@ -29,6 +29,9 @@ index e4d971c..7fe8a4c 100644
 +	and you have a new enough userspace to support this. Running old
 +	userspaces with this enabled will cause pain.
 +
++	NOTICE: if you plan on using the text based console outside of X, enable
++	FRAMEBUFFER_CONSOLE or else the console will be unusable.
++
 +config DRM_NOUVEAU_BACKLIGHT
 +	bool "Support for backlight control"
 +	depends on DRM_NOUVEAU
@@ -37,6 +40,14 @@ index e4d971c..7fe8a4c 100644
 +	  Say Y here if you want to control the backlight of your display
 +	  (e.g. a laptop panel).
 +
++config DRM_NOUVEAU_DEBUG
++	bool "Build in Nouveau's debugfs support"
++	depends on DRM_NOUVEAU && DEBUG_FS
++	default y
++	help
++	  Say Y here if you want Nouveau to output debugging information
++	  via debugfs.
++
 +menu "I2C encoder or helper chips"
 +     depends on DRM
 +
@@ -1439,7 +1450,7 @@ index 0000000..b06d3d9
 +#endif
 diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
 new file mode 100644
-index 0000000..ab46e3a
+index 0000000..e12b4ff
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/Makefile
 @@ -0,0 +1,29 @@
@@ -1454,7 +1465,6 @@ index 0000000..ab46e3a
 +             nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \
 +             nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \
 +	     nouveau_display.o nouveau_connector.o nouveau_fbcon.o \
-+	     nouveau_debugfs.o \
 +             nv04_timer.o \
 +             nv04_mc.o nv40_mc.o nv50_mc.o \
 +             nv04_fb.o nv10_fb.o nv40_fb.o \
@@ -1467,6 +1477,7 @@ index 0000000..ab46e3a
 +             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
 +
++nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o
 +nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
 +nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
 +nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
@@ -1766,10 +1777,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..7a55199
+index 0000000..1c13f5f
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,5536 @@
+@@ -0,0 +1,5709 @@
 +/*
 + * Copyright 2005-2006 Erik Waling
 + * Copyright 2006 Stephane Marchesin
@@ -1812,8 +1823,6 @@ index 0000000..7a55199
 +#define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg)
 +#define LOG_OLD_VALUE(x)
 +
-+#define BIOS_USLEEP(n) mdelay((n)/1000)
-+
 +#define ROM16(x) le16_to_cpu(*(uint16_t *)&(x))
 +#define ROM32(x) le32_to_cpu(*(uint32_t *)&(x))
 +
@@ -2058,7 +2067,7 @@ index 0000000..7a55199
 +{
 +#if 0
 +	sync();
-+	BIOS_USLEEP(2000);
++	msleep(2);
 +#endif
 +}
 +
@@ -2068,10 +2077,15 @@ index 0000000..7a55199
 +	if (nv_arch(bios->dev) < NV_50)
 +		return reg;
 +
++	if (!(reg & 0x40000000))
++		return reg;
++
++	BUG_ON(!bios->display.output);
++
 +	if (reg & 0x40000000)
-+		reg += bios->display.head * 0x800;
++		reg += (ffs(bios->display.output->or) - 1) * 0x800;
 +
-+	reg &= ~(0x40000000);
++	reg &= ~0x40000000;
 +	return reg;
 +}
 +
@@ -3400,6 +3414,7 @@ index 0000000..7a55199
 +
 +	uint8_t cond = bios->data[offset + 1];
 +	uint16_t retries = bios->data[offset + 2] * 50;
++	unsigned cnt;
 +
 +	if (!iexec->execute)
 +		return true;
@@ -3410,19 +3425,23 @@ index 0000000..7a55199
 +	BIOSLOG(bios, "0x%04X: Condition: 0x%02X, Retries: 0x%02X\n",
 +		offset, cond, retries);
 +
-+	for (; retries > 0; retries--)
++	for (cnt = 0; cnt < retries; cnt++) {
 +		if (bios_condition_met(bios, offset, cond)) {
-+			BIOSLOG(bios, "0x%04X: Condition met, continuing\n", offset);
++			BIOSLOG(bios, "0x%04X: Condition met, continuing\n",
++								offset);
 +			break;
 +		} else {
-+			BIOSLOG(bios, "0x%04X: Condition not met, sleeping for 20ms\n", offset);
-+			BIOS_USLEEP(20000);
++			BIOSLOG(bios, "0x%04X: "
++				"Condition not met, sleeping for 20ms\n",
++								offset);
++			msleep(20);
 +		}
++	}
 +
 +	if (!bios_condition_met(bios, offset, cond)) {
 +		NV_WARN(bios->dev,
 +			"0x%04X: Condition still not met after %dms, "
-+			"skiping following opcodes\n", offset, 20 * retries);
++			"skipping following opcodes\n", offset, 20 * retries);
 +		iexec->execute = false;
 +	}
 +
@@ -3665,7 +3684,7 @@ index 0000000..7a55199
 +	bios_wr32(bios, NV_PBUS_PCI_NV_19, 0);
 +	bios_wr32(bios, reg, value1);
 +
-+	BIOS_USLEEP(10);
++	udelay(10);
 +
 +	bios_wr32(bios, reg, value2);
 +	bios_wr32(bios, NV_PBUS_PCI_NV_19, pci_nv_19);
@@ -4065,7 +4084,7 @@ index 0000000..7a55199
 +	 * Sleep for "time" microseconds.
 +	 */
 +
-+	uint16_t time = ROM16(bios->data[offset + 1]);
++	unsigned time = ROM16(bios->data[offset + 1]);
 +
 +	if (!iexec->execute)
 +		return true;
@@ -4073,7 +4092,10 @@ index 0000000..7a55199
 +	BIOSLOG(bios, "0x%04X: Sleeping for 0x%04X microseconds\n",
 +		offset, time);
 +
-+	BIOS_USLEEP(time);
++	if (time < 1000)
++		udelay(time);
++	else
++		msleep((time + 900) / 1000);
 +
 +	return true;
 +}
@@ -4534,6 +4556,134 @@ index 0000000..7a55199
 +	return true;
 +}
 +
++static int
++nouveau_dp_auxch_rd(struct nouveau_i2c_chan *auxch, int cmd, int addr,
++		    uint8_t buf[16], int len)
++{
++	NV_ERROR(auxch->dev, "auxch_rd: stub!\n");
++	return -ENODEV;
++}
++
++static int
++nouveau_dp_auxch_wr(struct nouveau_i2c_chan *auxch, int cmd, int addr,
++		    uint8_t buf[16], int len)
++{
++	NV_ERROR(auxch->dev, "auxch_wr: stub!\n");
++	return -ENODEV;
++}
++
++static bool
++init_auxch(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++{
++	/*
++	 * INIT_AUXCH   opcode: 0x98 ('')
++	 *
++	 * offset      (8  bit): opcode
++	 * offset + 1  (32 bit): address
++	 * offset + 5  (8  bit): count
++	 * offset + 6  (8  bit): mask 0
++	 * offset + 7  (8  bit): data 0
++	 *  ...
++	 *
++	 */
++
++	struct drm_device *dev = bios->dev;
++	struct nouveau_i2c_chan *auxch;
++	uint32_t addr = ROM32(bios->data[offset + 1]);
++	uint8_t len = bios->data[offset + 5];
++	uint8_t buf[16];
++	int ret, i;
++
++	if (len > 16) {
++		NV_ERROR(dev, "INIT_AUXCH: >16 byte xfer unimplemented!\n");
++		return false;
++	}
++
++	if (!bios->display.output) {
++		NV_ERROR(dev, "INIT_AUXCH: no active output\n");
++		return false;
++	}
++
++	auxch = init_i2c_device_find(dev, bios->display.output->i2c_index);
++	if (!auxch) {
++		NV_ERROR(dev, "INIT_AUXCH: couldn't get auxch %d\n",
++			 bios->display.output->i2c_index);
++		return false;
++	}
++
++	if (!iexec->execute)
++		return true;
++
++	ret = nouveau_dp_auxch_rd(auxch, 9, addr, buf, len);
++	if (ret) {
++		NV_ERROR(dev, "INIT_AUXCH: rd auxch fail %d\n", ret);
++		return false;
++	}
++
++	offset += 6;
++	for (i = 0; i < len; i++, offset += 2) {
++		buf[i] &= bios->data[offset + 0];
++		buf[i] |= bios->data[offset + 1];
++	}
++
++	ret = nouveau_dp_auxch_wr(auxch, 8, addr, buf, len);
++	if (ret) {
++		NV_ERROR(dev, "INIT_AUXCH: wr auxch fail %d\n", ret);
++		return false;
++	}
++
++	return true;
++}
++
++static bool
++init_zm_auxch(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
++{
++	/*
++	 * INIT_ZM_AUXCH   opcode: 0x99 ('')
++	 *
++	 * offset      (8  bit): opcode
++	 * offset + 1  (32 bit): address
++	 * offset + 5  (8  bit): count
++	 * offset + 6  (8  bit): data 0
++	 *  ...
++	 *
++	 */
++
++	struct drm_device *dev = bios->dev;
++	struct nouveau_i2c_chan *auxch;
++	uint32_t addr = ROM32(bios->data[offset + 1]);
++	uint8_t len = bios->data[offset + 5];
++	int ret;
++
++	if (len > 16) {
++		NV_ERROR(dev, "INIT_ZM_AUXCH: >16 byte xfer unimplemented!\n");
++		return false;
++	}
++
++	if (!bios->display.output) {
++		NV_ERROR(dev, "INIT_ZM_AUXCH: no active output\n");
++		return false;
++	}
++
++	auxch = init_i2c_device_find(dev, bios->display.output->i2c_index);
++	if (!auxch) {
++		NV_ERROR(dev, "INIT_ZM_AUXCH: couldn't get auxch %d\n",
++			 bios->display.output->i2c_index);
++		return false;
++	}
++
++	if (!iexec->execute)
++		return true;
++
++	ret = nouveau_dp_auxch_wr(auxch, 8, addr, &bios->data[offset + 6], len);
++	if (ret) {
++		NV_ERROR(dev, "INIT_ZM_AUXCH: wr auxch fail %d\n", ret);
++		return false;
++	}
++
++	return true;
++}
++
 +static struct init_tbl_entry itbl_entry[] = {
 +	/* command name                       , id  , length  , offset  , mult    , command handler                 */
 +	/* INIT_PROG (0x31, 15, 10, 4) removed due to no example of use */
@@ -4590,6 +4740,8 @@ index 0000000..7a55199
 +	{ "INIT_RESERVED"                     , 0x92, 1       , 0       , 0       , init_reserved                   },
 +	{ "INIT_96"                           , 0x96, 17      , 0       , 0       , init_96                         },
 +	{ "INIT_97"                           , 0x97, 13      , 0       , 0       , init_97                         },
++	{ "INIT_AUXCH"                        , 0x98, 6       , 5       , 2       , init_auxch                      },
++	{ "INIT_ZM_AUXCH"                     , 0x99, 6       , 5       , 1       , init_zm_auxch                   },
 +	{ NULL                                , 0   , 0       , 0       , 0       , NULL                            }
 +};
 +
@@ -4750,9 +4902,10 @@ index 0000000..7a55199
 +
 +	run_digital_op_script(dev, scriptofs, dcbent, head, bios->fp.dual_link);
 +
-+	if (script == LVDS_PANEL_OFF)
++	if (script == LVDS_PANEL_OFF) {
 +		/* off-on delay in ms */
-+		BIOS_USLEEP(ROM16(bios->data[bios->fp.xlated_entry + 7]));
++		msleep(ROM16(bios->data[bios->fp.xlated_entry + 7]));
++	}
 +#ifdef __powerpc__
 +	/* Powerbook specific quirks */
 +	if (script == LVDS_RESET && ((dev->pci_device & 0xffff) == 0x0179 || (dev->pci_device & 0xffff) == 0x0329))
@@ -5263,6 +5416,40 @@ index 0000000..7a55199
 +	return 0;
 +}
 +
++static uint8_t *
++bios_output_config_match(struct drm_device *dev, struct dcb_entry *dcbent,
++			 uint16_t record, int record_len, int record_nr)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	struct nvbios *bios = &dev_priv->VBIOS;
++	uint32_t entry;
++	uint16_t table;
++	int i, v;
++
++	for (i = 0; i < record_nr; i++, record += record_len) {
++		table = ROM16(bios->data[record]);
++		if (!table)
++			continue;
++		entry = ROM32(bios->data[table]);
++
++		v = (entry & 0x000f0000) >> 16;
++		if (!(v & dcbent->or))
++			continue;
++
++		v = (entry & 0x000000f0) >> 4;
++		if (v != dcbent->location)
++			continue;
++
++		v = (entry & 0x0000000f);
++		if (v != dcbent->type)
++			continue;
++
++		return &bios->data[table];
++	}
++
++	return NULL;
++}
++
 +int
 +nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
 +			       uint32_t sub, int pxclk)
@@ -5294,9 +5481,9 @@ index 0000000..7a55199
 +	struct init_exec iexec = {true, false};
 +	struct nvbios *bios = &dev_priv->VBIOS;
 +	uint8_t *table = &bios->data[bios->display.script_table_ptr];
-+	uint8_t *entry, *otable = NULL;
++	uint8_t *otable = NULL;
 +	uint16_t script;
-+	int i;
++	int i = 0;
 +
 +	if (!bios->display.script_table_ptr) {
 +		NV_ERROR(dev, "No pointer to output script table\n");
@@ -5348,23 +5535,10 @@ index 0000000..7a55199
 +
 +	NV_DEBUG(dev, "Searching for output entry for %d %d %d\n",
 +			dcbent->type, dcbent->location, dcbent->or);
-+	entry = table + table[1];
-+	for (i = 0; i < table[3]; i++, entry += table[2]) {
-+		uint32_t match;
-+
-+		if (ROM16(entry[0]) == 0)
-+			continue;
-+		otable = &bios->data[ROM16(entry[0])];
-+		match = ROM32(otable[0]);
-+
-+		NV_DEBUG(dev, " %d: 0x%08x\n", i, match);
-+		if ((((match & 0x000f0000) >> 16)  & dcbent->or) &&
-+		     ((match & 0x0000000f) >>  0) == dcbent->type &&
-+		     ((match & 0x000000f0) >>  4) == dcbent->location)
-+			break;
-+	}
-+
-+	if (i == table[3]) {
++	otable = bios_output_config_match(dev, dcbent, table[1] +
++					  bios->display.script_table_ptr,
++					  table[2], table[3]);
++	if (!otable) {
 +		NV_ERROR(dev, "Couldn't find matching output script table\n");
 +		return 1;
 +	}
@@ -5384,7 +5558,7 @@ index 0000000..7a55199
 +		}
 +	}
 +
-+	bios->display.head = ffs(dcbent->or) - 1;
++	bios->display.output = dcbent;
 +
 +	if (pxclk == 0) {
 +		script = ROM16(otable[6]);
@@ -7131,6 +7305,16 @@ index 0000000..7a55199
 +	return bios->fp.edid = &bios->data[offset];
 +}
 +
++void
++nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	struct nvbios *bios = &dev_priv->VBIOS;
++	struct init_exec iexec = { true, false };
++
++	parse_init_table(bios, table, &iexec);
++}
++
 +static bool NVInitVBIOS(struct drm_device *dev)
 +{
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
@@ -7308,7 +7492,7 @@ index 0000000..7a55199
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h
 new file mode 100644
-index 0000000..33f3172
+index 0000000..1ffda97
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.h
 @@ -0,0 +1,236 @@
@@ -7504,7 +7688,7 @@ index 0000000..33f3172
 +	} state;
 +
 +	struct {
-+		int head;
++		struct dcb_entry *output;
 +		uint16_t script_table_ptr;
 +	} display;
 +
@@ -9278,10 +9462,10 @@ index 0000000..8e7a9fe
 +int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls);
 diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
 new file mode 100644
-index 0000000..9a233e0
+index 0000000..81774a5
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
-@@ -0,0 +1,781 @@
+@@ -0,0 +1,811 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -9532,6 +9716,10 @@ index 0000000..9a233e0
 +			NV_ERROR(dev, "DDC responded, but no EDID for %s\n",
 +				 drm_get_connector_name(connector));
 +			return connector_status_disconnected;
++		} else
++		if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
++			NV_ERROR(dev, "Detected DP connected, ignoring!\n");
++			return connector_status_disconnected;
 +		}
 +
 +		/* Override encoder type for DVI-I based on whether EDID
@@ -9691,14 +9879,40 @@ index 0000000..9a233e0
 +nouveau_connector_native_mode(struct nouveau_connector *connector)
 +{
 +	struct drm_device *dev = connector->base.dev;
-+	struct drm_display_mode *mode;
++	struct drm_display_mode *mode, *largest = NULL;
++	int high_w = 0, high_h = 0, high_v = 0;
 +
++	/* Use preferred mode if there is one.. */
 +	list_for_each_entry(mode, &connector->base.probed_modes, head) {
-+		if (mode->type & DRM_MODE_TYPE_PREFERRED)
++		if (mode->type & DRM_MODE_TYPE_PREFERRED) {
++			NV_DEBUG(dev, "native mode from preferred\n");
 +			return drm_mode_duplicate(dev, mode);
++		}
 +	}
 +
-+	return NULL;
++	/* Otherwise, take the resolution with the largest width, then height,
++	 * then vertical refresh
++	 */
++	list_for_each_entry(mode, &connector->base.probed_modes, head) {
++		if (mode->hdisplay < high_w)
++			continue;
++
++		if (mode->hdisplay == high_w && mode->vdisplay < high_h)
++			continue;
++
++		if (mode->hdisplay == high_w && mode->vdisplay == high_h &&
++		    mode->vrefresh < high_v)
++			continue;
++
++		high_w = mode->hdisplay;
++		high_h = mode->vdisplay;
++		high_v = mode->vrefresh;
++		largest = mode;
++	}
++
++	NV_DEBUG(dev, "native mode from largest: %dx%d@%d\n",
++		      high_w, high_h, high_v);
++	return largest ? drm_mode_duplicate(dev, largest) : NULL;
 +}
 +
 +struct moderec {
@@ -10227,10 +10441,10 @@ index 0000000..49fa7b2
 +#endif /* __NOUVEAU_CRTC_H__ */
 diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
 new file mode 100644
-index 0000000..1ac871b
+index 0000000..6ccafd3
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
-@@ -0,0 +1,157 @@
+@@ -0,0 +1,155 @@
 +/*
 + * Copyright (C) 2009 Red Hat <bskeggs at redhat.com>
 + *
@@ -10266,7 +10480,6 @@ index 0000000..1ac871b
 +#include "drmP.h"
 +#include "nouveau_drv.h"
 +
-+#if defined(CONFIG_DEBUG_FS)
 +static int
 +nouveau_debugfs_channel_info(struct seq_file *m, void *data)
 +{
@@ -10387,7 +10600,6 @@ index 0000000..1ac871b
 +	drm_debugfs_remove_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES,
 +				 minor);
 +}
-+#endif
 diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
 new file mode 100644
 index 0000000..dfc9439
@@ -10880,7 +11092,7 @@ index 0000000..2edd38d
 +#endif
 diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
 new file mode 100644
-index 0000000..a251712
+index 0000000..d97daf7
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
 @@ -0,0 +1,413 @@
@@ -11215,7 +11427,7 @@ index 0000000..a251712
 +	.lastclose = nouveau_lastclose,
 +	.unload = nouveau_unload,
 +	.preclose = nouveau_preclose,
-+#if defined(CONFIG_DEBUG_FS)
++#if defined(CONFIG_DRM_NOUVEAU_DEBUG)
 +	.debugfs_init = nouveau_debugfs_init,
 +	.debugfs_cleanup = nouveau_debugfs_takedown,
 +#endif
@@ -11299,10 +11511,10 @@ index 0000000..a251712
 +MODULE_LICENSE("GPL and additional rights");
 diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
 new file mode 100644
-index 0000000..7e8ab42
+index 0000000..08112c9
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
-@@ -0,0 +1,1282 @@
+@@ -0,0 +1,1283 @@
 +/*
 + * Copyright 2005 Stephane Marchesin.
 + * All Rights Reserved.
@@ -12073,7 +12285,7 @@ index 0000000..7e8ab42
 +extern struct ttm_backend *nouveau_sgdma_init_ttm(struct drm_device *);
 +
 +/* nouveau_debugfs.c */
-+#if defined(CONFIG_DEBUG_FS)
++#if defined(CONFIG_DRM_NOUVEAU_DEBUG)
 +extern int  nouveau_debugfs_init(struct drm_minor *);
 +extern void nouveau_debugfs_takedown(struct drm_minor *);
 +extern int  nouveau_debugfs_channel_init(struct nouveau_channel *);
@@ -12137,6 +12349,7 @@ index 0000000..7e8ab42
 +extern int nouveau_bios_init(struct drm_device *);
 +extern void nouveau_bios_takedown(struct drm_device *dev);
 +extern int nouveau_run_vbios_init(struct drm_device *);
++extern void nouveau_bios_run_init_table(struct drm_device *, uint16_t table);
 +extern int get_pll_limits(struct drm_device *, uint32_t limit_match,
 +			  struct pll_lims *);
 +extern int nouveau_bios_run_display_table(struct drm_device *,
@@ -32673,7 +32886,7 @@ index 0000000..1f82587
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c
 new file mode 100644
-index 0000000..5ba5139
+index 0000000..3233926
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_dac.c
 @@ -0,0 +1,295 @@
@@ -32896,10 +33109,10 @@ index 0000000..5ba5139
 +		mode_ctl |= NV50_EVO_DAC_MODE_CTRL_CRTC0;
 +
 +	/* Lacking a working tv-out, this is not a 100% sure. */
-+	if (to_drm_encoder(encoder)->encoder_type == DRM_MODE_ENCODER_DAC)
++	if (encoder->dcb->type == OUTPUT_ANALOG)
 +		mode_ctl |= 0x40;
 +	else
-+	if (to_drm_encoder(encoder)->encoder_type == DRM_MODE_ENCODER_TVDAC)
++	if (encoder->dcb->type == OUTPUT_TV)
 +		mode_ctl |= 0x100;
 +
 +	if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
@@ -58152,10 +58365,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..a2dee96
+index 0000000..fe69476
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -0,0 +1,250 @@
+@@ -0,0 +1,254 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -58304,10 +58517,14 @@ index 0000000..a2dee96
 +
 +	nv50_sor_dpms(drm_encoder, DRM_MODE_DPMS_ON);
 +
-+	if (to_drm_encoder(encoder)->encoder_type != DRM_MODE_ENCODER_LVDS) {
++	switch (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;
++		break;
++	default:
++		break;
 +	}
 +
 +	if (crtc->index == 1)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.71
retrieving revision 1.1294.2.72
diff -u -p -r1.1294.2.71 -r1.1294.2.72
--- kernel.spec	10 Oct 2009 15:04:13 -0000	1.1294.2.71
+++ kernel.spec	16 Oct 2009 16:09:24 -0000	1.1294.2.72
@@ -41,7 +41,7 @@ Summary: The Linux kernel
 %if 0%{?released_kernel}
 
 # Do we have a -stable update to apply?
-%define stable_update 3
+%define stable_update 4
 # Is it a -stable RC?
 %define stable_rc 0
 # Set rpm version accordingly
@@ -493,12 +493,7 @@ BuildRequires: module-init-tools, patch 
 BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
 BuildRequires: net-tools
-%if %{with_doc}
-BuildRequires: xmlto
-%if %{with_perf}
-BuildRequires: asciidoc
-%endif
-%endif
+BuildRequires: xmlto, asciidoc
 %if %{with_sparse}
 BuildRequires: sparse >= 0.4.1
 %endif
@@ -670,9 +665,6 @@ Patch671: linux-2.6-ahci-export-capabili
 
 Patch687: linux-2.6-iwlwifi-reduce-noise-when-skb-allocation-fails.patch
 
-Patch700: linux-2.6.31-nx-data.patch
-Patch701: linux-2.6.31-modules-ro-nx.patch
-
 Patch800: linux-2.6-crash-driver.patch
 
 Patch900: linux-2.6-pci-cacheline-sizing.patch
@@ -731,6 +723,7 @@ Patch2904: v4l-dvb-fix-cx25840-firmware-
 # NFSv4
 Patch3050: linux-2.6-nfsd4-proots.patch
 Patch3060: linux-2.6-nfs4-ver4opt.patch
+Patch3061: linux-2.6-nfs4-callback-hidden.patch
 
 # VIA Nano / VX8xx updates
 Patch11010: via-hwmon-temp-sensor.patch
@@ -743,11 +736,28 @@ Patch12013: linux-2.6-rfkill-all.patch
 Patch12014: linux-2.6-selinux-module-load-perms.patch
 
 # patches headed for -stable
-Patch13000: linux-2.6-frace-fixes.patch
 
 # Raid10 lockdep fix
 Patch14002: linux-2.6-raidlockdep.patch
 
+# make perf counter API available to userspace (#527264)
+Patch14010: perf-make-perf-counter-h-available-to-userspace.patch
+
+# Fix 2.6.31 regression that caused device failures with ACPI enabled.
+Patch14100: pci-increase-alignment-to-make-more-space.patch
+
+# fix resource counter issues on *big* machines
+Patch14101: improve-resource-counter-scalability.patch
+
+# fix boot hang on some systems
+Patch14200: acpi-revert-attach-device-to-handle-early.patch
+
+# disable 64-bit DMA on SB600 SATA controllers
+Patch14300: ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch
+
+# fix ACPI boot hang/crash (#513680)
+Patch14400: acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch
+
 Patch19997: xen.pvops.pre.patch
 Patch19998: xen.pvops.patch
 Patch19999: xen.pvops.post.patch
@@ -1228,6 +1238,7 @@ ApplyPatch linux-2.6-execshield.patch
 # NFSv4
 ApplyPatch linux-2.6-nfsd4-proots.patch
 ApplyPatch linux-2.6-nfs4-ver4opt.patch
+ApplyPatch linux-2.6-nfs4-callback-hidden.patch
 
 # USB
 ApplyPatch linux-2.6-driver-level-usb-autosuspend.diff
@@ -1315,12 +1326,6 @@ ApplyPatch linux-2.6-ahci-export-capabil
 # iwlagn quiet
 ApplyPatch linux-2.6-iwlwifi-reduce-noise-when-skb-allocation-fails.patch
 
-# Mark kernel data as NX
-ApplyPatch linux-2.6.31-nx-data.patch
-# Apply NX/RO to modules
-# breaks ftrace NOP replacement
-#ApplyPatch linux-2.6.31-modules-ro-nx.patch
-
 # /dev/crash driver.
 ApplyPatch linux-2.6-crash-driver.patch
 
@@ -1393,11 +1398,27 @@ ApplyPatch linux-2.6-rfkill-all.patch
 ApplyPatch linux-2.6-selinux-module-load-perms.patch
 
 # patches headed for -stable
-ApplyPatch linux-2.6-frace-fixes.patch
 
 # Raid10 lockdep fix
 ApplyPatch linux-2.6-raidlockdep.patch
 
+# make perf counter API available to userspace (#527264)
+ApplyPatch perf-make-perf-counter-h-available-to-userspace.patch
+
+# Fix 2.6.31 regression that caused device failures with ACPI enabled.
+ApplyPatch pci-increase-alignment-to-make-more-space.patch
+
+ApplyPatch improve-resource-counter-scalability.patch
+
+# fix boot hang on some systems
+ApplyPatch acpi-revert-attach-device-to-handle-early.patch
+
+# disable 64-bit DMA on SB600 SATA controllers
+ApplyPatch ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch
+
+# fix ACPI boot hang/crash (#513680)
+ApplyPatch acpi-pci-fix-null-pointer-dereference-in-acpi-get-pci-dev.patch
+
 ApplyPatch xen.pvops.pre.patch
 ApplyPatch xen.pvops.patch
 ApplyPatch xen.pvops.post.patch
@@ -1491,11 +1512,6 @@ BuildKernel() {
     # make sure EXTRAVERSION says what we want it to say
     perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = %{?stablerev}-%{release}.%{_target_cpu}${Flavour:+.${Flavour}}/" Makefile
 
-    cat >> Makefile <<\EOF
-# XXX temp workaround for https://bugzilla.redhat.com/show_bug.cgi?id=521991
-KBUILD_CFLAGS += $(call cc-option,-fno-var-tracking-assignments)
-EOF
-
     # if pre-rc1 devel kernel, must fix up SUBLEVEL for our versioning scheme
     %if !0%{?rcrev}
     %if 0%{?gitrev}
@@ -1653,7 +1669,7 @@ hwcap 0 nosegneg"
     collect_modules_list networking \
     			 'register_netdev|ieee80211_register_hw|usbnet_probe'
     collect_modules_list block \
-    			 'ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register'
+    			 'ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler'
     collect_modules_list drm \
     			 'drm_open|drm_init'
     collect_modules_list modesetting \
@@ -1722,17 +1738,19 @@ BuildKernel vmlinux vmlinux kdump vmlinu
 
 %if %{with_doc}
 # Make the HTML and man pages.
-make %{?_smp_mflags} htmldocs mandocs || %{doc_build_fail}
-
-%if %{with_perf}
-make %{?_smp_mflags} man || %{doc_build_fail}
-%endif
+# XXX nix %{?_smp_mflags} here, buggy Documentation/*/Makefile!
+make htmldocs mandocs || %{doc_build_fail}
 
 # sometimes non-world-readable files sneak into the kernel source tree
 chmod -R a=rX Documentation
 find Documentation -type d | xargs chmod u+w
 %endif
 
+%if %{with_perf}
+pushd tools/perf
+make %{?_smp_mflags} man || %{doc_build_fail}
+popd
+%endif
 
 ###
 ### Special hacks for debuginfo subpackages.
@@ -1776,6 +1794,7 @@ mkdir -p $man9dir
 find Documentation/DocBook/man -name '*.9.gz' -print0 |
 xargs -0 --no-run-if-empty %{__install} -m 444 -t $man9dir $m
 ls $man9dir | grep -q '' || > $man9dir/BROKEN
+%endif # with_doc
 
 # perf docs
 %if %{with_perf}
@@ -1790,9 +1809,7 @@ for d in *.1; do
  gzip $d;
 done
 popd
-
-%endif
-%endif
+%endif # with_perf
 
 # perf shell wrapper
 %if %{with_perf}
@@ -1976,10 +1993,8 @@ fi
 %defattr(-,root,root)
 %{_datadir}/doc/perf
 /usr/sbin/perf
-%if %{with_doc}
 %{_datadir}/man/man1/*
 %endif
-%endif
 
 # This is %{image_install_path} on an arch where that includes ELF files,
 # or empty otherwise.
@@ -2057,6 +2072,64 @@ fi
 # and build.
 
 %changelog
+* Fri Oct 16 2009 Michael Young <m.a.young at durham.ac.uk>
+- update pvops patch to 2.6.31.4
+
+* Fri Oct 16 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.4-85
+- Fix another ACPI boot hang (#513680)
+
+* Fri Oct 16 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.4-84
+- nouveau: more vbios opcodes, minor fixes, hopeful fix for rh#529292
+
+* Wed Oct 14 2009 Roland McGrath <roland at redhat.com> 2.6.31.4-83
+- Remove work-around for gcc bug #521991, now fixed.
+- Build *docs non-parallel, working around kernel's makefile bugs.
+
+* Wed Oct 14 2009 Peter Jones <pjones at redhat.com>
+- Add scsi_register_device_handler to modules.block's symbol list so
+  we'll have scsi device handlers in installer images.
+
+* Tue Oct 13 2009 Steve Dickson <steved at redhat.com> 2.6.31.4-81
+- Fixed hang during NFS installs (bz 528537)
+
+* Tue Oct 13 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.4-80
+- Disable 64-bit DMA on SB600 SATA controllers.
+
+* Tue Oct 13 2009 Kyle McMartin <kyle at redhat.com>
+- Always build perf docs, regardless of whether we build kernel-doc.
+  Seems rather unfair to not ship the manpages half the time.
+  Also, drop BuildRequires %if when not with_doc, the rules about %if
+  there are f*!&^ing complicated.
+
+* Mon Oct 12 2009 Kyle McMartin <kyle at redhat.com>
+- Build the perf manpages properly.
+
+* Mon Oct 12 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.4-77
+- Fix boot hang with ACPI on some systems.
+
+* Mon Oct 12 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.4-76
+- Linux 2.6.31.4
+
+* Mon Oct 12 2009 Kyle McMartin <kyle at redhat.com> 2.6.31.4-75.rc2
+- improve-resource-counter-scalability.patch: Fix scalability issues
+  on big machines, requested by prarit.
+
+* Mon Oct 12 2009 Jarod Wilson <jarod at redhat.com>
+- Fix irq status check bugs in lirc_ene0100
+
+* Mon Oct 12 2009 Chuck Ebbert <cebbert at redhat.com>
+- Fix 2.6.31 regression that caused device failures with ACPI enabled.
+
+* Sun Oct 11 2009 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.31.4-rc2
+- Drop merged patch: linux-2.6-frace-fixes.patch
+
+* Sat Oct 10 2009 Chuck Ebbert <cebbert at redhat.com>
+- Make performance counter API available to userspace programs (#527264)
+
+* Sat Oct 10 2009 Dave Jones <davej at redhat.com>
+- Drop the NX kernel data patch for now. Causes no-boot on some systems.
+
 * Sat Oct 10 2009 Michael Young <m.a.young at durham.ac.uk>
 - update pvops patch
 - try putting DRM_RADEON and DRM_NOUVEAU back in

lirc-2.6.31.patch:
 MAINTAINERS                           |    9 
 drivers/input/Kconfig                 |    2 
 drivers/input/Makefile                |    2 
 drivers/input/lirc/Kconfig            |  119 +
 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_ene0100.h     |  169 ++
 drivers/input/lirc/lirc_i2c.c         |  537 +++++++
 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_it87.h        |  116 +
 drivers/input/lirc/lirc_ite8709.c     |  539 +++++++
 drivers/input/lirc/lirc_mceusb.c      | 1242 ++++++++++++++++++
 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       | 1395 ++++++++++++++++++++
 26 files changed, 15600 insertions(+)

Index: lirc-2.6.31.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/lirc-2.6.31.patch,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -p -r1.2.2.3 -r1.2.2.4
--- lirc-2.6.31.patch	5 Sep 2009 19:00:23 -0000	1.2.2.3
+++ lirc-2.6.31.patch	16 Oct 2009 16:09:25 -0000	1.2.2.4
@@ -1845,7 +1845,7 @@ index 0000000..e84368f
 +	if (dev->hw_revision < ENE_HW_C) {
 +		irq_status = ene_hw_read_reg(dev, ENEB_IRQ_STATUS);
 +
-+		if (!irq_status & ENEB_IRQ_STATUS_IR)
++		if (!(irq_status & ENEB_IRQ_STATUS_IR))
 +			return 0;
 +		ene_hw_write_reg(dev, ENEB_IRQ_STATUS,
 +				 irq_status & ~ENEB_IRQ_STATUS_IR);
@@ -1856,7 +1856,7 @@ index 0000000..e84368f
 +
 +	irq_status = ene_hw_read_reg(dev, ENEC_IRQ);
 +
-+	if (!irq_status && ENEC_IRQ_STATUS)
++	if (!(irq_status & ENEC_IRQ_STATUS))
 +		return 0;
 +
 +	/* original driver does that twice - a workaround ? */


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.976.2.33
retrieving revision 1.976.2.34
diff -u -p -r1.976.2.33 -r1.976.2.34
--- sources	10 Oct 2009 15:04:17 -0000	1.976.2.33
+++ sources	16 Oct 2009 16:09:26 -0000	1.976.2.34
@@ -1,2 +1,2 @@
 84c077a37684e4cbfa67b18154390d8a  linux-2.6.31.tar.bz2
-24d60ad6645211e2c08dc1c1c578b249  patch-2.6.31.3.bz2
+02078f4231baee4f0004212f2875df2b  patch-2.6.31.4.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.888.2.32
retrieving revision 1.888.2.33
diff -u -p -r1.888.2.32 -r1.888.2.33
--- upstream	10 Oct 2009 15:04:17 -0000	1.888.2.32
+++ upstream	16 Oct 2009 16:09:26 -0000	1.888.2.33
@@ -1,2 +1,2 @@
 linux-2.6.31.tar.bz2
-patch-2.6.31.3.bz2
+patch-2.6.31.4.bz2

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/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/paravirt.h                 |  746 ----------
 arch/x86/include/asm/paravirt_types.h           |  724 ++++++++++
 arch/x86/include/asm/pci.h                      |    8 
 arch/x86/include/asm/pci_x86.h                  |    2 
 arch/x86/include/asm/pgtable.h                  |    3 
 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                  |   37 
 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                |    4 
 arch/x86/kernel/acpi/sleep.c                    |    2 
 arch/x86/kernel/apic/io_apic.c                  |   49 
 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                          |    6 
 arch/x86/kernel/ioport.c                        |   40 
 arch/x86/kernel/kvmclock.c                      |    7 
 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                       |  186 ++
 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/init_32.c                           |   42 
 arch/x86/mm/ioremap.c                           |   72 -
 arch/x86/mm/pat.c                               |    2 
 arch/x86/mm/pgtable.c                           |   10 
 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                              |   51 
 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                        |   85 +
 arch/x86/xen/mmu.c                              |  460 ++++++
 arch/x86/xen/pci-swiotlb.c                      |  997 ++++++++++++++
 arch/x86/xen/pci.c                              |  111 +
 arch/x86/xen/setup.c                            |  108 +
 arch/x86/xen/smp.c                              |    4 
 arch/x86/xen/time.c                             |   63 
 arch/x86/xen/vga.c                              |   67 
 arch/x86/xen/xen-ops.h                          |   27 
 block/blk-core.c                                |    2 
 drivers/acpi/acpica/hwsleep.c                   |   17 
 drivers/acpi/processor_core.c                   |   29 
 drivers/acpi/processor_idle.c                   |   23 
 drivers/acpi/processor_perflib.c                |   10 
 drivers/acpi/sleep.c                            |   19 
 drivers/block/Kconfig                           |    1 
 drivers/block/xen-blkfront.c                    |    2 
 drivers/char/agp/intel-agp.c                    |   17 
 drivers/char/hvc_xen.c                          |   99 -
 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/xen-kbdfront.c                    |    2 
 drivers/net/Kconfig                             |    1 
 drivers/net/xen-netfront.c                      |    2 
 drivers/pci/Makefile                            |    2 
 drivers/pci/msi.c                               |    5 
 drivers/pci/xen-iommu.c                         |  271 +++
 drivers/video/xen-fbfront.c                     |    2 
 drivers/xen/Kconfig                             |  114 +
 drivers/xen/Makefile                            |   22 
 drivers/xen/acpi.c                              |   23 
 drivers/xen/acpi_processor.c                    |  451 ++++++
 drivers/xen/balloon.c                           |  161 +-
 drivers/xen/biomerge.c                          |   14 
 drivers/xen/blkback/Makefile                    |    3 
 drivers/xen/blkback/blkback.c                   |  665 +++++++++
 drivers/xen/blkback/common.h                    |  137 ++
 drivers/xen/blkback/interface.c                 |  186 ++
 drivers/xen/blkback/vbd.c                       |  118 +
 drivers/xen/blkback/xenbus.c                    |  541 +++++++
 drivers/xen/events.c                            |  422 +++++-
 drivers/xen/evtchn.c                            |   82 -
 drivers/xen/features.c                          |    2 
 drivers/xen/gntdev.c                            |  625 +++++++++
 drivers/xen/grant-table.c                       |  103 +
 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                   | 1634 ++++++++++++++++++++++++
 drivers/xen/netback/xenbus.c                    |  470 ++++++
 drivers/xen/pci.c                               |  124 +
 drivers/xen/pciback/Makefile                    |   16 
 drivers/xen/pciback/conf_space.c                |  435 ++++++
 drivers/xen/pciback/conf_space.h                |  126 +
 drivers/xen/pciback/conf_space_capability.c     |   69 +
 drivers/xen/pciback/conf_space_capability.h     |   23 
 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         |  317 ++++
 drivers/xen/pciback/conf_space_quirks.c         |  138 ++
 drivers/xen/pciback/conf_space_quirks.h         |   35 
 drivers/xen/pciback/controller.c                |  443 ++++++
 drivers/xen/pciback/passthrough.c               |  176 ++
 drivers/xen/pciback/pci_stub.c                  | 1301 +++++++++++++++++++
 drivers/xen/pciback/pciback.h                   |  111 +
 drivers/xen/pciback/pciback_ops.c               |  120 +
 drivers/xen/pciback/slot.c                      |  187 ++
 drivers/xen/pciback/vpci.c                      |  242 +++
 drivers/xen/pciback/xenbus.c                    |  709 ++++++++++
 drivers/xen/xenbus/Makefile                     |    5 
 drivers/xen/xenbus/xenbus_client.c              |    2 
 drivers/xen/xenbus/xenbus_comms.c               |    1 
 drivers/xen/xenbus/xenbus_probe.c               |  380 +----
 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/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                        |    2 
 include/asm-generic/pci.h                       |    2 
 include/drm/drmP.h                              |    2 
 include/linux/interrupt.h                       |    1 
 include/linux/page-flags.h                      |   18 
 include/linux/sched.h                           |    8 
 include/linux/swiotlb.h                         |    1 
 include/xen/Kbuild                              |    1 
 include/xen/acpi.h                              |   84 +
 include/xen/balloon.h                           |    8 
 include/xen/blkif.h                             |  122 +
 include/xen/events.h                            |   27 
 include/xen/gntdev.h                            |  119 +
 include/xen/grant_table.h                       |   43 
 include/xen/interface/grant_table.h             |   22 
 include/xen/interface/io/pciif.h                |  124 +
 include/xen/interface/io/ring.h                 |    3 
 include/xen/interface/io/xenbus.h               |    8 
 include/xen/interface/memory.h                  |   92 +
 include/xen/interface/physdev.h                 |   51 
 include/xen/interface/platform.h                |  336 ++++
 include/xen/interface/vcpu.h                    |   41 
 include/xen/interface/xen-mca.h                 |  429 ++++++
 include/xen/interface/xen.h                     |   44 
 include/xen/privcmd.h                           |   80 +
 include/xen/swiotlb.h                           |  102 +
 include/xen/xen-ops.h                           |   11 
 include/xen/xenbus.h                            |    2 
 kernel/irq/manage.c                             |    3 
 kernel/sched.c                                  |   14 
 lib/swiotlb.c                                   |    5 
 mm/page_alloc.c                                 |   14 
 192 files changed, 18860 insertions(+), 1674 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.1.2.45 -r 1.1.2.46 xen.pvops.patchIndex: xen.pvops.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.patch,v
retrieving revision 1.1.2.45
retrieving revision 1.1.2.46
diff -u -p -r1.1.2.45 -r1.1.2.46
--- xen.pvops.patch	10 Oct 2009 15:04:17 -0000	1.1.2.45
+++ xen.pvops.patch	16 Oct 2009 16:09:26 -0000	1.1.2.46
@@ -1949,11 +1949,93 @@ index 7f3eba0..e4fc8ea 100644
  extern void flush_tlb_all(void);
  extern void flush_tlb_current_task(void);
  extern void flush_tlb_mm(struct mm_struct *);
+diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
+index dc27a69..9045ea4 100644
+--- a/arch/x86/include/asm/vgtod.h
++++ b/arch/x86/include/asm/vgtod.h
+@@ -1,9 +1,11 @@
+ #ifndef _ASM_X86_VGTOD_H
+ #define _ASM_X86_VGTOD_H
+ 
+-#include <asm/vsyscall.h>
+ #include <linux/clocksource.h>
+ 
++#include <asm/vsyscall.h>
++#include <asm/unistd.h>
++
+ struct vsyscall_gtod_data {
+ 	seqlock_t	lock;
+ 
+@@ -26,4 +28,64 @@ extern struct vsyscall_gtod_data __vsyscall_gtod_data
+ __section_vsyscall_gtod_data;
+ extern struct vsyscall_gtod_data vsyscall_gtod_data;
+ 
++/* 
++ * Common implementation of vdso/vsyscall time functions.  This code
++ * is used in usermode, exported via either vdso or vsyscall.  Because
++ * of this, it must be inlined rather than linked, hence implemented
++ * in a .h as inline functions.
++ */
++notrace static __always_inline
++long vgetns(const struct vsyscall_gtod_data *gtod)
++{
++	long v;
++	cycles_t (*vread)(void);
++
++	vread = gtod->clock.vread;
++	v = (vread() - gtod->clock.cycle_last) & gtod->clock.mask;
++	return (v * gtod->clock.mult) >> gtod->clock.shift;
++}
++
++notrace static __always_inline
++int __do_realtime(const struct vsyscall_gtod_data *gtod,
++		  struct timespec *ts)
++{
++	unsigned long seq, ns;
++	do {
++		seq = read_seqbegin(&gtod->lock);
++		ts->tv_sec = gtod->wall_time_sec;
++		ts->tv_nsec = gtod->wall_time_nsec;
++		ns = vgetns(gtod);
++	} while (unlikely(read_seqretry(&gtod->lock, seq)));
++	timespec_add_ns(ts, ns);
++	return 0;
++}
++
++notrace static __always_inline
++int __do_vgettimeofday(const struct vsyscall_gtod_data *gtod,
++		       struct timeval *tv, struct timezone *tz)
++{
++	long ret;
++
++	if (likely(gtod->sysctl_enabled && gtod->clock.vread)) {
++		if (likely(tv != NULL)) {
++			BUILD_BUG_ON(offsetof(struct timeval, tv_usec) !=
++				     offsetof(struct timespec, tv_nsec) ||
++				     sizeof(*tv) != sizeof(struct timespec));
++			__do_realtime(gtod, (struct timespec *)tv);
++			tv->tv_usec /= 1000;
++		}
++
++		if (unlikely(tz != NULL)) {
++			/* Avoid memcpy. Some old compilers fail to inline it */
++			tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest;
++			tz->tz_dsttime = gtod->sys_tz.tz_dsttime;
++		}
++		return 0;
++	}
++
++	asm("syscall" : "=a" (ret) :
++	    "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
++	return ret;
++}
++
+ #endif /* _ASM_X86_VGTOD_H */
 diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h
-index d0983d2..df5fb43 100644
+index d0983d2..51470ed 100644
 --- a/arch/x86/include/asm/vsyscall.h
 +++ b/arch/x86/include/asm/vsyscall.h
-@@ -33,6 +33,9 @@ enum vsyscall_num {
+@@ -33,12 +33,44 @@ enum vsyscall_num {
  extern int __vgetcpu_mode;
  extern volatile unsigned long __jiffies;
  
@@ -1963,6 +2045,41 @@ index d0983d2..df5fb43 100644
  /* kernel space (writeable) */
  extern int vgetcpu_mode;
  extern struct timezone sys_tz;
+ 
+ extern void map_vsyscall(void);
+ 
++#ifdef CONFIG_X86_VSYSCALL
++
++#include <linux/getcpu.h>
++#include <asm/segment.h>
++
++static __always_inline
++int __vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache,
++	      unsigned long jiffies, int vgetcpu_mode)
++{
++	unsigned int p;
++
++	/* tcache is ignored - it is too unreliable */
++
++	if (vgetcpu_mode == VGETCPU_RDTSCP) {
++		/* Load per CPU data from RDTSCP */
++		native_read_tscp(&p);
++	} else {
++		/* Load per CPU data from GDT */
++		asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
++	}
++
++	if (cpu)
++		*cpu = p & 0xfff;
++	if (node)
++		*node = p >> 12;
++	return 0;
++}
++#endif	/* CONFIG_X86_VSYSCALL */
++
+ #endif /* __KERNEL__ */
+ 
+ #endif /* _ASM_X86_VSYSCALL_H */
 diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
 index 9c371e4..7de93f3 100644
 --- a/arch/x86/include/asm/xen/hypercall.h
@@ -2822,9 +2939,27 @@ index 5cb5725..1e3bd20 100644
   * Drop the i-th range from the early reservation map,
   * by copying any higher ranges down one over it, and
 diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
-index dedc2bd..1f4ac05 100644
+index dedc2bd..9b32c88 100644
 --- a/arch/x86/kernel/hpet.c
 +++ b/arch/x86/kernel/hpet.c
+@@ -64,7 +64,7 @@ static inline void hpet_writel(unsigned long d, unsigned long a)
+ static inline void hpet_set_mapping(void)
+ {
+ 	hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
+-#ifdef CONFIG_X86_64
++#ifdef CONFIG_X86_VSYSCALL
+ 	__set_fixmap(VSYSCALL_HPET, hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
+ #endif
+ }
+@@ -744,7 +744,7 @@ static cycle_t read_hpet(struct clocksource *cs)
+ 	return (cycle_t)hpet_readl(HPET_COUNTER);
+ }
+ 
+-#ifdef CONFIG_X86_64
++#ifdef CONFIG_X86_VSYSCALL
+ static cycle_t __vsyscall_fn vread_hpet(void)
+ {
+ 	return readl((const void __iomem *)fix_to_virt(VSYSCALL_HPET) + 0xf0);
 @@ -759,7 +759,7 @@ static struct clocksource clocksource_hpet = {
  	.shift		= HPET_SHIFT,
  	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
@@ -2923,6 +3058,26 @@ index 99c4d30..919c1a8 100644
 -	return do_iopl(level, regs);
 -}
 -#endif
+diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
+index e5efcdc..f1310e3 100644
+--- a/arch/x86/kernel/kvmclock.c
++++ b/arch/x86/kernel/kvmclock.c
+@@ -77,9 +77,14 @@ static cycle_t kvm_clock_read(void)
+ 	return ret;
+ }
+ 
++static struct clocksource kvm_clock;
++
+ static cycle_t kvm_clock_get_cycles(struct clocksource *cs)
+ {
+-	return kvm_clock_read();
++	cycle_t ret = kvm_clock_read();
++
++	return ret >= kvm_clock.cycle_last ?
++		ret : kvm_clock.cycle_last;
+ }
+ 
+ /*
 diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
[...5685 lines suppressed...]
++/* xen_pci_sharedinfo flags */
++#define _XEN_PCIF_active     (0)
++#define XEN_PCIF_active      (1<<_XEN_PCIF_active)
++#define _XEN_PCIB_AERHANDLER (1)
++#define XEN_PCIB_AERHANDLER  (1<<_XEN_PCIB_AERHANDLER)
++#define _XEN_PCIB_active     (2)
++#define XEN_PCIB_active      (1<<_XEN_PCIB_active)
++
++/* xen_pci_op commands */
++#define XEN_PCI_OP_conf_read    	(0)
++#define XEN_PCI_OP_conf_write   	(1)
++#define XEN_PCI_OP_enable_msi   	(2)
++#define XEN_PCI_OP_disable_msi  	(3)
++#define XEN_PCI_OP_enable_msix  	(4)
++#define XEN_PCI_OP_disable_msix 	(5)
++#define XEN_PCI_OP_aer_detected 	(6)
++#define XEN_PCI_OP_aer_resume		(7)
++#define XEN_PCI_OP_aer_mmio		(8)
++#define XEN_PCI_OP_aer_slotreset	(9)
++
++/* xen_pci_op error numbers */
++#define XEN_PCI_ERR_success          (0)
++#define XEN_PCI_ERR_dev_not_found   (-1)
++#define XEN_PCI_ERR_invalid_offset  (-2)
++#define XEN_PCI_ERR_access_denied   (-3)
++#define XEN_PCI_ERR_not_implemented (-4)
++/* XEN_PCI_ERR_op_failed - backend failed to complete the operation */
++#define XEN_PCI_ERR_op_failed       (-5)
++
++/*
++ * it should be PAGE_SIZE-sizeof(struct xen_pci_op))/sizeof(struct msix_entry))
++ * Should not exceed 128
++ */
++#define SH_INFO_MAX_VEC     128
++
++struct xen_msix_entry {
++    uint16_t vector;
++    uint16_t entry;
++};
++struct xen_pci_op {
++    /* IN: what action to perform: XEN_PCI_OP_* */
++    uint32_t cmd;
++
++    /* OUT: will contain an error number (if any) from errno.h */
++    int32_t err;
++
++    /* IN: which device to touch */
++    uint32_t domain; /* PCI Domain/Segment */
++    uint32_t bus;
++    uint32_t devfn;
++
++    /* IN: which configuration registers to touch */
++    int32_t offset;
++    int32_t size;
++
++    /* IN/OUT: Contains the result after a READ or the value to WRITE */
++    uint32_t value;
++    /* IN: Contains extra infor for this operation */
++    uint32_t info;
++    /*IN:  param for msi-x */
++    struct xen_msix_entry msix_entries[SH_INFO_MAX_VEC];
++};
++
++/*used for pcie aer handling*/
++struct xen_pcie_aer_op
++{
++
++    /* IN: what action to perform: XEN_PCI_OP_* */
++    uint32_t cmd;
++    /*IN/OUT: return aer_op result or carry error_detected state as input*/
++    int32_t err;
++
++    /* IN: which device to touch */
++    uint32_t domain; /* PCI Domain/Segment*/
++    uint32_t bus;
++    uint32_t devfn;
++};
++struct xen_pci_sharedinfo {
++    /* flags - XEN_PCIF_* */
++    uint32_t flags;
++    struct xen_pci_op op;
++    struct xen_pcie_aer_op aer_op;
++};
++
++#endif /* __XEN_PCI_COMMON_H__ */
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
 diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h
 index e8cbf43..865dcf0 100644
 --- a/include/xen/interface/io/ring.h
@@ -17484,6 +22860,26 @@ index e8cbf43..865dcf0 100644
      union __name##_sring_entry ring[1]; /* variable-length */		\
  };									\
  									\
+diff --git a/include/xen/interface/io/xenbus.h b/include/xen/interface/io/xenbus.h
+index 46508c7..9fda532 100644
+--- a/include/xen/interface/io/xenbus.h
++++ b/include/xen/interface/io/xenbus.h
+@@ -27,8 +27,14 @@ enum xenbus_state
+ 	XenbusStateClosing      = 5,  /* The device is being closed
+ 					 due to an error or an unplug
+ 					 event. */
+-	XenbusStateClosed       = 6
++	XenbusStateClosed       = 6,
+ 
++	/*
++	* Reconfiguring: The device is being reconfigured.
++	*/
++	XenbusStateReconfiguring = 7,
++
++	XenbusStateReconfigured  = 8
+ };
+ 
+ #endif /* _XEN_PUBLIC_IO_XENBUS_H */
 diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h
 index af36ead..eac3ce1 100644
 --- a/include/xen/interface/memory.h
@@ -18809,45 +24205,44 @@ index 0ec9ed8..07a11dc 100644
  		desc->status |= IRQ_SUSPENDED;
  	}
 diff --git a/kernel/sched.c b/kernel/sched.c
-index 1b59e26..b998504 100644
+index 1b59e26..3982e8e 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
-@@ -7005,6 +7005,13 @@ out:
+@@ -1951,6 +1951,12 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
+ 	return delta < (s64)sysctl_sched_migration_cost;
  }
- EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr);
  
-+static ATOMIC_NOTIFIER_HEAD(migration_notifications);
++static ATOMIC_NOTIFIER_HEAD(task_migration_notifier);
 +
-+void register_migration_notifier(struct notifier_block *n)
++void register_task_migration_notifier(struct notifier_block *n)
 +{
-+	atomic_notifier_chain_register(&migration_notifications, n);
++	atomic_notifier_chain_register(&task_migration_notifier, n);
 +}
+ 
+ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
+ {
+@@ -1973,6 +1979,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
+ 		p->se.block_start -= clock_offset;
+ #endif
+ 	if (old_cpu != new_cpu) {
++		struct task_migration_notifier tmn;
 +
- /*
-  * Move (not current) task off this cpu, onto dest cpu. We're doing
-  * this because either it can't run here any more (set_cpus_allowed()
-@@ -7020,6 +7027,7 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
- {
- 	struct rq *rq_dest, *rq_src;
- 	int ret = 0, on_rq;
-+	struct migration_notifier mn;
- 
- 	if (unlikely(!cpu_active(dest_cpu)))
- 		return ret;
-@@ -7044,6 +7052,13 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
- 		activate_task(rq_dest, p, 0);
- 		check_preempt_curr(rq_dest, p, 0);
- 	}
+ 		p->se.nr_migrations++;
+ 		new_rq->nr_migrations_in++;
+ #ifdef CONFIG_SCHEDSTATS
+@@ -1981,6 +1989,12 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
+ #endif
+ 		perf_swcounter_event(PERF_COUNT_SW_CPU_MIGRATIONS,
+ 				     1, 1, NULL, 0);
 +
-+	mn.task = p;
-+	mn.from_cpu = src_cpu;
-+	mn.to_cpu = dest_cpu;
-+
-+	atomic_notifier_call_chain(&migration_notifications, 0, &mn);
-+
- done:
- 	ret = 1;
- fail:
++		tmn.task = p;
++		tmn.from_cpu = old_cpu;
++		tmn.to_cpu = new_cpu;
++
++		atomic_notifier_call_chain(&task_migration_notifier, 0, &tmn);
+ 	}
+ 	p->se.vruntime -= old_cfsrq->min_vruntime -
+ 					 new_cfsrq->min_vruntime;
 diff --git a/lib/swiotlb.c b/lib/swiotlb.c
 index bffe6d7..cec5f62 100644
 --- a/lib/swiotlb.c




More information about the fedora-extras-commits mailing list