/openbmc/linux/drivers/md/bcache/ |
H A D | bset.c | 1 // SPDX-License-Identifier: GPL-2.0 23 struct bkey *k, *next; in bch_dump_bset() local 25 for (k = i->start; k < bset_bkey_last(i); k = next) { in bch_dump_bset() 26 next = bkey_next(k); in bch_dump_bset() 29 (unsigned int) ((u64 *) k - i->d), i->keys); in bch_dump_bset() 31 if (b->ops->key_dump) in bch_dump_bset() 32 b->ops->key_dump(b, k); in bch_dump_bset() 34 pr_cont("%llu:%llu\n", KEY_INODE(k), KEY_OFFSET(k)); in bch_dump_bset() 37 bkey_cmp(k, b->ops->is_extents ? in bch_dump_bset() 48 for (i = 0; i <= b->nsets; i++) in bch_dump_bucket() [all …]
|
H A D | journal.c | 1 // SPDX-License-Identifier: GPL-2.0 20 * entries (same as garbage collection would), then we replay them - reinserting 30 struct closure *cl = bio->bi_private; in journal_read_endio() 38 struct journal_device *ja = &ca->journal; in journal_read_bucket() 39 struct bio *bio = &ja->bio; in journal_read_bucket() 42 struct jset *j, *data = ca->set->journal.w[0].data; in journal_read_bucket() local 46 sector_t bucket = bucket_to_sector(ca->set, ca->sb.d[bucket_index]); in journal_read_bucket() 52 while (offset < ca->sb.bucket_size) { in journal_read_bucket() 53 reread: left = ca->sb.bucket_size - offset; in journal_read_bucket() 56 bio_reset(bio, ca->bdev, REQ_OP_READ); in journal_read_bucket() [all …]
|
/openbmc/linux/drivers/staging/wlan-ng/ |
H A D | p80211wep.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MPL-1.1) 7 * -------------------------------------------------------------------- 9 * linux-wlan 11 * -------------------------------------------------------------------- 13 * Inquiries regarding the linux-wlan Open Source project can be 14 * made directly to: 17 * info@linux-wlan.com 18 * http://www.linux-wlan.com 20 * -------------------------------------------------------------------- 25 * -------------------------------------------------------------------- [all …]
|
/openbmc/linux/drivers/video/logo/ |
H A D | pnmtologo.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Convert a logo in ASCII PNM format to C source suitable for inclusion in 6 * (C) Copyright 2001-2003 by Geert Uytterhoeven <geert@linux-m68k.org> 100 val = 10*val+c-'0'; in get_number() 124 unsigned int i, j; in read_image() local 150 "Use pnmnoraw(1) to convert it to ASCII PNM\n", filename); in read_image() 174 for (j = 0; j < logo_width; j++) in read_image() 175 logo_data[i][j].red = logo_data[i][j].green = in read_image() 176 logo_data[i][j].blue = 255*(1-get_number(fp)); in read_image() 183 for (j = 0; j < logo_width; j++) in read_image() [all …]
|
/openbmc/linux/lib/ |
H A D | test_hash.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * produce the same thing and, for cases where a k-bit hash 8 * We fill a buffer with a 255-byte null-terminated string, 9 * and use both full_name_hash() and hashlen_string() to hash the 10 * substrings from i to j, where 0 <= i < j < 256. 12 * The returned values are used to check that __hash_32() and 24 /* 32-bit XORSHIFT generator. Seed must not be zero. */ 34 /* Given a non-zero x, returns a non-zero byte. */ 45 /* Fill the buffer with non-zero bytes. */ 58 /* Pointer to integer to be hashed. */ [all …]
|
H A D | bch.c | 14 * this program; if not, write to the Free Software Foundation, Inc., 51 15 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 24 * Bose-Chaudhuri-Hocquenghem (BCH) codes. 26 * Call bch_init to get a pointer to a newly allocated bch_control structure for 30 * Call bch_encode to compute and store ecc parity bytes to a given buffer. 31 * Call bch_decode to detect and locate errors in received data. 34 * to bch_decode in order to skip certain steps. See bch_decode() documentation 37 * Option CONFIG_BCH_CONST_PARAMS can be used to force fixed values of 39 * better (up to 2x) encoding performance. Using this option makes sense when 50 * b. Error locator polynomial computation using Berlekamp-Massey algorithm [all …]
|
H A D | inflate.c | 1 // SPDX-License-Identifier: GPL-2.0 4 /* inflate.c -- Not copyrighted 1992 by Mark Adler 9 * based on gzip-1.0.3 12 * Little mods for all variable to reside either into rodata or bss segments 14 * at run-time only. This allows for the kernel uncompressor to run 20 method searches for as much of the current string of bytes (up to a 21 length of 258) in the previous 32 K bytes. If it doesn't find any 28 of "extra" (sometimes zero) bits to get to add to the base value. At 29 the end of each deflated block is a special end-of-block (EOB) literal/ 32 length then get the distance and emit the referred-to bytes from the [all …]
|
/openbmc/qemu/tests/tcg/multiarch/ |
H A D | float_madds.c | 6 * SPDX-License-Identifier: GPL-2.0-or-later 25 { FE_TONEAREST, "to nearest" }, 33 { FE_TOWARDZERO, "to zero" } 53 static void print_result(float r, int j, int k) in print_result() argument 60 printf("res: %s flags=%s (%d/%d)\n", r_fmt, flag_fmt, j, k); in print_result() 66 static void do_madds(float a, float b, float c, int j, int k) in do_madds() argument 75 print_result(r, j, k); in do_madds() 80 int i, j, k, nums = get_num_f32(); in main() local 89 for (j = 0; j < nums; j++) { in main() 90 for (k = 0; k < 3; k++) { in main() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/dcn31/ |
H A D | display_mode_vba_31.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 34 * This file is gcc-parsable HW gospel, coming straight from HW engineers. 36 * It doesn't adhere to Linux kernel style and sometimes will do things in odd 38 * remain as-is as it provides us with a guarantee from HW that it is correct. 48 // For DML-C changes that hasn't been propagated to VBA yet [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/dcn314/ |
H A D | display_mode_vba_314.c | 1 // SPDX-License-Identifier: MIT 5 * Permission is hereby granted, free of charge, to any person obtaining a 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 37 * This file is gcc-parsable HW gospel, coming straight from HW engineers. 39 * It doesn't adhere to Linux kernel style and sometimes will do things in odd 41 * remain as-is as it provides us with a guarantee from HW that it is correct. [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/dcn30/ |
H A D | display_mode_vba_30.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 34 * This file is gcc-parsable HW gospel, coming straight from HW engineers. 36 * It doesn't adhere to Linux kernel style and sometimes will do things in odd 38 * remain as-is as it provides us with a guarantee from HW that it is correct. 679 …//valid sliceWidth = number of pixels per slice line, must be less than or equal to 5184/numSlice… in dscceComputeDelay() [all …]
|
/openbmc/u-boot/examples/standalone/ |
H A D | smc91111_eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * - Wolfgang Denk, DENX Software Engineering, wd@denx.de 8 * Das U-Boot 9 * - Ladislav Michl ladis@linux-mips.org 10 * A rejected patch on the U-Boot mailing list 36 int c, i, j, done, line, reg, value, start, what; in smc91111_eeprom() local 46 printf ("Actual U-Boot ABI version %d\n", in smc91111_eeprom() 75 c -= ('a' - 'A'); in smc91111_eeprom() 88 case 0x03: /* ^C - break */ in smc91111_eeprom() 96 case 0x08: /* ^H - backspace */ in smc91111_eeprom() [all …]
|
/openbmc/linux/drivers/scsi/ |
H A D | atp870u.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 #include <linux/dma-mapping.h> 50 outb(val, atp->baseport + reg); in atp_writeb_base() 55 outw(val, atp->baseport + reg); in atp_writew_base() 60 outb(val, atp->ioport[channel] + reg); in atp_writeb_io() 65 outw(val, atp->ioport[channel] + reg); in atp_writew_io() 70 outb(val, atp->pciport[channel] + reg); in atp_writeb_pci() 75 outl(val, atp->pciport[channel] + reg); in atp_writel_pci() 80 return inb(atp->baseport + reg); in atp_readb_base() 85 return inw(atp->baseport + reg); in atp_readw_base() [all …]
|
/openbmc/u-boot/lib/bzip2/ |
H A D | bzlib_blocksort.c | 2 /*-------------------------------------------------------------*/ 3 /*--- Block sorting machinery ---*/ 4 /*--- blocksort.c ---*/ 5 /*-------------------------------------------------------------*/ 7 /*-- 9 library for lossless, block-sorting data compression. 11 Copyright (C) 1996-2002 Julian R Seward. All rights reserved. 28 4. The name of the author may not be used to endorse or promote 33 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 37 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/dcn32/ |
H A D | display_mode_vba_32.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 41 dml32_CalculateMaxDETAndMinCompressedBufferSize(mode_lib->vba.ConfigReturnBufferSizeInKByte, in dml32_recalculate() 42 mode_lib->vba.ROBBufferSizeInKByte, in dml32_recalculate() 44 false, //mode_lib->vba.override_setting.nomDETInKByteOverrideEnable, in dml32_recalculate() 45 0, //mode_lib->vba.override_setting.nomDETInKByteOverrideValue, in dml32_recalculate() [all …]
|
/openbmc/u-boot/lib/ |
H A D | bch.c | 1 // SPDX-License-Identifier: GPL-2.0 12 * Bose-Chaudhuri-Hocquenghem (BCH) codes. 14 * Call init_bch to get a pointer to a newly allocated bch_control structure for 18 * Call encode_bch to compute and store ecc parity bytes to a given buffer. 19 * Call decode_bch to detect and locate errors in received data. 22 * to decode_bch in order to skip certain steps. See decode_bch() documentation 25 * Option CONFIG_BCH_CONST_PARAMS can be used to force fixed values of 27 * better (up to 2x) encoding performance. Using this option makes sense when 38 * b. Error locator polynomial computation using Berlekamp-Massey algorithm 44 * (BTA) down to a certain degree (4), after which ad hoc low-degree polynomial [all …]
|
/openbmc/linux/drivers/media/platform/verisilicon/ |
H A D | hantro_vp8.c | 1 // SPDX-License-Identifier: GPL-2.0 35 * filter taps taken to 7-bit precision, 36 * reference RFC6386#Page-16, filters[8][6] 40 { 0, -6, 123, 12, -1, 0 }, 41 { 2, -11, 108, 36, -8, 1 }, 42 { 0, -9, 93, 50, -6, 0 }, 43 { 3, -16, 77, 77, -16, 3 }, 44 { 0, -6, 50, 93, -9, 0 }, 45 { 1, -8, 36, 108, -11, 2 }, 46 { 0, -1, 12, 123, -6, 0 } [all …]
|
/openbmc/linux/lib/raid6/ |
H A D | mktables.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* -*- linux-c -*- ------------------------------------------------------- * 4 * Copyright 2002-2007 H. Peter Anvin - All Rights Reserved 6 * ----------------------------------------------------------------------- */ 11 * Make RAID-6 tables. This is a host user space program to be run at 55 int i, j, k; in main() local 70 for (j = 0; j < 256; j += 8) { in main() 72 for (k = 0; k < 8; k++) in main() 73 printf("0x%02x,%c", gfmul(i, j + k), in main() 74 (k == 7) ? '\n' : ' '); in main() [all …]
|
/openbmc/linux/drivers/platform/x86/ |
H A D | uv_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #define INVALID_CNODE -1 32 static signed short uv_master_nasid = -1; 58 return -1; in ordinal_to_nasid() 76 return -1; in location_to_bpos() 89 if (!obj->f.fields.this_part && !obj->f.fields.is_shared) in cache_obj_to_cnode() 92 if (location_to_bpos(obj->location, &obj_rack, &obj_slot, &obj_blade)) in cache_obj_to_cnode() 93 return -1; in cache_obj_to_cnode() 101 prev_obj_to_cnode[obj->id] = cnode; in cache_obj_to_cnode() 122 return sysfs_emit(buf, "%s\n", hub_info->name); in hub_name_show() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/calcs/ |
H A D | dcn_calc_auto.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 32 * This file is gcc-parseable HW gospel, coming straight from HW engineers. 34 * It doesn't adhere to Linux kernel style and sometimes will do things in odd 36 * remain as-is as it provides us with a guarantee from HW that it is correct. 42 int k; in scaler_settings_calculation() local [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/fman/ |
H A D | fman_sp.c | 1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later 3 * Copyright 2008 - 2015 Freescale Semiconductor Inc. 15 int i = 0, j = 0, k = 0; in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() local 18 * to an ordered local array in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 20 for (i = 0; i < fm_ext_pools->num_of_pools_used; i++) { in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 22 buf_size = fm_ext_pools->ext_buf_pool[i].size; in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 24 /* keep sizes in an array according to poolId in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 27 sizes_array[fm_ext_pools->ext_buf_pool[i].id] = buf_size; in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 29 /* save poolId in an ordered array according to size */ in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() 30 for (j = 0; j <= i; j++) { in fman_sp_set_buf_pools_in_asc_order_of_buf_sizes() [all …]
|
/openbmc/linux/tools/perf/tests/ |
H A D | event_groups.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include "../perf-sys.h" 13 /* hw: cycles, sw: context-switch, uncore: [arch dependent] */ 14 static int types[] = {0, 1, -1}; 41 * initialized with disabled set to 1 and any child events are in event_open() 42 * initialized with disabled set to 0. Despite disabled being 0, in event_open() 46 attr.disabled = group_fd == -1 ? 1 : 0; in event_open() 48 return sys_perf_event_open(&attr, -1, 0, group_fd, 0); in event_open() 58 if (!strcmp(uncore_pmus[i].name, pmu->name)) { in setup_uncore_event() 59 pr_debug("Using %s for uncore pmu event\n", pmu->name); in setup_uncore_event() [all …]
|
/openbmc/linux/lib/crypto/ |
H A D | gf128mul.c | 1 /* gf128mul.c - GF(2^128) multiplication functions 17 --------------------------------------------------------------------------- 32 3. the copyright holder's name is not used to endorse products 42 in respect of its properties, including, but not limited to, correctness 44 --------------------------------------------------------------------------- 94 * 16-bit value that must be XOR-ed into the low-degree end of the 95 * product to reduce it modulo the polynomial x^128 + x^7 + x^2 + x + 1. 98 * the "be" convention where the highest-order bit is the coefficient of 99 * the highest-degree polynomial term, and one for the "le" convention 100 * where the highest-order bit is the coefficient of the lowest-degree [all …]
|
/openbmc/u-boot/fs/reiserfs/ |
H A D | mode_string.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 #warning mode type bitflag value assumption(s) violated! falling back to larger version 44 /* The previous version used "0pcCd?bB-?l?s???". However, the '0', 'C', 45 * and 'B' types don't appear to be available on linux. So I removed them. */ 46 static const char type_chars[16] = "?pc?d?b?-?l?s???"; 55 int i, j, k; in bb_mode_string() local 60 j = k = 0; in bb_mode_string() 62 *++p = '-'; in bb_mode_string() 63 if (mode & mode_flags[i+j]) { in bb_mode_string() 64 *p = mode_chars[j]; in bb_mode_string() [all …]
|
/openbmc/linux/tools/testing/radix-tree/ |
H A D | multiorder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * multiorder.c: Multi-order radix tree entry testing 8 #include <linux/radix-tree.h> 38 int i, j, err; in multiorder_iteration() local 51 for (j = 0; j < 256; j++) { in multiorder_iteration() 53 if (j <= (index[i] | ((1 << order[i]) - 1))) in multiorder_iteration() 56 xas_set(&xas, j); in multiorder_iteration() 60 unsigned long mask = (1UL << order[i]) - 1; in multiorder_iteration() 63 assert(xas.xa_node->shift == shift); in multiorder_iteration() 65 assert((item->index | mask) == (index[i] | mask)); in multiorder_iteration() [all …]
|