Xtensa fixes for v5.8:

- 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
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAl8LaYITHGpjbXZia2Jj
 QGdtYWlsLmNvbQAKCRBR+cyR+D+gRLXoEACXnorrMdJ96VzLH0u3EWwjkH5FXEF9
 Ue5y7p3MZYKLwuEtkChY+Je/skdSoUU5Mh9UGQMt3j+RiuJoHulal26Il8Nwgw0a
 luT0mLP/078z/uPAyBpKJcKGM5DTxm+Px318UPDOIAxOqkHoRH2miJCcOlMBUSMT
 zHMQhMu5AvuHqK7Uk1qGDelljRHvlP3V4IREhfNZHzc6tbAPy7K8ebgOH8JA5yr+
 +lNaAvUyDbCFlrwa8Du8ZZ3+NuFZrOMP7mQyAsfY85GAzOl3ATdRRCcVnERyX4yG
 r1hT1PnrYJqlojwLepF5vuFiaF/UkUc3UYwPEVum+dViFuOXZzQal7q/KKMSQrZ3
 TyxtTTitJMCgEDhIDDEoXnRMQ+6+uNQBv7UE3hCtdtfrLeDcDz7IDx6obXdoQbZc
 ZmHxh22pa4z35v6T/EHbpdoalJLfQzXiSA7Zevo7wGvY6VVhCUGXPVFdn1T0wJ76
 FG2p1mcalj8gF9A5U6vLP5t7VrpLC0xaZf5bYbMfPlzb3DGgmQzrfSe0q3nBBO0M
 Vq03eoorNsSLHyAqAuDAc5FaR1j7UPGd6i+Ci7taF+YO8L0gTRjuw4YYV4jv5wU0
 u1ZeERGOl2wTriedogt0X6v96xORt5KpXapc/aTOF0Lf+f4vRBGBjpAIUhQG+chU
 7vWK2pjHUxwRrA==
 =TseR
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2020-07-12 13:29:07 -07:00
commit 5c38b7d3c4
3 changed files with 5 additions and 6 deletions

View File

@ -362,9 +362,7 @@ irqreturn_t xtensa_pmu_irq_handler(int irq, void *dev_id)
struct xtensa_pmu_events *ev = this_cpu_ptr(&xtensa_pmu_events);
unsigned i;
for (i = find_first_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS);
i < XCHAL_NUM_PERF_COUNTERS;
i = find_next_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS, i + 1)) {
for_each_set_bit(i, ev->used_mask, XCHAL_NUM_PERF_COUNTERS) {
uint32_t v = get_er(XTENSA_PMU_PMSTAT(i));
struct perf_event *event = ev->event[i];
struct hw_perf_event *hwc = &event->hw;

View File

@ -724,7 +724,8 @@ c_start(struct seq_file *f, loff_t *pos)
static void *
c_next(struct seq_file *f, void *v, loff_t *pos)
{
return NULL;
++*pos;
return c_start(f, pos);
}
static void

View File

@ -87,13 +87,13 @@ void __xtensa_libgcc_window_spill(void)
}
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
unsigned int __sync_fetch_and_and_4(volatile void *p, unsigned int v)
{
BUG();
}
EXPORT_SYMBOL(__sync_fetch_and_and_4);
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
unsigned int __sync_fetch_and_or_4(volatile void *p, unsigned int v)
{
BUG();
}