--- /dev/null
+From ae2f5e5ed04a17c1aa1f0a3714c725e12c21d2a9 Mon Sep 17 00:00:00 2001
+From: Ralf Baechle <ralf@linux-mips.org>
+Date: Thu, 15 Dec 2016 12:39:22 +0100
+Subject: MIPS: IP22: Fix build error due to binutils 2.25 uselessnes.
+
+From: Ralf Baechle <ralf@linux-mips.org>
+
+commit ae2f5e5ed04a17c1aa1f0a3714c725e12c21d2a9 upstream.
+
+Fix the following build error with binutils 2.25.
+
+ CC arch/mips/mm/sc-ip22.o
+{standard input}: Assembler messages:
+{standard input}:132: Error: number (0x9000000080000000) larger than 32 bits
+{standard input}:159: Error: number (0x9000000080000000) larger than 32 bits
+{standard input}:200: Error: number (0x9000000080000000) larger than 32 bits
+scripts/Makefile.build:293: recipe for target 'arch/mips/mm/sc-ip22.o' failed
+make[1]: *** [arch/mips/mm/sc-ip22.o] Error 1
+
+MIPS has used .set mips3 to temporarily switch the assembler to 64 bit
+mode in 64 bit kernels virtually forever. Binutils 2.25 broke this
+behavious partially by happily accepting 64 bit instructions in .set mips3
+mode but puking on 64 bit constants when generating 32 bit ELF. Binutils
+2.26 restored the old behaviour again.
+
+Fix build with binutils 2.25 by open coding the offending
+
+ dli $1, 0x9000000080000000
+
+as
+
+ li $1, 0x9000
+ dsll $1, $1, 48
+
+which is ugly be the only thing that will build on all binutils vintages.
+
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/mm/sc-ip22.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+--- a/arch/mips/mm/sc-ip22.c
++++ b/arch/mips/mm/sc-ip22.c
+@@ -39,7 +39,18 @@ static inline void indy_sc_wipe(unsigned
+ " li $1, 0x80 # Go 64 bit \n"
+ " mtc0 $1, $12 \n"
+ " \n"
+- " dli $1, 0x9000000080000000 \n"
++ " # \n"
++ " # Open code a dli $1, 0x9000000080000000 \n"
++ " # \n"
++ " # Required because binutils 2.25 will happily accept \n"
++ " # 64 bit instructions in .set mips3 mode but puke on \n"
++ " # 64 bit constants when generating 32 bit ELF \n"
++ " # \n"
++ " lui $1,0x9000 \n"
++ " dsll $1,$1,0x10 \n"
++ " ori $1,$1,0x8000 \n"
++ " dsll $1,$1,0x10 \n"
++ " \n"
+ " or %0, $1 # first line to flush \n"
+ " or %1, $1 # last line to flush \n"
+ " .set at \n"
--- /dev/null
+From f9f1c8db1c37253805eaa32265e1e1af3ae7d0a4 Mon Sep 17 00:00:00 2001
+From: Ralf Baechle <ralf@linux-mips.org>
+Date: Thu, 15 Dec 2016 12:27:21 +0100
+Subject: MIPS: IP22: Reformat inline assembler code to modern standards.
+
+From: Ralf Baechle <ralf@linux-mips.org>
+
+commit f9f1c8db1c37253805eaa32265e1e1af3ae7d0a4 upstream.
+
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/mm/sc-ip22.c | 43 +++++++++++++++++++++++--------------------
+ 1 file changed, 23 insertions(+), 20 deletions(-)
+
+--- a/arch/mips/mm/sc-ip22.c
++++ b/arch/mips/mm/sc-ip22.c
+@@ -31,26 +31,29 @@ static inline void indy_sc_wipe(unsigned
+ unsigned long tmp;
+
+ __asm__ __volatile__(
+- ".set\tpush\t\t\t# indy_sc_wipe\n\t"
+- ".set\tnoreorder\n\t"
+- ".set\tmips3\n\t"
+- ".set\tnoat\n\t"
+- "mfc0\t%2, $12\n\t"
+- "li\t$1, 0x80\t\t\t# Go 64 bit\n\t"
+- "mtc0\t$1, $12\n\t"
+-
+- "dli\t$1, 0x9000000080000000\n\t"
+- "or\t%0, $1\t\t\t# first line to flush\n\t"
+- "or\t%1, $1\t\t\t# last line to flush\n\t"
+- ".set\tat\n\t"
+-
+- "1:\tsw\t$0, 0(%0)\n\t"
+- "bne\t%0, %1, 1b\n\t"
+- " daddu\t%0, 32\n\t"
+-
+- "mtc0\t%2, $12\t\t\t# Back to 32 bit\n\t"
+- "nop; nop; nop; nop;\n\t"
+- ".set\tpop"
++ " .set push # indy_sc_wipe \n"
++ " .set noreorder \n"
++ " .set mips3 \n"
++ " .set noat \n"
++ " mfc0 %2, $12 \n"
++ " li $1, 0x80 # Go 64 bit \n"
++ " mtc0 $1, $12 \n"
++ " \n"
++ " dli $1, 0x9000000080000000 \n"
++ " or %0, $1 # first line to flush \n"
++ " or %1, $1 # last line to flush \n"
++ " .set at \n"
++ " \n"
++ "1: sw $0, 0(%0) \n"
++ " bne %0, %1, 1b \n"
++ " daddu %0, 32 \n"
++ " \n"
++ " mtc0 %2, $12 # Back to 32 bit \n"
++ " nop # pipeline hazard \n"
++ " nop \n"
++ " nop \n"
++ " nop \n"
++ " .set pop \n"
+ : "=r" (first), "=r" (last), "=&r" (tmp)
+ : "0" (first), "1" (last));
+ }
--- /dev/null
+From 8ea73db486cda442f0671f4bc9c03a76be398a28 Mon Sep 17 00:00:00 2001
+From: James Smart <jsmart2021@gmail.com>
+Date: Sun, 12 Feb 2017 13:52:25 -0800
+Subject: scsi: lpfc: Correct WQ creation for pagesize
+
+From: James Smart <jsmart2021@gmail.com>
+
+commit 8ea73db486cda442f0671f4bc9c03a76be398a28 upstream.
+
+Correct WQ creation for pagesize
+
+The driver was calculating the adapter command pagesize indicator from
+the system pagesize. However, the buffers the driver allocates are only
+one size (SLI4_PAGE_SIZE), so no calculation was necessary.
+
+Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: James Smart <james.smart@broadcom.com>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Cc: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/lpfc/lpfc_hw4.h | 2 ++
+ drivers/scsi/lpfc/lpfc_sli.c | 9 +++++----
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+--- a/drivers/scsi/lpfc/lpfc_hw4.h
++++ b/drivers/scsi/lpfc/lpfc_hw4.h
+@@ -1182,6 +1182,7 @@ struct lpfc_mbx_wq_create {
+ #define lpfc_mbx_wq_create_page_size_SHIFT 0
+ #define lpfc_mbx_wq_create_page_size_MASK 0x000000FF
+ #define lpfc_mbx_wq_create_page_size_WORD word1
++#define LPFC_WQ_PAGE_SIZE_4096 0x1
+ #define lpfc_mbx_wq_create_wqe_size_SHIFT 8
+ #define lpfc_mbx_wq_create_wqe_size_MASK 0x0000000F
+ #define lpfc_mbx_wq_create_wqe_size_WORD word1
+@@ -1253,6 +1254,7 @@ struct rq_context {
+ #define lpfc_rq_context_page_size_SHIFT 0 /* Version 1 Only */
+ #define lpfc_rq_context_page_size_MASK 0x000000FF
+ #define lpfc_rq_context_page_size_WORD word0
++#define LPFC_RQ_PAGE_SIZE_4096 0x1
+ uint32_t reserved1;
+ uint32_t word2;
+ #define lpfc_rq_context_cq_id_SHIFT 16
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -13475,7 +13475,7 @@ lpfc_wq_create(struct lpfc_hba *phba, st
+ LPFC_WQ_WQE_SIZE_128);
+ bf_set(lpfc_mbx_wq_create_page_size,
+ &wq_create->u.request_1,
+- (PAGE_SIZE/SLI4_PAGE_SIZE));
++ LPFC_WQ_PAGE_SIZE_4096);
+ page = wq_create->u.request_1.page;
+ break;
+ }
+@@ -13501,8 +13501,9 @@ lpfc_wq_create(struct lpfc_hba *phba, st
+ LPFC_WQ_WQE_SIZE_128);
+ break;
+ }
+- bf_set(lpfc_mbx_wq_create_page_size, &wq_create->u.request_1,
+- (PAGE_SIZE/SLI4_PAGE_SIZE));
++ bf_set(lpfc_mbx_wq_create_page_size,
++ &wq_create->u.request_1,
++ LPFC_WQ_PAGE_SIZE_4096);
+ page = wq_create->u.request_1.page;
+ break;
+ default:
+@@ -13688,7 +13689,7 @@ lpfc_rq_create(struct lpfc_hba *phba, st
+ LPFC_RQE_SIZE_8);
+ bf_set(lpfc_rq_context_page_size,
+ &rq_create->u.request.context,
+- (PAGE_SIZE/SLI4_PAGE_SIZE));
++ LPFC_RQ_PAGE_SIZE_4096);
+ } else {
+ switch (hrq->entry_count) {
+ default:
bcma-use-get-put-_device-when-probing-removing-device-driver.patch
dmaengine-ipu-make-sure-the-interrupt-routine-checks-all-interrupts.patch
powerpc-xmon-fix-data-breakpoint.patch
+mips-ip22-reformat-inline-assembler-code-to-modern-standards.patch
+mips-ip22-fix-build-error-due-to-binutils-2.25-uselessnes.patch
+scsi-lpfc-correct-wq-creation-for-pagesize.patch