kernel: Small patch cleanups
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 23 Feb 2020 13:52:24 +0000 (14:52 +0100)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Tue, 25 Feb 2020 19:20:58 +0000 (20:20 +0100)
This removes some changes in the patches introduced in the update which
are not necessary.

This should not change any functionality, this just makes the review of
the diff to the 4.19 patches easier.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(please integrate into original patch)

target/linux/generic/hack-5.4/204-module_strip.patch
target/linux/generic/hack-5.4/300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch
target/linux/generic/hack-5.4/902-debloat_proc.patch
target/linux/generic/pending-5.4/400-mtd-add-rootfs-split-support.patch
target/linux/generic/pending-5.4/401-mtd-add-support-for-different-partition-parser-types.patch
target/linux/generic/pending-5.4/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/pending-5.4/404-mtd-add-more-helper-functions.patch
target/linux/generic/pending-5.4/430-mtd-add-myloader-partition-parser.patch

index e57f6f63e49f1916d9b12168b08a527adfee3ea0..c74a5a61685be8aab67e229d77151c2036534990 100644 (file)
@@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
  
 +/* This struct is here for syntactic coherency, it is not used */
-+#define __MODULE_INFO_DISABLED(name)                                     \
++#define __MODULE_INFO_DISABLED(name)                                    \
 +  struct __UNIQUE_ID(name) {}
 +
 +#ifdef CONFIG_MODULE_STRIPPED
index 6dad9061ef7094c6f119266a39273873e333b04c..aed08a5ec9d86fbbf4f3f83527b5395916057c24 100644 (file)
@@ -10,33 +10,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
 --- a/arch/mips/include/asm/r4kcache.h
 +++ b/arch/mips/include/asm/r4kcache.h
-@@ -534,7 +534,7 @@ static inline void extra##blast_##pfx##c
-       unsigned long end = start + current_cpu_data.desc.waysize;      \
-       unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit;     \
-       unsigned long ws_end = current_cpu_data.desc.ways <<            \
--                             current_cpu_data.desc.waybit;            \
-+                               current_cpu_data.desc.waybit;          \
-       unsigned long ws, addr;                                         \
-                                                                       \
-       for (ws = 0; ws < ws_end; ws += ws_inc)                         \
-@@ -560,7 +560,7 @@ static inline void extra##blast_##pfx##c
-       unsigned long end = start + PAGE_SIZE;                          \
-       unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit;     \
-       unsigned long ws_end = current_cpu_data.desc.ways <<            \
--                             current_cpu_data.desc.waybit;            \
-+                               current_cpu_data.desc.waybit;          \
-       unsigned long ws, addr;                                         \
-                                                                       \
-       for (ws = 0; ws < ws_end; ws += ws_inc)                         \
-@@ -596,7 +596,7 @@ static inline void blast_##pfx##cache##l
-       unsigned long end = page + PAGE_SIZE;                           \
-                                                                       \
-       do {                                                            \
--              cache##lsize##_unroll32_user(start, hitop);             \
-+              cache##lsize##_unroll32_user(start, hitop);          \
-               start += lsize * 32;                                    \
-       } while (start < end);                                          \
- }
 @@ -617,14 +617,46 @@ static inline void prot##extra##blast_##
                                                    unsigned long end)  \
  {                                                                     \
@@ -52,7 +25,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -      unsigned long aend = (end - 1) & ~(lsize - 1);                  \
 +      unsigned long aend = (end + lsize - 1) & ~(lsize - 1);          \
 +      int lines = (aend - addr) / lsize;                              \
-+                                                                      \
+                                                                       \
+-      while (1) {                                                     \
 +      while (lines >= 8) {                                            \
 +              prot##cache_op(hitop, addr);                            \
 +              prot##cache_op(hitop, addr + lsize);                    \
@@ -79,8 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +              prot##cache_op(hitop, addr + lsize);                    \
 +              addr += lsize_2;                                        \
 +      }                                                               \
-                                                                       \
--      while (1) {                                                     \
++                                                                      \
 +      if (lines & 0x1) {                                              \
                prot##cache_op(hitop, addr);                            \
 -              if (addr == aend)                                       \
@@ -89,21 +62,3 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }                                                               \
  }
  
-@@ -656,7 +688,7 @@ static inline void protected_blast_##pfx
-                       if (addr == aend)                               \
-                               break;                                  \
-                       addr += lsize;                                  \
--              }                                                       \
-+              }                                                        \
-                                                                       \
-       }                                                               \
- }
-@@ -683,7 +715,7 @@ static inline void blast_##pfx##cache##l
-       unsigned long end = start + current_cpu_data.desc.waysize;      \
-       unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit;     \
-       unsigned long ws_end = current_cpu_data.desc.ways <<            \
--                             current_cpu_data.desc.waybit;            \
-+                               current_cpu_data.desc.waybit;          \
-       unsigned long ws, addr;                                         \
-                                                                       \
-       for (ws = 0; ws < ws_end; ws += ws_inc)                         \
index c722bb49cd03a47a463867ceb90bd420b87813e0..880aea0a85a163363378f48673d7973c132a8a5b 100644 (file)
@@ -40,19 +40,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        return 0;
 --- a/fs/proc/Kconfig
 +++ b/fs/proc/Kconfig
