Skip to content

Commit

Permalink
ihklib: Per-command functions
Browse files Browse the repository at this point in the history
1. Replace ihkosctl() and ihkconfig() functions with per-command
   functions
2. Add /proc, /sys preparation function
3. Add ioctl() commands (e.g. IHK_OS_DETECT_HUNGUP)
4. Rename some ihkconfig/ihkosctl commands
5. Merge two ihk_os_makedumpfile() implementations into one
  • Loading branch information
masamichitakagi committed Sep 19, 2017
1 parent 443c6e6 commit a3404e9
Show file tree
Hide file tree
Showing 23 changed files with 1,758 additions and 2,073 deletions.
6 changes: 4 additions & 2 deletions cokernel/smp/x86/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ unsigned long bootstrap_mem_end;
static int boot_param_size;

extern void main(void);
extern void setup_x86(void);
extern void setup_x86_phase1(void);
extern void setup_x86_phase2(void);
extern void init_boot_processor_local(void);
extern struct ihk_kmsg_buf kmsg_buf;
extern int no_turbo;
Expand Down Expand Up @@ -105,7 +106,8 @@ void arch_init(void)
no_turbo = 0;
}

setup_x86();
setup_x86_phase1();
setup_x86_phase2();
kprintf("boot_param_size: %lu\n", boot_param_size);

/* Remap boot parameter structure */
Expand Down
84 changes: 72 additions & 12 deletions linux/user/config.h.in → config.h.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
/* linux/driver/smp-x86/config.h.in. Generated from configure.ac by autoheader. */

/* whether rusage is enabled */
#undef ENABLE_RUSAGE
/* config.h.in. Generated from configure.ac by autoheader. */

/* whether memdump feature is enabled */
#undef ENABLE_MEMDUMP

/* whether rusage is enabled */
#undef ENABLE_RUSAGE

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the `bfd' library (-lbfd). */
#undef HAVE_LIBBFD

/* Define to 1 if you have the `iberty' library (-liberty). */
#undef HAVE_LIBIBERTY

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

Expand All @@ -36,32 +39,83 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define to address of kernel symbol _cpu_up, or 0 if exported */
#undef IHK_KSYM__cpu_up
/* Define to address of kernel symbol __cpu_logical_map, or 0 if exported */
#undef IHK_KSYM___cpu_logical_map

/* Define to address of kernel symbol __default_send_IPI_dest_field, or 0 if
exported */
#undef IHK_KSYM___default_send_IPI_dest_field

/* Define to address of kernel symbol __invoke_psci_fn_hvc, or 0 if exported
*/
#undef IHK_KSYM___invoke_psci_fn_hvc

/* Define to address of kernel symbol __invoke_psci_fn_smc, or 0 if exported
*/
#undef IHK_KSYM___invoke_psci_fn_smc

/* Define to address of kernel symbol __irq_domain_alloc_irqs, or 0 if
exported */
#undef IHK_KSYM___irq_domain_alloc_irqs

/* Define to address of kernel symbol __irq_set_affinity, or 0 if exported */
#undef IHK_KSYM___irq_set_affinity

/* Define to address of kernel symbol __oprofile_cpu_pmu, or 0 if exported */
#undef IHK_KSYM___oprofile_cpu_pmu

/* Define to address of kernel symbol acpi_gic_ver, or 0 if exported */
#undef IHK_KSYM_acpi_gic_ver

/* Define to address of kernel symbol alloc_desc, or 0 if exported */
#undef IHK_KSYM_alloc_desc

/* Define to address of kernel symbol cpu_hotplug_driver_lock, or 0 if
exported */
#undef IHK_KSYM_cpu_hotplug_driver_lock
/* Define to address of kernel symbol arch_timer_rate, or 0 if exported */
#undef IHK_KSYM_arch_timer_rate

