Home
last modified time | relevance | path

Searched full:if (Results 1 – 25 of 343) sorted by relevance

12345678910>>...14

/kvm-unit-tests/lib/libfdt/
H A Dfdt_ro.c19 if (!p || olen < len) in fdt_nodename_eq_()
23 if (memcmp(p, s, len) != 0) in fdt_nodename_eq_()
26 if (p[len] == '\0') in fdt_nodename_eq_()
28 else if (!memchr(s, '@', len) && (p[len] == '@')) in fdt_nodename_eq_()
42 if (can_assume(VALID_INPUT)) { in fdt_get_string()
45 if (lenp) in fdt_get_string()
51 if (totalsize < 0) in fdt_get_string()
56 if (absoffset >= (unsigned)totalsize) in fdt_get_string()
60 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_get_string()
61 if (stroffset < 0) in fdt_get_string()
[all …]
H A Dfdt.c22 if (can_assume(VALID_DTB)) in fdt_ro_probe_()
26 if ((uintptr_t)fdt & 7) in fdt_ro_probe_()
29 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_ro_probe_()
31 if (!can_assume(LATEST)) { in fdt_ro_probe_()
32 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION) in fdt_ro_probe_()
34 if (fdt_last_comp_version(fdt) > in fdt_ro_probe_()
38 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) { in fdt_ro_probe_()
40 if (!can_assume(VALID_INPUT) && fdt_size_dt_struct(fdt) == 0) in fdt_ro_probe_()
46 if (totalsize < INT32_MAX) in fdt_ro_probe_()
60 if (!check_off_(hdrsize, totalsize, base)) in check_block_()
[all …]
H A Dfdt_overlay.c25 * 0, if the phandle was not found
26 * -1, if the phandle was malformed
34 if (!val) in overlay_get_target_phandle()
37 if ((len != sizeof(*val)) || (fdt32_to_cpu(*val) == (uint32_t)-1)) in overlay_get_target_phandle()
67 if (phandle == (uint32_t)-1) in overlay_get_target()
71 if (!phandle) { in overlay_get_target()
74 if (path) in overlay_get_target()
82 * If we haven't found either a target or a in overlay_get_target()
88 if (ret < 0 && path_len == -FDT_ERR_NOTFOUND) in overlay_get_target()
92 if (ret < 0) in overlay_get_target()
[all …]
H A Dfdt_check.c24 if (bufsize < FDT_V1_SIZE) in fdt_check_full()
26 if (bufsize < fdt_header_size(fdt)) in fdt_check_full()
29 if (err != 0) in fdt_check_full()
31 if (bufsize < fdt_totalsize(fdt)) in fdt_check_full()
35 if (num_memrsv < 0) in fdt_check_full()
42 if (nextoffset < 0) in fdt_check_full()
45 /* If we see two root nodes, something is wrong */ in fdt_check_full()
46 if (expect_end && tag != FDT_END) in fdt_check_full()
54 if (depth != 0) in fdt_check_full()
60 if (depth > INT_MAX) in fdt_check_full()
[all …]
H A Dfdt_rw.c27 if (can_assume(VALID_DTB)) in fdt_rw_probe_()
31 if (!can_assume(LATEST) && fdt_version(fdt) < 17) in fdt_rw_probe_()
33 if (fdt_blocks_misordered_(fdt, sizeof(struct fdt_reserve_entry), in fdt_rw_probe_()
36 if (!can_assume(LATEST) && fdt_version(fdt) > 17) in fdt_rw_probe_()
45 if ((err_ = fdt_rw_probe_(fdt)) != 0) \
60 if ((oldlen < 0) || (soff + oldlen < soff) || (soff + oldlen > dsize)) in fdt_splice_()
62 if ((p < (char *)fdt) || (dsize + newlen < (unsigned)oldlen)) in fdt_splice_()
64 if (dsize - oldlen + newlen > fdt_totalsize(fdt)) in fdt_splice_()
76 if (err) in fdt_splice_mem_rsv_()
89 if ((err = fdt_splice_(fdt, p, oldlen, newlen))) in fdt_splice_struct_()
[all …]
H A Dfdt_addresses.c21 if (!c) in fdt_cells()
24 if (len != sizeof(*c)) in fdt_cells()
28 if (val > FDT_MAX_NCELLS) in fdt_cells()
39 if (val == 0) in fdt_address_cells()
41 if (val == -FDT_ERR_NOTFOUND) in fdt_address_cells()
51 if (val == -FDT_ERR_NOTFOUND) in fdt_size_cells()
64 if (ret < 0) in fdt_appendprop_addrrange()
69 if (ret < 0) in fdt_appendprop_addrrange()
75 if (addr_cells == 1) { in fdt_appendprop_addrrange()
76 if ((addr > UINT32_MAX) || ((UINT32_MAX + 1 - addr) < size)) in fdt_appendprop_addrrange()
[all …]
H A Dfdt_sw.c15 if (!can_assume(VALID_INPUT)) { in fdt_sw_probe_()
16 if (fdt_magic(fdt) == FDT_MAGIC) in fdt_sw_probe_()
18 else if (fdt_magic(fdt) != FDT_SW_MAGIC) in fdt_sw_probe_()
28 if ((err = fdt_sw_probe_(fdt)) != 0) \
41 if (err) in fdt_sw_probe_memrsv_()
44 if (!can_assume(VALID_INPUT) && fdt_off_dt_strings(fdt) != 0) in fdt_sw_probe_memrsv_()
52 if ((err = fdt_sw_probe_memrsv_(fdt)) != 0) \
67 if (err) in fdt_sw_probe_struct_()
70 if (!can_assume(VALID_INPUT) && in fdt_sw_probe_struct_()
79 if ((err = fdt_sw_probe_struct_(fdt)) != 0) \
[all …]
/kvm-unit-tests/arm/
H A Drun3 if [ -z "$KUT_STANDALONE" ]; then
4 if [ ! -f config.mak ]; then
13 if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
20 if [ "$ACCEL" = "kvm" ]; then
27 if ! $qemu -machine '?' | grep -q 'ARM Virtual Machine'; then
34 if [ "$ACCEL" = "kvm" ]; then
35 if $qemu $M,\? | grep -q gic-version; then
40 if [ -z "$qemu_cpu" ]; then
41 if ( [ "$ACCEL" = "kvm" ] || [ "$ACCEL" = "hvf" ] ) &&
44 if [ "$ARCH" = "arm" ] && [ "$HOST" = "aarch64" ]; then
[all …]
H A Dpsci.c115 if (cpu < 2) in psci_cpu_on_test()
140 if (cpumask_full(&cpu_on_done)) in psci_cpu_on_test()
144 if (!cpumask_full(&cpu_on_done)) { in psci_cpu_on_test()
146 if (!cpumask_test_cpu(cpu, &cpu_on_done)) { in psci_cpu_on_test()
147 if (cpu == 1) in psci_cpu_on_test()
157 if (cpu == 1) in psci_cpu_on_test()
159 if (cpu_on_ret[cpu] == PSCI_RET_SUCCESS) { in psci_cpu_on_test()
161 } else if (cpu_on_ret[cpu] != PSCI_RET_ALREADY_ON) { in psci_cpu_on_test()
167 if (ret_success != 1) { in psci_cpu_on_test()
191 if (cpu == 0) in psci_cpu_off_test()
[all …]
/kvm-unit-tests/lib/
H A Dacpi.c14 if (efi_rsdp == NULL) in get_rsdp()
27 if (rsdp->signature == RSDP_SIGNATURE_8BYTE) in get_rsdp()
31 if (addr == 0x100000) in get_rsdp()
47 if (sig == FACS_SIGNATURE) { in find_acpi_table_addr()
51 if (!fadt) in find_acpi_table_addr()
57 if (rsdp == NULL) { in find_acpi_table_addr()
62 if (sig == RSDP_SIGNATURE) in find_acpi_table_addr()
66 if (rsdt && rsdt->signature != RSDT_SIGNATURE) in find_acpi_table_addr()
69 if (sig == RSDT_SIGNATURE) in find_acpi_table_addr()
72 if (rsdp->revision >= 2) { in find_acpi_table_addr()
[all …]
H A Dstring.c51 if (*a != *b || *a == '\0') in strncmp()
60 if (tolower(*a) != tolower(*b) || *a == '\0') in strncasecmp()
79 if (*s++ == '\0') in strchr()
88 if (*s == (char)c) in strrchr()
106 if (!l2) in strstr()
111 if (!memcmp(s1, s2, l2)) in strstr()
148 if (ret) in memcmp()
160 if (d <= s) { in memmove()
176 if (*str++ == chr) in memchr()
193 if (*s == '-') { in __strtoll()
[all …]
H A Ddevicetree.c29 if (prop == NULL) in dt_get_nr_cells()
36 if (prop == NULL) in dt_get_nr_cells()
63 if (prop == NULL) in dt_get_reg()
70 if (regidx + nr_tuple_cells > len/sizeof(u32)) in dt_get_reg()
91 if (parent < 0) in dt_pbus_translate_node()
95 if (ret != 0) in dt_pbus_translate_node()
101 if (ret < 0) in dt_pbus_translate_node()
150 if (ret < 0) in dt_device_find_compatible()
152 else if (ret) in dt_device_find_compatible()
168 if (node < 0) in dt_pbus_get_base_compatible()
[all …]
H A Defi.c50 if (status != EFI_SUCCESS) in efi_get_boot_hartid()
70 if (status != EFI_BUFFER_TOO_SMALL || map_size == 0) in efi_get_memory_map()
81 if (status != EFI_SUCCESS) in efi_get_memory_map()
87 if (status != EFI_SUCCESS) { in efi_get_memory_map()
113 if (!memcmp(&table_guid, &tables[i].guid, sizeof(efi_guid_t))) { in efi_get_system_config_table()
144 if (options) { in efi_convert_cmdline()
149 if (c < 0x80) { in efi_convert_cmdline()
150 if (c == L'\0' || c == L'\n') in efi_convert_cmdline()
152 if (c == L'"') in efi_convert_cmdline()
154 else if (!in_quote && isspace((char)c)) in efi_convert_cmdline()
[all …]
/kvm-unit-tests/scripts/
H A Dget_maintainer.pl73 my @fixes = (); # If a patch description includes Fixes: lines
170 if (-f $conf) {
182 next if ($line =~ m/^\s*#/);
183 next if ($line =~ m/^\s*$/);
187 last if ($word =~ m/^#/);
192 unshift(@ARGV, @conf_args) if @conf_args;
197 if (-f $ignore_file) {
208 next if ($line =~ m/^\s*$/);
209 if (rfc822_valid($line)) {
216 if ($#ARGV > 0) {
[all …]
H A Dcheckpatch.pl55 $gitroot = ".git" if !defined($gitroot);
118 if exceeded, warn on patches
120 --min-conf-desc-length=n set the min description length, if shorter, warn
132 If correctable single-line errors exist, create
138 file. It's your fault if there's no backup or git
178 if (defined($1)) {
179 if (exists($types{$2})) {
180 $types{$2} .= ",$1" if ($types{$2} ne $1);
190 if ($color) {
204 if ($color) {
[all …]
H A Druntime.bash15 # We assume that QEMU is going to work if it tried to load the kernel
65 if [ -z "$reason" ]; then
90 if [ "${CONFIG_EFI}" == "y" ]; then
94 if [ -z "$testname" ]; then
98 if [ -n "$only_tests" ] && ! find_word "$testname" "$only_tests"; then
102 if [ -n "$only_group" ] && ! find_word "$only_group" "$groups"; then
106 if [ -z "$GEN_SE_HEADER" ] && find_word "pv-host" "$groups"; then
111 if [ -z "$only_group" ] && find_word nodefault "$groups" &&
117 if [ -n "$arch" ] && [ "$arch" != "$ARCH" ]; then
122 if [ -n "$machine" ] && [ -n "$MACHINE" ] && [ "$machine" != "$MACHINE" ]; then
[all …]
H A Darch-run.bash44 if [ "$errors" ]; then
46 if [ "$sig" ]; then
53 if [ $ret -eq 0 ]; then
56 if [ "$sig" ]; then
63 # Even when ret==1 (unittest success) if we also got stderr
66 if [ "$errors" ]; then
67 if ! grep -qvi warning <<<"$errors" ; then
87 if [ $ret -eq 1 ]; then
89 if [ "$testret" ]; then
90 if [ $testret -eq 1 ]; then
[all …]
/kvm-unit-tests/x86/
H A Daccess.c216 if (!leaf_only || i == 1 || (*ptep & PT_PAGE_SIZE_MASK)) in walk_va()
219 if (i == 1 || *ptep & PT_PAGE_SIZE_MASK) in walk_va()
242 if (wp) in set_cr0_wp()
244 if (cr0 != shadow_cr0) { in set_cr0_wp()
275 if (smep) in set_cr4_smep()
277 if (cr4 == shadow_cr4) in set_cr4_smep()
280 if (smep) in set_cr4_smep()
283 if (r || !smep) in set_cr4_smep()
285 if (!r) in set_cr4_smep()
295 if (pke) in set_cr4_pke()
[all …]
H A Dpcid.c13 if (write_cr4_safe(cr4 | X86_CR4_PCIDE) != 0) in test_pcid_enabled()
17 if (write_cr0_safe(cr0 & ~X86_CR0_PG) != GP_VECTOR) in test_pcid_enabled()
24 if (write_cr4_safe(cr4 | X86_CR4_PCIDE) != GP_VECTOR) in test_pcid_enabled()
40 if (write_cr4_safe(cr4 | X86_CR4_PCIDE) != GP_VECTOR) in test_pcid_disabled()
61 if (invpcid_safe(i, &desc) != 0) in test_invpcid_enabled()
70 if (invpcid_safe(i, &desc) != GP_VECTOR) in test_invpcid_enabled()
74 /* Skip tests that require the PCIDE=1 if PCID isn't supported. */ in test_invpcid_enabled()
75 if (!pcid_enabled) in test_invpcid_enabled()
78 if (write_cr4_safe(cr4 | X86_CR4_PCIDE) != 0) in test_invpcid_enabled()
85 if (invpcid_safe(2, &desc) != 0) in test_invpcid_enabled()
[all …]
/kvm-unit-tests/lib/s390x/
H A Dcss_lib.c44 if (h->code == CHSC_RSP_OK) in check_response()
47 if (h->code > CHSC_RSP_MAX) in check_response()
84 if (chsc_scsc) /* chsc_scsc already initialized */ in get_chsc_scsc()
88 if (!chsc_scsc) { in get_chsc_scsc()
93 if (!chsc(chsc_scsc, CHSC_SCSC, CHSC_SCSC_LEN)) in get_chsc_scsc()
97 if (css_test_general_feature(i)) { in get_chsc_scsc()
105 if (css_test_chsc_feature(i)) { in get_chsc_scsc()
143 if (PMCW_CHANNEL_TYPE(pmcw) != 0) in css_enumerate()
148 if (!(pmcw->flags & PMCW_DNV)) in css_enumerate()
152 if (!schid) in css_enumerate()
[all …]
/kvm-unit-tests/lib/x86/
H A Damd_sev.c25 if (!initialized) { in amd_sev_enabled()
29 /* Test if we can query SEV features */ in amd_sev_enabled()
31 if (cpuid_out.a < CPUID_FN_ENCRYPT_MEM_CAPAB) { in amd_sev_enabled()
35 /* Test if SEV is supported */ in amd_sev_enabled()
37 if (!(cpuid_out.a & SEV_SUPPORT_MASK)) { in amd_sev_enabled()
41 /* Test if SEV is enabled */ in amd_sev_enabled()
42 if (rdmsr(MSR_SEV_STATUS) & SEV_ENABLED_MASK) { in amd_sev_enabled()
54 if (!amd_sev_enabled()) { in setup_amd_sev()
74 if (!initialized) { in amd_sev_es_enabled()
78 if (!amd_sev_enabled()) { in amd_sev_es_enabled()
[all …]
/kvm-unit-tests/
H A Dconfigure3 if [ -z "${BASH_VERSINFO[0]}" ] || [ "${BASH_VERSINFO[0]}" -lt 4 ] ; then
73 if [ -e "$srcdir"/.git ]; then
89 --target-cpu=CPU the CPU model to run on. If left unset, the run script
154 if [[ "$opt" = *=* ]]; then
256 if [ -z "$cc_selected" ] && [ "$cross_prefix" ]; then
260 if [ -z "$efi" ] || [ "$efi" = "n" ]; then
264 if [ -n "$host_key_document" ] && [ ! -f "$host_key_document" ]; then
269 if [ "$erratatxt" ] && [ ! -f "$erratatxt" ]; then
279 if [ "$arch" = "riscv" ]; then
284 if [ -z "$target" ]; then
[all …]
/kvm-unit-tests/powerpc/
H A Dsmp.c32 if (argc > 2) in test_start_cpus()
36 if (!start_all_cpus(start_fn)) in test_start_cpus()
42 if (get_tb() - tb > tb_hz * 5) in test_start_cpus()
46 if (nr_cpus_started != nr_cpus_online) in test_start_cpus()
56 if (get_tb() - tb > tb_hz * 5) in test_start_cpus()
92 if (argc > 2) in test_ipi_cpus()
95 if (nr_cpus_present < 2) { in test_ipi_cpus()
102 if (!start_all_cpus(ipi_fn)) in test_ipi_cpus()
111 if (get_tb() - tb > tb_hz * 5) in test_ipi_cpus()
120 if (get_tb() - tb > tb_hz * 5) in test_ipi_cpus()
[all …]
/kvm-unit-tests/lib/arm/
H A Dgic.c63 if (node == -FDT_ERR_NOTFOUND) in gic_get_dt_bases()
74 if (ret == -FDT_ERR_NOTFOUND) in gic_get_dt_bases()
80 if (!base3) { in gic_get_dt_bases()
91 if (!strcmp((char *)prop->data, "arm,gic-v3-its")) { in gic_get_dt_bases()
117 if (gic_common_ops == &gicv2_common_ops) in gic_version()
119 else if (gic_common_ops == &gicv3_common_ops) in gic_version()
126 if (gicv2_init()) { in gic_init_fdt()
128 } else if (gicv3_init()) { in gic_init_fdt()
149 if (version == 2) in gic_acpi_version()
151 else if (version == 3) in gic_acpi_version()
[all …]
/kvm-unit-tests/riscv/efi/
H A Drun3 if [ $# -eq 0 ]; then
8 if [ ! -f config.mak ]; then
15 if [ -f RISCV_VIRT_CODE.fd ]; then
30 if [ ! -f "$EFI_UEFI" ]; then
36 if [ "$EFI_USE_ACPI" = "y" ]; then
49 if [ "$1" = "-append" ]; then
58 if [ "$EFI_CASE" = "_NO_FILE_4Uhere_" ]; then
65 -drive file.dir="$EFI_CASE_DIR/",file.driver=vvfat,file.rw=on,format=raw,if=virtio \
75 if [ "$EFI_USE_ACPI" != "y" ]; then
90 -drive file.dir="$EFI_CASE_DIR/",file.driver=vvfat,file.rw=on,format=raw,if=virtio \
[all …]

12345678910>>...14