-@@ -81,10 +81,10 @@ config PROC_SYSCTL
-         limited in memory.
- config PROC_PAGE_MONITOR
--      default y
-+      default y
-       depends on PROC_FS && MMU
-       bool "Enable /proc page monitoring" if EXPERT
--      help
-+      help
-         Various /proc files exist to monitor process memory utilization:
-         /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
-         /proc/kpagecount, and /proc/kpageflags. Disabling these
 @@ -100,6 +100,11 @@ config PROC_CHILDREN
          Say Y if you are running any user-space software which takes benefit from
          this interface. For example, rkt is such a piece of software.
index 02dbd13c02fe898f6d9ab21f809f2a8b0b0f4c0f..83a4ed39a32cd38f2c34c9e526643218e36379f0 100644 (file)
@@ -59,16 +59,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /*
   * Given a pointer to the MTD object in the mtd_part structure, we can retrieve
   * the pointer to that structure.
-@@ -612,6 +616,8 @@ int mtd_add_partition(struct mtd_info *p
+@@ -612,6 +616,7 @@ int mtd_add_partition(struct mtd_info *p
        if (ret)
                goto err_remove_part;
  
 +      mtd_partition_split(parent, new);
-+
        mtd_add_partition_attrs(new);
  
        return 0;
-@@ -698,6 +704,29 @@ int mtd_del_partition(struct mtd_info *m
+@@ -698,6 +703,29 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -98,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  /*
   * This function, given a master MTD object and a partition table, creates
   * and registers slave MTD objects which are bound to the master according to
-@@ -738,6 +767,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -738,6 +766,7 @@ int add_mtd_partitions(struct mtd_info *
                        goto err_del_partitions;
                }
  
index 61cb7ea514c42e8b1020c7e3df0d6485ab3a4f6c..f471c623768bce53d58e9dacbb5c4b43e5cf38da 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
  /*
   * Given a pointer to the MTD object in the mtd_part structure, we can retrieve
-@@ -704,6 +708,36 @@ int mtd_del_partition(struct mtd_info *m
+@@ -703,6 +707,36 @@ int mtd_del_partition(struct mtd_info *m
  }
  EXPORT_SYMBOL_GPL(mtd_del_partition);
  
@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -1053,6 +1087,61 @@ void mtd_part_parser_cleanup(struct mtd_
+@@ -1052,6 +1086,61 @@ void mtd_part_parser_cleanup(struct mtd_
        }
  }
  
index eda41f399af1d583bf419217f94720523af9a053..afe3ec77563e2dec101d4310c3626bc5f575c056 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -746,6 +746,7 @@ run_parsers_by_type(struct mtd_part *sla
+@@ -745,6 +745,7 @@ run_parsers_by_type(struct mtd_part *sla
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  }
  
  static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
-@@ -755,6 +756,12 @@ static void mtd_partition_split(struct m
+@@ -754,6 +755,12 @@ static void mtd_partition_split(struct m
        if (rootfs_found)
                return;
  
index 062e0bc4568a1af85fbec6fd1a222f3195634557..454a37fc22e1a9c1e0d8052f119fbf36adb0828a 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -1166,6 +1166,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1165,6 +1165,24 @@ int mtd_is_partition(const struct mtd_in
  }
  EXPORT_SYMBOL_GPL(mtd_is_partition);
  
index 22ab013f85040052bc59a11bccf04133d38f696e..f66da83924d29641dbee9a57c3786875fe2965ad 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
 +      ---help---
 +        MyLoader is a bootloader which allows the user to define partitions
 +        in flash devices, by putting a table in the second erase block
-+        on the device, similar to a partition table. This table gives the
++        on the device, similar to a partition table. This table gives the 
 +        offsets and lengths of the user defined partitions.
 +
 +        If you need code which can detect and parse these tables, and