Skip to content

Commit

Permalink
Merge tag 'asm-generic-fixes-v5.11' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/arnd/asm-generic

Pull ia64 fixes from Arnd Bergmann:
 "asm-generic/ia64 fixes, and mark as orphaned

  Commit 2b49ddc ("ia64: convert to legacy_timer_tick") from my
  timer series I merged through the asm-generic tree caused a regression
  on all ia64 machines, as bisected by Adrian Glaubitz.

  Tony Luck is no longer really working on ia64, so instead of merging
  the fix through his tree, we ended up deciding that I'd merge the fix
  myself along a patch to mark the architecture as Orphaned and a
  compile time warning fix I made while working on the regression"

[ HPE no longer accepts orders for new Itanium hardware, and Intel
  stopped accepting orders a year ago. While intel is still officially
  shipping chips until July 29, 2021, it's unlikely that any such orders
  actually exist.

  It's dead, Jim.
                     - Linus ]

* tag 'asm-generic-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  ia64: Mark architecture as orphaned
  ia64: fix xchg() warning
  ia64: fix timer cleanup regression
  • Loading branch information
Linus Torvalds committed Jan 28, 2021
2 parents 7485e08 + 96ec72a commit 228345b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
5 changes: 1 addition & 4 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8433,11 +8433,8 @@ F: drivers/i3c/
F: include/linux/i3c/

IA64 (Itanium) PLATFORM
M: Tony Luck <tony.luck@intel.com>
M: Fenghua Yu <fenghua.yu@intel.com>
L: linux-ia64@vger.kernel.org
S: Odd Fixes
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
S: Orphan
F: Documentation/ia64/
F: arch/ia64/

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/include/uapi/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern void ia64_xchg_called_with_bad_pointer(void);
})

#define xchg(ptr, x) \
((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
({(__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)));})

/*
* Atomic compare and exchange. Compare OLD with MEM, if identical,
Expand Down
31 changes: 18 additions & 13 deletions arch/ia64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,29 +171,34 @@ void vtime_account_hardirq(struct task_struct *tsk)
static irqreturn_t
timer_interrupt (int irq, void *dev_id)
{
unsigned long cur_itm, new_itm, ticks;
unsigned long new_itm;

if (cpu_is_offline(smp_processor_id())) {
return IRQ_HANDLED;
}

new_itm = local_cpu_data->itm_next;
cur_itm = ia64_get_itc();

if (!time_after(cur_itm, new_itm)) {
if (!time_after(ia64_get_itc(), new_itm))
printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n",
cur_itm, new_itm);
ticks = 1;
} else {
ticks = DIV_ROUND_UP(cur_itm - new_itm,
local_cpu_data->itm_delta);
new_itm += ticks * local_cpu_data->itm_delta;
}
ia64_get_itc(), new_itm);

while (1) {
new_itm += local_cpu_data->itm_delta;

legacy_timer_tick(smp_processor_id() == time_keeper_id);

if (smp_processor_id() != time_keeper_id)
ticks = 0;
local_cpu_data->itm_next = new_itm;

legacy_timer_tick(ticks);
if (time_after(new_itm, ia64_get_itc()))
break;

/*
* Allow IPIs to interrupt the timer loop.
*/
local_irq_enable();
local_irq_disable();
}

do {
/*
Expand Down

0 comments on commit 228345b

Please sign in to comment.