Commit 228345bf authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'asm-generic-fixes-v5.11' of...

Merge tag 'asm-generic-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

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

  Commit 2b49ddce ("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
parents 7485e08e 96ec72a3
......@@ -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/
......
......@@ -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,
......
......@@ -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 {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment