MIPS: vpe-mt: drop physical_memsize
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 19 Feb 2023 23:15:25 +0000 (15:15 -0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 20 Feb 2023 14:11:01 +0000 (15:11 +0100)
When neither LANTIQ nor MIPS_MALTA is set, 'physical_memsize' is not
declared. This causes the build to fail with:

mips-linux-ld: arch/mips/kernel/vpe-mt.o: in function `vpe_run':
arch/mips/kernel/vpe-mt.c:(.text.vpe_run+0x280): undefined reference to `physical_memsize'

LANTIQ is not using 'physical_memsize' and MIPS_MALTA's use of it is
self-contained in mti-malta/malta-dtshim.c.
Use of physical_memsize in vpe-mt.c appears to be unused, so eliminate
this loader mode completely and require VPE programs to be compiled with
DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.

Fixes: 9050d50e2244 ("MIPS: lantiq: Set physical_memsize")
Fixes: 1a2a6d7e8816 ("MIPS: APRP: Split VPE loader into separate files.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/all/202302030625.2g3E98sY-lkp@intel.com/
Cc: Dengcheng Zhu <dzhu@wavecomp.com>
Cc: John Crispin <john@phrozen.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: "Steven J. Hill" <Steven.Hill@imgtec.com>
Cc: Qais Yousef <Qais.Yousef@imgtec.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/vpe.h
arch/mips/kernel/vpe-mt.c
arch/mips/lantiq/prom.c

index baa949a744cb44c3c92a7314ed4e009e05520dcc..ef7e07829607936536bfa83484641917ef236a3b 100644 (file)
@@ -102,7 +102,6 @@ struct vpe_control {
        struct list_head tc_list;       /* Thread contexts */
 };
 
-extern unsigned long physical_memsize;
 extern struct vpe_control vpecontrol;
 extern const struct file_operations vpe_fops;
 
index 84a82b551ec35345314969ae46d25fc628b835aa..223d6274f2e5b25c750d87da0b080d573f9a713c 100644 (file)
@@ -92,12 +92,11 @@ int vpe_run(struct vpe *v)
        write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
 
        /*
-        * The sde-kit passes 'memsize' to __start in $a3, so set something
-        * here...  Or set $a3 to zero and define DFLT_STACK_SIZE and
-        * DFLT_HEAP_SIZE when you compile your program
+        * We don't pass the memsize here, so VPE programs need to be
+        * compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
         */
+       mttgpr(7, 0);
        mttgpr(6, v->ntcs);
-       mttgpr(7, physical_memsize);
 
        /* set up VPE1 */
        /*
index be4829cc7a3a07941980cfc716b4a59e8509c6a8..a3cf293658581ed6a599da2b870f3c10c67a6be1 100644 (file)
 DEFINE_SPINLOCK(ebu_lock);
 EXPORT_SYMBOL_GPL(ebu_lock);
 
-/*
- * This is needed by the VPE loader code, just set it to 0 and assume
- * that the firmware hardcodes this value to something useful.
- */
-unsigned long physical_memsize = 0L;
-
 /*
  * this struct is filled by the soc specific detection code and holds
  * information about the specific soc type, revision and name