From: Greg Kroah-Hartman Date: Fri, 10 Mar 2017 08:39:32 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.53~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a395049f89c3e94bb3de5813332af05f65a4e8d4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: mips-ip22-fix-build-error-due-to-binutils-2.25-uselessnes.patch mips-ip22-reformat-inline-assembler-code-to-modern-standards.patch scsi-lpfc-correct-wq-creation-for-pagesize.patch --- diff --git a/queue-4.4/mips-ip22-fix-build-error-due-to-binutils-2.25-uselessnes.patch b/queue-4.4/mips-ip22-fix-build-error-due-to-binutils-2.25-uselessnes.patch new file mode 100644 index 00000000000..028a8c3eac3 --- /dev/null +++ b/queue-4.4/mips-ip22-fix-build-error-due-to-binutils-2.25-uselessnes.patch @@ -0,0 +1,66 @@ +From ae2f5e5ed04a17c1aa1f0a3714c725e12c21d2a9 Mon Sep 17 00:00:00 2001 +From: Ralf Baechle +Date: Thu, 15 Dec 2016 12:39:22 +0100 +Subject: MIPS: IP22: Fix build error due to binutils 2.25 uselessnes. + +From: Ralf Baechle + +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 +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + 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" diff --git a/queue-4.4/mips-ip22-reformat-inline-assembler-code-to-modern-standards.patch b/queue-4.4/mips-ip22-reformat-inline-assembler-code-to-modern-standards.patch new file mode 100644 index 00000000000..7d811b8cc7d --- /dev/null +++ b/queue-4.4/mips-ip22-reformat-inline-assembler-code-to-modern-standards.patch @@ -0,0 +1,68 @@ +From f9f1c8db1c37253805eaa32265e1e1af3ae7d0a4 Mon Sep 17 00:00:00 2001 +From: Ralf Baechle +Date: Thu, 15 Dec 2016 12:27:21 +0100 +Subject: MIPS: IP22: Reformat inline assembler code to modern standards. + +From: Ralf Baechle + +commit f9f1c8db1c37253805eaa32265e1e1af3ae7d0a4 upstream. + +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + 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)); + } diff --git a/queue-4.4/scsi-lpfc-correct-wq-creation-for-pagesize.patch b/queue-4.4/scsi-lpfc-correct-wq-creation-for-pagesize.patch new file mode 100644 index 00000000000..00e2fbc51bc --- /dev/null +++ b/queue-4.4/scsi-lpfc-correct-wq-creation-for-pagesize.patch @@ -0,0 +1,79 @@ +From 8ea73db486cda442f0671f4bc9c03a76be398a28 Mon Sep 17 00:00:00 2001 +From: James Smart +Date: Sun, 12 Feb 2017 13:52:25 -0800 +Subject: scsi: lpfc: Correct WQ creation for pagesize + +From: James Smart + +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 +Signed-off-by: James Smart +Reviewed-by: Hannes Reinecke +Reviewed-by: Johannes Thumshirn +Reviewed-by: Christoph Hellwig +Signed-off-by: Martin K. Petersen +Cc: Mauricio Faria de Oliveira +Signed-off-by: Greg Kroah-Hartman + +--- + 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: diff --git a/queue-4.4/series b/queue-4.4/series index 0c8d1c3e3ae..86b9948ec58 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -86,3 +86,6 @@ md-linear-fix-a-race-between-linear_add-and-linear_congested.patch 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