| /Linux-v5.4/sound/hda/ |
| D | hdac_sysfs.c | 89 ssize_t (*show)(struct hdac_device *codec, hda_nid_t nid, 91 ssize_t (*store)(struct hdac_device *codec, hda_nid_t nid, 99 int nid; in get_codec_nid() local 102 ret = kstrtoint(kobj->name, 16, &nid); in get_codec_nid() 106 return nid; in get_codec_nid() 115 int nid; in widget_attr_show() local 119 nid = get_codec_nid(kobj, &codec); in widget_attr_show() 120 if (nid < 0) in widget_attr_show() 121 return nid; in widget_attr_show() 122 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show() [all …]
|
| D | hdac_device.c | 221 static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_make_cmd() argument 227 if ((addr & ~0xf) || (nid & ~0x7f) || in snd_hdac_make_cmd() 230 addr, nid, verb, parm); in snd_hdac_make_cmd() 235 val |= (u32)nid << 20; in snd_hdac_make_cmd() 272 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read() argument 275 unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm); in snd_hdac_read() 286 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm, in _snd_hdac_read_parm() argument 291 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in _snd_hdac_read_parm() 305 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_read_parm_uncached() argument 310 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; in snd_hdac_read_parm_uncached() [all …]
|
| /Linux-v5.4/drivers/base/ |
| D | node.c | 184 void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs, in node_set_perf_attrs() argument 191 if (WARN_ON_ONCE(!node_online(nid))) in node_set_perf_attrs() 194 node = node_devices[nid]; in node_set_perf_attrs() 204 nid); in node_set_perf_attrs() 287 void node_add_cache(unsigned int nid, struct node_cache_attrs *cache_attrs) in node_add_cache() argument 293 if (!node_online(nid) || !node_devices[nid]) in node_add_cache() 296 node = node_devices[nid]; in node_add_cache() 351 static void node_init_caches(unsigned int nid) in node_init_caches() argument 353 INIT_LIST_HEAD(&node_devices[nid]->cache_attrs); in node_init_caches() 356 static void node_init_caches(unsigned int nid) { } in node_init_caches() argument [all …]
|
| /Linux-v5.4/sound/pci/hda/ |
| D | hda_local.h | 26 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \ argument 27 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23)) 29 #define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \ argument 30 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0) 32 #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags) \ argument 42 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags } 44 #define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction) \ argument 45 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0) 47 #define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction) \ argument 48 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0) [all …]
|
| D | hda_proc.c | 22 #define param_read(codec, nid, parm) \ argument 23 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm) 48 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument 56 if (item->nid == nid) { in print_nid_array() 75 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument 82 if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) in print_nid_pcms() 94 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument 97 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps() 112 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument 126 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps() [all …]
|
| D | hda_jack.c | 29 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument 33 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable() 35 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable() 38 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable() 46 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid) in read_pin_sense() argument 52 pincap = snd_hda_query_pin_caps(codec, nid); in read_pin_sense() 54 snd_hda_codec_read(codec, nid, 0, in read_pin_sense() 57 val = snd_hda_codec_read(codec, nid, 0, in read_pin_sense() 70 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_tbl_get() argument 75 if (!nid || !jack) in snd_hda_jack_tbl_get() [all …]
|
| D | hda_codec.c | 81 for (; seq->nid; seq++) in snd_hda_sequence_write() 82 snd_hda_codec_write(codec, seq->nid, 0, seq->verb, seq->param); in snd_hda_sequence_write() 90 hda_nid_t nid; member 96 lookup_conn_list(struct hda_codec *codec, hda_nid_t nid) in lookup_conn_list() argument 100 if (p->nid == nid) in lookup_conn_list() 106 static int add_conn_list(struct hda_codec *codec, hda_nid_t nid, int len, in add_conn_list() argument 115 p->nid = nid; in add_conn_list() 132 static int read_and_add_raw_conns(struct hda_codec *codec, hda_nid_t nid) in read_and_add_raw_conns() argument 138 len = snd_hda_get_raw_connections(codec, nid, list, ARRAY_SIZE(list)); in read_and_add_raw_conns() 140 len = snd_hda_get_num_raw_conns(codec, nid); in read_and_add_raw_conns() [all …]
|
| /Linux-v5.4/include/sound/ |
| D | hda_regmap.h | 35 #define snd_hdac_regmap_encode_verb(nid, verb) \ argument 36 (((verb) << 8) | 0x80000 | ((unsigned int)(nid) << 20)) 47 #define snd_hdac_regmap_encode_amp(nid, ch, dir, idx) \ argument 48 (snd_hdac_regmap_encode_verb(nid, AC_VERB_GET_AMP_GAIN_MUTE) | \ 61 #define snd_hdac_regmap_encode_amp_stereo(nid, dir, idx) \ argument 62 (snd_hdac_regmap_encode_verb(nid, AC_VERB_GET_AMP_GAIN_MUTE) | \ 76 snd_hdac_regmap_write(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_regmap_write() argument 79 unsigned int cmd = snd_hdac_regmap_encode_verb(nid, verb); in snd_hdac_regmap_write() 94 snd_hdac_regmap_update(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_regmap_update() argument 98 unsigned int cmd = snd_hdac_regmap_encode_verb(nid, verb); in snd_hdac_regmap_update() [all …]
|
| D | hda_codec.h | 116 int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid); 119 void (*stream_pm)(struct hda_codec *codec, hda_nid_t nid, bool on); 143 hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ member 265 unsigned int (*power_filter)(struct hda_codec *codec, hda_nid_t nid, 270 struct hda_codec *codec, hda_nid_t nid); 313 snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, in snd_hda_codec_read() argument 317 return snd_hdac_codec_read(&codec->core, nid, flags, verb, parm); in snd_hda_codec_read() 321 snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags, in snd_hda_codec_write() argument 324 return snd_hdac_codec_write(&codec->core, nid, flags, verb, parm); in snd_hda_codec_write() 327 #define snd_hda_param_read(codec, nid, param) \ argument [all …]
|
| /Linux-v5.4/include/linux/ |
| D | node.h | 68 void node_add_cache(unsigned int nid, struct node_cache_attrs *cache_attrs); 69 void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs, 72 static inline void node_add_cache(unsigned int nid, in node_add_cache() argument 77 static inline void node_set_perf_attrs(unsigned int nid, in node_set_perf_attrs() argument 102 extern int link_mem_sections(int nid, unsigned long start_pfn, 105 static inline int link_mem_sections(int nid, unsigned long start_pfn, in link_mem_sections() argument 115 extern int __register_one_node(int nid); 118 static inline int register_one_node(int nid) in register_one_node() argument 122 if (node_online(nid)) { in register_one_node() 123 struct pglist_data *pgdat = NODE_DATA(nid); in register_one_node() [all …]
|
| D | memory_hotplug.h | 112 extern int try_online_node(int nid); 114 extern int arch_add_memory(int nid, u64 start, u64 size, 126 extern void arch_remove_memory(int nid, u64 start, u64 size, 132 extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, 136 static inline int add_pages(int nid, unsigned long start_pfn, in add_pages() argument 139 return __add_pages(nid, start_pfn, nr_pages, restrictions); in add_pages() 142 int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, 166 extern pg_data_t *arch_alloc_nodedata(int nid); 168 extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat); 172 #define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid) argument [all …]
|
| /Linux-v5.4/arch/powerpc/mm/ |
| D | numa.c | 86 unsigned int *nid) in fake_numa_create_new_node() argument 98 *nid = fake_nid; in fake_numa_create_new_node() 125 *nid = fake_nid; in fake_numa_create_new_node() 208 static void initialize_distance_lookup_table(int nid, in initialize_distance_lookup_table() argument 220 distance_lookup_table[nid][i] = of_read_number(entry, 1); in initialize_distance_lookup_table() 229 int nid = NUMA_NO_NODE; in associativity_to_nid() local 235 nid = of_read_number(&associativity[min_common_depth], 1); in associativity_to_nid() 238 if (nid == 0xffff || nid >= MAX_NUMNODES) in associativity_to_nid() 239 nid = NUMA_NO_NODE; in associativity_to_nid() 241 if (nid > 0 && in associativity_to_nid() [all …]
|
| /Linux-v5.4/include/trace/events/ |
| D | vmscan.h | 37 TP_PROTO(int nid), 39 TP_ARGS(nid), 42 __field( int, nid ) 46 __entry->nid = nid; 49 TP_printk("nid=%d", __entry->nid) 54 TP_PROTO(int nid, int zid, int order), 56 TP_ARGS(nid, zid, order), 59 __field( int, nid ) 65 __entry->nid = nid; 71 __entry->nid, [all …]
|
| /Linux-v5.4/arch/arm64/mm/ |
| D | numa.c | 63 int nid = cpu_to_node(cpu); in numa_update_cpu() local 65 if (nid == NUMA_NO_NODE) in numa_update_cpu() 69 cpumask_clear_cpu(cpu, node_to_cpumask_map[nid]); in numa_update_cpu() 71 cpumask_set_cpu(cpu, node_to_cpumask_map[nid]); in numa_update_cpu() 123 void __init early_map_cpu_to_node(unsigned int cpu, int nid) in early_map_cpu_to_node() argument 126 if (nid < 0 || nid >= MAX_NUMNODES || numa_off) in early_map_cpu_to_node() 127 nid = 0; in early_map_cpu_to_node() 129 cpu_to_node_map[cpu] = nid; in early_map_cpu_to_node() 137 set_cpu_numa_node(cpu, nid); in early_map_cpu_to_node() 157 int nid = early_cpu_to_node(cpu); in pcpu_fc_alloc() local [all …]
|
| /Linux-v5.4/arch/sh/include/asm/ |
| D | mmzone.h | 11 #define NODE_DATA(nid) (node_data[nid]) argument 15 int nid; in pfn_to_nid() local 17 for (nid = 0; nid < MAX_NUMNODES; nid++) in pfn_to_nid() 18 if (pfn >= node_start_pfn(nid) && pfn <= node_end_pfn(nid)) in pfn_to_nid() 21 return nid; in pfn_to_nid() 30 void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end); 33 setup_bootmem_node(int nid, unsigned long start, unsigned long end) in setup_bootmem_node() argument 42 void __init __add_active_range(unsigned int nid, unsigned long start_pfn, 45 void __init allocate_pgdat(unsigned int nid);
|
| /Linux-v5.4/sound/pci/lola/ |
| D | lola_proc.c | 17 struct lola *chip, int nid, const char *name) in print_audio_widget() argument 21 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_audio_widget() 22 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_audio_widget() 23 lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in print_audio_widget() 28 struct lola *chip, int nid, unsigned int ampcap, in print_pin_widget() argument 33 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_pin_widget() 34 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_pin_widget() 37 lola_read_param(chip, nid, ampcap, &val); in print_pin_widget() 44 lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, NULL); in print_pin_widget() 49 struct lola *chip, int nid) in print_clock_widget() argument [all …]
|
| /Linux-v5.4/arch/alpha/mm/ |
| D | numa.c | 56 setup_memory_node(int nid, void *kernel_end) in setup_memory_node() argument 69 node_pfn_start = (node_mem_start(nid)) >> PAGE_SHIFT; in setup_memory_node() 70 node_pfn_end = node_pfn_start + (node_mem_size(nid) >> PAGE_SHIFT); in setup_memory_node() 94 printk("Initializing bootmem allocator on Node ID %d\n", nid); in setup_memory_node() 133 node_data[nid] = (pg_data_t *)(__va(node_min_pfn << PAGE_SHIFT)); in setup_memory_node() 138 DBGDCONT(" DISCONTIG: node_data[%d] is at 0x%p\n", nid, NODE_DATA(nid)); in setup_memory_node() 144 if (!nid && (node_max_pfn < end_kernel_pfn || node_min_pfn > start_kernel_pfn)) in setup_memory_node() 155 NODE_DATA(nid)->node_start_pfn = node_min_pfn; in setup_memory_node() 156 NODE_DATA(nid)->node_present_pages = node_max_pfn - node_min_pfn; in setup_memory_node() 158 node_set_online(nid); in setup_memory_node() [all …]
|
| /Linux-v5.4/arch/s390/numa/ |
| D | numa.c | 76 int nid = 0; in numa_setup_memory() local 88 nid = numa_pfn_to_nid(PFN_DOWN(cur_base)); in numa_setup_memory() 89 node_set_online(nid); in numa_setup_memory() 90 memblock_set_node(cur_base, align, &memblock.memory, nid); in numa_setup_memory() 95 for (nid = 0; nid < MAX_NUMNODES; nid++) { in numa_setup_memory() 96 NODE_DATA(nid) = memblock_alloc(sizeof(pg_data_t), 8); in numa_setup_memory() 97 if (!NODE_DATA(nid)) in numa_setup_memory() 102 for_each_online_node(nid) { in numa_setup_memory() 109 for_each_mem_pfn_range(i, nid, &t_start, &t_end, NULL) { in numa_setup_memory() 115 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in numa_setup_memory() [all …]
|
| /Linux-v5.4/arch/sh/mm/ |
| D | numa.c | 26 void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) in setup_bootmem_node() argument 31 BUG_ON(nid >= MAX_NUMNODES || nid <= 0); in setup_bootmem_node() 41 __add_active_range(nid, start_pfn, end_pfn); in setup_bootmem_node() 44 NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), in setup_bootmem_node() 45 SMP_CACHE_BYTES, nid); in setup_bootmem_node() 46 if (!NODE_DATA(nid)) in setup_bootmem_node() 49 nid); in setup_bootmem_node() 51 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_bootmem_node() 52 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in setup_bootmem_node() 55 node_set_online(nid); in setup_bootmem_node() [all …]
|
| /Linux-v5.4/mm/ |
| D | page_ext.c | 135 static int __init alloc_node_page_ext(int nid) in alloc_node_page_ext() argument 141 nr_pages = NODE_DATA(nid)->node_spanned_pages; in alloc_node_page_ext() 150 if (!IS_ALIGNED(node_start_pfn(nid), MAX_ORDER_NR_PAGES) || in alloc_node_page_ext() 151 !IS_ALIGNED(node_end_pfn(nid), MAX_ORDER_NR_PAGES)) in alloc_node_page_ext() 158 MEMBLOCK_ALLOC_ACCESSIBLE, nid); in alloc_node_page_ext() 161 NODE_DATA(nid)->node_page_ext = base; in alloc_node_page_ext() 169 int nid, fail; in page_ext_init_flatmem() local 174 for_each_online_node(nid) { in page_ext_init_flatmem() 175 fail = alloc_node_page_ext(nid); in page_ext_init_flatmem() 205 static void *__meminit alloc_page_ext(size_t size, int nid) in alloc_page_ext() argument [all …]
|
| D | sparse.c | 53 static void set_section_nid(unsigned long section_nr, int nid) in set_section_nid() argument 55 section_to_node_table[section_nr] = nid; in set_section_nid() 58 static inline void set_section_nid(unsigned long section_nr, int nid) in set_section_nid() argument 64 static noinline struct mem_section __ref *sparse_index_alloc(int nid) in sparse_index_alloc() argument 71 section = kzalloc_node(array_size, GFP_KERNEL, nid); in sparse_index_alloc() 74 nid); in sparse_index_alloc() 77 __func__, array_size, nid); in sparse_index_alloc() 83 static int __meminit sparse_index_init(unsigned long section_nr, int nid) in sparse_index_init() argument 98 section = sparse_index_alloc(nid); in sparse_index_init() 107 static inline int sparse_index_init(unsigned long section_nr, int nid) in sparse_index_init() argument [all …]
|
| /Linux-v5.4/arch/x86/mm/ |
| D | numa.c | 130 static int __init numa_add_memblk_to(int nid, u64 start, u64 end, in numa_add_memblk_to() argument 138 if (start > end || nid < 0 || nid >= MAX_NUMNODES) { in numa_add_memblk_to() 140 nid, start, end - 1); in numa_add_memblk_to() 151 mi->blk[mi->nr_blks].nid = nid; in numa_add_memblk_to() 182 int __init numa_add_memblk(int nid, u64 start, u64 end) in numa_add_memblk() argument 184 return numa_add_memblk_to(nid, start, end, &numa_meminfo); in numa_add_memblk() 188 static void __init alloc_node_data(int nid) in alloc_node_data() argument 199 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); in alloc_node_data() 202 nd_size, nid); in alloc_node_data() 208 printk(KERN_INFO "NODE_DATA(%d) allocated [mem %#010Lx-%#010Lx]\n", nid, in alloc_node_data() [all …]
|
| /Linux-v5.4/arch/ia64/kernel/ |
| D | uncached.c | 75 static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) in uncached_add_chunk() argument 97 page = __alloc_pages_node(nid, in uncached_add_chunk() 150 status = gen_pool_add(uc_pool->pool, uc_addr, IA64_GRANULE_SIZE, nid); in uncached_add_chunk() 183 int nid; in uncached_alloc_page() local 190 nid = starting_nid; in uncached_alloc_page() 193 if (!node_state(nid, N_HIGH_MEMORY)) in uncached_alloc_page() 195 uc_pool = &uncached_pools[nid]; in uncached_alloc_page() 203 } while (uncached_add_chunk(uc_pool, nid) == 0); in uncached_alloc_page() 205 } while ((nid = (nid + 1) % MAX_NUMNODES) != starting_nid); in uncached_alloc_page() 222 int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); in uncached_free_page() local [all …]
|
| /Linux-v5.4/drivers/of/ |
| D | of_numa.c | 25 u32 nid; in of_numa_parse_cpu_nodes() local 30 r = of_property_read_u32(np, "numa-node-id", &nid); in of_numa_parse_cpu_nodes() 34 pr_debug("CPU on %u\n", nid); in of_numa_parse_cpu_nodes() 35 if (nid >= MAX_NUMNODES) in of_numa_parse_cpu_nodes() 36 pr_warn("Node id %u exceeds maximum value\n", nid); in of_numa_parse_cpu_nodes() 38 node_set(nid, numa_nodes_parsed); in of_numa_parse_cpu_nodes() 46 u32 nid; in of_numa_parse_memory_nodes() local 50 r = of_property_read_u32(np, "numa-node-id", &nid); in of_numa_parse_memory_nodes() 59 if (nid >= MAX_NUMNODES) { in of_numa_parse_memory_nodes() 60 pr_warn("Node id %u exceeds maximum value\n", nid); in of_numa_parse_memory_nodes() [all …]
|
| /Linux-v5.4/arch/powerpc/platforms/powernv/ |
| D | memtrace.c | 28 u32 nid; member 71 static bool memtrace_offline_pages(u32 nid, u64 start_pfn, u64 nr_pages) in memtrace_offline_pages() argument 95 static u64 memtrace_alloc_node(u32 nid, u64 size) in memtrace_alloc_node() argument 101 if (!node_spanned_pages(nid)) in memtrace_alloc_node() 104 start_pfn = node_start_pfn(nid); in memtrace_alloc_node() 105 end_pfn = node_end_pfn(nid); in memtrace_alloc_node() 113 if (memtrace_offline_pages(nid, base_pfn, nr_pages) == true) { in memtrace_alloc_node() 122 __remove_memory(nid, pfn << PAGE_SHIFT, bytes); in memtrace_alloc_node() 135 u32 nid; in memtrace_init_regions_runtime() local 145 for_each_online_node(nid) { in memtrace_init_regions_runtime() [all …]
|