diff options
| author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-05-20 13:58:54 +0200 | 
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-05-20 13:58:54 +0200 | 
| commit | e6828be5edcfea25cd70a2d1de41085c67ef9fa5 (patch) | |
| tree | 489ae4cdb47a4d83940e2472f49a3c601806b70e /tools/perf/builtin-record.c | |
| parent | 1fefc8ecb834c88edfc27e712d683872d0c541dd (diff) | |
| parent | c47452194641b5d27c20e557c84a46c85fd7ce37 (diff) | |
Merge tag 'spi-nor/for-5.19' into mtd/next
SPI NOR core changes:
- Read back written SR value to make sure the write was done correctly.
- Introduce a common function for Read ID that manufacturer drivers can
  use to verify the Octal DTR switch worked correctly.
- Add helpers for read/write any register commands so manufacturer
  drivers don't open code it every time.
- Clarify rdsr dummy cycles documentation.
- Add debugfs entry to expose internal flash parameters and state.
SPI NOR manufacturer drivers changes:
- Add support for Winbond W25Q512NW-IM, and Eon EN25QH256A.
- Move spi_nor_write_ear() to Winbond module since only Winbond flashes
  use it.
- Rework Micron and Cypress Octal DTR enable methods to improve
  readability.
- Use the common Read ID function to verify switch to Octal DTR mode for
  Micron and Cypress flashes.
- Skip polling status on volatile register writes for Micron and Cypress
  flashes since the operation is instant.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
| -rw-r--r-- | tools/perf/builtin-record.c | 22 | 
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ba74fab02e62..069825c48d40 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -989,8 +989,11 @@ static int record__thread_data_init_maps(struct record_thread *thread_data, stru  	struct mmap *overwrite_mmap = evlist->overwrite_mmap;  	struct perf_cpu_map *cpus = evlist->core.user_requested_cpus; -	thread_data->nr_mmaps = bitmap_weight(thread_data->mask->maps.bits, -					      thread_data->mask->maps.nbits); +	if (cpu_map__is_dummy(cpus)) +		thread_data->nr_mmaps = nr_mmaps; +	else +		thread_data->nr_mmaps = bitmap_weight(thread_data->mask->maps.bits, +						      thread_data->mask->maps.nbits);  	if (mmap) {  		thread_data->maps = zalloc(thread_data->nr_mmaps * sizeof(struct mmap *));  		if (!thread_data->maps) @@ -1007,16 +1010,17 @@ static int record__thread_data_init_maps(struct record_thread *thread_data, stru  		 thread_data->nr_mmaps, thread_data->maps, thread_data->overwrite_maps);  	for (m = 0, tm = 0; m < nr_mmaps && tm < thread_data->nr_mmaps; m++) { -		if (test_bit(cpus->map[m].cpu, thread_data->mask->maps.bits)) { +		if (cpu_map__is_dummy(cpus) || +		    test_bit(cpus->map[m].cpu, thread_data->mask->maps.bits)) {  			if (thread_data->maps) {  				thread_data->maps[tm] = &mmap[m];  				pr_debug2("thread_data[%p]: cpu%d: maps[%d] -> mmap[%d]\n", -					  thread_data, cpus->map[m].cpu, tm, m); +					  thread_data, perf_cpu_map__cpu(cpus, m).cpu, tm, m);  			}  			if (thread_data->overwrite_maps) {  				thread_data->overwrite_maps[tm] = &overwrite_mmap[m];  				pr_debug2("thread_data[%p]: cpu%d: ow_maps[%d] -> ow_mmap[%d]\n", -					  thread_data, cpus->map[m].cpu, tm, m); +					  thread_data, perf_cpu_map__cpu(cpus, m).cpu, tm, m);  			}  			tm++;  		} @@ -3329,6 +3333,9 @@ static void record__mmap_cpu_mask_init(struct mmap_cpu_mask *mask, struct perf_c  {  	int c; +	if (cpu_map__is_dummy(cpus)) +		return; +  	for (c = 0; c < cpus->nr; c++)  		set_bit(cpus->map[c].cpu, mask->bits);  } @@ -3680,6 +3687,11 @@ static int record__init_thread_masks(struct record *rec)  	if (!record__threads_enabled(rec))  		return record__init_thread_default_masks(rec, cpus); +	if (cpu_map__is_dummy(cpus)) { +		pr_err("--per-thread option is mutually exclusive to parallel streaming mode.\n"); +		return -EINVAL; +	} +  	switch (rec->opts.threads_spec) {  	case THREAD_SPEC__CPU:  		ret = record__init_thread_cpu_masks(rec, cpus);  | 
