Searched refs:table (Results 1 - 200 of 4624) sorted by relevance

1234567891011>>

/linux-4.1.27/arch/arm/xen/
H A DMakefile1 obj-y := enlighten.o hypercall.o grant-table.o p2m.o mm.o
/linux-4.1.27/security/selinux/ss/
H A Dsymtab.h2 * A symbol table (symtab) maintains associations between symbol
4 * is arbitrary. The symbol table type is implemented
5 * using the hash table type (hashtab).
15 struct hashtab *table; /* hash table (keyed on a string) */ member in struct:symtab
16 u32 nprim; /* number of primary names in table */
H A Dhashtab.h2 * A hash table (hashtab) maintains associations between
6 * provided by the creator of the table.
22 struct hashtab_node **htable; /* hash table */
23 u32 size; /* number of slots in hash table */
24 u32 nel; /* number of elements in hash table */
37 * Creates a new hash table with the specified characteristics.
40 * the new hash table otherwise.
47 * Inserts the specified (key, datum) pair into the specified hash table.
57 * Searches for the entry with the specified key in the hash table.
65 * Destroys the specified hash table.
71 * for each entry in the specified hash table.
74 * is dependent upon the internal structure of the hash table.
77 * iterating through the hash table and will propagate the error
84 /* Fill info with some hash table statistics */
H A Dsymtab.c2 * Implementation of the symbol table type.
37 s->table = hashtab_create(symhash, symcmp, size); symtab_init()
38 if (!s->table) symtab_init()
/linux-4.1.27/arch/powerpc/boot/
H A Dplanetcore.c20 * a table of key=value strings, separated by newlines.
29 void planetcore_prepare_table(char *table) planetcore_prepare_table() argument
32 if (*table == '\n') planetcore_prepare_table()
33 *table = 0; planetcore_prepare_table()
35 table++; planetcore_prepare_table()
36 } while (*(table - 1) || *table != '\n'); planetcore_prepare_table()
38 *table = 0; planetcore_prepare_table()
41 const char *planetcore_get_key(const char *table, const char *key) planetcore_get_key() argument
46 if (!strncmp(table, key, keylen) && table[keylen] == '=') planetcore_get_key()
47 return table + keylen + 1; planetcore_get_key()
49 table += strlen(table) + 1; planetcore_get_key()
50 } while (strlen(table) != 0); planetcore_get_key()
55 int planetcore_get_decimal(const char *table, const char *key, u64 *val) planetcore_get_decimal() argument
57 const char *str = planetcore_get_key(table, key); planetcore_get_decimal()
65 int planetcore_get_hex(const char *table, const char *key, u64 *val) planetcore_get_hex() argument
67 const char *str = planetcore_get_key(table, key); planetcore_get_hex()
82 void planetcore_set_mac_addrs(const char *table) planetcore_set_mac_addrs() argument
89 if (!planetcore_get_hex(table, PLANETCORE_KEY_MAC_ADDR, &int_addr)) planetcore_set_mac_addrs()
107 void planetcore_set_stdout_path(const char *table) planetcore_set_stdout_path() argument
113 label = planetcore_get_key(table, PLANETCORE_KEY_SERIAL_PORT); planetcore_set_stdout_path()
H A Dep8248e.c18 static char *table; variable
28 planetcore_set_mac_addrs(table); platform_fixups()
30 if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) { platform_fixups()
41 table = (char *)r3; platform_init()
42 planetcore_prepare_table(table); platform_init()
44 if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size)) platform_init()
52 planetcore_set_stdout_path(table); platform_init()
H A Dep88xc.c18 static char *table; variable
26 planetcore_set_mac_addrs(table); platform_fixups()
28 if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) { platform_fixups()
39 table = (char *)r3; platform_init()
40 planetcore_prepare_table(table); platform_init()
42 if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size)) platform_init()
50 planetcore_set_stdout_path(table); platform_init()
H A Dplanetcore.h22 /* Prepare the table for processing, by turning all newlines
25 void planetcore_prepare_table(char *table);
32 const char *planetcore_get_key(const char *table, const char *key);
33 int planetcore_get_decimal(const char *table, const char *key, u64 *val);
34 int planetcore_get_hex(const char *table, const char *key, u64 *val);
39 void planetcore_set_mac_addrs(const char *table);
44 void planetcore_set_stdout_path(const char *table);
H A Dep405.c24 static char *table; variable
33 planetcore_set_mac_addrs(table); platform_fixups()
35 if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) { platform_fixups()
43 if (!planetcore_get_decimal(table, PLANETCORE_KEY_KB_NVRAM, &val)) { platform_fixups()
59 table = (char *)r3; platform_init()
60 planetcore_prepare_table(table); platform_init()
62 if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size)) platform_init()
70 planetcore_set_stdout_path(table); platform_init()
/linux-4.1.27/arch/x86/lib/
H A Dinat.c43 const insn_attr_t *table; inat_get_escape_attribute() local
48 table = inat_escape_tables[n][0]; inat_get_escape_attribute()
49 if (!table) inat_get_escape_attribute()
51 if (inat_has_variant(table[opcode]) && lpfx_id) { inat_get_escape_attribute()
52 table = inat_escape_tables[n][lpfx_id]; inat_get_escape_attribute()
53 if (!table) inat_get_escape_attribute()
56 return table[opcode]; inat_get_escape_attribute()
62 const insn_attr_t *table; inat_get_group_attribute() local
67 table = inat_group_tables[n][0]; inat_get_group_attribute()
68 if (!table) inat_get_group_attribute()
70 if (inat_has_variant(table[X86_MODRM_REG(modrm)]) && lpfx_id) { inat_get_group_attribute()
71 table = inat_group_tables[n][lpfx_id]; inat_get_group_attribute()
72 if (!table) inat_get_group_attribute()
75 return table[X86_MODRM_REG(modrm)] | inat_get_group_attribute()
82 const insn_attr_t *table; inat_get_avx_attribute() local
85 /* At first, this checks the master table */ inat_get_avx_attribute()
86 table = inat_avx_tables[vex_m][0]; inat_get_avx_attribute()
87 if (!table) inat_get_avx_attribute()
89 if (!inat_is_group(table[opcode]) && vex_p) { inat_get_avx_attribute()
91 table = inat_avx_tables[vex_m][vex_p]; inat_get_avx_attribute()
92 if (!table) inat_get_avx_attribute()
95 return table[opcode]; inat_get_avx_attribute()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192ce/
H A DMakefile8 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192cu/
H A DMakefile9 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192de/
H A DMakefile9 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192se/
H A DMakefile9 table.o \
/linux-4.1.27/arch/arm64/xen/
H A DMakefile1 xen-arm-y += $(addprefix ../../arm/xen/, enlighten.o grant-table.o p2m.o mm.o)
/linux-4.1.27/net/unix/
H A Dsysctl_net_unix.c31 struct ctl_table *table; unix_sysctl_register() local
33 table = kmemdup(unix_table, sizeof(unix_table), GFP_KERNEL); unix_sysctl_register()
34 if (table == NULL) unix_sysctl_register()
39 table[0].procname = NULL; unix_sysctl_register()
41 table[0].data = &net->unx.sysctl_max_dgram_qlen; unix_sysctl_register()
42 net->unx.ctl = register_net_sysctl(net, "net/unix", table); unix_sysctl_register()
49 kfree(table); unix_sysctl_register()
56 struct ctl_table *table; unix_sysctl_unregister() local
58 table = net->unx.ctl->ctl_table_arg; unix_sysctl_unregister()
60 kfree(table); unix_sysctl_unregister()
/linux-4.1.27/lib/
H A Dcrc8.c24 * crc8_populate_msb - fill crc table for given polynomial in reverse bit order.
26 * table: table to be filled.
27 * polynomial: polynomial for which table is to be filled.
29 void crc8_populate_msb(u8 table[CRC8_TABLE_SIZE], u8 polynomial) crc8_populate_msb() argument
35 table[0] = 0; crc8_populate_msb()
40 table[i+j] = table[j] ^ t; crc8_populate_msb()
46 * crc8_populate_lsb - fill crc table for given polynomial in regular bit order.
48 * table: table to be filled.
49 * polynomial: polynomial for which table is to be filled.
51 void crc8_populate_lsb(u8 table[CRC8_TABLE_SIZE], u8 polynomial) crc8_populate_lsb() argument
56 table[0] = 0; crc8_populate_lsb()
61 table[i+j] = table[j] ^ t; crc8_populate_lsb()
69 * table: crc table used for calculation.
74 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc) crc8() argument
78 crc = table[(crc ^ *pdata++) & 0xff]; crc8()
H A Dscatterlist.c95 * sg_init_table - Initialize SG table
96 * @sgl: The SG table
97 * @nents: Number of entries in table
100 * If this is part of a chained sg table, sg_mark_end() should be
101 * used only on the last table part.
165 * __sg_free_table - Free a previously mapped sg table
166 * @table: The sg table header to use
172 * Free an sg table previously allocated and setup with
177 void __sg_free_table(struct sg_table *table, unsigned int max_ents, __sg_free_table() argument
182 if (unlikely(!table->sgl)) __sg_free_table()
185 sgl = table->sgl; __sg_free_table()
186 while (table->orig_nents) { __sg_free_table()
187 unsigned int alloc_size = table->orig_nents; __sg_free_table()
192 * then assign 'next' to the sg table after the current one. __sg_free_table()
205 table->orig_nents -= sg_size; __sg_free_table()
213 table->sgl = NULL; __sg_free_table()
218 * sg_free_table - Free a previously allocated sg table
219 * @table: The mapped sg table header
222 void sg_free_table(struct sg_table *table) sg_free_table() argument
224 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); sg_free_table()
229 * __sg_alloc_table - Allocate and initialize an sg table with given allocator
230 * @table: The sg table header to use
237 * This function returns a @table @nents long. The allocator is
247 int __sg_alloc_table(struct sg_table *table, unsigned int nents, __sg_alloc_table() argument
254 memset(table, 0, sizeof(*table)); __sg_alloc_table()
285 * entry of the previous table won't be used for __sg_alloc_table()
290 table->nents = ++table->orig_nents; __sg_alloc_table()
296 table->nents = table->orig_nents += sg_size; __sg_alloc_table()
299 * If this is the first mapping, assign the sg table header. __sg_alloc_table()
305 table->sgl = sg; __sg_alloc_table()
321 * sg_alloc_table - Allocate and initialize an sg table
322 * @table: The sg table header to use
327 * Allocate and initialize an sg table. If @nents@ is larger than
328 * SG_MAX_SINGLE_ALLOC a chained sg table will be setup.
331 int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) sg_alloc_table() argument
335 ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, sg_alloc_table()
338 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); sg_alloc_table()
345 * sg_alloc_table_from_pages - Allocate and initialize an sg table from
347 * @sgt: The sg table header to use
355 * Allocate and initialize an sg table from a list of pages. Contiguous
358 * specified by the page array. The returned sg table is released by
H A Dextable.c19 * The exception table needs to be sorted so that the binary
21 * This is used both for the kernel exception table and for
45 * If the exception table is sorted, any referring to the module init
65 * Search one exception table for an entry corresponding to the
68 * We use a binary search, and thus we assume that the table is
H A Dgen_crc32table.c29 * crc32init_le() - allocate and initialize LE table data
68 * crc32init_be() - allocate and initialize BE table data
91 static void output_table(uint32_t (*table)[256], int rows, int len, char *trans) output_table() argument
100 printf("%s(0x%8.8xL), ", trans, table[j][i]); output_table()
102 printf("%s(0x%8.8xL)},\n", trans, table[j][len - 1]); output_table()
/linux-4.1.27/tools/power/acpi/tools/acpidump/
H A Dapdump.c49 ap_dump_table_buffer(struct acpi_table_header *table,
56 * PARAMETERS: table - Pointer to table to be validated
60 * DESCRIPTION: Check for a valid ACPI table header
64 u8 ap_is_valid_header(struct acpi_table_header *table) ap_is_valid_header() argument
67 if (!ACPI_VALIDATE_RSDP_SIG(table->signature)) { ap_is_valid_header()
71 if (!acpi_ut_valid_acpi_name(table->signature)) { ap_is_valid_header()
73 *(u32 *)table->signature); ap_is_valid_header()
77 /* Check for minimum table length */ ap_is_valid_header()
79 if (table->length < sizeof(struct acpi_table_header)) { ap_is_valid_header()
81 table->length); ap_is_valid_header()
93 * PARAMETERS: table - Pointer to table to be validated
97 * DESCRIPTION: Check for a valid ACPI table checksum.
101 u8 ap_is_valid_checksum(struct acpi_table_header *table) ap_is_valid_checksum() argument
106 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { ap_is_valid_checksum()
109 * Note: Other checksums are computed during the table dump. ap_is_valid_checksum()
111 rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table); ap_is_valid_checksum()
114 status = acpi_tb_verify_checksum(table, table->length); ap_is_valid_checksum()
118 acpi_log_error("%4.4s: Warning: wrong checksum in table\n", ap_is_valid_checksum()
119 table->signature); ap_is_valid_checksum()
129 * PARAMETERS: table - Pointer to the table
133 * DESCRIPTION: Obtain table length according to table signature.
137 u32 ap_get_table_length(struct acpi_table_header *table) ap_get_table_length() argument
141 /* Check if table is valid */ ap_get_table_length()
143 if (!ap_is_valid_header(table)) { ap_get_table_length()
147 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { ap_get_table_length()
148 rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table); ap_get_table_length()
152 /* Normal ACPI table */ ap_get_table_length()
154 return (table->length); ap_get_table_length()
161 * PARAMETERS: table - ACPI table to be dumped
162 * instance - ACPI table instance no. to be dumped
163 * address - Physical address of the table
167 * DESCRIPTION: Dump an ACPI table in standard ASCII hex format, with a
173 ap_dump_table_buffer(struct acpi_table_header *table, ap_dump_table_buffer() argument
178 table_length = ap_get_table_length(table); ap_dump_table_buffer()
183 acpi_tb_print_table_header(address, table); ap_dump_table_buffer()
190 return (ap_write_to_binary_file(table, instance)); ap_dump_table_buffer()
194 * Dump the table with header for use with acpixtract utility. ap_dump_table_buffer()
199 table->signature, ACPI_FORMAT_UINT64(address)); ap_dump_table_buffer()
202 ACPI_CAST_PTR(u8, table), table_length, ap_dump_table_buffer()
223 struct acpi_table_header *table; ap_dump_all_tables() local
234 acpi_os_get_table_by_index(i, &table, &instance, &address); ap_dump_all_tables()
248 ("Could not get ACPI table at index %u, %s\n", ap_dump_all_tables()
254 table_status = ap_dump_table_buffer(table, instance, address); ap_dump_all_tables()
255 ACPI_FREE(table); ap_dump_all_tables()
271 * PARAMETERS: ascii_address - Address for requested ACPI table
275 * DESCRIPTION: Get an ACPI table via a physical address and dump it.
282 struct acpi_table_header *table; ap_dump_table_by_address() local
297 status = acpi_os_get_table_by_address(address, &table); ap_dump_table_by_address()
299 acpi_log_error("Could not get table at 0x%8.8X%8.8X, %s\n", ap_dump_table_by_address()
305 table_status = ap_dump_table_buffer(table, 0, address); ap_dump_table_by_address()
306 ACPI_FREE(table); ap_dump_table_by_address()
314 * PARAMETERS: signature - Requested ACPI table signature
318 * DESCRIPTION: Get an ACPI table via a signature and dump it. Handles
327 struct acpi_table_header *table; ap_dump_table_by_name() local
334 ("Invalid table signature [%s]: must be exactly 4 characters\n", ap_dump_table_by_name()
356 &table, &address); ap_dump_table_by_name()
366 ("Could not get ACPI table with signature [%s], %s\n", ap_dump_table_by_name()
371 table_status = ap_dump_table_buffer(table, instance, address); ap_dump_table_by_name()
372 ACPI_FREE(table); ap_dump_table_by_name()
388 * PARAMETERS: pathname - File containing the binary ACPI table
392 * DESCRIPTION: Dump an ACPI table from a binary file
398 struct acpi_table_header *table; ap_dump_table_from_file() local
402 /* Get the entire ACPI table from the file */ ap_dump_table_from_file()
404 table = ap_get_table_from_file(pathname, &file_size); ap_dump_table_from_file()
405 if (!table) { ap_dump_table_from_file()
409 /* File must be at least as long as the table length */ ap_dump_table_from_file()
411 if (table->length > file_size) { ap_dump_table_from_file()
414 table->length, file_size, pathname); ap_dump_table_from_file()
420 ("Input file: %s contains table [%4.4s], 0x%X (%u) bytes\n", ap_dump_table_from_file()
421 pathname, table->signature, file_size, file_size); ap_dump_table_from_file()
424 table_status = ap_dump_table_buffer(table, 0, 0); ap_dump_table_from_file()
427 ACPI_FREE(table); ap_dump_table_from_file()
H A Dapfiles.c110 * PARAMETERS: table - ACPI table to be written
111 * instance - ACPI table instance no. to be written
115 * DESCRIPTION: Write an ACPI table to a binary file. Builds the output
116 * filename from the table signature.
120 int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance) ap_write_to_binary_file() argument
128 /* Obtain table length */ ap_write_to_binary_file()
130 table_length = ap_get_table_length(table); ap_write_to_binary_file()
132 /* Construct lower-case filename from the table local signature */ ap_write_to_binary_file()
134 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { ap_write_to_binary_file()
137 ACPI_MOVE_NAME(filename, table->signature); ap_write_to_binary_file()
158 table->signature, filename, table->length, table->length); ap_write_to_binary_file()
161 /* Open the file and dump the entire table in binary mode */ ap_write_to_binary_file()
170 actual = acpi_os_write_file(file, table, 1, table_length); ap_write_to_binary_file()
186 * PARAMETERS: pathname - File containing the binary ACPI table
189 * RETURN: Buffer containing the ACPI table. NULL on error.
H A Dapmain.c103 ACPI_OPTION("-s", "Print table summaries only"); ap_display_usage()
109 ACPI_OPTION("-a <Address>", "Get table via a physical address"); ap_display_usage()
110 ACPI_OPTION("-f <BinaryFile>", "Get table via a binary file"); ap_display_usage()
111 ACPI_OPTION("-n <Signature>", "Get table via a name/signature"); ap_display_usage()
129 * DESCRIPTION: Add an action item to the action table
136 /* Insert action and check for table overflow */ ap_insert_action()
143 acpi_log_error("Too many table options (max %u)\n", ap_insert_action()
160 * and dumping tables are deferred via the action table.
213 case 's': /* Print table summaries only */ ap_do_options()
241 case 'a': /* Get table by physical address */ ap_do_options()
249 case 'f': /* Get table from a file */ ap_do_options()
257 case 'n': /* Get table by input name (signature) */ ap_do_options()
319 /* Get/dump ACPI table(s) as requested */ main()
/linux-4.1.27/drivers/net/wireless/b43/
H A Dtables_phy_ht.h9 #define B43_HTTAB8(table, offset) (((table) << 10) | (offset) | B43_HTTAB_8BIT)
10 #define B43_HTTAB16(table, offset) (((table) << 10) | (offset) | B43_HTTAB_16BIT)
11 #define B43_HTTAB32(table, offset) (((table) << 10) | (offset) | B43_HTTAB_32BIT)
H A Dtables_phy_lcn.h9 #define B43_LCNTAB8(table, offset) (((table) << 10) | (offset) | B43_LCNTAB_8BIT)
10 #define B43_LCNTAB16(table, offset) (((table) << 10) | (offset) | B43_LCNTAB_16BIT)
11 #define B43_LCNTAB32(table, offset) (((table) << 10) | (offset) | B43_LCNTAB_32BIT)
H A Dtables_lpphy.h9 #define B43_LPTAB8(table, offset) (((table) << 10) | (offset) | B43_LPTAB_8BIT)
10 #define B43_LPTAB16(table, offset) (((table) << 10) | (offset) | B43_LPTAB_16BIT)
11 #define B43_LPTAB32(table, offset) (((table) << 10) | (offset) | B43_LPTAB_32BIT)
14 #define B43_LPTAB_TXPWR_R2PLUS B43_LPTAB32(0x07, 0) /* TX power lookup table (rev >= 2) */
15 #define B43_LPTAB_TXPWR_R0_1 B43_LPTAB32(0xA0, 0) /* TX power lookup table (rev < 2) */
20 /* Bulk table access. Note that these functions return the bulk data in
38 struct lpphy_tx_gain_table_entry *table);
H A Dphy_a.h29 #define B43_PHY_OTABLECTL B43_PHY_OFDM(0x72) /* OFDM table control (see below) */
30 #define B43_PHY_OTABLEOFF 0x03FF /* OFDM table offset (see below) */
31 #define B43_PHY_OTABLENR 0xFC00 /* OFDM table number (see below) */
33 #define B43_PHY_OTABLEI B43_PHY_OFDM(0x73) /* OFDM table data I */
34 #define B43_PHY_OTABLEQ B43_PHY_OFDM(0x74) /* OFDM table data Q */
59 #define B43_PHY_TSSIP_LTBASE B43_PHY_OFDM(0x380) /* TSSI power lookup table base */
60 #define B43_PHY_DC_LTBASE B43_PHY_OFDM(0x3A0) /* DC lookup table base */
61 #define B43_PHY_GAIN_LTBASE B43_PHY_OFDM(0x3C0) /* Gain lookup table base */
63 /*** OFDM table numbers ***/
97 u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset);
98 void b43_ofdmtab_write16(struct b43_wldev *dev, u16 table,
100 u32 b43_ofdmtab_read32(struct b43_wldev *dev, u16 table, u16 offset);
101 void b43_ofdmtab_write32(struct b43_wldev *dev, u16 table,
106 /* Pointer to the table used to convert a
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Dicm.c249 int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj, mlx4_table_get() argument
252 u32 i = (obj & (table->num_obj - 1)) / mlx4_table_get()
253 (MLX4_TABLE_CHUNK_SIZE / table->obj_size); mlx4_table_get()
256 mutex_lock(&table->mutex); mlx4_table_get()
258 if (table->icm[i]) { mlx4_table_get()
259 ++table->icm[i]->refcount; mlx4_table_get()
263 table->icm[i] = mlx4_alloc_icm(dev, MLX4_TABLE_CHUNK_SIZE >> PAGE_SHIFT, mlx4_table_get()
264 (table->lowmem ? gfp : GFP_HIGHUSER) | mlx4_table_get()
265 __GFP_NOWARN, table->coherent); mlx4_table_get()
266 if (!table->icm[i]) { mlx4_table_get()
271 if (mlx4_MAP_ICM(dev, table->icm[i], table->virt + mlx4_table_get()
273 mlx4_free_icm(dev, table->icm[i], table->coherent); mlx4_table_get()
274 table->icm[i] = NULL; mlx4_table_get()
279 ++table->icm[i]->refcount; mlx4_table_get()
282 mutex_unlock(&table->mutex); mlx4_table_get()
286 void mlx4_table_put(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj) mlx4_table_put() argument
291 i = (obj & (table->num_obj - 1)) / (MLX4_TABLE_CHUNK_SIZE / table->obj_size); mlx4_table_put()
293 mutex_lock(&table->mutex); mlx4_table_put()
295 if (--table->icm[i]->refcount == 0) { mlx4_table_put()
297 mlx4_UNMAP_ICM(dev, table->virt + offset, mlx4_table_put()
299 mlx4_free_icm(dev, table->icm[i], table->coherent); mlx4_table_put()
300 table->icm[i] = NULL; mlx4_table_put()
303 mutex_unlock(&table->mutex); mlx4_table_put()
306 void *mlx4_table_find(struct mlx4_icm_table *table, u32 obj, mlx4_table_find() argument
315 if (!table->lowmem) mlx4_table_find()
318 mutex_lock(&table->mutex); mlx4_table_find()
320 idx = (u64) (obj & (table->num_obj - 1)) * table->obj_size; mlx4_table_find()
321 icm = table->icm[idx / MLX4_TABLE_CHUNK_SIZE]; mlx4_table_find()
349 mutex_unlock(&table->mutex); mlx4_table_find()
353 int mlx4_table_get_range(struct mlx4_dev *dev, struct mlx4_icm_table *table, mlx4_table_get_range() argument
356 int inc = MLX4_TABLE_CHUNK_SIZE / table->obj_size; mlx4_table_get_range()
361 err = mlx4_table_get(dev, table, i, GFP_KERNEL); mlx4_table_get_range()
371 mlx4_table_put(dev, table, i); mlx4_table_get_range()
377 void mlx4_table_put_range(struct mlx4_dev *dev, struct mlx4_icm_table *table, mlx4_table_put_range() argument
382 for (i = start; i <= end; i += MLX4_TABLE_CHUNK_SIZE / table->obj_size) mlx4_table_put_range()
383 mlx4_table_put(dev, table, i); mlx4_table_put_range()
386 int mlx4_init_icm_table(struct mlx4_dev *dev, struct mlx4_icm_table *table, mlx4_init_icm_table() argument
399 table->icm = kcalloc(num_icm, sizeof *table->icm, GFP_KERNEL); mlx4_init_icm_table()
400 if (!table->icm) mlx4_init_icm_table()
402 table->virt = virt; mlx4_init_icm_table()
403 table->num_icm = num_icm; mlx4_init_icm_table()
404 table->num_obj = nobj; mlx4_init_icm_table()
405 table->obj_size = obj_size; mlx4_init_icm_table()
406 table->lowmem = use_lowmem; mlx4_init_icm_table()
407 table->coherent = use_coherent; mlx4_init_icm_table()
408 mutex_init(&table->mutex); mlx4_init_icm_table()
417 table->icm[i] = mlx4_alloc_icm(dev, chunk_size >> PAGE_SHIFT, mlx4_init_icm_table()
420 if (!table->icm[i]) mlx4_init_icm_table()
422 if (mlx4_MAP_ICM(dev, table->icm[i], virt + i * MLX4_TABLE_CHUNK_SIZE)) { mlx4_init_icm_table()
423 mlx4_free_icm(dev, table->icm[i], use_coherent); mlx4_init_icm_table()
424 table->icm[i] = NULL; mlx4_init_icm_table()
432 ++table->icm[i]->refcount; mlx4_init_icm_table()
439 if (table->icm[i]) { mlx4_init_icm_table()
442 mlx4_free_icm(dev, table->icm[i], use_coherent); mlx4_init_icm_table()
445 kfree(table->icm); mlx4_init_icm_table()
450 void mlx4_cleanup_icm_table(struct mlx4_dev *dev, struct mlx4_icm_table *table) mlx4_cleanup_icm_table() argument
454 for (i = 0; i < table->num_icm; ++i) mlx4_cleanup_icm_table()
455 if (table->icm[i]) { mlx4_cleanup_icm_table()
456 mlx4_UNMAP_ICM(dev, table->virt + i * MLX4_TABLE_CHUNK_SIZE, mlx4_cleanup_icm_table()
458 mlx4_free_icm(dev, table->icm[i], table->coherent); mlx4_cleanup_icm_table()
461 kfree(table->icm); mlx4_cleanup_icm_table()
H A Dport.c56 void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table) mlx4_init_mac_table() argument
60 mutex_init(&table->mutex); mlx4_init_mac_table()
62 table->entries[i] = 0; mlx4_init_mac_table()
63 table->refs[i] = 0; mlx4_init_mac_table()
65 table->max = 1 << dev->caps.log_num_macs; mlx4_init_mac_table()
66 table->total = 0; mlx4_init_mac_table()
69 void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table) mlx4_init_vlan_table() argument
73 mutex_init(&table->mutex); mlx4_init_vlan_table()
75 table->entries[i] = 0; mlx4_init_vlan_table()
76 table->refs[i] = 0; mlx4_init_vlan_table()
78 table->max = (1 << dev->caps.log_num_vlans) - MLX4_VLAN_REGULAR; mlx4_init_vlan_table()
79 table->total = 0; mlx4_init_vlan_table()
83 struct mlx4_roce_gid_table *table) mlx4_init_roce_gid_table()
87 mutex_init(&table->mutex); mlx4_init_roce_gid_table()
89 memset(table->roce_gids[i].raw, 0, MLX4_ROCE_GID_ENTRY_SIZE); mlx4_init_roce_gid_table()
93 struct mlx4_mac_table *table, int index) validate_index()
97 if (index < 0 || index >= table->max || !table->entries[index]) { validate_index()
105 struct mlx4_mac_table *table, u64 mac) find_index()
110 if (table->refs[i] && find_index()
112 (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) find_index()
145 struct mlx4_mac_table *table = &info->mac_table; mlx4_find_cached_mac() local
149 if (!table->refs[i]) mlx4_find_cached_mac()
152 if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { mlx4_find_cached_mac()
165 struct mlx4_mac_table *table = &info->mac_table; __mlx4_register_mac() local
172 mutex_lock(&table->mutex); __mlx4_register_mac()
174 if (!table->refs[i]) { __mlx4_register_mac()
181 (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { __mlx4_register_mac()
184 ++table->refs[i]; __mlx4_register_mac()
191 if (table->total == table->max) { __mlx4_register_mac()
198 table->entries[free] = cpu_to_be64(mac | MLX4_MAC_VALID); __mlx4_register_mac()
200 err = mlx4_set_port_mac_table(dev, port, table->entries); __mlx4_register_mac()
204 table->entries[free] = 0; __mlx4_register_mac()
207 table->refs[free] = 1; __mlx4_register_mac()
209 ++table->total; __mlx4_register_mac()
211 mutex_unlock(&table->mutex); __mlx4_register_mac()
256 struct mlx4_mac_table *table; __mlx4_unregister_mac() local
264 table = &info->mac_table; __mlx4_unregister_mac()
265 mutex_lock(&table->mutex); __mlx4_unregister_mac()
266 index = find_index(dev, table, mac); __mlx4_unregister_mac()
268 if (validate_index(dev, table, index)) __mlx4_unregister_mac()
270 if (--table->refs[index]) { __mlx4_unregister_mac()
271 mlx4_dbg(dev, "Have more references for index %d, no need to modify mac table\n", __mlx4_unregister_mac()
276 table->entries[index] = 0; __mlx4_unregister_mac()
277 mlx4_set_port_mac_table(dev, port, table->entries); __mlx4_unregister_mac()
278 --table->total; __mlx4_unregister_mac()
280 mutex_unlock(&table->mutex); __mlx4_unregister_mac()
311 struct mlx4_mac_table *table = &info->mac_table; __mlx4_replace_mac() local
316 mutex_lock(&table->mutex); __mlx4_replace_mac()
318 err = validate_index(dev, table, index); __mlx4_replace_mac()
322 table->entries[index] = cpu_to_be64(new_mac | MLX4_MAC_VALID); __mlx4_replace_mac()
324 err = mlx4_set_port_mac_table(dev, port, table->entries); __mlx4_replace_mac()
328 table->entries[index] = 0; __mlx4_replace_mac()
331 mutex_unlock(&table->mutex); __mlx4_replace_mac()
360 struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table; mlx4_find_cached_vlan() local
364 if (table->refs[i] && mlx4_find_cached_vlan()
366 be32_to_cpu(table->entries[i])))) { mlx4_find_cached_vlan()
380 struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table; __mlx4_register_vlan() local
384 mutex_lock(&table->mutex); __mlx4_register_vlan()
386 if (table->total == table->max) { __mlx4_register_vlan()
393 if (free < 0 && (table->refs[i] == 0)) { __mlx4_register_vlan()
398 if (table->refs[i] && __mlx4_register_vlan()
400 be32_to_cpu(table->entries[i])))) { __mlx4_register_vlan()
403 ++table->refs[i]; __mlx4_register_vlan()
414 table->refs[free] = 1; __mlx4_register_vlan()
415 table->entries[free] = cpu_to_be32(vlan | MLX4_VLAN_VALID); __mlx4_register_vlan()
417 err = mlx4_set_port_vlan_table(dev, port, table->entries); __mlx4_register_vlan()
420 table->refs[free] = 0; __mlx4_register_vlan()
421 table->entries[free] = 0; __mlx4_register_vlan()
426 ++table->total; __mlx4_register_vlan()
428 mutex_unlock(&table->mutex); __mlx4_register_vlan()
456 struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table; __mlx4_unregister_vlan() local
459 mutex_lock(&table->mutex); __mlx4_unregister_vlan()
461 mlx4_warn(dev, "vlan 0x%x is not in the vlan table\n", vlan); __mlx4_unregister_vlan()
470 if (--table->refs[index]) { __mlx4_unregister_vlan()
471 mlx4_dbg(dev, "Have %d more references for index %d, no need to modify vlan table\n", __mlx4_unregister_vlan()
472 table->refs[index], index); __mlx4_unregister_vlan()
475 table->entries[index] = 0; __mlx4_unregister_vlan()
476 mlx4_set_port_vlan_table(dev, port, table->entries); __mlx4_unregister_vlan()
477 --table->total; __mlx4_unregister_vlan()
479 mutex_unlock(&table->mutex); __mlx4_unregister_vlan()
625 /* Zero-out gids belonging to that slave in the port GID table */ mlx4_reset_roce_port_gids()
630 /* Now, copy roce port gids table to mailbox for passing to FW */ mlx4_reset_roce_port_gids()
680 mlx4_warn(dev, "Could not reset ETH port GID table for slave %d, port %d (%d)\n", mlx4_reset_roce_gids()
795 * entries in the port GID table mlx4_common_set_port()
827 /* Now, copy roce port gids table to current mailbox for passing to FW */ mlx4_common_set_port()
885 * MTU or PKEY table size mlx4_common_set_port()
1205 * table and not a globally unique slave number. mlx4_get_slave_from_roce_gid()
82 mlx4_init_roce_gid_table(struct mlx4_dev *dev, struct mlx4_roce_gid_table *table) mlx4_init_roce_gid_table() argument
92 validate_index(struct mlx4_dev *dev, struct mlx4_mac_table *table, int index) validate_index() argument
104 find_index(struct mlx4_dev *dev, struct mlx4_mac_table *table, u64 mac) find_index() argument
/linux-4.1.27/net/xfrm/
H A Dxfrm_sysctl.c45 struct ctl_table *table; xfrm_sysctl_init() local
49 table = kmemdup(xfrm_table, sizeof(xfrm_table), GFP_KERNEL); xfrm_sysctl_init()
50 if (!table) xfrm_sysctl_init()
52 table[0].data = &net->xfrm.sysctl_aevent_etime; xfrm_sysctl_init()
53 table[1].data = &net->xfrm.sysctl_aevent_rseqth; xfrm_sysctl_init()
54 table[2].data = &net->xfrm.sysctl_larval_drop; xfrm_sysctl_init()
55 table[3].data = &net->xfrm.sysctl_acq_expires; xfrm_sysctl_init()
59 table[0].procname = NULL; xfrm_sysctl_init()
61 net->xfrm.sysctl_hdr = register_net_sysctl(net, "net/core", table); xfrm_sysctl_init()
67 kfree(table); xfrm_sysctl_init()
74 struct ctl_table *table; xfrm_sysctl_fini() local
76 table = net->xfrm.sysctl_hdr->ctl_table_arg; xfrm_sysctl_fini()
78 kfree(table); xfrm_sysctl_fini()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192ee/
H A DMakefile10 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8723ae/
H A DMakefile12 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8723be/
H A DMakefile10 table.o \
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8821ae/
H A DMakefile10 table.o \
/linux-4.1.27/net/wimax/
H A DMakefile5 id-table.o \
/linux-4.1.27/drivers/acpi/acpica/
H A Dutfileio.c59 acpi_ut_check_text_mode_corruption(u8 *table,
64 struct acpi_table_header **table, u32 *table_length);
70 * PARAMETERS: table - Table buffer
71 * table_length - Length of table from the table header
72 * file_length - Length of the file that contains the table
76 * DESCRIPTION: Check table for text mode file corruption where all linefeed
83 acpi_ut_check_text_mode_corruption(u8 *table, u32 table_length, u32 file_length) acpi_ut_check_text_mode_corruption() argument
90 "File length (0x%X) is not the same as the table length (0x%X)", acpi_ut_check_text_mode_corruption()
94 /* Scan entire table to determine if each LF has been prefixed with a CR */ acpi_ut_check_text_mode_corruption()
97 if (table[i] == 0x0A) { acpi_ut_check_text_mode_corruption()
98 if (table[i - 1] != 0x0D) { acpi_ut_check_text_mode_corruption()
100 /* The LF does not have a preceding CR, table not corrupted */ acpi_ut_check_text_mode_corruption()
117 * Entire table scanned, each CR is part of a CR/LF pair -- acpi_ut_check_text_mode_corruption()
118 * meaning that the table was treated as a text file somewhere. acpi_ut_check_text_mode_corruption()
120 * NOTE: We can't "fix" the table, because any existing CR/LF pairs in the acpi_ut_check_text_mode_corruption()
121 * original table are left untouched by the text conversion process -- acpi_ut_check_text_mode_corruption()
134 * PARAMETERS: fp - File that contains table
135 * table - Return value, buffer with table
136 * table_length - Return value, length of table
146 struct acpi_table_header **table, u32 *table_length) acpi_ut_read_table()
172 acpi_os_printf("Could not read the table header\n"); acpi_ut_read_table()
176 /* The RSDP table does not have standard ACPI header */ acpi_ut_read_table()
184 /* Validate the table header/length */ acpi_ut_read_table()
210 /* We only support a limited number of table types */ acpi_ut_read_table()
230 /* Allocate a buffer for the table */ acpi_ut_read_table()
232 *table = acpi_os_allocate((size_t) file_size); acpi_ut_read_table()
233 if (!*table) { acpi_ut_read_table()
235 ("Could not allocate memory for ACPI table %4.4s (size=0x%X)\n", acpi_ut_read_table()
240 /* Get the rest of the table */ acpi_ut_read_table()
243 actual = fread(*table, 1, (size_t) file_size, fp); acpi_ut_read_table()
249 status = acpi_tb_verify_checksum((void *)*table, acpi_ut_read_table()
252 *table)-> acpi_ut_read_table()
258 *table, acpi_ut_read_table()
260 (*table)-> acpi_ut_read_table()
269 acpi_os_printf("Warning - reading table, asked for %X got %X\n", acpi_ut_read_table()
274 acpi_os_printf("Error - could not read the table file\n"); acpi_ut_read_table()
275 acpi_os_free(*table); acpi_ut_read_table()
276 *table = NULL; acpi_ut_read_table()
285 * PARAMETERS: filename - File where table is located
286 * table - Where a pointer to the table is returned
290 * DESCRIPTION: Get an ACPI table from a file
295 acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table) acpi_ut_read_table_from_file() argument
318 "Loading Acpi table from file %10s - Length %.8u (%06X)\n", acpi_ut_read_table_from_file()
321 status = acpi_ut_read_table(file, table, &table_length); acpi_ut_read_table_from_file()
323 acpi_os_printf("Could not get table from the file\n"); acpi_ut_read_table_from_file()
145 acpi_ut_read_table(FILE * fp, struct acpi_table_header **table, u32 *table_length) acpi_ut_read_table() argument
H A Dexconfig.c70 * PARAMETERS: table - Pointer to raw table
71 * parent_node - Where to load the table (scope)
72 * ddb_handle - Where to return the table handle.
76 * DESCRIPTION: Common function to Install and Load an ACPI table with a
77 * returned table handle.
92 /* Create an object to be the table handle */ acpi_ex_add_table()
99 /* Init the table handle */ acpi_ex_add_table()
105 /* Install the new table into the local data structures */ acpi_ex_add_table()
109 /* Add the table to the namespace */ acpi_ex_add_table()
118 /* Execute any module-level code that was found in the table */ acpi_ex_add_table()
127 * that may have been loaded by this table. acpi_ex_add_table()
146 * DESCRIPTION: Load an ACPI table from the RSDT/XSDT
160 struct acpi_table_header *table; acpi_ex_load_table_op() local
173 /* Find the ACPI table in the RSDT/XSDT */ acpi_ex_load_table_op()
204 * location within the namespace where the table will be loaded. acpi_ex_load_table_op()
236 /* Load the table into the namespace */ acpi_ex_load_table_op()
261 status = acpi_get_table_by_index(table_index, &table); acpi_ex_load_table_op()
264 acpi_tb_print_table_header(0, table); acpi_ex_load_table_op()
267 /* Invoke table handler if present */ acpi_ex_load_table_op()
270 (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, acpi_ex_load_table_op()
323 * PARAMETERS: obj_desc - Region or Buffer/Field where the table will be
325 * target - Where a handle to the table will be stored
330 * DESCRIPTION: Load an ACPI table from a field or operation region
347 struct acpi_table_header *table; acpi_ex_load_op() local
360 "Load table from Region %p\n", obj_desc)); acpi_ex_load_op()
379 /* Get the table header first so we can get the table length */ acpi_ex_load_op()
397 /* Must have at least an ACPI table header */ acpi_ex_load_op()
404 * The original implementation simply mapped the table, with no copy. acpi_ex_load_op()
406 * we must copy the table to a local buffer. For example, the memory acpi_ex_load_op()
411 * We use the low-level operation region interface to read the table acpi_ex_load_op()
419 /* Allocate a buffer for the table */ acpi_ex_load_op()
421 table = ACPI_ALLOCATE(length); acpi_ex_load_op()
422 if (!table) { acpi_ex_load_op()
426 /* Read the entire table */ acpi_ex_load_op()
429 ACPI_CAST_PTR(u8, table)); acpi_ex_load_op()
431 ACPI_FREE(table); acpi_ex_load_op()
439 "Load table from Buffer or Field %p\n", acpi_ex_load_op()
442 /* Must have at least an ACPI table header */ acpi_ex_load_op()
448 /* Get the actual table length from the table header */ acpi_ex_load_op()
465 * Copy the table from the buffer because the buffer could be modified acpi_ex_load_op()
468 table = ACPI_ALLOCATE(length); acpi_ex_load_op()
469 if (!table) { acpi_ex_load_op()
473 ACPI_MEMCPY(table, table_header, length); acpi_ex_load_op()
481 /* Install the new table into the local data structures */ acpi_ex_load_op()
486 status = acpi_tb_install_standard_table(ACPI_PTR_TO_PHYSADDR(table), acpi_ex_load_op()
493 /* Delete allocated table buffer */ acpi_ex_load_op()
495 ACPI_FREE(table); acpi_ex_load_op()
500 * Note: Now table is "INSTALLED", it must be validated before acpi_ex_load_op()
511 * Add the table to the namespace. acpi_ex_load_op()
513 * Note: Load the table objects relative to the root of the namespace. acpi_ex_load_op()
542 /* Invoke table handler if present */ acpi_ex_load_op()
545 (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, acpi_ex_load_op()
556 * PARAMETERS: ddb_handle - Handle to a previously loaded table
560 * DESCRIPTION: Unload an ACPI table
569 struct acpi_table_header *table; acpi_ex_unload_table() local
578 ACPI_WARNING((AE_INFO, "Received request to unload an ACPI table")); acpi_ex_unload_table()
587 * ddb_handle must still be marked valid (table has not been previously acpi_ex_unload_table()
597 /* Get the table index from the ddb_handle */ acpi_ex_unload_table()
601 /* Ensure the table is still loaded */ acpi_ex_unload_table()
607 /* Invoke table handler if present */ acpi_ex_unload_table()
610 status = acpi_get_table_by_index(table_index, &table); acpi_ex_unload_table()
613 table, acpi_ex_unload_table()
618 /* Delete the portion of the namespace owned by this table */ acpi_ex_unload_table()
H A Dtbinstal.c3 * Module Name: tbinstal - ACPI table installation and removal
60 * table_index - Index of table 2 to be compared
64 * DESCRIPTION: This function compares a table with another table that has
65 * already been installed in the root table list.
74 struct acpi_table_header *table; acpi_tb_compare_tables() local
80 &table, &table_length, &table_flags); acpi_tb_compare_tables()
86 * Check for a table match on the entire table length, acpi_tb_compare_tables()
90 ACPI_MEMCMP(table_desc->pointer, table, acpi_tb_compare_tables()
93 /* Release the acquired table */ acpi_tb_compare_tables()
95 acpi_tb_release_table(table, table_length, table_flags); acpi_tb_compare_tables()
103 * PARAMETERS: table_index - Index into root table array
104 * new_table_desc - New table descriptor to install
109 * DESCRIPTION: Install an ACPI table into the global data structure. The
110 * table override mechanism is called to allow the host
111 * OS to replace any table before it is installed in the root
112 * table array.
129 * Before we install the table, let the host OS override it with a new acpi_tb_install_table_with_override()
130 * one if desired. Any table within the RSDT/XSDT can be replaced, acpi_tb_install_table_with_override()
160 * table_index - Index into root table array
164 * DESCRIPTION: Install a fixed ACPI table (DSDT/FACS) into the global data
180 "Null physical address for ACPI table [%s]", acpi_tb_install_fixed_table()
185 /* Fill a table descriptor for validation */ acpi_tb_install_fixed_table()
191 "Could not acquire table length at %8.8X%8.8X", acpi_tb_install_fixed_table()
196 /* Validate and verify a table before installation */ acpi_tb_install_fixed_table()
207 /* Release the temporary table descriptor */ acpi_tb_install_fixed_table()
217 * PARAMETERS: address - Address of the table (might be a virtual
219 * flags - Flags for the table
222 * table_index - Where the table index is returned
226 * DESCRIPTION: This function is called to install an ACPI table that is
227 * neither DSDT nor FACS (a "standard" table.)
230 * After sucessfully returning from this function, table is
246 /* Acquire a temporary table descriptor for validation */ acpi_tb_install_standard_table()
251 "Could not acquire table length at %8.8X%8.8X", acpi_tb_install_standard_table()
270 /* Validate and verify a table before installation */ acpi_tb_install_standard_table()
279 * Validate the incoming table signature. acpi_tb_install_standard_table()
281 * 1) Originally, we checked the table signature for "SSDT" or "PSDT". acpi_tb_install_standard_table()
308 /* Check if table is already registered */ acpi_tb_install_standard_table()
313 * Check for a table match on the entire table length, acpi_tb_install_standard_table()
321 * Note: the current mechanism does not unregister a table if it is acpi_tb_install_standard_table()
323 * but the table remains in the root table list. acpi_tb_install_standard_table()
327 * in just keeping the table in case it is needed again. acpi_tb_install_standard_table()
330 * machines with many table load/unload operations), tables will acpi_tb_install_standard_table()
332 * root table list should be reused when empty. acpi_tb_install_standard_table()
357 /* Add the table to the global root table list */ acpi_tb_install_standard_table()
369 /* Release the temporary table descriptor */ acpi_tb_install_standard_table()
379 * PARAMETERS: old_table_desc - Validated table descriptor to be
384 * DESCRIPTION: Attempt table override by calling the OSL override functions.
385 * Note: If the table is overridden, then the entire new table
387 * Before/after invocation, the table descriptor is in a state
397 struct acpi_table_header *table; acpi_tb_override_table() local
403 status = acpi_os_table_override(old_table_desc->pointer, &table); acpi_tb_override_table()
404 if (ACPI_SUCCESS(status) && table) { acpi_tb_override_table()
406 ACPI_PTR_TO_PHYSADDR(table), acpi_tb_override_table()
427 /* Validate and verify a table before overriding */ acpi_tb_override_table()
435 " %s table override, new table: 0x%8.8X%8.8X", acpi_tb_override_table()
440 /* We can now uninstall the original table */ acpi_tb_override_table()
445 * Replace the original table descriptor and keep its state as acpi_tb_override_table()
453 /* Release the temporary table descriptor */ acpi_tb_override_table()
466 * DESCRIPTION: Delete one internal ACPI table
H A Dtbdata.c57 * address - Physical address of the table
58 * flags - Allocation flags of the table
59 * table - Pointer to the table
63 * DESCRIPTION: Initialize a new table descriptor
69 u8 flags, struct acpi_table_header *table) acpi_tb_init_table_descriptor()
73 * Initialize the table descriptor. Set the pointer to NULL, since the acpi_tb_init_table_descriptor()
74 * table is not fully mapped at this time. acpi_tb_init_table_descriptor()
78 table_desc->length = table->length; acpi_tb_init_table_descriptor()
80 ACPI_MOVE_32_TO_32(table_desc->signature.ascii, table->signature); acpi_tb_init_table_descriptor()
88 * table_ptr - Where table is returned
89 * table_length - Where table length is returned
90 * table_flags - Where table allocation flags are returned
94 * DESCRIPTION: Acquire an ACPI table. It can be used for tables not
104 struct acpi_table_header *table = NULL; acpi_tb_acquire_table() local
109 table = acpi_tb_acquire_table()
116 table = ACPI_CAST_PTR(struct acpi_table_header, acpi_tb_acquire_table()
128 if (!table) { acpi_tb_acquire_table()
134 *table_ptr = table; acpi_tb_acquire_table()
144 * PARAMETERS: table - Pointer for the table
145 * table_length - Length for the table
146 * table_flags - Allocation flags for the table
150 * DESCRIPTION: Release a table. The inverse of acpi_tb_acquire_table().
155 acpi_tb_release_table(struct acpi_table_header *table, acpi_tb_release_table() argument
162 acpi_os_unmap_memory(table, table_length); acpi_tb_release_table()
178 * address - Address of the table
179 * flags - Allocation flags of the table
183 * DESCRIPTION: This function validates the table header to obtain the length
184 * of a table and fills the table descriptor to make its state as
185 * "INSTALLED". Such a table descriptor is only used for verified
199 /* Get the length of the full table from the header */ acpi_tb_acquire_temp_table()
268 * DESCRIPTION: This function is called to validate the table, the returned
269 * table descriptor is in "VALIDATED" state.
279 /* Validate the table if necessary */ acpi_tb_validate_table()
301 * DESCRIPTION: Invalidate one internal ACPI table, this is the inverse of
332 * DESCRIPTION: This function is called to validate the table, the returned
333 * table descriptor is in "VALIDATED" state.
342 * Only validates the header of the table. acpi_tb_validate_temp_table()
348 * table length obtaining from the table header. acpi_tb_validate_temp_table()
365 * DESCRIPTION: This function is called to validate and verify the table, the
366 * returned table descriptor is in "VALIDATED" state.
377 /* Validate the table */ acpi_tb_verify_temp_table()
388 "Invalid signature 0x%X for ACPI table, expected [%s]", acpi_tb_verify_temp_table()
403 " Attempted table install failed", acpi_tb_verify_temp_table()
429 * DESCRIPTION: Expand the size of global table array
461 "Could not allocate new root table array")); acpi_tb_resize_root_table_list()
465 /* Copy and free the previous table array */ acpi_tb_resize_root_table_list()
489 * PARAMETERS: table_index - Where table index is returned
490 * table_desc - Where table descriptor is returned
492 * RETURN: Status and table index/descriptor.
494 * DESCRIPTION: Allocate a new ACPI table entry to the global table list
505 /* Ensure that there is room for the table in the Root Table List */ acpi_tb_get_next_table_descriptor()
555 * Delete the root table array if allocated locally. Array cannot be acpi_tb_terminate()
580 * DESCRIPTION: Delete all namespace objects created when this table was loaded.
598 /* The table index does not exist */ acpi_tb_delete_namespace_by_owner()
604 /* Get the owner ID for this table, used to delete namespace nodes */ acpi_tb_delete_namespace_by_owner()
695 * owner_id - Where the table owner_id is returned
699 * DESCRIPTION: returns owner_id for the ACPI table
724 * PARAMETERS: table_index - Index into the root table
750 * is_loaded - TRUE if table is loaded, FALSE otherwise
754 * DESCRIPTION: Sets the table loaded flag to either TRUE or FALSE.
67 acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc, acpi_physical_address address, u8 flags, struct acpi_table_header *table) acpi_tb_init_table_descriptor() argument
H A Dtbutils.c166 * PARAMETERS: table_desc - Installed table to copy
210 * PARAMETERS: table_entry - Pointer to the RSDT/XSDT table entry
213 * RETURN: Physical address extracted from the root table
215 * DESCRIPTION: Get one root table entry. Handles 32-bit and 64-bit cases on
229 * Get the table physical address (32-bit for RSDT, 64-bit for XSDT): acpi_tb_get_root_table_entry()
234 * 32-bit platform, RSDT: Return 32-bit table entry acpi_tb_get_root_table_entry()
285 struct acpi_table_header *table; acpi_tb_parse_root_table() local
317 /* Root table is an RSDT (32-bit physical addresses) */ acpi_tb_parse_root_table()
329 /* Map the RSDT/XSDT table header to get the full table length */ acpi_tb_parse_root_table()
331 table = acpi_os_map_memory(address, sizeof(struct acpi_table_header)); acpi_tb_parse_root_table()
332 if (!table) { acpi_tb_parse_root_table()
336 acpi_tb_print_table_header(address, table); acpi_tb_parse_root_table()
339 * Validate length of the table, and map entire table. acpi_tb_parse_root_table()
340 * Minimum length table must contain at least one entry. acpi_tb_parse_root_table()
342 length = table->length; acpi_tb_parse_root_table()
343 acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); acpi_tb_parse_root_table()
347 "Invalid table length 0x%X in RSDT/XSDT", acpi_tb_parse_root_table()
352 table = acpi_os_map_memory(address, length); acpi_tb_parse_root_table()
353 if (!table) { acpi_tb_parse_root_table()
357 /* Validate the root table checksum */ acpi_tb_parse_root_table()
359 status = acpi_tb_verify_checksum(table, length); acpi_tb_parse_root_table()
361 acpi_os_unmap_memory(table, length); acpi_tb_parse_root_table()
367 table_count = (u32)((table->length - sizeof(struct acpi_table_header)) / acpi_tb_parse_root_table()
369 table_entry = ACPI_ADD_PTR(u8, table, sizeof(struct acpi_table_header)); acpi_tb_parse_root_table()
372 * First three entries in the table array are reserved for the DSDT acpi_tb_parse_root_table()
378 /* Initialize the root table array from the RSDT/XSDT */ acpi_tb_parse_root_table()
382 /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */ acpi_tb_parse_root_table()
410 acpi_os_unmap_memory(table, length); acpi_tb_parse_root_table()
H A Drsdump.c82 acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table);
159 * PARAMETERS: route_table - Pointer to the routing table to dump.
163 * DESCRIPTION: Print IRQ routing table
182 /* Dump all table elements, Exit on zero length element */ acpi_rs_dump_irq_list()
199 * table - Table entry to decode the resource
203 * DESCRIPTION: Dump a resource descriptor based on a dump table entry.
208 acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) acpi_rs_dump_descriptor() argument
215 /* First table entry must contain the table length (# of table entries) */ acpi_rs_dump_descriptor()
217 count = table->offset; acpi_rs_dump_descriptor()
221 target = ACPI_ADD_PTR(u8, resource, table->offset); acpi_rs_dump_descriptor()
222 name = table->name; acpi_rs_dump_descriptor()
224 switch (table->opcode) { acpi_rs_dump_descriptor()
229 if (table->name) { acpi_rs_dump_descriptor()
239 ACPI_CAST_PTR(char, table->pointer)); acpi_rs_dump_descriptor()
251 if (table->pointer) { acpi_rs_dump_descriptor()
253 table-> acpi_rs_dump_descriptor()
281 table-> acpi_rs_dump_descriptor()
289 table-> acpi_rs_dump_descriptor()
297 table-> acpi_rs_dump_descriptor()
305 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
317 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
331 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
343 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
355 * Note: The list length is obtained from the previous table entry acpi_rs_dump_descriptor()
385 acpi_os_printf("**** Invalid table opcode [%X] ****\n", acpi_rs_dump_descriptor()
386 table->opcode); acpi_rs_dump_descriptor()
390 table++; acpi_rs_dump_descriptor()
H A Dtbxface.c3 * Module Name: tbxface - ACPI table-oriented external interfaces
62 * DESCRIPTION: Allocate a root table array. Used by iASL compiler and
90 * DESCRIPTION: Initialize the table manager, get the RSDP and RSDT/XSDT.
92 * NOTE: Allows static allocation of the initial table array in order
97 * initial_table_array, and the table will be dynamically allocated.
111 * Setup the Root Table Array and allocate the table array acpi_initialize_tables()
143 * Get the root table (RSDT or XSDT) and extract all entries to the local acpi_initialize_tables()
174 * Only reallocate the root table if the host provided a static buffer ACPI_EXPORT_SYMBOL_INIT()
175 * for the table array in the call to acpi_initialize_tables. ACPI_EXPORT_SYMBOL_INIT()
193 * PARAMETERS: signature - ACPI signature of needed table ACPI_EXPORT_SYMBOL_INIT()
195 * out_table_header - The pointer to the table header to fill ACPI_EXPORT_SYMBOL_INIT()
197 * RETURN: Status and pointer to mapped table header ACPI_EXPORT_SYMBOL_INIT()
199 * DESCRIPTION: Finds an ACPI table header. ACPI_EXPORT_SYMBOL_INIT()
219 /* Walk the root table list */ ACPI_EXPORT_SYMBOL_INIT()
270 * PARAMETERS: signature - ACPI signature of needed table ACPI_EXPORT_SYMBOL()
272 * out_table - Where the pointer to the table is returned ACPI_EXPORT_SYMBOL()
274 * RETURN: Status and pointer to the requested table ACPI_EXPORT_SYMBOL()
276 * DESCRIPTION: Finds and verifies an ACPI table. Table must be in the ACPI_EXPORT_SYMBOL()
295 /* Walk the root table list */ ACPI_EXPORT_SYMBOL()
345 * table - Where the pointer to the table is returned ACPI_EXPORT_SYMBOL()
347 * RETURN: Status and pointer to the requested table ACPI_EXPORT_SYMBOL()
349 * DESCRIPTION: Obtain a table by an index into the global table list. Used ACPI_EXPORT_SYMBOL()
354 acpi_get_table_by_index(u32 table_index, struct acpi_table_header ** table) ACPI_EXPORT_SYMBOL()
362 if (!table) { ACPI_EXPORT_SYMBOL()
388 *table = acpi_gbl_root_table_list.tables[table_index].pointer; ACPI_EXPORT_SYMBOL()
404 * DESCRIPTION: Install a global table event handler. ACPI_EXPORT_SYMBOL()
451 * DESCRIPTION: Remove a table event handler ACPI_EXPORT_SYMBOL()
H A Dtbxfload.c150 * Save the original DSDT header for detection of table corruption acpi_tb_load_namespace()
201 * PARAMETERS: address - Address of the ACPI table to be installed.
202 * physical - Whether the address is a physical table
207 * DESCRIPTION: Dynamically install an ACPI table.
240 * PARAMETERS: table - Pointer to a buffer containing the ACPI ACPI_EXPORT_SYMBOL_INIT()
241 * table to be loaded. ACPI_EXPORT_SYMBOL_INIT()
245 * DESCRIPTION: Dynamically load an ACPI table from the caller's buffer. Must ACPI_EXPORT_SYMBOL_INIT()
246 * be a valid ACPI table with a valid ACPI table header. ACPI_EXPORT_SYMBOL_INIT()
248 * Note2: Does not copy the incoming table. User is responsible ACPI_EXPORT_SYMBOL_INIT()
249 * to ensure that the table is not deleted or unmapped. ACPI_EXPORT_SYMBOL_INIT()
252 acpi_status acpi_load_table(struct acpi_table_header *table) ACPI_EXPORT_SYMBOL_INIT()
261 if (!table) { ACPI_EXPORT_SYMBOL_INIT()
272 /* Install the table and load it into the namespace */ ACPI_EXPORT_SYMBOL_INIT()
277 status = acpi_tb_install_standard_table(ACPI_PTR_TO_PHYSADDR(table), ACPI_EXPORT_SYMBOL_INIT()
287 * Note: Now table is "INSTALLED", it must be validated before ACPI_EXPORT_SYMBOL_INIT()
299 /* Invoke table handler if present */ ACPI_EXPORT_SYMBOL_INIT()
302 (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, ACPI_EXPORT_SYMBOL_INIT()
318 * the table to be unloaded ACPI_EXPORT_SYMBOL()
322 * DESCRIPTION: Via any namespace object within an SSDT or OEMx table, unloads ACPI_EXPORT_SYMBOL()
323 * the table and deletes all namespace objects associated with ACPI_EXPORT_SYMBOL()
324 * that table. Unloading of the DSDT is not allowed. ACPI_EXPORT_SYMBOL()
345 * The node owner_id is currently the same as the parent table ID. ACPI_EXPORT_SYMBOL()
363 /* Find the table in the global table list */ ACPI_EXPORT_SYMBOL()
383 /* Ensure the table is actually loaded */ ACPI_EXPORT_SYMBOL()
390 /* Invoke table handler if present */ ACPI_EXPORT_SYMBOL()
400 * Delete all namespace objects owned by this table. Note that ACPI_EXPORT_SYMBOL()
H A Dtbfind.c3 * Module Name: tbfind - find table
55 * PARAMETERS: signature - String with ACPI table signature
56 * oem_id - String with the table OEM ID
58 * table_index - Where the table index is returned
60 * RETURN: Status and table index
62 * DESCRIPTION: Find an ACPI table (in the RSDT/XSDT) that matches the
64 * be used to get the table header or entire table.
84 /* Search for the table */ acpi_tb_find_table()
90 /* Not the requested table */ acpi_tb_find_table()
113 /* Check for table match on all IDs */ acpi_tb_find_table()
133 "Found table [%4.4s]\n", acpi_tb_find_table()
H A Dtbprint.c89 * header - Input ACPI table header
93 * DESCRIPTION: Copy the table header and ensure that all "string" fields in
120 * DESCRIPTION: Print an ACPI table header. Special cases for FACS and RSDP.
156 /* Standard ACPI table with full common header */ acpi_tb_print_table_header()
176 * PARAMETERS: table - ACPI table to verify
177 * length - Length of entire table
181 * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
186 acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) acpi_tb_verify_checksum() argument
195 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_S3PT) || acpi_tb_verify_checksum()
196 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_FACS)) { acpi_tb_verify_checksum()
200 /* Compute the checksum on the table */ acpi_tb_verify_checksum()
202 checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length); acpi_tb_verify_checksum()
208 "Incorrect checksum in table [%4.4s] - 0x%2.2X, " acpi_tb_verify_checksum()
210 table->signature, table->checksum, acpi_tb_verify_checksum()
211 (u8)(table->checksum - checksum))); acpi_tb_verify_checksum()
H A Dactables.h3 * Name: actables.h - ACPI table management
59 * tbdata - table data structure management
68 u8 flags, struct acpi_table_header *table);
90 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
93 * tbfind - find ACPI table
116 acpi_tb_release_table(struct acpi_table_header *table,
137 * tbutils - table manager utilities
150 acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
/linux-4.1.27/drivers/cpufreq/
H A Dcpufreq_opp.c24 * dev_pm_opp_init_cpufreq_table() - create a cpufreq table for a device
26 * @table: Cpufreq table returned back to caller
28 * Generate a cpufreq table for a provided device- this assumes that the
31 * This function allocates required memory for the cpufreq table. It is
33 * the table as required.
36 * if no memory available for the operation (table is not populated), returns 0
37 * if successful and table is populated.
40 * the table if any of the mentioned functions have been invoked in the interim.
48 struct cpufreq_frequency_table **table) dev_pm_opp_init_cpufreq_table()
83 *table = &freq_table[0]; dev_pm_opp_init_cpufreq_table()
95 * dev_pm_opp_free_cpufreq_table() - free the cpufreq table
97 * @table: table to free
99 * Free up the table allocated by dev_pm_opp_init_cpufreq_table
102 struct cpufreq_frequency_table **table) dev_pm_opp_free_cpufreq_table()
104 if (!table) dev_pm_opp_free_cpufreq_table()
107 kfree(*table); dev_pm_opp_free_cpufreq_table()
108 *table = NULL; dev_pm_opp_free_cpufreq_table()
47 dev_pm_opp_init_cpufreq_table(struct device *dev, struct cpufreq_frequency_table **table) dev_pm_opp_init_cpufreq_table() argument
101 dev_pm_opp_free_cpufreq_table(struct device *dev, struct cpufreq_frequency_table **table) dev_pm_opp_free_cpufreq_table() argument
H A Dfreq_table.c22 struct cpufreq_frequency_table *table) cpufreq_frequency_table_cpuinfo()
29 cpufreq_for_each_valid_entry(pos, table) { cpufreq_for_each_valid_entry()
36 pr_debug("table entry %u: %u kHz\n", (int)(pos - table), freq); cpufreq_for_each_valid_entry()
55 struct cpufreq_frequency_table *table) cpufreq_frequency_table_verify()
66 cpufreq_for_each_valid_entry(pos, table) { cpufreq_for_each_valid_entry()
91 * Generic routine to verify policy & frequency table, requires driver to set
96 struct cpufreq_frequency_table *table = cpufreq_generic_frequency_table_verify() local
98 if (!table) cpufreq_generic_frequency_table_verify()
101 return cpufreq_frequency_table_verify(policy, table); cpufreq_generic_frequency_table_verify()
106 struct cpufreq_frequency_table *table, cpufreq_frequency_table_target()
135 cpufreq_for_each_valid_entry(pos, table) { cpufreq_for_each_valid_entry()
138 i = pos - table; cpufreq_for_each_valid_entry()
176 freq > table[optimal.driver_data].frequency)) { cpufreq_for_each_valid_entry()
191 table[*index].frequency);
200 struct cpufreq_frequency_table *pos, *table; cpufreq_frequency_table_get_index() local
202 table = cpufreq_frequency_get_table(policy->cpu); cpufreq_frequency_table_get_index()
203 if (unlikely(!table)) { cpufreq_frequency_table_get_index()
204 pr_debug("%s: Unable to find frequency table\n", __func__); cpufreq_frequency_table_get_index()
208 cpufreq_for_each_valid_entry(pos, table) cpufreq_frequency_table_get_index()
210 return pos - table; cpufreq_frequency_table_get_index()
223 struct cpufreq_frequency_table *pos, *table = policy->freq_table; show_available_freqs() local
225 if (!table) show_available_freqs()
228 cpufreq_for_each_valid_entry(pos, table) { cpufreq_for_each_valid_entry()
289 struct cpufreq_frequency_table *table) cpufreq_table_validate_and_show()
291 int ret = cpufreq_frequency_table_cpuinfo(policy, table); cpufreq_table_validate_and_show()
294 policy->freq_table = table; cpufreq_table_validate_and_show()
310 MODULE_DESCRIPTION("CPUfreq frequency table helpers");
21 cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table) cpufreq_frequency_table_cpuinfo() argument
54 cpufreq_frequency_table_verify(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table) cpufreq_frequency_table_verify() argument
105 cpufreq_frequency_table_target(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table, unsigned int target_freq, unsigned int relation, unsigned int *index) cpufreq_frequency_table_target() argument
288 cpufreq_table_validate_and_show(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table) cpufreq_table_validate_and_show() argument
H A Dqoriq-cpufreq.c31 * @table: frequency table
35 struct cpufreq_frequency_table *table; member in struct:cpu_data
146 /* reduce the duplicated frequencies in frequency table */ freq_table_redup()
165 /* sort the frequencies in frequency table in descenting order */ freq_table_sort()
171 struct cpufreq_frequency_table table; freq_table_sort() local
187 table.driver_data = freq_table[i].driver_data; freq_table_sort()
188 table.frequency = freq_table[i].frequency; freq_table_sort()
191 freq_table[ind].driver_data = table.driver_data; freq_table_sort()
192 freq_table[ind].frequency = table.frequency; freq_table_sort()
203 struct cpufreq_frequency_table *table; qoriq_cpufreq_cpu_init() local
229 table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL); qoriq_cpufreq_cpu_init()
230 if (!table) { qoriq_cpufreq_cpu_init()
248 table[i].frequency = CPUFREQ_ENTRY_INVALID; qoriq_cpufreq_cpu_init()
250 table[i].frequency = freq / 1000; qoriq_cpufreq_cpu_init()
251 table[i].driver_data = i; qoriq_cpufreq_cpu_init()
253 freq_table_redup(table, count); qoriq_cpufreq_cpu_init()
254 freq_table_sort(table, count); qoriq_cpufreq_cpu_init()
255 table[i].frequency = CPUFREQ_TABLE_END; qoriq_cpufreq_cpu_init()
258 ret = cpufreq_table_validate_and_show(policy, table); qoriq_cpufreq_cpu_init()
260 pr_err("invalid frequency table: %d\n", ret); qoriq_cpufreq_cpu_init()
264 data->table = table; qoriq_cpufreq_cpu_init()
280 kfree(table); qoriq_cpufreq_cpu_init()
297 kfree(data->table); qoriq_cpufreq_cpu_exit()
310 parent = of_clk_get(data->parent, data->table[index].driver_data); qoriq_cpufreq_target()
H A Dsparc-us3-cpufreq.c24 struct cpufreq_frequency_table table[4]; member in struct:us3_freq_percpu_info
139 struct cpufreq_frequency_table *table = us3_freq_cpu_init() local
140 &us3_freq_table[cpu].table[0]; us3_freq_cpu_init()
142 table[0].driver_data = 0; us3_freq_cpu_init()
143 table[0].frequency = clock_tick / 1; us3_freq_cpu_init()
144 table[1].driver_data = 1; us3_freq_cpu_init()
145 table[1].frequency = clock_tick / 2; us3_freq_cpu_init()
146 table[2].driver_data = 2; us3_freq_cpu_init()
147 table[2].frequency = clock_tick / 32; us3_freq_cpu_init()
148 table[3].driver_data = 0; us3_freq_cpu_init()
149 table[3].frequency = CPUFREQ_TABLE_END; us3_freq_cpu_init()
154 return cpufreq_table_validate_and_show(policy, table); us3_freq_cpu_init()
H A Dpxa3xx-cpufreq.c93 struct cpufreq_frequency_table *table; setup_freqs_table() local
96 table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL); setup_freqs_table()
97 if (table == NULL) setup_freqs_table()
101 table[i].driver_data = i; setup_freqs_table()
102 table[i].frequency = freqs[i].cpufreq_mhz * 1000; setup_freqs_table()
104 table[num].driver_data = i; setup_freqs_table()
105 table[num].frequency = CPUFREQ_TABLE_END; setup_freqs_table()
109 pxa3xx_freqs_table = table; setup_freqs_table()
111 return cpufreq_table_validate_and_show(policy, table); setup_freqs_table()
195 pr_err("failed to setup frequency table\n"); pxa3xx_cpufreq_init()
H A Dsparc-us2e-cpufreq.c25 struct cpufreq_frequency_table table[6]; member in struct:us2e_freq_percpu_info
280 struct cpufreq_frequency_table *table = us2e_freq_cpu_init() local
281 &us2e_freq_table[cpu].table[0]; us2e_freq_cpu_init()
283 table[0].driver_data = 0; us2e_freq_cpu_init()
284 table[0].frequency = clock_tick / 1; us2e_freq_cpu_init()
285 table[1].driver_data = 1; us2e_freq_cpu_init()
286 table[1].frequency = clock_tick / 2; us2e_freq_cpu_init()
287 table[2].driver_data = 2; us2e_freq_cpu_init()
288 table[2].frequency = clock_tick / 4; us2e_freq_cpu_init()
289 table[2].driver_data = 3; us2e_freq_cpu_init()
290 table[2].frequency = clock_tick / 6; us2e_freq_cpu_init()
291 table[2].driver_data = 4; us2e_freq_cpu_init()
292 table[2].frequency = clock_tick / 8; us2e_freq_cpu_init()
293 table[2].driver_data = 5; us2e_freq_cpu_init()
294 table[3].frequency = CPUFREQ_TABLE_END; us2e_freq_cpu_init()
299 return cpufreq_table_validate_and_show(policy, table); us2e_freq_cpu_init()
/linux-4.1.27/arch/s390/include/asm/
H A Dpgalloc.h64 unsigned long *table = crst_table_alloc(mm); pud_alloc_one() local
65 if (table) pud_alloc_one()
66 crst_table_init(table, _REGION3_ENTRY_EMPTY); pud_alloc_one()
67 return (pud_t *) table; pud_alloc_one()
73 unsigned long *table = crst_table_alloc(mm); pmd_alloc_one() local
75 if (!table) pmd_alloc_one()
77 crst_table_init(table, _SEGMENT_ENTRY_EMPTY); pmd_alloc_one()
78 if (!pgtable_pmd_page_ctor(virt_to_page(table))) { pmd_alloc_one()
79 crst_table_free(mm, table); pmd_alloc_one()
82 return (pmd_t *) table; pmd_alloc_one()
103 unsigned long *table = crst_table_alloc(mm); pgd_alloc() local
105 if (!table) pgd_alloc()
108 /* Forking a compat process with 2 page table levels */ pgd_alloc()
109 if (!pgtable_pmd_page_ctor(virt_to_page(table))) { pgd_alloc()
110 crst_table_free(mm, table); pgd_alloc()
114 return (pgd_t *) table; pgd_alloc()
136 * page table entry allocation/free routines.
H A Debcdic.h16 extern __u8 _ascebc_500[256]; /* ASCII -> EBCDIC 500 conversion table */
17 extern __u8 _ebcasc_500[256]; /* EBCDIC 500 -> ASCII conversion table */
18 extern __u8 _ascebc[256]; /* ASCII -> EBCDIC conversion table */
19 extern __u8 _ebcasc[256]; /* EBCDIC -> ASCII conversion table */
H A Dtlb.h8 * "A valid table entry must not be changed while it is attached
12 * table entry, or (3) make a change by means of a COMPARE AND SWAP
48 extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
102 * pte_free_tlb frees a pte table and clears the CRSTE for the
103 * page table from the tlb.
112 * pmd_free_tlb frees a pmd table and clears the CRSTE for the
113 * segment table entry from the tlb.
114 * If the mm uses a two level page table the single pmd is freed
128 * pud_free_tlb frees a pud table and clears the CRSTE for the
129 * region third table entry from the tlb.
130 * If the mm uses a three level page table the single pud is freed
/linux-4.1.27/arch/ia64/include/asm/
H A Dmodule.h18 struct elf64_shdr *got; /* global offset table */
20 struct elf64_shdr *unwind; /* unwind-table section */
23 /* paravirt_alt_bundle_patch table */
25 /* paravirt_alt_inst_patch table */
29 void *core_unw_table; /* core unwind-table cookie returned by unwinder */
30 void *init_unw_table; /* init unwind-table cookie returned by unwinder */
H A Dagp.h23 #define free_gatt_pages(table, order) \
24 free_pages((unsigned long)(table), (order))
/linux-4.1.27/net/sched/
H A Dsch_gred.c62 static inline int gred_wred_mode(struct gred_sched *table) gred_wred_mode() argument
64 return test_bit(GRED_WRED_MODE, &table->flags); gred_wred_mode()
67 static inline void gred_enable_wred_mode(struct gred_sched *table) gred_enable_wred_mode() argument
69 __set_bit(GRED_WRED_MODE, &table->flags); gred_enable_wred_mode()
72 static inline void gred_disable_wred_mode(struct gred_sched *table) gred_disable_wred_mode() argument
74 __clear_bit(GRED_WRED_MODE, &table->flags); gred_disable_wred_mode()
77 static inline int gred_rio_mode(struct gred_sched *table) gred_rio_mode() argument
79 return test_bit(GRED_RIO_MODE, &table->flags); gred_rio_mode()
82 static inline void gred_enable_rio_mode(struct gred_sched *table) gred_enable_rio_mode() argument
84 __set_bit(GRED_RIO_MODE, &table->flags); gred_enable_rio_mode()
87 static inline void gred_disable_rio_mode(struct gred_sched *table) gred_disable_rio_mode() argument
89 __clear_bit(GRED_RIO_MODE, &table->flags); gred_disable_rio_mode()
94 struct gred_sched *table = qdisc_priv(sch); gred_wred_mode_check() local
98 for (i = 0; i < table->DPs; i++) { gred_wred_mode_check()
99 struct gred_sched_data *q = table->tab[i]; gred_wred_mode_check()
105 for (n = i + 1; n < table->DPs; n++) gred_wred_mode_check()
106 if (table->tab[n] && table->tab[n]->prio == q->prio) gred_wred_mode_check()
113 static inline unsigned int gred_backlog(struct gred_sched *table, gred_backlog() argument
117 if (gred_wred_mode(table)) gred_backlog()
128 static inline void gred_load_wred_set(const struct gred_sched *table, gred_load_wred_set() argument
131 q->vars.qavg = table->wred_set.qavg; gred_load_wred_set()
132 q->vars.qidlestart = table->wred_set.qidlestart; gred_load_wred_set()
135 static inline void gred_store_wred_set(struct gred_sched *table, gred_store_wred_set() argument
138 table->wred_set.qavg = q->vars.qavg; gred_store_wred_set()
139 table->wred_set.qidlestart = q->vars.qidlestart; gred_store_wred_set()
337 struct gred_sched *table = qdisc_priv(sch); gred_change_table_def() local
350 table->DPs = sopt->DPs; gred_change_table_def()
351 table->def = sopt->def_DP; gred_change_table_def()
352 table->red_flags = sopt->flags; gred_change_table_def()
362 gred_enable_rio_mode(table); gred_change_table_def()
363 gred_disable_wred_mode(table); gred_change_table_def()
365 gred_enable_wred_mode(table); gred_change_table_def()
367 gred_disable_rio_mode(table); gred_change_table_def()
368 gred_disable_wred_mode(table); gred_change_table_def()
371 for (i = table->DPs; i < MAX_DPs; i++) { gred_change_table_def()
372 if (table->tab[i]) { gred_change_table_def()
375 gred_destroy_vq(table->tab[i]); gred_change_table_def()
376 table->tab[i] = NULL; gred_change_table_def()
388 struct gred_sched *table = qdisc_priv(sch); gred_change_vq() local
389 struct gred_sched_data *q = table->tab[dp]; gred_change_vq()
392 table->tab[dp] = q = *prealloc; gred_change_vq()
421 struct gred_sched *table = qdisc_priv(sch); gred_change() local
449 if (ctl->DP >= table->DPs) gred_change()
452 if (gred_rio_mode(table)) { gred_change()
456 if (table->tab[table->def]) gred_change()
457 def_prio = table->tab[table->def]->prio; gred_change()
474 if (gred_rio_mode(table)) { gred_change()
475 gred_disable_wred_mode(table); gred_change()
477 gred_enable_wred_mode(table); gred_change()
509 struct gred_sched *table = qdisc_priv(sch); gred_dump() local
514 .DPs = table->DPs, gred_dump()
515 .def_DP = table->def, gred_dump()
516 .grio = gred_rio_mode(table), gred_dump()
517 .flags = table->red_flags, gred_dump()
527 struct gred_sched_data *q = table->tab[i]; gred_dump()
539 struct gred_sched_data *q = table->tab[i]; gred_dump()
556 opt.backlog = gred_backlog(table, q, sch); gred_dump()
570 if (gred_wred_mode(table)) gred_dump()
571 gred_load_wred_set(table, q); gred_dump()
593 struct gred_sched *table = qdisc_priv(sch); gred_destroy() local
596 for (i = 0; i < table->DPs; i++) { gred_destroy()
597 if (table->tab[i]) gred_destroy()
598 gred_destroy_vq(table->tab[i]); gred_destroy()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8188ee/
H A DMakefile10 table.o \
/linux-4.1.27/drivers/clk/
H A Dclk-divider.c35 static unsigned int _get_table_maxdiv(const struct clk_div_table *table) _get_table_maxdiv() argument
40 for (clkt = table; clkt->div; clkt++) _get_table_maxdiv()
46 static unsigned int _get_table_mindiv(const struct clk_div_table *table) _get_table_mindiv() argument
51 for (clkt = table; clkt->div; clkt++) _get_table_mindiv()
57 static unsigned int _get_maxdiv(const struct clk_div_table *table, u8 width, _get_maxdiv() argument
64 if (table) _get_maxdiv()
65 return _get_table_maxdiv(table); _get_maxdiv()
69 static unsigned int _get_table_div(const struct clk_div_table *table, _get_table_div() argument
74 for (clkt = table; clkt->div; clkt++) _get_table_div()
80 static unsigned int _get_div(const struct clk_div_table *table, _get_div() argument
87 if (table) _get_div()
88 return _get_table_div(table, val); _get_div()
92 static unsigned int _get_table_val(const struct clk_div_table *table, _get_table_val() argument
97 for (clkt = table; clkt->div; clkt++) _get_table_val()
103 static unsigned int _get_val(const struct clk_div_table *table, _get_val() argument
110 if (table) _get_val()
111 return _get_table_val(table, div); _get_val()
117 const struct clk_div_table *table, divider_recalc_rate()
122 div = _get_div(table, val, flags); divider_recalc_rate()
143 return divider_recalc_rate(hw, parent_rate, val, divider->table, clk_divider_recalc_rate()
147 static bool _is_valid_table_div(const struct clk_div_table *table, _is_valid_table_div() argument
152 for (clkt = table; clkt->div; clkt++) _is_valid_table_div()
158 static bool _is_valid_div(const struct clk_div_table *table, unsigned int div, _is_valid_div() argument
163 if (table) _is_valid_div()
164 return _is_valid_table_div(table, div); _is_valid_div()
168 static int _round_up_table(const struct clk_div_table *table, int div) _round_up_table() argument
173 for (clkt = table; clkt->div; clkt++) { _round_up_table()
186 static int _round_down_table(const struct clk_div_table *table, int div) _round_down_table() argument
189 int down = _get_table_mindiv(table); _round_down_table()
191 for (clkt = table; clkt->div; clkt++) { _round_down_table()
204 static int _div_round_up(const struct clk_div_table *table, _div_round_up() argument
212 if (table) _div_round_up()
213 div = _round_up_table(table, div); _div_round_up()
218 static int _div_round_closest(const struct clk_div_table *table, _div_round_closest() argument
231 } else if (table) { _div_round_closest()
232 up = _round_up_table(table, up); _div_round_closest()
233 down = _round_down_table(table, down); _div_round_closest()
242 static int _div_round(const struct clk_div_table *table, _div_round() argument
247 return _div_round_closest(table, parent_rate, rate, flags); _div_round()
249 return _div_round_up(table, parent_rate, rate, flags); _div_round()
261 static int _next_div(const struct clk_div_table *table, int div, _next_div() argument
268 if (table) _next_div()
269 return _round_up_table(table, div); _next_div()
276 const struct clk_div_table *table, u8 width, clk_divider_bestdiv()
286 maxdiv = _get_maxdiv(table, width, flags); clk_divider_bestdiv()
290 bestdiv = _div_round(table, parent_rate, rate, flags); clk_divider_bestdiv()
302 for (i = 1; i <= maxdiv; i = _next_div(table, i, flags)) { clk_divider_bestdiv()
303 if (!_is_valid_div(table, i, flags)) clk_divider_bestdiv()
325 bestdiv = _get_maxdiv(table, width, flags); clk_divider_bestdiv()
333 unsigned long *prate, const struct clk_div_table *table, divider_round_rate()
338 div = clk_divider_bestdiv(hw, rate, prate, table, width, flags); divider_round_rate()
354 bestdiv = _get_div(divider->table, bestdiv, divider->flags); clk_divider_round_rate()
358 return divider_round_rate(hw, rate, prate, divider->table, clk_divider_round_rate()
363 const struct clk_div_table *table, u8 width, divider_get_val()
370 if (!_is_valid_div(table, div, flags)) divider_get_val()
373 value = _get_val(table, div, flags); divider_get_val()
387 value = divider_get_val(rate, parent_rate, divider->table, clk_divider_set_rate()
418 u8 clk_divider_flags, const struct clk_div_table *table, _register_divider()
452 div->table = table; _register_divider()
486 * clk_register_divider_table - register a table based divider clock with
496 * @table: array of divider/value pairs ending with a div set to 0
502 u8 clk_divider_flags, const struct clk_div_table *table, clk_register_divider_table()
506 width, clk_divider_flags, table, lock); clk_register_divider_table()
115 divider_recalc_rate(struct clk_hw *hw, unsigned long parent_rate, unsigned int val, const struct clk_div_table *table, unsigned long flags) divider_recalc_rate() argument
274 clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, unsigned long *best_parent_rate, const struct clk_div_table *table, u8 width, unsigned long flags) clk_divider_bestdiv() argument
332 divider_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate, const struct clk_div_table *table, u8 width, unsigned long flags) divider_round_rate() argument
362 divider_get_val(unsigned long rate, unsigned long parent_rate, const struct clk_div_table *table, u8 width, unsigned long flags) divider_get_val() argument
415 _register_divider(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_divider_flags, const struct clk_div_table *table, spinlock_t *lock) _register_divider() argument
499 clk_register_divider_table(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_divider_flags, const struct clk_div_table *table, spinlock_t *lock) clk_register_divider_table() argument
/linux-4.1.27/fs/squashfs/
H A Dfragment.c29 * location on disk and compressed size using a fragment lookup table.
30 * Like everything in Squashfs this fragment lookup table is itself stored
31 * compressed into metadata blocks. A second index table is used to locate
32 * these. This second index table for speed of access (and because it
45 * Look-up fragment using the fragment index table. Return the on disk
71 * Read the uncompressed fragment lookup table indexes off disk into memory
77 __le64 *table; squashfs_read_fragment_index_table() local
80 * Sanity check, length bytes should not extend into the next table - squashfs_read_fragment_index_table()
82 * incorrectly larger than the next table start squashfs_read_fragment_index_table()
87 table = squashfs_read_table(sb, fragment_table_start, length); squashfs_read_fragment_index_table()
90 * table[0] points to the first fragment table metadata block, this squashfs_read_fragment_index_table()
93 if (!IS_ERR(table) && le64_to_cpu(table[0]) >= fragment_table_start) { squashfs_read_fragment_index_table()
94 kfree(table); squashfs_read_fragment_index_table()
98 return table; squashfs_read_fragment_index_table()
H A Did.c28 * converted to 32-bit uids/gids using an id look up table. This table is
29 * stored compressed into metadata blocks. A second index table is used to
30 * locate these. This second index table for speed of access (and because it
43 * Map uid/gid index into real 32-bit uid/gid using the id look up table
66 * Read uncompressed id lookup table indexes from disk into memory
72 __le64 *table; squashfs_read_id_index_table() local
83 * length bytes should not extend into the next table - this check squashfs_read_id_index_table()
85 * than the next table start squashfs_read_id_index_table()
90 table = squashfs_read_table(sb, id_table_start, length); squashfs_read_id_index_table()
93 * table[0] points to the first id lookup table metadata block, this squashfs_read_id_index_table()
96 if (!IS_ERR(table) && le64_to_cpu(table[0]) >= id_table_start) { squashfs_read_id_index_table()
97 kfree(table); squashfs_read_id_index_table()
101 return table; squashfs_read_id_index_table()
H A Dexport.c27 * The export code uses an inode lookup table to map inode numbers passed in
28 * filehandles to an inode location on disk. This table is stored compressed
29 * into metadata blocks. A second index table is used to locate these. This
30 * second index table for speed of access (and because it is small) is read at
33 * The inode lookup table is used only by the export code, inode disk
50 * Look-up inode number (ino) in table, returning the inode location.
121 * Read uncompressed inode lookup table indexes off disk into memory
127 __le64 *table; squashfs_read_inode_lookup_table() local
137 /* length bytes should not extend into the next table - this check squashfs_read_inode_lookup_table()
139 * than the next table start squashfs_read_inode_lookup_table()
144 table = squashfs_read_table(sb, lookup_table_start, length); squashfs_read_inode_lookup_table()
147 * table[0] points to the first inode lookup table metadata block, squashfs_read_inode_lookup_table()
150 if (!IS_ERR(table) && le64_to_cpu(table[0]) >= lookup_table_start) { squashfs_read_inode_lookup_table()
151 kfree(table); squashfs_read_inode_lookup_table()
155 return table; squashfs_read_inode_lookup_table()
/linux-4.1.27/include/linux/
H A Dauxvec.h6 #define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */
H A Dcrc8.h32 /* required table size for crc8 algorithm */
35 /* helper macro assuring right table size is used */
40 * crc8_populate_lsb - fill crc table for given polynomial in regular bit order.
42 * @table: table to be filled.
43 * @polynomial: polynomial for which table is to be filled.
45 * This function fills the provided table according the polynomial provided for
55 void crc8_populate_lsb(u8 table[CRC8_TABLE_SIZE], u8 polynomial);
58 * crc8_populate_msb - fill crc table for given polynomial in reverse bit order.
60 * @table: table to be filled.
61 * @polynomial: polynomial for which table is to be filled.
63 * This function fills the provided table according the polynomial provided for
73 void crc8_populate_msb(u8 table[CRC8_TABLE_SIZE], u8 polynomial);
78 * @table: crc table used for calculation.
99 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc);
H A Dsysctl.h54 extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
62 * NULL procname terminates the table. table->de will be
68 * The table's mode will be honoured both for sys_sysctl(2) and
76 * the sysctl table. The data and maxlen fields of the ctl_table
104 /* A sysctl table is an array of struct ctl_table: */
159 int (*permissions)(struct ctl_table_header *head, struct ctl_table *table);
162 /* struct ctl_path describes where in the hierarchy a table is added */
179 const char *path, struct ctl_table *table);
182 const struct ctl_path *path, struct ctl_table *table);
183 struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table);
184 struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
186 struct ctl_table *table);
188 void unregister_sysctl_table(struct ctl_table_header * table);
195 static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) register_sysctl_table() argument
201 const struct ctl_path *path, struct ctl_table *table) register_sysctl_paths()
206 static inline void unregister_sysctl_table(struct ctl_table_header * table) unregister_sysctl_table() argument
218 int sysctl_max_threads(struct ctl_table *table, int write,
200 register_sysctl_paths( const struct ctl_path *path, struct ctl_table *table) register_sysctl_paths() argument
H A Drhashtable.h63 * @rcu: RCU structure for freeing the table
83 * @ht: Hash table
99 * struct rhashtable_params - Hash table construction parameters
133 * struct rhashtable - Hash table handle
134 * @tbl: Bucket table
135 * @nelems: Number of elements in table
140 * @mutex: Mutex to protect current/future table swapping
155 * struct rhashtable_walker - Hash table walker
157 * @tbl: The table that we were walking over
165 * struct rhashtable_iter - Hash table iterator, fits into netlink cb
255 * rht_grow_above_75 - returns true if nelems > 0.75 * table-size
256 * @ht: hash table
257 * @tbl: current table
262 /* Expand table when exceeding 75% load */ rht_grow_above_75()
268 * rht_shrink_below_30 - returns true if nelems < 0.3 * table-size
269 * @ht: hash table
270 * @tbl: current table
275 /* Shrink table beneath 30% load */ rht_shrink_below_30()
281 * rht_grow_above_100 - returns true if nelems > table-size
282 * @ht: hash table
283 * @tbl: current table
293 * rht_grow_above_max - returns true if table is above maximum
294 * @ht: hash table
295 * @tbl: current table
309 * entries which link to the same bucket of the old table during resizing.
313 * IMPORTANT: When holding the bucket lock of both the old and new table
516 * rhashtable_lookup_fast - search hash table, inlined version
517 * @ht: hash table
519 * @params: hash table parameters
584 /* All insertions must grab the oldest table containing __rhashtable_insert_fast()
654 * rhashtable_insert_fast - insert object into hash table
655 * @ht: hash table
657 * @params: hash table parameters
665 * Will trigger an automatic deferred table resizing if the size grows
677 * rhashtable_lookup_insert_fast - lookup and insert object into hash table
678 * @ht: hash table
680 * @params: hash table parameters
682 * Locks down the bucket chain in both the old and new table if a resize
683 * is in progress to ensure that writers can't remove from the old table
684 * and can't insert to the new table during the atomic operation of search
685 * and insertion. Searches for duplicates in both the old and new table if
688 * This lookup function may only be used for fixed key hash table (key_len
693 * Will trigger an automatic deferred table resizing if the size grows
710 * rhashtable_lookup_insert_key - search and insert object to hash table
712 * @ht: hash table
715 * @params: hash table parameters
717 * Locks down the bucket chain in both the old and new table if a resize
718 * is in progress to ensure that writers can't remove from the old table
719 * and can't insert to the new table during the atomic operation of search
720 * and insertion. Searches for duplicates in both the old and new table if
725 * Will trigger an automatic deferred table resizing if the size grows
774 * rhashtable_remove_fast - remove object from hash table
775 * @ht: hash table
777 * @params: hash table parameters
781 * considerable slow if the hash table is not correctly sized.
783 * Will automatically shrink the table via rhashtable_expand() if the
H A Dmcb.h48 * @inst: instance in Chameleon table
49 * @group: group in Chameleon table
50 * @var: variant in Chameleon table
51 * @bar: BAR in Chameleon table
52 * @rev: revision in Chameleon table
78 * @id_table: mcb id table
/linux-4.1.27/lib/zlib_inflate/
H A Dinftrees.c13 The code lengths are lens[0..codes-1]. The result starts at *table,
17 -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
19 requested root table index bits, and on return it is the actual root
20 table index bits. It will differ if the request is greater than the
24 code **table, unsigned *bits, unsigned short *work) zlib_inflate_table()
29 unsigned root; /* number of index bits for root table */ zlib_inflate_table()
30 unsigned curr; /* number of index bits for current table */ zlib_inflate_table()
31 unsigned drop; /* code bits to drop for sub-table */ zlib_inflate_table()
33 unsigned used; /* code entries in table used */ zlib_inflate_table()
39 code this; /* table entry for duplication */ zlib_inflate_table()
40 code *next; /* next available space in table */ zlib_inflate_table()
41 const unsigned short *base; /* base value table to use */ zlib_inflate_table()
42 const unsigned short *extra; /* extra bits table to use */ zlib_inflate_table()
45 unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ zlib_inflate_table()
80 creating from that a table of starting indices for each length in the zlib_inflate_table()
81 sorted table, and then entering the symbols in order in the sorted zlib_inflate_table()
82 table. The sorted table is work[], with that space being provided by zlib_inflate_table()
88 at length counts to determine sub-table sizes when building the zlib_inflate_table()
107 *(*table)++ = this; /* make a table to force an error */ zlib_inflate_table()
108 *(*table)++ = this; zlib_inflate_table()
126 /* generate offsets into symbol table for each length for sorting */ zlib_inflate_table()
136 Create and fill in decoding tables. In this loop, the table being zlib_inflate_table()
141 fill the table with replicated entries. zlib_inflate_table()
143 root is the number of index bits for the root table. When len exceeds zlib_inflate_table()
146 new sub-table should be started. drop is zero when the root table is zlib_inflate_table()
149 When a new sub-table is needed, it is necessary to look ahead in the zlib_inflate_table()
150 code lengths to determine what size sub-table is needed. The length zlib_inflate_table()
154 used keeps track of how many table entries have been allocated from the zlib_inflate_table()
155 provided *table space. It is checked when a LENS table is being made zlib_inflate_table()
156 against the space in *table, ENOUGH, minus the maximum space needed by zlib_inflate_table()
190 next = *table; /* current table to fill in */ zlib_inflate_table()
191 curr = root; /* current table index bits */ zlib_inflate_table()
193 low = (unsigned)(-1); /* trigger new sub-table when len > root */ zlib_inflate_table()
194 used = 1U << root; /* use root table entries */ zlib_inflate_table()
197 /* check available table space */ zlib_inflate_table()
201 /* process all codes and make table entries */ zlib_inflate_table()
203 /* create table entry */ zlib_inflate_table()
221 min = fill; /* save offset to next table */ zlib_inflate_table()
245 /* create new sub-table if needed */ zlib_inflate_table()
251 /* increment past last table */ zlib_inflate_table()
254 /* determine length of next table */ zlib_inflate_table()
269 /* point entry in root table to sub-table */ zlib_inflate_table()
271 (*table)[low].op = (unsigned char)curr; zlib_inflate_table()
272 (*table)[low].bits = (unsigned char)root; zlib_inflate_table()
273 (*table)[low].val = (unsigned short)(next - *table); zlib_inflate_table()
278 Fill in rest of table for incomplete codes. This loop is similar to the zlib_inflate_table()
279 loop above in incrementing huff for table indices. It is assumed that zlib_inflate_table()
281 through high index bits. When the current sub-table is filled, the loop zlib_inflate_table()
282 drops back to the root table to fill in any remaining entries there. zlib_inflate_table()
288 /* when done with sub-table, drop back to root table */ zlib_inflate_table()
292 next = *table; zlib_inflate_table()
296 /* put invalid code marker in table */ zlib_inflate_table()
312 *table += used; zlib_inflate_table()
23 zlib_inflate_table(codetype type, unsigned short *lens, unsigned codes, code **table, unsigned *bits, unsigned short *work) zlib_inflate_table() argument
H A Dinftrees.h16 indexed that table entry, or it provides a pointer to another
17 table that indexes more bits of the code. op indicates whether
18 the entry is a pointer to another table, a literal, a length or
19 distance, an end-of-block, or an invalid code. For a table
21 that table. For a length or distance, the low four bits of op
26 the current table to the next table. Each entry is four bytes. */
28 unsigned char op; /* operation, extra bits, table bits */
30 unsigned short val; /* offset in table or code value */
35 0000tttt - table link, tttt != 0 is the number of table index bits
57 unsigned codes, code **table,
H A Dinffixed.h1 /* inffixed.h -- table for decoding fixed codes
/linux-4.1.27/arch/powerpc/include/asm/
H A Dpgalloc-32.h51 static inline void pgtable_free(void *table, unsigned index_size) pgtable_free() argument
54 free_page((unsigned long)table); pgtable_free()
61 void *table, int shift) pgtable_free_tlb()
63 unsigned long pgf = (unsigned long)table; pgtable_free_tlb()
71 void *table = (void *)((unsigned long)_table & ~MAX_PGTABLE_INDEX_SIZE); __tlb_remove_table() local
74 pgtable_free(table, shift); __tlb_remove_table()
78 void *table, int shift) pgtable_free_tlb()
80 pgtable_free(table, shift); pgtable_free_tlb()
84 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, __pte_free_tlb() argument
88 pgtable_page_dtor(table); __pte_free_tlb()
89 pgtable_free_tlb(tlb, page_address(table), 0); __pte_free_tlb()
60 pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift) pgtable_free_tlb() argument
77 pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift) pgtable_free_tlb() argument
H A Dagp.h14 #define free_gatt_pages(table, order) \
15 free_pages((unsigned long)(table), (order))
H A Dpte-hash32.h7 * table containing PTEs, together with a set of 16 segment registers,
10 * We use the hash table as an extended TLB, i.e. a cache of currently
11 * active mappings. We maintain a two-level page table tree, much
15 * tree and putting them into the hash table when necessary, and
16 * updating the accessed and modified bits in the page table tree.
42 /* Hash table based platforms need atomic updates of the linux PTE */
H A Dpgtable-ppc64-64k.h25 /* PMD_SHIFT determines what a second-level page table entry can map */
30 /* PGDIR_SHIFT determines what a third-level page table entry can map */
36 /* PMDs point to PTE table fragments which are 4K aligned. */
H A Dpgalloc-64.h23 * the table need to be passed an "index_size" so they know how to
31 * any page table pointer. In other words all pagetables, even tiny
113 static inline void pgtable_free(void *table, unsigned index_size) pgtable_free() argument
116 free_page((unsigned long)table); pgtable_free()
119 kmem_cache_free(PGT_CACHE(index_size), table); pgtable_free() local
125 void *table, int shift) pgtable_free_tlb()
127 unsigned long pgf = (unsigned long)table; pgtable_free_tlb()
135 void *table = (void *)((unsigned long)_table & ~MAX_PGTABLE_INDEX_SIZE); __tlb_remove_table() local
138 pgtable_free(table, shift); __tlb_remove_table()
142 void *table, int shift) pgtable_free_tlb()
144 pgtable_free(table, shift); pgtable_free_tlb()
148 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, __pte_free_tlb() argument
152 pgtable_page_dtor(table); __pte_free_tlb()
153 pgtable_free_tlb(tlb, page_address(table), 0); __pte_free_tlb()
170 extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift);
216 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, __pte_free_tlb() argument
220 pgtable_free_tlb(tlb, table, 0); __pte_free_tlb()
124 pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift) pgtable_free_tlb() argument
141 pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift) pgtable_free_tlb() argument
H A Dpgalloc.h16 extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
/linux-4.1.27/drivers/net/wireless/iwlwifi/mvm/
H A Dutils.c230 /* Legacy rate format, search for match in table */ iwl_mvm_legacy_rate_to_mac80211_idx()
461 struct iwl_umac_error_event_table table; iwl_mvm_dump_umac_error_log() local
475 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); iwl_mvm_dump_umac_error_log()
477 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { iwl_mvm_dump_umac_error_log()
480 mvm->status, table.valid); iwl_mvm_dump_umac_error_log()
483 IWL_ERR(mvm, "0x%08X | %s\n", table.error_id, iwl_mvm_dump_umac_error_log()
484 desc_lookup(table.error_id)); iwl_mvm_dump_umac_error_log()
485 IWL_ERR(mvm, "0x%08X | umac branchlink1\n", table.blink1); iwl_mvm_dump_umac_error_log()
486 IWL_ERR(mvm, "0x%08X | umac branchlink2\n", table.blink2); iwl_mvm_dump_umac_error_log()
487 IWL_ERR(mvm, "0x%08X | umac interruptlink1\n", table.ilink1); iwl_mvm_dump_umac_error_log()
488 IWL_ERR(mvm, "0x%08X | umac interruptlink2\n", table.ilink2); iwl_mvm_dump_umac_error_log()
489 IWL_ERR(mvm, "0x%08X | umac data1\n", table.data1); iwl_mvm_dump_umac_error_log()
490 IWL_ERR(mvm, "0x%08X | umac data2\n", table.data2); iwl_mvm_dump_umac_error_log()
491 IWL_ERR(mvm, "0x%08X | umac data3\n", table.data3); iwl_mvm_dump_umac_error_log()
492 IWL_ERR(mvm, "0x%08X | umac major\n", table.umac_major); iwl_mvm_dump_umac_error_log()
493 IWL_ERR(mvm, "0x%08X | umac minor\n", table.umac_minor); iwl_mvm_dump_umac_error_log()
494 IWL_ERR(mvm, "0x%08X | frame pointer\n", table.frame_pointer); iwl_mvm_dump_umac_error_log()
495 IWL_ERR(mvm, "0x%08X | stack pointer\n", table.stack_pointer); iwl_mvm_dump_umac_error_log()
496 IWL_ERR(mvm, "0x%08X | last host cmd\n", table.cmd_header); iwl_mvm_dump_umac_error_log()
497 IWL_ERR(mvm, "0x%08X | isr status reg\n", table.nic_isr_pref); iwl_mvm_dump_umac_error_log()
503 struct iwl_error_event_table_v1 table; iwl_mvm_dump_nic_error_log_old() local
524 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); iwl_mvm_dump_nic_error_log_old()
526 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { iwl_mvm_dump_nic_error_log_old()
529 mvm->status, table.valid); iwl_mvm_dump_nic_error_log_old()
536 trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low, iwl_mvm_dump_nic_error_log_old()
537 table.data1, table.data2, table.data3, iwl_mvm_dump_nic_error_log_old()
538 table.blink1, table.blink2, table.ilink1, iwl_mvm_dump_nic_error_log_old()
539 table.ilink2, table.bcon_time, table.gp1, iwl_mvm_dump_nic_error_log_old()
540 table.gp2, table.gp3, table.ucode_ver, 0, iwl_mvm_dump_nic_error_log_old()
541 table.hw_ver, table.brd_ver); iwl_mvm_dump_nic_error_log_old()
542 IWL_ERR(mvm, "0x%08X | %-28s\n", table.error_id, iwl_mvm_dump_nic_error_log_old()
543 desc_lookup(table.error_id)); iwl_mvm_dump_nic_error_log_old()
544 IWL_ERR(mvm, "0x%08X | uPc\n", table.pc); iwl_mvm_dump_nic_error_log_old()
545 IWL_ERR(mvm, "0x%08X | branchlink1\n", table.blink1); iwl_mvm_dump_nic_error_log_old()
546 IWL_ERR(mvm, "0x%08X | branchlink2\n", table.blink2); iwl_mvm_dump_nic_error_log_old()
547 IWL_ERR(mvm, "0x%08X | interruptlink1\n", table.ilink1); iwl_mvm_dump_nic_error_log_old()
548 IWL_ERR(mvm, "0x%08X | interruptlink2\n", table.ilink2); iwl_mvm_dump_nic_error_log_old()
549 IWL_ERR(mvm, "0x%08X | data1\n", table.data1); iwl_mvm_dump_nic_error_log_old()
550 IWL_ERR(mvm, "0x%08X | data2\n", table.data2); iwl_mvm_dump_nic_error_log_old()
551 IWL_ERR(mvm, "0x%08X | data3\n", table.data3); iwl_mvm_dump_nic_error_log_old()
552 IWL_ERR(mvm, "0x%08X | beacon time\n", table.bcon_time); iwl_mvm_dump_nic_error_log_old()
553 IWL_ERR(mvm, "0x%08X | tsf low\n", table.tsf_low); iwl_mvm_dump_nic_error_log_old()
554 IWL_ERR(mvm, "0x%08X | tsf hi\n", table.tsf_hi); iwl_mvm_dump_nic_error_log_old()
555 IWL_ERR(mvm, "0x%08X | time gp1\n", table.gp1); iwl_mvm_dump_nic_error_log_old()
556 IWL_ERR(mvm, "0x%08X | time gp2\n", table.gp2); iwl_mvm_dump_nic_error_log_old()
557 IWL_ERR(mvm, "0x%08X | time gp3\n", table.gp3); iwl_mvm_dump_nic_error_log_old()
558 IWL_ERR(mvm, "0x%08X | uCode version\n", table.ucode_ver); iwl_mvm_dump_nic_error_log_old()
559 IWL_ERR(mvm, "0x%08X | hw version\n", table.hw_ver); iwl_mvm_dump_nic_error_log_old()
560 IWL_ERR(mvm, "0x%08X | board version\n", table.brd_ver); iwl_mvm_dump_nic_error_log_old()
561 IWL_ERR(mvm, "0x%08X | hcmd\n", table.hcmd); iwl_mvm_dump_nic_error_log_old()
562 IWL_ERR(mvm, "0x%08X | isr0\n", table.isr0); iwl_mvm_dump_nic_error_log_old()
563 IWL_ERR(mvm, "0x%08X | isr1\n", table.isr1); iwl_mvm_dump_nic_error_log_old()
564 IWL_ERR(mvm, "0x%08X | isr2\n", table.isr2); iwl_mvm_dump_nic_error_log_old()
565 IWL_ERR(mvm, "0x%08X | isr3\n", table.isr3); iwl_mvm_dump_nic_error_log_old()
566 IWL_ERR(mvm, "0x%08X | isr4\n", table.isr4); iwl_mvm_dump_nic_error_log_old()
567 IWL_ERR(mvm, "0x%08X | isr_pref\n", table.isr_pref); iwl_mvm_dump_nic_error_log_old()
568 IWL_ERR(mvm, "0x%08X | wait_event\n", table.wait_event); iwl_mvm_dump_nic_error_log_old()
569 IWL_ERR(mvm, "0x%08X | l2p_control\n", table.l2p_control); iwl_mvm_dump_nic_error_log_old()
570 IWL_ERR(mvm, "0x%08X | l2p_duration\n", table.l2p_duration); iwl_mvm_dump_nic_error_log_old()
571 IWL_ERR(mvm, "0x%08X | l2p_mhvalid\n", table.l2p_mhvalid); iwl_mvm_dump_nic_error_log_old()
572 IWL_ERR(mvm, "0x%08X | l2p_addr_match\n", table.l2p_addr_match); iwl_mvm_dump_nic_error_log_old()
573 IWL_ERR(mvm, "0x%08X | lmpm_pmg_sel\n", table.lmpm_pmg_sel); iwl_mvm_dump_nic_error_log_old()
574 IWL_ERR(mvm, "0x%08X | timestamp\n", table.u_timestamp); iwl_mvm_dump_nic_error_log_old()
575 IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler); iwl_mvm_dump_nic_error_log_old()
584 struct iwl_error_event_table table; iwl_mvm_dump_nic_error_log() local
610 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); iwl_mvm_dump_nic_error_log()
612 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { iwl_mvm_dump_nic_error_log()
615 mvm->status, table.valid); iwl_mvm_dump_nic_error_log()
622 trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low, iwl_mvm_dump_nic_error_log()
623 table.data1, table.data2, table.data3, iwl_mvm_dump_nic_error_log()
624 table.blink1, table.blink2, table.ilink1, iwl_mvm_dump_nic_error_log()
625 table.ilink2, table.bcon_time, table.gp1, iwl_mvm_dump_nic_error_log()
626 table.gp2, table.gp3, table.major, iwl_mvm_dump_nic_error_log()
627 table.minor, table.hw_ver, table.brd_ver); iwl_mvm_dump_nic_error_log()
628 IWL_ERR(mvm, "0x%08X | %-28s\n", table.error_id, iwl_mvm_dump_nic_error_log()
629 desc_lookup(table.error_id)); iwl_mvm_dump_nic_error_log()
630 IWL_ERR(mvm, "0x%08X | uPc\n", table.pc); iwl_mvm_dump_nic_error_log()
631 IWL_ERR(mvm, "0x%08X | branchlink1\n", table.blink1); iwl_mvm_dump_nic_error_log()
632 IWL_ERR(mvm, "0x%08X | branchlink2\n", table.blink2); iwl_mvm_dump_nic_error_log()
633 IWL_ERR(mvm, "0x%08X | interruptlink1\n", table.ilink1); iwl_mvm_dump_nic_error_log()
634 IWL_ERR(mvm, "0x%08X | interruptlink2\n", table.ilink2); iwl_mvm_dump_nic_error_log()
635 IWL_ERR(mvm, "0x%08X | data1\n", table.data1); iwl_mvm_dump_nic_error_log()
636 IWL_ERR(mvm, "0x%08X | data2\n", table.data2); iwl_mvm_dump_nic_error_log()
637 IWL_ERR(mvm, "0x%08X | data3\n", table.data3); iwl_mvm_dump_nic_error_log()
638 IWL_ERR(mvm, "0x%08X | beacon time\n", table.bcon_time); iwl_mvm_dump_nic_error_log()
639 IWL_ERR(mvm, "0x%08X | tsf low\n", table.tsf_low); iwl_mvm_dump_nic_error_log()
640 IWL_ERR(mvm, "0x%08X | tsf hi\n", table.tsf_hi); iwl_mvm_dump_nic_error_log()
641 IWL_ERR(mvm, "0x%08X | time gp1\n", table.gp1); iwl_mvm_dump_nic_error_log()
642 IWL_ERR(mvm, "0x%08X | time gp2\n", table.gp2); iwl_mvm_dump_nic_error_log()
643 IWL_ERR(mvm, "0x%08X | time gp3\n", table.gp3); iwl_mvm_dump_nic_error_log()
644 IWL_ERR(mvm, "0x%08X | uCode version major\n", table.major); iwl_mvm_dump_nic_error_log()
645 IWL_ERR(mvm, "0x%08X | uCode version minor\n", table.minor); iwl_mvm_dump_nic_error_log()
646 IWL_ERR(mvm, "0x%08X | hw version\n", table.hw_ver); iwl_mvm_dump_nic_error_log()
647 IWL_ERR(mvm, "0x%08X | board version\n", table.brd_ver); iwl_mvm_dump_nic_error_log()
648 IWL_ERR(mvm, "0x%08X | hcmd\n", table.hcmd); iwl_mvm_dump_nic_error_log()
649 IWL_ERR(mvm, "0x%08X | isr0\n", table.isr0); iwl_mvm_dump_nic_error_log()
650 IWL_ERR(mvm, "0x%08X | isr1\n", table.isr1); iwl_mvm_dump_nic_error_log()
651 IWL_ERR(mvm, "0x%08X | isr2\n", table.isr2); iwl_mvm_dump_nic_error_log()
652 IWL_ERR(mvm, "0x%08X | isr3\n", table.isr3); iwl_mvm_dump_nic_error_log()
653 IWL_ERR(mvm, "0x%08X | isr4\n", table.isr4); iwl_mvm_dump_nic_error_log()
654 IWL_ERR(mvm, "0x%08X | isr_pref\n", table.isr_pref); iwl_mvm_dump_nic_error_log()
655 IWL_ERR(mvm, "0x%08X | wait_event\n", table.wait_event); iwl_mvm_dump_nic_error_log()
656 IWL_ERR(mvm, "0x%08X | l2p_control\n", table.l2p_control); iwl_mvm_dump_nic_error_log()
657 IWL_ERR(mvm, "0x%08X | l2p_duration\n", table.l2p_duration); iwl_mvm_dump_nic_error_log()
658 IWL_ERR(mvm, "0x%08X | l2p_mhvalid\n", table.l2p_mhvalid); iwl_mvm_dump_nic_error_log()
659 IWL_ERR(mvm, "0x%08X | l2p_addr_match\n", table.l2p_addr_match); iwl_mvm_dump_nic_error_log()
660 IWL_ERR(mvm, "0x%08X | lmpm_pmg_sel\n", table.lmpm_pmg_sel); iwl_mvm_dump_nic_error_log()
661 IWL_ERR(mvm, "0x%08X | timestamp\n", table.u_timestamp); iwl_mvm_dump_nic_error_log()
662 IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler); iwl_mvm_dump_nic_error_log()
/linux-4.1.27/drivers/clk/ti/
H A Ddivider.c33 static unsigned int _get_table_maxdiv(const struct clk_div_table *table) _get_table_maxdiv() argument
38 for (clkt = table; clkt->div; clkt++) _get_table_maxdiv()
50 if (divider->table) _get_maxdiv()
51 return _get_table_maxdiv(divider->table); _get_maxdiv()
55 static unsigned int _get_table_div(const struct clk_div_table *table, _get_table_div() argument
60 for (clkt = table; clkt->div; clkt++) _get_table_div()
72 if (divider->table) _get_div()
73 return _get_table_div(divider->table, val); _get_div()
77 static unsigned int _get_table_val(const struct clk_div_table *table, _get_table_val() argument
82 for (clkt = table; clkt->div; clkt++) _get_table_val()
94 if (divider->table) _get_val()
95 return _get_table_val(divider->table, div); _get_val()
125 static bool _is_valid_table_div(const struct clk_div_table *table, _is_valid_table_div() argument
130 for (clkt = table; clkt->div; clkt++) _is_valid_table_div()
140 if (divider->table) _is_valid_div()
141 return _is_valid_table_div(divider->table, div); _is_valid_div()
259 const struct clk_div_table *table, _register_divider()
293 div->table = table; _register_divider()
308 struct clk_div_table *table; _get_div_table_from_setup() local
315 /* Clk divider table not provided, determine min/max divs */ _get_div_table_from_setup()
342 table = kzalloc(sizeof(*table) * (valid_div + 1), GFP_KERNEL); _get_div_table_from_setup()
343 if (!table) _get_div_table_from_setup()
351 table[valid_div].div = setup->dividers[i]; _get_div_table_from_setup()
352 table[valid_div].val = i; _get_div_table_from_setup()
359 return table; _get_div_table_from_setup()
384 div->table = _get_div_table_from_setup(setup, &div->width); ti_clk_build_component_div()
399 struct clk_div_table *table; ti_clk_register_divider() local
418 table = _get_div_table_from_setup(div, &width); ti_clk_register_divider()
419 if (IS_ERR(table)) ti_clk_register_divider()
420 return (struct clk *)table; ti_clk_register_divider()
424 width, div_flags, table, NULL); ti_clk_register_divider()
427 kfree(table); ti_clk_register_divider()
435 struct clk_div_table *table; ti_clk_get_div_table() local
451 /* Determine required size for divider table */ ti_clk_get_div_table()
459 pr_err("no valid dividers for %s table\n", node->name); ti_clk_get_div_table()
463 table = kzalloc(sizeof(*table) * (valid_div + 1), GFP_KERNEL); ti_clk_get_div_table()
465 if (!table) ti_clk_get_div_table()
473 table[valid_div].div = val; ti_clk_get_div_table()
474 table[valid_div].val = i; ti_clk_get_div_table()
479 return table; ti_clk_get_div_table()
483 const struct clk_div_table *table, _get_divider_width()
491 if (!table) { _get_divider_width()
492 /* Clk divider table not provided, determine min/max divs */ _get_divider_width()
517 while (table[div].div) { _get_divider_width()
518 val = table[div].val; _get_divider_width()
527 void __iomem **reg, const struct clk_div_table **table, ti_clk_divider_populate()
553 *table = ti_clk_get_div_table(node); ti_clk_divider_populate()
555 if (IS_ERR(*table)) ti_clk_divider_populate()
556 return PTR_ERR(*table); ti_clk_divider_populate()
558 *width = _get_divider_width(node, *table, *div_flags); ti_clk_divider_populate()
577 const struct clk_div_table *table = NULL; of_ti_divider_clk_setup() local
582 if (ti_clk_divider_populate(node, &reg, &table, &flags, of_ti_divider_clk_setup()
587 shift, width, clk_divider_flags, table, of_ti_divider_clk_setup()
597 kfree(table); of_ti_divider_clk_setup()
610 if (ti_clk_divider_populate(node, &div->reg, &div->table, &val, of_ti_composite_divider_clk_setup()
618 kfree(div->table); of_ti_composite_divider_clk_setup()
255 _register_divider(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_divider_flags, const struct clk_div_table *table, spinlock_t *lock) _register_divider() argument
482 _get_divider_width(struct device_node *node, const struct clk_div_table *table, u8 flags) _get_divider_width() argument
526 ti_clk_divider_populate(struct device_node *node, void __iomem **reg, const struct clk_div_table **table, u32 *flags, u8 *div_flags, u8 *width, u8 *shift) ti_clk_divider_populate() argument
/linux-4.1.27/arch/sparc/crypto/
H A Dcrop_devid.c4 /* This is a dummy device table linked into all of the crypto
7 * load any modules which have device table entries that
/linux-4.1.27/arch/sparc/include/asm/
H A Dagp.h13 #define free_gatt_pages(table, order) \
14 free_pages((unsigned long)(table), (order))
H A Dpgalloc_64.h14 /* Page table allocation/freeing. */
77 void pgtable_free(void *table, bool is_page);
84 static inline void pgtable_free_tlb(struct mmu_gather *tlb, void *table, bool is_page) pgtable_free_tlb() argument
86 unsigned long pgf = (unsigned long)table; pgtable_free_tlb()
94 void *table = (void *)((unsigned long)_table & ~0x1UL); __tlb_remove_table() local
99 pgtable_free(table, is_page); __tlb_remove_table()
102 static inline void pgtable_free_tlb(struct mmu_gather *tlb, void *table, bool is_page) pgtable_free_tlb() argument
104 pgtable_free(table, is_page); pgtable_free_tlb()
H A Dtraps.h2 * traps.h: Format of entries for the Sparc trap table.
/linux-4.1.27/arch/parisc/include/asm/
H A Dagp.h17 #define free_gatt_pages(table, order) \
18 free_pages((unsigned long)(table), (order))
/linux-4.1.27/arch/alpha/include/asm/
H A Dagp.h15 #define free_gatt_pages(table, order) \
16 free_pages((unsigned long)(table), (order))
/linux-4.1.27/kernel/
H A Dutsname_sysctl.c20 static void *get_uts(struct ctl_table *table, int write) get_uts() argument
22 char *which = table->data; get_uts()
35 static void put_uts(struct ctl_table *table, int write, void *which) put_uts() argument
47 static int proc_do_uts_string(struct ctl_table *table, int write, proc_do_uts_string() argument
52 memcpy(&uts_table, table, sizeof(uts_table)); proc_do_uts_string()
53 uts_table.data = get_uts(table, write); proc_do_uts_string()
55 put_uts(table, write, uts_table.data); proc_do_uts_string()
58 proc_sys_poll_notify(table->poll); proc_do_uts_string()
126 struct ctl_table *table = &uts_kern_table[proc]; uts_proc_notify() local
128 proc_sys_poll_notify(table->poll); uts_proc_notify()
H A Dsysctl.c177 static int proc_do_cad_pid(struct ctl_table *table, int write,
179 static int proc_taint(struct ctl_table *table, int write,
184 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
188 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
191 static int proc_dostring_coredump(struct ctl_table *table, int write,
199 static int sysrq_sysctl_handler(struct ctl_table *table, int write, sysrq_sysctl_handler() argument
205 error = proc_dointvec(table, write, buffer, lenp, ppos); sysrq_sysctl_handler()
1813 static void warn_sysctl_write(struct ctl_table *table) warn_sysctl_write() argument
1818 current->comm, table->procname); warn_sysctl_write()
1823 * @table: the sysctl table
1838 int proc_dostring(struct ctl_table *table, int write, proc_dostring() argument
1842 warn_sysctl_write(table); proc_dostring()
1844 return _proc_do_string((char *)(table->data), table->maxlen, write, proc_dostring()
2002 static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, __do_proc_dointvec() argument
2014 if (!tbl_data || !table->maxlen || !*lenp || (*ppos && !write)) { __do_proc_dointvec()
2020 vleft = table->maxlen / sizeof(*i); __do_proc_dointvec()
2032 warn_sysctl_write(table); __do_proc_dointvec()
2101 static int do_proc_dointvec(struct ctl_table *table, int write, do_proc_dointvec() argument
2107 return __do_proc_dointvec(table->data, table, write, do_proc_dointvec()
2113 * @table: the sysctl table
2119 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2124 int proc_dointvec(struct ctl_table *table, int write, proc_dointvec() argument
2127 return do_proc_dointvec(table,write,buffer,lenp,ppos, proc_dointvec()
2135 static int proc_taint(struct ctl_table *table, int write, proc_taint() argument
2145 t = *table; proc_taint()
2167 static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, proc_dointvec_minmax_sysadmin() argument
2173 return proc_dointvec_minmax(table, write, buffer, lenp, ppos); proc_dointvec_minmax_sysadmin()
2208 * @table: the sysctl table
2214 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2218 * table->extra1 (min) and table->extra2 (max).
2222 int proc_dointvec_minmax(struct ctl_table *table, int write, proc_dointvec_minmax() argument
2226 .min = (int *) table->extra1, proc_dointvec_minmax()
2227 .max = (int *) table->extra2, proc_dointvec_minmax()
2229 return do_proc_dointvec(table, write, buffer, lenp, ppos, proc_dointvec_minmax()
2245 static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write, proc_dointvec_minmax_coredump() argument
2248 int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos); proc_dointvec_minmax_coredump()
2255 static int proc_dostring_coredump(struct ctl_table *table, int write, proc_dostring_coredump() argument
2258 int error = proc_dostring(table, write, buffer, lenp, ppos); proc_dostring_coredump()
2265 static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, __do_proc_doulongvec_minmax() argument
2277 if (!data || !table->maxlen || !*lenp || (*ppos && !write)) { __do_proc_doulongvec_minmax()
2283 min = (unsigned long *) table->extra1; __do_proc_doulongvec_minmax()
2284 max = (unsigned long *) table->extra2; __do_proc_doulongvec_minmax()
2285 vleft = table->maxlen / sizeof(unsigned long); __do_proc_doulongvec_minmax()
2294 warn_sysctl_write(table); __do_proc_doulongvec_minmax()
2361 static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, do_proc_doulongvec_minmax() argument
2367 return __do_proc_doulongvec_minmax(table->data, table, write, do_proc_doulongvec_minmax()
2373 * @table: the sysctl table
2379 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
2383 * table->extra1 (min) and table->extra2 (max).
2387 int proc_doulongvec_minmax(struct ctl_table *table, int write, proc_doulongvec_minmax() argument
2390 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); proc_doulongvec_minmax()
2395 * @table: the sysctl table
2401 * Reads/writes up to table->maxlen/sizeof(unsigned long) unsigned long
2406 * table->extra1 (min) and table->extra2 (max).
2410 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, proc_doulongvec_ms_jiffies_minmax() argument
2414 return do_proc_doulongvec_minmax(table, write, buffer, proc_doulongvec_ms_jiffies_minmax()
2492 * @table: the sysctl table
2498 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2505 int proc_dointvec_jiffies(struct ctl_table *table, int write, proc_dointvec_jiffies() argument
2508 return do_proc_dointvec(table,write,buffer,lenp,ppos, proc_dointvec_jiffies()
2514 * @table: the sysctl table
2520 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2527 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, proc_dointvec_userhz_jiffies() argument
2530 return do_proc_dointvec(table,write,buffer,lenp,ppos, proc_dointvec_userhz_jiffies()
2536 * @table: the sysctl table
2543 * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
2550 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, proc_dointvec_ms_jiffies() argument
2553 return do_proc_dointvec(table, write, buffer, lenp, ppos, proc_dointvec_ms_jiffies()
2557 static int proc_do_cad_pid(struct ctl_table *table, int write, proc_do_cad_pid() argument
2566 r = __do_proc_dointvec(&tmp, table, write, buffer, proc_do_cad_pid()
2581 * @table: the sysctl table
2587 * The bitmap is stored at table->data and the bitmap length (in bits)
2588 * in table->maxlen.
2596 int proc_do_large_bitmap(struct ctl_table *table, int write, proc_do_large_bitmap() argument
2602 unsigned long bitmap_len = table->maxlen; proc_do_large_bitmap()
2603 unsigned long *bitmap = *(unsigned long **) table->data; proc_do_large_bitmap()
2729 int proc_dostring(struct ctl_table *table, int write, proc_dostring() argument
2735 int proc_dointvec(struct ctl_table *table, int write, proc_dointvec() argument
2741 int proc_dointvec_minmax(struct ctl_table *table, int write, proc_dointvec_minmax() argument
2747 int proc_dointvec_jiffies(struct ctl_table *table, int write, proc_dointvec_jiffies() argument
2753 int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, proc_dointvec_userhz_jiffies() argument
2759 int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, proc_dointvec_ms_jiffies() argument
2765 int proc_doulongvec_minmax(struct ctl_table *table, int write, proc_doulongvec_minmax() argument
2771 int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, proc_doulongvec_ms_jiffies_minmax() argument
/linux-4.1.27/net/netfilter/
H A Dnf_conntrack_acct.c67 struct ctl_table *table; nf_conntrack_acct_init_sysctl() local
69 table = kmemdup(acct_sysctl_table, sizeof(acct_sysctl_table), nf_conntrack_acct_init_sysctl()
71 if (!table) nf_conntrack_acct_init_sysctl()
74 table[0].data = &net->ct.sysctl_acct; nf_conntrack_acct_init_sysctl()
78 table[0].procname = NULL; nf_conntrack_acct_init_sysctl()
81 table); nf_conntrack_acct_init_sysctl()
89 kfree(table); nf_conntrack_acct_init_sysctl()
96 struct ctl_table *table; nf_conntrack_acct_fini_sysctl() local
98 table = net->ct.acct_sysctl_header->ctl_table_arg; nf_conntrack_acct_fini_sysctl()
100 kfree(table); nf_conntrack_acct_fini_sysctl()
H A Dnf_conntrack_timestamp.c45 struct ctl_table *table; nf_conntrack_tstamp_init_sysctl() local
47 table = kmemdup(tstamp_sysctl_table, sizeof(tstamp_sysctl_table), nf_conntrack_tstamp_init_sysctl()
49 if (!table) nf_conntrack_tstamp_init_sysctl()
52 table[0].data = &net->ct.sysctl_tstamp; nf_conntrack_tstamp_init_sysctl()
56 table[0].procname = NULL; nf_conntrack_tstamp_init_sysctl()
59 table); nf_conntrack_tstamp_init_sysctl()
67 kfree(table); nf_conntrack_tstamp_init_sysctl()
74 struct ctl_table *table; nf_conntrack_tstamp_fini_sysctl() local
76 table = net->ct.tstamp_sysctl_header->ctl_table_arg; nf_conntrack_tstamp_fini_sysctl()
78 kfree(table); nf_conntrack_tstamp_fini_sysctl()
H A Dx_tables.c384 if (par->match->table != NULL && xt_check_match()
385 strcmp(par->match->table, par->table) != 0) { xt_check_match()
386 pr_err("%s_tables: %s match: only valid in %s table, not %s\n", xt_check_match()
388 par->match->table, par->table); xt_check_match()
559 if (par->target->table != NULL && xt_check_target()
560 strcmp(par->target->table, par->table) != 0) { xt_check_target()
561 pr_err("%s_tables: %s target: only valid in %s table, not %s\n", xt_check_target()
563 par->target->table, par->table); xt_check_target()
712 /* Find table by name, grabs mutex & ref. Returns ERR_PTR() on error. */ xt_find_table_lock()
727 void xt_table_unlock(struct xt_table *table) xt_table_unlock() argument
729 mutex_unlock(&xt[table->af].mutex); xt_table_unlock()
789 xt_replace_table(struct xt_table *table, xt_replace_table() argument
805 private = table->private; xt_replace_table()
809 pr_debug("num_counters != table->private->number (%u/%u)\n", xt_replace_table()
822 table->private = newinfo; xt_replace_table()
825 * Even though table entries have now been swapped, other CPU's xt_replace_table()
839 audit_log_format(ab, "table=%s family=%u entries=%u", xt_replace_table()
840 table->name, table->af, xt_replace_table()
858 struct xt_table *t, *table; xt_register_table() local
861 table = kmemdup(input_table, sizeof(struct xt_table), GFP_KERNEL); xt_register_table()
862 if (!table) { xt_register_table()
867 mutex_lock(&xt[table->af].mutex); xt_register_table()
869 list_for_each_entry(t, &net->xt.tables[table->af], list) { xt_register_table()
870 if (strcmp(t->name, table->name) == 0) { xt_register_table()
877 table->private = bootstrap; xt_register_table()
879 if (!xt_replace_table(table, 0, newinfo, &ret)) xt_register_table()
882 private = table->private; xt_register_table()
883 pr_debug("table->private->number = %u\n", private->number); xt_register_table()
888 list_add(&table->list, &net->xt.tables[table->af]); xt_register_table()
889 mutex_unlock(&xt[table->af].mutex); xt_register_table()
890 return table; xt_register_table()
893 mutex_unlock(&xt[table->af].mutex); xt_register_table()
894 kfree(table); xt_register_table()
900 void *xt_unregister_table(struct xt_table *table) xt_unregister_table() argument
904 mutex_lock(&xt[table->af].mutex); xt_unregister_table()
905 private = table->private; xt_unregister_table()
906 list_del(&table->list); xt_unregister_table()
907 mutex_unlock(&xt[table->af].mutex); xt_unregister_table()
908 kfree(table); xt_unregister_table()
948 struct xt_table *table = list_entry(v, struct xt_table, list); xt_table_seq_show() local
950 if (strlen(table->name)) { xt_table_seq_show()
951 seq_printf(seq, "%s\n", table->name); xt_table_seq_show()
1186 * xt_hook_link - set up hooks for a new table
1187 * @table: table with metadata needed to set up hooks
1193 struct nf_hook_ops *xt_hook_link(const struct xt_table *table, nf_hookfn *fn) xt_hook_link() argument
1195 unsigned int hook_mask = table->valid_hooks; xt_hook_link()
1210 ops[i].owner = table->me; xt_hook_link()
1211 ops[i].pf = table->af; xt_hook_link()
1213 ops[i].priority = table->priority; xt_hook_link()
1228 * xt_hook_unlink - remove hooks for a table
1232 void xt_hook_unlink(const struct xt_table *table, struct nf_hook_ops *ops) xt_hook_unlink() argument
1234 nf_unregister_hooks(ops, hweight32(table->valid_hooks)); xt_hook_unlink()
H A Dnf_tables_api.c95 struct nft_table *table, nft_ctx_init()
101 ctx->table = table; nft_ctx_init()
130 static void nf_tables_unregister_hooks(const struct nft_table *table, nf_tables_unregister_hooks() argument
134 if (!(table->flags & NFT_TABLE_F_DORMANT) && nf_tables_unregister_hooks()
139 /* Internal table flags */
151 ctx->table->flags |= NFT_TABLE_INACTIVE; nft_trans_table_add()
165 list_del_rcu(&ctx->table->list); nft_deltable()
192 ctx->table->use--; nft_delchain()
318 ctx->table->use--; nft_delset()
330 struct nft_table *table; nft_table_lookup() local
332 list_for_each_entry(table, &afi->tables, list) { nft_table_lookup()
333 if (!nla_strcmp(nla, table->name)) nft_table_lookup()
334 return table; nft_table_lookup()
342 struct nft_table *table; nf_tables_table_lookup() local
347 table = nft_table_lookup(afi, nla); nf_tables_table_lookup()
348 if (table != NULL) nf_tables_table_lookup()
349 return table; nf_tables_table_lookup()
354 static inline u64 nf_tables_alloc_handle(struct nft_table *table) nf_tables_alloc_handle() argument
356 return ++table->hgenerator; nf_tables_alloc_handle()
406 int family, const struct nft_table *table) nf_tables_fill_table_info()
421 if (nla_put_string(skb, NFTA_TABLE_NAME, table->name) || nf_tables_fill_table_info()
422 nla_put_be32(skb, NFTA_TABLE_FLAGS, htonl(table->flags)) || nf_tables_fill_table_info()
423 nla_put_be32(skb, NFTA_TABLE_USE, htonl(table->use))) nf_tables_fill_table_info()
449 event, 0, ctx->afi->family, ctx->table); nf_tables_table_notify()
470 const struct nft_table *table; nf_tables_dump_tables() local
482 list_for_each_entry_rcu(table, &afi->tables, list) { nf_tables_dump_tables()
493 afi->family, table) < 0) nf_tables_dump_tables()
513 const struct nft_table *table; nf_tables_gettable() local
530 table = nf_tables_table_lookup(afi, nla[NFTA_TABLE_NAME]); nf_tables_gettable()
531 if (IS_ERR(table)) nf_tables_gettable()
532 return PTR_ERR(table); nf_tables_gettable()
533 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_gettable()
542 family, table); nf_tables_gettable()
554 struct nft_table *table) nf_tables_table_enable()
559 list_for_each_entry(chain, &table->chains, list) { nf_tables_table_enable()
571 list_for_each_entry(chain, &table->chains, list) { nf_tables_table_enable()
584 struct nft_table *table) nf_tables_table_disable()
588 list_for_each_entry(chain, &table->chains, list) { nf_tables_table_disable()
608 if (flags == ctx->table->flags) nf_tables_updtable()
617 !(ctx->table->flags & NFT_TABLE_F_DORMANT)) { nf_tables_updtable()
620 ctx->table->flags & NFT_TABLE_F_DORMANT) { nf_tables_updtable()
621 ret = nf_tables_table_enable(ctx->afi, ctx->table); nf_tables_updtable()
623 ctx->table->flags &= ~NFT_TABLE_F_DORMANT; nf_tables_updtable()
645 struct nft_table *table; nf_tables_newtable() local
657 table = nf_tables_table_lookup(afi, name); nf_tables_newtable()
658 if (IS_ERR(table)) { nf_tables_newtable()
659 if (PTR_ERR(table) != -ENOENT) nf_tables_newtable()
660 return PTR_ERR(table); nf_tables_newtable()
661 table = NULL; nf_tables_newtable()
664 if (table != NULL) { nf_tables_newtable()
665 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_newtable()
672 nft_ctx_init(&ctx, skb, nlh, afi, table, NULL, nla); nf_tables_newtable()
686 table = kzalloc(sizeof(*table), GFP_KERNEL); nf_tables_newtable()
687 if (table == NULL) nf_tables_newtable()
690 nla_strlcpy(table->name, name, NFT_TABLE_MAXNAMELEN); nf_tables_newtable()
691 INIT_LIST_HEAD(&table->chains); nf_tables_newtable()
692 INIT_LIST_HEAD(&table->sets); nf_tables_newtable()
693 table->flags = flags; nf_tables_newtable()
695 nft_ctx_init(&ctx, skb, nlh, afi, table, NULL, nla); nf_tables_newtable()
700 list_add_tail_rcu(&table->list, &afi->tables); nf_tables_newtable()
703 kfree(table); nf_tables_newtable()
715 list_for_each_entry(chain, &ctx->table->chains, list) { nft_flush_table()
723 list_for_each_entry_safe(set, ns, &ctx->table->sets, list) { nft_flush_table()
733 list_for_each_entry_safe(chain, nc, &ctx->table->chains, list) { nft_flush_table()
749 struct nft_table *table, *nt; nft_flush() local
758 list_for_each_entry_safe(table, nt, &afi->tables, list) { nft_flush()
760 nla_strcmp(nla[NFTA_TABLE_NAME], table->name) != 0) nft_flush()
763 ctx->table = table; nft_flush()
780 struct nft_table *table; nf_tables_deltable() local
793 table = nf_tables_table_lookup(afi, nla[NFTA_TABLE_NAME]); nf_tables_deltable()
794 if (IS_ERR(table)) nf_tables_deltable()
795 return PTR_ERR(table); nf_tables_deltable()
796 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_deltable()
800 ctx.table = table; nf_tables_deltable()
807 BUG_ON(ctx->table->use > 0); nf_tables_table_destroy()
809 kfree(ctx->table); nf_tables_table_destroy()
842 nf_tables_chain_lookup_byhandle(const struct nft_table *table, u64 handle) nf_tables_chain_lookup_byhandle() argument
846 list_for_each_entry(chain, &table->chains, list) { nf_tables_chain_lookup_byhandle()
854 static struct nft_chain *nf_tables_chain_lookup(const struct nft_table *table, nf_tables_chain_lookup() argument
862 list_for_each_entry(chain, &table->chains, list) { nf_tables_chain_lookup()
922 int family, const struct nft_table *table, nf_tables_fill_chain_info()
938 if (nla_put_string(skb, NFTA_CHAIN_TABLE, table->name)) nf_tables_fill_chain_info()
996 event, 0, ctx->afi->family, ctx->table, nf_tables_chain_notify()
1018 const struct nft_table *table; nf_tables_dump_chains() local
1031 list_for_each_entry_rcu(table, &afi->tables, list) { nf_tables_dump_chains()
1032 list_for_each_entry_rcu(chain, &table->chains, list) { nf_tables_dump_chains()
1043 afi->family, table, chain) < 0) nf_tables_dump_chains()
1064 const struct nft_table *table; nf_tables_getchain() local
1082 table = nf_tables_table_lookup(afi, nla[NFTA_CHAIN_TABLE]); nf_tables_getchain()
1083 if (IS_ERR(table)) nf_tables_getchain()
1084 return PTR_ERR(table); nf_tables_getchain()
1085 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_getchain()
1088 chain = nf_tables_chain_lookup(table, nla[NFTA_CHAIN_NAME]); nf_tables_getchain()
1100 family, table, chain); nf_tables_getchain()
1183 struct nft_table *table; nf_tables_newchain() local
1203 table = nf_tables_table_lookup(afi, nla[NFTA_CHAIN_TABLE]); nf_tables_newchain()
1204 if (IS_ERR(table)) nf_tables_newchain()
1205 return PTR_ERR(table); nf_tables_newchain()
1212 chain = nf_tables_chain_lookup_byhandle(table, handle); nf_tables_newchain()
1216 chain = nf_tables_chain_lookup(table, name); nf_tables_newchain()
1255 !IS_ERR(nf_tables_chain_lookup(table, nla[NFTA_CHAIN_NAME]))) nf_tables_newchain()
1267 nft_ctx_init(&ctx, skb, nlh, afi, table, chain, nla); nf_tables_newchain()
1291 if (table->use == UINT_MAX) nf_tables_newchain()
1379 chain->handle = nf_tables_alloc_handle(table); nf_tables_newchain()
1380 chain->table = table; nf_tables_newchain()
1383 if (!(table->flags & NFT_TABLE_F_DORMANT) && nf_tables_newchain()
1390 nft_ctx_init(&ctx, skb, nlh, afi, table, chain, nla); nf_tables_newchain()
1395 table->use++; nf_tables_newchain()
1396 list_add_tail_rcu(&chain->list, &table->chains); nf_tables_newchain()
1399 nf_tables_unregister_hooks(table, chain, afi->nops); nf_tables_newchain()
1411 struct nft_table *table; nf_tables_delchain() local
1421 table = nf_tables_table_lookup(afi, nla[NFTA_CHAIN_TABLE]); nf_tables_delchain()
1422 if (IS_ERR(table)) nf_tables_delchain()
1423 return PTR_ERR(table); nf_tables_delchain()
1424 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_delchain()
1427 chain = nf_tables_chain_lookup(table, nla[NFTA_CHAIN_NAME]); nf_tables_delchain()
1435 nft_ctx_init(&ctx, skb, nlh, afi, table, chain, nla); nf_tables_delchain()
1717 const struct nft_table *table, nf_tables_fill_rule_info()
1738 if (nla_put_string(skb, NFTA_RULE_TABLE, table->name)) nf_tables_fill_rule_info()
1793 event, 0, ctx->afi->family, ctx->table, nf_tables_rule_notify()
1815 const struct nft_table *table; nf_tables_dump_rules() local
1829 list_for_each_entry_rcu(table, &afi->tables, list) { nf_tables_dump_rules()
1830 list_for_each_entry_rcu(chain, &table->chains, list) { nf_tables_dump_rules()
1843 afi->family, table, chain, rule) < 0) nf_tables_dump_rules()
1866 const struct nft_table *table; nf_tables_getrule() local
1885 table = nf_tables_table_lookup(afi, nla[NFTA_RULE_TABLE]); nf_tables_getrule()
1886 if (IS_ERR(table)) nf_tables_getrule()
1887 return PTR_ERR(table); nf_tables_getrule()
1888 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_getrule()
1891 chain = nf_tables_chain_lookup(table, nla[NFTA_RULE_CHAIN]); nf_tables_getrule()
1907 family, table, chain, rule); nf_tables_getrule()
1946 struct nft_table *table; nf_tables_newrule() local
1965 table = nf_tables_table_lookup(afi, nla[NFTA_RULE_TABLE]); nf_tables_newrule()
1966 if (IS_ERR(table)) nf_tables_newrule()
1967 return PTR_ERR(table); nf_tables_newrule()
1969 chain = nf_tables_chain_lookup(table, nla[NFTA_RULE_CHAIN]); nf_tables_newrule()
1988 handle = nf_tables_alloc_handle(table); nf_tables_newrule()
2004 nft_ctx_init(&ctx, skb, nlh, afi, table, chain, nla); nf_tables_newrule()
2112 struct nft_table *table; nf_tables_delrule() local
2122 table = nf_tables_table_lookup(afi, nla[NFTA_RULE_TABLE]); nf_tables_delrule()
2123 if (IS_ERR(table)) nf_tables_delrule()
2124 return PTR_ERR(table); nf_tables_delrule()
2125 if (table->flags & NFT_TABLE_INACTIVE) nf_tables_delrule()
2129 chain = nf_tables_chain_lookup(table, nla[NFTA_RULE_CHAIN]); nf_tables_delrule()
2134 nft_ctx_init(&ctx, skb, nlh, afi, table, chain, nla); nf_tables_delrule()
2148 list_for_each_entry(chain, &table->chains, list) { nf_tables_delrule()
2281 struct nft_table *table = NULL; nft_ctx_init_from_setattr() local
2293 table = nf_tables_table_lookup(afi, nla[NFTA_SET_TABLE]); nft_ctx_init_from_setattr()
2294 if (IS_ERR(table)) nft_ctx_init_from_setattr()
2295 return PTR_ERR(table); nft_ctx_init_from_setattr()
2296 if (table->flags & NFT_TABLE_INACTIVE) nft_ctx_init_from_setattr()
2300 nft_ctx_init(ctx, skb, nlh, afi, table, NULL, nla); nft_ctx_init_from_setattr()
2304 struct nft_set *nf_tables_set_lookup(const struct nft_table *table, nf_tables_set_lookup() argument
2312 list_for_each_entry(set, &table->sets, list) { nf_tables_set_lookup()
2350 list_for_each_entry(i, &ctx->table->sets, list) { nf_tables_set_alloc_name()
2371 list_for_each_entry(i, &ctx->table->sets, list) { nf_tables_set_alloc_name()
2398 if (nla_put_string(skb, NFTA_SET_TABLE, ctx->table->name)) nf_tables_fill_set()
2481 struct nft_table *table, *cur_table = (struct nft_table *)cb->args[2]; nf_tables_dump_sets() local
2502 list_for_each_entry_rcu(table, &afi->tables, list) { nf_tables_dump_sets()
2503 if (ctx->table && ctx->table != table) nf_tables_dump_sets()
2507 if (cur_table != table) nf_tables_dump_sets()
2513 list_for_each_entry_rcu(set, &table->sets, list) { nf_tables_dump_sets()
2518 ctx_set.table = table; nf_tables_dump_sets()
2524 cb->args[2] = (unsigned long) table; nf_tables_dump_sets()
2584 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_NAME]); nf_tables_getset()
2630 struct nft_table *table; nf_tables_newset() local
2723 table = nf_tables_table_lookup(afi, nla[NFTA_SET_TABLE]); nf_tables_newset()
2724 if (IS_ERR(table)) nf_tables_newset()
2725 return PTR_ERR(table); nf_tables_newset()
2727 nft_ctx_init(&ctx, skb, nlh, afi, table, NULL, nla); nf_tables_newset()
2729 set = nf_tables_set_lookup(table, nla[NFTA_SET_NAME]); nf_tables_newset()
2786 list_add_tail_rcu(&set->list, &table->sets); nf_tables_newset()
2787 table->use++; nf_tables_newset()
2829 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_NAME]); nf_tables_delset()
2961 struct nft_table *table; nft_ctx_init_from_elemattr() local
2968 table = nf_tables_table_lookup(afi, nla[NFTA_SET_ELEM_LIST_TABLE]); nft_ctx_init_from_elemattr()
2969 if (IS_ERR(table)) nft_ctx_init_from_elemattr()
2970 return PTR_ERR(table); nft_ctx_init_from_elemattr()
2971 if (!trans && (table->flags & NFT_TABLE_INACTIVE)) nft_ctx_init_from_elemattr()
2974 nft_ctx_init(ctx, skb, nlh, afi, table, NULL, nla); nft_ctx_init_from_elemattr()
3084 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_ELEM_LIST_SET]); nf_tables_dump_set()
3105 if (nla_put_string(skb, NFTA_SET_ELEM_LIST_TABLE, ctx.table->name)) nf_tables_dump_set()
3149 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_ELEM_LIST_SET]); nf_tables_getsetelem()
3186 if (nla_put_string(skb, NFTA_SET_TABLE, ctx->table->name)) nf_tables_fill_setelem_info()
3387 .table = ctx->table, nft_add_set_elem()
3474 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_ELEM_LIST_SET]); nf_tables_newsetelem()
3568 set = nf_tables_set_lookup(ctx.table, nla[NFTA_SET_ELEM_LIST_SET]); nf_tables_delsetelem()
3839 trans->ctx.table); nf_tables_commit()
3840 trans->ctx.table->flags |= NFT_TABLE_F_DORMANT; nf_tables_commit()
3843 trans->ctx.table->flags &= ~NFT_TABLE_INACTIVE; nf_tables_commit()
3862 nf_tables_unregister_hooks(trans->ctx.table, nf_tables_commit()
3881 /* This avoids hitting -EBUSY when deleting the table nf_tables_commit()
3886 trans->ctx.table->use--; nf_tables_commit()
3965 trans->ctx.table); nf_tables_abort()
3966 trans->ctx.table->flags |= NFT_TABLE_F_DORMANT; nf_tables_abort()
3970 list_del_rcu(&trans->ctx.table->list); nf_tables_abort()
3974 list_add_tail_rcu(&trans->ctx.table->list, nf_tables_abort()
3984 trans->ctx.table->use--; nf_tables_abort()
3986 nf_tables_unregister_hooks(trans->ctx.table, nf_tables_abort()
3992 trans->ctx.table->use++; nf_tables_abort()
3994 &trans->ctx.table->chains); nf_tables_abort()
4007 trans->ctx.table->use--; nf_tables_abort()
4011 trans->ctx.table->use++; nf_tables_abort()
4013 &trans->ctx.table->sets); nf_tables_abort()
4159 list_for_each_entry(set, &ctx->table->sets, list) {
4348 chain = nf_tables_chain_lookup(ctx->table, nft_verdict_init()
91 nft_ctx_init(struct nft_ctx *ctx, const struct sk_buff *skb, const struct nlmsghdr *nlh, struct nft_af_info *afi, struct nft_table *table, struct nft_chain *chain, const struct nlattr * const *nla) nft_ctx_init() argument
404 nf_tables_fill_table_info(struct sk_buff *skb, struct net *net, u32 portid, u32 seq, int event, u32 flags, int family, const struct nft_table *table) nf_tables_fill_table_info() argument
553 nf_tables_table_enable(const struct nft_af_info *afi, struct nft_table *table) nf_tables_table_enable() argument
583 nf_tables_table_disable(const struct nft_af_info *afi, struct nft_table *table) nf_tables_table_disable() argument
920 nf_tables_fill_chain_info(struct sk_buff *skb, struct net *net, u32 portid, u32 seq, int event, u32 flags, int family, const struct nft_table *table, const struct nft_chain *chain) nf_tables_fill_chain_info() argument
1714 nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net, u32 portid, u32 seq, int event, u32 flags, int family, const struct nft_table *table, const struct nft_chain *chain, const struct nft_rule *rule) nf_tables_fill_rule_info() argument
/linux-4.1.27/drivers/gpu/drm/radeon/
H A Drv730_dpm.c230 RV770_SMC_STATETABLE *table) rv730_populate_smc_acpi_state()
242 table->ACPIState = table->initialState; rv730_populate_smc_acpi_state()
243 table->ACPIState.flags &= ~PPSMC_SWSTATE_FLAG_DC; rv730_populate_smc_acpi_state()
247 &table->ACPIState.levels[0].vddc); rv730_populate_smc_acpi_state()
248 table->ACPIState.levels[0].gen2PCIE = pi->pcie_gen2 ? rv730_populate_smc_acpi_state()
250 table->ACPIState.levels[0].gen2XSP = rv730_populate_smc_acpi_state()
254 &table->ACPIState.levels[0].vddc); rv730_populate_smc_acpi_state()
255 table->ACPIState.levels[0].gen2PCIE = 0; rv730_populate_smc_acpi_state()
297 table->ACPIState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL = cpu_to_be32(mpll_func_cntl); rv730_populate_smc_acpi_state()
298 table->ACPIState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL2 = cpu_to_be32(mpll_func_cntl_2); rv730_populate_smc_acpi_state()
299 table->ACPIState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL3 = cpu_to_be32(mpll_func_cntl_3); rv730_populate_smc_acpi_state()
300 table->ACPIState.levels[0].mclk.mclk730.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); rv730_populate_smc_acpi_state()
301 table->ACPIState.levels[0].mclk.mclk730.vDLL_CNTL = cpu_to_be32(dll_cntl); rv730_populate_smc_acpi_state()
303 table->ACPIState.levels[0].mclk.mclk730.mclk_value = 0; rv730_populate_smc_acpi_state()
305 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = cpu_to_be32(spll_func_cntl); rv730_populate_smc_acpi_state()
306 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = cpu_to_be32(spll_func_cntl_2); rv730_populate_smc_acpi_state()
307 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = cpu_to_be32(spll_func_cntl_3); rv730_populate_smc_acpi_state()
309 table->ACPIState.levels[0].sclk.sclk_value = 0; rv730_populate_smc_acpi_state()
311 rv770_populate_mvdd_value(rdev, 0, &table->ACPIState.levels[0].mvdd); rv730_populate_smc_acpi_state()
313 table->ACPIState.levels[1] = table->ACPIState.levels[0]; rv730_populate_smc_acpi_state()
314 table->ACPIState.levels[2] = table->ACPIState.levels[0]; rv730_populate_smc_acpi_state()
321 RV770_SMC_STATETABLE *table) rv730_populate_smc_initial_state()
327 table->initialState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL = rv730_populate_smc_initial_state()
329 table->initialState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL2 = rv730_populate_smc_initial_state()
331 table->initialState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL3 = rv730_populate_smc_initial_state()
333 table->initialState.levels[0].mclk.mclk730.vMCLK_PWRMGT_CNTL = rv730_populate_smc_initial_state()
335 table->initialState.levels[0].mclk.mclk730.vDLL_CNTL = rv730_populate_smc_initial_state()
337 table->initialState.levels[0].mclk.mclk730.vMPLL_SS = rv730_populate_smc_initial_state()
339 table->initialState.levels[0].mclk.mclk730.vMPLL_SS2 = rv730_populate_smc_initial_state()
342 table->initialState.levels[0].mclk.mclk730.mclk_value = rv730_populate_smc_initial_state()
345 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = rv730_populate_smc_initial_state()
347 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = rv730_populate_smc_initial_state()
349 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = rv730_populate_smc_initial_state()
351 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM = rv730_populate_smc_initial_state()
353 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM_2 = rv730_populate_smc_initial_state()
356 table->initialState.levels[0].sclk.sclk_value = rv730_populate_smc_initial_state()
359 table->initialState.levels[0].arbValue = MC_CG_ARB_FREQ_F0; rv730_populate_smc_initial_state()
361 table->initialState.levels[0].seqValue = rv730_populate_smc_initial_state()
366 &table->initialState.levels[0].vddc); rv730_populate_smc_initial_state()
368 &table->initialState.levels[0].mvdd); rv730_populate_smc_initial_state()
372 table->initialState.levels[0].aT = cpu_to_be32(a_t); rv730_populate_smc_initial_state()
374 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); rv730_populate_smc_initial_state()
377 table->initialState.levels[0].gen2PCIE = 1; rv730_populate_smc_initial_state()
379 table->initialState.levels[0].gen2PCIE = 0; rv730_populate_smc_initial_state()
381 table->initialState.levels[0].gen2XSP = 1; rv730_populate_smc_initial_state()
383 table->initialState.levels[0].gen2XSP = 0; rv730_populate_smc_initial_state()
385 table->initialState.levels[1] = table->initialState.levels[0]; rv730_populate_smc_initial_state()
386 table->initialState.levels[2] = table->initialState.levels[0]; rv730_populate_smc_initial_state()
388 table->initialState.flags |= PPSMC_SWSTATE_FLAG_DC; rv730_populate_smc_initial_state()
229 rv730_populate_smc_acpi_state(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) rv730_populate_smc_acpi_state() argument
319 rv730_populate_smc_initial_state(struct radeon_device *rdev, struct radeon_ps *radeon_state, RV770_SMC_STATETABLE *table) rv730_populate_smc_initial_state() argument
H A Dci_dpm.c1018 DRM_ERROR("Failed to load fan table to the SMC."); ci_thermal_setup_fan_table()
1296 SMU7_Discrete_DpmTable *table = &pi->smc_state_table; ci_init_fps_limits() local
1302 table->FpsHighT = cpu_to_be16(tmp); ci_init_fps_limits()
1305 table->FpsLowT = cpu_to_be16(tmp); ci_init_fps_limits()
2189 SMU7_Discrete_DpmTable *table) ci_populate_smc_vddc_table()
2194 table->VddcLevelCount = pi->vddc_voltage_table.count; ci_populate_smc_vddc_table()
2195 for (count = 0; count < table->VddcLevelCount; count++) { ci_populate_smc_vddc_table()
2198 &table->VddcLevel[count]); ci_populate_smc_vddc_table()
2201 table->VddcLevel[count].Smio |= ci_populate_smc_vddc_table()
2204 table->VddcLevel[count].Smio = 0; ci_populate_smc_vddc_table()
2206 table->VddcLevelCount = cpu_to_be32(table->VddcLevelCount); ci_populate_smc_vddc_table()
2212 SMU7_Discrete_DpmTable *table) ci_populate_smc_vddci_table()
2217 table->VddciLevelCount = pi->vddci_voltage_table.count; ci_populate_smc_vddci_table()
2218 for (count = 0; count < table->VddciLevelCount; count++) { ci_populate_smc_vddci_table()
2221 &table->VddciLevel[count]); ci_populate_smc_vddci_table()
2224 table->VddciLevel[count].Smio |= ci_populate_smc_vddci_table()
2227 table->VddciLevel[count].Smio = 0; ci_populate_smc_vddci_table()
2229 table->VddciLevelCount = cpu_to_be32(table->VddciLevelCount); ci_populate_smc_vddci_table()
2235 SMU7_Discrete_DpmTable *table) ci_populate_smc_mvdd_table()
2240 table->MvddLevelCount = pi->mvdd_voltage_table.count; ci_populate_smc_mvdd_table()
2241 for (count = 0; count < table->MvddLevelCount; count++) { ci_populate_smc_mvdd_table()
2244 &table->MvddLevel[count]); ci_populate_smc_mvdd_table()
2247 table->MvddLevel[count].Smio |= ci_populate_smc_mvdd_table()
2250 table->MvddLevel[count].Smio = 0; ci_populate_smc_mvdd_table()
2252 table->MvddLevelCount = cpu_to_be32(table->MvddLevelCount); ci_populate_smc_mvdd_table()
2258 SMU7_Discrete_DpmTable *table) ci_populate_smc_voltage_tables()
2262 ret = ci_populate_smc_vddc_table(rdev, table); ci_populate_smc_voltage_tables()
2266 ret = ci_populate_smc_vddci_table(rdev, table); ci_populate_smc_voltage_tables()
2270 ret = ci_populate_smc_mvdd_table(rdev, table); ci_populate_smc_voltage_tables()
2597 SMU7_Discrete_DpmTable *table) ci_populate_smc_link_level()
2604 table->LinkLevel[i].PcieGenSpeed = ci_populate_smc_link_level()
2606 table->LinkLevel[i].PcieLaneCount = ci_populate_smc_link_level()
2608 table->LinkLevel[i].EnabledForActivity = 1; ci_populate_smc_link_level()
2609 table->LinkLevel[i].DownT = cpu_to_be32(5); ci_populate_smc_link_level()
2610 table->LinkLevel[i].UpT = cpu_to_be32(30); ci_populate_smc_link_level()
2619 SMU7_Discrete_DpmTable *table) ci_populate_smc_uvd_level()
2625 table->UvdLevelCount = ci_populate_smc_uvd_level()
2628 for (count = 0; count < table->UvdLevelCount; count++) { ci_populate_smc_uvd_level()
2629 table->UvdLevel[count].VclkFrequency = ci_populate_smc_uvd_level()
2631 table->UvdLevel[count].DclkFrequency = ci_populate_smc_uvd_level()
2633 table->UvdLevel[count].MinVddc = ci_populate_smc_uvd_level()
2635 table->UvdLevel[count].MinVddcPhases = 1; ci_populate_smc_uvd_level()
2639 table->UvdLevel[count].VclkFrequency, false, &dividers); ci_populate_smc_uvd_level()
2643 table->UvdLevel[count].VclkDivider = (u8)dividers.post_divider; ci_populate_smc_uvd_level()
2647 table->UvdLevel[count].DclkFrequency, false, &dividers); ci_populate_smc_uvd_level()
2651 table->UvdLevel[count].DclkDivider = (u8)dividers.post_divider; ci_populate_smc_uvd_level()
2653 table->UvdLevel[count].VclkFrequency = cpu_to_be32(table->UvdLevel[count].VclkFrequency); ci_populate_smc_uvd_level()
2654 table->UvdLevel[count].DclkFrequency = cpu_to_be32(table->UvdLevel[count].DclkFrequency); ci_populate_smc_uvd_level()
2655 table->UvdLevel[count].MinVddc = cpu_to_be16(table->UvdLevel[count].MinVddc); ci_populate_smc_uvd_level()
2662 SMU7_Discrete_DpmTable *table) ci_populate_smc_vce_level()
2668 table->VceLevelCount = ci_populate_smc_vce_level()
2671 for (count = 0; count < table->VceLevelCount; count++) { ci_populate_smc_vce_level()
2672 table->VceLevel[count].Frequency = ci_populate_smc_vce_level()
2674 table->VceLevel[count].MinVoltage = ci_populate_smc_vce_level()
2676 table->VceLevel[count].MinPhases = 1; ci_populate_smc_vce_level()
2680 table->VceLevel[count].Frequency, false, &dividers); ci_populate_smc_vce_level()
2684 table->VceLevel[count].Divider = (u8)dividers.post_divider; ci_populate_smc_vce_level()
2686 table->VceLevel[count].Frequency = cpu_to_be32(table->VceLevel[count].Frequency); ci_populate_smc_vce_level()
2687 table->VceLevel[count].MinVoltage = cpu_to_be16(table->VceLevel[count].MinVoltage); ci_populate_smc_vce_level()
2695 SMU7_Discrete_DpmTable *table) ci_populate_smc_acp_level()
2701 table->AcpLevelCount = (u8) ci_populate_smc_acp_level()
2704 for (count = 0; count < table->AcpLevelCount; count++) { ci_populate_smc_acp_level()
2705 table->AcpLevel[count].Frequency = ci_populate_smc_acp_level()
2707 table->AcpLevel[count].MinVoltage = ci_populate_smc_acp_level()
2709 table->AcpLevel[count].MinPhases = 1; ci_populate_smc_acp_level()
2713 table->AcpLevel[count].Frequency, false, &dividers); ci_populate_smc_acp_level()
2717 table->AcpLevel[count].Divider = (u8)dividers.post_divider; ci_populate_smc_acp_level()
2719 table->AcpLevel[count].Frequency = cpu_to_be32(table->AcpLevel[count].Frequency); ci_populate_smc_acp_level()
2720 table->AcpLevel[count].MinVoltage = cpu_to_be16(table->AcpLevel[count].MinVoltage); ci_populate_smc_acp_level()
2727 SMU7_Discrete_DpmTable *table) ci_populate_smc_samu_level()
2733 table->SamuLevelCount = ci_populate_smc_samu_level()
2736 for (count = 0; count < table->SamuLevelCount; count++) { ci_populate_smc_samu_level()
2737 table->SamuLevel[count].Frequency = ci_populate_smc_samu_level()
2739 table->SamuLevel[count].MinVoltage = ci_populate_smc_samu_level()
2741 table->SamuLevel[count].MinPhases = 1; ci_populate_smc_samu_level()
2745 table->SamuLevel[count].Frequency, false, &dividers); ci_populate_smc_samu_level()
2749 table->SamuLevel[count].Divider = (u8)dividers.post_divider; ci_populate_smc_samu_level()
2751 table->SamuLevel[count].Frequency = cpu_to_be32(table->SamuLevel[count].Frequency); ci_populate_smc_samu_level()
2752 table->SamuLevel[count].MinVoltage = cpu_to_be16(table->SamuLevel[count].MinVoltage); ci_populate_smc_samu_level()
2960 SMU7_Discrete_DpmTable *table) ci_populate_smc_acpi_level()
2971 table->ACPILevel.Flags &= ~PPSMC_SWSTATE_FLAG_DC; ci_populate_smc_acpi_level()
2974 table->ACPILevel.MinVddc = cpu_to_be32(pi->acpi_vddc * VOLTAGE_SCALE); ci_populate_smc_acpi_level()
2976 table->ACPILevel.MinVddc = cpu_to_be32(pi->min_vddc_in_pp_table * VOLTAGE_SCALE); ci_populate_smc_acpi_level()
2978 table->ACPILevel.MinVddcPhases = pi->vddc_phase_shed_control ? 0 : 1; ci_populate_smc_acpi_level()
2980 table->ACPILevel.SclkFrequency = rdev->clock.spll.reference_freq; ci_populate_smc_acpi_level()
2984 table->ACPILevel.SclkFrequency, false, &dividers); ci_populate_smc_acpi_level()
2988 table->ACPILevel.SclkDid = (u8)dividers.post_divider; ci_populate_smc_acpi_level()
2989 table->ACPILevel.DisplayWatermark = PPSMC_DISPLAY_WATERMARK_LOW; ci_populate_smc_acpi_level()
2990 table->ACPILevel.DeepSleepDivId = 0; ci_populate_smc_acpi_level()
2998 table->ACPILevel.CgSpllFuncCntl = spll_func_cntl; ci_populate_smc_acpi_level()
2999 table->ACPILevel.CgSpllFuncCntl2 = spll_func_cntl_2; ci_populate_smc_acpi_level()
3000 table->ACPILevel.CgSpllFuncCntl3 = pi->clock_registers.cg_spll_func_cntl_3; ci_populate_smc_acpi_level()
3001 table->ACPILevel.CgSpllFuncCntl4 = pi->clock_registers.cg_spll_func_cntl_4; ci_populate_smc_acpi_level()
3002 table->ACPILevel.SpllSpreadSpectrum = pi->clock_registers.cg_spll_spread_spectrum; ci_populate_smc_acpi_level()
3003 table->ACPILevel.SpllSpreadSpectrum2 = pi->clock_registers.cg_spll_spread_spectrum_2; ci_populate_smc_acpi_level()
3004 table->ACPILevel.CcPwrDynRm = 0; ci_populate_smc_acpi_level()
3005 table->ACPILevel.CcPwrDynRm1 = 0; ci_populate_smc_acpi_level()
3007 table->ACPILevel.Flags = cpu_to_be32(table->ACPILevel.Flags); ci_populate_smc_acpi_level()
3008 table->ACPILevel.MinVddcPhases = cpu_to_be32(table->ACPILevel.MinVddcPhases); ci_populate_smc_acpi_level()
3009 table->ACPILevel.SclkFrequency = cpu_to_be32(table->ACPILevel.SclkFrequency); ci_populate_smc_acpi_level()
3010 table->ACPILevel.CgSpllFuncCntl = cpu_to_be32(table->ACPILevel.CgSpllFuncCntl); ci_populate_smc_acpi_level()
3011 table->ACPILevel.CgSpllFuncCntl2 = cpu_to_be32(table->ACPILevel.CgSpllFuncCntl2); ci_populate_smc_acpi_level()
3012 table->ACPILevel.CgSpllFuncCntl3 = cpu_to_be32(table->ACPILevel.CgSpllFuncCntl3); ci_populate_smc_acpi_level()
3013 table->ACPILevel.CgSpllFuncCntl4 = cpu_to_be32(table->ACPILevel.CgSpllFuncCntl4); ci_populate_smc_acpi_level()
3014 table->ACPILevel.SpllSpreadSpectrum = cpu_to_be32(table->ACPILevel.SpllSpreadSpectrum); ci_populate_smc_acpi_level()
3015 table->ACPILevel.SpllSpreadSpectrum2 = cpu_to_be32(table->ACPILevel.SpllSpreadSpectrum2); ci_populate_smc_acpi_level()
3016 table->ACPILevel.CcPwrDynRm = cpu_to_be32(table->ACPILevel.CcPwrDynRm); ci_populate_smc_acpi_level()
3017 table->ACPILevel.CcPwrDynRm1 = cpu_to_be32(table->ACPILevel.CcPwrDynRm1); ci_populate_smc_acpi_level()
3019 table->MemoryACPILevel.MinVddc = table->ACPILevel.MinVddc; ci_populate_smc_acpi_level()
3020 table->MemoryACPILevel.MinVddcPhases = table->ACPILevel.MinVddcPhases; ci_populate_smc_acpi_level()
3024 table->MemoryACPILevel.MinVddci = ci_populate_smc_acpi_level()
3027 table->MemoryACPILevel.MinVddci = ci_populate_smc_acpi_level()
3032 table->MemoryACPILevel.MinMvdd = 0; ci_populate_smc_acpi_level()
3034 table->MemoryACPILevel.MinMvdd = ci_populate_smc_acpi_level()
3042 table->MemoryACPILevel.DllCntl = cpu_to_be32(dll_cntl); ci_populate_smc_acpi_level()
3043 table->MemoryACPILevel.MclkPwrmgtCntl = cpu_to_be32(mclk_pwrmgt_cntl); ci_populate_smc_acpi_level()
3044 table->MemoryACPILevel.MpllAdFuncCntl = ci_populate_smc_acpi_level()
3046 table->MemoryACPILevel.MpllDqFuncCntl = ci_populate_smc_acpi_level()
3048 table->MemoryACPILevel.MpllFuncCntl = ci_populate_smc_acpi_level()
3050 table->MemoryACPILevel.MpllFuncCntl_1 = ci_populate_smc_acpi_level()
3052 table->MemoryACPILevel.MpllFuncCntl_2 = ci_populate_smc_acpi_level()
3054 table->MemoryACPILevel.MpllSs1 = cpu_to_be32(pi->clock_registers.mpll_ss1); ci_populate_smc_acpi_level()
3055 table->MemoryACPILevel.MpllSs2 = cpu_to_be32(pi->clock_registers.mpll_ss2); ci_populate_smc_acpi_level()
3057 table->MemoryACPILevel.EnabledForThrottle = 0; ci_populate_smc_acpi_level()
3058 table->MemoryACPILevel.EnabledForActivity = 0; ci_populate_smc_acpi_level()
3059 table->MemoryACPILevel.UpH = 0; ci_populate_smc_acpi_level()
3060 table->MemoryACPILevel.DownH = 100; ci_populate_smc_acpi_level()
3061 table->MemoryACPILevel.VoltageDownH = 0; ci_populate_smc_acpi_level()
3062 table->MemoryACPILevel.ActivityLevel = ci_populate_smc_acpi_level()
3065 table->MemoryACPILevel.StutterEnable = false; ci_populate_smc_acpi_level()
3066 table->MemoryACPILevel.StrobeEnable = false; ci_populate_smc_acpi_level()
3067 table->MemoryACPILevel.EdcReadEnable = false; ci_populate_smc_acpi_level()
3068 table->MemoryACPILevel.EdcWriteEnable = false; ci_populate_smc_acpi_level()
3069 table->MemoryACPILevel.RttEnable = false; ci_populate_smc_acpi_level()
3509 static int ci_find_boot_level(struct ci_single_dpm_table *table, ci_find_boot_level() argument
3515 for(i = 0; i < table->count; i++) { ci_find_boot_level()
3516 if (value == table->dpm_levels[i].value) { ci_find_boot_level()
3530 SMU7_Discrete_DpmTable *table = &pi->smc_state_table; ci_init_smc_table() local
3538 ci_populate_smc_voltage_tables(rdev, table); ci_init_smc_table()
3543 table->SystemFlags |= PPSMC_SYSTEMFLAG_GPIO_DC; ci_init_smc_table()
3546 table->SystemFlags |= PPSMC_SYSTEMFLAG_STEPVDDC; ci_init_smc_table()
3549 table->SystemFlags |= PPSMC_SYSTEMFLAG_GDDR5; ci_init_smc_table()
3566 ci_populate_smc_link_level(rdev, table); ci_init_smc_table()
3568 ret = ci_populate_smc_acpi_level(rdev, table); ci_init_smc_table()
3572 ret = ci_populate_smc_vce_level(rdev, table); ci_init_smc_table()
3576 ret = ci_populate_smc_acp_level(rdev, table); ci_init_smc_table()
3580 ret = ci_populate_smc_samu_level(rdev, table); ci_init_smc_table()
3588 ret = ci_populate_smc_uvd_level(rdev, table); ci_init_smc_table()
3592 table->UvdBootLevel = 0; ci_init_smc_table()
3593 table->VceBootLevel = 0; ci_init_smc_table()
3594 table->AcpBootLevel = 0; ci_init_smc_table()
3595 table->SamuBootLevel = 0; ci_init_smc_table()
3596 table->GraphicsBootLevel = 0; ci_init_smc_table()
3597 table->MemoryBootLevel = 0; ci_init_smc_table()
3607 table->BootVddc = pi->vbios_boot_state.vddc_bootup_value; ci_init_smc_table()
3608 table->BootVddci = pi->vbios_boot_state.vddci_bootup_value; ci_init_smc_table()
3609 table->BootMVdd = pi->vbios_boot_state.mvdd_bootup_value; ci_init_smc_table()
3617 table->UVDInterval = 1; ci_init_smc_table()
3618 table->VCEInterval = 1; ci_init_smc_table()
3619 table->ACPInterval = 1; ci_init_smc_table()
3620 table->SAMUInterval = 1; ci_init_smc_table()
3621 table->GraphicsVoltageChangeEnable = 1; ci_init_smc_table()
3622 table->GraphicsThermThrottleEnable = 1; ci_init_smc_table()
3623 table->GraphicsInterval = 1; ci_init_smc_table()
3624 table->VoltageInterval = 1; ci_init_smc_table()
3625 table->ThermalInterval = 1; ci_init_smc_table()
3626 table->TemperatureLimitHigh = (u16)((pi->thermal_temp_setting.temperature_high * ci_init_smc_table()
3628 table->TemperatureLimitLow = (u16)((pi->thermal_temp_setting.temperature_low * ci_init_smc_table()
3630 table->MemoryVoltageChangeEnable = 1; ci_init_smc_table()
3631 table->MemoryInterval = 1; ci_init_smc_table()
3632 table->VoltageResponseTime = 0; ci_init_smc_table()
3633 table->VddcVddciDelta = 4000; ci_init_smc_table()
3634 table->PhaseResponseTime = 0; ci_init_smc_table()
3635 table->MemoryThermThrottleEnable = 1; ci_init_smc_table()
3636 table->PCIeBootLinkLevel = pi->dpm_table.pcie_speed_table.count - 1; ci_init_smc_table()
3637 table->PCIeGenInterval = 1; ci_init_smc_table()
3639 table->SVI2Enable = 1; ci_init_smc_table()
3641 table->SVI2Enable = 0; ci_init_smc_table()
3643 table->ThermGpio = 17; ci_init_smc_table()
3644 table->SclkStepSize = 0x4000; ci_init_smc_table()
3646 table->SystemFlags = cpu_to_be32(table->SystemFlags); ci_init_smc_table()
3647 table->SmioMaskVddcVid = cpu_to_be32(table->SmioMaskVddcVid); ci_init_smc_table()
3648 table->SmioMaskVddcPhase = cpu_to_be32(table->SmioMaskVddcPhase); ci_init_smc_table()
3649 table->SmioMaskVddciVid = cpu_to_be32(table->SmioMaskVddciVid); ci_init_smc_table()
3650 table->SmioMaskMvddVid = cpu_to_be32(table->SmioMaskMvddVid); ci_init_smc_table()
3651 table->SclkStepSize = cpu_to_be32(table->SclkStepSize); ci_init_smc_table()
3652 table->TemperatureLimitHigh = cpu_to_be16(table->TemperatureLimitHigh); ci_init_smc_table()
3653 table->TemperatureLimitLow = cpu_to_be16(table->TemperatureLimitLow); ci_init_smc_table()
3654 table->VddcVddciDelta = cpu_to_be16(table->VddcVddciDelta); ci_init_smc_table()
3655 table->VoltageResponseTime = cpu_to_be16(table->VoltageResponseTime); ci_init_smc_table()
3656 table->PhaseResponseTime = cpu_to_be16(table->PhaseResponseTime); ci_init_smc_table()
3657 table->BootVddc = cpu_to_be16(table->BootVddc * VOLTAGE_SCALE); ci_init_smc_table()
3658 table->BootVddci = cpu_to_be16(table->BootVddci * VOLTAGE_SCALE); ci_init_smc_table()
3659 table->BootMVdd = cpu_to_be16(table->BootMVdd * VOLTAGE_SCALE); ci_init_smc_table()
3664 (u8 *)&table->SystemFlags, ci_init_smc_table()
4070 struct radeon_vce_clock_voltage_dependency_table *table = ci_get_vce_boot_level() local
4073 for (i = 0; i < table->count; i++) { ci_get_vce_boot_level()
4074 if (table->entries[i].evclk >= min_evclk) ci_get_vce_boot_level()
4078 return table->count - 1; ci_get_vce_boot_level()
4304 struct ci_mc_reg_table *table) ci_set_mc_special_registers()
4310 for (i = 0, j = table->last; i < table->last; i++) { ci_set_mc_special_registers()
4313 switch(table->mc_reg_address[i].s1 << 2) { ci_set_mc_special_registers()
4316 table->mc_reg_address[j].s1 = MC_PMG_CMD_EMRS >> 2; ci_set_mc_special_registers()
4317 table->mc_reg_address[j].s0 = MC_SEQ_PMG_CMD_EMRS_LP >> 2; ci_set_mc_special_registers()
4318 for (k = 0; k < table->num_entries; k++) { ci_set_mc_special_registers()
4319 table->mc_reg_table_entry[k].mc_data[j] = ci_set_mc_special_registers()
4320 ((temp_reg & 0xffff0000)) | ((table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16); ci_set_mc_special_registers()
4327 table->mc_reg_address[j].s1 = MC_PMG_CMD_MRS >> 2; ci_set_mc_special_registers()
4328 table->mc_reg_address[j].s0 = MC_SEQ_PMG_CMD_MRS_LP >> 2; ci_set_mc_special_registers()
4329 for (k = 0; k < table->num_entries; k++) { ci_set_mc_special_registers()
4330 table->mc_reg_table_entry[k].mc_data[j] = ci_set_mc_special_registers()
4331 (temp_reg & 0xffff0000) | (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); ci_set_mc_special_registers()
4333 table->mc_reg_table_entry[k].mc_data[j] |= 0x100; ci_set_mc_special_registers()
4340 table->mc_reg_address[j].s1 = MC_PMG_AUTO_CMD >> 2; ci_set_mc_special_registers()
4341 table->mc_reg_address[j].s0 = MC_PMG_AUTO_CMD >> 2; ci_set_mc_special_registers()
4342 for (k = 0; k < table->num_entries; k++) { ci_set_mc_special_registers()
4343 table->mc_reg_table_entry[k].mc_data[j] = ci_set_mc_special_registers()
4344 (table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16; ci_set_mc_special_registers()
4353 table->mc_reg_address[j].s1 = MC_PMG_CMD_MRS1 >> 2; ci_set_mc_special_registers()
4354 table->mc_reg_address[j].s0 = MC_SEQ_PMG_CMD_MRS1_LP >> 2; ci_set_mc_special_registers()
4355 for (k = 0; k < table->num_entries; k++) { ci_set_mc_special_registers()
4356 table->mc_reg_table_entry[k].mc_data[j] = ci_set_mc_special_registers()
4357 (temp_reg & 0xffff0000) | (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); ci_set_mc_special_registers()
4369 table->last = j; ci_set_mc_special_registers()
4447 static void ci_set_valid_flag(struct ci_mc_reg_table *table) ci_set_valid_flag() argument
4451 for (i = 0; i < table->last; i++) { ci_set_valid_flag()
4452 for (j = 1; j < table->num_entries; j++) { ci_set_valid_flag()
4453 if (table->mc_reg_table_entry[j-1].mc_data[i] != ci_set_valid_flag()
4454 table->mc_reg_table_entry[j].mc_data[i]) { ci_set_valid_flag()
4455 table->valid_flag |= 1 << i; ci_set_valid_flag()
4462 static void ci_set_s0_mc_reg_index(struct ci_mc_reg_table *table) ci_set_s0_mc_reg_index() argument
4467 for (i = 0; i < table->last; i++) { ci_set_s0_mc_reg_index()
4468 table->mc_reg_address[i].s0 = ci_set_s0_mc_reg_index()
4469 ci_check_s0_mc_reg_index(table->mc_reg_address[i].s1, &address) ? ci_set_s0_mc_reg_index()
4470 address : table->mc_reg_address[i].s1; ci_set_s0_mc_reg_index()
4474 static int ci_copy_vbios_mc_reg_table(const struct atom_mc_reg_table *table, ci_copy_vbios_mc_reg_table() argument
4479 if (table->last > SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE) ci_copy_vbios_mc_reg_table()
4481 if (table->num_entries > MAX_AC_TIMING_ENTRIES) ci_copy_vbios_mc_reg_table()
4484 for (i = 0; i < table->last; i++) ci_copy_vbios_mc_reg_table()
4485 ci_table->mc_reg_address[i].s1 = table->mc_reg_address[i].s1; ci_copy_vbios_mc_reg_table()
4487 ci_table->last = table->last; ci_copy_vbios_mc_reg_table()
4489 for (i = 0; i < table->num_entries; i++) { ci_copy_vbios_mc_reg_table()
4491 table->mc_reg_table_entry[i].mclk_max; ci_copy_vbios_mc_reg_table()
4492 for (j = 0; j < table->last; j++) ci_copy_vbios_mc_reg_table()
4494 table->mc_reg_table_entry[i].mc_data[j]; ci_copy_vbios_mc_reg_table()
4496 ci_table->num_entries = table->num_entries; ci_copy_vbios_mc_reg_table()
4502 struct ci_mc_reg_table *table) ci_register_patching_mc_seq()
4514 for (i = 0; i < table->last; i++) { ci_register_patching_mc_seq()
4515 if (table->last >= SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE) ci_register_patching_mc_seq()
4517 switch(table->mc_reg_address[i].s1 >> 2) { ci_register_patching_mc_seq()
4519 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4520 if ((table->mc_reg_table_entry[k].mclk_max == 125000) || ci_register_patching_mc_seq()
4521 (table->mc_reg_table_entry[k].mclk_max == 137500)) ci_register_patching_mc_seq()
4522 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4523 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFFFFFF8) | ci_register_patching_mc_seq()
4528 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4529 if ((table->mc_reg_table_entry[k].mclk_max == 125000) || ci_register_patching_mc_seq()
4530 (table->mc_reg_table_entry[k].mclk_max == 137500)) ci_register_patching_mc_seq()
4531 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4532 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFFF0F00) | ci_register_patching_mc_seq()
4537 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4538 if ((table->mc_reg_table_entry[k].mclk_max == 125000) || ci_register_patching_mc_seq()
4539 (table->mc_reg_table_entry[k].mclk_max == 137500)) ci_register_patching_mc_seq()
4540 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4541 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFFF0F00) | ci_register_patching_mc_seq()
4546 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4547 if ((table->mc_reg_table_entry[k].mclk_max == 125000) || ci_register_patching_mc_seq()
4548 (table->mc_reg_table_entry[k].mclk_max == 137500)) ci_register_patching_mc_seq()
4549 table->mc_reg_table_entry[k].mc_data[i] = 0; ci_register_patching_mc_seq()
4553 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4554 if (table->mc_reg_table_entry[k].mclk_max == 125000) ci_register_patching_mc_seq()
4555 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4556 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFE0FE0F) | ci_register_patching_mc_seq()
4558 else if (table->mc_reg_table_entry[k].mclk_max == 137500) ci_register_patching_mc_seq()
4559 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4560 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFE0FE0F) | ci_register_patching_mc_seq()
4565 for (k = 0; k < table->num_entries; k++) { ci_register_patching_mc_seq()
4566 if (table->mc_reg_table_entry[k].mclk_max == 125000) ci_register_patching_mc_seq()
4567 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4568 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFFFFFE0) | ci_register_patching_mc_seq()
4570 else if (table->mc_reg_table_entry[k].mclk_max == 137500) ci_register_patching_mc_seq()
4571 table->mc_reg_table_entry[k].mc_data[i] = ci_register_patching_mc_seq()
4572 (table->mc_reg_table_entry[k].mc_data[i] & 0xFFFFFFE0) | ci_register_patching_mc_seq()
4594 struct atom_mc_reg_table *table; ci_initialize_mc_reg_table() local
4599 table = kzalloc(sizeof(struct atom_mc_reg_table), GFP_KERNEL); ci_initialize_mc_reg_table()
4600 if (!table) ci_initialize_mc_reg_table()
4624 ret = radeon_atom_init_mc_reg_table(rdev, module_index, table); ci_initialize_mc_reg_table()
4628 ret = ci_copy_vbios_mc_reg_table(table, ci_table); ci_initialize_mc_reg_table()
4645 kfree(table); ci_initialize_mc_reg_table()
4954 struct radeon_clock_voltage_dependency_table *table) ci_patch_clock_voltage_dependency_table_with_vddc_leakage()
4958 if (table) { ci_patch_clock_voltage_dependency_table_with_vddc_leakage()
4959 for (i = 0; i < table->count; i++) ci_patch_clock_voltage_dependency_table_with_vddc_leakage()
4960 ci_patch_with_vddc_leakage(rdev, &table->entries[i].v); ci_patch_clock_voltage_dependency_table_with_vddc_leakage()
4965 struct radeon_clock_voltage_dependency_table *table) ci_patch_clock_voltage_dependency_table_with_vddci_leakage()
4969 if (table) { ci_patch_clock_voltage_dependency_table_with_vddci_leakage()
4970 for (i = 0; i < table->count; i++) ci_patch_clock_voltage_dependency_table_with_vddci_leakage()
4971 ci_patch_with_vddci_leakage(rdev, &table->entries[i].v); ci_patch_clock_voltage_dependency_table_with_vddci_leakage()
4976 struct radeon_vce_clock_voltage_dependency_table *table) ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage()
4980 if (table) { ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage()
4981 for (i = 0; i < table->count; i++) ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage()
4982 ci_patch_with_vddc_leakage(rdev, &table->entries[i].v); ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage()
4987 struct radeon_uvd_clock_voltage_dependency_table *table) ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage()
4991 if (table) { ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage()
4992 for (i = 0; i < table->count; i++) ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage()
4993 ci_patch_with_vddc_leakage(rdev, &table->entries[i].v); ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage()
4998 struct radeon_phase_shedding_limits_table *table) ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage()
5002 if (table) { ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage()
5003 for (i = 0; i < table->count; i++) ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage()
5004 ci_patch_with_vddc_leakage(rdev, &table->entries[i].voltage); ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage()
5009 struct radeon_clock_and_voltage_limits *table) ci_patch_clock_voltage_limits_with_vddc_leakage()
5011 if (table) { ci_patch_clock_voltage_limits_with_vddc_leakage()
5012 ci_patch_with_vddc_leakage(rdev, (u16 *)&table->vddc); ci_patch_clock_voltage_limits_with_vddc_leakage()
5013 ci_patch_with_vddci_leakage(rdev, (u16 *)&table->vddci); ci_patch_clock_voltage_limits_with_vddc_leakage()
5018 struct radeon_cac_leakage_table *table) ci_patch_cac_leakage_table_with_vddc_leakage()
5022 if (table) { ci_patch_cac_leakage_table_with_vddc_leakage()
5023 for (i = 0; i < table->count; i++) ci_patch_cac_leakage_table_with_vddc_leakage()
5024 ci_patch_with_vddc_leakage(rdev, &table->entries[i].vddc); ci_patch_cac_leakage_table_with_vddc_leakage()
2188 ci_populate_smc_vddc_table(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_vddc_table() argument
2211 ci_populate_smc_vddci_table(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_vddci_table() argument
2234 ci_populate_smc_mvdd_table(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_mvdd_table() argument
2257 ci_populate_smc_voltage_tables(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_voltage_tables() argument
2596 ci_populate_smc_link_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_link_level() argument
2618 ci_populate_smc_uvd_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_uvd_level() argument
2661 ci_populate_smc_vce_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_vce_level() argument
2694 ci_populate_smc_acp_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_acp_level() argument
2726 ci_populate_smc_samu_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_samu_level() argument
2959 ci_populate_smc_acpi_level(struct radeon_device *rdev, SMU7_Discrete_DpmTable *table) ci_populate_smc_acpi_level() argument
4303 ci_set_mc_special_registers(struct radeon_device *rdev, struct ci_mc_reg_table *table) ci_set_mc_special_registers() argument
4501 ci_register_patching_mc_seq(struct radeon_device *rdev, struct ci_mc_reg_table *table) ci_register_patching_mc_seq() argument
4953 ci_patch_clock_voltage_dependency_table_with_vddc_leakage(struct radeon_device *rdev, struct radeon_clock_voltage_dependency_table *table) ci_patch_clock_voltage_dependency_table_with_vddc_leakage() argument
4964 ci_patch_clock_voltage_dependency_table_with_vddci_leakage(struct radeon_device *rdev, struct radeon_clock_voltage_dependency_table *table) ci_patch_clock_voltage_dependency_table_with_vddci_leakage() argument
4975 ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage(struct radeon_device *rdev, struct radeon_vce_clock_voltage_dependency_table *table) ci_patch_vce_clock_voltage_dependency_table_with_vddc_leakage() argument
4986 ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage(struct radeon_device *rdev, struct radeon_uvd_clock_voltage_dependency_table *table) ci_patch_uvd_clock_voltage_dependency_table_with_vddc_leakage() argument
4997 ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage(struct radeon_device *rdev, struct radeon_phase_shedding_limits_table *table) ci_patch_vddc_phase_shed_limit_table_with_vddc_leakage() argument
5008 ci_patch_clock_voltage_limits_with_vddc_leakage(struct radeon_device *rdev, struct radeon_clock_and_voltage_limits *table) ci_patch_clock_voltage_limits_with_vddc_leakage() argument
5017 ci_patch_cac_leakage_table_with_vddc_leakage(struct radeon_device *rdev, struct radeon_cac_leakage_table *table) ci_patch_cac_leakage_table_with_vddc_leakage() argument
H A Dradeon_gart.c37 * perspective. A page table maps the pages in the aperture
41 * and AGP. AGP works similarly, but the GART table is configured
53 * Common GART table functions.
56 * radeon_gart_table_ram_alloc - allocate system ram for gart page table
60 * Allocate system memory for GART page table
62 * gart table to be in system memory.
87 * radeon_gart_table_ram_free - free system ram for gart page table
91 * Free system memory for GART page table
93 * gart table to be in system memory.
115 * radeon_gart_table_vram_alloc - allocate vram for gart page table
119 * Allocate video memory for GART page table
121 * gart table to be in video memory.
140 * radeon_gart_table_vram_pin - pin gart page table in vram
144 * Pin the GART page table in vram so it will not be moved
146 * gart table to be in video memory.
172 /* We might have dropped some GART table updates while it wasn't radeon_gart_table_vram_pin()
185 * radeon_gart_table_vram_unpin - unpin gart page table in vram
189 * Unpin the GART page table in vram (pcie r4xx, r5xx+).
190 * These asics require the gart table to be in video memory.
209 * radeon_gart_table_vram_free - free gart page table vram
213 * Free the video memory used for the GART page table
214 * (pcie r4xx, r5xx+). These asics require the gart table to
229 * radeon_gart_unbind - unbind pages from the gart page table
235 * Unbinds the requested pages from the gart page table and
270 * radeon_gart_bind - bind pages into the gart page table
279 * Binds the requested pages to the gart page table
341 /* Compute table size */ radeon_gart_init()
346 /* Allocate pages table */ radeon_gart_init()
H A Drv740_dpm.c116 DRM_DEBUG_KMS("Target MCLK greater than largest MCLK in DLL speed table\n"); rv740_get_dll_speed()
316 RV770_SMC_STATETABLE *table) rv740_populate_smc_acpi_state()
329 table->ACPIState = table->initialState; rv740_populate_smc_acpi_state()
331 table->ACPIState.flags &= ~PPSMC_SWSTATE_FLAG_DC; rv740_populate_smc_acpi_state()
335 &table->ACPIState.levels[0].vddc); rv740_populate_smc_acpi_state()
336 table->ACPIState.levels[0].gen2PCIE = rv740_populate_smc_acpi_state()
339 table->ACPIState.levels[0].gen2XSP = rv740_populate_smc_acpi_state()
343 &table->ACPIState.levels[0].vddc); rv740_populate_smc_acpi_state()
344 table->ACPIState.levels[0].gen2PCIE = 0; rv740_populate_smc_acpi_state()
374 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); rv740_populate_smc_acpi_state()
375 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); rv740_populate_smc_acpi_state()
376 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); rv740_populate_smc_acpi_state()
377 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); rv740_populate_smc_acpi_state()
378 table->ACPIState.levels[0].mclk.mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); rv740_populate_smc_acpi_state()
379 table->ACPIState.levels[0].mclk.mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); rv740_populate_smc_acpi_state()
381 table->ACPIState.levels[0].mclk.mclk770.mclk_value = 0; rv740_populate_smc_acpi_state()
383 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = cpu_to_be32(spll_func_cntl); rv740_populate_smc_acpi_state()
384 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = cpu_to_be32(spll_func_cntl_2); rv740_populate_smc_acpi_state()
385 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = cpu_to_be32(spll_func_cntl_3); rv740_populate_smc_acpi_state()
387 table->ACPIState.levels[0].sclk.sclk_value = 0; rv740_populate_smc_acpi_state()
389 table->ACPIState.levels[1] = table->ACPIState.levels[0]; rv740_populate_smc_acpi_state()
390 table->ACPIState.levels[2] = table->ACPIState.levels[0]; rv740_populate_smc_acpi_state()
392 rv770_populate_mvdd_value(rdev, 0, &table->ACPIState.levels[0].mvdd); rv740_populate_smc_acpi_state()
315 rv740_populate_smc_acpi_state(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) rv740_populate_smc_acpi_state() argument
H A Dcypress_dpm.c404 struct atom_voltage_table *table, cypress_populate_voltage_value()
409 for (i = 0; i < table->count; i++) { cypress_populate_voltage_value()
410 if (value <= table->entries[i].value) { cypress_populate_voltage_value()
412 voltage->value = cpu_to_be16(table->entries[i].value); cypress_populate_voltage_value()
417 if (i == table->count) cypress_populate_voltage_value()
1236 RV770_SMC_STATETABLE *table) cypress_populate_smc_initial_state()
1243 table->initialState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL = cypress_populate_smc_initial_state()
1245 table->initialState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL_2 = cypress_populate_smc_initial_state()
1247 table->initialState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL = cypress_populate_smc_initial_state()
1249 table->initialState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL_2 = cypress_populate_smc_initial_state()
1251 table->initialState.levels[0].mclk.mclk770.vMCLK_PWRMGT_CNTL = cypress_populate_smc_initial_state()
1253 table->initialState.levels[0].mclk.mclk770.vDLL_CNTL = cypress_populate_smc_initial_state()
1256 table->initialState.levels[0].mclk.mclk770.vMPLL_SS = cypress_populate_smc_initial_state()
1258 table->initialState.levels[0].mclk.mclk770.vMPLL_SS2 = cypress_populate_smc_initial_state()
1261 table->initialState.levels[0].mclk.mclk770.mclk_value = cypress_populate_smc_initial_state()
1264 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = cypress_populate_smc_initial_state()
1266 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = cypress_populate_smc_initial_state()
1268 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = cypress_populate_smc_initial_state()
1270 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM = cypress_populate_smc_initial_state()
1272 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM_2 = cypress_populate_smc_initial_state()
1275 table->initialState.levels[0].sclk.sclk_value = cypress_populate_smc_initial_state()
1278 table->initialState.levels[0].arbValue = MC_CG_ARB_FREQ_F0; cypress_populate_smc_initial_state()
1280 table->initialState.levels[0].ACIndex = 0; cypress_populate_smc_initial_state()
1285 &table->initialState.levels[0].vddc); cypress_populate_smc_initial_state()
1291 &table->initialState.levels[0].vddci); cypress_populate_smc_initial_state()
1294 &table->initialState.levels[0].mvdd); cypress_populate_smc_initial_state()
1297 table->initialState.levels[0].aT = cpu_to_be32(a_t); cypress_populate_smc_initial_state()
1299 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); cypress_populate_smc_initial_state()
1303 table->initialState.levels[0].gen2PCIE = 1; cypress_populate_smc_initial_state()
1305 table->initialState.levels[0].gen2PCIE = 0; cypress_populate_smc_initial_state()
1307 table->initialState.levels[0].gen2XSP = 1; cypress_populate_smc_initial_state()
1309 table->initialState.levels[0].gen2XSP = 0; cypress_populate_smc_initial_state()
1312 table->initialState.levels[0].strobeMode = cypress_populate_smc_initial_state()
1317 table->initialState.levels[0].mcFlags = SMC_MC_EDC_RD_FLAG | SMC_MC_EDC_WR_FLAG; cypress_populate_smc_initial_state()
1319 table->initialState.levels[0].mcFlags = 0; cypress_populate_smc_initial_state()
1322 table->initialState.levels[1] = table->initialState.levels[0]; cypress_populate_smc_initial_state()
1323 table->initialState.levels[2] = table->initialState.levels[0]; cypress_populate_smc_initial_state()
1325 table->initialState.flags |= PPSMC_SWSTATE_FLAG_DC; cypress_populate_smc_initial_state()
1331 RV770_SMC_STATETABLE *table) cypress_populate_smc_acpi_state()
1354 table->ACPIState = table->initialState; cypress_populate_smc_acpi_state()
1356 table->ACPIState.flags &= ~PPSMC_SWSTATE_FLAG_DC; cypress_populate_smc_acpi_state()
1362 &table->ACPIState.levels[0].vddc); cypress_populate_smc_acpi_state()
1365 table->ACPIState.levels[0].gen2PCIE = 1; cypress_populate_smc_acpi_state()
1367 table->ACPIState.levels[0].gen2PCIE = 0; cypress_populate_smc_acpi_state()
1369 table->ACPIState.levels[0].gen2PCIE = 0; cypress_populate_smc_acpi_state()
1371 table->ACPIState.levels[0].gen2XSP = 1; cypress_populate_smc_acpi_state()
1373 table->ACPIState.levels[0].gen2XSP = 0; cypress_populate_smc_acpi_state()
1378 &table->ACPIState.levels[0].vddc); cypress_populate_smc_acpi_state()
1379 table->ACPIState.levels[0].gen2PCIE = 0; cypress_populate_smc_acpi_state()
1387 &table->ACPIState.levels[0].vddci); cypress_populate_smc_acpi_state()
1433 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL = cypress_populate_smc_acpi_state()
1435 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL_2 = cypress_populate_smc_acpi_state()
1437 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL = cypress_populate_smc_acpi_state()
1439 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL_2 = cypress_populate_smc_acpi_state()
1441 table->ACPIState.levels[0].mclk.mclk770.vMCLK_PWRMGT_CNTL = cypress_populate_smc_acpi_state()
1443 table->ACPIState.levels[0].mclk.mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); cypress_populate_smc_acpi_state()
1445 table->ACPIState.levels[0].mclk.mclk770.mclk_value = 0; cypress_populate_smc_acpi_state()
1447 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = cypress_populate_smc_acpi_state()
1449 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = cypress_populate_smc_acpi_state()
1451 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = cypress_populate_smc_acpi_state()
1454 table->ACPIState.levels[0].sclk.sclk_value = 0; cypress_populate_smc_acpi_state()
1456 cypress_populate_mvdd_value(rdev, 0, &table->ACPIState.levels[0].mvdd); cypress_populate_smc_acpi_state()
1459 table->ACPIState.levels[0].ACIndex = 1; cypress_populate_smc_acpi_state()
1461 table->ACPIState.levels[1] = table->ACPIState.levels[0]; cypress_populate_smc_acpi_state()
1462 table->ACPIState.levels[2] = table->ACPIState.levels[0]; cypress_populate_smc_acpi_state()
1513 RV770_SMC_STATETABLE *table) cypress_populate_smc_voltage_table()
1518 table->highSMIO[i] = 0; cypress_populate_smc_voltage_table()
1519 table->lowSMIO[i] |= cpu_to_be32(voltage_table->entries[i].smio_low); cypress_populate_smc_voltage_table()
1524 RV770_SMC_STATETABLE *table) cypress_populate_smc_voltage_tables()
1533 table); cypress_populate_smc_voltage_tables()
1535 table->voltageMaskTable.highMask[RV770_SMC_VOLTAGEMASK_VDDC] = 0; cypress_populate_smc_voltage_tables()
1536 table->voltageMaskTable.lowMask[RV770_SMC_VOLTAGEMASK_VDDC] = cypress_populate_smc_voltage_tables()
1542 table->maxVDDCIndexInPPTable = i; cypress_populate_smc_voltage_tables()
1551 table); cypress_populate_smc_voltage_tables()
1553 table->voltageMaskTable.highMask[RV770_SMC_VOLTAGEMASK_VDDCI] = 0; cypress_populate_smc_voltage_tables()
1554 table->voltageMaskTable.lowMask[RV770_SMC_VOLTAGEMASK_VDDCI] = cypress_populate_smc_voltage_tables()
1615 RV770_SMC_STATETABLE *table = &pi->smc_statetable; cypress_init_smc_table() local
1618 memset(table, 0, sizeof(RV770_SMC_STATETABLE)); cypress_init_smc_table()
1620 cypress_populate_smc_voltage_tables(rdev, table); cypress_init_smc_table()
1625 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_INTERNAL; cypress_init_smc_table()
1628 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_NONE; cypress_init_smc_table()
1631 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_EXTERNAL; cypress_init_smc_table()
1636 table->systemFlags |= PPSMC_SYSTEMFLAG_GPIO_DC; cypress_init_smc_table()
1639 table->systemFlags |= PPSMC_SYSTEMFLAG_REGULATOR_HOT; cypress_init_smc_table()
1642 table->systemFlags |= PPSMC_SYSTEMFLAG_STEPVDDC; cypress_init_smc_table()
1645 table->systemFlags |= PPSMC_SYSTEMFLAG_GDDR5; cypress_init_smc_table()
1647 ret = cypress_populate_smc_initial_state(rdev, radeon_boot_state, table); cypress_init_smc_table()
1651 ret = cypress_populate_smc_acpi_state(rdev, table); cypress_init_smc_table()
1655 table->driverState = table->initialState; cypress_init_smc_table()
1659 (u8 *)table, sizeof(RV770_SMC_STATETABLE), cypress_init_smc_table()
403 cypress_populate_voltage_value(struct radeon_device *rdev, struct atom_voltage_table *table, u16 value, RV770_SMC_VOLTAGE_VALUE *voltage) cypress_populate_voltage_value() argument
1234 cypress_populate_smc_initial_state(struct radeon_device *rdev, struct radeon_ps *radeon_initial_state, RV770_SMC_STATETABLE *table) cypress_populate_smc_initial_state() argument
1330 cypress_populate_smc_acpi_state(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) cypress_populate_smc_acpi_state() argument
1511 cypress_populate_smc_voltage_table(struct radeon_device *rdev, struct atom_voltage_table *voltage_table, RV770_SMC_STATETABLE *table) cypress_populate_smc_voltage_table() argument
1523 cypress_populate_smc_voltage_tables(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) cypress_populate_smc_voltage_tables() argument
H A Dkv_dpm.c718 struct radeon_clock_voltage_dependency_table *table = kv_program_bootup_state() local
721 if (table && table->count) { kv_program_bootup_state()
723 if (table->entries[i].clk == pi->boot_pl.sclk) kv_program_bootup_state()
730 struct sumo_sclk_voltage_mapping_table *table = kv_program_bootup_state() local
733 if (table->num_max_dpm_entries == 0) kv_program_bootup_state()
737 if (table->entries[i].sclk_frequency == pi->boot_pl.sclk) kv_program_bootup_state()
820 struct radeon_uvd_clock_voltage_dependency_table *table = kv_populate_uvd_table() local
826 if (table == NULL || table->count == 0) kv_populate_uvd_table()
830 for (i = 0; i < table->count; i++) { kv_populate_uvd_table()
832 (pi->high_voltage_t < table->entries[i].v)) kv_populate_uvd_table()
835 pi->uvd_level[i].VclkFrequency = cpu_to_be32(table->entries[i].vclk); kv_populate_uvd_table()
836 pi->uvd_level[i].DclkFrequency = cpu_to_be32(table->entries[i].dclk); kv_populate_uvd_table()
837 pi->uvd_level[i].MinVddNb = cpu_to_be16(table->entries[i].v); kv_populate_uvd_table()
840 (u8)kv_get_clk_bypass(rdev, table->entries[i].vclk); kv_populate_uvd_table()
842 (u8)kv_get_clk_bypass(rdev, table->entries[i].dclk); kv_populate_uvd_table()
845 table->entries[i].vclk, false, &dividers); kv_populate_uvd_table()
851 table->entries[i].dclk, false, &dividers); kv_populate_uvd_table()
893 struct radeon_vce_clock_voltage_dependency_table *table = kv_populate_vce_table() local
897 if (table == NULL || table->count == 0) kv_populate_vce_table()
901 for (i = 0; i < table->count; i++) { kv_populate_vce_table()
903 pi->high_voltage_t < table->entries[i].v) kv_populate_vce_table()
906 pi->vce_level[i].Frequency = cpu_to_be32(table->entries[i].evclk); kv_populate_vce_table()
907 pi->vce_level[i].MinVoltage = cpu_to_be16(table->entries[i].v); kv_populate_vce_table()
910 (u8)kv_get_clk_bypass(rdev, table->entries[i].evclk); kv_populate_vce_table()
913 table->entries[i].evclk, false, &dividers); kv_populate_vce_table()
954 struct radeon_clock_voltage_dependency_table *table = kv_populate_samu_table() local
960 if (table == NULL || table->count == 0) kv_populate_samu_table()
964 for (i = 0; i < table->count; i++) { kv_populate_samu_table()
966 pi->high_voltage_t < table->entries[i].v) kv_populate_samu_table()
969 pi->samu_level[i].Frequency = cpu_to_be32(table->entries[i].clk); kv_populate_samu_table()
970 pi->samu_level[i].MinVoltage = cpu_to_be16(table->entries[i].v); kv_populate_samu_table()
973 (u8)kv_get_clk_bypass(rdev, table->entries[i].clk); kv_populate_samu_table()
976 table->entries[i].clk, false, &dividers); kv_populate_samu_table()
1020 struct radeon_clock_voltage_dependency_table *table = kv_populate_acp_table() local
1026 if (table == NULL || table->count == 0) kv_populate_acp_table()
1030 for (i = 0; i < table->count; i++) { kv_populate_acp_table()
1031 pi->acp_level[i].Frequency = cpu_to_be32(table->entries[i].clk); kv_populate_acp_table()
1032 pi->acp_level[i].MinVoltage = cpu_to_be16(table->entries[i].v); kv_populate_acp_table()
1035 table->entries[i].clk, false, &dividers); kv_populate_acp_table()
1079 struct radeon_clock_voltage_dependency_table *table = kv_calculate_dfs_bypass_settings() local
1082 if (table && table->count) { kv_calculate_dfs_bypass_settings()
1085 if (kv_get_clock_difference(table->entries[i].clk, 40000) < 200) kv_calculate_dfs_bypass_settings()
1087 else if (kv_get_clock_difference(table->entries[i].clk, 30000) < 200) kv_calculate_dfs_bypass_settings()
1089 else if (kv_get_clock_difference(table->entries[i].clk, 26600) < 200) kv_calculate_dfs_bypass_settings()
1091 else if (kv_get_clock_difference(table->entries[i].clk , 20000) < 200) kv_calculate_dfs_bypass_settings()
1093 else if (kv_get_clock_difference(table->entries[i].clk , 10000) < 200) kv_calculate_dfs_bypass_settings()
1102 struct sumo_sclk_voltage_mapping_table *table = kv_calculate_dfs_bypass_settings() local
1106 if (kv_get_clock_difference(table->entries[i].sclk_frequency, 40000) < 200) kv_calculate_dfs_bypass_settings()
1108 else if (kv_get_clock_difference(table->entries[i].sclk_frequency, 30000) < 200) kv_calculate_dfs_bypass_settings()
1110 else if (kv_get_clock_difference(table->entries[i].sclk_frequency, 26600) < 200) kv_calculate_dfs_bypass_settings()
1112 else if (kv_get_clock_difference(table->entries[i].sclk_frequency, 20000) < 200) kv_calculate_dfs_bypass_settings()
1114 else if (kv_get_clock_difference(table->entries[i].sclk_frequency, 10000) < 200) kv_calculate_dfs_bypass_settings()
1426 struct radeon_uvd_clock_voltage_dependency_table *table = kv_update_uvd_dpm() local
1432 if (table->count) kv_update_uvd_dpm()
1433 pi->uvd_boot_level = table->count - 1; kv_update_uvd_dpm()
1462 struct radeon_vce_clock_voltage_dependency_table *table = kv_get_vce_boot_level() local
1465 for (i = 0; i < table->count; i++) { kv_get_vce_boot_level()
1466 if (table->entries[i].evclk >= evclk) kv_get_vce_boot_level()
1478 struct radeon_vce_clock_voltage_dependency_table *table = kv_update_vce_dpm() local
1487 pi->vce_boot_level = table->count - 1; kv_update_vce_dpm()
1519 struct radeon_clock_voltage_dependency_table *table = kv_update_samu_dpm() local
1525 pi->samu_boot_level = table->count - 1; kv_update_samu_dpm()
1550 struct radeon_clock_voltage_dependency_table *table = kv_get_acp_boot_level() local
1553 for (i = 0; i < table->count; i++) { kv_get_acp_boot_level()
1554 if (table->entries[i].clk >= 0) /* XXX */ kv_get_acp_boot_level()
1558 if (i >= table->count) kv_get_acp_boot_level()
1559 i = table->count - 1; kv_get_acp_boot_level()
1583 struct radeon_clock_voltage_dependency_table *table = kv_update_acp_dpm() local
1589 pi->acp_boot_level = table->count - 1; kv_update_acp_dpm()
1711 struct radeon_clock_voltage_dependency_table *table = kv_set_valid_clock_range() local
1714 if (table && table->count) { kv_set_valid_clock_range()
1716 if ((table->entries[i].clk >= new_ps->levels[0].sclk) || kv_set_valid_clock_range()
1724 if (table->entries[i].clk <= new_ps->levels[new_ps->num_levels - 1].sclk) kv_set_valid_clock_range()
1730 if ((new_ps->levels[0].sclk - table->entries[pi->highest_valid].clk) > kv_set_valid_clock_range()
1731 (table->entries[pi->lowest_valid].clk - new_ps->levels[new_ps->num_levels - 1].sclk)) kv_set_valid_clock_range()
1737 struct sumo_sclk_voltage_mapping_table *table = kv_set_valid_clock_range() local
1741 if (table->entries[i].sclk_frequency >= new_ps->levels[0].sclk || kv_set_valid_clock_range()
1749 if (table->entries[i].sclk_frequency <= kv_set_valid_clock_range()
1757 table->entries[pi->highest_valid].sclk_frequency) > kv_set_valid_clock_range()
1758 (table->entries[pi->lowest_valid].sclk_frequency - kv_set_valid_clock_range()
1967 struct radeon_clock_and_voltage_limits *table) kv_construct_max_power_limits_table()
1973 table->sclk = kv_construct_max_power_limits_table()
1975 table->vddc = kv_construct_max_power_limits_table()
1980 table->mclk = pi->sys_info.nbp_memory_clock[0]; kv_construct_max_power_limits_table()
2106 struct radeon_clock_voltage_dependency_table *table = kv_get_high_voltage_limit() local
2110 if (table && table->count) { kv_get_high_voltage_limit()
2111 for (i = table->count - 1; i >= 0; i--) { kv_get_high_voltage_limit()
2113 (kv_convert_8bit_index_to_voltage(rdev, table->entries[i].v) <= kv_get_high_voltage_limit()
2120 struct sumo_sclk_voltage_mapping_table *table = kv_get_high_voltage_limit() local
2123 for (i = table->num_max_dpm_entries - 1; i >= 0; i--) { kv_get_high_voltage_limit()
2125 (kv_convert_2bit_index_to_voltage(rdev, table->entries[i].vid_2bit) <= kv_get_high_voltage_limit()
2147 struct radeon_clock_voltage_dependency_table *table = kv_apply_state_adjust_rules() local
2167 for (i = table->count - 1; i >= 0; i++) { kv_apply_state_adjust_rules()
2168 if (stable_p_state_sclk >= table->entries[i].clk) { kv_apply_state_adjust_rules()
2169 stable_p_state_sclk = table->entries[i].clk; kv_apply_state_adjust_rules()
2175 stable_p_state_sclk = table->entries[0].clk; kv_apply_state_adjust_rules()
2192 if (table && table->count) { kv_apply_state_adjust_rules()
2198 ps->levels[i].sclk = table->entries[limit].clk; kv_apply_state_adjust_rules()
2202 struct sumo_sclk_voltage_mapping_table *table = kv_apply_state_adjust_rules() local
2210 ps->levels[i].sclk = table->entries[limit].sclk_frequency; kv_apply_state_adjust_rules()
2351 struct radeon_clock_voltage_dependency_table *table = kv_init_graphics_levels() local
2354 if (table && table->count) { kv_init_graphics_levels()
2358 for (i = 0; i < table->count; i++) { kv_init_graphics_levels()
2361 kv_convert_8bit_index_to_voltage(rdev, table->entries[i].v))) kv_init_graphics_levels()
2364 kv_set_divider_value(rdev, i, table->entries[i].clk); kv_init_graphics_levels()
2367 table->entries[i].v); kv_init_graphics_levels()
2374 struct sumo_sclk_voltage_mapping_table *table = kv_init_graphics_levels() local
2378 for (i = 0; i < table->num_max_dpm_entries; i++) { kv_init_graphics_levels()
2381 kv_convert_2bit_index_to_voltage(rdev, table->entries[i].vid_2bit)) kv_init_graphics_levels()
2384 kv_set_divider_value(rdev, i, table->entries[i].sclk_frequency); kv_init_graphics_levels()
2385 kv_set_vid(rdev, i, table->entries[i].vid_2bit); kv_init_graphics_levels()
2504 DRM_ERROR("Unsupported IGP table: %d %d\n", frev, crev); kv_parse_sys_info_table()
1966 kv_construct_max_power_limits_table(struct radeon_device *rdev, struct radeon_clock_and_voltage_limits *table) kv_construct_max_power_limits_table() argument
H A Drv770_dpm.c916 RV770_SMC_STATETABLE *table) rv770_populate_smc_acpi_state()
937 table->ACPIState = table->initialState; rv770_populate_smc_acpi_state()
939 table->ACPIState.flags &= ~PPSMC_SWSTATE_FLAG_DC; rv770_populate_smc_acpi_state()
943 &table->ACPIState.levels[0].vddc); rv770_populate_smc_acpi_state()
946 table->ACPIState.levels[0].gen2PCIE = 1; rv770_populate_smc_acpi_state()
948 table->ACPIState.levels[0].gen2PCIE = 0; rv770_populate_smc_acpi_state()
950 table->ACPIState.levels[0].gen2PCIE = 0; rv770_populate_smc_acpi_state()
952 table->ACPIState.levels[0].gen2XSP = 1; rv770_populate_smc_acpi_state()
954 table->ACPIState.levels[0].gen2XSP = 0; rv770_populate_smc_acpi_state()
957 &table->ACPIState.levels[0].vddc); rv770_populate_smc_acpi_state()
958 table->ACPIState.levels[0].gen2PCIE = 0; rv770_populate_smc_acpi_state()
982 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); rv770_populate_smc_acpi_state()
983 table->ACPIState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); rv770_populate_smc_acpi_state()
984 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); rv770_populate_smc_acpi_state()
985 table->ACPIState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); rv770_populate_smc_acpi_state()
987 table->ACPIState.levels[0].mclk.mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); rv770_populate_smc_acpi_state()
988 table->ACPIState.levels[0].mclk.mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); rv770_populate_smc_acpi_state()
990 table->ACPIState.levels[0].mclk.mclk770.mclk_value = 0; rv770_populate_smc_acpi_state()
992 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = cpu_to_be32(spll_func_cntl); rv770_populate_smc_acpi_state()
993 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = cpu_to_be32(spll_func_cntl_2); rv770_populate_smc_acpi_state()
994 table->ACPIState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = cpu_to_be32(spll_func_cntl_3); rv770_populate_smc_acpi_state()
996 table->ACPIState.levels[0].sclk.sclk_value = 0; rv770_populate_smc_acpi_state()
998 rv770_populate_mvdd_value(rdev, 0, &table->ACPIState.levels[0].mvdd); rv770_populate_smc_acpi_state()
1000 table->ACPIState.levels[1] = table->ACPIState.levels[0]; rv770_populate_smc_acpi_state()
1001 table->ACPIState.levels[2] = table->ACPIState.levels[0]; rv770_populate_smc_acpi_state()
1025 RV770_SMC_STATETABLE *table) rv770_populate_smc_initial_state()
1031 table->initialState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL = rv770_populate_smc_initial_state()
1033 table->initialState.levels[0].mclk.mclk770.vMPLL_AD_FUNC_CNTL_2 = rv770_populate_smc_initial_state()
1035 table->initialState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL = rv770_populate_smc_initial_state()
1037 table->initialState.levels[0].mclk.mclk770.vMPLL_DQ_FUNC_CNTL_2 = rv770_populate_smc_initial_state()
1039 table->initialState.levels[0].mclk.mclk770.vMCLK_PWRMGT_CNTL = rv770_populate_smc_initial_state()
1041 table->initialState.levels[0].mclk.mclk770.vDLL_CNTL = rv770_populate_smc_initial_state()
1044 table->initialState.levels[0].mclk.mclk770.vMPLL_SS = rv770_populate_smc_initial_state()
1046 table->initialState.levels[0].mclk.mclk770.vMPLL_SS2 = rv770_populate_smc_initial_state()
1049 table->initialState.levels[0].mclk.mclk770.mclk_value = rv770_populate_smc_initial_state()
1052 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL = rv770_populate_smc_initial_state()
1054 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_2 = rv770_populate_smc_initial_state()
1056 table->initialState.levels[0].sclk.vCG_SPLL_FUNC_CNTL_3 = rv770_populate_smc_initial_state()
1058 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM = rv770_populate_smc_initial_state()
1060 table->initialState.levels[0].sclk.vCG_SPLL_SPREAD_SPECTRUM_2 = rv770_populate_smc_initial_state()
1063 table->initialState.levels[0].sclk.sclk_value = rv770_populate_smc_initial_state()
1066 table->initialState.levels[0].arbValue = MC_CG_ARB_FREQ_F0; rv770_populate_smc_initial_state()
1068 table->initialState.levels[0].seqValue = rv770_populate_smc_initial_state()
1073 &table->initialState.levels[0].vddc); rv770_populate_smc_initial_state()
1075 &table->initialState.levels[0].mvdd); rv770_populate_smc_initial_state()
1078 table->initialState.levels[0].aT = cpu_to_be32(a_t); rv770_populate_smc_initial_state()
1080 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); rv770_populate_smc_initial_state()
1083 table->initialState.levels[0].gen2PCIE = 1; rv770_populate_smc_initial_state()
1085 table->initialState.levels[0].gen2PCIE = 0; rv770_populate_smc_initial_state()
1087 table->initialState.levels[0].gen2XSP = 1; rv770_populate_smc_initial_state()
1089 table->initialState.levels[0].gen2XSP = 0; rv770_populate_smc_initial_state()
1094 table->initialState.levels[0].strobeMode = rv770_populate_smc_initial_state()
1097 table->initialState.levels[0].strobeMode = 0; rv770_populate_smc_initial_state()
1100 table->initialState.levels[0].mcFlags = SMC_MC_EDC_RD_FLAG | SMC_MC_EDC_WR_FLAG; rv770_populate_smc_initial_state()
1102 table->initialState.levels[0].mcFlags = 0; rv770_populate_smc_initial_state()
1106 table->initialState.levels[1] = table->initialState.levels[0]; rv770_populate_smc_initial_state()
1107 table->initialState.levels[2] = table->initialState.levels[0]; rv770_populate_smc_initial_state()
1109 table->initialState.flags |= PPSMC_SWSTATE_FLAG_DC; rv770_populate_smc_initial_state()
1115 RV770_SMC_STATETABLE *table) rv770_populate_smc_vddc_table()
1121 table->highSMIO[pi->vddc_table[i].vddc_index] = rv770_populate_smc_vddc_table()
1123 table->lowSMIO[pi->vddc_table[i].vddc_index] = rv770_populate_smc_vddc_table()
1127 table->voltageMaskTable.highMask[RV770_SMC_VOLTAGEMASK_VDDC] = 0; rv770_populate_smc_vddc_table()
1128 table->voltageMaskTable.lowMask[RV770_SMC_VOLTAGEMASK_VDDC] = rv770_populate_smc_vddc_table()
1137 table->maxVDDCIndexInPPTable = rv770_populate_smc_vddc_table()
1144 RV770_SMC_STATETABLE *table) rv770_populate_smc_mvdd_table()
1149 table->lowSMIO[MVDD_HIGH_INDEX] |= rv770_populate_smc_mvdd_table()
1151 table->lowSMIO[MVDD_LOW_INDEX] |= rv770_populate_smc_mvdd_table()
1154 table->voltageMaskTable.highMask[RV770_SMC_VOLTAGEMASK_MVDD] = 0; rv770_populate_smc_mvdd_table()
1155 table->voltageMaskTable.lowMask[RV770_SMC_VOLTAGEMASK_MVDD] = rv770_populate_smc_mvdd_table()
1167 RV770_SMC_STATETABLE *table = &pi->smc_statetable; rv770_init_smc_table() local
1170 memset(table, 0, sizeof(RV770_SMC_STATETABLE)); rv770_init_smc_table()
1174 rv770_populate_smc_vddc_table(rdev, table); rv770_init_smc_table()
1175 rv770_populate_smc_mvdd_table(rdev, table); rv770_init_smc_table()
1180 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_INTERNAL; rv770_init_smc_table()
1183 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_NONE; rv770_init_smc_table()
1187 table->thermalProtectType = PPSMC_THERMAL_PROTECT_TYPE_EXTERNAL; rv770_init_smc_table()
1192 table->systemFlags |= PPSMC_SYSTEMFLAG_GPIO_DC; rv770_init_smc_table()
1195 table->extraFlags |= PPSMC_EXTRAFLAGS_AC2DC_DONT_WAIT_FOR_VBLANK; rv770_init_smc_table()
1198 table->extraFlags |= PPSMC_EXTRAFLAGS_AC2DC_ACTION_GOTOINITIALSTATE; rv770_init_smc_table()
1202 table->systemFlags |= PPSMC_SYSTEMFLAG_STEPVDDC; rv770_init_smc_table()
1205 table->systemFlags |= PPSMC_SYSTEMFLAG_GDDR5; rv770_init_smc_table()
1208 ret = rv730_populate_smc_initial_state(rdev, radeon_boot_state, table); rv770_init_smc_table()
1210 ret = rv770_populate_smc_initial_state(rdev, radeon_boot_state, table); rv770_init_smc_table()
1215 ret = rv740_populate_smc_acpi_state(rdev, table); rv770_init_smc_table()
1217 ret = rv730_populate_smc_acpi_state(rdev, table); rv770_init_smc_table()
1219 ret = rv770_populate_smc_acpi_state(rdev, table); rv770_init_smc_table()
1223 table->driverState = table->initialState; rv770_init_smc_table()
1227 (const u8 *)table, rv770_init_smc_table()
915 rv770_populate_smc_acpi_state(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) rv770_populate_smc_acpi_state() argument
1023 rv770_populate_smc_initial_state(struct radeon_device *rdev, struct radeon_ps *radeon_state, RV770_SMC_STATETABLE *table) rv770_populate_smc_initial_state() argument
1114 rv770_populate_smc_vddc_table(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) rv770_populate_smc_vddc_table() argument
1143 rv770_populate_smc_mvdd_table(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) rv770_populate_smc_mvdd_table() argument
/linux-4.1.27/fs/proc/
H A Dproc_sysctl.c181 struct ctl_node *node, struct ctl_table *table) init_header()
183 head->ctl_table = table; init_header()
184 head->ctl_table_arg = table; init_header()
195 for (entry = table; entry->procname; entry++, node++) init_header()
417 static int sysctl_perm(struct ctl_table_header *head, struct ctl_table *table, int op) sysctl_perm() argument
423 mode = root->permissions(head, table); sysctl_perm()
425 mode = table->mode; sysctl_perm()
431 struct ctl_table_header *head, struct ctl_table *table) proc_sys_make_inode()
445 ei->sysctl_entry = table; proc_sys_make_inode()
448 inode->i_mode = table->mode; proc_sys_make_inode()
449 if (!S_ISDIR(table->mode)) { proc_sys_make_inode()
521 struct ctl_table *table = PROC_I(inode)->sysctl_entry; proc_sys_call_handler() local
533 if (sysctl_perm(head, table, write ? MAY_WRITE : MAY_READ)) proc_sys_call_handler()
538 if (!table->proc_handler) proc_sys_call_handler()
543 error = table->proc_handler(table, write, buf, &res, ppos); proc_sys_call_handler()
567 struct ctl_table *table = PROC_I(inode)->sysctl_entry; proc_sys_open() local
573 if (table->poll) proc_sys_open()
574 filp->private_data = proc_sys_poll_event(table->poll); proc_sys_open()
585 struct ctl_table *table = PROC_I(inode)->sysctl_entry; proc_sys_poll() local
593 if (!table->proc_handler) proc_sys_poll()
596 if (!table->poll) proc_sys_poll()
600 poll_wait(filp, &table->poll->wait, wait); proc_sys_poll()
602 if (event != atomic_read(&table->poll->event)) { proc_sys_poll()
603 filp->private_data = proc_sys_poll_event(table->poll); proc_sys_poll()
616 struct ctl_table *table) proc_sys_fill_cache()
624 qname.name = table->procname; proc_sys_fill_cache()
625 qname.len = strlen(table->procname); proc_sys_fill_cache()
632 inode = proc_sys_make_inode(dir->d_sb, head, table); proc_sys_fill_cache()
654 struct ctl_table *table) proc_sys_link_fill_cache()
659 if (S_ISLNK(table->mode)) { proc_sys_link_fill_cache()
661 int err = sysctl_follow_link(&head, &table, current->nsproxy); proc_sys_link_fill_cache()
666 ret = proc_sys_fill_cache(file, ctx, head, table); proc_sys_link_fill_cache()
672 static int scan(struct ctl_table_header *head, struct ctl_table *table, scan() argument
681 if (unlikely(S_ISLNK(table->mode))) scan()
682 res = proc_sys_link_fill_cache(file, ctx, head, table); scan()
684 res = proc_sys_fill_cache(file, ctx, head, table); scan()
727 struct ctl_table *table; proc_sys_permission() local
738 table = PROC_I(inode)->sysctl_entry; proc_sys_permission()
739 if (!table) /* global root - r-xr-xr-x */ proc_sys_permission()
741 else /* Use the permissions on the sysctl table entry */ proc_sys_permission()
742 error = sysctl_perm(head, table, mask & ~MAY_NOT_BLOCK); proc_sys_permission()
769 struct ctl_table *table = PROC_I(inode)->sysctl_entry; proc_sys_getattr() local
775 if (table) proc_sys_getattr()
776 stat->mode = (stat->mode & S_IFMT) | table->mode; proc_sys_getattr()
879 struct ctl_table *table; new_dir() local
891 table = (struct ctl_table *)(node + 1); new_dir()
892 new_name = (char *)(table + 2); new_dir()
895 table[0].procname = new_name; new_dir()
896 table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO; new_dir()
897 init_header(&new->header, set->dir.header.root, set, node, table); new_dir()
1011 static int sysctl_err(const char *path, struct ctl_table *table, char *fmt, ...) sysctl_err() argument
1020 pr_err("sysctl table check failed: %s/%s %pV\n", sysctl_err()
1021 path, table->procname, &vaf); sysctl_err()
1027 static int sysctl_check_table(const char *path, struct ctl_table *table) sysctl_check_table() argument
1030 for (; table->procname; table++) { sysctl_check_table()
1031 if (table->child) sysctl_check_table()
1032 err = sysctl_err(path, table, "Not a file"); sysctl_check_table()
1034 if ((table->proc_handler == proc_dostring) || sysctl_check_table()
1035 (table->proc_handler == proc_dointvec) || sysctl_check_table()
1036 (table->proc_handler == proc_dointvec_minmax) || sysctl_check_table()
1037 (table->proc_handler == proc_dointvec_jiffies) || sysctl_check_table()
1038 (table->proc_handler == proc_dointvec_userhz_jiffies) || sysctl_check_table()
1039 (table->proc_handler == proc_dointvec_ms_jiffies) || sysctl_check_table()
1040 (table->proc_handler == proc_doulongvec_minmax) || sysctl_check_table()
1041 (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) { sysctl_check_table()
1042 if (!table->data) sysctl_check_table()
1043 err = sysctl_err(path, table, "No data"); sysctl_check_table()
1044 if (!table->maxlen) sysctl_check_table()
1045 err = sysctl_err(path, table, "No maxlen"); sysctl_check_table()
1047 if (!table->proc_handler) sysctl_check_table()
1048 err = sysctl_err(path, table, "No proc_handler"); sysctl_check_table()
1050 if ((table->mode & (S_IRUGO|S_IWUGO)) != table->mode) sysctl_check_table()
1051 err = sysctl_err(path, table, "bogus .mode 0%o", sysctl_check_table()
1052 table->mode); sysctl_check_table()
1057 static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table *table, new_links() argument
1068 for (entry = table; entry->procname; entry++) { new_links()
1086 for (link = link_table, entry = table; entry->procname; link++, entry++) { new_links()
1101 struct ctl_table *table, struct ctl_table_root *link_root) get_links()
1106 /* Are there links available for every entry in table? */ get_links()
1107 for (entry = table; entry->procname; entry++) { get_links()
1120 for (entry = table; entry->procname; entry++) { get_links()
1170 * __register_sysctl_table - register a leaf sysctl table
1172 * @path: The path to the directory the sysctl table is in.
1173 * @table: the top-level table structure
1175 * Register a sysctl table hierarchy. @table should be a filled in ctl_table
1176 * array. A completely 0 filled entry terminates the table.
1209 * to the table header on success.
1213 const char *path, struct ctl_table *table) __register_sysctl_table()
1223 for (entry = table; entry->procname; entry++) __register_sysctl_table()
1232 init_header(header, root, set, node, table); __register_sysctl_table()
1233 if (sysctl_check_table(path, table)) __register_sysctl_table()
1279 * register_sysctl - register a sysctl table
1280 * @path: The path to the directory the sysctl table is in.
1281 * @table: the table structure
1283 * Register a sysctl table. @table should be a filled in ctl_table
1284 * array. A completely 0 filled entry terminates the table.
1288 struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table) register_sysctl() argument
1291 path, table); register_sysctl()
1308 static int count_subheaders(struct ctl_table *table) count_subheaders() argument
1315 if (!table || !table->procname) count_subheaders()
1318 for (entry = table; entry->procname; entry++) { count_subheaders()
1329 struct ctl_table *table) register_leaf_sysctl_tables()
1337 for (entry = table; entry->procname; entry++) { register_leaf_sysctl_tables()
1344 files = table; register_leaf_sysctl_tables()
1345 /* If there are mixed files and directories we need a new table */ register_leaf_sysctl_tables()
1354 for (new = files, entry = table; entry->procname; entry++) { register_leaf_sysctl_tables()
1371 /* Remember if we need to free the file table */ register_leaf_sysctl_tables()
1378 for (entry = table; entry->procname; entry++) { register_leaf_sysctl_tables()
1402 * __register_sysctl_paths - register a sysctl table hierarchy
1404 * @path: The path to the directory the sysctl table is in.
1405 * @table: the top-level table structure
1407 * Register a sysctl table hierarchy. @table should be a filled in ctl_table
1408 * array. A completely 0 filled entry terminates the table.
1414 const struct ctl_path *path, struct ctl_table *table) __register_sysctl_paths()
1416 struct ctl_table *ctl_table_arg = table; __register_sysctl_paths()
1417 int nr_subheaders = count_subheaders(table); __register_sysctl_paths()
1432 while (table->procname && table->child && !table[1].procname) { __register_sysctl_paths()
1433 pos = append_path(new_path, pos, table->procname); __register_sysctl_paths()
1436 table = table->child; __register_sysctl_paths()
1439 header = __register_sysctl_table(set, new_path, table); __register_sysctl_paths()
1453 set, table)) __register_sysctl_paths()
1464 struct ctl_table *table = subh->ctl_table_arg; __register_sysctl_paths() local
1466 kfree(table); __register_sysctl_paths()
1474 * register_sysctl_table_path - register a sysctl table hierarchy
1475 * @path: The path to the directory the sysctl table is in.
1476 * @table: the top-level table structure
1478 * Register a sysctl table hierarchy. @table should be a filled in ctl_table
1479 * array. A completely 0 filled entry terminates the table.
1484 struct ctl_table *table) register_sysctl_paths()
1487 path, table); register_sysctl_paths()
1492 * register_sysctl_table - register a sysctl table hierarchy
1493 * @table: the top-level table structure
1495 * Register a sysctl table hierarchy. @table should be a filled in ctl_table
1496 * array. A completely 0 filled entry terminates the table.
1500 struct ctl_table_header *register_sysctl_table(struct ctl_table *table) register_sysctl_table() argument
1504 return register_sysctl_paths(null_path, table); register_sysctl_table()
1559 * unregister_sysctl_table - unregister a sysctl table hierarchy
1562 * Unregisters the sysctl table and all children. proc entries may not
1581 struct ctl_table *table = subh->ctl_table_arg; unregister_sysctl_table() local
1583 kfree(table); unregister_sysctl_table()
179 init_header(struct ctl_table_header *head, struct ctl_table_root *root, struct ctl_table_set *set, struct ctl_node *node, struct ctl_table *table) init_header() argument
430 proc_sys_make_inode(struct super_block *sb, struct ctl_table_header *head, struct ctl_table *table) proc_sys_make_inode() argument
613 proc_sys_fill_cache(struct file *file, struct dir_context *ctx, struct ctl_table_header *head, struct ctl_table *table) proc_sys_fill_cache() argument
651 proc_sys_link_fill_cache(struct file *file, struct dir_context *ctx, struct ctl_table_header *head, struct ctl_table *table) proc_sys_link_fill_cache() argument
1100 get_links(struct ctl_dir *dir, struct ctl_table *table, struct ctl_table_root *link_root) get_links() argument
1211 __register_sysctl_table( struct ctl_table_set *set, const char *path, struct ctl_table *table) __register_sysctl_table() argument
1327 register_leaf_sysctl_tables(const char *path, char *pos, struct ctl_table_header ***subheader, struct ctl_table_set *set, struct ctl_table *table) register_leaf_sysctl_tables() argument
1412 __register_sysctl_paths( struct ctl_table_set *set, const struct ctl_path *path, struct ctl_table *table) __register_sysctl_paths() argument
1483 register_sysctl_paths(const struct ctl_path *path, struct ctl_table *table) register_sysctl_paths() argument
/linux-4.1.27/tools/power/acpi/os_specific/service_layers/
H A Doslinuxtbl.c72 char *signature, struct acpi_table_header **table);
76 char *signature, struct acpi_table_header **table);
78 static void osl_unmap_table(struct acpi_table_header *table);
93 struct acpi_table_header **table,
101 struct acpi_table_header **table,
178 * PARAMETERS: address - Physical address of the ACPI table
179 * table - Where a pointer to the table is returned
182 * AE_NOT_FOUND: A valid table was not found at the address
184 * DESCRIPTION: Get an ACPI table via a physical memory address.
190 struct acpi_table_header ** table) acpi_os_get_table_by_address()
204 /* Map the table and validate it */ acpi_os_get_table_by_address()
211 /* Copy table to local buffer and return it */ acpi_os_get_table_by_address()
229 *table = local_table; acpi_os_get_table_by_address()
237 * PARAMETERS: signature - ACPI Signature for desired table. Must be
239 * instance - Multiple table support for SSDT/UEFI (0...n)
241 * table - Where a pointer to the table is returned
242 * address - Where the table physical address is returned
246 * AE_NOT_FOUND: A table with the signature was not found
255 struct acpi_table_header ** table, acpi_os_get_table_by_name()
267 /* Not a main ACPI table, attempt to extract it from the RSDT/XSDT */ acpi_os_get_table_by_name()
271 /* Attempt to get the table from the memory */ acpi_os_get_table_by_name()
274 osl_get_bios_table(signature, instance, table, address); acpi_os_get_table_by_name()
276 /* Attempt to get the table from the static directory */ acpi_os_get_table_by_name()
279 instance, table, address); acpi_os_get_table_by_name()
285 /* Attempt to get a dynamic table */ acpi_os_get_table_by_name()
289 signature, instance, table, acpi_os_get_table_by_name()
307 * DESCRIPTION: Insert a table structure into OSL table list.
350 "%4.4s: Warning unmatched table instance %d, expected %d\n", osl_add_table_to_list()
366 * PARAMETERS: index - Which table to get
367 * table - Where a pointer to the table is returned
368 * instance - Where a pointer to the table instance no. is
370 * address - Where the table physical address is returned
375 * DESCRIPTION: Get an ACPI table via an index value (0 through n). Returns
383 struct acpi_table_header ** table, acpi_os_get_table_by_index()
403 /* Point to the table list entry specified by the Index argument */ acpi_os_get_table_by_index()
410 /* Now we can just get the table via the signature */ acpi_os_get_table_by_index()
413 table, address); acpi_os_get_table_by_index()
426 * in the EFI table
570 * DESCRIPTION: Initialize ACPI table data. Get and store main ACPI tables to
644 /* Add mandatory tables to global table list first */ osl_table_initialize()
710 * DESCRIPTION: Add ACPI tables to the table list from memory.
712 * NOTE: This works on Linux as table customization does not modify the
746 /* Search RSDT/XSDT for the requested table */ osl_list_bios_tables()
779 * PARAMETERS: signature - ACPI Signature for common table. Must be
781 * instance - Multiple table support for SSDT/UEFI (0...n)
783 * table - Where a pointer to the table is returned
784 * address - Where the table physical address is returned
788 * AE_NOT_FOUND: A table with the signature was not found
790 * DESCRIPTION: Get a BIOS provided ACPI table
799 struct acpi_table_header **table, osl_get_bios_table()
826 * careful about the FADT length and validate table addresses. osl_get_bios_table()
868 /* Now we can get the requested special table */ osl_get_bios_table()
876 } else { /* Case for a normal ACPI table */ osl_get_bios_table()
899 /* Search RSDT/XSDT for the requested table */ osl_get_bios_table()
925 /* Does this table match the requested signature? */ osl_get_bios_table()
934 /* Match table instance (for SSDT/UEFI tables) */ osl_get_bios_table()
956 /* Copy table to local buffer and return it */ osl_get_bios_table()
966 *table = local_table; osl_get_bios_table()
981 * DESCRIPTION: Add ACPI tables to the table list from a directory.
1004 /* Extract table name and instance number */ osl_list_customized_tables()
1015 /* Add new info node to global table list */ osl_list_customized_tables()
1031 * PARAMETERS: address - Address of the table in memory
1032 * signature - Optional ACPI Signature for desired table.
1034 * table - Where a pointer to the mapped table is
1037 * RETURN: Status; Mapped table is returned if AE_OK.
1038 * AE_NOT_FOUND: A valid table was not found at the address
1040 * DESCRIPTION: Map entire ACPI table into caller's address space.
1046 char *signature, struct acpi_table_header **table) osl_map_table()
1056 * Map the header so we can get the table length. osl_map_table()
1064 fprintf(stderr, "Could not map table header at 0x%8.8X%8.8X\n", osl_map_table()
1088 /* Map the entire table */ osl_map_table()
1099 "Could not map table at 0x%8.8X%8.8X length %8.8X\n", osl_map_table()
1106 *table = mapped_table; osl_map_table()
1114 * PARAMETERS: table - A pointer to the mapped table
1118 * DESCRIPTION: Unmap entire ACPI table.
1122 static void osl_unmap_table(struct acpi_table_header *table) osl_unmap_table() argument
1124 if (table) { osl_unmap_table()
1125 acpi_os_unmap_memory(table, ap_get_table_length(table)); osl_unmap_table()
1133 * PARAMETERS: filename - File that contains the desired table
1135 * extracted table signature.
1137 * table instance number.
1141 * DESCRIPTION: Extract table signature and instance number from a table file
1176 * PARAMETERS: filename - File that contains the desired table
1177 * file_offset - Offset of the table in file
1178 * signature - Optional ACPI Signature for desired table.
1180 * table - Where a pointer to the table is returned
1184 * DESCRIPTION: Read a ACPI table from a file.
1191 char *signature, struct acpi_table_header **table) osl_read_table_from_file()
1204 fprintf(stderr, "Could not open table file: %s\n", filename); osl_read_table_from_file()
1210 /* Read the Table header to get the table length */ osl_read_table_from_file()
1214 fprintf(stderr, "Could not read table header: %s\n", filename); osl_read_table_from_file()
1219 /* If signature is specified, it must match the table */ osl_read_table_from_file()
1245 /* Read the entire table into a local buffer */ osl_read_table_from_file()
1250 "%4.4s: Could not allocate buffer for table of length %X\n", osl_read_table_from_file()
1260 fprintf(stderr, "%4.4s: Could not read table content\n", osl_read_table_from_file()
1272 *table = local_table; osl_read_table_from_file()
1280 * PARAMETERS: pathname - Directory to find Linux customized table
1281 * signature - ACPI Signature for desired table. Must be
1283 * instance - Multiple table support for SSDT/UEFI (0...n)
1285 * table - Where a pointer to the table is returned
1286 * address - Where the table physical address is returned
1290 * AE_NOT_FOUND: A table with the signature was not found
1292 * DESCRIPTION: Get an OS customized table.
1300 struct acpi_table_header **table, osl_get_customized_table()
1317 /* Attempt to find the table in the directory */ osl_get_customized_table()
1327 /* Extract table name and instance number */ osl_get_customized_table()
1339 /* Create the table pathname */ osl_get_customized_table()
1360 status = osl_read_table_from_file(table_filename, 0, NULL, table); osl_get_customized_table()
189 acpi_os_get_table_by_address(acpi_physical_address address, struct acpi_table_header ** table) acpi_os_get_table_by_address() argument
253 acpi_os_get_table_by_name(char *signature, u32 instance, struct acpi_table_header ** table, acpi_physical_address * address) acpi_os_get_table_by_name() argument
382 acpi_os_get_table_by_index(u32 index, struct acpi_table_header ** table, u32 *instance, acpi_physical_address * address) acpi_os_get_table_by_index() argument
797 osl_get_bios_table(char *signature, u32 instance, struct acpi_table_header **table, acpi_physical_address * address) osl_get_bios_table() argument
1045 osl_map_table(acpi_size address, char *signature, struct acpi_table_header **table) osl_map_table() argument
1189 osl_read_table_from_file(char *filename, acpi_size file_offset, char *signature, struct acpi_table_header **table) osl_read_table_from_file() argument
1297 osl_get_customized_table(char *pathname, char *signature, u32 instance, struct acpi_table_header **table, acpi_physical_address * address) osl_get_customized_table() argument
/linux-4.1.27/sound/core/
H A Dsgbuf.c29 /* table entries are align to 32 */
48 if (!(sgbuf->table[i].addr & ~PAGE_MASK)) snd_free_sgbuf_pages()
50 tmpb.area = sgbuf->table[i].buf; snd_free_sgbuf_pages()
51 tmpb.addr = sgbuf->table[i].addr & PAGE_MASK; snd_free_sgbuf_pages()
52 tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; snd_free_sgbuf_pages()
56 kfree(sgbuf->table); snd_free_sgbuf_pages()
73 struct snd_sg_page *table; snd_malloc_sgbuf_pages() local
84 table = kcalloc(sgbuf->tblsize, sizeof(*table), GFP_KERNEL); snd_malloc_sgbuf_pages()
85 if (!table) snd_malloc_sgbuf_pages()
87 sgbuf->table = table; snd_malloc_sgbuf_pages()
112 table->buf = tmpb.area; snd_malloc_sgbuf_pages()
113 table->addr = tmpb.addr; snd_malloc_sgbuf_pages()
115 table->addr |= chunk; /* mark head */ snd_malloc_sgbuf_pages()
116 table++; snd_malloc_sgbuf_pages()
136 snd_free_sgbuf_pages(dmab); /* free the table */ snd_malloc_sgbuf_pages()
152 pg = sg->table[start].addr >> PAGE_SHIFT; snd_sgbuf_get_chunk_size()
158 if ((sg->table[start].addr >> PAGE_SHIFT) != pg) snd_sgbuf_get_chunk_size()
/linux-4.1.27/drivers/infiniband/hw/mthca/
H A Dmthca_memfree.c222 int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) mthca_table_get() argument
224 int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; mthca_table_get()
227 mutex_lock(&table->mutex); mthca_table_get()
229 if (table->icm[i]) { mthca_table_get()
230 ++table->icm[i]->refcount; mthca_table_get()
234 table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, mthca_table_get()
235 (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | mthca_table_get()
236 __GFP_NOWARN, table->coherent); mthca_table_get()
237 if (!table->icm[i]) { mthca_table_get()
242 if (mthca_MAP_ICM(dev, table->icm[i], mthca_table_get()
243 table->virt + i * MTHCA_TABLE_CHUNK_SIZE)) { mthca_table_get()
244 mthca_free_icm(dev, table->icm[i], table->coherent); mthca_table_get()
245 table->icm[i] = NULL; mthca_table_get()
250 ++table->icm[i]->refcount; mthca_table_get()
253 mutex_unlock(&table->mutex); mthca_table_get()
257 void mthca_table_put(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) mthca_table_put() argument
264 i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; mthca_table_put()
266 mutex_lock(&table->mutex); mthca_table_put()
268 if (--table->icm[i]->refcount == 0) { mthca_table_put()
269 mthca_UNMAP_ICM(dev, table->virt + i * MTHCA_TABLE_CHUNK_SIZE, mthca_table_put()
271 mthca_free_icm(dev, table->icm[i], table->coherent); mthca_table_put()
272 table->icm[i] = NULL; mthca_table_put()
275 mutex_unlock(&table->mutex); mthca_table_put()
278 void *mthca_table_find(struct mthca_icm_table *table, int obj, dma_addr_t *dma_handle) mthca_table_find() argument
285 if (!table->lowmem) mthca_table_find()
288 mutex_lock(&table->mutex); mthca_table_find()
290 idx = (obj & (table->num_obj - 1)) * table->obj_size; mthca_table_find()
291 icm = table->icm[idx / MTHCA_TABLE_CHUNK_SIZE]; mthca_table_find()
317 mutex_unlock(&table->mutex); mthca_table_find()
321 int mthca_table_get_range(struct mthca_dev *dev, struct mthca_icm_table *table, mthca_table_get_range() argument
324 int inc = MTHCA_TABLE_CHUNK_SIZE / table->obj_size; mthca_table_get_range()
328 err = mthca_table_get(dev, table, i); mthca_table_get_range()
338 mthca_table_put(dev, table, i); mthca_table_get_range()
344 void mthca_table_put_range(struct mthca_dev *dev, struct mthca_icm_table *table, mthca_table_put_range() argument
352 for (i = start; i <= end; i += MTHCA_TABLE_CHUNK_SIZE / table->obj_size) mthca_table_put_range()
353 mthca_table_put(dev, table, i); mthca_table_put_range()
361 struct mthca_icm_table *table; mthca_alloc_icm_table() local
370 table = kmalloc(sizeof *table + num_icm * sizeof *table->icm, GFP_KERNEL); mthca_alloc_icm_table()
371 if (!table) mthca_alloc_icm_table()
374 table->virt = virt; mthca_alloc_icm_table()
375 table->num_icm = num_icm; mthca_alloc_icm_table()
376 table->num_obj = nobj; mthca_alloc_icm_table()
377 table->obj_size = obj_size; mthca_alloc_icm_table()
378 table->lowmem = use_lowmem; mthca_alloc_icm_table()
379 table->coherent = use_coherent; mthca_alloc_icm_table()
380 mutex_init(&table->mutex); mthca_alloc_icm_table()
383 table->icm[i] = NULL; mthca_alloc_icm_table()
390 table->icm[i] = mthca_alloc_icm(dev, chunk_size >> PAGE_SHIFT, mthca_alloc_icm_table()
393 if (!table->icm[i]) mthca_alloc_icm_table()
395 if (mthca_MAP_ICM(dev, table->icm[i], mthca_alloc_icm_table()
397 mthca_free_icm(dev, table->icm[i], table->coherent); mthca_alloc_icm_table()
398 table->icm[i] = NULL; mthca_alloc_icm_table()
406 ++table->icm[i]->refcount; mthca_alloc_icm_table()
409 return table; mthca_alloc_icm_table()
413 if (table->icm[i]) { mthca_alloc_icm_table()
416 mthca_free_icm(dev, table->icm[i], table->coherent); mthca_alloc_icm_table()
419 kfree(table); mthca_alloc_icm_table()
424 void mthca_free_icm_table(struct mthca_dev *dev, struct mthca_icm_table *table) mthca_free_icm_table() argument
428 for (i = 0; i < table->num_icm; ++i) mthca_free_icm_table()
429 if (table->icm[i]) { mthca_free_icm_table()
431 table->virt + i * MTHCA_TABLE_CHUNK_SIZE, mthca_free_icm_table()
433 mthca_free_icm(dev, table->icm[i], table->coherent); mthca_free_icm_table()
436 kfree(table); mthca_free_icm_table()
513 * pages until we clean up the whole db table. mthca_unmap_user_db()
/linux-4.1.27/drivers/remoteproc/
H A Dste_modem_rproc.c16 #define SPROC_RESOURCE_NAME "rsc-table"
47 * at offset zero in the shared memory region. The resource table typically
49 * such as remoteproc resource table. Each entry is identified by a unique
53 struct ste_toc_entry table[SPROC_MAX_TOC_ENTRIES]; member in struct:ste_toc
66 /* Find the entry for resource table in the Table of Content */ sproc_find_rsc_entry()
73 /* Search the table for the resource table */ sproc_find_rsc_entry()
75 toc->table[i].start != 0xffffffff; i++) { sproc_find_rsc_entry()
76 if (!strncmp(toc->table[i].name, SPROC_RESOURCE_NAME, sproc_find_rsc_entry()
77 sizeof(toc->table[i].name))) sproc_find_rsc_entry()
78 return &toc->table[i]; sproc_find_rsc_entry()
84 /* Find the resource table inside the remote processor's firmware. */
90 struct resource_table *table; sproc_find_rsc_table() local
98 sproc_err(sproc, "resource table not found in fw\n"); sproc_find_rsc_table()
102 table = (void *)(fw->data + entry->start); sproc_find_rsc_table()
104 /* sanity check size and offset of resource table */ sproc_find_rsc_table()
110 sproc_err(sproc, "bad size of fw or resource table\n"); sproc_find_rsc_table()
115 if (table->ver != 1) { sproc_find_rsc_table()
116 sproc_err(sproc, "unsupported fw ver: %d\n", table->ver); sproc_find_rsc_table()
121 if (table->reserved[0] || table->reserved[1]) { sproc_find_rsc_table()
127 if (table->num > SPROC_MAX_TOC_ENTRIES || sproc_find_rsc_table()
128 table->num * sizeof(table->offset[0]) + sproc_find_rsc_table()
130 sproc_err(sproc, "resource table incomplete\n"); sproc_find_rsc_table()
144 return table; sproc_find_rsc_table()
147 /* Find the resource table inside the remote processor's firmware. */
159 sproc_err(sproc, "resource table not found in fw\n"); sproc_find_loaded_rsc_table()
H A Dremoteproc_elf_loader.c217 struct resource_table *table = NULL; find_table() local
220 /* look for the resource table and handle it */ find_table()
231 table = (struct resource_table *)(elf_data + offset); find_table()
233 /* make sure we have the entire table */ find_table()
235 dev_err(dev, "resource table truncated\n"); find_table()
239 /* make sure table has at least the header */ find_table()
241 dev_err(dev, "header-less resource table\n"); find_table()
246 if (table->ver != 1) { find_table()
247 dev_err(dev, "unsupported fw ver: %d\n", table->ver); find_table()
252 if (table->reserved[0] || table->reserved[1]) { find_table()
258 if (table->num * sizeof(table->offset[0]) + find_table()
260 dev_err(dev, "resource table incomplete\n"); find_table()
271 * rproc_elf_find_rsc_table() - find the resource table
274 * @tablesz: place holder for providing back the table size
276 * This function finds the resource table inside the remote processor's
281 * Returns the pointer to the resource table if it is found, and write its
282 * size into @tablesz. If a valid table isn't found, NULL is returned
292 struct resource_table *table = NULL; rproc_elf_find_rsc_table() local
301 table = (struct resource_table *)(elf_data + shdr->sh_offset); rproc_elf_find_rsc_table()
304 return table; rproc_elf_find_rsc_table()
308 * rproc_elf_find_loaded_rsc_table() - find the loaded resource table
312 * This function finds the location of the loaded resource table. Don't
313 * call this function if the table wasn't loaded yet - it's a bug if you do.
315 * Returns the pointer to the resource table if it is found or NULL otherwise.
316 * If the table wasn't loaded yet the result is unspecified.
/linux-4.1.27/arch/s390/mm/
H A Dpgtable.c43 void crst_table_free(struct mm_struct *mm, unsigned long *table) crst_table_free() argument
45 free_pages((unsigned long) table, ALLOC_ORDER); crst_table_free()
61 unsigned long *table, *pgd; crst_table_upgrade() local
68 table = crst_table_alloc(mm); crst_table_upgrade()
69 if (!table) crst_table_upgrade()
87 crst_table_init(table, entry); crst_table_upgrade()
88 pgd_populate(mm, (pgd_t *) table, (pud_t *) pgd); crst_table_upgrade()
89 mm->pgd = (pgd_t *) table; crst_table_upgrade()
91 table = NULL; crst_table_upgrade()
95 if (table) crst_table_upgrade()
96 crst_table_free(mm, table); crst_table_upgrade()
151 unsigned long *table; gmap_alloc() local
184 table = (unsigned long *) page_to_phys(page); gmap_alloc()
185 crst_table_init(table, etype); gmap_alloc()
186 gmap->table = table; gmap_alloc()
188 _ASCE_USER_BITS | __pa(table); gmap_alloc()
283 static int gmap_alloc_table(struct gmap *gmap, unsigned long *table, gmap_alloc_table() argument
289 /* since we dont free the gmap table until gmap_free we can unlock */ gmap_alloc_table()
296 if (*table & _REGION_ENTRY_INVALID) { gmap_alloc_table()
298 *table = (unsigned long) new | _REGION_ENTRY_LENGTH | gmap_alloc_table()
299 (*table & _REGION_ENTRY_TYPE_MASK); gmap_alloc_table()
311 * @entry: pointer to a segment table entry in the guest address space
443 * This function does not establish potentially missing page table entries.
464 * This function does not establish potentially missing page table entries.
478 * gmap_unlink - disconnect a page table from the gmap shadow tables
480 * @table: pointer to the host page table
481 * @vmaddr: vm address associated with the host page table
483 static void gmap_unlink(struct mm_struct *mm, unsigned long *table, gmap_unlink() argument
510 unsigned long *table; __gmap_link() local
517 /* Create higher level tables in the gmap page table */ __gmap_link()
518 table = gmap->table; __gmap_link()
520 table += (gaddr >> 53) & 0x7ff; __gmap_link()
521 if ((*table & _REGION_ENTRY_INVALID) && __gmap_link()
522 gmap_alloc_table(gmap, table, _REGION2_ENTRY_EMPTY, __gmap_link()
525 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); __gmap_link()
528 table += (gaddr >> 42) & 0x7ff; __gmap_link()
529 if ((*table & _REGION_ENTRY_INVALID) && __gmap_link()
530 gmap_alloc_table(gmap, table, _REGION3_ENTRY_EMPTY, __gmap_link()
533 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); __gmap_link()
536 table += (gaddr >> 31) & 0x7ff; __gmap_link()
537 if ((*table & _REGION_ENTRY_INVALID) && __gmap_link()
538 gmap_alloc_table(gmap, table, _SEGMENT_ENTRY_EMPTY, __gmap_link()
541 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); __gmap_link()
543 table += (gaddr >> 20) & 0x7ff; __gmap_link()
544 /* Walk the parent mm page table */ __gmap_link()
555 /* Link gmap segment table entry location to page table. */ __gmap_link()
561 if (*table == _SEGMENT_ENTRY_INVALID) { __gmap_link()
563 vmaddr >> PMD_SHIFT, table); __gmap_link()
565 *table = pmd_val(*pmd); __gmap_link()
637 /* Get pointer to the page table entry */ __gmap_zap()
719 * -ENOMEM is returned. This function establishes missing page table entries.
747 /* Walk the process page table, lock and get pte pointer */ gmap_ipte_notify()
770 * @pte: pointer to the page table entry
772 * This function is assumed to be called with the page table lock held
778 unsigned long *table; gmap_do_ipte_notify() local
786 table = radix_tree_lookup(&gmap->host_to_guest, gmap_do_ipte_notify()
788 if (!table) gmap_do_ipte_notify()
790 gaddr = __gmap_segment_gaddr(table) + offset; gmap_do_ipte_notify()
806 unsigned long *table; page_table_alloc_pgste() local
816 table = (unsigned long *) page_to_phys(page); page_table_alloc_pgste()
817 clear_table(table, _PAGE_INVALID, PAGE_SIZE/2); page_table_alloc_pgste()
818 clear_table(table + PTRS_PER_PTE, 0, PAGE_SIZE/2); page_table_alloc_pgste()
819 return table; page_table_alloc_pgste()
822 static inline void page_table_free_pgste(unsigned long *table) page_table_free_pgste() argument
826 page = pfn_to_page(__pa(table) >> PAGE_SHIFT); page_table_free_pgste()
970 static inline void page_table_free_pgste(unsigned long *table) page_table_free_pgste() argument
974 static inline void gmap_unlink(struct mm_struct *mm, unsigned long *table, gmap_unlink() argument
993 * page table entry allocation/free routines.
997 unsigned long *uninitialized_var(table); page_table_alloc()
1003 /* Allocate fragments of a 4K page as 1K/2K page table */ page_table_alloc()
1009 table = (unsigned long *) page_to_phys(page); page_table_alloc()
1023 table = (unsigned long *) page_to_phys(page); page_table_alloc()
1024 clear_table(table, _PAGE_INVALID, PAGE_SIZE); page_table_alloc()
1029 table += PTRS_PER_PTE; page_table_alloc()
1035 return table; page_table_alloc()
1038 void page_table_free(struct mm_struct *mm, unsigned long *table) page_table_free() argument
1043 page = pfn_to_page(__pa(table) >> PAGE_SHIFT); page_table_free()
1045 return page_table_free_pgste(table); page_table_free()
1046 /* Free 1K/2K page table fragment of a 4K page */ page_table_free()
1047 bit = 1 << ((__pa(table) & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t))); page_table_free()
1062 static void __page_table_free_rcu(void *table, unsigned bit) __page_table_free_rcu() argument
1067 return page_table_free_pgste(table); __page_table_free_rcu()
1068 /* Free 1K/2K page table fragment of a 4K page */ __page_table_free_rcu()
1069 page = pfn_to_page(__pa(table) >> PAGE_SHIFT); __page_table_free_rcu()
1077 void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table, page_table_free_rcu() argument
1085 page = pfn_to_page(__pa(table) >> PAGE_SHIFT); page_table_free_rcu()
1087 gmap_unlink(mm, table, vmaddr); page_table_free_rcu()
1088 table = (unsigned long *) (__pa(table) | FRAG_MASK); page_table_free_rcu()
1089 tlb_remove_table(tlb, table); page_table_free_rcu()
1092 bit = 1 << ((__pa(table) & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t))); page_table_free_rcu()
1100 table = (unsigned long *) (__pa(table) | (bit << 4)); page_table_free_rcu()
1101 tlb_remove_table(tlb, table); page_table_free_rcu()
1107 void *table = (void *)((unsigned long) _table & ~mask); __tlb_remove_table() local
1111 __page_table_free_rcu(table, type); __tlb_remove_table()
1113 free_pages((unsigned long) table, ALLOC_ORDER); __tlb_remove_table()
1121 static void tlb_remove_table_one(void *table) tlb_remove_table_one() argument
1127 * It is however sufficient for software page-table walkers that rely tlb_remove_table_one()
1131 __tlb_remove_table(table); tlb_remove_table_one()
1157 void tlb_remove_table(struct mmu_gather *tlb, void *table) tlb_remove_table() argument
1167 tlb_remove_table_one(table); tlb_remove_table()
1172 (*batch)->tables[(*batch)->nr++] = table; tlb_remove_table()
H A Dextable.c6 * Search one exception table for an entry corresponding to the
9 * We use a binary search, and thus we assume that the table is
34 * The exception table needs to be sorted so that the binary
36 * This is used both for the kernel exception table and for
69 * If the exception table is sorted, any referring to the module init
H A Dfault.c107 * identification indicate which paging table was used. user_space_fault()
130 unsigned long *table = __va(asce & PAGE_MASK); dump_pagetable() local
135 table = table + ((address >> 53) & 0x7ff); dump_pagetable()
136 if (bad_address(table)) dump_pagetable()
138 pr_cont("R1:%016lx ", *table); dump_pagetable()
139 if (*table & _REGION_ENTRY_INVALID) dump_pagetable()
141 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); dump_pagetable()
144 table = table + ((address >> 42) & 0x7ff); dump_pagetable()
145 if (bad_address(table)) dump_pagetable()
147 pr_cont("R2:%016lx ", *table); dump_pagetable()
148 if (*table & _REGION_ENTRY_INVALID) dump_pagetable()
150 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); dump_pagetable()
153 table = table + ((address >> 31) & 0x7ff); dump_pagetable()
154 if (bad_address(table)) dump_pagetable()
156 pr_cont("R3:%016lx ", *table); dump_pagetable()
157 if (*table & (_REGION_ENTRY_INVALID | _REGION3_ENTRY_LARGE)) dump_pagetable()
159 table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); dump_pagetable()
162 table = table + ((address >> 20) & 0x7ff); dump_pagetable()
163 if (bad_address(table)) dump_pagetable()
165 pr_cont("S:%016lx ", *table); dump_pagetable()
166 if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE)) dump_pagetable()
168 table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN); dump_pagetable()
170 table = table + ((address >> 12) & 0xff); dump_pagetable()
171 if (bad_address(table)) dump_pagetable()
173 pr_cont("P:%016lx ", *table); dump_pagetable()
/linux-4.1.27/include/net/
H A Dllc_s_st.h15 #define LLC_NR_SAP_STATES 2 /* size of state table */
18 /* SAP state table structure */
30 /* only access to SAP state table */
/linux-4.1.27/drivers/media/i2c/
H A Dks0127.c221 u8 *table = reg_defaults; init_reg_defaults() local
227 table[KS_CMDA] = 0x2c; /* VSE=0, CCIR 601, autodetect standard */ init_reg_defaults()
228 table[KS_CMDB] = 0x12; /* VALIGN=0, AGC control and input */ init_reg_defaults()
229 table[KS_CMDC] = 0x00; /* Test options */ init_reg_defaults()
231 table[KS_CMDD] = 0x01; init_reg_defaults()
232 table[KS_HAVB] = 0x00; /* HAV Start Control */ init_reg_defaults()
233 table[KS_HAVE] = 0x00; /* HAV End Control */ init_reg_defaults()
234 table[KS_HS1B] = 0x10; /* HS1 Start Control */ init_reg_defaults()
235 table[KS_HS1E] = 0x00; /* HS1 End Control */ init_reg_defaults()
236 table[KS_HS2B] = 0x00; /* HS2 Start Control */ init_reg_defaults()
237 table[KS_HS2E] = 0x00; /* HS2 End Control */ init_reg_defaults()
238 table[KS_AGC] = 0x53; /* Manual setting for AGC */ init_reg_defaults()
239 table[KS_HXTRA] = 0x00; /* Extra Bits for HAV and HS1/2 */ init_reg_defaults()
240 table[KS_CDEM] = 0x00; /* Chroma Demodulation Control */ init_reg_defaults()
241 table[KS_PORTAB] = 0x0f; /* port B is input, port A output GPPORT */ init_reg_defaults()
242 table[KS_LUMA] = 0x01; /* Luma control */ init_reg_defaults()
243 table[KS_CON] = 0x00; /* Contrast Control */ init_reg_defaults()
244 table[KS_BRT] = 0x00; /* Brightness Control */ init_reg_defaults()
245 table[KS_CHROMA] = 0x2a; /* Chroma control A */ init_reg_defaults()
246 table[KS_CHROMB] = 0x90; /* Chroma control B */ init_reg_defaults()
247 table[KS_DEMOD] = 0x00; /* Chroma Demodulation Control & Status */ init_reg_defaults()
248 table[KS_SAT] = 0x00; /* Color Saturation Control*/ init_reg_defaults()
249 table[KS_HUE] = 0x00; /* Hue Control */ init_reg_defaults()
250 table[KS_VERTIA] = 0x00; /* Vertical Processing Control A */ init_reg_defaults()
252 table[KS_VERTIB] = 0x12; init_reg_defaults()
253 table[KS_VERTIC] = 0x0b; /* Vertical Processing Control C */ init_reg_defaults()
254 table[KS_HSCLL] = 0x00; /* Horizontal Scaling Ratio Low */ init_reg_defaults()
255 table[KS_HSCLH] = 0x00; /* Horizontal Scaling Ratio High */ init_reg_defaults()
256 table[KS_VSCLL] = 0x00; /* Vertical Scaling Ratio Low */ init_reg_defaults()
257 table[KS_VSCLH] = 0x00; /* Vertical Scaling Ratio High */ init_reg_defaults()
259 table[KS_OFMTA] = 0x30; init_reg_defaults()
260 table[KS_OFMTB] = 0x00; /* Output Control B */ init_reg_defaults()
262 table[KS_VBICTL] = 0x5d; init_reg_defaults()
263 table[KS_CCDAT2] = 0x00; /* Read Only register */ init_reg_defaults()
264 table[KS_CCDAT1] = 0x00; /* Read Only register */ init_reg_defaults()
265 table[KS_VBIL30] = 0xa8; /* VBI data decoding options */ init_reg_defaults()
266 table[KS_VBIL74] = 0xaa; /* VBI data decoding options */ init_reg_defaults()
267 table[KS_VBIL118] = 0x2a; /* VBI data decoding options */ init_reg_defaults()
268 table[KS_VBIL1512] = 0x00; /* VBI data decoding options */ init_reg_defaults()
269 table[KS_TTFRAM] = 0x00; /* Teletext frame alignment pattern */ init_reg_defaults()
270 table[KS_TESTA] = 0x00; /* test register, shouldn't be written */ init_reg_defaults()
271 table[KS_UVOFFH] = 0x00; /* UV Offset Adjustment High */ init_reg_defaults()
272 table[KS_UVOFFL] = 0x00; /* UV Offset Adjustment Low */ init_reg_defaults()
273 table[KS_UGAIN] = 0x00; /* U Component Gain Adjustment */ init_reg_defaults()
274 table[KS_VGAIN] = 0x00; /* V Component Gain Adjustment */ init_reg_defaults()
275 table[KS_VAVB] = 0x07; /* VAV Begin */ init_reg_defaults()
276 table[KS_VAVE] = 0x00; /* VAV End */ init_reg_defaults()
277 table[KS_CTRACK] = 0x00; /* Chroma Tracking Control */ init_reg_defaults()
278 table[KS_POLCTL] = 0x41; /* Timing Signal Polarity Control */ init_reg_defaults()
279 table[KS_REFCOD] = 0x80; /* Reference Code Insertion Control */ init_reg_defaults()
280 table[KS_INVALY] = 0x10; /* Invalid Y Code */ init_reg_defaults()
281 table[KS_INVALU] = 0x80; /* Invalid U Code */ init_reg_defaults()
282 table[KS_INVALV] = 0x80; /* Invalid V Code */ init_reg_defaults()
283 table[KS_UNUSEY] = 0x10; /* Unused Y Code */ init_reg_defaults()
284 table[KS_UNUSEU] = 0x80; /* Unused U Code */ init_reg_defaults()
285 table[KS_UNUSEV] = 0x80; /* Unused V Code */ init_reg_defaults()
286 table[KS_USRSAV] = 0x00; /* reserved */ init_reg_defaults()
287 table[KS_USREAV] = 0x00; /* reserved */ init_reg_defaults()
288 table[KS_SHS1A] = 0x00; /* User Defined SHS1 A */ init_reg_defaults()
290 table[KS_SHS1B] = 0x80; init_reg_defaults()
291 table[KS_SHS1C] = 0x00; /* User Defined SHS1 C */ init_reg_defaults()
292 table[KS_CMDE] = 0x00; /* Command Register E */ init_reg_defaults()
293 table[KS_VSDEL] = 0x00; /* VS Delay Control */ init_reg_defaults()
296 table[KS_CMDF] = 0x02; init_reg_defaults()
372 u8 *table = reg_defaults; ks0127_init() local
382 ks0127_write(sd, i, table[i]); ks0127_init()
385 ks0127_write(sd, i, table[i]); ks0127_init()
388 ks0127_write(sd, i, table[i]); ks0127_init()
391 ks0127_write(sd, i, table[i]); ks0127_init()
/linux-4.1.27/drivers/staging/android/ion/
H A Dion_chunk_heap.c43 struct sg_table *table; ion_chunk_heap_allocate() local
58 table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); ion_chunk_heap_allocate()
59 if (!table) ion_chunk_heap_allocate()
61 ret = sg_alloc_table(table, num_chunks, GFP_KERNEL); ion_chunk_heap_allocate()
63 kfree(table); ion_chunk_heap_allocate()
67 sg = table->sgl; ion_chunk_heap_allocate()
78 buffer->priv_virt = table; ion_chunk_heap_allocate()
82 sg = table->sgl; ion_chunk_heap_allocate()
88 sg_free_table(table); ion_chunk_heap_allocate()
89 kfree(table); ion_chunk_heap_allocate()
98 struct sg_table *table = buffer->priv_virt; ion_chunk_heap_free() local
108 dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_chunk_heap_free()
111 for_each_sg(table->sgl, sg, table->nents, i) { ion_chunk_heap_free()
116 sg_free_table(table); ion_chunk_heap_free()
117 kfree(table); ion_chunk_heap_free()
H A Dion_carveout_heap.c63 struct sg_table *table = buffer->priv_virt; ion_carveout_heap_phys() local
64 struct page *page = sg_page(table->sgl); ion_carveout_heap_phys()
77 struct sg_table *table; ion_carveout_heap_allocate() local
84 table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); ion_carveout_heap_allocate()
85 if (!table) ion_carveout_heap_allocate()
87 ret = sg_alloc_table(table, 1, GFP_KERNEL); ion_carveout_heap_allocate()
97 sg_set_page(table->sgl, pfn_to_page(PFN_DOWN(paddr)), size, 0); ion_carveout_heap_allocate()
98 buffer->priv_virt = table; ion_carveout_heap_allocate()
103 sg_free_table(table); ion_carveout_heap_allocate()
105 kfree(table); ion_carveout_heap_allocate()
112 struct sg_table *table = buffer->priv_virt; ion_carveout_heap_free() local
113 struct page *page = sg_page(table->sgl); ion_carveout_heap_free()
119 dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_carveout_heap_free()
123 sg_free_table(table); ion_carveout_heap_free()
124 kfree(table); ion_carveout_heap_free()
H A Dion_system_heap.c128 struct sg_table *table; ion_system_heap_allocate() local
153 table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); ion_system_heap_allocate()
154 if (!table) ion_system_heap_allocate()
157 if (sg_alloc_table(table, i, GFP_KERNEL)) ion_system_heap_allocate()
160 sg = table->sgl; ion_system_heap_allocate()
167 buffer->priv_virt = table; ion_system_heap_allocate()
171 kfree(table); ion_system_heap_allocate()
183 struct sg_table *table = buffer->sg_table; ion_system_heap_free() local
193 for_each_sg(table->sgl, sg, table->nents, i) ion_system_heap_free()
195 sg_free_table(table); ion_system_heap_free()
196 kfree(table); ion_system_heap_free()
317 struct sg_table *table; ion_system_contig_heap_allocate() local
334 table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); ion_system_contig_heap_allocate()
335 if (!table) { ion_system_contig_heap_allocate()
340 ret = sg_alloc_table(table, 1, GFP_KERNEL); ion_system_contig_heap_allocate()
344 sg_set_page(table->sgl, page, len, 0); ion_system_contig_heap_allocate()
346 buffer->priv_virt = table; ion_system_contig_heap_allocate()
353 kfree(table); ion_system_contig_heap_allocate()
363 struct sg_table *table = buffer->priv_virt; ion_system_contig_heap_free() local
364 struct page *page = sg_page(table->sgl); ion_system_contig_heap_free()
370 sg_free_table(table); ion_system_contig_heap_free()
371 kfree(table); ion_system_contig_heap_free()
378 struct sg_table *table = buffer->priv_virt; ion_system_contig_heap_phys() local
379 struct page *page = sg_page(table->sgl); ion_system_contig_heap_phys()
H A Dion_cma_heap.c39 struct sg_table *table; member in struct:ion_cma_buffer_info
72 info->table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); ion_cma_allocate()
73 if (!info->table) ion_cma_allocate()
77 (dev, info->table, info->cpu_addr, info->handle, len)) ion_cma_allocate()
85 kfree(info->table); ion_cma_allocate()
102 /* release sg table */ ion_cma_free()
103 sg_free_table(info->table); ion_cma_free()
104 kfree(info->table); ion_cma_free()
130 return info->table; ion_cma_heap_map_dma()
/linux-4.1.27/drivers/gpu/drm/
H A Ddrm_hashtab.c46 ht->table = NULL; drm_ht_create()
47 if (size <= PAGE_SIZE / sizeof(*ht->table)) drm_ht_create()
48 ht->table = kcalloc(size, sizeof(*ht->table), GFP_KERNEL); drm_ht_create()
50 ht->table = vzalloc(size*sizeof(*ht->table)); drm_ht_create()
51 if (!ht->table) { drm_ht_create()
52 DRM_ERROR("Out of memory for hash table\n"); drm_ht_create()
68 h_list = &ht->table[hashed_key]; drm_ht_verbose_list()
81 h_list = &ht->table[hashed_key]; hlist_for_each_entry()
99 h_list = &ht->table[hashed_key]; hlist_for_each_entry_rcu()
118 h_list = &ht->table[hashed_key]; drm_ht_insert_item()
200 if (ht->table) { drm_ht_remove()
201 if ((PAGE_SIZE / sizeof(*ht->table)) >> ht->order) drm_ht_remove()
202 kfree(ht->table); drm_ht_remove()
204 vfree(ht->table); drm_ht_remove()
205 ht->table = NULL; drm_ht_remove()
/linux-4.1.27/include/rdma/
H A Dib_cache.h41 * ib_get_cached_gid - Returns a cached GID table entry
44 * @index: The index into the cached GID table to query.
47 * ib_get_cached_gid() fetches the specified GID table entry stored in
56 * ib_find_cached_gid - Returns the port number and GID table index where
61 * @index: The index into the cached GID table where the GID was found. This
73 * ib_get_cached_pkey - Returns a cached PKey table entry
76 * @index: The index into the cached PKey table to query.
79 * ib_get_cached_pkey() fetches the specified PKey table entry stored in
88 * ib_find_cached_pkey - Returns the PKey table index where a specified
93 * @index: The index into the cached PKey table where the PKey was found.
95 * ib_find_cached_pkey() searches the specified PKey table in
104 * ib_find_exact_cached_pkey - Returns the PKey table index where a specified
109 * @index: The index into the cached PKey table where the PKey was found.
111 * ib_find_exact_cached_pkey() searches the specified PKey table in
120 * ib_get_cached_lmc - Returns a cached lmc table entry
125 * ib_get_cached_lmc() fetches the specified lmc table entry stored in
/linux-4.1.27/ipc/
H A Dmq_sysctl.c17 static void *get_mq(struct ctl_table *table) get_mq() argument
19 char *which = table->data; get_mq()
25 static int proc_mq_dointvec(struct ctl_table *table, int write, proc_mq_dointvec() argument
29 memcpy(&mq_table, table, sizeof(mq_table)); proc_mq_dointvec()
30 mq_table.data = get_mq(table); proc_mq_dointvec()
35 static int proc_mq_dointvec_minmax(struct ctl_table *table, int write, proc_mq_dointvec_minmax() argument
39 memcpy(&mq_table, table, sizeof(mq_table)); proc_mq_dointvec_minmax()
40 mq_table.data = get_mq(table); proc_mq_dointvec_minmax()
H A Dipc_sysctl.c21 static void *get_ipc(struct ctl_table *table) get_ipc() argument
23 char *which = table->data; get_ipc()
30 static int proc_ipc_dointvec(struct ctl_table *table, int write, proc_ipc_dointvec() argument
35 memcpy(&ipc_table, table, sizeof(ipc_table)); proc_ipc_dointvec()
36 ipc_table.data = get_ipc(table); proc_ipc_dointvec()
41 static int proc_ipc_dointvec_minmax(struct ctl_table *table, int write, proc_ipc_dointvec_minmax() argument
46 memcpy(&ipc_table, table, sizeof(ipc_table)); proc_ipc_dointvec_minmax()
47 ipc_table.data = get_ipc(table); proc_ipc_dointvec_minmax()
52 static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write, proc_ipc_dointvec_minmax_orphans() argument
56 int err = proc_ipc_dointvec_minmax(table, write, buffer, lenp, ppos); proc_ipc_dointvec_minmax_orphans()
65 static int proc_ipc_doulongvec_minmax(struct ctl_table *table, int write, proc_ipc_doulongvec_minmax() argument
69 memcpy(&ipc_table, table, sizeof(ipc_table)); proc_ipc_doulongvec_minmax()
70 ipc_table.data = get_ipc(table); proc_ipc_doulongvec_minmax()
76 static int proc_ipc_auto_msgmni(struct ctl_table *table, int write, proc_ipc_auto_msgmni() argument
82 memcpy(&ipc_table, table, sizeof(ipc_table)); proc_ipc_auto_msgmni()
/linux-4.1.27/arch/arm/mm/
H A Dfsr-3level.c22 { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" },
23 { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" },
24 { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" },
25 { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" },
30 { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" },
31 { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" },
32 { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" },
33 { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" },
/linux-4.1.27/fs/nls/
H A Dnls_koi8-ru.c5 * The Unicode to charset table has only exact mappings.
54 static struct nls_table table = { variable in typeref:struct:nls_table
65 table.charset2upper = p_nls->charset2upper; init_nls_koi8_ru()
66 table.charset2lower = p_nls->charset2lower; init_nls_koi8_ru()
67 return register_nls(&table); init_nls_koi8_ru()
75 unregister_nls(&table); exit_nls_koi8_ru()
H A Dnls_utf8.c43 static struct nls_table table = { variable in typeref:struct:nls_table
57 return register_nls(&table); init_nls_utf8()
62 unregister_nls(&table); exit_nls_utf8()
/linux-4.1.27/net/batman-adv/
H A Dhash.c27 INIT_HLIST_HEAD(&hash->table[i]); batadv_hash_init()
36 kfree(hash->table); batadv_hash_destroy()
49 hash->table = kmalloc_array(size, sizeof(*hash->table), GFP_ATOMIC); batadv_hash_new()
50 if (!hash->table) batadv_hash_new()
63 kfree(hash->table); batadv_hash_new()
/linux-4.1.27/scripts/
H A Dkallsyms.c14 * The used codes themselves are also placed in the table so that the
58 static struct sym_entry *table; variable in typeref:struct:sym_entry
67 /* the table that holds the result of the compression */
273 table = realloc(table, sizeof(*table) * table_size); read_map()
274 if (!table) { read_map()
279 if (read_symbol(in, &table[table_cnt]) == 0) { read_map()
280 table[table_cnt].start_pos = table_cnt; read_map()
299 /* uncompress a compressed symbol. When this function is called, the best table
307 /* if the table holds a single char that is the same as the one expand_symbol()
358 if (!symbol_absolute(&table[i])) { write_src()
359 if (_text <= table[i].addr) write_src()
361 table[i].addr - _text); write_src()
364 _text - table[i].addr); write_src()
366 printf("\tPTR\t%#llx\n", table[i].addr); write_src()
375 /* table of offset markers, that give the offset in the compressed stream write_src()
390 printf("\t.byte 0x%02x", table[i].len); write_src()
391 for (k = 0; k < table[i].len; k++) write_src()
392 printf(", 0x%02x", table[i].sym[k]); write_src()
395 off += table[i].len + 1; write_src()
423 /* table lookup compression functions */
443 /* remove all the invalid symbols from the table and do the initial token count */ build_initial_tok_table()
450 if ( symbol_valid(&table[i]) ) { build_initial_tok_table()
452 table[pos] = table[i]; build_initial_tok_table()
453 learn_symbol(table[pos].sym, table[pos].len); build_initial_tok_table()
480 len = table[i].len; compress_symbols()
481 p1 = table[i].sym; compress_symbols()
488 forget_symbol(table[i].sym, len); compress_symbols()
507 table[i].len = len; compress_symbols()
510 learn_symbol(table[i].sym, len); compress_symbols()
531 /* this is the core of the algorithm: calculate the "best" table */ optimize_result()
540 /* if this table slot is empty (it is not used by an actual optimize_result()
549 /* place it in the "best" table */ optimize_result()
560 /* start by placing the symbols that are actually used on the table */ insert_real_symbols_in_table()
569 for (j = 0; j < table[i].len; j++) { insert_real_symbols_in_table()
570 c = table[i].sym[j]; insert_real_symbols_in_table()
676 qsort(table, table_cnt, sizeof(struct sym_entry), compare_symbols); sort_symbols()
684 if (symbol_in_range(&table[i], &percpu_range, 1)) make_percpus_absolute()
685 table[i].sym[0] = 'A'; make_percpus_absolute()
/linux-4.1.27/arch/parisc/kernel/
H A Dunwind.c47 find_unwind_entry_in_table(const struct unwind_table *table, unsigned long addr) find_unwind_entry_in_table() argument
53 hi = table->length - 1; find_unwind_entry_in_table()
57 e = &table->table[mid]; find_unwind_entry_in_table()
72 struct unwind_table *table; find_unwind_entry() local
79 list_for_each_entry(table, &unwind_tables, list) { find_unwind_entry()
80 if (addr >= table->start && find_unwind_entry()
81 addr <= table->end) find_unwind_entry()
82 e = find_unwind_entry_in_table(table, addr); find_unwind_entry()
85 list_move(&table->list, &unwind_tables); find_unwind_entry()
94 unwind_table_init(struct unwind_table *table, const char *name, unwind_table_init() argument
102 table->name = name; unwind_table_init()
103 table->base_addr = base_addr; unwind_table_init()
104 table->gp = gp; unwind_table_init()
105 table->start = base_addr + start->region_start; unwind_table_init()
106 table->end = base_addr + end->region_end; unwind_table_init()
107 table->table = (struct unwind_table_entry *)table_start; unwind_table_init()
108 table->length = end - start + 1; unwind_table_init()
109 INIT_LIST_HEAD(&table->list); unwind_table_init()
141 struct unwind_table *table; unwind_table_add() local
148 table = kmalloc(sizeof(struct unwind_table), GFP_USER); unwind_table_add()
149 if (table == NULL) unwind_table_add()
151 unwind_table_init(table, name, base_addr, gp, start, end); unwind_table_add()
153 list_add_tail(&table->list, &unwind_tables); unwind_table_add()
156 return table; unwind_table_add()
159 void unwind_table_remove(struct unwind_table *table) unwind_table_remove() argument
164 list_del(&table->list); unwind_table_remove()
167 kfree(table); unwind_table_remove()
/linux-4.1.27/arch/x86/crypto/
H A Daes-i586-asm_32.S84 // table table base address
93 #define do_col(table, a1,a2,a3,a4, idx, tmp) \
95 xor table(,%tmp,4),%a1; \
98 xor table+tlen(,%tmp,4),%a2; \
101 xor table+2*tlen(,%tmp,4),%a3; \
102 xor table+3*tlen(,%idx,4),%a4;
107 #define do_fcol(table, a1,a2,a3,a4, idx, tmp, sched) \
111 xor table(,%tmp,4),%a1; \
115 xor table+tlen(,%tmp,4),%a2; \
118 xor table+3*tlen(,%idx,4),%a4; \
121 xor table+2*tlen(,%tmp,4),%a3;
126 #define do_icol(table, a1,a2,a3,a4, idx, tmp, sched) \
130 xor table(,%tmp,4),%a1; \
134 xor table+tlen(,%tmp,4),%a2; \
137 xor table+3*tlen(,%idx,4),%a4; \
140 xor table+2*tlen(,%tmp,4),%a3;
158 #define fwd_rnd1(arg, table) \
163 do_fcol(table, r2,r5,r4,r1, r0,r3, arg); /* idx=r0 */ \
164 do_col (table, r4,r1,r2,r5, r0,r3); /* idx=r4 */ \
166 do_col (table, r1,r2,r5,r4, r0,r3); /* idx=r1 */ \
168 do_col (table, r5,r4,r1,r2, r0,r3); /* idx=r5 */
173 #define fwd_rnd2(arg, table) \
178 do_fcol(table, r0,r5,r4,r1, r2,r3, arg); /* idx=r2 */ \
179 do_col (table, r4,r1,r0,r5, r2,r3); /* idx=r4 */ \
181 do_col (table, r1,r0,r5,r4, r2,r3); /* idx=r1 */ \
183 do_col (table, r5,r4,r1,r0, r2,r3); /* idx=r5 */
193 #define inv_rnd1(arg, table) \
198 do_icol(table, r2,r1,r4,r5, r0,r3, arg); /* idx=r0 */ \
199 do_col (table, r4,r5,r2,r1, r0,r3); /* idx=r4 */ \
201 do_col (table, r1,r4,r5,r2, r0,r3); /* idx=r1 */ \
203 do_col (table, r5,r2,r1,r4, r0,r3); /* idx=r5 */
208 #define inv_rnd2(arg, table) \
213 do_icol(table, r0,r1,r4,r5, r2,r3, arg); /* idx=r2 */ \
214 do_col (table, r4,r5,r0,r1, r2,r3); /* idx=r4 */ \
216 do_col (table, r1,r4,r5,r0, r2,r3); /* idx=r1 */ \
218 do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */
274 fwd_rnd2(+144(%ebp), crypto_fl_tab) // last round uses a different table
346 inv_rnd2(+144(%ebp), crypto_il_tab) // last round uses a different table
/linux-4.1.27/security/apparmor/
H A Dmatch.c29 * unpack_table - unpack a dfa table (one of accept, default, base, next check)
33 * Returns: pointer to table else NULL on failure
39 struct table_header *table = NULL; unpack_table() local
62 table = kvzalloc(tsize); unpack_table()
63 if (table) { unpack_table()
64 *table = th; unpack_table()
66 UNPACK_ARRAY(table->td_data, blob, th.td_lolen, unpack_table()
69 UNPACK_ARRAY(table->td_data, blob, th.td_lolen, unpack_table()
72 UNPACK_ARRAY(table->td_data, blob, th.td_lolen, unpack_table()
79 /* if table was vmalloced make sure the page tables are synced unpack_table()
82 if (is_vmalloc_addr(table)) unpack_table()
84 return table; unpack_table()
86 kvfree(table); unpack_table()
93 * @flags: flags controlling what type of accept table are acceptable
96 * NOTE: this does not valid accept table values
133 /* if equivalence classes then its table size must be 256 */ verify_dfa()
208 struct table_header *table = NULL; aa_dfa_unpack() local
217 /* get dfa table set header */ aa_dfa_unpack()
233 table = unpack_table(data, size); aa_dfa_unpack()
234 if (!table) aa_dfa_unpack()
237 switch (table->td_id) { aa_dfa_unpack()
239 if (!(table->td_flags & ACCEPT1_FLAGS(flags))) aa_dfa_unpack()
243 if (!(table->td_flags & ACCEPT2_FLAGS(flags))) aa_dfa_unpack()
247 if (table->td_flags != YYTD_DATA32) aa_dfa_unpack()
253 if (table->td_flags != YYTD_DATA16) aa_dfa_unpack()
257 if (table->td_flags != YYTD_DATA8) aa_dfa_unpack()
263 /* check for duplicate table entry */ aa_dfa_unpack()
264 if (dfa->tables[table->td_id]) aa_dfa_unpack()
266 dfa->tables[table->td_id] = table; aa_dfa_unpack()
267 data += table_size(table->td_lolen, table->td_flags); aa_dfa_unpack()
268 size -= table_size(table->td_lolen, table->td_flags); aa_dfa_unpack()
269 table = NULL; aa_dfa_unpack()
279 kvfree(table); aa_dfa_unpack()
314 /* Equivalence class table defined */ aa_dfa_match_len()
364 /* Equivalence class table defined */ aa_dfa_match()
409 /* Equivalence class table defined */ aa_dfa_next()
/linux-4.1.27/drivers/acpi/
H A Dacpi_lpat.c2 * acpi_lpat.c - LPAT table processing functions
22 * LPAT conversion table
24 * @lpat_table: the temperature_raw mapping table structure
26 * above mapping table
56 * LPAT conversion table
58 * @lpat: the temperature_raw mapping table
60 * above mapping table
88 * acpi_lpat_get_conversion_table(): Parse ACPI LPAT table if present.
92 * Parse LPAT table to a struct of type acpi_lpat_table. On success
93 * it returns a pointer to newly allocated table. This table must
144 * acpi_lpat_free_conversion_table(): Free LPAT table.
146 * @lpat_table: the temperature_raw mapping table structure
148 * Frees the LPAT table previously allocated by a call to
H A Dcustom_method.c29 struct acpi_table_header table; cm_write() local
33 /* parse the table header to get the table length */ cm_write()
36 if (copy_from_user(&table, user_buf, cm_write()
39 uncopied_bytes = max_size = table.length; cm_write()
H A Dtables.c50 * Disable table checksum verification for the early stage due to the size
323 * acpi_table_parse - find table with @id, run @handler on it
324 * @id: table id to find
327 * Scan the ACPI System Descriptor Table (STD) for a table matching @id,
330 * Return 0 if table found, -errno if not.
334 struct acpi_table_header *table = NULL; acpi_table_parse() local
344 acpi_get_table_with_size(id, acpi_apic_instance, &table, &tbl_size); acpi_table_parse()
346 acpi_get_table_with_size(id, 0, &table, &tbl_size); acpi_table_parse()
348 if (table) { acpi_table_parse()
349 handler(table); acpi_table_parse()
350 early_acpi_os_unmap_memory(table, tbl_size); acpi_table_parse()
363 struct acpi_table_header *table = NULL; check_multiple_madt() local
366 acpi_get_table_with_size(ACPI_SIG_MADT, 2, &table, &tbl_size); check_multiple_madt()
367 if (table) { check_multiple_madt()
373 early_acpi_os_unmap_memory(table, tbl_size); check_multiple_madt()
395 pr_info("Early table checksum verification enabled\n"); acpi_table_init()
398 pr_info("Early table checksum verification disabled\n"); acpi_table_init()
418 pr_notice("Shall use APIC/MADT table %d\n", acpi_apic_instance); acpi_parse_apic_instance()
/linux-4.1.27/net/
H A Dsysctl_net.c40 /* Return standard mode bits for table entry. */ net_ctl_permissions()
42 struct ctl_table *table) net_ctl_permissions()
51 int mode = (table->mode >> 6) & 7; net_ctl_permissions()
56 int mode = (table->mode >> 3) & 7; net_ctl_permissions()
59 return table->mode; net_ctl_permissions()
104 const char *path, struct ctl_table *table) register_net_sysctl()
106 return __register_sysctl_table(&net->sysctls, path, table); register_net_sysctl()
41 net_ctl_permissions(struct ctl_table_header *head, struct ctl_table *table) net_ctl_permissions() argument
103 register_net_sysctl(struct net *net, const char *path, struct ctl_table *table) register_net_sysctl() argument
/linux-4.1.27/arch/arc/kernel/
H A Dunwind.c159 struct unwind_table *table; find_table() local
161 for (table = &root_table; table; table = table->link) find_table()
162 if ((pc >= table->core.pc find_table()
163 && pc < table->core.pc + table->core.range) find_table()
164 || (pc >= table->init.pc find_table()
165 && pc < table->init.pc + table->init.range)) find_table()
168 return table; find_table()
174 static void init_unwind_table(struct unwind_table *table, const char *name, init_unwind_table() argument
183 table->core.pc = (unsigned long)core_start; init_unwind_table()
184 table->core.range = core_size; init_unwind_table()
185 table->init.pc = (unsigned long)init_start; init_unwind_table()
186 table->init.range = init_size; init_unwind_table()
187 table->address = table_start; init_unwind_table()
188 table->size = table_size; init_unwind_table()
190 /* See if the linker provided table looks valid. */ init_unwind_table()
199 table->hdrsz = header_size; init_unwind_table()
201 table->header = header_start; init_unwind_table()
202 table->link = NULL; init_unwind_table()
203 table->name = name; init_unwind_table()
244 static void __init setup_unwind_table(struct unwind_table *table, setup_unwind_table() argument
248 unsigned long tableSize = table->size, hdrSize; setup_unwind_table()
258 struct eh_frame_hdr_table_entry table[]; setup_unwind_table() member in struct:__anon146
261 if (table->header) setup_unwind_table()
264 if (table->hdrsz) setup_unwind_table()
266 table->name); setup_unwind_table()
271 for (fde = table->address, n = 0; setup_unwind_table()
274 const u32 *cie = cie_for_fde(fde, table); setup_unwind_table()
310 put_unaligned((unsigned long)table->address, &header->eh_frame_ptr); setup_unwind_table()
315 BUILD_BUG_ON(offsetof(typeof(*header), table) setup_unwind_table()
316 % __alignof(typeof(*header->table))); setup_unwind_table()
317 for (fde = table->address, tableSize = table->size, n = 0; setup_unwind_table()
326 header->table[n].start = read_pointer(&ptr, setup_unwind_table()
330 header->table[n].fde = (unsigned long)fde; setup_unwind_table()
335 sort(header->table, setup_unwind_table()
337 sizeof(*header->table), setup_unwind_table()
340 table->hdrsz = hdrSize; setup_unwind_table()
342 table->header = (const void *)header; setup_unwind_table()
365 struct unwind_table *table; unwind_add_table() local
370 table = kmalloc(sizeof(*table), GFP_KERNEL); unwind_add_table()
371 if (!table) unwind_add_table()
374 init_unwind_table(table, module->name, unwind_add_table()
382 module->name, table->core.pc, table->core.range); unwind_add_table()
385 last_table->link = table; unwind_add_table()
387 root_table.link = table; unwind_add_table()
388 last_table = table; unwind_add_table()
390 return table; unwind_add_table()
394 struct unwind_table *table; member in struct:unlink_table_info
401 struct unwind_table *table = info->table, *prev; unlink_table() local
403 for (prev = &root_table; prev->link && prev->link != table; unlink_table()
409 table->init.pc = 0; unlink_table()
410 table->init.range = 0; unlink_table()
411 info->table = NULL; unlink_table()
413 prev->link = table->link; unlink_table()
418 info->table = NULL; unlink_table()
426 struct unwind_table *table = handle; unwind_remove_table() local
429 if (!table || table == &root_table) unwind_remove_table()
432 if (init_only && table == last_table) { unwind_remove_table()
433 table->init.pc = 0; unwind_remove_table()
434 table->init.range = 0; unwind_remove_table()
438 info.table = table; unwind_remove_table()
442 kfree(table); unwind_remove_table()
491 static const u32 *cie_for_fde(const u32 *fde, const struct unwind_table *table) cie_for_fde() argument
502 /* || fde[1] > (unsigned long)(fde + 1) - (unsigned long)table->address) */ cie_for_fde()
890 const struct unwind_table *table; arc_unwind() local
913 table = find_table(pc); arc_unwind()
914 if (table != NULL arc_unwind()
915 && !(table->size & (sizeof(*fde) - 1))) { arc_unwind()
916 const u8 *hdr = table->header; arc_unwind()
939 end = hdr + table->hdrsz; arc_unwind()
941 == (unsigned long)table->address arc_unwind()
972 cie = cie_for_fde(fde, table); arc_unwind()
995 for (fde = table->address, tableSize = table->size; arc_unwind()
1000 cie = cie_for_fde(fde, table); arc_unwind()
/linux-4.1.27/drivers/iommu/
H A Dio-pgtable.h16 * struct iommu_gather_ops - IOMMU callbacks for TLB and page table management.
21 * @flush_pgtable: Ensure page table updates are visible to the IOMMU.
38 * action by the low-level page table allocator.
53 /* Low-level data specific to the table format */
69 * struct io_pgtable_ops - Page table manipulation API for IOMMU drivers.
88 * alloc_io_pgtable_ops() - Allocate a page table allocator for use by an IOMMU.
90 * @fmt: The page table format.
91 * @cfg: The page table configuration. This will be modified to represent
103 * *must* ensure that the page table is no longer
112 * Internal structures for page table allocator implementations.
118 * @fmt: The page table format.
121 * @cfg: A copy of the page table configuration.
122 * @ops: The page table operations in use for this set of page tables.
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
H A Did_table.c51 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); c4iw_id_alloc()
53 obj = find_first_zero_bit(alloc->table, alloc->max); c4iw_id_alloc()
62 set_bit(obj, alloc->table); c4iw_id_alloc()
79 clear_bit(obj, alloc->table); c4iw_id_free()
96 alloc->table = kmalloc(BITS_TO_LONGS(num) * sizeof(long), c4iw_id_table_alloc()
98 if (!alloc->table) c4iw_id_table_alloc()
101 bitmap_zero(alloc->table, num); c4iw_id_table_alloc()
104 set_bit(i, alloc->table); c4iw_id_table_alloc()
111 kfree(alloc->table); c4iw_id_table_free()
/linux-4.1.27/net/ax25/
H A Dsysctl_net_ax25.c155 struct ctl_table *table; ax25_register_dev_sysctl() local
157 table = kmemdup(ax25_param_table, sizeof(ax25_param_table), GFP_KERNEL); ax25_register_dev_sysctl()
158 if (!table) ax25_register_dev_sysctl()
162 table[k].data = &ax25_dev->values[k]; ax25_register_dev_sysctl()
165 ax25_dev->sysheader = register_net_sysctl(&init_net, path, table); ax25_register_dev_sysctl()
167 kfree(table); ax25_register_dev_sysctl()
176 struct ctl_table *table; ax25_unregister_dev_sysctl() local
180 table = header->ctl_table_arg; ax25_unregister_dev_sysctl()
182 kfree(table); ax25_unregister_dev_sysctl()
/linux-4.1.27/lib/raid6/
H A Dmktables.c65 /* Compute multiplication table */ main()
84 /* Compute vector multiplication table */ main()
109 /* Compute power-of-2 table (exponent) */ main()
128 /* Compute inverse table x^-1 == x^254 */ main()
143 /* Compute inv(2^x + 1) (exponent-xor-inverse) table */ main()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx5/core/
H A Dcq.c45 struct mlx5_cq_table *table = &dev->priv.cq_table; mlx5_cq_completion() local
47 spin_lock(&table->lock); mlx5_cq_completion()
48 cq = radix_tree_lookup(&table->tree, cqn); mlx5_cq_completion()
51 spin_unlock(&table->lock); mlx5_cq_completion()
68 struct mlx5_cq_table *table = &dev->priv.cq_table; mlx5_cq_event() local
71 spin_lock(&table->lock); mlx5_cq_event()
73 cq = radix_tree_lookup(&table->tree, cqn); mlx5_cq_event()
77 spin_unlock(&table->lock); mlx5_cq_event()
95 struct mlx5_cq_table *table = &dev->priv.cq_table; mlx5_core_create_cq() local
115 spin_lock_irq(&table->lock); mlx5_core_create_cq()
116 err = radix_tree_insert(&table->tree, cq->cqn, cq); mlx5_core_create_cq()
117 spin_unlock_irq(&table->lock); mlx5_core_create_cq()
140 struct mlx5_cq_table *table = &dev->priv.cq_table; mlx5_core_destroy_cq() local
146 spin_lock_irq(&table->lock); mlx5_core_destroy_cq()
147 tmp = radix_tree_delete(&table->tree, cq->cqn); mlx5_core_destroy_cq()
148 spin_unlock_irq(&table->lock); mlx5_core_destroy_cq()
224 struct mlx5_cq_table *table = &dev->priv.cq_table; mlx5_init_cq_table() local
227 spin_lock_init(&table->lock); mlx5_init_cq_table()
228 INIT_RADIX_TREE(&table->tree, GFP_ATOMIC); mlx5_init_cq_table()
H A Dsrq.c43 struct mlx5_srq_table *table = &dev->priv.srq_table; mlx5_srq_event() local
46 spin_lock(&table->lock); mlx5_srq_event()
48 srq = radix_tree_lookup(&table->tree, srqn); mlx5_srq_event()
52 spin_unlock(&table->lock); mlx5_srq_event()
67 struct mlx5_srq_table *table = &dev->priv.srq_table; mlx5_core_get_srq() local
70 spin_lock(&table->lock); mlx5_core_get_srq()
72 srq = radix_tree_lookup(&table->tree, srqn); mlx5_core_get_srq()
76 spin_unlock(&table->lock); mlx5_core_get_srq()
86 struct mlx5_srq_table *table = &dev->priv.srq_table; mlx5_core_create_srq() local
105 spin_lock_irq(&table->lock); mlx5_core_create_srq()
106 err = radix_tree_insert(&table->tree, srq->srqn, srq); mlx5_core_create_srq()
107 spin_unlock_irq(&table->lock); mlx5_core_create_srq()
129 struct mlx5_srq_table *table = &dev->priv.srq_table; mlx5_core_destroy_srq() local
133 spin_lock_irq(&table->lock); mlx5_core_destroy_srq()
134 tmp = radix_tree_delete(&table->tree, srq->srqn); mlx5_core_destroy_srq()
135 spin_unlock_irq(&table->lock); mlx5_core_destroy_srq()
214 struct mlx5_srq_table *table = &dev->priv.srq_table; mlx5_init_srq_table() local
216 spin_lock_init(&table->lock); mlx5_init_srq_table()
217 INIT_RADIX_TREE(&table->tree, GFP_ATOMIC); mlx5_init_srq_table()
/linux-4.1.27/drivers/rapidio/switches/
H A Dtsi568.c38 u16 table, u16 route_destid, u8 route_port) tsi568_route_add_entry()
40 if (table == RIO_GLOBAL_TABLE) { tsi568_route_add_entry()
47 SPP_ROUTE_CFG_DESTID(table), tsi568_route_add_entry()
50 SPP_ROUTE_CFG_PORT(table), route_port); tsi568_route_add_entry()
60 u16 table, u16 route_destid, u8 *route_port) tsi568_route_get_entry()
65 if (table == RIO_GLOBAL_TABLE) { tsi568_route_get_entry()
72 SPP_ROUTE_CFG_DESTID(table), tsi568_route_get_entry()
75 SPP_ROUTE_CFG_PORT(table), &result); tsi568_route_get_entry()
87 u16 table) tsi568_route_clr_table()
94 if (table == RIO_GLOBAL_TABLE) { tsi568_route_clr_table()
103 SPP_ROUTE_CFG_DESTID(table), tsi568_route_clr_table()
107 SPP_ROUTE_CFG_PORT(table), tsi568_route_clr_table()
37 tsi568_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 route_port) tsi568_route_add_entry() argument
59 tsi568_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 *route_port) tsi568_route_get_entry() argument
86 tsi568_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table) tsi568_route_clr_table() argument
H A Didt_gen2.c92 u16 table, u16 route_destid, u8 route_port) idtg2_route_add_entry()
95 * Select routing table to update idtg2_route_add_entry()
97 if (table == RIO_GLOBAL_TABLE) idtg2_route_add_entry()
98 table = 0; idtg2_route_add_entry()
100 table++; idtg2_route_add_entry()
106 LOCAL_RTE_CONF_DESTID_SEL, table); idtg2_route_add_entry()
125 u16 table, u16 route_destid, u8 *route_port) idtg2_route_get_entry()
130 * Select routing table to read idtg2_route_get_entry()
132 if (table == RIO_GLOBAL_TABLE) idtg2_route_get_entry()
133 table = 0; idtg2_route_get_entry()
135 table++; idtg2_route_get_entry()
138 LOCAL_RTE_CONF_DESTID_SEL, table); idtg2_route_get_entry()
157 u16 table) idtg2_route_clr_table()
162 * Select routing table to read idtg2_route_clr_table()
164 if (table == RIO_GLOBAL_TABLE) idtg2_route_clr_table()
165 table = 0; idtg2_route_clr_table()
167 table++; idtg2_route_clr_table()
170 LOCAL_RTE_CONF_DESTID_SEL, table); idtg2_route_clr_table()
91 idtg2_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 route_port) idtg2_route_add_entry() argument
124 idtg2_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 *route_port) idtg2_route_get_entry() argument
156 idtg2_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table) idtg2_route_clr_table() argument
H A Dtsi57x.c47 u16 table, u16 route_destid, u8 route_port) tsi57x_route_add_entry()
49 if (table == RIO_GLOBAL_TABLE) { tsi57x_route_add_entry()
56 SPP_ROUTE_CFG_DESTID(table), route_destid); tsi57x_route_add_entry()
58 SPP_ROUTE_CFG_PORT(table), route_port); tsi57x_route_add_entry()
68 u16 table, u16 route_destid, u8 *route_port) tsi57x_route_get_entry()
73 if (table == RIO_GLOBAL_TABLE) { tsi57x_route_get_entry()
78 table = (result & RIO_SWP_INFO_PORT_NUM_MASK); tsi57x_route_get_entry()
82 SPP_ROUTE_CFG_DESTID(table), route_destid); tsi57x_route_get_entry()
84 SPP_ROUTE_CFG_PORT(table), &result); tsi57x_route_get_entry()
95 u16 table) tsi57x_route_clr_table()
102 if (table == RIO_GLOBAL_TABLE) { tsi57x_route_clr_table()
111 SPP_ROUTE_CFG_DESTID(table), 0x80000000); tsi57x_route_clr_table()
114 SPP_ROUTE_CFG_PORT(table) , RIO_INVALID_ROUTE); tsi57x_route_clr_table()
46 tsi57x_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 route_port) tsi57x_route_add_entry() argument
67 tsi57x_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 *route_port) tsi57x_route_get_entry() argument
94 tsi57x_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table) tsi57x_route_clr_table() argument
/linux-4.1.27/arch/unicore32/mm/
H A Dproc-macros.S99 mov \off, \va >> #22 @ off <- index of 1st page table
100 adr \tbl, 910f @ tbl <- table of 1st page table
101 900: @ ---- handle 1, 2 page table
102 add \pa, \pa, #PAGE_OFFSET @ pa <- virt addr of page table
107 add \tbl, \tbl, \off << #3 @ cmove table pointer
110 930: @ ---- handle 2nd page table
116 adr \tbl, 920f @ tbl <- table of 2nd pt
118 910: @ 1st level page table
119 .word 0xfffff000, 930b @ second level page table
120 .word 0xfffffc00, 930b @ second level large page table
124 920: @ 2nd level page table
/linux-4.1.27/include/uapi/linux/
H A Dfib_rules.h24 __u8 table; member in struct:fib_rule_hdr
49 FRA_TABLE, /* Extended table id */
59 FR_ACT_TO_TBL, /* Pass to fixed table */
H A Ddm-ioctl.h23 * 'active' table which is the one currently used by io passing
24 * through the device, and an 'inactive' one which is a table
38 * Create a new device, neither the 'active' or 'inactive' table
56 * unsuspended device. If a table is present in the 'inactive'
57 * slot, it will be moved to the active slot, then the old table
62 * Retrieves the status for the table in the 'active' slot.
67 * targets of the table in the 'active' slot, or a table change.
70 * Load a table into the 'inactive' slot for the device. The
74 * Destroy any table in the 'inactive' slot (ie. abort).
77 * Return a set of device dependencies for the 'active' table.
80 * Return the targets status for the 'active' table.
280 * Flag passed into ioctl STATUS command to get table information
286 * Flags that indicate whether a table is present in either of
287 * the two table slots that a device has.
316 * If set, any table information returned will relate to the inactive
317 * table instead of the live one. Always check DM_INACTIVE_PRESENT_FLAG
/linux-4.1.27/arch/powerpc/sysdev/
H A Ddcr-low.S16 #define DCR_ACCESS_PROLOG(table) \
19 lis r5,table@h; \
20 ori r5,r5,table@l; \
/linux-4.1.27/arch/sh/include/cpu-sh3/cpu/
H A Dmmu_context.h13 #define MMU_PTEH 0xFFFFFFF0 /* Page table entry register HIGH */
14 #define MMU_PTEL 0xFFFFFFF4 /* Page table entry register LOW */
15 #define MMU_TTB 0xFFFFFFF8 /* Translation table base register */
/linux-4.1.27/arch/cris/arch-v10/lib/
H A Dhw_settings.S2 * This table is used by some tools to extract hardware parameters.
3 * The table should be included in the kernel and the decompressor.
4 * Don't forget to update the tools if you change this table.
/linux-4.1.27/arch/metag/tbx/
H A Dtbistring.c10 * String table functions provided as part of the thread binary interface for
19 * There are not any functions to modify the string table currently, if these
46 /* Find global string table segment */ __TBIFindStr()
52 /* No string table! */ __TBIFindStr()
55 /* Start of string table */ __TBIFindStr()
65 /* Reached the end of the table */ __TBIFindStr()
/linux-4.1.27/net/openvswitch/
H A Dflow_table.h66 int ovs_flow_tbl_count(const struct flow_table *table);
67 void ovs_flow_tbl_destroy(struct flow_table *table);
70 int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
72 void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
73 int ovs_flow_tbl_num_masks(const struct flow_table *table);
74 struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *table,
H A Dflow_table.c114 int ovs_flow_tbl_count(const struct flow_table *table) ovs_flow_tbl_count() argument
116 return table->count; ovs_flow_tbl_count()
207 int ovs_flow_tbl_init(struct flow_table *table) ovs_flow_tbl_init() argument
220 rcu_assign_pointer(table->ti, ti); ovs_flow_tbl_init()
221 rcu_assign_pointer(table->ufid_ti, ufid_ti); ovs_flow_tbl_init()
222 INIT_LIST_HEAD(&table->mask_list); ovs_flow_tbl_init()
223 table->last_rehash = jiffies; ovs_flow_tbl_init()
224 table->count = 0; ovs_flow_tbl_init()
225 table->ufid_count = 0; ovs_flow_tbl_init()
281 void ovs_flow_tbl_destroy(struct flow_table *table) ovs_flow_tbl_destroy() argument
283 struct table_instance *ti = rcu_dereference_raw(table->ti); ovs_flow_tbl_destroy()
284 struct table_instance *ufid_ti = rcu_dereference_raw(table->ufid_ti); ovs_flow_tbl_destroy()
350 /* Insert in new table. */ flow_table_copy_flows()
572 int ovs_flow_tbl_num_masks(const struct flow_table *table) ovs_flow_tbl_num_masks() argument
577 list_for_each_entry(mask, &table->mask_list, list) ovs_flow_tbl_num_masks()
608 void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow) ovs_flow_tbl_remove() argument
610 struct table_instance *ti = ovsl_dereference(table->ti); ovs_flow_tbl_remove()
611 struct table_instance *ufid_ti = ovsl_dereference(table->ufid_ti); ovs_flow_tbl_remove()
613 BUG_ON(table->count == 0); ovs_flow_tbl_remove()
615 table->count--; ovs_flow_tbl_remove()
618 table->ufid_count--; ovs_flow_tbl_remove()
624 flow_mask_remove(table, flow->mask); ovs_flow_tbl_remove()
688 static void flow_key_insert(struct flow_table *table, struct sw_flow *flow) flow_key_insert() argument
694 ti = ovsl_dereference(table->ti); flow_key_insert()
696 table->count++; flow_key_insert()
698 /* Expand table, if necessary, to make room. */ flow_key_insert()
699 if (table->count > ti->n_buckets) flow_key_insert()
701 else if (time_after(jiffies, table->last_rehash + REHASH_INTERVAL)) flow_key_insert()
705 rcu_assign_pointer(table->ti, new_ti); flow_key_insert()
707 table->last_rehash = jiffies; flow_key_insert()
712 static void flow_ufid_insert(struct flow_table *table, struct sw_flow *flow) flow_ufid_insert() argument
717 ti = ovsl_dereference(table->ufid_ti); flow_ufid_insert()
719 table->ufid_count++; flow_ufid_insert()
721 /* Expand table, if necessary, to make room. */ flow_ufid_insert()
722 if (table->ufid_count > ti->n_buckets) { flow_ufid_insert()
727 rcu_assign_pointer(table->ufid_ti, new_ti); flow_ufid_insert()
734 int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow, ovs_flow_tbl_insert() argument
739 err = flow_mask_insert(table, flow, mask); ovs_flow_tbl_insert()
742 flow_key_insert(table, flow); ovs_flow_tbl_insert()
744 flow_ufid_insert(table, flow); ovs_flow_tbl_insert()
/linux-4.1.27/drivers/infiniband/hw/amso1100/
H A Dc2_pd.c49 obj = find_next_zero_bit(c2dev->pd_table.table, c2dev->pd_table.max, c2_pd_alloc()
52 obj = find_first_zero_bit(c2dev->pd_table.table, c2_pd_alloc()
56 __set_bit(obj, c2dev->pd_table.table); c2_pd_alloc()
69 __clear_bit(pd->pd_id, c2dev->pd_table.table); c2_pd_free()
79 c2dev->pd_table.table = kmalloc(BITS_TO_LONGS(c2dev->props.max_pd) * c2_init_pd_table()
81 if (!c2dev->pd_table.table) c2_init_pd_table()
83 bitmap_zero(c2dev->pd_table.table, c2dev->props.max_pd); c2_init_pd_table()
89 kfree(c2dev->pd_table.table); c2_cleanup_pd_table()
/linux-4.1.27/arch/x86/include/asm/
H A Dpgtable-3level_types.h28 * PGDIR_SHIFT determines what a top-level page table entry can map
35 * page table can map
H A Dpgtable_32.h7 * The Linux memory management assumes a three-level page table setup. On
9 * table, so that we physically have the same two-level page table as the
13 * the i386 page table tree.
H A Dinit.h5 void *(*alloc_pgt_page)(void *); /* allocate buf for page table */
H A Dagp.h28 #define free_gatt_pages(table, order) \
29 free_pages((unsigned long)(table), (order))
/linux-4.1.27/security/selinux/include/
H A Dnetif.h2 * Network interface table.
5 * maintain a table associating each interface with a SID.
/linux-4.1.27/security/selinux/
H A Dnetnode.c2 * Network node table
61 /* NOTE: we are using a combined hash table for both IPv4 and IPv6, the reason
63 * address families at the same time so one table will usually end up wasted,
64 * if this becomes a problem we can always add a hash table for each address
72 * sel_netnode_hashfn_ipv4 - IPv4 hashing function for the node table
76 * This is the IPv4 hashing function for the node interface table, it returns
88 * sel_netnode_hashfn_ipv6 - IPv6 hashing function for the node table
92 * This is the IPv6 hashing function for the node interface table, it returns
110 * Search the network node table and return the record matching @addr. If an
111 * entry can not be found in the table return NULL.
149 * sel_netnode_insert - Insert a new node into the table
153 * Add a new node record to the network address hash table.
172 /* we need to impose a limit on the growth of the hash table so check sel_netnode_insert()
195 * security policy. The result is added to the network address table to
257 * method possible. First the address table is queried, but if an entry
259 * table to speedup future queries. Returns zero on success, negative values
280 * sel_netnode_flush - Flush the entire network address table
283 * Remove all entries from the network address table.
H A Dnetif.c2 * Network interface table.
5 * maintain a table associating each interface with a SID.
47 * sel_netif_hashfn - Hashing function for the interface table
52 * This is the hashing function for the network interface table, it returns the
67 * Search the network interface table and return the record matching @ifindex.
68 * If an entry can not be found in the table return NULL.
86 * sel_netif_insert - Insert a new interface into the table
90 * Add a new interface record to the network interface hash table. Returns
109 * sel_netif_destroy - Remove an interface record from the table
113 * Remove an existing interface record from the network interface table.
131 * security policy. The result is added to the network interface table to
197 * method possible. First the interface table is queried, but if an entry
199 * table to speedup future queries. Returns zero on success, negative values
220 * sel_netif_kill - Remove an entry from the network interface table
226 * table if it exists.
243 * sel_netif_flush - Flush the entire network interface table
246 * Remove all entries from the network interface table.
H A Dnetport.c2 * Network port table
60 /* NOTE: we are using a combined hash table for both IPv4 and IPv6, the reason
62 * address families at the same time so one table will usually end up wasted,
63 * if this becomes a problem we can always add a hash table for each address
71 * sel_netport_hashfn - Hashing function for the port table
75 * This is the hashing function for the port table, it returns the bucket
90 * Search the network port table and return the matching record. If an entry
91 * can not be found in the table return NULL.
108 * sel_netport_insert - Insert a new port into the table
112 * Add a new port record to the network address hash table.
119 /* we need to impose a limit on the growth of the hash table so check sel_netport_insert()
144 * policy. The result is added to the network port table to speedup future
192 * possible. First the port table is queried, but if an entry can't be found
193 * then the policy is queried and the result is added to the table to speedup
214 * sel_netport_flush - Flush the entire network port table
217 * Remove all entries from the network address table.
/linux-4.1.27/drivers/net/ethernet/sfc/
H A Dfarch.c166 * efx_alloc_special_buffer()) in the buffer table, allowing
194 /* Unmaps a buffer and clears the buffer table entries */
220 * new buffer ID range. It does not write into the buffer table.
1346 /* Allocate buffer table entries for event queue */ efx_farch_ev_probe()
1641 /* Setup RSS indirection table.
1680 /* Account for the buffer table entries backing the datapath channels efx_farch_dimension_resources()
1829 * table is full.
1873 u32 offset; /* address of table relative to BAR */
1883 struct efx_farch_filter_table table[EFX_FARCH_FILTER_TABLE_COUNT]; member in struct:efx_farch_filter_state
1888 struct efx_farch_filter_table *table,
1937 struct efx_farch_filter_table *table; efx_farch_filter_push_rx_config() local
1942 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_IP]; efx_farch_filter_push_rx_config()
1944 table->search_limit[EFX_FARCH_FILTER_TCP_FULL] + efx_farch_filter_push_rx_config()
1947 table->search_limit[EFX_FARCH_FILTER_TCP_WILD] + efx_farch_filter_push_rx_config()
1950 table->search_limit[EFX_FARCH_FILTER_UDP_FULL] + efx_farch_filter_push_rx_config()
1953 table->search_limit[EFX_FARCH_FILTER_UDP_WILD] + efx_farch_filter_push_rx_config()
1956 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_MAC]; efx_farch_filter_push_rx_config()
1957 if (table->size) { efx_farch_filter_push_rx_config()
1960 table->search_limit[EFX_FARCH_FILTER_MAC_FULL] + efx_farch_filter_push_rx_config()
1964 table->search_limit[EFX_FARCH_FILTER_MAC_WILD] + efx_farch_filter_push_rx_config()
1968 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_DEF]; efx_farch_filter_push_rx_config()
1969 if (table->size) { efx_farch_filter_push_rx_config()
1972 table->spec[EFX_FARCH_FILTER_INDEX_UC_DEF].dmaq_id); efx_farch_filter_push_rx_config()
1975 !!(table->spec[EFX_FARCH_FILTER_INDEX_UC_DEF].flags & efx_farch_filter_push_rx_config()
1979 table->spec[EFX_FARCH_FILTER_INDEX_MC_DEF].dmaq_id); efx_farch_filter_push_rx_config()
1982 !!(table->spec[EFX_FARCH_FILTER_INDEX_MC_DEF].flags & efx_farch_filter_push_rx_config()
1991 !!(table->spec[EFX_FARCH_FILTER_INDEX_UC_DEF].flags & efx_farch_filter_push_rx_config()
1992 table->spec[EFX_FARCH_FILTER_INDEX_MC_DEF].flags & efx_farch_filter_push_rx_config()
1997 * RSS table. But we still need to set the RX scatter efx_farch_filter_push_rx_config()
2011 struct efx_farch_filter_table *table; efx_farch_filter_push_tx_limits() local
2016 table = &state->table[EFX_FARCH_FILTER_TABLE_TX_MAC]; efx_farch_filter_push_tx_limits()
2017 if (table->size) { efx_farch_filter_push_tx_limits()
2020 table->search_limit[EFX_FARCH_FILTER_MAC_FULL] + efx_farch_filter_push_tx_limits()
2024 table->search_limit[EFX_FARCH_FILTER_MAC_WILD] + efx_farch_filter_push_tx_limits()
2379 if (state->table[table_id].size != 0) efx_farch_filter_get_rx_id_limit()
2381 state->table[table_id].size; efx_farch_filter_get_rx_id_limit()
2392 struct efx_farch_filter_table *table; efx_farch_filter_insert() local
2403 table = &state->table[efx_farch_filter_spec_table_id(&spec)]; efx_farch_filter_insert()
2404 if (table->size == 0) efx_farch_filter_insert()
2409 table->search_limit[spec.type]); efx_farch_filter_insert()
2411 if (table->id == EFX_FARCH_FILTER_TABLE_RX_DEF) { efx_farch_filter_insert()
2439 unsigned int max_rep_depth = table->search_limit[spec.type]; efx_farch_filter_insert()
2444 unsigned int i = hash & (table->size - 1); efx_farch_filter_insert()
2452 if (!test_bit(i, table->used_bitmap)) { efx_farch_filter_insert()
2456 &table->spec[i])) { efx_farch_filter_insert()
2475 i = (i + incr) & (table->size - 1); efx_farch_filter_insert()
2485 &table->spec[rep_index]; efx_farch_filter_insert()
2502 __set_bit(ins_index, table->used_bitmap); efx_farch_filter_insert()
2503 ++table->used; efx_farch_filter_insert()
2505 table->spec[ins_index] = spec; efx_farch_filter_insert()
2507 if (table->id == EFX_FARCH_FILTER_TABLE_RX_DEF) { efx_farch_filter_insert()
2510 if (table->search_limit[spec.type] < depth) { efx_farch_filter_insert()
2511 table->search_limit[spec.type] = depth; efx_farch_filter_insert()
2519 table->offset + table->step * ins_index); efx_farch_filter_insert()
2525 efx_farch_filter_table_clear_entry(efx, table, efx_farch_filter_insert()
2541 struct efx_farch_filter_table *table, efx_farch_filter_table_clear_entry()
2546 EFX_WARN_ON_PARANOID(!test_bit(filter_idx, table->used_bitmap)); efx_farch_filter_table_clear_entry()
2547 BUG_ON(table->offset == 0); /* can't clear MAC default filters */ efx_farch_filter_table_clear_entry()
2549 __clear_bit(filter_idx, table->used_bitmap); efx_farch_filter_table_clear_entry()
2550 --table->used; efx_farch_filter_table_clear_entry()
2551 memset(&table->spec[filter_idx], 0, sizeof(table->spec[0])); efx_farch_filter_table_clear_entry()
2553 efx_writeo(efx, &filter, table->offset + table->step * filter_idx); efx_farch_filter_table_clear_entry()
2558 * unless the table has become completely empty - in efx_farch_filter_table_clear_entry()
2561 if (unlikely(table->used == 0)) { efx_farch_filter_table_clear_entry()
2562 memset(table->search_limit, 0, sizeof(table->search_limit)); efx_farch_filter_table_clear_entry()
2563 if (table->id == EFX_FARCH_FILTER_TABLE_TX_MAC) efx_farch_filter_table_clear_entry()
2571 struct efx_farch_filter_table *table, efx_farch_filter_remove()
2575 struct efx_farch_filter_spec *spec = &table->spec[filter_idx]; efx_farch_filter_remove()
2577 if (!test_bit(filter_idx, table->used_bitmap) || efx_farch_filter_remove()
2585 efx_farch_filter_table_clear_entry(efx, table, filter_idx); efx_farch_filter_remove()
2597 struct efx_farch_filter_table *table; efx_farch_filter_remove_safe() local
2605 table = &state->table[table_id]; efx_farch_filter_remove_safe()
2608 if (filter_idx >= table->size) efx_farch_filter_remove_safe()
2610 spec = &table->spec[filter_idx]; efx_farch_filter_remove_safe()
2613 rc = efx_farch_filter_remove(efx, table, filter_idx, priority); efx_farch_filter_remove_safe()
2625 struct efx_farch_filter_table *table; efx_farch_filter_get_safe() local
2633 table = &state->table[table_id]; efx_farch_filter_get_safe()
2636 if (filter_idx >= table->size) efx_farch_filter_get_safe()
2638 spec = &table->spec[filter_idx]; efx_farch_filter_get_safe()
2642 if (test_bit(filter_idx, table->used_bitmap) && efx_farch_filter_get_safe()
2661 struct efx_farch_filter_table *table = &state->table[table_id]; efx_farch_filter_table_clear() local
2665 for (filter_idx = 0; filter_idx < table->size; ++filter_idx) { efx_farch_filter_table_clear()
2666 if (table->spec[filter_idx].priority != EFX_FILTER_PRI_AUTO) efx_farch_filter_table_clear()
2667 efx_farch_filter_remove(efx, table, efx_farch_filter_table_clear()
2690 struct efx_farch_filter_table *table; efx_farch_filter_count_rx_used() local
2699 table = &state->table[table_id]; efx_farch_filter_count_rx_used()
2700 for (filter_idx = 0; filter_idx < table->size; filter_idx++) { efx_farch_filter_count_rx_used()
2701 if (test_bit(filter_idx, table->used_bitmap) && efx_farch_filter_count_rx_used()
2702 table->spec[filter_idx].priority == priority) efx_farch_filter_count_rx_used()
2718 struct efx_farch_filter_table *table; efx_farch_filter_get_rx_ids() local
2727 table = &state->table[table_id]; efx_farch_filter_get_rx_ids()
2728 for (filter_idx = 0; filter_idx < table->size; filter_idx++) { efx_farch_filter_get_rx_ids()
2729 if (test_bit(filter_idx, table->used_bitmap) && efx_farch_filter_get_rx_ids()
2730 table->spec[filter_idx].priority == priority) { efx_farch_filter_get_rx_ids()
2736 &table->spec[filter_idx], filter_idx); efx_farch_filter_get_rx_ids()
2751 struct efx_farch_filter_table *table; efx_farch_filter_table_restore() local
2758 table = &state->table[table_id]; efx_farch_filter_table_restore()
2760 /* Check whether this is a regular register table */ efx_farch_filter_table_restore()
2761 if (table->step == 0) efx_farch_filter_table_restore()
2764 for (filter_idx = 0; filter_idx < table->size; filter_idx++) { efx_farch_filter_table_restore()
2765 if (!test_bit(filter_idx, table->used_bitmap)) efx_farch_filter_table_restore()
2767 efx_farch_filter_build(&filter, &table->spec[filter_idx]); efx_farch_filter_table_restore()
2769 table->offset + table->step * filter_idx); efx_farch_filter_table_restore()
2785 kfree(state->table[table_id].used_bitmap); efx_farch_filter_table_remove()
2786 vfree(state->table[table_id].spec); efx_farch_filter_table_remove()
2794 struct efx_farch_filter_table *table; efx_farch_filter_table_probe() local
2803 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_IP]; efx_farch_filter_table_probe()
2804 table->id = EFX_FARCH_FILTER_TABLE_RX_IP; efx_farch_filter_table_probe()
2805 table->offset = FR_BZ_RX_FILTER_TBL0; efx_farch_filter_table_probe()
2806 table->size = FR_BZ_RX_FILTER_TBL0_ROWS; efx_farch_filter_table_probe()
2807 table->step = FR_BZ_RX_FILTER_TBL0_STEP; efx_farch_filter_table_probe()
2811 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_MAC]; efx_farch_filter_table_probe()
2812 table->id = EFX_FARCH_FILTER_TABLE_RX_MAC; efx_farch_filter_table_probe()
2813 table->offset = FR_CZ_RX_MAC_FILTER_TBL0; efx_farch_filter_table_probe()
2814 table->size = FR_CZ_RX_MAC_FILTER_TBL0_ROWS; efx_farch_filter_table_probe()
2815 table->step = FR_CZ_RX_MAC_FILTER_TBL0_STEP; efx_farch_filter_table_probe()
2817 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_DEF]; efx_farch_filter_table_probe()
2818 table->id = EFX_FARCH_FILTER_TABLE_RX_DEF; efx_farch_filter_table_probe()
2819 table->size = EFX_FARCH_FILTER_SIZE_RX_DEF; efx_farch_filter_table_probe()
2821 table = &state->table[EFX_FARCH_FILTER_TABLE_TX_MAC]; efx_farch_filter_table_probe()
2822 table->id = EFX_FARCH_FILTER_TABLE_TX_MAC; efx_farch_filter_table_probe()
2823 table->offset = FR_CZ_TX_MAC_FILTER_TBL0; efx_farch_filter_table_probe()
2824 table->size = FR_CZ_TX_MAC_FILTER_TBL0_ROWS; efx_farch_filter_table_probe()
2825 table->step = FR_CZ_TX_MAC_FILTER_TBL0_STEP; efx_farch_filter_table_probe()
2829 table = &state->table[table_id]; efx_farch_filter_table_probe()
2830 if (table->size == 0) efx_farch_filter_table_probe()
2832 table->used_bitmap = kcalloc(BITS_TO_LONGS(table->size), efx_farch_filter_table_probe()
2835 if (!table->used_bitmap) efx_farch_filter_table_probe()
2837 table->spec = vzalloc(table->size * sizeof(*table->spec)); efx_farch_filter_table_probe()
2838 if (!table->spec) efx_farch_filter_table_probe()
2842 table = &state->table[EFX_FARCH_FILTER_TABLE_RX_DEF]; efx_farch_filter_table_probe()
2843 if (table->size) { efx_farch_filter_table_probe()
2849 spec = &table->spec[i]; efx_farch_filter_table_probe()
2852 __set_bit(i, table->used_bitmap); efx_farch_filter_table_probe()
2870 struct efx_farch_filter_table *table; efx_farch_filter_update_rx_scatter() local
2879 table = &state->table[table_id]; efx_farch_filter_update_rx_scatter()
2881 for (filter_idx = 0; filter_idx < table->size; filter_idx++) { efx_farch_filter_update_rx_scatter()
2882 if (!test_bit(filter_idx, table->used_bitmap) || efx_farch_filter_update_rx_scatter()
2883 table->spec[filter_idx].dmaq_id >= efx_farch_filter_update_rx_scatter()
2888 table->spec[filter_idx].flags |= efx_farch_filter_update_rx_scatter()
2891 table->spec[filter_idx].flags &= efx_farch_filter_update_rx_scatter()
2898 efx_farch_filter_build(&filter, &table->spec[filter_idx]); efx_farch_filter_update_rx_scatter()
2900 table->offset + table->step * filter_idx); efx_farch_filter_update_rx_scatter()
2921 struct efx_farch_filter_table *table = efx_farch_filter_rfs_expire_one() local
2922 &state->table[EFX_FARCH_FILTER_TABLE_RX_IP]; efx_farch_filter_rfs_expire_one()
2924 if (test_bit(index, table->used_bitmap) && efx_farch_filter_rfs_expire_one()
2925 table->spec[index].priority == EFX_FILTER_PRI_HINT && efx_farch_filter_rfs_expire_one()
2926 rps_may_expire_flow(efx->net_dev, table->spec[index].dmaq_id, efx_farch_filter_rfs_expire_one()
2928 efx_farch_filter_table_clear_entry(efx, table, index); efx_farch_filter_rfs_expire_one()
2952 /* Build multicast hash table */ efx_farch_filter_sync_rx_mode()
2540 efx_farch_filter_table_clear_entry(struct efx_nic *efx, struct efx_farch_filter_table *table, unsigned int filter_idx) efx_farch_filter_table_clear_entry() argument
2570 efx_farch_filter_remove(struct efx_nic *efx, struct efx_farch_filter_table *table, unsigned int filter_idx, enum efx_filter_priority priority) efx_farch_filter_remove() argument
H A Def10.c34 /* The filter table(s) are managed by firmware and we have write-only
40 * table, which should be at least as large as the hardware hash
41 * table.
43 * Huntington has a single 8K filter table shared between all filter
77 /* An arbitrary search limit for the software hash table */
1676 /* INIT_EVQ expects index in vector table, not absolute */ efx_ef10_ev_init()
2212 efx_ef10_filter_entry_spec(const struct efx_ef10_filter_table *table, efx_ef10_filter_entry_spec() argument
2215 return (struct efx_filter_spec *)(table->entry[filter_idx].spec & efx_ef10_filter_entry_spec()
2220 efx_ef10_filter_entry_flags(const struct efx_ef10_filter_table *table, efx_ef10_filter_entry_flags() argument
2223 return table->entry[filter_idx].spec & EFX_EF10_FILTER_FLAGS; efx_ef10_filter_entry_flags()
2227 efx_ef10_filter_set_entry(struct efx_ef10_filter_table *table, efx_ef10_filter_set_entry() argument
2232 table->entry[filter_idx].spec = (unsigned long)spec | flags; efx_ef10_filter_set_entry()
2330 static int efx_ef10_filter_rx_match_pri(struct efx_ef10_filter_table *table, efx_ef10_filter_rx_match_pri() argument
2336 match_pri < table->rx_match_count; efx_ef10_filter_rx_match_pri()
2338 if (table->rx_match_flags[match_pri] == match_flags) efx_ef10_filter_rx_match_pri()
2348 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_insert() local
2364 rc = efx_ef10_filter_rx_match_pri(table, spec->match_flags); efx_ef10_filter_insert()
2386 saved_spec = efx_ef10_filter_entry_spec(table, i); efx_ef10_filter_insert()
2392 if (table->entry[i].spec & efx_ef10_filter_insert()
2437 prepare_to_wait(&table->waitq, &wait, TASK_UNINTERRUPTIBLE); efx_ef10_filter_insert()
2443 /* Create a software table entry if necessary, and mark it efx_ef10_filter_insert()
2448 saved_spec = efx_ef10_filter_entry_spec(table, ins_index); efx_ef10_filter_insert()
2455 table->entry[ins_index].spec &= efx_ef10_filter_insert()
2461 priv_flags = efx_ef10_filter_entry_flags(table, ins_index); efx_ef10_filter_insert()
2471 efx_ef10_filter_set_entry(table, ins_index, saved_spec, efx_ef10_filter_insert()
2481 table->entry[i].spec |= efx_ef10_filter_insert()
2488 rc = efx_ef10_filter_push(efx, spec, &table->entry[ins_index].handle, efx_ef10_filter_insert()
2491 /* Finalise the software table entry */ efx_ef10_filter_insert()
2509 efx_ef10_filter_set_entry(table, ins_index, saved_spec, priv_flags); efx_ef10_filter_insert()
2525 saved_spec = efx_ef10_filter_entry_spec(table, i); efx_ef10_filter_insert()
2526 priv_flags = efx_ef10_filter_entry_flags(table, i); efx_ef10_filter_insert()
2533 table->entry[i].handle); efx_ef10_filter_insert()
2547 efx_ef10_filter_set_entry(table, i, saved_spec, efx_ef10_filter_insert()
2556 wake_up_all(&table->waitq); efx_ef10_filter_insert()
2559 finish_wait(&table->waitq, &wait); efx_ef10_filter_insert()
2578 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_remove_internal() local
2586 /* Find the software table entry and mark it busy. Don't efx_ef10_filter_remove_internal()
2592 if (!(table->entry[filter_idx].spec & efx_ef10_filter_remove_internal()
2595 prepare_to_wait(&table->waitq, &wait, TASK_UNINTERRUPTIBLE); efx_ef10_filter_remove_internal()
2600 spec = efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_remove_internal()
2603 efx_ef10_filter_rx_match_pri(table, spec->match_flags) != efx_ef10_filter_remove_internal()
2613 table->entry[filter_idx].spec &= ~EFX_EF10_FILTER_FLAG_AUTO_OLD; efx_ef10_filter_remove_internal()
2623 table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_BUSY; efx_ef10_filter_remove_internal()
2637 &table->entry[filter_idx].handle, efx_ef10_filter_remove_internal()
2651 table->entry[filter_idx].handle); efx_ef10_filter_remove_internal()
2658 efx_ef10_filter_set_entry(table, filter_idx, NULL, 0); efx_ef10_filter_remove_internal()
2662 table->entry[filter_idx].spec &= ~EFX_EF10_FILTER_FLAG_BUSY; efx_ef10_filter_remove_internal()
2663 wake_up_all(&table->waitq); efx_ef10_filter_remove_internal()
2666 finish_wait(&table->waitq, &wait); efx_ef10_filter_remove_internal()
2683 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_get_safe() local
2688 saved_spec = efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_get_safe()
2690 efx_ef10_filter_rx_match_pri(table, saved_spec->match_flags) == efx_ef10_filter_get_safe()
2724 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_count_rx_used() local
2730 if (table->entry[filter_idx].spec && efx_ef10_filter_count_rx_used()
2731 efx_ef10_filter_entry_spec(table, filter_idx)->priority == efx_ef10_filter_count_rx_used()
2741 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_get_rx_id_limit() local
2743 return table->rx_match_count * HUNT_FILTER_TBL_ROWS; efx_ef10_filter_get_rx_id_limit()
2750 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_get_rx_ids() local
2757 spec = efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_get_rx_ids()
2764 table, spec->match_flags) * efx_ef10_filter_get_rx_ids()
2780 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_rfs_insert() local
2809 saved_spec = efx_ef10_filter_entry_spec(table, i); efx_ef10_filter_rfs_insert()
2815 if (table->entry[i].spec & EFX_EF10_FILTER_FLAG_BUSY) { efx_ef10_filter_rfs_insert()
2842 /* Create a software table entry if necessary, and mark it efx_ef10_filter_rfs_insert()
2847 saved_spec = efx_ef10_filter_entry_spec(table, ins_index); efx_ef10_filter_rfs_insert()
2858 efx_ef10_filter_set_entry(table, ins_index, saved_spec, efx_ef10_filter_rfs_insert()
2867 table->entry[ins_index].handle, replacing); efx_ef10_filter_rfs_insert()
2884 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_rfs_insert_complete() local
2895 spec = efx_ef10_filter_entry_spec(table, ins_index); efx_ef10_filter_rfs_insert_complete()
2897 table->entry[ins_index].handle = efx_ef10_filter_rfs_insert_complete()
2905 efx_ef10_filter_set_entry(table, ins_index, spec, 0); efx_ef10_filter_rfs_insert_complete()
2908 wake_up_all(&table->waitq); efx_ef10_filter_rfs_insert_complete()
2920 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_rfs_expire_one() local
2922 efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_rfs_expire_one()
2928 (table->entry[filter_idx].spec & EFX_EF10_FILTER_FLAG_BUSY) || efx_ef10_filter_rfs_expire_one()
2937 table->entry[filter_idx].handle); efx_ef10_filter_rfs_expire_one()
2942 table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_BUSY; efx_ef10_filter_rfs_expire_one()
2952 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_rfs_expire_complete() local
2954 efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_rfs_expire_complete()
2959 efx_ef10_filter_set_entry(table, filter_idx, NULL, 0); efx_ef10_filter_rfs_expire_complete()
2961 table->entry[filter_idx].spec &= ~EFX_EF10_FILTER_FLAG_BUSY; efx_ef10_filter_rfs_expire_complete()
2962 wake_up_all(&table->waitq); efx_ef10_filter_rfs_expire_complete()
3005 struct efx_ef10_filter_table *table; efx_ef10_filter_table_probe() local
3009 table = kzalloc(sizeof(*table), GFP_KERNEL); efx_ef10_filter_table_probe()
3010 if (!table) efx_ef10_filter_table_probe()
3023 table->rx_match_count = 0; efx_ef10_filter_table_probe()
3040 rc, table->rx_match_count); efx_ef10_filter_table_probe()
3041 table->rx_match_flags[table->rx_match_count++] = rc; efx_ef10_filter_table_probe()
3045 table->entry = vzalloc(HUNT_FILTER_TBL_ROWS * sizeof(*table->entry)); efx_ef10_filter_table_probe()
3046 if (!table->entry) { efx_ef10_filter_table_probe()
3051 efx->filter_state = table; efx_ef10_filter_table_probe()
3052 init_waitqueue_head(&table->waitq); efx_ef10_filter_table_probe()
3056 kfree(table); efx_ef10_filter_table_probe()
3062 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_table_restore() local
3075 spec = efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_table_restore()
3079 table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_BUSY; efx_ef10_filter_table_restore()
3083 &table->entry[filter_idx].handle, efx_ef10_filter_table_restore()
3091 efx_ef10_filter_set_entry(table, filter_idx, NULL, 0); efx_ef10_filter_table_restore()
3093 table->entry[filter_idx].spec &= efx_ef10_filter_table_restore()
3109 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_table_remove() local
3116 spec = efx_ef10_filter_entry_spec(table, filter_idx); efx_ef10_filter_table_remove()
3125 table->entry[filter_idx].handle); efx_ef10_filter_table_remove()
3132 table->entry[filter_idx].handle); efx_ef10_filter_table_remove()
3136 vfree(table->entry); efx_ef10_filter_table_remove()
3137 kfree(table); efx_ef10_filter_table_remove()
3142 struct efx_ef10_filter_table *table = efx->filter_state; efx_ef10_filter_sync_rx_mode() local
3156 n = table->dev_uc_count < 0 ? 1 : table->dev_uc_count; efx_ef10_filter_sync_rx_mode()
3158 filter_idx = table->dev_uc_list[i].id % HUNT_FILTER_TBL_ROWS; efx_ef10_filter_sync_rx_mode()
3159 table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_AUTO_OLD; efx_ef10_filter_sync_rx_mode()
3161 n = table->dev_mc_count < 0 ? 1 : table->dev_mc_count; efx_ef10_filter_sync_rx_mode()
3163 filter_idx = table->dev_mc_list[i].id % HUNT_FILTER_TBL_ROWS; efx_ef10_filter_sync_rx_mode()
3164 table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_AUTO_OLD; efx_ef10_filter_sync_rx_mode()
3174 table->dev_uc_count = -1; efx_ef10_filter_sync_rx_mode()
3176 table->dev_uc_count = 1 + netdev_uc_count(net_dev); efx_ef10_filter_sync_rx_mode()
3177 ether_addr_copy(table->dev_uc_list[0].addr, net_dev->dev_addr); efx_ef10_filter_sync_rx_mode()
3180 ether_addr_copy(table->dev_uc_list[i].addr, uc->addr); netdev_for_each_uc_addr()
3186 table->dev_mc_count = -1;
3188 table->dev_mc_count = 1 + netdev_mc_count(net_dev);
3189 eth_broadcast_addr(table->dev_mc_list[0].addr);
3192 ether_addr_copy(table->dev_mc_list[i].addr, mc->addr); netdev_for_each_mc_addr()
3199 if (table->dev_uc_count >= 0) {
3200 for (i = 0; i < table->dev_uc_count; i++) {
3205 table->dev_uc_list[i].addr);
3212 table->dev_uc_list[i].id);
3213 table->dev_uc_count = -1;
3216 table->dev_uc_list[i].id = rc;
3219 if (table->dev_uc_count < 0) {
3227 table->dev_uc_count = 0;
3229 table->dev_uc_list[0].id = rc;
3234 if (table->dev_mc_count >= 0) {
3235 for (i = 0; i < table->dev_mc_count; i++) {
3240 table->dev_mc_list[i].addr);
3247 table->dev_mc_list[i].id);
3248 table->dev_mc_count = -1;
3251 table->dev_mc_list[i].id = rc;
3254 if (table->dev_mc_count < 0) {
3262 table->dev_mc_count = 0;
3264 table->dev_mc_list[0].id = rc;
3274 if (ACCESS_ONCE(table->entry[i].spec) &
/linux-4.1.27/arch/mips/lasat/
H A Dsysctl.c42 int proc_dolasatstring(struct ctl_table *table, int write, proc_dolasatstring() argument
47 r = proc_dostring(table, write, buffer, lenp, ppos); proc_dolasatstring()
60 int proc_dolasatrtc(struct ctl_table *table, int write, proc_dolasatrtc() argument
73 r = proc_dointvec(table, write, buffer, lenp, ppos); proc_dolasatrtc()
85 int proc_lasat_ip(struct ctl_table *table, int write, proc_lasat_ip() argument
93 if (!table->data || !table->maxlen || !*lenp || proc_lasat_ip()
117 *(unsigned int *)(table->data) = ip; proc_lasat_ip()
120 ip = *(unsigned int *)(table->data); proc_lasat_ip()
145 int proc_lasat_prid(struct ctl_table *table, int write, proc_lasat_prid() argument
150 r = proc_dointvec(table, write, buffer, lenp, ppos); proc_lasat_prid()
/linux-4.1.27/drivers/regulator/
H A Dtps65023-regulator.c131 const unsigned int *table; member in struct:tps_info
244 tps->desc[i].volt_table = info->table; tps_65023_probe()
303 .table = DCDC_FIXED_3300000_VSEL_table,
308 .table = DCDC_FIXED_1800000_VSEL_table,
313 .table = VCORE_VSEL_table,
318 .table = TPS65020_LDO_VSEL_table,
323 .table = TPS65020_LDO_VSEL_table,
331 .table = DCDC_FIXED_3300000_VSEL_table,
336 .table = DCDC_FIXED_1800000_VSEL_table,
341 .table = VCORE_VSEL_table,
346 .table = TPS65023_LDO1_VSEL_table,
351 .table = TPS65023_LDO2_VSEL_table,
359 .table = VCORE_VSEL_table,
364 .table = DCDC_FIXED_3300000_VSEL_table,
369 .table = DCDC_FIXED_1800000_VSEL_table,
374 .table = TPS65023_LDO1_VSEL_table,
379 .table = TPS65023_LDO2_VSEL_table,
/linux-4.1.27/arch/frv/kernel/
H A Dentry-table.S1 /* entry-table.S: main trap vector tables and exception jump table
23 # (1) The trap table for debug mode
24 # (2) The trap table for kernel mode
25 # (3) The trap table for user mode
27 # The CPU jumps to an appropriate slot in the appropriate table to perform
33 # (4) The exception handler vector table
37 # table, as indexed by the exception ID from the TBR.
39 # (5) The fixup table for kernel-trap single-step
40 # (6) The fixup table for user-trap single-step
45 # routine pointed to by this table.
53 # trap table for entry from debug mode
59 # trap table for entry from user mode
65 # trap table for entry from kernel mode
71 # exception handler jump table
77 # trap fixup table for single-stepping in user mode
83 # trap fixup table for single-stepping in user mode
/linux-4.1.27/drivers/sh/clk/
H A Dcpg.c110 * Div/mult table lookup helpers
132 struct clk_div_mult_table *table = clk_to_div_mult_table(clk); sh_clk_div_recalc() local
135 clk_rate_table_build(clk, clk->freq_table, table->nr_divisors, sh_clk_div_recalc()
136 table, clk->arch_flags ? &clk->arch_flags : NULL); sh_clk_div_recalc()
228 pr_err("sh_clk_init_parent: parent table size failed\n"); sh_clk_init_parent()
242 struct clk_div_table *table, struct sh_clk_ops *ops) sh_clk_div_register_ops()
246 int nr_divs = table->div_mult_table->nr_divisors; sh_clk_div_register_ops()
262 clkp->priv = table; sh_clk_div_register_ops()
296 struct clk_div_mult_table *table = clk_to_div_mult_table(clk); sh_clk_div6_set_parent() local
320 /* Rebuild the frequency table */ sh_clk_div6_set_parent()
321 clk_rate_table_build(clk, clk->freq_table, table->nr_divisors, sh_clk_div6_set_parent()
322 table, NULL); sh_clk_div6_set_parent()
353 struct clk_div_mult_table *table = clk_to_div_mult_table(clk); sh_clk_div4_set_parent() local
373 /* Rebiuld the frequency table */ sh_clk_div4_set_parent()
374 clk_rate_table_build(clk, clk->freq_table, table->nr_divisors, sh_clk_div4_set_parent()
375 table, &clk->arch_flags); sh_clk_div4_set_parent()
390 struct clk_div4_table *table) sh_clk_div4_register()
392 return sh_clk_div_register_ops(clks, nr, table, &sh_clk_div_clk_ops); sh_clk_div4_register()
396 struct clk_div4_table *table) sh_clk_div4_enable_register()
398 return sh_clk_div_register_ops(clks, nr, table, sh_clk_div4_enable_register()
403 struct clk_div4_table *table) sh_clk_div4_reparent_register()
405 return sh_clk_div_register_ops(clks, nr, table, sh_clk_div4_reparent_register()
241 sh_clk_div_register_ops(struct clk *clks, int nr, struct clk_div_table *table, struct sh_clk_ops *ops) sh_clk_div_register_ops() argument
389 sh_clk_div4_register(struct clk *clks, int nr, struct clk_div4_table *table) sh_clk_div4_register() argument
395 sh_clk_div4_enable_register(struct clk *clks, int nr, struct clk_div4_table *table) sh_clk_div4_enable_register() argument
402 sh_clk_div4_reparent_register(struct clk *clks, int nr, struct clk_div4_table *table) sh_clk_div4_reparent_register() argument
/linux-4.1.27/arch/s390/pci/
H A Dpci_dma.c29 unsigned long *table, *entry; dma_alloc_cpu_table() local
31 table = kmem_cache_alloc(dma_region_table_cache, GFP_ATOMIC); dma_alloc_cpu_table()
32 if (!table) dma_alloc_cpu_table()
35 for (entry = table; entry < table + ZPCI_TABLE_ENTRIES; entry++) dma_alloc_cpu_table()
37 return table; dma_alloc_cpu_table()
40 static void dma_free_cpu_table(void *table) dma_free_cpu_table() argument
42 kmem_cache_free(dma_region_table_cache, table); dma_free_cpu_table()
47 unsigned long *table, *entry; dma_alloc_page_table() local
49 table = kmem_cache_alloc(dma_page_table_cache, GFP_ATOMIC); dma_alloc_page_table()
50 if (!table) dma_alloc_page_table()
53 for (entry = table; entry < table + ZPCI_PT_ENTRIES; entry++) dma_alloc_page_table()
55 return table; dma_alloc_page_table()
58 static void dma_free_page_table(void *table) dma_free_page_table() argument
60 kmem_cache_free(dma_page_table_cache, table); dma_free_page_table()
166 * translations when previously invalid translation-table entries are dma_update_trans()
198 unsigned long *table; dma_cleanup_tables() local
204 table = zdev->dma_table; dma_cleanup_tables()
206 if (reg_entry_isvalid(table[rtx])) dma_cleanup_tables()
207 dma_free_seg_table(table[rtx]); dma_cleanup_tables()
209 dma_free_cpu_table(table); dma_cleanup_tables()
/linux-4.1.27/drivers/mmc/core/
H A Dquirks.c72 void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table) mmc_fixup_device() argument
78 if (!table) mmc_fixup_device()
79 table = mmc_fixup_methods; mmc_fixup_device()
81 for (f = table; f->vendor_fixup; f++) { mmc_fixup_device()
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/linux/
H A Dlinux-sysctl.c83 static int proc_set_timeout(struct ctl_table *table, int write, proc_set_timeout() argument
88 rc = proc_dointvec(table, write, buffer, lenp, ppos); proc_set_timeout()
94 static int proc_memory_alloc(struct ctl_table *table, int write, proc_memory_alloc() argument
118 static int proc_pages_alloc(struct ctl_table *table, int write, proc_pages_alloc() argument
142 static int proc_mem_max(struct ctl_table *table, int write, void __user *buffer, proc_mem_max() argument
166 static int proc_pages_max(struct ctl_table *table, int write, proc_pages_max() argument
190 static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write, proc_max_dirty_pages_in_mb() argument
195 if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) { proc_max_dirty_pages_in_mb()
201 (unsigned int *)table->data, proc_max_dirty_pages_in_mb()
218 *(unsigned int *)table->data, proc_max_dirty_pages_in_mb()
231 static int proc_alloc_fail_rate(struct ctl_table *table, int write, proc_alloc_fail_rate() argument
236 if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) { proc_alloc_fail_rate()
242 (unsigned int *)table->data, proc_alloc_fail_rate()
249 *(unsigned int *)table->data, proc_alloc_fail_rate()
/linux-4.1.27/drivers/crypto/qce/
H A Dcipher.h38 * @dst_tbl: destination sg table
39 * @dst_sg: destination sg pointer table beginning
40 * @src_tbl: source sg table
41 * @src_sg: source sg pointer table beginning;
/linux-4.1.27/arch/x86/tools/
H A Dgen-insn-attr-x86.awk2 # gen-insn-attr-x86.awk: Instruction attribute table generator
16 delete table
126 # escape opcode table
137 # AVX/escape opcode table
141 if (tname == "") # AVX only opcode table
144 if (aid == -1 && eid == -1) # primary opcode table
170 if (array_size(table) != 0) {
171 print_table(table, tname "[INAT_GROUP_TABLE_SIZE]",
192 if (array_size(table) != 0) {
193 print_table(table, tname "[INAT_OPCODE_TABLE_SIZE]",
261 if (idx in table)
275 table[idx] = "INAT_MAKE_ESCAPE(" escape[ref] ")"
349 table[idx] = add_flags(table[idx],flags)
353 table[idx] = add_flags(table[idx],variant)
/linux-4.1.27/crypto/
H A Dlrw.c34 struct lrw_table_ctx table; member in struct:priv
53 if (ctx->table) lrw_init_table()
54 gf128mul_free_64k(ctx->table); lrw_init_table()
56 /* initialize multiplication table for Key2 */ lrw_init_table()
57 ctx->table = gf128mul_init_64k_bbe((be128 *)tweak); lrw_init_table()
58 if (!ctx->table) lrw_init_table()
61 /* initialize optimization table */ lrw_init_table()
65 gf128mul_64k_bbe(&ctx->mulinc[i], ctx->table); lrw_init_table()
74 if (ctx->table) lrw_free_table()
75 gf128mul_free_64k(ctx->table); lrw_free_table()
96 return lrw_init_table(&ctx->table, tweak); setkey()
165 gf128mul_64k_bbe(&s.t, ctx->table.table); crypt()
174 &ctx->table.mulinc[get_index128(iv)]); crypt()
248 gf128mul_64k_bbe(&t_buf[0], ctx->table); lrw_crypt()
322 lrw_free_table(&ctx->table); exit_tfm()
/linux-4.1.27/include/linux/netfilter_ipv4/
H A Dip_tables.h2 * 25-Jul-1998 Major changes to allow for ip chain table
28 const struct xt_table *table,
30 extern void ipt_unregister_table(struct net *net, struct xt_table *table);
69 struct xt_table *table);
/linux-4.1.27/include/linux/netfilter_ipv6/
H A Dip6_tables.h2 * 25-Jul-1998 Major changes to allow for ip chain table
29 const struct xt_table *table,
31 extern void ip6t_unregister_table(struct net *net, struct xt_table *table);
35 struct xt_table *table);
/linux-4.1.27/arch/cris/include/asm/
H A Daxisflashmap.h9 * and it has nothing to do with the partition table.
22 /* And followed by partition table entries */
40 /* Complete structure for whole partition table */
41 /* note that table may end before CONFIG_ETRAX_PTABLE_ENTRIES by setting
/linux-4.1.27/arch/m68k/coldfire/
H A Ddma.c21 * DMA channel base address table.
/linux-4.1.27/net/bridge/netfilter/
H A Debtable_broute.c9 * This table lets you choose between routing and bridging for frames
10 * entering on a bridge enslaved nic. This table is traversed before any
11 * other ebtables table. See net/bridge/br_input.c.
45 .table = &initial_table,
/linux-4.1.27/include/drm/
H A Dati_pcigart.h6 /* location of GART table */
/linux-4.1.27/include/linux/gpio/
H A Dmachine.h15 * struct gpiod_lookup - lookup table
22 * gpiod_lookup is a lookup table for associating GPIOs to specific devices and
36 struct gpiod_lookup table[]; member in struct:gpiod_lookup_table
59 void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
/linux-4.1.27/drivers/mtd/nand/
H A Dnand_bbt.c5 * Bad block table support for the NAND driver
15 * When nand_scan_bbt is called, then it tries to find the bad block table
34 * The auto generated bad block table is located in the last good blocks
35 * of the device. The table is mirrored, so it can be updated eventually.
36 * The table is marked in the OOB area with an ident pattern and a version
43 * The table uses 2 bits per block
48 * The memory bad block table uses the following scheme:
164 * read_bbt - [GENERIC] Read the bad block table starting from page
169 * @td: the bbt describtion table
170 * @offs: block number offset in the table
172 * Read the bad block table starting from page.
257 * read_abs_bbt - [GENERIC] Read the bad block table starting at a given page
260 * @td: descriptor for the bad block table
261 * @chip: read the table for a specific chip, -1 read all chips; applies only if
264 * Read the bad block table for all chips starting at a given page. We assume
382 * read_abs_bbts - [GENERIC] Read the bad block table(s) for all chips starting at a given page
385 * @td: descriptor for the bad block table
386 * @md: descriptor for the bad block table mirror
388 * Read the bad block table(s) for all chips starting at a given page. We
401 pr_info("Bad block table at page %d, version 0x%02X\n", read_abs_bbts()
410 pr_info("Bad block table at page %d, version 0x%02X\n", read_abs_bbts()
447 * create_bbt - [GENERIC] Create a bad block table by scanning the device
451 * @chip: create the table for a specific chip, -1 read all chips; applies only
454 * Create a bad block table by scanning the device for the given good/bad block
513 * search_bbt - [GENERIC] scan the device for a specific bad block table
516 * @td: descriptor for the bad block table
518 * Read the bad block table by searching for a given ident pattern. Search is
581 pr_warn("Bad block table not found for chip %d\n", i); search_bbt()
583 pr_info("Bad block table found at page %d, version 0x%02X\n", search_bbt()
590 * search_read_bbts - [GENERIC] scan the device for bad block table(s)
593 * @td: descriptor for the bad block table
594 * @md: descriptor for the bad block table mirror
596 * Search and read the bad block table(s).
602 /* Search the primary table */ search_read_bbts()
605 /* Search the mirror table */ search_read_bbts()
611 * write_bbt - [GENERIC] (Re)write the bad block table
614 * @td: descriptor for the bad block table
615 * @md: descriptor for the bad block table mirror
618 * (Re)write the bad block table.
642 /* Write bad block table per chip rather than per device? */ write_bbt()
660 * There was already a version of the table, reuse the page write_bbt()
670 * Automatic placement of the bad block table. Search direction write_bbt()
691 /* Check, if the block is used by the mirror table */ write_bbt()
695 pr_err("No space left to write bad block table\n"); write_bbt()
699 /* Set up shift count and masks for the flash table */ write_bbt()
728 pr_info("nand_bbt: error reading block for writing the bad block table\n"); write_bbt()
731 pr_warn("nand_bbt: ECC error while reading block for writing bad block table\n"); write_bbt()
779 /* Walk through the memory table */ write_bbt()
802 pr_info("Bad block table written to 0x%012llx, version 0x%02X\n", write_bbt()
811 pr_warn("nand_bbt: error while writing bad block table %d\n", res); write_bbt()
816 * nand_memory_bbt - [GENERIC] create a memory based bad block table
839 * the version nr. of one table is less than the other.
863 /* Mirrored table available? */ check_create()
895 /* Create the bad block table by scanning the device? */ check_create()
899 /* Create the table in memory by scanning the chip(s) */ check_create()
912 /* Mark table as invalid */ check_create()
923 /* Mark table as invalid */ check_create()
931 /* Scrub the flash table(s)? */ check_create()
941 /* Write the bad block table to the device? */ check_create()
948 /* Write the mirror bad block table to the device? */ check_create()
959 * mark_bbt_regions - [GENERIC] mark the bad block table regions
961 * @td: bad block table descriptor
963 * The bad block table regions are marked as "bad" to prevent accidental
1021 * @bd: the table to verify
1024 * table.
1067 * nand_scan_bbt - [NAND Interface] scan, find, read and maybe create bad block table(s)
1071 * The function checks, if a bad block table(s) is/are already available. If
1073 * the bad block table(s) to the selected place.
1075 * The bad block table memory is allocated here. It must be freed by calling
1089 * table. nand_scan_bbt()
1096 * If no primary table decriptor is given, scan the device to build a nand_scan_bbt()
1097 * memory based bad block table. nand_scan_bbt()
1124 /* Search the bad block table using a pattern in oob */ nand_scan_bbt()
1140 * nand_update_bbt - update bad block table(s)
1144 * The function updates the bad block table(s).
1178 /* Write the bad block table to the device? */ nand_update_bbt()
1184 /* Write the mirror bad block table to the device? */ nand_update_bbt()
1274 * nand_default_bbt - [NAND Interface] Select a default bad block table for the device
1277 * This function selects the default bad block table support for the device and
1285 /* Is a flash based bad block table requested? */ nand_default_bbt()
1329 * @allowbbt: allow access to bad block table region
1368 /* Update flash-based bad block table */ nand_markbad_bbt()
/linux-4.1.27/drivers/watchdog/
H A Dmax63xx_wdt.c92 max63xx_select_timeout(struct max63xx_timeout *table, int value) max63xx_select_timeout() argument
94 while (table->twd) { max63xx_select_timeout()
95 if (value <= table->twd) { max63xx_select_timeout()
96 if (nodelay && table->tdelay == 0) max63xx_select_timeout()
97 return table; max63xx_select_timeout()
100 return table; max63xx_select_timeout()
103 table++; max63xx_select_timeout()
179 struct max63xx_timeout *table; max63xx_wdt_probe() local
181 table = (struct max63xx_timeout *)pdev->id_entry->driver_data; max63xx_wdt_probe()
187 current_timeout = max63xx_select_timeout(table, heartbeat); max63xx_wdt_probe()
/linux-4.1.27/net/netlabel/
H A Dnetlabel_domainhash.c4 * This file manages the domain hash table that NetLabel uses to determine
52 /* Domain hash table */
53 /* updates should be so rare that having one spinlock for the entire hash table
66 * netlbl_domhsh_free_entry - Frees a domain hash table entry
71 * function so that the memory allocated to a hash table entry can be released
105 * netlbl_domhsh_hash - Hashing function for the domain hash table
109 * This is the hashing function for the domain hash table, it returns the
111 * ensuring that the hash table is protected with either a RCU read lock or the
112 * hash table lock.
134 * Searches the domain hash table and returns a pointer to the hash table
136 * ensuring that the hash table is protected with either a RCU read lock or the
137 * hash table lock.
163 * Searches the domain hash table and returns a pointer to the hash table
165 * hash table then the default entry is returned if valid otherwise NULL is
166 * returned. The caller is responsible ensuring that the hash table is
167 * protected with either a RCU read lock or the hash table lock.
320 * Initializes the domain hash table, should be called only by
355 * netlbl_domhsh_add - Adds a entry to the domain hash table
360 * Adds a new entry to the domain hash table and handles any updates to the
476 * netlbl_domhsh_add_default - Adds the default entry to the domain hash table
481 * Adds a new default entry to the domain hash table and handles any updates
493 * netlbl_domhsh_remove_entry - Removes a given entry from the domain table
498 * Removes an entry from the domain hash table and handles any updates to the
606 /* the domain mapping is empty so remove it from the mapping table */ netlbl_domhsh_remove_af4()
626 * netlbl_domhsh_remove - Removes an entry from the domain hash table
631 * Removes an entry from the domain hash table and handles any updates to the
653 * netlbl_domhsh_remove_default - Removes the default entry from the table
657 * Removes/resets the default entry for the domain hash table and handles any
668 * netlbl_domhsh_getentry - Get an entry from the domain hash table
672 * Look through the domain hash table searching for an entry to match @domain,
683 * netlbl_domhsh_getentry_af4 - Get an entry from the domain hash table
688 * Look through the domain hash table searching for an entry to match @domain
713 * netlbl_domhsh_getentry_af6 - Get an entry from the domain hash table
718 * Look through the domain hash table searching for an entry to match @domain
743 * netlbl_domhsh_walk - Iterate through the domain mapping hash table
750 * Interate over the domain mapping hash table, skipping the first @skip_bkt
751 * buckets and @skip_chain entries. For each entry in the table call
753 * table and return. Updates the values in @skip_bkt and @skip_chain on
/linux-4.1.27/arch/x86/platform/sfi/
H A Dsfi.c52 static int __init sfi_parse_cpus(struct sfi_table_header *table) sfi_parse_cpus() argument
59 sb = (struct sfi_table_simple *)table; sfi_parse_cpus()
78 static int __init sfi_parse_ioapic(struct sfi_table_header *table) sfi_parse_ioapic() argument
88 sb = (struct sfi_table_simple *)table; sfi_parse_ioapic()
98 "SFI: pic_mod shouldn't be 1 when IOAPIC table is present\n"); sfi_parse_ioapic()
/linux-4.1.27/drivers/clk/mmp/
H A Dclk-mix.c111 struct mmp_clk_mix_clk_table *table, _filter_clk_table()
122 item = &table[i]; _filter_clk_table()
227 if (mix->table) { mmp_clk_mix_determine_rate()
229 item = &mix->table[i]; mmp_clk_mix_determine_rate()
356 if (mix->table) { mmp_clk_set_parent()
358 item = &mix->table[i]; mmp_clk_set_parent()
390 if (mix->table) { mmp_clk_set_rate()
392 item = &mix->table[i]; mmp_clk_set_rate()
428 if (mix->table) mmp_clk_mix_init()
429 _filter_clk_table(mix, mix->table, mix->table_size); mmp_clk_mix_init()
469 if (config->table) { mmp_clk_register_mix()
470 table_bytes = sizeof(*config->table) * config->table_size; mmp_clk_register_mix()
471 mix->table = kzalloc(table_bytes, GFP_KERNEL); mmp_clk_register_mix()
472 if (!mix->table) { mmp_clk_register_mix()
473 pr_err("%s:%s: could not allocate mmp mix table\n", mmp_clk_register_mix()
478 memcpy(mix->table, config->table, table_bytes); mmp_clk_register_mix()
486 pr_err("%s:%s: could not allocate mmp mix mux-table\n", mmp_clk_register_mix()
488 kfree(mix->table); mmp_clk_register_mix()
510 kfree(mix->table); mmp_clk_register_mix()
110 _filter_clk_table(struct mmp_clk_mix *mix, struct mmp_clk_mix_clk_table *table, unsigned int table_size) _filter_clk_table() argument
/linux-4.1.27/drivers/usb/gadget/
H A Dusbstring.c24 * @table: of c strings encoded using UTF-8
40 usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf) usb_gadget_get_string() argument
49 buf [2] = (u8) table->language; usb_gadget_get_string()
50 buf [3] = (u8) (table->language >> 8); usb_gadget_get_string()
53 for (s = table->strings; s && s->s; s++) usb_gadget_get_string()
/linux-4.1.27/arch/ia64/mm/
H A Dextable.c2 * Kernel exception handling table support. Derived from arch/alpha/mm/extable.c.
40 * Sort the exception table. It's usually already sorted, but there
42 * .init text section). Note that the exception-table-entries contain
45 * not be safe to make a temporary copy of an exception-table entry on
47 * exception-table).
/linux-4.1.27/arch/arm/include/asm/hardware/
H A Dentry-macro-iomd.S20 addeq \tmp, \tmp, #256 @ irq_prio_h table size
25 addeq \tmp, \tmp, #256 @ irq_prio_d table size
29 addeq \tmp, \tmp, #256 @ irq_prio_l table size
34 addeq \tmp, \tmp, #256 @ irq_prio_lc table size
41 * Interrupt table (incorporates priority). Please note that we
/linux-4.1.27/drivers/scsi/isci/
H A Dremote_node_table.c67 * @remote_node_table: This is the remote node index table from which the
69 * @group_table_index: This is the index to the group table from which to
102 * @out]: remote_node_table This the remote node table in which to clear the
106 * @group_index: This is the bit index in the table to be modified.
109 * table. none
132 * @out]: remote_node_table This the remote node table in which to set the
136 * @group_index: This is the bit position in the table to be modified.
139 * table. none
162 * @out]: remote_node_table This is the remote node table in which to modify
165 * the table.
168 * table. none
195 * @out]: remote_node_table This is the remote node table from which to clear
198 * from the table.
200 * This method clears the remote node index from the table of available remote
228 * @out]: remote_node_table The remote node table from which the slot will be
232 * This method clears the entire table slot at the specified slot index. none
259 * THis method sets an entire remote node group in the remote node table.
284 * @remote_node_table: This is the remote node table that for which the group
312 * @remote_node_entries: The number of entries to put in the table.
314 * This method will initialize the remote node table for use. none
369 * @out]: remote_node_table The remote node table from which to allocate a
373 * This method will allocate a single RNi from the remote node table. The
374 * table index will determine from which remote node group table to search.
375 * This search may fail and another group node table can be specified. The
378 * specified table the remote node is removed and the remote node groups are
394 /* We could not find an available slot in the table selector 0 */ sci_remote_node_table_allocate_single_remote_node()
429 * @remote_node_table: This is the remote node table from which to allocate the
431 * @group_table_index: THis is the group table index which must equal two (2)
466 * @remote_node_table: This is the remote node table from which the remote node
512 * table. This routine will update the remote node groups
533 * slot table. */ sci_remote_node_table_release_single_remote_node()
538 * single slot table to the dual slot table */ sci_remote_node_table_release_single_remote_node()
544 * slot table to the tripple slot table. */ sci_remote_node_table_release_single_remote_node()
554 * @remote_node_table: This is the remote node table to which the remote node
577 * @remote_node_table: The remote node table to which the remote node index is
583 * table free pool.
/linux-4.1.27/drivers/sfi/
H A Dsfi_core.c77 #define TABLE_ON_PAGE(page, table, size) (ON_SAME_PAGE(page, table) && \
78 ON_SAME_PAGE(page, table + size))
131 * Sanity check table lengh, calculate checksum
133 static int sfi_verify_table(struct sfi_table_header *table) sfi_verify_table() argument
137 u8 *puchar = (u8 *)table; sfi_verify_table()
138 u32 length = table->len; sfi_verify_table()
140 /* Sanity check table length against arbitrary 1MB limit */ sfi_verify_table()
142 pr_err("Invalid table length 0x%x\n", length); sfi_verify_table()
151 table->csum, table->csum - checksum); sfi_verify_table()
160 * Return address of mapped table
174 /* If table fits on same page as its header, we are done */ sfi_map_table()
178 /* Entire table does not fit on same page as SYST */ sfi_map_table()
189 * Undoes effect of sfi_map_table() by unmapping table
217 * 2. used to parse one specific table, signature must exist, and
226 * NULL: when can't find a table matching the key
228 * virt table address: when a matched table is found
256 * Search SYST for the specified table with the signature in
257 * the key, and return the mapped table
279 /* Find table with signature, run handler on it */ sfi_table_parse()
283 struct sfi_table_header *table = NULL; sfi_table_parse() local
294 table = sfi_get_table(&key); sfi_table_parse()
295 if (!table) sfi_table_parse()
298 ret = handler(table); sfi_table_parse()
299 sfi_put_table(table); sfi_table_parse()
/linux-4.1.27/drivers/gpu/drm/nouveau/
H A Dnouveau_bios.c100 NV_INFO(drm, "0x%04X: Parsing digital output script table\n", run_digital_op_script()
139 * The BIT LVDS table's header has the information to setup the run_lvds_table()
143 * for panel power, selected by output and on/off; and 8 table pointers run_lvds_table()
154 * For now we assume version 3.0 table - g80 support will need some run_lvds_table()
194 NV_ERROR(drm, "Pixel clock comparison table not found\n"); run_lvds_table()
265 * BMP version (0xa) LVDS table has a simple header of version and parse_lvds_manufacturer_table_header()
266 * record length. The BIT LVDS table has the typical BIT table header: parse_lvds_manufacturer_table_header()
268 * the maximum number of records that can be held in the table. parse_lvds_manufacturer_table_header()
277 NV_ERROR(drm, "Pointer to LVDS manufacturer table invalid\n"); parse_lvds_manufacturer_table_header()
291 NV_ERROR(drm, "LVDS table header not understood\n"); parse_lvds_manufacturer_table_header()
299 NV_ERROR(drm, "LVDS table header not understood\n"); parse_lvds_manufacturer_table_header()
306 "LVDS table revision %d.%d not currently supported\n", parse_lvds_manufacturer_table_header()
350 /* Apple cards don't have the fp table; the laptops use DDC */ parse_fp_mode_table()
351 /* The table is also missing on some x86 IGPs */ parse_fp_mode_table()
353 NV_ERROR(drm, "Pointer to flat panel table invalid\n"); parse_fp_mode_table()
393 "FP table revision %d.%d not currently supported\n", parse_fp_mode_table()
411 NV_ERROR(drm, "Pointer to flat panel xlat table invalid\n"); parse_fp_mode_table()
421 NV_ERROR(drm, "Bad flat panel table index\n"); parse_fp_mode_table()
497 * The LVDS table header is (mostly) described in nouveau_bios_parse_lvds_table()
503 * Following the header, the BMP (ver 0xa) table has several records, nouveau_bios_parse_lvds_table()
504 * indexed by a separate xlat table, indexed in turn by the fp strap in nouveau_bios_parse_lvds_table()
510 * In the BIT versions, the table following the header serves as an nouveau_bios_parse_lvds_table()
511 * integrated config and xlat table: the records in the table are nouveau_bios_parse_lvds_table()
514 * fp mode table pointed to by the BIT 'D' table nouveau_bios_parse_lvds_table()
516 * DDC is not used until after card init, so selecting the correct table nouveau_bios_parse_lvds_table()
559 * product IDs in a table (signature 'pidt' (panel id nouveau_bios_parse_lvds_table()
560 * table?)), setting an lvdsmanufacturerindex of 0 and nouveau_bios_parse_lvds_table()
583 NV_ERROR(drm, "LVDS table revision not currently supported\n"); nouveau_bios_parse_lvds_table()
632 * For ffs(or) == 1 use the first table, for ffs(or) == 2 and run_tmds_table()
659 NV_ERROR(drm, "Pixel clock comparison table not found\n"); run_tmds_table()
682 * Parses the init table segment for pointers used in script execution. parse_script_table_pointers()
685 * offset + 2 (16 bits): macro index table pointer parse_script_table_pointers()
686 * offset + 4 (16 bits): macro table pointer parse_script_table_pointers()
687 * offset + 6 (16 bits): condition table pointer parse_script_table_pointers()
688 * offset + 8 (16 bits): io condition table pointer parse_script_table_pointers()
689 * offset + 10 (16 bits): io flag condition table pointer parse_script_table_pointers()
690 * offset + 12 (16 bits): init function table pointer parse_script_table_pointers()
701 * offset + 0 (16 bits): loadval table pointer parse_bit_A_tbl_entry()
709 NV_ERROR(drm, "Do not understand BIT A table\n"); parse_bit_A_tbl_entry()
716 NV_DEBUG(drm, "Pointer to BIT loadval table invalid\n"); parse_bit_A_tbl_entry()
723 NV_ERROR(drm, "BIT loadval table version %d.%d not supported\n", parse_bit_A_tbl_entry()
733 NV_ERROR(drm, "Do not understand BIT loadval table\n"); parse_bit_A_tbl_entry()
746 * Parses the flat panel table segment that the bit entry points to. parse_bit_display_tbl_entry()
749 * offset + 0 (16 bits): ??? table pointer - seems to have 18 byte parse_bit_display_tbl_entry()
751 * offset + 2 (16 bits): mode table pointer parse_bit_display_tbl_entry()
756 NV_ERROR(drm, "Do not understand BIT display table\n"); parse_bit_display_tbl_entry()
768 * Parses the init table segment that the bit entry points to. parse_bit_init_tbl_entry()
775 NV_ERROR(drm, "Do not understand init table\n"); parse_bit_init_tbl_entry()
786 * BIT 'i' (info?) table parse_bit_i_tbl_entry()
788 * offset + 0 (32 bits): BIOS version dword (as in B table) parse_bit_i_tbl_entry()
790 * offset + 13 (16 bits): pointer to table containing DAC load parse_bit_i_tbl_entry()
793 * There's other things in the table, purpose unknown parse_bit_i_tbl_entry()
801 NV_ERROR(drm, "BIT i table too short for needed information\n"); parse_bit_i_tbl_entry()
813 NV_WARN(drm, "BIT i table not long enough for DAC load " parse_bit_i_tbl_entry()
814 "detection comparison table\n"); parse_bit_i_tbl_entry()
825 * The first value in the table, following the header, is the parse_bit_i_tbl_entry()
834 NV_WARN(drm, "DAC load detection comparison table version " parse_bit_i_tbl_entry()
848 * Parses the LVDS table segment that the bit entry points to. parse_bit_lvds_tbl_entry()
851 * offset + 0 (16 bits): LVDS strap xlate table pointer parse_bit_lvds_tbl_entry()
857 NV_ERROR(drm, "Do not understand BIT LVDS table\n"); parse_bit_lvds_tbl_entry()
862 * No idea if it's still called the LVDS manufacturer table, but parse_bit_lvds_tbl_entry()
877 * offset + 3 (16 bits): pointer to strap xlate table for RAM parse_bit_M_tbl_entry()
880 * There's a bunch of bits in this table other than the RAM restrict parse_bit_M_tbl_entry()
885 * Older bios versions don't have a sufficiently long table for parse_bit_M_tbl_entry()
905 * Parses the pointer to the TMDS table parse_bit_tmds_tbl_entry()
909 * offset + 0 (16 bits): TMDS table pointer parse_bit_tmds_tbl_entry()
911 * The TMDS table is typically found just before the DCB table, with a parse_bit_tmds_tbl_entry()
918 * Offset +11 has a pointer to a table where the first word is a pxclk parse_bit_tmds_tbl_entry()
922 * Offset +13 has a pointer to a similar table parse_bit_tmds_tbl_entry()
923 * The selection of table (and possibly +7/+9 script) is dictated by parse_bit_tmds_tbl_entry()
931 NV_ERROR(drm, "Do not understand BIT TMDS table\n"); parse_bit_tmds_tbl_entry()
937 NV_ERROR(drm, "Pointer to TMDS table invalid\n"); parse_bit_tmds_tbl_entry()
941 NV_INFO(drm, "TMDS table version %d.%d\n", parse_bit_tmds_tbl_entry()
955 NV_WARN(drm, "TMDS table script pointers not stubbed\n"); parse_bit_tmds_tbl_entry()
1000 struct bit_table *table) parse_bit_table()
1006 if (bit_table(dev, table->id, &bitentry) == 0) parse_bit_table()
1007 return table->parse_fn(dev, bios, &bitentry); parse_bit_table()
1009 NV_INFO(drm, "BIT table '%c' not found\n", table->id); parse_bit_table()
1050 * offset + 18: init script table pointer (for bios versions < 5.10h) parse_bmp_structure()
1051 * offset + 20: extra init script table pointer (for bios parse_bmp_structure()
1054 * offset + 24: memory init table pointer (used on early bios versions) parse_bmp_structure()
1055 * offset + 26: SDR memory sequencing setup data table parse_bmp_structure()
1056 * offset + 28: DDR memory sequencing setup data table parse_bmp_structure()
1069 * offset + 75: script table pointers, as described in parse_bmp_structure()
1072 * offset + 89: TMDS single link output A table pointer parse_bmp_structure()
1073 * offset + 91: TMDS single link output B table pointer parse_bmp_structure()
1074 * offset + 95: LVDS single link output A table pointer parse_bmp_structure()
1075 * offset + 105: flat panel timings table pointer parse_bmp_structure()
1076 * offset + 107: flat panel strapping translation table pointer parse_bmp_structure()
1077 * offset + 117: LVDS manufacturer panel config table pointer parse_bmp_structure()
1078 * offset + 119: LVDS manufacturer strapping translation table pointer parse_bmp_structure()
1080 * offset + 142: PLL limits table pointer parse_bmp_structure()
1287 * v1.2 does have an I2C table that read_dcb_i2c_table can olddcb_table()
1289 * table pointer, so use the indices parsed in olddcb_table()
1680 * So many things wrong here, replace the entire encoder table.. apply_dcb_encoder_quirks()
1710 * Connector table is missing anything for VGA at all, pointing it apply_dcb_encoder_quirks()
1851 * table - just in case it has random, rather than stub, entries. dcb_fake_connectors()
1891 /* dump connector table entries to log, if any exist */ parse_dcb_table()
1924 NV_ERROR(drm, "Too few entries in HW sequencer table for " load_nv17_hwsq_ucode_entry()
999 parse_bit_table(struct nvbios *bios, const uint16_t bitoffset, struct bit_table *table) parse_bit_table() argument
/linux-4.1.27/fs/jbd/
H A Drevoke.c66 * belongs to the committing transaction. Accesses to the second hash table
67 * happen only from the kjournald and no other thread touches this table. Also
73 * All users operating on the hash table belonging to the running transaction
76 * the hash table j_revoke_lock is used.
113 /* The revoke table is just a simple hash table of revoke records. */
116 /* It is conceivable that we might want a larger hash table
131 /* Utility functions to maintain the revoke table */
135 struct jbd_revoke_table_s *table = journal->j_revoke; hash() local
137 return hash_32(block, table->hash_shift); hash()
167 /* Find a revoke record in the journal's hash table. */
232 struct jbd_revoke_table_s *table; journal_init_revoke_table() local
234 table = kmem_cache_alloc(revoke_table_cache, GFP_KERNEL); journal_init_revoke_table()
235 if (!table) journal_init_revoke_table()
238 table->hash_size = hash_size; journal_init_revoke_table()
239 table->hash_shift = ilog2(hash_size); journal_init_revoke_table()
240 table->hash_table = journal_init_revoke_table()
242 if (!table->hash_table) { journal_init_revoke_table()
243 kmem_cache_free(revoke_table_cache, table); journal_init_revoke_table()
244 table = NULL; journal_init_revoke_table()
249 INIT_LIST_HEAD(&table->hash_table[i]); journal_init_revoke_table()
252 return table; journal_init_revoke_table()
255 static void journal_destroy_revoke_table(struct jbd_revoke_table_s *table) journal_destroy_revoke_table() argument
260 for (i = 0; i < table->hash_size; i++) { journal_destroy_revoke_table()
261 hash_list = &table->hash_table[i]; journal_destroy_revoke_table()
265 kfree(table->hash_table); journal_destroy_revoke_table()
266 kmem_cache_free(revoke_table_cache, table); journal_destroy_revoke_table()
269 /* Initialise the revoke table for a given journal to a given size. */ journal_init_revoke()
295 /* Destroy a journal's revoke table. The table must already be empty! */ journal_destroy_revoke()
481 * revoke table to reflect there is no revoked buffer in the next
509 /* journal_switch_revoke table select j_revoke for next transaction
543 /* select revoke table for committing transaction */ journal_write_revoke_records()
663 * empty the revoke table after recovery.
712 * Finally, once recovery is over, we need to clear the revoke table so
/linux-4.1.27/arch/metag/mm/
H A Dmmu-meta1.c17 * This contains the physical address of the top level 2k pgd table.
49 * Return the physical address of the base of our pgd table.
78 * the global pgd table instead of our local one. pgd_entry_addr()
85 /* Base of the pgd table plus our 4Meg entry, 4bytes each */ pgd_entry_addr()
99 /* Find the physical address of the 4MB page table*/ pgtable_entry_addr()
125 /* Find the base of our MMU pgd table */ mmu_get_base()
/linux-4.1.27/net/sunrpc/
H A Dsysctl.c6 * I would prefer to register the sunrpc table below sys/net, but that's
61 static int proc_do_xprt(struct ctl_table *table, int write, proc_do_xprt() argument
76 proc_dodebug(struct ctl_table *table, int write, proc_dodebug() argument
112 *(unsigned int *) table->data = value; proc_dodebug()
114 if (strcmp(table->procname, "rpc_debug") == 0) proc_dodebug()
119 len = sprintf(tmpbuf, "%d", *(unsigned int *) table->data); proc_dodebug()
/linux-4.1.27/include/acpi/
H A Dactbl2.h60 * Values for description table header signatures for tables defined in this
64 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
67 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
68 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
69 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
70 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
74 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
75 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
77 #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
79 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
80 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
81 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
94 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
118 * ASF - Alert Standard Format table (Signature "ASF!")
126 struct acpi_table_header header; /* Common ACPI table header */
240 struct acpi_table_header header; /* Common ACPI table header */
255 struct acpi_table_header header; /* Common ACPI table header */
320 * Version 0 (Both main table and subtables)
327 struct acpi_table_header header; /* Common ACPI table header */
380 * DBGP - Debug Port table
388 struct acpi_table_header header; /* Common ACPI table header */
396 * DMAR - DMA Remapping table
405 struct acpi_table_header header; /* Common ACPI table header */
525 * HPET - High Precision Event Timer table
534 struct acpi_table_header header; /* Common ACPI table header */
562 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
568 struct acpi_table_header header; /* Common ACPI table header */
662 struct acpi_table_header header; /* Common ACPI table header */
832 struct acpi_table_header header; /* Common ACPI table header */
890 * MCFG - PCI Memory Mapped Configuration table and subtable
898 struct acpi_table_header header; /* Common ACPI table header */
923 struct acpi_table_header header; /* Common ACPI table header */
940 * MSDM - Microsoft Data Management table
947 /* Basic MSDM table is only the common ACPI header */
950 struct acpi_table_header header; /* Common ACPI table header */
960 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
965 struct acpi_table_header header; /* Common ACPI table header */
985 /* Basic SLIC table is only the common ACPI header */
988 struct acpi_table_header header; /* Common ACPI table header */
993 * SPCR - Serial Port Console Redirection table
1002 struct acpi_table_header header; /* Common ACPI table header */
1031 * SPMI - Server Platform Management Interface table
1041 struct acpi_table_header header; /* Common ACPI table header */
1071 * TCPA - Trusted Computing Platform Alliance table
1080 struct acpi_table_header header; /* Common ACPI table header */
1097 struct acpi_table_header header; /* Common ACPI table header */
1099 u16 data_offset; /* Offset of remaining data in table */
1109 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1114 struct acpi_table_header header; /* Common ACPI table header */
1134 struct acpi_table_header header; /* Common ACPI table header */
1154 struct acpi_table_header header; /* Common ACPI table header */
1227 struct acpi_table_header header; /* Common ACPI table header */
1265 struct acpi_table_header header; /* Common ACPI table header */
/linux-4.1.27/arch/arm64/kernel/
H A Dacpi.c53 /* "acpi=off" disables both ACPI table parsing and interpreter */ parse_acpi()
80 * or early_memremap() should be called here to for ACPI table mapping.
224 struct acpi_table_header *table; acpi_fadt_sanity_check() local
234 status = acpi_get_table_with_size(ACPI_SIG_FADT, 0, &table, &tbl_size); acpi_fadt_sanity_check()
238 pr_err("Failed to get FADT table, %s\n", msg); acpi_fadt_sanity_check()
242 fadt = (struct acpi_table_fadt *)table; acpi_fadt_sanity_check()
245 * Revision in table header is the FADT Major revision, and there acpi_fadt_sanity_check()
250 if (table->revision < 5 || acpi_fadt_sanity_check()
251 (table->revision == 5 && fadt->minor_revision < 1)) { acpi_fadt_sanity_check()
253 table->revision, fadt->minor_revision); acpi_fadt_sanity_check()
265 * acpi_get_table_with_size() creates FADT table mapping that acpi_fadt_sanity_check()
268 early_acpi_os_unmap_memory(table, tbl_size); acpi_fadt_sanity_check()
324 struct acpi_table_header *table; acpi_gic_init() local
332 status = acpi_get_table_with_size(ACPI_SIG_MADT, 0, &table, &tbl_size); acpi_gic_init()
336 pr_err("Failed to get MADT table, %s\n", msg); acpi_gic_init()
340 err = gic_v2_acpi_init(table); acpi_gic_init()
344 early_acpi_os_unmap_memory((char *)table, tbl_size); acpi_gic_init()
/linux-4.1.27/drivers/mtd/onenand/
H A Donenand_bbt.c47 * create_bbt - [GENERIC] Create a bad block table by scanning the device
51 * @param chip create the table for a specific chip, -1 read all chips.
54 * Create a bad block table by scanning the device
125 * onenand_memory_bbt - [GENERIC] create a memory based bad block table
143 * @param allowbbt allow access to bad block table region
169 * onenand_scan_bbt - [OneNAND Interface] scan, find, read and maybe create bad block table(s)
173 * The function checks, if a bad block table(s) is/are already
175 * marked good / bad blocks and writes the bad block table(s) to
178 * The bad block table memory is allocated here. It is freed
189 /* Allocate memory (2bit per block) and clear the memory bad block table */ onenand_scan_bbt()
203 /* Scan the device to build a memory based bad block table */ onenand_scan_bbt()
227 * onenand_default_bbt - [OneNAND Interface] Select a default bad block table for the device
230 * This function selects the default bad block table
/linux-4.1.27/drivers/net/wireless/b43legacy/
H A Dphy.h70 #define B43legacy_PHY_GTABCTL B43legacy_PHY_EXTG(0x03) /* G-PHY table control (see below) */
71 #define B43legacy_PHY_GTABOFF 0x03FF /* G-PHY table offset (see below) */
72 #define B43legacy_PHY_GTABNR 0xFC00 /* G-PHY table number (see below) */
74 #define B43legacy_PHY_GTABDATA B43legacy_PHY_EXTG(0x04) /* G-PHY table data */
79 /*** OFDM table numbers ***/
134 #define B43legacy_PHY_OTABLECTL B43legacy_PHY_OFDM(0x72) /* OFDM table control (see below) */
135 #define B43legacy_PHY_OTABLEOFF 0x03FF /* OFDM table offset (see below) */
136 #define B43legacy_PHY_OTABLENR 0xFC00 /* OFDM table number (see below) */
138 #define B43legacy_PHY_OTABLEI B43legacy_PHY_OFDM(0x73) /* OFDM table data I */
139 #define B43legacy_PHY_OTABLEQ B43legacy_PHY_OFDM(0x74) /* OFDM table data Q */
159 #define B43legacy_PHY_TSSIP_LTBASE B43legacy_PHY_OFDM(0x380) /* TSSI power lookup table base */
160 #define B43legacy_PHY_DC_LTBASE B43legacy_PHY_OFDM(0x3A0) /* DC lookup table base */
161 #define B43legacy_PHY_GAIN_LTBASE B43legacy_PHY_OFDM(0x3C0) /* Gain lookup table base */
/linux-4.1.27/fs/jbd2/
H A Drevoke.c66 * belongs to the committing transaction. Accesses to the second hash table
67 * happen only from the kjournald and no other thread touches this table. Also
73 * All users operating on the hash table belonging to the running transaction
76 * the hash table j_revoke_lock is used.
113 /* The revoke table is just a simple hash table of revoke records. */
116 /* It is conceivable that we might want a larger hash table
132 /* Utility functions to maintain the revoke table */
166 /* Find a revoke record in the journal's hash table. */
226 struct jbd2_revoke_table_s *table; jbd2_journal_init_revoke_table() local
228 table = kmem_cache_alloc(jbd2_revoke_table_cache, GFP_KERNEL); jbd2_journal_init_revoke_table()
229 if (!table) jbd2_journal_init_revoke_table()
235 table->hash_size = hash_size; jbd2_journal_init_revoke_table()
236 table->hash_shift = shift; jbd2_journal_init_revoke_table()
237 table->hash_table = jbd2_journal_init_revoke_table()
239 if (!table->hash_table) { jbd2_journal_init_revoke_table()
240 kmem_cache_free(jbd2_revoke_table_cache, table); jbd2_journal_init_revoke_table()
241 table = NULL; jbd2_journal_init_revoke_table()
246 INIT_LIST_HEAD(&table->hash_table[tmp]); jbd2_journal_init_revoke_table()
249 return table; jbd2_journal_init_revoke_table()
252 static void jbd2_journal_destroy_revoke_table(struct jbd2_revoke_table_s *table) jbd2_journal_destroy_revoke_table() argument
257 for (i = 0; i < table->hash_size; i++) { jbd2_journal_destroy_revoke_table()
258 hash_list = &table->hash_table[i]; jbd2_journal_destroy_revoke_table()
262 kfree(table->hash_table); jbd2_journal_destroy_revoke_table()
263 kmem_cache_free(jbd2_revoke_table_cache, table); jbd2_journal_destroy_revoke_table()
266 /* Initialise the revoke table for a given journal to a given size. */ jbd2_journal_init_revoke()
292 /* Destroy a journal's revoke table. The table must already be empty! */ jbd2_journal_destroy_revoke()
478 * revoke table to reflect there is no revoked buffers in the next
506 /* journal_switch_revoke table select j_revoke for next transaction
542 /* select revoke table for committing transaction */ jbd2_journal_write_revoke_records()
694 * empty the revoke table after recovery.
743 * Finally, once recovery is over, we need to clear the revoke table so
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Ddt2815.c38 0 == program 1 (see manual table 5-4)
39 1 == program 2 (see manual table 5-4)
40 2 == program 3 (see manual table 5-4)
41 3 == program 4 (see manual table 5-4)
132 0 == program 1 (see manual table 5-4)
133 1 == program 2 (see manual table 5-4)
134 2 == program 3 (see manual table 5-4)
135 3 == program 4 (see manual table 5-4)
/linux-4.1.27/arch/x86/kernel/
H A Dtest_nx.c31 * Sadly, this implies having a dynamic exception handling table entry.
42 * and walks the exception table of the module, looking for a magic
51 * Note: This module has only 1 exception table entry, fudze_exception_table()
54 * table. fudze_exception_table()
57 printk(KERN_ERR "test_nx: too many exception table entries!\n"); fudze_exception_table()
77 * that would give us more than 1 exception table entry.
84 /* Set up an exception table entry for our address */ test_address()
99 /* change the exception table back for the next round */ test_address()
/linux-4.1.27/arch/x86/um/
H A Dsys_call_table_32.c2 * System call table for UML/i386, copied from arch/x86/kernel/syscall_*.c
15 * and the UML syscall table.
/linux-4.1.27/include/linux/netfilter_bridge/
H A Debtables.h30 bool (*checkentry)(const char *table, const void *entry,
47 bool (*checkentry)(const char *table, const void *entry,
65 bool (*checkentry)(const char *table, const void *entry,
97 struct ebt_replace_kernel *table; member in struct:ebt_table
100 /* e.g. could be the table explicitly only allows certain
112 const struct ebt_table *table);
113 extern void ebt_unregister_table(struct net *net, struct ebt_table *table);
116 struct ebt_table *table);
/linux-4.1.27/arch/m68k/include/asm/
H A Dpgtable_no.h16 * Trivial page table functions.
47 * No page table caches to initialise.

Completed in 7435 milliseconds

1234567891011>>