Undo removal of exported functions in 3.1.8

blk_init_allocated_queue_node() was removed; restore it as a wrapper.
On sparc, io_remap_pfn_range() was changed into an inline function;
change it back for now.

svn path=/dists/sid/linux-2.6/; revision=18458
This commit is contained in:
Ben Hutchings 2012-01-08 01:15:40 +00:00
parent 85136b37c3
commit 9413d691a6
3 changed files with 130 additions and 0 deletions

View File

@ -0,0 +1,49 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 8 Jan 2012 00:36:59 +0000
Subject: [PATCH 1/2] block: Restore blk_init_allocated_queue_node() for ABI
compatibility
This function was removed as redundant in 3.1.8, but it was previously
exported to modules.
---
block/blk-core.c | 9 +++++++++
include/linux/blkdev.h | 3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 8fc4ae2..9fce4c9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -549,6 +549,15 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn,
}
EXPORT_SYMBOL(blk_init_allocated_queue);
+struct request_queue *
+blk_init_allocated_queue_node(struct request_queue *q, request_fn_proc *rfn,
+ spinlock_t *lock, int node_id)
+{
+ /* q->node was already set by blk_alloc_queue_node(); ignore node_id */
+ return blk_init_allocated_queue(q, rfn, lock);
+}
+EXPORT_SYMBOL(blk_init_allocated_queue_node);
+
int blk_get_queue(struct request_queue *q)
{
if (likely(!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5e30b45..7fbaa91 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -803,6 +803,9 @@ extern void blk_unprep_request(struct request *);
*/
extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn,
spinlock_t *lock, int node_id);
+extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *,
+ request_fn_proc *,
+ spinlock_t *, int node_id);
extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
request_fn_proc *, spinlock_t *);
--
1.7.8.2

View File

@ -0,0 +1,79 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 8 Jan 2012 00:56:30 +0000
Subject: [PATCH 2/2] sparc: Change io_remap_pfn_range() back into an extern,
exported function
In 3.1.8 io_remap_pfn_range() and remap_pfn_range() were reimplemented,
with the former becoming an inline function. For ABI compatibility,
change it back into an extern function and export it.
---
arch/sparc/include/asm/pgtable_64.h | 15 +++------------
arch/sparc/mm/Makefile | 2 +-
arch/sparc/mm/generic_64.c | 16 ++++++++++++++++
3 files changed, 20 insertions(+), 13 deletions(-)
create mode 100644 arch/sparc/mm/generic_64.c
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 38ebb2c..fc36841 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -768,18 +768,9 @@ extern int page_in_phys_avail(unsigned long paddr);
extern int remap_pfn_range(struct vm_area_struct *, unsigned long, unsigned long,
unsigned long, pgprot_t);
-static inline int io_remap_pfn_range(struct vm_area_struct *vma,
- unsigned long from, unsigned long pfn,
- unsigned long size, pgprot_t prot)
-{
- unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
- int space = GET_IOSPACE(pfn);
- unsigned long phys_base;
-
- phys_base = offset | (((unsigned long) space) << 32UL);
-
- return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot);
-}
+extern int io_remap_pfn_range(struct vm_area_struct *vma,
+ unsigned long from, unsigned long pfn,
+ unsigned long size, pgprot_t prot);
#include <asm-generic/pgtable.h>
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
index 301421c..87e825e 100644
--- a/arch/sparc/mm/Makefile
+++ b/arch/sparc/mm/Makefile
@@ -4,7 +4,7 @@
asflags-y := -ansi
ccflags-y := -Werror
-obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o
+obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o generic_64.o
obj-y += fault_$(BITS).o
obj-y += init_$(BITS).o
obj-$(CONFIG_SPARC32) += loadmmu.o
diff --git a/arch/sparc/mm/generic_64.c b/arch/sparc/mm/generic_64.c
new file mode 100644
index 0000000..d707319
--- /dev/null
+++ b/arch/sparc/mm/generic_64.c
@@ -0,0 +1,16 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+
+int io_remap_pfn_range(struct vm_area_struct *vma,
+ unsigned long from, unsigned long pfn,
+ unsigned long size, pgprot_t prot)
+{
+ unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
+ int space = GET_IOSPACE(pfn);
+ unsigned long phys_base;
+
+ phys_base = offset | (((unsigned long) space) << 32UL);
+
+ return remap_pfn_range(vma, from, phys_base >> PAGE_SHIFT, size, prot);
+}
+EXPORT_SYMBOL(io_remap_pfn_range);
--
1.7.8.2

View File

@ -89,3 +89,5 @@
+ bugfix/all/drm-radeon-flush-read-cache-for-gtt-with-fence-on-r6.patch
+ bugfix/all/rtc-Fix-alarm-rollover-when-day-or-month-is-out-of-r.patch
+ bugfix/all/l2tp-ensure-sk-dst-is-still-valid.patch
+ debian/block-Restore-blk_init_allocated_queue_node-for-ABI-.patch
+ debian/sparc-Change-io_remap_pfn_range-back-into-an-extern-.patch