rpms/kernel/devel drm-edid-fixes.patch, NONE, 1.1.2.1 patch-2.6.31.1.bz2.sign, NONE, 1.1.2.1 .cvsignore, 1.1014.2.30, 1.1014.2.31 Makefile, 1.97.6.7, 1.97.6.8 drm-nouveau.patch, 1.8.6.19, 1.8.6.20 kernel.spec, 1.1294.2.68, 1.1294.2.69 linux-2.6-raidlockdep.patch, 1.1.2.1, 1.1.2.2 sources, 1.976.2.31, 1.976.2.32 upstream, 1.888.2.30, 1.888.2.31 xen.pvops.patch, 1.1.2.43, 1.1.2.44 xen.pvops.post.patch, 1.1.2.28, 1.1.2.29 linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch, 1.1.2.2, NONE linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch, 1.1.2.2, NONE linux-2.6-scsi-sd-fix-oops-during-scanning.patch, 1.1.2.1, NONE linux-2.6-scsi-sg-fix-oops-in-error-path.patch, 1.1.2.1, NONE linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch, 1.1.2.2, NONE

myoung myoung at fedoraproject.org
Thu Sep 24 21:05:45 UTC 2009


Author: myoung

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

Modified Files:
      Tag: private-myoung-dom0-branch
	.cvsignore Makefile drm-nouveau.patch kernel.spec 
	linux-2.6-raidlockdep.patch sources upstream xen.pvops.patch 
	xen.pvops.post.patch 
Added Files:
      Tag: private-myoung-dom0-branch
	drm-edid-fixes.patch patch-2.6.31.1.bz2.sign 
Removed Files:
      Tag: private-myoung-dom0-branch
	linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch 
	linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch 
	linux-2.6-scsi-sd-fix-oops-during-scanning.patch 
	linux-2.6-scsi-sg-fix-oops-in-error-path.patch 
	linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch 
Log Message:
Try a dri fix in the latest xen/master


drm-edid-fixes.patch:
 drm_edid.c |   40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

