Compare commits
15 Commits
1.7.1-0.8
...
1.7.1-0.93
| Author | SHA1 | Date | |
|---|---|---|---|
| a82d161be8 | |||
| 7152269a59 | |||
| 31c08bcb7d | |||
| dffb0918a2 | |||
| 23cd14af7d | |||
| a5cf2019bc | |||
| 11b9fe0377 | |||
| 4905c8e638 | |||
| 3d71c6a8eb | |||
| 1cea75dd51 | |||
| 661ba0ce4a | |||
| 7e82adc761 | |||
| 1f9fbe82db | |||
| aa3d4ba7bd | |||
| c89ac042f9 |
@ -10,7 +10,7 @@ project(mckernel C ASM)
|
|||||||
set(MCKERNEL_VERSION "1.7.1")
|
set(MCKERNEL_VERSION "1.7.1")
|
||||||
|
|
||||||
# See "Fedora Packaging Guidelines -- Versioning"
|
# See "Fedora Packaging Guidelines -- Versioning"
|
||||||
set(MCKERNEL_RELEASE "0.8")
|
set(MCKERNEL_RELEASE "0.93")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
||||||
# for rpmbuild
|
# for rpmbuild
|
||||||
@ -65,7 +65,7 @@ if(ENABLE_TOFU)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# when compiling on a compute-node
|
# when compiling on a compute-node
|
||||||
execute_process(COMMAND bash -c "grep $(hostname) /etc/opt/FJSVfefs/config/fefs_node1.csv 2>/dev/null | cut -d, -f2"
|
execute_process(COMMAND bash -c "grep $(hostname) /etc/opt/FJSVfefs/config/fefs_node1.csv 2>/dev/null | cut -d, -f2 | grep -o CN"
|
||||||
OUTPUT_VARIABLE FUGAKU_NODE_TYPE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_VARIABLE FUGAKU_NODE_TYPE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(FUGAKU_NODE_TYPE STREQUAL "CN")
|
if(FUGAKU_NODE_TYPE STREQUAL "CN")
|
||||||
option(ENABLE_FUGAKU_HACKS "Fugaku hacks" ON)
|
option(ENABLE_FUGAKU_HACKS "Fugaku hacks" ON)
|
||||||
|
|||||||
@ -129,11 +129,29 @@ Create the tarball and the spec file:
|
|||||||
make dist
|
make dist
|
||||||
cp mckernel-<version>.tar.gz <rpmbuild>/SOURCES
|
cp mckernel-<version>.tar.gz <rpmbuild>/SOURCES
|
||||||
|
|
||||||
|
(optional) Edit the following line in ``scripts/mckernel.spec`` to change
|
||||||
|
cmake options. For example:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
%cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUNAME_R=%{kernel_version} \
|
||||||
|
-DKERNEL_DIR=%{kernel_dir} \
|
||||||
|
%{?cmake_libdir:-DCMAKE_INSTALL_LIBDIR=%{cmake_libdir}} \
|
||||||
|
%{?build_target:-DBUILD_TARGET=%{build_target}} \
|
||||||
|
%{?toolchain_file:-DCMAKE_TOOLCHAIN_FILE=%{toolchain_file}} \
|
||||||
|
-DENABLE_TOFU=ON -DENABLE_FUGAKU_HACKS=ON \
|
||||||
|
-DENABLE_KRM_WORKAROUND=OFF -DWITH_KRM=ON \
|
||||||
|
-DENABLE_FUGAKU_DEBUG=OFF \
|
||||||
|
.
|
||||||
|
|
||||||
Create the rpm package:
|
Create the rpm package:
|
||||||
|
|
||||||
When not cross-compiling:
|
When not cross-compiling:
|
||||||
"""""""""""""""""""""""""
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Then build the rpm:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
rpmbuild -ba scripts/mckernel.spec
|
rpmbuild -ba scripts/mckernel.spec
|
||||||
|
|||||||
61
docs/uti.rst
61
docs/uti.rst
@ -4,24 +4,41 @@ Advanced: Enable Utility Thread offloading Interface (UTI)
|
|||||||
UTI enables a runtime such as MPI runtime to spawn utility threads such
|
UTI enables a runtime such as MPI runtime to spawn utility threads such
|
||||||
as MPI asynchronous progress threads to Linux cores.
|
as MPI asynchronous progress threads to Linux cores.
|
||||||
|
|
||||||
Install capstone
|
Install ``capstone`` and ``capstone-devel``
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
When compute nodes don't have access to repositories
|
When compute nodes don't have access to EPEL repository
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
Install EPEL capstone-devel:
|
Install EPEL ``capstone`` and ``capstone-devel``:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
sudo yum install capstone-devel
|
sudo yum install capstone capstone-devel
|
||||||
|
|
||||||
|
|
||||||
When compute nodes don't have access to repositories
|
When compute nodes don't have access to EPEL repository
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
Ask the system administrator to install ``capstone-devel``. Note that it is in the EPEL repository.
|
A. Ask the system administrator to install ``capstone`` and ``capstone-devel``. Note that it is in the EPEL repository.
|
||||||
|
|
||||||
|
B. Download the rpm with the machine in which you are the administrator:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
|
sudo yum install yum-utils
|
||||||
|
yumdownloader capstone capstone-devel
|
||||||
|
|
||||||
|
and then install it to your home directory of the login node:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
cd $HOME/$(uname -p)
|
||||||
|
rpm2cpio capstone-4.0.1-9.el8.aarch64.rpm | cpio -idv
|
||||||
|
rpm2cpio capstone-devel-4.0.1-9.el8.aarch64.rpm | cpio -idv
|
||||||
|
sed -i 's#/usr/#'"$HOME"'/'"$(uname -p)"'/usr/#' $HOME/$(uname -p)/usr/lib64/pkgconfig/capstone.pc
|
||||||
|
|
||||||
|
|
||||||
Install syscall_intercept
|
Install syscall_intercept
|
||||||
@ -31,7 +48,24 @@ Install syscall_intercept
|
|||||||
|
|
||||||
git clone https://github.com/RIKEN-SysSoft/syscall_intercept.git
|
git clone https://github.com/RIKEN-SysSoft/syscall_intercept.git
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake <syscall_intercept>/arch/aarch64 -DCMAKE_INSTALL_PREFIX=<syscall-intercept-install> -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF
|
|
||||||
|
When ``capstone`` and ``capstone-devel`` are installed into the system directory:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
cmake ../syscall_intercept/arch/aarch64 -DCMAKE_INSTALL_PREFIX=${HOME}/$(uname -p)/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF
|
||||||
|
|
||||||
|
When ``capstone`` and ``capstone-devel`` are installed into your home directory:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr cmake ../syscall_intercept/arch/aarch64 -DCMAKE_INSTALL_PREFIX=${HOME}/$(uname -p)/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DTREAT_WARNINGS_AS_ERRORS=OFF
|
||||||
|
|
||||||
|
Install:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
make && make install && make test
|
||||||
|
|
||||||
Install UTI for McKernel
|
Install UTI for McKernel
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -48,16 +82,17 @@ Install:
|
|||||||
Install McKernel
|
Install McKernel
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Add ``-DENABLE_UTI=ON`` option to ``cmake``:
|
``cmake`` with the additional options:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
CMAKE_PREFIX_PATH=<syscall-intercept-install> cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel
|
CMAKE_PREFIX_PATH=${HOME}/$(uname -p)/usr cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ihk+mckernel -DENABLE_UTI=ON $HOME/src/ihk+mckernel/mckernel
|
||||||
|
make -j install
|
||||||
|
|
||||||
Run programs
|
Run programs
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Add ``--enable-uti`` option to ``mcexec``:
|
``mcexec`` with ``--enable-uti`` option:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|||||||
@ -270,16 +270,17 @@ int mcexec_transfer_image(ihk_os_t os, struct remote_transfer *__user upt)
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MIC
|
||||||
if (pt.size > PAGE_SIZE) {
|
if (pt.size > PAGE_SIZE) {
|
||||||
printk("mcexec_transfer_image(): ERROR: size exceeds PAGE_SIZE\n");
|
printk("mcexec_transfer_image(): ERROR: size exceeds PAGE_SIZE\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), pt.rphys, PAGE_SIZE);
|
phys = ihk_device_map_memory(ihk_os_to_dev(os), pt.rphys, PAGE_SIZE);
|
||||||
#ifdef CONFIG_MIC
|
|
||||||
rpm = ioremap_wc(phys, PAGE_SIZE);
|
rpm = ioremap_wc(phys, PAGE_SIZE);
|
||||||
#else
|
#else
|
||||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
phys = ihk_device_map_memory(ihk_os_to_dev(os), pt.rphys, pt.size);
|
||||||
|
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys, pt.size, NULL, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!rpm) {
|
if (!rpm) {
|
||||||
@ -304,10 +305,11 @@ int mcexec_transfer_image(ihk_os_t os, struct remote_transfer *__user upt)
|
|||||||
|
|
||||||
#ifdef CONFIG_MIC
|
#ifdef CONFIG_MIC
|
||||||
iounmap(rpm);
|
iounmap(rpm);
|
||||||
#else
|
|
||||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm, PAGE_SIZE);
|
|
||||||
#endif
|
|
||||||
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, PAGE_SIZE);
|
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, PAGE_SIZE);
|
||||||
|
#else
|
||||||
|
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm, pt.size);
|
||||||
|
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, pt.size);
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -3644,7 +3646,8 @@ int __mcctrl_os_read_write_cpu_register(ihk_os_t os, int cpu,
|
|||||||
isp.op = op;
|
isp.op = op;
|
||||||
isp.pdesc = virt_to_phys(ldesc);
|
isp.pdesc = virt_to_phys(ldesc);
|
||||||
|
|
||||||
ret = mcctrl_ikc_send_wait(os, cpu, &isp, 0, NULL, &do_free, 1, ldesc);
|
/* 1 sec timeout for the case where McKernel can't respond */
|
||||||
|
ret = mcctrl_ikc_send_wait(os, cpu, &isp, 1000, NULL, &do_free, 1, ldesc);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
printk("%s: ERROR sending IKC msg: %d\n", __FUNCTION__, ret);
|
printk("%s: ERROR sending IKC msg: %d\n", __FUNCTION__, ret);
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
@ -536,9 +536,6 @@ int prepare_ikc_channels(ihk_os_t os)
|
|||||||
usrdata->os = os;
|
usrdata->os = os;
|
||||||
ihk_host_os_set_usrdata(os, usrdata);
|
ihk_host_os_set_usrdata(os, usrdata);
|
||||||
|
|
||||||
ihk_ikc_listen_port(os, &lp_ikc2linux);
|
|
||||||
ihk_ikc_listen_port(os, &lp_ikc2mckernel);
|
|
||||||
|
|
||||||
init_waitqueue_head(&usrdata->wq_procfs);
|
init_waitqueue_head(&usrdata->wq_procfs);
|
||||||
mutex_init(&usrdata->reserve_lock);
|
mutex_init(&usrdata->reserve_lock);
|
||||||
mutex_init(&usrdata->part_exec_lock);
|
mutex_init(&usrdata->part_exec_lock);
|
||||||
@ -555,6 +552,16 @@ int prepare_ikc_channels(ihk_os_t os)
|
|||||||
INIT_LIST_HEAD(&usrdata->wakeup_descs_list);
|
INIT_LIST_HEAD(&usrdata->wakeup_descs_list);
|
||||||
spin_lock_init(&usrdata->wakeup_descs_lock);
|
spin_lock_init(&usrdata->wakeup_descs_lock);
|
||||||
|
|
||||||
|
/* ihk_ikc_listen_port should be performed after
|
||||||
|
* usrdata->cpu_topology_list is initialized because the
|
||||||
|
* function enables syscall_packet_handler which accesses
|
||||||
|
* the list (the call path is sysfsm_packet_handler -->
|
||||||
|
* sysfsm_work_main --> sysfsm_setup --> setup_sysfs_files
|
||||||
|
* --> setup_cpus_sysfs_files).
|
||||||
|
*/
|
||||||
|
ihk_ikc_listen_port(os, &lp_ikc2linux);
|
||||||
|
ihk_ikc_listen_port(os, &lp_ikc2mckernel);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|||||||
@ -1957,14 +1957,14 @@ opendev()
|
|||||||
fprintf(stderr, "%s: warning: LD_PRELOAD line is too long\n", __FUNCTION__); \
|
fprintf(stderr, "%s: warning: LD_PRELOAD line is too long\n", __FUNCTION__); \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
strncat(envbuf, elembuf, remainder); \
|
strncat(envbuf, elembuf, remainder - 1); \
|
||||||
remainder = PATH_MAX - (strlen(envbuf) + 1); \
|
remainder = PATH_MAX - (strlen(envbuf) + 1); \
|
||||||
nelem++; \
|
nelem++; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static ssize_t find_libdir(char *libdir, size_t len)
|
static ssize_t find_libdir(char *libdir, size_t len)
|
||||||
{
|
{
|
||||||
FILE *filep;
|
FILE *filep = NULL;
|
||||||
ssize_t rc;
|
ssize_t rc;
|
||||||
size_t linelen = 0;
|
size_t linelen = 0;
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
@ -2020,7 +2020,9 @@ static ssize_t find_libdir(char *libdir, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
if (filep) {
|
||||||
pclose(filep);
|
pclose(filep);
|
||||||
|
}
|
||||||
free(line);
|
free(line);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -4121,6 +4123,7 @@ int main_loop(struct thread_data_s *my_thread)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case __NR_gettid:{
|
case __NR_gettid:{
|
||||||
|
int rc = 0;
|
||||||
/*
|
/*
|
||||||
* Number of TIDs and the remote physical address where TIDs are
|
* Number of TIDs and the remote physical address where TIDs are
|
||||||
* expected are passed in arg 4 and 5, respectively.
|
* expected are passed in arg 4 and 5, respectively.
|
||||||
@ -4132,6 +4135,7 @@ int main_loop(struct thread_data_s *my_thread)
|
|||||||
int *tids = malloc(sizeof(int) * w.sr.args[4]);
|
int *tids = malloc(sizeof(int) * w.sr.args[4]);
|
||||||
if (!tids) {
|
if (!tids) {
|
||||||
fprintf(stderr, "__NR_gettid(): error allocating TIDs\n");
|
fprintf(stderr, "__NR_gettid(): error allocating TIDs\n");
|
||||||
|
rc = -ENOMEM;
|
||||||
goto gettid_out;
|
goto gettid_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4152,13 +4156,14 @@ int main_loop(struct thread_data_s *my_thread)
|
|||||||
trans.direction = MCEXEC_UP_TRANSFER_TO_REMOTE;
|
trans.direction = MCEXEC_UP_TRANSFER_TO_REMOTE;
|
||||||
|
|
||||||
if (ioctl(fd, MCEXEC_UP_TRANSFER, &trans) != 0) {
|
if (ioctl(fd, MCEXEC_UP_TRANSFER, &trans) != 0) {
|
||||||
|
rc = -EFAULT;
|
||||||
fprintf(stderr, "__NR_gettid(): error transfering TIDs\n");
|
fprintf(stderr, "__NR_gettid(): error transfering TIDs\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
free(tids);
|
free(tids);
|
||||||
}
|
}
|
||||||
gettid_out:
|
gettid_out:
|
||||||
do_syscall_return(fd, cpu, 0, 0, 0, 0, 0);
|
do_syscall_return(fd, cpu, rc, 0, 0, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
ihk
2
ihk
Submodule ihk updated: 8830360da3...a66df50991
@ -106,9 +106,7 @@ struct cpu_local_var {
|
|||||||
ihk_spinlock_t migq_lock;
|
ihk_spinlock_t migq_lock;
|
||||||
struct list_head migq;
|
struct list_head migq;
|
||||||
int in_interrupt;
|
int in_interrupt;
|
||||||
#ifdef ENABLE_FUGAKU_HACKS
|
|
||||||
int in_page_fault;
|
int in_page_fault;
|
||||||
#endif
|
|
||||||
int no_preempt;
|
int no_preempt;
|
||||||
int timer_enabled;
|
int timer_enabled;
|
||||||
unsigned long nr_ctx_switches;
|
unsigned long nr_ctx_switches;
|
||||||
|
|||||||
@ -1395,7 +1395,6 @@ static void page_fault_handler(void *fault_addr, uint64_t reason, void *regs)
|
|||||||
__FUNCTION__, fault_addr, reason, regs);
|
__FUNCTION__, fault_addr, reason, regs);
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
#ifdef ENABLE_FUGAKU_HACKS
|
|
||||||
++cpu_local_var(in_page_fault);
|
++cpu_local_var(in_page_fault);
|
||||||
if (cpu_local_var(in_page_fault) > 1) {
|
if (cpu_local_var(in_page_fault) > 1) {
|
||||||
kprintf("%s: PF in PF??\n", __func__);
|
kprintf("%s: PF in PF??\n", __func__);
|
||||||
@ -1408,7 +1407,6 @@ static void page_fault_handler(void *fault_addr, uint64_t reason, void *regs)
|
|||||||
panic("PANIC");
|
panic("PANIC");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
cpu_enable_interrupt();
|
cpu_enable_interrupt();
|
||||||
|
|
||||||
@ -1475,6 +1473,7 @@ out_linux:
|
|||||||
__func__, thread ? thread->tid : -1, fault_addr,
|
__func__, thread ? thread->tid : -1, fault_addr,
|
||||||
reason, error);
|
reason, error);
|
||||||
unhandled_page_fault(thread, fault_addr, reason, regs);
|
unhandled_page_fault(thread, fault_addr, reason, regs);
|
||||||
|
--cpu_local_var(in_page_fault);
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
|
|
||||||
#ifdef ENABLE_FUGAKU_DEBUG
|
#ifdef ENABLE_FUGAKU_DEBUG
|
||||||
@ -1511,9 +1510,7 @@ out_linux:
|
|||||||
out_ok:
|
out_ok:
|
||||||
#endif
|
#endif
|
||||||
error = 0;
|
error = 0;
|
||||||
#ifdef ENABLE_FUGAKU_HACKS
|
|
||||||
--cpu_local_var(in_page_fault);
|
--cpu_local_var(in_page_fault);
|
||||||
#endif
|
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
out:
|
out:
|
||||||
dkprintf("%s: addr: %p, reason: %lx, regs: %p -> error: %d\n",
|
dkprintf("%s: addr: %p, reason: %lx, regs: %p -> error: %d\n",
|
||||||
|
|||||||
@ -25,9 +25,17 @@ Source0: mckernel-%{version}.tar.gz
|
|||||||
|
|
||||||
Requires: systemd-libs numactl-libs libdwarf
|
Requires: systemd-libs numactl-libs libdwarf
|
||||||
|
|
||||||
# kernel_module_package macro does not handle cross build...
|
# don't use kernel_module_package so that one rpm including .ko and binaries are created
|
||||||
%if "%{?_host_cpu}" == "x86_64" && "%{?_target_cpu}" == "aarch64"
|
%if "%{?_host_cpu}" == "x86_64" && "%{?_target_cpu}" == "aarch64"
|
||||||
%define cross_compile 1
|
%define cross_compile 1
|
||||||
|
%else
|
||||||
|
BuildRequires: systemd-devel numactl-devel binutils-devel kernel-devel libdwarf-devel
|
||||||
|
# Friendly reminder of the fact that kernel-rpm-macros is no longer included in kernel-devel
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
|
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
Requires: kernel >= %{krequires}
|
Requires: kernel >= %{krequires}
|
||||||
%else
|
%else
|
||||||
@ -35,17 +43,6 @@ Requires: kernel = %{krequires}
|
|||||||
%endif
|
%endif
|
||||||
Requires(post): /usr/sbin/depmod
|
Requires(post): /usr/sbin/depmod
|
||||||
Requires(postun): /usr/sbin/depmod
|
Requires(postun): /usr/sbin/depmod
|
||||||
%else
|
|
||||||
BuildRequires: systemd-devel numactl-devel binutils-devel kernel-devel libdwarf-devel
|
|
||||||
# Friendly reminder of the fact that kernel-rpm-macros is no longer included in kernel-devel
|
|
||||||
%if 0%{?rhel} >= 8
|
|
||||||
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel kmod
|
|
||||||
%endif
|
|
||||||
%if %{defined kernel_module_package_buildreqs}
|
|
||||||
BuildRequires: %kernel_module_package_buildreqs
|
|
||||||
%kernel_module_package %{?kmod_flavors}
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Interface for Heterogeneous Kernels and McKernel.
|
Interface for Heterogeneous Kernels and McKernel.
|
||||||
@ -78,6 +75,9 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
|||||||
%{?cmake_libdir:-DCMAKE_INSTALL_LIBDIR=%{cmake_libdir}} \
|
%{?cmake_libdir:-DCMAKE_INSTALL_LIBDIR=%{cmake_libdir}} \
|
||||||
%{?build_target:-DBUILD_TARGET=%{build_target}} \
|
%{?build_target:-DBUILD_TARGET=%{build_target}} \
|
||||||
%{?toolchain_file:-DCMAKE_TOOLCHAIN_FILE=%{toolchain_file}} \
|
%{?toolchain_file:-DCMAKE_TOOLCHAIN_FILE=%{toolchain_file}} \
|
||||||
|
-DENABLE_TOFU=ON -DENABLE_FUGAKU_HACKS=ON \
|
||||||
|
-DENABLE_KRM_WORKAROUND=OFF -DWITH_KRM=ON \
|
||||||
|
-DENABLE_FUGAKU_DEBUG=OFF \
|
||||||
.
|
.
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
@ -113,7 +113,6 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
|||||||
%{_mandir}/man1/ihkosctl.1.gz
|
%{_mandir}/man1/ihkosctl.1.gz
|
||||||
%{_mandir}/man1/mcexec.1.gz
|
%{_mandir}/man1/mcexec.1.gz
|
||||||
|
|
||||||
%if 0%{?cross_compile}
|
|
||||||
/lib/modules/%{kernel_version}/extra/mckernel/ihk.ko
|
/lib/modules/%{kernel_version}/extra/mckernel/ihk.ko
|
||||||
/lib/modules/%{kernel_version}/extra/mckernel/mcctrl.ko
|
/lib/modules/%{kernel_version}/extra/mckernel/mcctrl.ko
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
@ -122,7 +121,6 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
|||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
/lib/modules/%{kernel_version}/extra/mckernel/ihk-smp-arm64.ko
|
/lib/modules/%{kernel_version}/extra/mckernel/ihk-smp-arm64.ko
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/ihklib.h
|
%{_includedir}/ihklib.h
|
||||||
@ -135,8 +133,7 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
|||||||
%{_includedir}/ihk/ihk_host_driver.h
|
%{_includedir}/ihk/ihk_host_driver.h
|
||||||
/lib/modules/%{kernel_version}/extra/mckernel/ihk/linux/core/Module.symvers
|
/lib/modules/%{kernel_version}/extra/mckernel/ihk/linux/core/Module.symvers
|
||||||
|
|
||||||
%if 0%{?cross_compile}
|
# taken from /usr/lib/rpm/redhat/kmodtool (kernel_module_package)
|
||||||
# scripts from /usr/lib/rpm/redhat/kmodtool (kernel_module_package) as well
|
|
||||||
%post
|
%post
|
||||||
if [ -e "/boot/System.map-%{kernel_version}" ]; then
|
if [ -e "/boot/System.map-%{kernel_version}" ]; then
|
||||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kernel_version}" "%{kernel_version}" > /dev/null || :
|
/usr/sbin/depmod -aeF "/boot/System.map-%{kernel_version}" "%{kernel_version}" > /dev/null || :
|
||||||
@ -162,7 +159,6 @@ if [ -x "/sbin/weak-modules" ]; then
|
|||||||
printf '%s\n' "${modules[@]}" \
|
printf '%s\n' "${modules[@]}" \
|
||||||
| /sbin/weak-modules --remove-modules
|
| /sbin/weak-modules --remove-modules
|
||||||
fi
|
fi
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Feb 12 2019 Dominique Martinet <dominique.martinet@cea.fr> - 1.6.0-0
|
* Tue Feb 12 2019 Dominique Martinet <dominique.martinet@cea.fr> - 1.6.0-0
|
||||||
|
|||||||
Reference in New Issue
Block a user