[kernel] r16082 - in dists/sid/linux-2.6/debian: . config patches/bugfix/all patches/debian patches/series

Ben Hutchings benh at alioth.debian.org
Wed Aug 4 23:14:07 UTC 2010


Author: benh
Date: Wed Aug  4 23:14:04 2010
New Revision: 16082

Log:
Avoid/ignore ABI changes in 2.6.32.17 as appropriate

Added:
   dists/sid/linux-2.6/debian/patches/debian/firmware-Avoid-ABI-change-in-2.6.32.17.patch
   dists/sid/linux-2.6/debian/patches/debian/ssb-Avoid-ABI-change-in-2.6.32.17.patch
Deleted:
   dists/sid/linux-2.6/debian/patches/bugfix/all/ssb-Use-relative-offsets-for-SPROM.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/config/defines
   dists/sid/linux-2.6/debian/patches/series/19

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Wed Aug  4 18:57:14 2010	(r16081)
+++ dists/sid/linux-2.6/debian/changelog	Wed Aug  4 23:14:04 2010	(r16082)
@@ -17,6 +17,8 @@
     - ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
       (CVE-2010-2478)
     - GFS2: Fix up system xattrs (CVE-2010-2525)
+    - Revert ABI changes in firmware_class and ssb
+    - Ignore ABI changes in acpi_processor and jbd2
   * Add drm changes from stable 2.6.33.7:
     - drm/i915: Enable low-power render writes on GEN3 hardware (915, 945,
       G33 and Atom "Pineview") (Closes: #590193, maybe others)

Modified: dists/sid/linux-2.6/debian/config/defines
==============================================================================
--- dists/sid/linux-2.6/debian/config/defines	Wed Aug  4 18:57:14 2010	(r16081)
+++ dists/sid/linux-2.6/debian/config/defines	Wed Aug  4 23:14:04 2010	(r16082)
@@ -8,12 +8,19 @@
  module:drivers/net/macvlan
  module:drivers/net/macvtap
  module:drivers/net/wireless/iwlwifi/iwlcore
+# Should not be used by OOT modules
+ acpi_processor_ffh_cstate_enter
+ acpi_processor_ffh_cstate_probe
+ arch_acpi_processor_cleanup_pdc
+ arch_acpi_processor_init_pdc
 # CONFIG_IDE_TIMINGS is now disabled on some arches
 # but should not be used by OOT modules
  ide_pio_cycle_time
  ide_timing_compute
  ide_timing_find_mode
  ide_timing_merge
+# Only used by ext4
+ jbd2_*
 # Can't see any OOT users of these
  __srcu_notifier_call_chain
  srcu_init_notifier_head

Added: dists/sid/linux-2.6/debian/patches/debian/firmware-Avoid-ABI-change-in-2.6.32.17.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/debian/firmware-Avoid-ABI-change-in-2.6.32.17.patch	Wed Aug  4 23:14:04 2010	(r16082)
@@ -0,0 +1,89 @@
+From 22ab89ff311da2745ae52bbbf1805a6c0a79f420 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Wed, 4 Aug 2010 22:45:19 +0100
+Subject: [PATCH] firmware: Avoid ABI change in 2.6.32.17
+
+Don't change the public definition of struct firmware.  Only
+request_firmware() should ever allocate it, so we can safely add
+fields without callers knowing about them.
+---
+ drivers/base/firmware_class.c |   18 ++++++++++++------
+ include/linux/firmware.h      |    2 +-
+ 2 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
+index 7ab5e7a..3e1130c 100644
+--- a/drivers/base/firmware_class.c
++++ b/drivers/base/firmware_class.c
+@@ -39,6 +39,11 @@ static int loading_timeout = 60;	/* In seconds */
+  * guarding for corner cases a global lock should be OK */
+ static DEFINE_MUTEX(fw_lock);
+ 
++struct paged_firmware {
++	struct firmware fw;
++	struct page **pages;
++};
++
+ struct firmware_priv {
+ 	char *fw_id;
+ 	struct completion completion;
+@@ -127,12 +132,13 @@ static ssize_t firmware_loading_show(struct device *dev,
+ 
+ static void firmware_free_data(const struct firmware *fw)
+ {
++	struct page **pages = ((struct paged_firmware *)fw)->pages;
+ 	int i;
+ 	vunmap(fw->data);
+-	if (fw->pages) {
++	if (pages) {
+ 		for (i = 0; i < PFN_UP(fw->size); i++)
+-			__free_page(fw->pages[i]);
+-		kfree(fw->pages);
++			__free_page(pages[i]);
++		kfree(pages);
+ 	}
+ }
+ 
+@@ -169,7 +175,7 @@ static ssize_t firmware_loading_store(struct device *dev,
+ 			break;
+ 		}
+ 		firmware_free_data(fw_priv->fw);
+-		memset(fw_priv->fw, 0, sizeof(struct firmware));
++		memset(fw_priv->fw, 0, sizeof(struct paged_firmware));
+ 		/* If the pages are not owned by 'struct firmware' */
+ 		for (i = 0; i < fw_priv->nr_pages; i++)
+ 			__free_page(fw_priv->pages[i]);
+@@ -191,7 +197,7 @@ static ssize_t firmware_loading_store(struct device *dev,
+ 				goto err;
+ 			}
+ 			/* Pages are now owned by 'struct firmware' */
+-			fw_priv->fw->pages = fw_priv->pages;
++			((struct paged_firmware *)fw_priv->fw)->pages = fw_priv->pages;
+ 			fw_priv->pages = NULL;
+ 
+ 			fw_priv->page_array_size = 0;
+@@ -489,7 +495,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
+ 	if (!firmware_p)
+ 		return -EINVAL;
+ 
+-	*firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
++	*firmware_p = firmware = kzalloc(sizeof(struct paged_firmware), GFP_KERNEL);
+ 	if (!firmware) {
+ 		dev_err(device, "%s: kmalloc(struct firmware) failed\n",
+ 			__func__);
+diff --git a/include/linux/firmware.h b/include/linux/firmware.h
+index 83d7510..7c6d300 100644
+--- a/include/linux/firmware.h
++++ b/include/linux/firmware.h
+@@ -11,7 +11,7 @@
+ struct firmware {
+ 	size_t size;
+ 	const u8 *data;
+-	struct page **pages;
++	/* struct page **pages; */
+ };
+ 
+ struct device;
+-- 
+1.7.1
+

Added: dists/sid/linux-2.6/debian/patches/debian/ssb-Avoid-ABI-change-in-2.6.32.17.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/debian/ssb-Avoid-ABI-change-in-2.6.32.17.patch	Wed Aug  4 23:14:04 2010	(r16082)
@@ -0,0 +1,100 @@
+From 796cfb05e71b4e268fd80865acf98f8b99202004 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Wed, 4 Aug 2010 23:34:14 +0100
+Subject: [PATCH] ssb: Avoid ABI change in 2.6.32.17
+
+Don't change the public definition of struct ssb_bus.  There are
+only two possible values of ssb_bus::sprom_offset, so use a spare
+quirk flag instead.
+
+Also restore the definition of SSB_SPROM_BASE.
+---
+ drivers/ssb/pci.c            |   21 ++++++++++++---------
+ include/linux/ssb/ssb.h      |    2 +-
+ include/linux/ssb/ssb_regs.h |    1 +
+ 3 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
+index 321d9ef..5546657 100644
+--- a/drivers/ssb/pci.c
++++ b/drivers/ssb/pci.c
+@@ -26,6 +26,13 @@
+ /* Define the following to 1 to enable a printk on each coreswitch. */
+ #define SSB_VERBOSE_PCICORESWITCH_DEBUG		0
+ 
++#define SSB_QUIRK_SPROM_BASE31 (1 << 1)
++
++static inline u16 ssb_sprom_offset(const struct ssb_bus *bus)
++{
++	return (bus->quirks & SSB_QUIRK_SPROM_BASE31) ?
++		SSB_SPROM_BASE31 : SSB_SPROM_BASE1;
++}
+ 
+ /* Lowlevel coreswitching */
+ int ssb_pci_switch_coreidx(struct ssb_bus *bus, u8 coreidx)
+@@ -253,7 +260,7 @@ static int sprom_do_read(struct ssb_bus *bus, u16 *sprom)
+ 	int i;
+ 
+ 	for (i = 0; i < bus->sprom_size; i++)
+-		sprom[i] = ioread16(bus->mmio + bus->sprom_offset + (i * 2));
++		sprom[i] = ioread16(bus->mmio + ssb_sprom_offset(bus) + (i * 2));
+ 
+ 	return 0;
+ }
+@@ -284,7 +291,7 @@ static int sprom_do_write(struct ssb_bus *bus, const u16 *sprom)
+ 			ssb_printk("75%%");
+ 		else if (i % 2)
+ 			ssb_printk(".");
+-		writew(sprom[i], bus->mmio + bus->sprom_offset + (i * 2));
++		writew(sprom[i], bus->mmio + ssb_sprom_offset(bus) + (i * 2));
+ 		mmiowb();
+ 		msleep(20);
+ 	}
+@@ -631,16 +638,12 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
+ 		 * chipcommon status & 3 == 2
+ 		 */
+ 		if (bus->chipco.dev->id.revision >= 31)
+-			bus->sprom_offset = SSB_SPROM_BASE31;
++			bus->quirks |= SSB_QUIRK_SPROM_BASE31;
+ 		else if (bus->chip_id == 0x4312 &&
+ 			 (bus->chipco.status & 0x03) == 2)
+-			bus->sprom_offset = SSB_SPROM_BASE31;
+-		else
+-			bus->sprom_offset = SSB_SPROM_BASE1;
+-	} else {
+-		bus->sprom_offset = SSB_SPROM_BASE1;
++			bus->quirks |= SSB_QUIRK_SPROM_BASE31;
+ 	}
+-	ssb_dprintk(KERN_INFO PFX "SPROM offset is 0x%x\n", bus->sprom_offset);
++	ssb_dprintk(KERN_INFO PFX "SPROM offset is 0x%x\n", ssb_sprom_offset(bus));
+ 
+ 	buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL);
+ 	if (!buf)
+diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
+index 3cbf483..675f9ab 100644
+--- a/include/linux/ssb/ssb.h
++++ b/include/linux/ssb/ssb.h
+@@ -301,7 +301,7 @@ struct ssb_bus {
+ 	/* ID information about the Chip. */
+ 	u16 chip_id;
+ 	u16 chip_rev;
+-	u16 sprom_offset;
++	/* u16 sprom_offset; */
+ 	u16 sprom_size;		/* number of words in sprom */
+ 	u8 chip_package;
+ 
+diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
+index b8be23c..3a4f6a5 100644
+--- a/include/linux/ssb/ssb_regs.h
++++ b/include/linux/ssb/ssb_regs.h
+@@ -170,6 +170,7 @@
+ #define SSB_SPROMSIZE_WORDS_R4		220
+ #define SSB_SPROMSIZE_BYTES_R123	(SSB_SPROMSIZE_WORDS_R123 * sizeof(u16))
+ #define SSB_SPROMSIZE_BYTES_R4		(SSB_SPROMSIZE_WORDS_R4 * sizeof(u16))
++#define SSB_SPROM_BASE			0x1000
+ #define SSB_SPROM_BASE1			0x1000
+ #define SSB_SPROM_BASE31		0x0800
+ #define SSB_SPROM_REVISION		0x107E
+-- 
+1.7.1
+

Modified: dists/sid/linux-2.6/debian/patches/series/19
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/19	Wed Aug  4 18:57:14 2010	(r16081)
+++ dists/sid/linux-2.6/debian/patches/series/19	Wed Aug  4 23:14:04 2010	(r16082)
@@ -24,6 +24,7 @@
 + bugfix/all/revert-ssb-Handle-Netbook-devices-where-the-SPROM-ad.patch
 + bugfix/all/ssb-do-not-read-SPROM-if-it-does-not-exist.patch
 + bugfix/all/ssb-Look-for-SPROM-at-different-offset-on-higher-rev.patch
-+ bugfix/all/ssb-Use-relative-offsets-for-SPROM.patch
 + bugfix/all/ssb-fix-NULL-ptr-deref-when-pcihost_wrapper-is-used.patch
 + bugfix/all/ssb-Handle-alternate-SSPROM-location.patch
++ debian/ssb-Avoid-ABI-change-in-2.6.32.17.patch
++ debian/firmware-Avoid-ABI-change-in-2.6.32.17.patch



More information about the Kernel-svn-changes mailing list