pass-hal: tw3: Rename files and functions 35/202835/1 accepted/tizen/unified/20190407.223135 submit/tizen/20190405.073541
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 25 Mar 2019 05:59:40 +0000 (14:59 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 5 Apr 2019 01:53:59 +0000 (10:53 +0900)
This patch renames files and functions which including tw2 to
those of tw3.

Change-Id: Ic7f74877ed7cbbc89d7e970443a977c1be0cd71f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
CMakeLists.txt
packaging/pass-hal-tw2.manifest [deleted file]
packaging/pass-hal-tw2.spec [deleted file]
packaging/pass-hal-tw3.manifest [new file with mode: 0644]
packaging/pass-hal-tw3.spec [new file with mode: 0644]
src/cpu/cpu.c
src/memory/memory.c
src/nonstandard/nonstandard.c

index 57e1e73a038593f894ea976f93c25ce27a0f32b1..63a158db12766a7148ac074e64c9b2de08673710 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(pass-hal-tw2 C)
+PROJECT(pass-hal-tw3 C)
 
 SET(CMAKE_VERBOSE_MAKEFILE ON)
 
diff --git a/packaging/pass-hal-tw2.manifest b/packaging/pass-hal-tw2.manifest
deleted file mode 100644 (file)
index 75b0fa5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-    <request>
-        <domain name="_"/>
-    </request>
-</manifest>
diff --git a/packaging/pass-hal-tw2.spec b/packaging/pass-hal-tw2.spec
deleted file mode 100644 (file)
index b2266d1..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-%define version 1.0.0
-%define release 1
-
-Name:       pass-hal-tw2
-Summary:    PASS hal for tw2
-Version:    %{version}
-Release:    %{release}
-Group:      System/Hardware Adaptation
-License:    Apache-2.0
-Source0:    %{name}-%{version}.tar.gz
-Source1:    %{name}.manifest
-
-ExclusiveArch: %{arm}
-
-Requires(post): /sbin/ldconfig
-Requires(post): /bin/systemctl
-Requires(post): security-config
-Requires(postun): /sbin/ldconfig
-Requires(postun): /bin/systemctl
-Requires: pass >= 1.0.0
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:         pkgconfig(pass-hal-devel)
-
-%description
-PASS hal for tw2
-
-%prep
-%setup -q
-cp %{SOURCE1} .
-
-%build
-%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAL_VERSION=%{version}.%{release}
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-
-%make_install
-
-%post
-/sbin/ldconfig
-systemd-tmpfiles %{_libdir}/tmpfiles.d/pass-hal.conf --create
-if [ -f %{_unitdir}/pass.service ]; then
-       systemctl try-restart pass.service
-fi
-
-%postun
-/sbin/ldconfig
-if [ -f %{_unitdir}/pass.service ]; then
-       systemctl try-restart pass.service
-fi
-
-%files
-%manifest %{name}.manifest
-%{_libdir}/pass/*.so
-%{_libdir}/tmpfiles.d/pass-hal.conf
-%config %{_sysconfdir}/pass/pass.conf
-%config %{_sysconfdir}/pass/pass-resource0.conf
-%config %{_sysconfdir}/pass/pass-resource1.conf
-%config %{_sysconfdir}/pass/pass-resource2.conf
diff --git a/packaging/pass-hal-tw3.manifest b/packaging/pass-hal-tw3.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/pass-hal-tw3.spec b/packaging/pass-hal-tw3.spec
new file mode 100644 (file)
index 0000000..d4c86e6
--- /dev/null
@@ -0,0 +1,63 @@
+%define version 1.0.0
+%define release 1
+
+Name:       pass-hal-tw3
+Summary:    PASS hal for tw3
+Version:    %{version}
+Release:    %{release}
+Group:      System/Hardware Adaptation
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+Source1:    %{name}.manifest
+
+ExclusiveArch: %{arm}
+
+Requires(post): /sbin/ldconfig
+Requires(post): /bin/systemctl
+Requires(post): security-config
+Requires(postun): /sbin/ldconfig
+Requires(postun): /bin/systemctl
+Requires: pass >= 1.0.0
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:         pkgconfig(pass-hal-devel)
+
+%description
+PASS hal for tw3
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAL_VERSION=%{version}.%{release}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+
+%post
+/sbin/ldconfig
+systemd-tmpfiles %{_libdir}/tmpfiles.d/pass-hal.conf --create
+if [ -f %{_unitdir}/pass.service ]; then
+       systemctl try-restart pass.service
+fi
+
+%postun
+/sbin/ldconfig
+if [ -f %{_unitdir}/pass.service ]; then
+       systemctl try-restart pass.service
+fi
+
+%files
+%manifest %{name}.manifest
+%{_libdir}/pass/*.so
+%{_libdir}/tmpfiles.d/pass-hal.conf
+%config %{_sysconfdir}/pass/pass.conf
+%config %{_sysconfdir}/pass/pass-resource0.conf
+%config %{_sysconfdir}/pass/pass-resource1.conf
+%config %{_sysconfdir}/pass/pass-resource2.conf
index 33d7cfa9baecd72535e6cc8fd7272e8b16e7e034..3eea31d5bc7e4b8d1399c5c4ee12ac9fd7b48cd5 100644 (file)
@@ -42,7 +42,7 @@
 
 #define CPUFREQ_PMQOS_REQUEST_UNLOCK           -1
 
-static int tw2_dvfs_get_curr_freq(char *res_name)
+static int tw3_dvfs_get_curr_freq(char *res_name)
 {
        char path[PATH_MAX];
        int freq, ret;
@@ -62,7 +62,7 @@ static int tw2_dvfs_get_curr_freq(char *res_name)
        return freq;
 }
 
-static int tw2_dvfs_get_min_freq(char *res_name)
+static int tw3_dvfs_get_min_freq(char *res_name)
 {
        char path[PATH_MAX];
        int min_freq;
@@ -82,7 +82,7 @@ static int tw2_dvfs_get_min_freq(char *res_name)
        return min_freq;
 }
 
-static int tw2_dvfs_set_min_freq(char *res_name, int freq)
+static int tw3_dvfs_set_min_freq(char *res_name, int freq)
 {
        char path[PATH_MAX];
        int ret;
@@ -101,7 +101,7 @@ static int tw2_dvfs_set_min_freq(char *res_name, int freq)
        return 0;
 }
 
-static int tw2_dvfs_get_max_freq(char *res_name)
+static int tw3_dvfs_get_max_freq(char *res_name)
 {
        char path[PATH_MAX];
        int max_freq;
@@ -121,7 +121,7 @@ static int tw2_dvfs_get_max_freq(char *res_name)
        return max_freq;
 }
 
-static int tw2_dvfs_set_max_freq(char *res_name, int freq)
+static int tw3_dvfs_set_max_freq(char *res_name, int freq)
 {
        char path[PATH_MAX];
        int ret;
@@ -140,21 +140,21 @@ static int tw2_dvfs_set_max_freq(char *res_name, int freq)
        return 0;
 }
 
-static struct pass_resource_dvfs_ops tw2_cpu_dvfs_ops =  {
+static struct pass_resource_dvfs_ops tw3_cpu_dvfs_ops =  {
        .get_curr_governor = NULL,
        .set_curr_governor = NULL,
        .get_avail_governor = NULL,
-       .get_curr_freq = tw2_dvfs_get_curr_freq,
-       .get_min_freq = tw2_dvfs_get_min_freq,
-       .set_min_freq = tw2_dvfs_set_min_freq,
-       .get_max_freq = tw2_dvfs_get_max_freq,
-       .set_max_freq = tw2_dvfs_set_max_freq,
+       .get_curr_freq = tw3_dvfs_get_curr_freq,
+       .get_min_freq = tw3_dvfs_get_min_freq,
+       .set_min_freq = tw3_dvfs_set_min_freq,
+       .get_max_freq = tw3_dvfs_get_max_freq,
+       .set_max_freq = tw3_dvfs_set_max_freq,
        .get_up_threshold = NULL,
        .set_up_threshold = NULL,
        .get_load_table = NULL,
 };
 
-static int tw2_hotplug_get_online_min_num(char *res_name)
+static int tw3_hotplug_get_online_min_num(char *res_name)
 {
        char path[PATH_MAX];
        int online_min_num;
@@ -174,7 +174,7 @@ static int tw2_hotplug_get_online_min_num(char *res_name)
        return online_min_num;
 }
 
-static int tw2_hotplug_set_online_min_num(char *res_name, int num)
+static int tw3_hotplug_set_online_min_num(char *res_name, int num)
 {
        char path[PATH_MAX];
        int ret;
@@ -194,7 +194,7 @@ static int tw2_hotplug_set_online_min_num(char *res_name, int num)
        return 0;
 }
 
-static int tw2_hotplug_get_online_max_num(char *res_name)
+static int tw3_hotplug_get_online_max_num(char *res_name)
 {
        char path[PATH_MAX];
        int online_max_num;
@@ -214,7 +214,7 @@ static int tw2_hotplug_get_online_max_num(char *res_name)
        return online_max_num;
 }
 
-static int tw2_hotplug_set_online_max_num(char *res_name, int num)
+static int tw3_hotplug_set_online_max_num(char *res_name, int num)
 {
        char path[PATH_MAX];
        int ret;
@@ -233,16 +233,16 @@ static int tw2_hotplug_set_online_max_num(char *res_name, int num)
 
        return 0;
 }
-static struct pass_resource_hotplug_ops tw2_cpu_hotplug_ops = {
+static struct pass_resource_hotplug_ops tw3_cpu_hotplug_ops = {
        .get_online_state = NULL,
        .set_online_state = NULL,
-       .get_online_min_num = tw2_hotplug_get_online_min_num,
-       .set_online_min_num = tw2_hotplug_set_online_min_num,
-       .get_online_max_num = tw2_hotplug_get_online_max_num,
-       .set_online_max_num = tw2_hotplug_set_online_max_num,
+       .get_online_min_num = tw3_hotplug_get_online_min_num,
+       .set_online_min_num = tw3_hotplug_set_online_min_num,
+       .get_online_max_num = tw3_hotplug_get_online_max_num,
+       .set_online_max_num = tw3_hotplug_set_online_max_num,
 };
 
-static int tw2_cpu_get_temp(char *res_thermal_name)
+static int tw3_cpu_get_temp(char *res_thermal_name)
 {
        char path[PATH_MAX + 1];
        char buf[PATH_MAX + 1];
@@ -268,12 +268,12 @@ static int tw2_cpu_get_temp(char *res_thermal_name)
        return temp;
 }
 
-static struct pass_resource_tmu_ops tw2_cpu_tmu_ops = {
-       .get_temp = tw2_cpu_get_temp,
+static struct pass_resource_tmu_ops tw3_cpu_tmu_ops = {
+       .get_temp = tw3_cpu_get_temp,
        .get_policy = NULL,
 };
 
-static int tw2_cpu_open(char *res_name, struct pass_resource_info *info,
+static int tw3_cpu_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_cpu *cpu_res;
@@ -287,16 +287,16 @@ static int tw2_cpu_open(char *res_name, struct pass_resource_info *info,
                return -ENOMEM;
 
        cpu_res->common.info = info;
-       cpu_res->dvfs = tw2_cpu_dvfs_ops;
-       cpu_res->hotplug = tw2_cpu_hotplug_ops;
-       cpu_res->tmu = tw2_cpu_tmu_ops;
+       cpu_res->dvfs = tw3_cpu_dvfs_ops;
+       cpu_res->hotplug = tw3_cpu_hotplug_ops;
+       cpu_res->tmu = tw3_cpu_tmu_ops;
 
        *common = (struct pass_resource_common *) cpu_res;
 
        return 0;
 }
 
-static int tw2_cpu_close(char *res_name, struct pass_resource_common *common)
+static int tw3_cpu_close(char *res_name, struct pass_resource_common *common)
 {
        struct pass_resource_cpu *cpu_res;
        int ret = 0;
@@ -307,7 +307,7 @@ static int tw2_cpu_close(char *res_name, struct pass_resource_common *common)
        cpu_res = (struct pass_resource_cpu *) common;
 
        /*
-        * tw2 has weird pmqos sysfs node, thus we cannot apply save/restore
+        * tw3 has weird pmqos sysfs node, thus we cannot apply save/restore
         * feature as pass-hal-standard does. Instead of using standard
         * interface, we manually restore the each resource state; pmqos
         * request is unlocked by passing argument '-1' first, and resource
@@ -357,6 +357,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_CPU_ID,
        .name = PASS_RESOURCE_CPU_NAME,
-       .open = tw2_cpu_open,
-       .close = tw2_cpu_close,
+       .open = tw3_cpu_open,
+       .close = tw3_cpu_close,
 };
index 997a2d5990a3f087e68404aab2fa7b632f8b719c..c4705011bca269e693dffa2b16424c0755be79f9 100644 (file)
@@ -27,7 +27,7 @@
 
 #define FAULT_AROUND_BYTES_PATH                "/sys/kernel/debug/fault_around_bytes"
 
-static int tw2_memory_get_fault_around_bytes(char *res_name)
+static int tw3_memory_get_fault_around_bytes(char *res_name)
 {
        int ret, fault_around_bytes;
 
@@ -41,7 +41,7 @@ static int tw2_memory_get_fault_around_bytes(char *res_name)
        return fault_around_bytes;
 }
 
-static int tw2_memory_set_fault_around_bytes(char *res_name,
+static int tw3_memory_set_fault_around_bytes(char *res_name,
                                                int fault_around_bytes)
 {
        int ret;
@@ -56,7 +56,7 @@ static int tw2_memory_set_fault_around_bytes(char *res_name,
        return 0;
 }
 
-static int tw2_memory_open(char *res_name, struct pass_resource_info *info,
+static int tw3_memory_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_memory *res;
@@ -69,15 +69,15 @@ static int tw2_memory_open(char *res_name, struct pass_resource_info *info,
                return -ENOMEM;
 
        res->common.info = info;
-       res->get_fault_around_bytes = tw2_memory_get_fault_around_bytes;
-       res->set_fault_around_bytes = tw2_memory_set_fault_around_bytes;
+       res->get_fault_around_bytes = tw3_memory_get_fault_around_bytes;
+       res->set_fault_around_bytes = tw3_memory_set_fault_around_bytes;
 
        *common = (struct pass_resource_common *)res;
 
        return 0;
 }
 
-static int tw2_memory_close(char *res_name, struct pass_resource_common *common)
+static int tw3_memory_close(char *res_name, struct pass_resource_common *common)
 {
        if (!common)
                return -EINVAL;
@@ -91,6 +91,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_MEMORY_ID,
        .name = PASS_RESOURCE_MEMORY_NAME,
-       .open = tw2_memory_open,
-       .close = tw2_memory_close,
+       .open = tw3_memory_open,
+       .close = tw3_memory_close,
 };
index a897cb7f5f40b07ca40cc3d3c86cf23f2920f03d..0aa620ade5b493db5b653f41fc0f3eb0cf345300 100644 (file)
@@ -31,7 +31,7 @@
 
 #define SCENARIO_INFO_SOCKET_PATH      "/dev/socket/scenario_info"
 
-static int tw2_set_pmqos_data(char *res_name, void *data)
+static int tw3_set_pmqos_data(char *res_name, void *data)
 {
        struct sockaddr_un addr;
        int socket_fd, ret;
@@ -65,10 +65,10 @@ static int tw2_set_pmqos_data(char *res_name, void *data)
        return ret;
 }
 
-static int tw2_set_pmqos_data_nop(char *res_name, void *data)
+static int tw3_set_pmqos_data_nop(char *res_name, void *data)
 {
        /*
-        * The tw2_set_pmqos_data function is required to send the PMQoS
+        * The tw3_set_pmqos_data function is required to send the PMQoS
         * scenario information to the socket interface of the TRM and it
         * is optional, which means that this HAL for nonstandard should work
         * without TRM. For this reason, if there is no unix domain socket file
@@ -78,7 +78,7 @@ static int tw2_set_pmqos_data_nop(char *res_name, void *data)
        return 0;
 }
 
-static int tw2_nonstandard_open(char *res_name, struct pass_resource_info *info,
+static int tw3_nonstandard_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_nonstandard *nonstandard_res;
@@ -96,16 +96,16 @@ static int tw2_nonstandard_open(char *res_name, struct pass_resource_info *info,
 
        ret = access(SCENARIO_INFO_SOCKET_PATH, F_OK);
        if (!ret)
-               nonstandard_res->set_pmqos_data = tw2_set_pmqos_data;
+               nonstandard_res->set_pmqos_data = tw3_set_pmqos_data;
        else
-               nonstandard_res->set_pmqos_data = tw2_set_pmqos_data_nop;
+               nonstandard_res->set_pmqos_data = tw3_set_pmqos_data_nop;
 
        *common = (struct pass_resource_common *) nonstandard_res;
 
        return 0;
 }
 
-static int tw2_nonstandard_close(char *res_name, struct pass_resource_common *common)
+static int tw3_nonstandard_close(char *res_name, struct pass_resource_common *common)
 {
        if (!res_name || !common)
                return -EINVAL;
@@ -119,6 +119,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_NONSTANDARD_ID,
        .name = PASS_RESOURCE_NONSTANDARD_NAME,
-       .open = tw2_nonstandard_open,
-       .close = tw2_nonstandard_close,
+       .open = tw3_nonstandard_open,
+       .close = tw3_nonstandard_close,
 };