Skip to content

Commit 5c38b7d

Browse files
committed
Merge tag 'xtensa-20200712' of git://github.com/jcmvbkbc/linux-xtensa
Pull Xtensa fixes from Max Filippov: - fix __sync_fetch_and_{and,or}_4 declarations to avoid build warning - update *pos in cpuinfo_op.next to avoid runtime warning - use for_each_set_bit in xtensa_pmu_irq_handler instead of open-coding it * tag 'xtensa-20200712' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: simplify xtensa_pmu_irq_handler xtensa: update *pos in cpuinfo_op.next xtensa: fix __sync_fetch_and_{and,or}_4 declarations
2 parents 4437dd6 + ee769eb commit 5c38b7d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

arch/xtensa/kernel/perf_event.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,7 @@ irqreturn_t xtensa_pmu_irq_handler(int irq, void *dev_id)
362362
struct xtensa_pmu_events *ev = this_cpu_ptr(&xtensa_pmu_events);
363363
unsigned i;
364364

365-
for (i = find_first_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS);
366-
i < XCHAL_NUM_PERF_COUNTERS;
367-
i = find_next_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS, i + 1)) {
365+
for_each_set_bit(i, ev->used_mask, XCHAL_NUM_PERF_COUNTERS) {
368366
uint32_t v = get_er(XTENSA_PMU_PMSTAT(i));
369367
struct perf_event *event = ev->event[i];
370368
struct hw_perf_event *hwc = &event->hw;

arch/xtensa/kernel/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,8 @@ c_start(struct seq_file *f, loff_t *pos)
724724
static void *
725725
c_next(struct seq_file *f, void *v, loff_t *pos)
726726
{
727-
return NULL;
727+
++*pos;
728+
return c_start(f, pos);
728729
}
729730

730731
static void

arch/xtensa/kernel/xtensa_ksyms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ void __xtensa_libgcc_window_spill(void)
8787
}
8888
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
8989

90-
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
90+
unsigned int __sync_fetch_and_and_4(volatile void *p, unsigned int v)
9191
{
9292
BUG();
9393
}
9494
EXPORT_SYMBOL(__sync_fetch_and_and_4);
9595

96-
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
96+
unsigned int __sync_fetch_and_or_4(volatile void *p, unsigned int v)
9797
{
9898
BUG();
9999
}

0 commit comments

Comments
 (0)