Skip to contentSkip to conversation

memory in mips with 32bit ELF is lower than 0x80000000

PATCH In review Shang Yanfeng 3 participants 3 messages Dec 30, 2011 – Feb 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory in mips with 32bit ELF is lower than 0x80000000

because userspace memory in mips with 32bit ELF is lower than 0x80000000, so mmap failed.

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +10 -0
index 45cddf7..279b12a 100644
@@ -64,8 +64,18 @@
 #include "usctest.h"
 #include "system_specific_hugepages_info.h"
 
+#if defined(__mips__)
+#if __WORDSIZE==32
+#define LOW_ADDR       (void *)(0x40000000)
+#define LOW_ADDR2      (void *)(0x50000000)
+#else
 #define LOW_ADDR       (void *)(0x80000000)
 #define LOW_ADDR2      (void *)(0x90000000)
+#endif
+#else
+#define LOW_ADDR       (void *)(0x80000000)
+#define LOW_ADDR2      (void *)(0x90000000)
+#endif
 
 char TEMPFILE[MAXPATHLEN];
 
Signature · 13 lines
1.6.3.1


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 10 lines · Shang Yanfeng
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +5 -0
 
+#if defined(__mips__)
+#if __WORDSIZE==32
+#define LOW_ADDR       (void *)(0x40000000)
+#define LOW_ADDR2      (void *)(0x50000000)
+#else

 #define LOW_ADDR       (void *)(0x80000000)
 #define LOW_ADDR2      (void *)(0x90000000)

testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c line 78

Quoted 5 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +5 -0
+#endif
+#else
+#define LOW_ADDR       (void *)(0x80000000)
+#define LOW_ADDR2      (void *)(0x90000000)
+#endif

the last two cases here are the same. so it should be:
#if defined(__mips__) && __WORDSIZE == 32

# define LOW_ADDR       (void *)(0x40000000)
# define LOW_ADDR2      (void *)(0x50000000)
#else
# define LOW_ADDR       (void *)(0x80000000)
# define LOW_ADDR2      (void *)(0x90000000)
#endif
-mike

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
In reply to Shang Yanfeng

Hi!
Could you fix the patch as Mike suggested and resend?

Signature · 12 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list