--- NEW FILE drm-edid-fixes.patch ---
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 90d76ba..9888c20 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -109,7 +109,9 @@ static struct edid_quirk {
 
 
 /* Valid EDID header has these bytes */
-static u8 edid_header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
+static const u8 edid_header[] = {
+	0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00
+};
 
 /**
  * edid_is_valid - sanity check EDID data
@@ -500,6 +502,19 @@ static struct drm_display_mode *drm_find_dmt(struct drm_device *dev,
 	}
 	return mode;
 }
+
+/*
+ * 0 is reserved.  The spec says 0x01 fill for unused timings.  Some old
+ * monitors fill with ascii space (0x20) instead.
+ */
+static int
+bad_std_timing(u8 a, u8 b)
+{
+	return (a == 0x00 && b == 0x00) ||
+	       (a == 0x01 && b == 0x01) ||
+	       (a == 0x20 && b == 0x20);
+}
+
 /**
  * drm_mode_std - convert standard mode info (width, height, refresh) into mode
  * @t: standard timing params
@@ -513,6 +528,7 @@ static struct drm_display_mode *drm_find_dmt(struct drm_device *dev,
  */
 struct drm_display_mode *drm_mode_std(struct drm_device *dev,
 				      struct std_timing *t,
+				      int revision,
 				      int timing_level)
 {
 	struct drm_display_mode *mode;
@@ -523,14 +539,20 @@ struct drm_display_mode *drm_mode_std(struct drm_device *dev,
 	unsigned vfreq = (t->vfreq_aspect & EDID_TIMING_VFREQ_MASK)
 		>> EDID_TIMING_VFREQ_SHIFT;
 
+	if (bad_std_timing(t->hsize, t->vfreq_aspect))
+		return NULL;
+
 	/* According to the EDID spec, the hdisplay = hsize * 8 + 248 */
 	hsize = t->hsize * 8 + 248;
 	/* vrefresh_rate = vfreq + 60 */
 	vrefresh_rate = vfreq + 60;
 	/* the vdisplay is calculated based on the aspect ratio */
-	if (aspect_ratio == 0)
-		vsize = (hsize * 10) / 16;
-	else if (aspect_ratio == 1)
+	if (aspect_ratio == 0) {
+		if (revision < 3)
+			vsize = hsize;
+		else
+			vsize = (hsize * 10) / 16;
+	} else if (aspect_ratio == 1)
 		vsize = (hsize * 3) / 4;
 	else if (aspect_ratio == 2)
 		vsize = (hsize * 4) / 5;
@@ -779,7 +801,7 @@ static int add_standard_modes(struct drm_connector *connector, struct edid *edid
 			continue;
 
 		newmode = drm_mode_std(dev, &edid->standard_timings[i],
-					timing_level);
+				       edid->revision, timing_level);
 		if (newmode) {
 			drm_mode_probed_add(connector, newmode);
 			modes++;
@@ -829,13 +851,13 @@ static int add_detailed_info(struct drm_connector *connector,
 			case EDID_DETAIL_MONITOR_CPDATA:
 				break;
 			case EDID_DETAIL_STD_MODES:
-				/* Five modes per detailed section */
-				for (j = 0; j < 5; i++) {
+				for (j = 0; j < 6; i++) {
 					struct std_timing *std;
 					struct drm_display_mode *newmode;
 
 					std = &data->data.timings[j];
 					newmode = drm_mode_std(dev, std,
+							       edid->revision,
 							       timing_level);
 					if (newmode) {
 						drm_mode_probed_add(connector, newmode);
@@ -964,7 +986,9 @@ static int add_detailed_info_eedid(struct drm_connector *connector,
 				struct drm_display_mode *newmode;
 
 				std = &data->data.timings[j];
-				newmode = drm_mode_std(dev, std, timing_level);
+				newmode = drm_mode_std(dev, std,
+						       edid->revision,
+						       timing_level);
 				if (newmode) {
 					drm_mode_probed_add(connector, newmode);
 					modes++;


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

iD8DBQBKu7QfyGugalF9Dw4RAsOXAJsFcZg2T7EeVt3LtEOQ9kw1QMUgagCff6bk
9tVlqfN7sHAgL+N2XFIir1o=
=6zvK
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.1014.2.30
retrieving revision 1.1014.2.31
diff -u -p -r1.1014.2.30 -r1.1014.2.31
--- .cvsignore	10 Sep 2009 14:00:22 -0000	1.1014.2.30
+++ .cvsignore	24 Sep 2009 21:05:03 -0000	1.1014.2.31
@@ -5,3 +5,4 @@ kernel-2.6.*.config
 temp-*
 kernel-2.6.31
 linux-2.6.31.tar.bz2
+patch-2.6.31.1.bz2



drm-nouveau.patch:
 drivers/gpu/drm/Kconfig                     |   45 
 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      |  127 
 drivers/gpu/drm/nouveau/nouveau_backlight.c |  155 
 drivers/gpu/drm/nouveau/nouveau_bios.c      | 5476 ++++++
 drivers/gpu/drm/nouveau/nouveau_bios.h      |  235 
 drivers/gpu/drm/nouveau/nouveau_bo.c        |  620 
 drivers/gpu/drm/nouveau/nouveau_calc.c      |  626 
 drivers/gpu/drm/nouveau/nouveau_channel.c   |  540 
 drivers/gpu/drm/nouveau/nouveau_connector.c |  754 
 drivers/gpu/drm/nouveau/nouveau_connector.h |   55 
 drivers/gpu/drm/nouveau/nouveau_crtc.h      |   95 
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  157 
 drivers/gpu/drm/nouveau/nouveau_display.c   |  115 
 drivers/gpu/drm/nouveau/nouveau_dma.c       |  206 
 drivers/gpu/drm/nouveau/nouveau_dma.h       |  148 
 drivers/gpu/drm/nouveau/nouveau_drv.c       |  437 
 drivers/gpu/drm/nouveau/nouveau_drv.h       | 1262 +
 drivers/gpu/drm/nouveau/nouveau_encoder.h   |   66 
 drivers/gpu/drm/nouveau/nouveau_fb.h        |   47 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  357 
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |   48 
 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       |  688 
 drivers/gpu/drm/nouveau/nouveau_mem.c       |  572 
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |  194 
 drivers/gpu/drm/nouveau/nouveau_object.c    | 1294 +
 drivers/gpu/drm/nouveau/nouveau_reg.h       |  833 +
 drivers/gpu/drm/nouveau/nouveau_sgdma.c     |  318 
 drivers/gpu/drm/nouveau/nouveau_state.c     |  848 +
 drivers/gpu/drm/nouveau/nouveau_swmthd.h    |   33 
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  131 
 drivers/gpu/drm/nouveau/nv04_crtc.c         | 1019 +
 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        |  295 
 drivers/gpu/drm/nouveau/nv04_fifo.c         |  296 
 drivers/gpu/drm/nouveau/nv04_graph.c        |  585 
 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         |  178 
 drivers/gpu/drm/nouveau/nv10_graph.c        |  950 +
 drivers/gpu/drm/nouveau/nv17_tv.c           |  688 
 drivers/gpu/drm/nouveau/nv17_tv.h           |  156 
 drivers/gpu/drm/nouveau/nv17_tv_modes.c     |  583 
 drivers/gpu/drm/nouveau/nv20_graph.c        |  789 
 drivers/gpu/drm/nouveau/nv40_fb.c           |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c         |  224 
 drivers/gpu/drm/nouveau/nv40_graph.c        | 2238 ++
 drivers/gpu/drm/nouveau/nv40_mc.c           |   38 
 drivers/gpu/drm/nouveau/nv50_crtc.c         |  809 +
 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        |  256 
 drivers/gpu/drm/nouveau/nv50_fifo.c         |  479 
 drivers/gpu/drm/nouveau/nv50_graph.c        |  450 
 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          |  250 
 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, 58650 insertions(+)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.8.6.19 -r 1.8.6.20 drm-nouveau.patchIndex: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.8.6.19
retrieving revision 1.8.6.20
diff -u -p -r1.8.6.19 -r1.8.6.20
--- drm-nouveau.patch	19 Sep 2009 16:47:26 -0000	1.8.6.19
+++ drm-nouveau.patch	24 Sep 2009 21:05:07 -0000	1.8.6.20
@@ -61,64 +61,6 @@ index 3c8827a..d22e64b 100644
  obj-$(CONFIG_DRM_VIA)	+=via/
 +obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
 +obj-y			+= i2c/
-diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
-index 6246e3f..436e2fe 100644
---- a/drivers/gpu/drm/drm_bufs.c
-+++ b/drivers/gpu/drm/drm_bufs.c
-@@ -51,38 +51,24 @@ resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resour
- 
- EXPORT_SYMBOL(drm_get_resource_len);
- 
--static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
--						  struct drm_local_map *map)
-+struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
-+					   struct drm_local_map *map)
- {
- 	struct drm_map_list *entry;
- 	list_for_each_entry(entry, &dev->maplist, head) {
--		/*
--		 * Because the kernel-userspace ABI is fixed at a 32-bit offset
--		 * while PCI resources may live above that, we ignore the map
--		 * offset for maps of type _DRM_FRAMEBUFFER or _DRM_REGISTERS.
--		 * It is assumed that each driver will have only one resource of
--		 * each type.
--		 */
- 		if (!entry->map ||
- 		    map->type != entry->map->type ||
- 		    entry->master != dev->primary->master)
- 			continue;
--		switch (map->type) {
--		case _DRM_SHM:
--			if (map->flags != _DRM_CONTAINS_LOCK)
--				break;
--		case _DRM_REGISTERS:
--		case _DRM_FRAME_BUFFER:
--			return entry;
--		default: /* Make gcc happy */
--			;
--		}
--		if (entry->map->offset == map->offset)
-+
-+		if (entry->map->offset == map->offset ||
-+		    (map->type == _DRM_SHM && map->flags & _DRM_CONTAINS_LOCK))
- 			return entry;
- 	}
- 
- 	return NULL;
- }
-+EXPORT_SYMBOL(drm_find_matching_map);
- 
- static int drm_map_handle(struct drm_device *dev, struct drm_hash_item *hash,
- 			  unsigned long user_token, int hashed_handle, int shm)
-@@ -357,7 +343,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
- 	/* We do it here so that dev->struct_mutex protects the increment */
- 	user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle :
- 		map->offset;
--	ret = drm_map_handle(dev, &list->hash, user_token, 0,
-+	ret = drm_map_handle(dev, &list->hash, user_token, 1,
- 			     (map->type == _DRM_SHM));
- 	if (ret) {
- 		if (map->type == _DRM_REGISTERS)
 diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
 new file mode 100644
 index 0000000..6d2abaf
@@ -131,10 +73,10 @@ index 0000000..6d2abaf
 +obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o
 diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
 new file mode 100644
-index 0000000..0a3f7a0
+index 0000000..9422a74
 --- /dev/null
 +++ b/drivers/gpu/drm/i2c/ch7006_drv.c
-@@ -0,0 +1,532 @@
+@@ -0,0 +1,531 @@
 +/*
 + * Copyright (C) 2009 Francisco Jerez.
 + * All Rights Reserved.
@@ -350,12 +292,11 @@ index 0000000..0a3f7a0
 +		priv->subconnector = DRM_MODE_SUBCONNECTOR_Unknown;
 +
 +	drm_connector_property_set_value(connector,
-+					 encoder->dev->mode_config.tv_subconnector_property,
-+					 priv->subconnector);
++			encoder->dev->mode_config.tv_subconnector_property,
++							priv->subconnector);
 +
-+	return priv->subconnector?
-+		connector_status_connected
-+		: connector_status_disconnected;
++	return priv->subconnector ? connector_status_connected :
++					connector_status_disconnected;
 +}
 +
 +static int ch7006_encoder_get_modes(struct drm_encoder *encoder,
@@ -371,7 +312,7 @@ index 0000000..0a3f7a0
 +			continue;
 +
 +		drm_mode_probed_add(connector,
-+				    drm_mode_duplicate(encoder->dev, &mode->mode));
++				drm_mode_duplicate(encoder->dev, &mode->mode));
 +
 +		n++;
 +	}
@@ -644,11 +585,11 @@ index 0000000..0a3f7a0
 +	drm_i2c_encoder_unregister(&ch7006_driver);
 +}
 +
-+int ch7006_debug = 0;
++int ch7006_debug;
 +module_param_named(debug, ch7006_debug, int, 0600);
 +MODULE_PARM_DESC(debug, "Enable debug output.");
 +
-+char *ch7006_tv_norm = NULL;
++char *ch7006_tv_norm;
 +module_param_named(tv_norm, ch7006_tv_norm, charp, 0600);
 +MODULE_PARM_DESC(tv_norm, "Default TV norm.\n"
 +		 "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, PAL-60, NTSC-M, NTSC-J.\n"
@@ -669,7 +610,7 @@ index 0000000..0a3f7a0
 +module_exit(ch7006_exit);
 diff --git a/drivers/gpu/drm/i2c/ch7006_mode.c b/drivers/gpu/drm/i2c/ch7006_mode.c
 new file mode 100644
-index 0000000..7ffe0bd
+index 0000000..87f5445
 --- /dev/null
 +++ b/drivers/gpu/drm/i2c/ch7006_mode.c
 @@ -0,0 +1,473 @@
@@ -971,8 +912,8 @@ index 0000000..7ffe0bd
 +	uint8_t *power = &priv->state.regs[CH7006_POWER];
 +	int subconnector;
 +
-+	subconnector = priv->select_subconnector?
-+		priv->select_subconnector : priv->subconnector;
++	subconnector = priv->select_subconnector ? priv->select_subconnector :
++							priv->subconnector;
 +
 +	*power = CH7006_POWER_RESET;
 +
@@ -1148,10 +1089,10 @@ index 0000000..7ffe0bd
 +}
 diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h
 new file mode 100644
-index 0000000..576bbea
+index 0000000..b06d3d9
 --- /dev/null
 +++ b/drivers/gpu/drm/i2c/ch7006_priv.h
-@@ -0,0 +1,340 @@
+@@ -0,0 +1,344 @@
 +/*
 + * Copyright (C) 2009 Francisco Jerez.
 + * All Rights Reserved.
@@ -1252,7 +1193,8 @@ index 0000000..576bbea
 +	int last_dpms;
 +};
 +
-+#define to_ch7006_priv(x) ((struct ch7006_priv *)to_encoder_slave(x)->slave_priv)
++#define to_ch7006_priv(x) \
++	((struct ch7006_priv *)to_encoder_slave(x)->slave_priv)
 +
 +extern int ch7006_debug;
 +extern char *ch7006_tv_norm;
@@ -1286,22 +1228,25 @@ index 0000000..576bbea
 +			dev_printk(KERN_DEBUG, &client->dev,		\
 +				   "%s: " format, __func__, ## __VA_ARGS__); \
 +	} while (0)
-+#define ch7006_info(client, format, ...) dev_info(&client->dev, format, __VA_ARGS__)
-+#define ch7006_err(client, format, ...) dev_err(&client->dev, format, __VA_ARGS__)
++#define ch7006_info(client, format, ...) \
++				dev_info(&client->dev, format, __VA_ARGS__)
++#define ch7006_err(client, format, ...) \
++				dev_err(&client->dev, format, __VA_ARGS__)
 +
-+#define __mask(src, bitfield) (((2 << (1?bitfield)) - 1) & ~((1 << (0?bitfield)) - 1))
++#define __mask(src, bitfield) \
++		(((2 << (1 ? bitfield)) - 1) & ~((1 << (0 ? bitfield)) - 1))
 +#define mask(bitfield) __mask(bitfield)
 +
-+#define __bitf(src, bitfield, x) (((x) >> (src) << (0?bitfield)) &	\
-+				  __mask(src, bitfield))
++#define __bitf(src, bitfield, x) \
++		(((x) >> (src) << (0 ? bitfield)) &  __mask(src, bitfield))
 +#define bitf(bitfield, x) __bitf(bitfield, x)
 +#define bitfs(bitfield, s) __bitf(bitfield, bitfield##_##s)
 +#define setbitf(state, reg, bitfield, x)				\
 +	state->regs[reg] = (state->regs[reg] & ~mask(reg##_##bitfield))	\
 +		| bitf(reg##_##bitfield, x)
 +
-+#define __unbitf(src, bitfield, x) ((x & __mask(src, bitfield)) \
-+				    >> (0?bitfield) << (src))
++#define __unbitf(src, bitfield, x) \
++		((x & __mask(src, bitfield)) >> (0 ? bitfield) << (src))
 +#define unbitf(bitfield, x) __unbitf(bitfield, x)
[...7623 lines suppressed...]
 new file mode 100644
-index 0000000..062d085
+index 0000000..225f301
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
-@@ -0,0 +1,499 @@
+@@ -0,0 +1,508 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + *
@@ -56970,7 +57527,7 @@ index 0000000..062d085
 +
 +/*NOTE: - Assumes 0x1700 already covers the correct MiB of PRAMIN
 + */
-+#define BAR0_WI32(g,o,v) do {                                     \
++#define BAR0_WI32(g, o, v) do {                                   \
 +	uint32_t offset;                                          \
 +	if ((g)->im_backing) {                                    \
 +		offset = (g)->im_backing_start;                   \
@@ -56980,7 +57537,7 @@ index 0000000..062d085
 +	}                                                         \
 +	offset += (o);                                            \
 +	nv_wr32(dev, NV_RAMIN + (offset & 0xfffff), (v));              \
-+} while(0)
++} while (0)
 +
 +int
 +nv50_instmem_init(struct drm_device *dev)
@@ -56998,7 +57555,7 @@ index 0000000..062d085
 +	dev_priv->engine.instmem.priv = priv;
 +
 +	/* Save state, will restore at takedown. */
-+	for (i = 0x1700; i <= 0x1710; i+=4)
++	for (i = 0x1700; i <= 0x1710; i += 4)
 +		priv->save1700[(i-0x1700)/4] = nv_rd32(dev, i);
 +
 +	/* Reserve the last MiB of VRAM, we should probably try to avoid
@@ -57066,24 +57623,27 @@ index 0000000..062d085
 +	dev_priv->fifos[0] = dev_priv->fifos[127] = chan;
 +
 +	/* Channel's PRAMIN object + heap */
-+	if ((ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
-+					   NULL, &chan->ramin)))
++	ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
++							NULL, &chan->ramin);
++	if (ret)
 +		return ret;
 +
 +	if (nouveau_mem_init_heap(&chan->ramin_heap, c_base, c_size - c_base))
 +		return -ENOMEM;
 +
 +	/* RAMFC + zero channel's PRAMIN up to start of VM pagedir */
-+	if ((ret = nouveau_gpuobj_new_fake(dev, c_ramfc, c_offset + c_ramfc,
-+					   0x4000, 0, NULL, &chan->ramfc)))
++	ret = nouveau_gpuobj_new_fake(dev, c_ramfc, c_offset + c_ramfc,
++						0x4000, 0, NULL, &chan->ramfc);
++	if (ret)
 +		return ret;
 +
 +	for (i = 0; i < c_vmpd; i += 4)
 +		BAR0_WI32(chan->ramin->gpuobj, i, 0);
 +
 +	/* VM page directory */
-+	if ((ret = nouveau_gpuobj_new_fake(dev, c_vmpd, c_offset + c_vmpd,
-+					   0x4000, 0, &chan->vm_pd, NULL)))
++	ret = nouveau_gpuobj_new_fake(dev, c_vmpd, c_offset + c_vmpd,
++					   0x4000, 0, &chan->vm_pd, NULL);
++	if (ret)
 +		return ret;
 +	for (i = 0; i < 0x4000; i += 8) {
 +		BAR0_WI32(chan->vm_pd, i + 0x00, 0x00000000);
@@ -57093,11 +57653,12 @@ index 0000000..062d085
 +	/* PRAMIN page table, cheat and map into VM at 0x0000000000.
 +	 * We map the entire fake channel into the start of the PRAMIN BAR
 +	 */
-+	if ((ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pt_size, 0x1000,
-+					  0, &priv->pramin_pt)))
++	ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pt_size, 0x1000,
++							0, &priv->pramin_pt);
++	if (ret)
 +		return ret;
 +
-+	for (i = 0, v = c_offset; i < pt_size; i+=8, v+=0x1000) {
++	for (i = 0, v = c_offset; i < pt_size; i += 8, v += 0x1000) {
 +		if (v < (c_offset + c_size))
 +			BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, v | 1);
 +		else
@@ -57114,13 +57675,15 @@ index 0000000..062d085
 +					     NV50_VM_BLOCK/65536*8, 0, 0,
 +					     &chan->vm_vram_pt[i]);
 +		if (ret) {
-+			NV_ERROR(dev, "Error creating VRAM page tables: %d\n", ret);
++			NV_ERROR(dev, "Error creating VRAM page tables: %d\n",
++									ret);
 +			dev_priv->vm_vram_pt_nr = i;
 +			return ret;
 +		}
 +		dev_priv->vm_vram_pt[i] = chan->vm_vram_pt[i]->gpuobj;
 +
-+		for (v = 0; v < dev_priv->vm_vram_pt[i]->im_pramin->size; v+=4)
++		for (v = 0; v < dev_priv->vm_vram_pt[i]->im_pramin->size;
++								v += 4)
 +			BAR0_WI32(dev_priv->vm_vram_pt[i], v, 0);
 +
 +		BAR0_WI32(chan->vm_pd, 0x10 + (i*8),
@@ -57129,8 +57692,9 @@ index 0000000..062d085
 +	}
 +
 +	/* DMA object for PRAMIN BAR */
-+	if ((ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0,
-+					  &priv->pramin_bar)))
++	ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0,
++							&priv->pramin_bar);
++	if (ret)
 +		return ret;
 +	BAR0_WI32(priv->pramin_bar->gpuobj, 0x00, 0x7fc00000);
 +	BAR0_WI32(priv->pramin_bar->gpuobj, 0x04, dev_priv->ramin_size - 1);
@@ -57140,8 +57704,9 @@ index 0000000..062d085
 +	BAR0_WI32(priv->pramin_bar->gpuobj, 0x14, 0x00000000);
 +
 +	/* DMA object for FB BAR */
-+	if ((ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0,
-+					  &priv->fb_bar)))
++	ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0,
++							&priv->fb_bar);
++	if (ret)
 +		return ret;
 +	BAR0_WI32(priv->fb_bar->gpuobj, 0x00, 0x7fc00000);
 +	BAR0_WI32(priv->fb_bar->gpuobj, 0x04, 0x40000000 +
@@ -57167,9 +57732,10 @@ index 0000000..062d085
 +	/* Assume that praying isn't enough, check that we can re-read the
 +	 * entire fake channel back from the PRAMIN BAR */
 +	dev_priv->engine.instmem.prepare_access(dev, false);
-+	for (i = 0; i < c_size; i+=4) {
++	for (i = 0; i < c_size; i += 4) {
 +		if (nv_rd32(dev, NV_RAMIN + i) != nv_ri32(dev, i)) {
-+			NV_ERROR(dev, "Error reading back PRAMIN at 0x%08x\n", i);
++			NV_ERROR(dev, "Error reading back PRAMIN at 0x%08x\n",
++									i);
 +			dev_priv->engine.instmem.finish_access(dev);
 +			return -EINVAL;
 +		}
@@ -57206,8 +57772,8 @@ index 0000000..062d085
 +		return;
 +
 +	/* Restore state from before init */
-+	for (i = 0x1700; i <= 0x1710; i+=4)
-+		nv_wr32(dev, i, priv->save1700[(i-0x1700)/4]);
++	for (i = 0x1700; i <= 0x1710; i += 4)
++		nv_wr32(dev, i, priv->save1700[(i - 0x1700) / 4]);
 +
 +	nouveau_gpuobj_ref_del(dev, &priv->fb_bar);
 +	nouveau_gpuobj_ref_del(dev, &priv->pramin_bar);
@@ -57470,7 +58036,7 @@ 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..45b0ff7
+index 0000000..a2dee96
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_sor.c
 @@ -0,0 +1,250 @@
@@ -57526,7 +58092,7 @@ index 0000000..45b0ff7
 +		return;
 +	}
 +	BEGIN_RING(evo, 0, NV50_EVO_SOR(encoder->or, MODE_CTRL), 1);
-+	OUT_RING  (evo, 0);
++	OUT_RING(evo, 0);
 +}
 +
 +static void nv50_sor_dpms(struct drm_encoder *drm_encoder, int mode)
@@ -57645,7 +58211,7 @@ index 0000000..45b0ff7
 +		return;
 +	}
 +	BEGIN_RING(evo, 0, NV50_EVO_SOR(encoder->or, MODE_CTRL), 1);
-+	OUT_RING  (evo, mode_ctl);
++	OUT_RING(evo, mode_ctl);
 +}
 +
 +static const struct drm_encoder_helper_funcs nv50_sor_helper_funcs = {
@@ -58309,19 +58875,6 @@ index b940fdf..cfa6af4 100644
  unifdef-y += savage_drm.h
  unifdef-y += via_drm.h
 +unifdef-y += nouveau_drm.h
-diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index eeefb63..1345c39 100644
---- a/include/drm/drmP.h
-+++ b/include/drm/drmP.h
-@@ -1240,6 +1240,8 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data);
- extern int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv);
- 
- 				/* Buffer management support (drm_bufs.h) */
-+extern struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
-+						  drm_local_map_t *map);
- extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request);
- extern int drm_addbufs_pci(struct drm_device *dev, struct drm_buf_desc * request);
- extern int drm_addmap(struct drm_device *dev, resource_size_t offset,
 diff --git a/include/drm/i2c/ch7006.h b/include/drm/i2c/ch7006.h
 new file mode 100644
 index 0000000..8390b43


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1294.2.68
retrieving revision 1.1294.2.69
diff -u -p -r1.1294.2.68 -r1.1294.2.69
--- kernel.spec	19 Sep 2009 16:47:28 -0000	1.1294.2.68
+++ kernel.spec	24 Sep 2009 21:05:13 -0000	1.1294.2.69
@@ -41,7 +41,7 @@ Summary: The Linux kernel
 %if 0%{?released_kernel}
 
 # Do we have a -stable update to apply?
-%define stable_update 0
+%define stable_update 1
 # Is it a -stable RC?
 %define stable_rc 0
 # Set rpm version accordingly
@@ -509,7 +509,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 5
 
 %define fancy_debuginfo 0
 %if %{with_debuginfo}
-%if 0%{?fedora} >= 8
+%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
 %define fancy_debuginfo 1
 %endif
 %endif
@@ -695,9 +695,6 @@ Patch1550: linux-2.6-ksm.patch
 Patch1551: linux-2.6-ksm-kvm.patch
 Patch1552: linux-2.6-ksm-updates.patch
 Patch1553: linux-2.6-ksm-fix-munlock.patch
-Patch1575: linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch
-Patch1576: linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch
-Patch1577: linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch
 Patch1578: linux-2.6-xen-stack-protector-fix.patch
 Patch1579: linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
 
@@ -711,6 +708,7 @@ Patch1819: drm-intel-big-hammer.patch
 Patch1824: drm-intel-next.patch
 Patch1825: drm-intel-pm.patch
 Patch1826: drm-intel-no-tv-hotplug.patch
+Patch1827: drm-edid-fixes.patch
 
 # vga arb
 Patch1900: linux-2.6-vga-arb.patch
@@ -753,9 +751,6 @@ Patch13000: ppc-hates-my-family-and-swor
 
 # patches headed for -stable
 
-# scsi oops fixes
-Patch14000: linux-2.6-scsi-sd-fix-oops-during-scanning.patch
-Patch14001: linux-2.6-scsi-sg-fix-oops-in-error-path.patch
 # Raid10 lockdep fix
 Patch14002: linux-2.6-raidlockdep.patch
 
@@ -1334,7 +1329,8 @@ ApplyPatch linux-2.6-iwlwifi-remove-depr
 # Mark kernel data as NX
 ApplyPatch linux-2.6.31-nx-data.patch
 # Apply NX/RO to modules
-ApplyPatch linux-2.6.31-modules-ro-nx.patch
+# breaks ftrace NOP replacement
+#ApplyPatch linux-2.6.31-modules-ro-nx.patch
 
 # /dev/crash driver.
 ApplyPatch linux-2.6-crash-driver.patch
@@ -1363,9 +1359,6 @@ ApplyPatch linux-2.6-ksm-fix-munlock.pat
 ApplyPatch linux-2.6-ksm-kvm.patch
 
 # Assorted Virt Fixes
-ApplyPatch linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch
-ApplyPatch linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch
-ApplyPatch linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch
 #ApplyPatch linux-2.6-xen-stack-protector-fix.patch
 ApplyPatch linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
 
@@ -1386,6 +1379,7 @@ 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-edid-fixes.patch
 
 # VGA arb + drm
 ApplyPatch linux-2.6-vga-arb.patch
@@ -1414,9 +1408,6 @@ ApplyPatch linux-2.6-selinux-module-load
 
 # patches headed for -stable
 
-# scsi oops fixes
-ApplyPatch linux-2.6-scsi-sd-fix-oops-during-scanning.patch
-ApplyPatch linux-2.6-scsi-sg-fix-oops-in-error-path.patch
 # Raid10 lockdep fix
 ApplyPatch linux-2.6-raidlockdep.patch
 
@@ -1556,7 +1547,7 @@ EOF
     install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
     install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
 %if %{with_dracut}
-    touch $RPM_BUILD_ROOT/boot/dracut-$KernelVer.img
+    touch $RPM_BUILD_ROOT/boot/initramfs-$KernelVer.img
 %else
     touch $RPM_BUILD_ROOT/boot/initrd-$KernelVer.img
 %endif
@@ -2079,6 +2070,32 @@ fi
 # and build.
 
 %changelog
+* Thu Sep 24 2009 Michael Young <m.a.young at durham.ac.uk>
+- Try a dri fix in the latest xen/master
+
+* Thu Sep 24 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.1-41
+- Linux 2.6.31.1
+- Drop patches merged upstream:
+    linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch
+    linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch
+    linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch
+    linux-2.6-scsi-sd-fix-oops-during-scanning.patch
+    linux-2.6-scsi-sg-fix-oops-in-error-path.patch
+
+* Thu Sep 24 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31-40
+- Drop the modules-ro-nx patch: it's causing ftrace to be unable
+  to NOP out module function call tracking. (#524042)
+
+* Wed Sep 23 2009 Kyle McMartin <kyle at redhat.com> 2.6.31-39
+- touch initramfs-$foo not dracut-$foo.
+
+* Wed Sep 23 2009 Adam Jackson <ajax at redhat.com> 2.6.31-37
+- drm: Fix various buglets in EDID parsing.
+
+* Mon Sep 21 2009 Ben Skeggs <bskeggs at redhat.com>
+- nouveau: more on rh#522649, added some useful info to debugfs
+- lots of coding style cleanups, which is the reason for the huge commit
+
 * Sat Sep 19 2009 Michael Young <m.a.young at durham.ac.uk>
 - Switch pvops from rebase/master to xen/master branch
 

linux-2.6-raidlockdep.patch:
 file.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Index: linux-2.6-raidlockdep.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/linux-2.6-raidlockdep.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-raidlockdep.patch	19 Sep 2009 16:47:29 -0000	1.1.2.1
+++ linux-2.6-raidlockdep.patch	24 Sep 2009 21:05:14 -0000	1.1.2.2
@@ -117,4 +117,4 @@ index 561a9c0..f5ea468 100644
  }
  EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
  
--- 1.6.0.6 
\ No newline at end of file
+-- 1.6.0.6 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.976.2.31
retrieving revision 1.976.2.32
diff -u -p -r1.976.2.31 -r1.976.2.32
--- sources	10 Sep 2009 14:00:31 -0000	1.976.2.31
+++ sources	24 Sep 2009 21:05:14 -0000	1.976.2.32
@@ -1 +1,2 @@
 84c077a37684e4cbfa67b18154390d8a  linux-2.6.31.tar.bz2
+43977a0a264dd7d173b6ef122c62fb20  patch-2.6.31.1.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.888.2.30
retrieving revision 1.888.2.31
diff -u -p -r1.888.2.30 -r1.888.2.31
--- upstream	10 Sep 2009 14:00:31 -0000	1.888.2.30
+++ upstream	24 Sep 2009 21:05:14 -0000	1.888.2.31
@@ -1 +1,2 @@
 linux-2.6.31.tar.bz2
+patch-2.6.31.1.bz2

xen.pvops.patch:
 arch/x86/Kconfig                           |    4 
 arch/x86/Makefile                          |    2 
 arch/x86/include/asm/agp.h                 |   16 
 arch/x86/include/asm/e820.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/paravirt.h            |  718 ------------
 arch/x86/include/asm/paravirt_types.h      |  722 +++++++++++++
 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/syscalls.h            |    8 
 arch/x86/include/asm/tlbflush.h            |    6 
 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                   |    1 
 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/ioport.c                   |   40 
 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/setup.c                    |    4 
 arch/x86/kernel/traps.c                    |   33 
 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/xen/Kconfig                       |   33 
 arch/x86/xen/Makefile                      |    5 
 arch/x86/xen/apic.c                        |   57 +
 arch/x86/xen/enlighten.c                   |  220 +++
 arch/x86/xen/mmu.c                         |  455 ++++++++
 arch/x86/xen/pci-swiotlb.c                 |  997 ++++++++++++++++++
 arch/x86/xen/pci.c                         |  111 ++
 arch/x86/xen/setup.c                       |  108 +
 arch/x86/xen/smp.c                         |    3 
 arch/x86/xen/spinlock.c                    |   28 
 arch/x86/xen/time.c                        |    2 
 arch/x86/xen/vga.c                         |   67 +
 arch/x86/xen/xen-ops.h                     |   19 
 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/char/agp/intel-agp.c               |   17 
 drivers/char/hvc_xen.c                     |   99 +
 drivers/net/Kconfig                        |    1 
 drivers/pci/Makefile                       |    2 
 drivers/pci/msi.c                          |    5 
 drivers/pci/xen-iommu.c                    |  271 ++++
 drivers/xen/Kconfig                        |   41 
 drivers/xen/Makefile                       |   23 
 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              |  657 +++++++++++
 drivers/xen/blkback/common.h               |  137 ++
 drivers/xen/blkback/interface.c            |  182 +++
 drivers/xen/blkback/vbd.c                  |  118 ++
 drivers/xen/blkback/xenbus.c               |  542 +++++++++
 drivers/xen/events.c                       |  422 +++++++
 drivers/xen/evtchn.c                       |   82 +
 drivers/xen/features.c                     |    2 
 drivers/xen/grant-table.c                  |  103 +
 drivers/xen/mce.c                          |  213 +++
 drivers/xen/netback/Makefile               |    3 
 drivers/xen/netback/common.h               |  221 ++++
 drivers/xen/netback/interface.c            |  401 +++++++
 drivers/xen/netback/netback.c              | 1602 +++++++++++++++++++++++++++++
 drivers/xen/netback/xenbus.c               |  454 ++++++++
 drivers/xen/pci.c                          |  124 ++
 drivers/xen/xenbus/Makefile                |    5 
 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/linux/interrupt.h                  |    1 
 include/linux/page-flags.h                 |   18 
 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/grant_table.h                  |   43 
 include/xen/interface/grant_table.h        |   22 
 include/xen/interface/memory.h             |   92 +
 include/xen/interface/physdev.h            |   51 
 include/xen/interface/platform.h           |  336 ++++++
 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 
 lib/swiotlb.c                              |    5 
 mm/page_alloc.c                            |   14 
 146 files changed, 12861 insertions(+), 1465 deletions(-)

Index: xen.pvops.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.patch,v
retrieving revision 1.1.2.43
retrieving revision 1.1.2.44
diff -u -p -r1.1.2.43 -r1.1.2.44
--- xen.pvops.patch	19 Sep 2009 16:47:29 -0000	1.1.2.43
+++ xen.pvops.patch	24 Sep 2009 21:05:14 -0000	1.1.2.44
@@ -27,29 +27,28 @@ index 1b68659..5e7db44 100644
                  stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all
                  KBUILD_CFLAGS += $(stackp-y)
 diff --git a/arch/x86/include/asm/agp.h b/arch/x86/include/asm/agp.h
-index 9825cd6..d972b14 100644
+index 9825cd6..8107b71 100644
 --- a/arch/x86/include/asm/agp.h
 +++ b/arch/x86/include/asm/agp.h
-@@ -1,8 +1,11 @@
- #ifndef _ASM_X86_AGP_H
- #define _ASM_X86_AGP_H
+@@ -3,6 +3,10 @@
  
-+#include <linux/swiotlb.h>
-+
  #include <asm/pgtable.h>
  #include <asm/cacheflush.h>
 +#include <asm/dma-mapping.h>
++
++#include <asm/xen/hypervisor.h>
++#include <asm/xen/page.h>
  
  /*
   * Functions to keep the agpgart mappings coherent with the MMU. The
-@@ -23,13 +26,15 @@
+@@ -23,13 +27,15 @@
  #define flush_agp_cache() wbinvd()
  
  /* Convert a physical address to an address suitable for the GART. */
 -#define phys_to_gart(x) (x)
 -#define gart_to_phys(x) (x)
-+#define phys_to_gart(x) swiotlb_phys_to_bus(NULL, (x))
-+#define gart_to_phys(x) swiotlb_bus_to_phys(NULL, (x))
++#define phys_to_gart(x) (xen_pv_domain() ? phys_to_machine(XPADDR(x)).maddr : (x))
++#define gart_to_phys(x) (xen_pv_domain() ? machine_to_phys(XMADDR(x)).paddr : (x))
  
  /* GATT allocation. Returns/accepts GATT kernel virtual address. */
 -#define alloc_gatt_pages(order)		\
@@ -1724,10 +1723,10 @@ index 1674807..3658a86 100644
  static inline int pud_none(pud_t pud)
  {
 diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
-index c776826..0bfcf7e 100644
+index e597ecc..f7d2c8f 100644
 --- a/arch/x86/include/asm/processor.h
 +++ b/arch/x86/include/asm/processor.h
-@@ -540,6 +540,9 @@ static inline void native_set_iopl_mask(unsigned mask)
+@@ -550,6 +550,9 @@ static inline void native_set_iopl_mask(unsigned mask)
  #endif
  }
  
@@ -1737,7 +1736,7 @@ index c776826..0bfcf7e 100644
  static inline void
  native_load_sp0(struct tss_struct *tss, struct thread_struct *thread)
  {
-@@ -581,6 +584,7 @@ static inline void load_sp0(struct tss_struct *tss,
+@@ -591,6 +594,7 @@ static inline void load_sp0(struct tss_struct *tss,
  }
  
  #define set_iopl_mask native_set_iopl_mask
@@ -1745,6 +1744,34 @@ index c776826..0bfcf7e 100644
  #endif /* CONFIG_PARAVIRT */
  
  /*
+diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
+index 372b76e..5336ce2 100644
+--- a/arch/x86/include/asm/syscalls.h
++++ b/arch/x86/include/asm/syscalls.h
+@@ -33,11 +33,11 @@ long sys_rt_sigreturn(struct pt_regs *);
+ asmlinkage int sys_set_thread_area(struct user_desc __user *);
+ asmlinkage int sys_get_thread_area(struct user_desc __user *);
+ 
+-/* X86_32 only */
+-#ifdef CONFIG_X86_32
+ /* kernel/ioport.c */
+-long sys_iopl(struct pt_regs *);
++asmlinkage long sys_iopl(unsigned int);
+ 
++/* X86_32 only */
++#ifdef CONFIG_X86_32
+ /* kernel/process_32.c */
+ int sys_clone(struct pt_regs *);
+ int sys_execve(struct pt_regs *);
+@@ -70,8 +70,6 @@ int sys_vm86(struct pt_regs *);
+ #else /* CONFIG_X86_32 */
+ 
+ /* X86_64 only */
+-/* kernel/ioport.c */
+-asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
+ 
+ /* kernel/process_64.c */
+ asmlinkage long sys_clone(unsigned long, unsigned long,
 diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
 index 7f3eba0..e4fc8ea 100644
 --- a/arch/x86/include/asm/tlbflush.h
@@ -2605,7 +2632,7 @@ 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/ioport.c b/arch/x86/kernel/ioport.c
-index 99c4d30..0a421d3 100644
+index 99c4d30..919c1a8 100644
 --- a/arch/x86/kernel/ioport.c
 +++ b/arch/x86/kernel/ioport.c
 @@ -30,13 +30,29 @@ static void set_bitmap(unsigned long *bitmap, unsigned int base,
@@ -2669,6 +2696,30 @@ index 99c4d30..0a421d3 100644
  
  	return 0;
  }
+@@ -119,11 +134,10 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
+ 	return 0;
+ }
+ 
+-#ifdef CONFIG_X86_32
+-long sys_iopl(struct pt_regs *regs)
++asmlinkage long sys_iopl(unsigned int level)
+ {
+-	unsigned int level = regs->bx;
+ 	struct thread_struct *t = &current->thread;
++	struct pt_regs *regs = task_pt_regs(current);
+ 	int rc;
+ 
+ 	rc = do_iopl(level, regs);
+@@ -135,9 +149,3 @@ long sys_iopl(struct pt_regs *regs)
+ out:
+ 	return rc;
+ }
+-#else
+-asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs)
+-{
+-	return do_iopl(level, regs);
+-}
+-#endif
 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
@@ -2911,7 +2962,7 @@ index 70ec9b9..cef3d70 100644
  
  	.start_context_switch = paravirt_nop,
 diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
-index 1a041bc..6b76948 100644
+index 1a041bc..1101a9f 100644
 --- a/arch/x86/kernel/pci-dma.c
 +++ b/arch/x86/kernel/pci-dma.c
 @@ -10,6 +10,8 @@
@@ -2923,15 +2974,15 @@ index 1a041bc..6b76948 100644
  
  static int forbid_dac __read_mostly;
  
-@@ -128,6 +130,8 @@ void __init pci_iommu_alloc(void)
- 
- 	amd_iommu_detect();
- 
+@@ -120,6 +122,8 @@ void __init pci_iommu_alloc(void)
+ 	 * The order of these functions is important for
+ 	 * fall-back/fail-over reasons
+ 	 */
 +	xen_swiotlb_init();
 +
- 	pci_swiotlb_init();
- }
+ 	gart_iommu_hole_init();
  
+ 	detect_calgary();
 @@ -281,6 +285,8 @@ static int __init pci_iommu_init(void)
  	dma_debug_add_bus(&pci_bus_type);
  #endif
@@ -4876,10 +4927,10 @@ index 4ceb285..a654a49 100644
  static struct dentry *d_mmu_debug;
 diff --git a/arch/x86/xen/pci-swiotlb.c b/arch/x86/xen/pci-swiotlb.c
 new file mode 100644
-index 0000000..5e2c856
+index 0000000..00f2260
 --- /dev/null
 +++ b/arch/x86/xen/pci-swiotlb.c
-@@ -0,0 +1,989 @@
+@@ -0,0 +1,997 @@
 +/*
 + * Dynamic DMA mapping support.
 + *
@@ -4925,6 +4976,10 @@ index 0000000..5e2c856
 +#include <xen/page.h>
 +#include <xen/xen-ops.h>
 +
++
++#include <linux/pci.h>
++#include <asm/gart.h>
++
 +#define OFFSET(val,align) ((unsigned long)	\
 +	                   ( (val) & ( (align) - 1)))
 +
@@ -5867,6 +5922,10 @@ index 0000000..5e2c856
 +		xen_swiotlb_init_with_default_size(64 * (1<<20));	/* default to 64MB */
 +		dma_ops = &xen_swiotlb_dma_ops;
 +		iommu_detected = 1;
++#ifdef CONFIG_GART_IOMMU
++		gart_iommu_aperture_disabled = 1;
++#endif
++
 +	}
 +}
 diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