/* Define to address of kernel symbol cpu_hotplug_driver_unlock, or 0 if
exported */
#undef IHK_KSYM_cpu_hotplug_driver_unlock
/* Define to address of kernel symbol arch_timer_use_virtual, or 0 if exported
*/
#undef IHK_KSYM_arch_timer_use_virtual

/* Define to address of kernel symbol arch_timer_uses_ppi, or 0 if exported */
#undef IHK_KSYM_arch_timer_uses_ppi

/* Define to address of kernel symbol cpu_pmu, or 0 if exported */
#undef IHK_KSYM_cpu_pmu

/* Define to address of kernel symbol dummy_irq_chip, or 0 if exported */
#undef IHK_KSYM_dummy_irq_chip

/* Define to address of kernel symbol get_uv_system_type, or 0 if exported */
#undef IHK_KSYM_get_uv_system_type

/* Define to address of kernel symbol gic_data_gicv2, or 0 if exported */
#undef IHK_KSYM_gic_data_gicv2

/* Define to address of kernel symbol gic_data_gicv3, or 0 if exported */
#undef IHK_KSYM_gic_data_gicv3

/* Define to address of kernel symbol gic_raise_softirq_gicv2, or 0 if
exported */
#undef IHK_KSYM_gic_raise_softirq_gicv2

/* Define to address of kernel symbol gic_raise_softirq_gicv3, or 0 if
exported */
#undef IHK_KSYM_gic_raise_softirq_gicv3

/* Define to address of kernel symbol init_deasserted, or 0 if exported */
#undef IHK_KSYM_init_deasserted

/* Define to address of kernel symbol invoke_psci_fn, or 0 if exported */
#undef IHK_KSYM_invoke_psci_fn

/* Define to address of kernel symbol irq_desc_tree, or 0 if exported */
#undef IHK_KSYM_irq_desc_tree

/* Define to address of kernel symbol irq_domain_free_irqs, or 0 if exported
*/
#undef IHK_KSYM_irq_domain_free_irqs

/* Define to address of kernel symbol irq_to_desc, or 0 if exported */
#undef IHK_KSYM_irq_to_desc

Expand All @@ -75,6 +129,9 @@
/* Define to address of kernel symbol per_cpu__vector_irq, or 0 if exported */
#undef IHK_KSYM_per_cpu__vector_irq

/* Define to address of kernel symbol psci_ops, or 0 if exported */
#undef IHK_KSYM_psci_ops

/* Define to address of kernel symbol real_mode_header, or 0 if exported */
#undef IHK_KSYM_real_mode_header

Expand All @@ -85,6 +142,9 @@
exported */
#undef IHK_KSYM_wakeup_secondary_cpu_via_init

/* Define to address of kernel symbol x86_trampoline_base, or 0 if exported */
#undef IHK_KSYM_x86_trampoline_base

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

Expand Down
16 changes: 6 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# configure COPYRIGHT FUJITSU LIMITED 2015-2017

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
Expand Down Expand Up @@ -5005,15 +5004,14 @@ fi

case "$TARGET" in
smp*)
ac_config_headers="$ac_config_headers linux/driver/smp/config.h linux/user/config.h"

arch=`echo "$TARGET" | sed -e 's/smp-//'`
ac_config_headers="$ac_config_headers linux/driver/smp/arch/$arch/config-$arch.h"
ac_config_headers="$ac_config_headers config.h"

# arch=`echo "$TARGET" | sed -e 's/smp-//'`
# AC_CONFIG_HEADERS([linux/driver/smp/arch/$arch/config-$arch.h])
;;
esac

