--- /dev/null
+From 55a51ea14094a1e7dd0d7f33237d246033dd39ab Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Mon, 30 Aug 2021 11:11:28 +0200
+Subject: block/mq-deadline: Move dd_queued() to fix defined but not used warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 55a51ea14094a1e7dd0d7f33237d246033dd39ab upstream.
+
+If CONFIG_BLK_DEBUG_FS=n:
+
+ block/mq-deadline.c:274:12: warning: ‘dd_queued’ defined but not used [-Wunused-function]
+ 274 | static u32 dd_queued(struct deadline_data *dd, enum dd_prio prio)
+ | ^~~~~~~~~
+
+Fix this by moving dd_queued() just before the sole function that calls
+it.
+
+Fixes: 7b05bf771084ff78 ("Revert "block/mq-deadline: Prioritize high-priority requests"")
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Fixes: 38ba64d12d4c ("block/mq-deadline: Track I/O statistics")
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Link: https://lore.kernel.org/r/20210830091128.1854266-1-geert@linux-m68k.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ block/mq-deadline.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/block/mq-deadline.c
++++ b/block/mq-deadline.c
+@@ -270,12 +270,6 @@ deadline_move_request(struct deadline_da
+ deadline_remove_request(rq->q, per_prio, rq);
+ }
+
+-/* Number of requests queued for a given priority level. */
+-static u32 dd_queued(struct deadline_data *dd, enum dd_prio prio)
+-{
+- return dd_sum(dd, inserted, prio) - dd_sum(dd, completed, prio);
+-}
+-
+ /*
+ * deadline_check_fifo returns 0 if there are no expired requests on the fifo,
+ * 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir])
+@@ -953,6 +947,12 @@ static int dd_async_depth_show(void *dat
+ return 0;
+ }
+
++/* Number of requests queued for a given priority level. */
++static u32 dd_queued(struct deadline_data *dd, enum dd_prio prio)
++{
++ return dd_sum(dd, inserted, prio) - dd_sum(dd, completed, prio);
++}
++
+ static int dd_queued_show(void *data, struct seq_file *m)
+ {
+ struct request_queue *q = data;
--- /dev/null
+From 6f1fce595b78b775d7fb585c15c2dc3a6994f96e Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Wed, 1 Sep 2021 22:18:18 +0200
+Subject: parisc: math-emu: Fix fall-through warnings
+
+From: Helge Deller <deller@gmx.de>
+
+commit 6f1fce595b78b775d7fb585c15c2dc3a6994f96e upstream.
+
+Fix lots of fallthrough warnings, e.g.:
+arch/parisc/math-emu/fpudispatch.c:323:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/parisc/math-emu/fpudispatch.c | 56 +++++++++++++++++++++++++++++++++++--
+ 1 file changed, 53 insertions(+), 3 deletions(-)
+
+--- a/arch/parisc/math-emu/fpudispatch.c
++++ b/arch/parisc/math-emu/fpudispatch.c
+@@ -310,12 +310,15 @@ decode_0c(u_int ir, u_int class, u_int s
+ r1 &= ~3;
+ fpregs[t+3] = fpregs[r1+3];
+ fpregs[t+2] = fpregs[r1+2];
++ fallthrough;
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ fpregs[t] = fpregs[r1];
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 3: /* FABS */
+ switch (fmt) {
+ case 2: /* illegal */
+@@ -325,13 +328,16 @@ decode_0c(u_int ir, u_int class, u_int s
+ r1 &= ~3;
+ fpregs[t+3] = fpregs[r1+3];
+ fpregs[t+2] = fpregs[r1+2];
++ fallthrough;
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ /* copy and clear sign bit */
+ fpregs[t] = fpregs[r1] & 0x7fffffff;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 6: /* FNEG */
+ switch (fmt) {
+ case 2: /* illegal */
+@@ -341,13 +347,16 @@ decode_0c(u_int ir, u_int class, u_int s
+ r1 &= ~3;
+ fpregs[t+3] = fpregs[r1+3];
+ fpregs[t+2] = fpregs[r1+2];
++ fallthrough;
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ /* copy and invert sign bit */
+ fpregs[t] = fpregs[r1] ^ 0x80000000;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 7: /* FNEGABS */
+ switch (fmt) {
+ case 2: /* illegal */
+@@ -357,13 +366,16 @@ decode_0c(u_int ir, u_int class, u_int s
+ r1 &= ~3;
+ fpregs[t+3] = fpregs[r1+3];
+ fpregs[t+2] = fpregs[r1+2];
++ fallthrough;
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ /* copy and set sign bit */
+ fpregs[t] = fpregs[r1] | 0x80000000;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 4: /* FSQRT */
+ switch (fmt) {
+ case 0:
+@@ -376,6 +388,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 5: /* FRND */
+ switch (fmt) {
+ case 0:
+@@ -389,7 +402,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(MAJOR_0C_EXCP);
+ }
+ } /* end of switch (subop) */
+-
++ BUG();
+ case 1: /* class 1 */
+ df = extru(ir,fpdfpos,2); /* get dest format */
+ if ((df & 2) || (fmt & 2)) {
+@@ -419,6 +432,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* dbl/dbl */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 1: /* FCNVXF */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -434,6 +448,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 2: /* FCNVFX */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -449,6 +464,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 3: /* FCNVFXT */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -464,6 +480,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 5: /* FCNVUF (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -479,6 +496,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 6: /* FCNVFU (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -494,6 +512,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 7: /* FCNVFUT (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -509,10 +528,11 @@ decode_0c(u_int ir, u_int class, u_int s
+ return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 4: /* undefined */
+ return(MAJOR_0C_EXCP);
+ } /* end of switch subop */
+-
++ BUG();
+ case 2: /* class 2 */
+ fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];
+ r2 = extru(ir, fpr2pos, 5) * sizeof(double)/sizeof(u_int);
+@@ -590,6 +610,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 1: /* FTEST */
+ switch (fmt) {
+ case 0:
+@@ -609,8 +630,10 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3:
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ } /* end of switch subop */
+ } /* end of else for PA1.0 & PA1.1 */
++ BUG();
+ case 3: /* class 3 */
+ r2 = extru(ir,fpr2pos,5) * sizeof(double)/sizeof(u_int);
+ if (r2 == 0)
+@@ -633,6 +656,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 1: /* FSUB */
+ switch (fmt) {
+ case 0:
+@@ -645,6 +669,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 2: /* FMPY */
+ switch (fmt) {
+ case 0:
+@@ -657,6 +682,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 3: /* FDIV */
+ switch (fmt) {
+ case 0:
+@@ -669,6 +695,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ case 4: /* FREM */
+ switch (fmt) {
+ case 0:
+@@ -681,6 +708,7 @@ decode_0c(u_int ir, u_int class, u_int s
+ case 3: /* quad not implemented */
+ return(MAJOR_0C_EXCP);
+ }
++ BUG();
+ } /* end of class 3 switch */
+ } /* end of switch(class) */
+
+@@ -736,10 +764,12 @@ u_int fpregs[];
+ return(MAJOR_0E_EXCP);
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ fpregs[t] = fpregs[r1];
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 3: /* FABS */
+ switch (fmt) {
+ case 2:
+@@ -747,10 +777,12 @@ u_int fpregs[];
+ return(MAJOR_0E_EXCP);
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ fpregs[t] = fpregs[r1] & 0x7fffffff;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 6: /* FNEG */
+ switch (fmt) {
+ case 2:
+@@ -758,10 +790,12 @@ u_int fpregs[];
+ return(MAJOR_0E_EXCP);
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ fpregs[t] = fpregs[r1] ^ 0x80000000;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 7: /* FNEGABS */
+ switch (fmt) {
+ case 2:
+@@ -769,10 +803,12 @@ u_int fpregs[];
+ return(MAJOR_0E_EXCP);
+ case 1: /* double */
+ fpregs[t+1] = fpregs[r1+1];
++ fallthrough;
+ case 0: /* single */
+ fpregs[t] = fpregs[r1] | 0x80000000;
+ return(NOEXCEPTION);
+ }
++ BUG();
+ case 4: /* FSQRT */
+ switch (fmt) {
+ case 0:
+@@ -785,6 +821,7 @@ u_int fpregs[];
+ case 3:
+ return(MAJOR_0E_EXCP);
+ }
++ BUG();
+ case 5: /* FRMD */
+ switch (fmt) {
+ case 0:
+@@ -798,7 +835,7 @@ u_int fpregs[];
+ return(MAJOR_0E_EXCP);
+ }
+ } /* end of switch (subop */
+-
++ BUG();
+ case 1: /* class 1 */
+ df = extru(ir,fpdfpos,2); /* get dest format */
+ /*
+@@ -826,6 +863,7 @@ u_int fpregs[];
+ case 3: /* dbl/dbl */
+ return(MAJOR_0E_EXCP);
+ }
++ BUG();
+ case 1: /* FCNVXF */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -841,6 +879,7 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 2: /* FCNVFX */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -856,6 +895,7 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 3: /* FCNVFXT */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -871,6 +911,7 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 5: /* FCNVUF (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -886,6 +927,7 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 6: /* FCNVFU (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -901,6 +943,7 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 7: /* FCNVFUT (PA2.0 only) */
+ switch(fmt) {
+ case 0: /* sgl/sgl */
+@@ -916,9 +959,11 @@ u_int fpregs[];
+ return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
+ &fpregs[t],status));
+ }
++ BUG();
+ case 4: /* undefined */
+ return(MAJOR_0C_EXCP);
+ } /* end of switch subop */
++ BUG();
+ case 2: /* class 2 */
+ /*
+ * Be careful out there.
+@@ -994,6 +1039,7 @@ u_int fpregs[];
+ }
+ } /* end of switch subop */
+ } /* end of else for PA1.0 & PA1.1 */
++ BUG();
+ case 3: /* class 3 */
+ /*
+ * Be careful out there.
+@@ -1026,6 +1072,7 @@ u_int fpregs[];
+ return(dbl_fadd(&fpregs[r1],&fpregs[r2],
+ &fpregs[t],status));
+ }
++ BUG();
+ case 1: /* FSUB */
+ switch (fmt) {
+ case 0:
+@@ -1035,6 +1082,7 @@ u_int fpregs[];
+ return(dbl_fsub(&fpregs[r1],&fpregs[r2],
+ &fpregs[t],status));
+ }
++ BUG();
+ case 2: /* FMPY or XMPYU */
+ /*
+ * check for integer multiply (x bit set)
+@@ -1071,6 +1119,7 @@ u_int fpregs[];
+ &fpregs[r2],&fpregs[t],status));
+ }
+ }
++ BUG();
+ case 3: /* FDIV */
+ switch (fmt) {
+ case 0:
+@@ -1080,6 +1129,7 @@ u_int fpregs[];
+ return(dbl_fdiv(&fpregs[r1],&fpregs[r2],
+ &fpregs[t],status));
+ }
++ BUG();
+ case 4: /* FREM */
+ switch (fmt) {
+ case 0:
--- /dev/null
+From e8e9f1e6327005be9656aa135aeb9dfdaf6b3032 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Fri, 24 Sep 2021 15:43:57 -0700
+Subject: sh: pgtable-3level: fix cast to pointer from integer of different size
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit e8e9f1e6327005be9656aa135aeb9dfdaf6b3032 upstream.
+
+If X2TLB=y (CPU_SHX2=y or CPU_SHX3=y, e.g. migor_defconfig), pgd_t.pgd
+is "unsigned long long", causing:
+
+ In file included from arch/sh/include/asm/pgtable.h:13,
+ from include/linux/pgtable.h:6,
+ from include/linux/mm.h:33,
+ from arch/sh/kernel/asm-offsets.c:14:
+ arch/sh/include/asm/pgtable-3level.h: In function `pud_pgtable':
+ arch/sh/include/asm/pgtable-3level.h:37:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+ 37 | return (pmd_t *)pud_val(pud);
+ | ^
+
+Fix this by adding an intermediate cast to "unsigned long", which is
+basically what the old code did before.
+
+Link: https://lkml.kernel.org/r/2c2eef3c9a2f57e5609100a4864715ccf253d30f.1631713483.git.geert+renesas@glider.be
+Fixes: 9cf6fa2458443118 ("mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *")
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Tested-by: Daniel Palmer <daniel@thingy.jp>
+Acked-by: Rob Landley <rob@landley.net>
+Cc: Yoshinori Sato <ysato@users.osdn.me>
+Cc: Rich Felker <dalias@libc.org>
+Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
+Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sh/include/asm/pgtable-3level.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/sh/include/asm/pgtable-3level.h
++++ b/arch/sh/include/asm/pgtable-3level.h
+@@ -34,7 +34,7 @@ typedef struct { unsigned long long pmd;
+
+ static inline pmd_t *pud_pgtable(pud_t pud)
+ {
+- return (pmd_t *)pud_val(pud);
++ return (pmd_t *)(unsigned long)pud_val(pud);
+ }
+
+ /* only used by the stubbed out hugetlb gup code, should never be called */