Bug 342356 - MIPS: determine page size at runtime
Summary: MIPS: determine page size at runtime
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-31 07:23 UTC by Maran Pakkirisamy
Modified: 2018-09-10 12:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
accept 8k and 32k as valid page size (1.12 KB, patch)
2014-12-31 10:32 UTC, Maran Pakkirisamy
Details
enable runtime determination of pagesize of MIPS target (4.93 KB, patch)
2014-12-31 10:38 UTC, Maran Pakkirisamy
Details
remove --with-pagesize config switch (1.32 KB, patch)
2014-12-31 10:42 UTC, Maran Pakkirisamy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maran Pakkirisamy 2014-12-31 07:23:02 UTC
MIPS kernels support varying pagesizes - 4k, 16k, 64k. In addition to that, Cavium Octeon MIPS (cnMIPS) kernels support 8k and 32k pages.

Valgrind for MIPS target currently requires to pass the page size of the target kernel as a configure time option (--with-pagesize).

The page size is determined at runtime for PPC32/64 and ARM64 which have kernels that support multi-pagesize similar to MIPS.

So, enable valgrind for MIPS target to determine page size at runtime.

Reproducible: Always
Comment 1 Maran Pakkirisamy 2014-12-31 10:32:20 UTC
Created attachment 90176 [details]
accept 8k and 32k as valid page size
Comment 2 Maran Pakkirisamy 2014-12-31 10:38:24 UTC
Created attachment 90177 [details]
enable runtime determination of pagesize of MIPS target

The patch can be applied after applying pagesize-8k-32k-support.patch
To apply the patch,
patch -p1 < multi-pagesize.patch

The patch has been tested on MIPS64 kernels with 4k, 8k, 32k pages. However, it is not tested on MIPS32 target.
Comment 3 Maran Pakkirisamy 2014-12-31 10:42:42 UTC
Created attachment 90178 [details]
remove --with-pagesize config switch

As page size is determined at runtime, --page-size configutation switch become obsolete. So, remove it.
If the patches are accepted, README.mips will need an update regarding the --with-pagesize option.
To apply the patch,
patch -p1 < update-config-option.patch
Comment 4 Julian Seward 2015-01-20 01:12:18 UTC
Sounds like a not-bad plan.  Petar, any comment?
Comment 5 Petar Jovanovic 2016-02-26 15:35:07 UTC
Committed in r15813. Thank you.
Comment 6 Petar Jovanovic 2018-09-10 12:07:19 UTC
Fixed in r15813. Closing it.