@@ -6680,7 +6739,7 @@ index 1d886e0..f4a2b10 100644
  	  This driver implements the front-end of the Xen virtual
  	  block device driver.  It communicates with a back-end driver
 diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
-index c585577..b45e7cd 100644
+index dee0f1f..77a202c 100644
 --- a/drivers/char/agp/intel-agp.c
 +++ b/drivers/char/agp/intel-agp.c
 @@ -261,15 +261,19 @@ static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode)
@@ -10362,7 +10421,7 @@ index abad71b..68c287c 100644
 +	xen_setup_pirqs();
  }
 diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
-index af03195..79bedba 100644
+index af03195..2d5e212 100644
 --- a/drivers/xen/evtchn.c
 +++ b/drivers/xen/evtchn.c
 @@ -38,7 +38,6 @@
@@ -10373,6 +10432,172 @@ index af03195..79bedba 100644
  #include <linux/miscdevice.h>
  #include <linux/major.h>
  #include <linux/proc_fs.h>
+@@ -69,10 +68,36 @@ struct per_user_data {
+ 	const char *name;
+ };
+ 
+-/* Who's bound to each port? */
+-static struct per_user_data *port_user[NR_EVENT_CHANNELS];
++/*
++ * Who's bound to each port?  This is logically an array of struct
++ * per_user_data *, but we encode the current enabled-state in bit 0.
++ */
++static unsigned long *port_user;
+ static DEFINE_SPINLOCK(port_user_lock); /* protects port_user[] and ring_prod */
+ 
++static inline struct per_user_data *get_port_user(unsigned port)
++{
++	return (struct per_user_data *)(port_user[port] & ~1);
++}
++
++static inline void set_port_user(unsigned port, struct per_user_data *u)
++{
++	port_user[port] = (unsigned long)u;
++}
++
++static inline bool get_port_enabled(unsigned port)
++{
++	return port_user[port] & 1;
++}
++
++static inline void set_port_enabled(unsigned port, bool enabled)
++{
++	if (enabled)
++		port_user[port] |= 1;
++	else
++		port_user[port] &= ~1;
++}
++
+ irqreturn_t evtchn_interrupt(int irq, void *data)
+ {
+ 	unsigned int port = (unsigned long)data;
+@@ -80,9 +105,14 @@ irqreturn_t evtchn_interrupt(int irq, void *data)
+ 
+ 	spin_lock(&port_user_lock);
+ 
+-	u = port_user[port];
++	u = get_port_user(port);
++
++	WARN(!get_port_enabled(port),
++	     "Interrupt for port %d, but apparently not enabled; per-user %p\n",
++	     port, u);
+ 
+ 	disable_irq_nosync(irq);
++	set_port_enabled(port, false);
+ 
+ 	if ((u->ring_prod - u->ring_cons) < EVTCHN_RING_SIZE) {
+ 		u->ring[EVTCHN_RING_MASK(u->ring_prod)] = port;
+@@ -92,9 +122,8 @@ irqreturn_t evtchn_interrupt(int irq, void *data)
+ 			kill_fasync(&u->evtchn_async_queue,
+ 				    SIGIO, POLL_IN);
+ 		}
+-	} else {
++	} else
+ 		u->ring_overflow = 1;
+-	}
+ 
+ 	spin_unlock(&port_user_lock);
+ 
+@@ -198,9 +227,18 @@ static ssize_t evtchn_write(struct file *file, const char __user *buf,
+ 		goto out;
+ 
+ 	spin_lock_irq(&port_user_lock);
+-	for (i = 0; i < (count/sizeof(evtchn_port_t)); i++)
+-		if ((kbuf[i] < NR_EVENT_CHANNELS) && (port_user[kbuf[i]] == u))
+-			enable_irq(irq_from_evtchn(kbuf[i]));
++
++	for (i = 0; i < (count/sizeof(evtchn_port_t)); i++) {
++		unsigned port = kbuf[i];
++
++		if (port < NR_EVENT_CHANNELS &&
++		    get_port_user(port) == u &&
++		    !get_port_enabled(port)) {
++			set_port_enabled(port, true);
++			enable_irq(irq_from_evtchn(port));
++		}
++	}
++
+ 	spin_unlock_irq(&port_user_lock);
+ 
+ 	rc = count;
+@@ -222,8 +260,9 @@ static int evtchn_bind_to_user(struct per_user_data *u, int port)
+ 	 * interrupt handler yet, and our caller has already
+ 	 * serialized bind operations.)
+ 	 */
+-	BUG_ON(port_user[port] != NULL);
+-	port_user[port] = u;
++	BUG_ON(get_port_user(port) != NULL);
++	set_port_user(port, u);
++	set_port_enabled(port, true); /* start enabled */
+ 
+ 	rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, IRQF_DISABLED,
+ 				       u->name, (void *)(unsigned long)port);
+@@ -239,10 +278,7 @@ static void evtchn_unbind_from_user(struct per_user_data *u, int port)
+ 
+ 	unbind_from_irqhandler(irq, (void *)(unsigned long)port);
+ 
+-	/* make sure we unbind the irq handler before clearing the port */
+-	barrier();
+-
+-	port_user[port] = NULL;
++	set_port_user(port, NULL);
+ }
+ 
+ static long evtchn_ioctl(struct file *file,
+@@ -333,7 +369,7 @@ static long evtchn_ioctl(struct file *file,
+ 		spin_lock_irq(&port_user_lock);
+ 
+ 		rc = -ENOTCONN;
+-		if (port_user[unbind.port] != u) {
++		if (get_port_user(unbind.port) != u) {
+ 			spin_unlock_irq(&port_user_lock);
+ 			break;
+ 		}
+@@ -355,7 +391,7 @@ static long evtchn_ioctl(struct file *file,
+ 
+ 		if (notify.port >= NR_EVENT_CHANNELS) {
+ 			rc = -EINVAL;
+-		} else if (port_user[notify.port] != u) {
++		} else if (get_port_user(notify.port) != u) {
+ 			rc = -ENOTCONN;
+ 		} else {
+ 			notify_remote_via_evtchn(notify.port);
+@@ -444,10 +480,10 @@ static int evtchn_release(struct inode *inode, struct file *filp)
+ 	free_page((unsigned long)u->ring);
+ 
+ 	for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+-		if (port_user[i] != u)
++		if (get_port_user(i) != u)
+ 			continue;
+ 
+-		evtchn_unbind_from_user(port_user[i], i);
++		evtchn_unbind_from_user(get_port_user(i), i);
+ 	}
+ 
+ 	spin_unlock_irq(&port_user_lock);
+@@ -481,8 +517,11 @@ static int __init evtchn_init(void)
+ 	if (!xen_domain())
+ 		return -ENODEV;
+ 
++	port_user = kcalloc(NR_EVENT_CHANNELS, sizeof(*port_user), GFP_KERNEL);
++	if (port_user == NULL)
++		return -ENOMEM;
++
+ 	spin_lock_init(&port_user_lock);
+-	memset(port_user, 0, sizeof(port_user));
+ 
+ 	/* Create '/dev/misc/evtchn'. */
+ 	err = misc_register(&evtchn_miscdev);
+@@ -498,6 +537,9 @@ static int __init evtchn_init(void)
+ 
+ static void __exit evtchn_cleanup(void)
+ {
++	kfree(port_user);
++	port_user = NULL;
++
+ 	misc_deregister(&evtchn_miscdev);
+ }
+ 
 diff --git a/drivers/xen/features.c b/drivers/xen/features.c
 index 99eda16..9e2b64f 100644
 --- a/drivers/xen/features.c
@@ -15531,6 +15756,18 @@ index e2e5ce5..ca67e2b 100644
  static inline int PageUptodate(struct page *page)
  {
  	int ret = test_bit(PG_uptodate, &(page)->flags);
+diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
+index cb1a663..f4ebffb 100644
+--- a/include/linux/swiotlb.h
++++ b/include/linux/swiotlb.h
+@@ -2,6 +2,7 @@
+ #define __LINUX_SWIOTLB_H
+ 
+ #include <linux/types.h>
++#include <linux/dma-mapping.h>
+ 
+ struct device;
+ struct dma_attrs;
 diff --git a/include/xen/Kbuild b/include/xen/Kbuild
 index 4e65c16..84ad8f0 100644
 --- a/include/xen/Kbuild

xen.pvops.post.patch:
 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/pci/pci.h                       |    2 ++
 4 files changed, 23 insertions(+)

Index: xen.pvops.post.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Attic/xen.pvops.post.patch,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.29
diff -u -p -r1.1.2.28 -r1.1.2.29
--- xen.pvops.post.patch	19 Sep 2009 16:47:33 -0000	1.1.2.28
+++ xen.pvops.post.patch	24 Sep 2009 21:05:21 -0000	1.1.2.29
@@ -68,15 +68,3 @@ index 2202b62..f371fe8 100644
  }
  
  int __init pcibios_init(void)
-diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
-index cb1a663..f4ebffb 100644
---- a/include/linux/swiotlb.h
-+++ b/include/linux/swiotlb.h
-@@ -2,6 +2,7 @@
- #define __LINUX_SWIOTLB_H
- 
- #include <linux/types.h>
-+#include <linux/dma-mapping.h>
- 
- struct device;
- struct dma_attrs;


--- linux-2.6-kvm-pvmmu-do-not-batch-pte-updates-from-interrupt-context.patch DELETED ---


--- linux-2.6-kvm-vmx-check-cpl-before-emulating-debug-register-access.patch DELETED ---


--- linux-2.6-scsi-sd-fix-oops-during-scanning.patch DELETED ---


--- linux-2.6-scsi-sg-fix-oops-in-error-path.patch DELETED ---


--- linux-2.6-use-__pa_symbol-to-calculate-address-of-C-symbol.patch DELETED ---




More information about the fedora-extras-commits mailing list