ac_config_files="$ac_config_files Makefile linux/core/Makefile linux/core/Makefile.module linux/core/Makefile.builtin ikc/Makefile linux/user/Makefile linux/driver/builtin/Makefile linux/driver/smp/Makefile linux/driver/attached/mic/Makefile linux/user/ihkconfig.1:linux/user/ihkconfig.1in linux/user/ihkosctl.1:linux/user/ihkosctl.1in linux/user/ihklib.h:linux/user/ihklib.h.in cokernel/Makefile.common"
ac_config_files="$ac_config_files Makefile linux/core/Makefile linux/core/Makefile.module linux/core/Makefile.builtin ikc/Makefile linux/user/Makefile linux/driver/builtin/Makefile linux/driver/smp/Makefile linux/driver/attached/mic/Makefile linux/user/ihkconfig.1:linux/user/ihkconfig.1in linux/user/ihkosctl.1:linux/user/ihkosctl.1in linux/include/ihk/ihklib.h:linux/include/ihk/ihklib.h.in cokernel/Makefile.common"


if test "$TARGET" = "smp-arm64"; then
Expand Down Expand Up @@ -5710,9 +5708,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"linux/driver/smp/config.h") CONFIG_HEADERS="$CONFIG_HEADERS linux/driver/smp/config.h" ;;
"linux/user/config.h") CONFIG_HEADERS="$CONFIG_HEADERS linux/user/config.h" ;;
"linux/driver/smp/arch/$arch/config-$arch.h") CONFIG_HEADERS="$CONFIG_HEADERS linux/driver/smp/arch/$arch/config-$arch.h" ;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"linux/core/Makefile") CONFIG_FILES="$CONFIG_FILES linux/core/Makefile" ;;
"linux/core/Makefile.module") CONFIG_FILES="$CONFIG_FILES linux/core/Makefile.module" ;;
Expand All @@ -5724,7 +5720,7 @@ do
"linux/driver/attached/mic/Makefile") CONFIG_FILES="$CONFIG_FILES linux/driver/attached/mic/Makefile" ;;
"linux/user/ihkconfig.1") CONFIG_FILES="$CONFIG_FILES linux/user/ihkconfig.1:linux/user/ihkconfig.1in" ;;
"linux/user/ihkosctl.1") CONFIG_FILES="$CONFIG_FILES linux/user/ihkosctl.1:linux/user/ihkosctl.1in" ;;
"linux/user/ihklib.h") CONFIG_FILES="$CONFIG_FILES linux/user/ihklib.h:linux/user/ihklib.h.in" ;;
"linux/include/ihk/ihklib.h") CONFIG_FILES="$CONFIG_FILES linux/include/ihk/ihklib.h:linux/include/ihk/ihklib.h.in" ;;
"cokernel/Makefile.common") CONFIG_FILES="$CONFIG_FILES cokernel/Makefile.common" ;;
"cokernel/smp/arm64/Makefile.predefines") CONFIG_FILES="$CONFIG_FILES cokernel/smp/arm64/Makefile.predefines" ;;
"cokernel/smp/arm64/Makefile.config") CONFIG_FILES="$CONFIG_FILES cokernel/smp/arm64/Makefile.config" ;;
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ AC_SUBST(uncomment_if_ENABLE_MEMDUMP)

case "$TARGET" in
smp*)
AC_CONFIG_HEADERS([linux/driver/smp/config.h linux/user/config.h])
arch=`echo "$TARGET" | sed -e 's/smp-//'`
AC_CONFIG_HEADERS([linux/driver/smp/arch/$arch/config-$arch.h])
AC_CONFIG_HEADERS([config.h])
# arch=`echo "$TARGET" | sed -e 's/smp-//'`
# AC_CONFIG_HEADERS([linux/driver/smp/arch/$arch/config-$arch.h])
;;
esac

Expand All @@ -427,7 +427,7 @@ AC_CONFIG_FILES([
linux/driver/attached/mic/Makefile
linux/user/ihkconfig.1:linux/user/ihkconfig.1in
linux/user/ihkosctl.1:linux/user/ihkosctl.1in
linux/user/ihklib.h:linux/user/ihklib.h.in
linux/include/ihk/ihklib.h:linux/include/ihk/ihklib.h.in
cokernel/Makefile.common
])

Expand Down
Loading

0 comments on commit a3404e9

Please sign in to comment.