TO RESET: stack changes
Change-Id: I325420701dfa5e9eac294be086a9d1e7326d95bc
This commit is contained in:
committed by
Masamichi Takagi
parent
0b82c8942b
commit
7145c4d383
@ -364,6 +364,15 @@ int translate_rva_to_rpa(ihk_os_t os, unsigned long rpt, unsigned long rva,
|
|||||||
|
|
||||||
// page table to translation_table.
|
// page table to translation_table.
|
||||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), rpt, PAGE_SIZE);
|
phys = ihk_device_map_memory(ihk_os_to_dev(os), rpt, PAGE_SIZE);
|
||||||
|
#ifdef ENABLE_FUGAKU_HACKS
|
||||||
|
if (!phys) {
|
||||||
|
pr_err("%s(): ERROR: VA: 0x%lx, rpt is NULL for PID %d\n",
|
||||||
|
__func__, rva, task_tgid_vnr(current));
|
||||||
|
error = -EFAULT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
tbl = ihk_device_map_virtual(ihk_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
tbl = ihk_device_map_virtual(ihk_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
||||||
rpa = (unsigned long)tbl->tt_pa;
|
rpa = (unsigned long)tbl->tt_pa;
|
||||||
|
|
||||||
|
|||||||
@ -295,7 +295,13 @@ int hugefileobj_create(struct memobj *memobj, size_t len, off_t off,
|
|||||||
int pgind;
|
int pgind;
|
||||||
int npages;
|
int npages;
|
||||||
|
|
||||||
|
#ifndef ENABLE_FUGAKU_HACKS
|
||||||
for (pgind = 0; pgind < obj->nr_pages; ++pgind) {
|
for (pgind = 0; pgind < obj->nr_pages; ++pgind) {
|
||||||
|
#else
|
||||||
|
/* Map in only the last 8 pages */
|
||||||
|
for (pgind = ((obj->nr_pages > 8) ? (obj->nr_pages - 8) : 0);
|
||||||
|
pgind < obj->nr_pages; ++pgind) {
|
||||||
|
#endif
|
||||||
if (obj->pages[pgind]) {
|
if (obj->pages[pgind]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -747,7 +747,11 @@ distance_based:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
#ifndef ENABLE_FUGAKU_HACKS
|
||||||
kprintf("%s: distance: CPU @ node %d failed to allocate "
|
kprintf("%s: distance: CPU @ node %d failed to allocate "
|
||||||
|
#else
|
||||||
|
dkprintf("%s: distance: CPU @ node %d failed to allocate "
|
||||||
|
#endif
|
||||||
"%d pages from node %d\n",
|
"%d pages from node %d\n",
|
||||||
__FUNCTION__,
|
__FUNCTION__,
|
||||||
ihk_mc_get_numa_id(),
|
ihk_mc_get_numa_id(),
|
||||||
|
|||||||
@ -2578,6 +2578,14 @@ int init_process_stack(struct thread *thread, struct program_load_desc *pn,
|
|||||||
__FUNCTION__, size, minsz,
|
__FUNCTION__, size, minsz,
|
||||||
ap_flag ? "(IHK_MC_AP_USER)" : "");
|
ap_flag ? "(IHK_MC_AP_USER)" : "");
|
||||||
|
|
||||||
|
#ifdef ENABLE_FUGAKU_HACKS
|
||||||
|
/*
|
||||||
|
* XXX: Fugaku: Fujitsu's runtime remaps the stack
|
||||||
|
* using hugetlbfs so don't bother allocating too much here..
|
||||||
|
*/
|
||||||
|
minsz = 8*1024*1024;
|
||||||
|
#endif
|
||||||
|
|
||||||
stack = ihk_mc_alloc_aligned_pages_user(minsz >> PAGE_SHIFT,
|
stack = ihk_mc_alloc_aligned_pages_user(minsz >> PAGE_SHIFT,
|
||||||
USER_STACK_PAGE_P2ALIGN,
|
USER_STACK_PAGE_P2ALIGN,
|
||||||
IHK_MC_AP_NOWAIT | ap_flag,
|
IHK_MC_AP_NOWAIT | ap_flag,
|
||||||
|
|||||||
Reference in New Issue
Block a user