Skip to content

Commit 91dc288

Browse files
rddunlaptsbogend
authored andcommitted
MIPS: vpe-mt: drop physical_memsize
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: 9050d50 ("MIPS: lantiq: Set physical_memsize") Fixes: 1a2a6d7 ("MIPS: APRP: Split VPE loader into separate files.") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Cc: Dengcheng Zhu <[email protected]> Cc: John Crispin <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Philippe Mathieu-Daudé <[email protected]> Cc: "Steven J. Hill" <[email protected]> Cc: Qais Yousef <[email protected]> Cc: Yang Yingliang <[email protected]> Cc: Hauke Mehrtens <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 85cc91e commit 91dc288

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

arch/mips/include/asm/vpe.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ struct vpe_control {
102102
struct list_head tc_list; /* Thread contexts */
103103
};
104104

105-
extern unsigned long physical_memsize;
106105
extern struct vpe_control vpecontrol;
107106
extern const struct file_operations vpe_fops;
108107

arch/mips/kernel/vpe-mt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ int vpe_run(struct vpe *v)
9292
write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
9393

9494
/*
95-
* The sde-kit passes 'memsize' to __start in $a3, so set something
96-
* here... Or set $a3 to zero and define DFLT_STACK_SIZE and
97-
* DFLT_HEAP_SIZE when you compile your program
95+
* We don't pass the memsize here, so VPE programs need to be
96+
* compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
9897
*/
98+
mttgpr(7, 0);
9999
mttgpr(6, v->ntcs);
100-
mttgpr(7, physical_memsize);
101100

102101
/* set up VPE1 */
103102
/*

arch/mips/lantiq/prom.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
DEFINE_SPINLOCK(ebu_lock);
2323
EXPORT_SYMBOL_GPL(ebu_lock);
2424

25-
/*
26-
* This is needed by the VPE loader code, just set it to 0 and assume
27-
* that the firmware hardcodes this value to something useful.
28-
*/
29-
unsigned long physical_memsize = 0L;
30-
3125
/*
3226
* this struct is filled by the soc specific detection code and holds
3327
* information about the specific soc type, revision and name

0 commit comments

Comments
 (0)