From: Brent Casavant <bcasavan@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] SN2 user-MMIO CPU migration
Date: Thu, 26 Jan 2006 19:29:49 +0000 [thread overview]
Message-ID: <20060126132440.L40136@chenjesu.americas.sgi.com> (raw)
In-Reply-To: <20060118163305.Y42462@chenjesu.americas.sgi.com>
On Thu, 26 Jan 2006, Prarit Bhargava wrote:
> > diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
> > index e510dce..06f08b3 100644
> > --- a/arch/ia64/sn/kernel/setup.c
> > +++ b/arch/ia64/sn/kernel/setup.c
> > @@ -654,7 +655,8 @@ void __init sn_cpu_init(void)
> > SH2_PIO_WRITE_STATUS_1, SH2_PIO_WRITE_STATUS_3};
> > u64 *pio;
> > pio = is_shub1() ? pio1 : pio2;
> > - pda->pio_write_status_addr = (volatile unsigned long *)
> > LOCAL_MMR_ADDR(pio[slice]);
> > + pda->pio_write_status_addr = (volatile unsigned long *)
> > + GLOBAL_MMR_ADDR(nasid, pio[slice]);
>
> ALIGNMENT.
I don't see a better way to handle it without violating 80 columns.
> > diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c
> > b/arch/ia64/sn/kernel/sn2/sn2_smp.c
> > index 471bbaa..bd0e138 100644
> > --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
> > +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
> > @@ -169,6 +169,26 @@ static inline unsigned long wait_piowc(v
> > return ws;
> > }
> > +/**
> > + * sn_migrate - SN-specific task migration actions
> > + * @task: Task being migrated to new CPU
> > + *
> > + * SN2 PIO writes from separate CPUs are not guaranteed to arrive in order.
> > + * Context switching user threads which have memory-mapped MMIO may cause
> > + * PIOs to issue from seperate CPUs, thus the PIO writes must be drained
> > + * from the previous CPU's Shub before execution resumes on the new CPU.
> > + */
> > +void sn_migrate(struct task_struct *task)
> > +{
> > + pda_t *last_pda = pdacpu(task_thread_info(task)->last_cpu);
> > + volatile unsigned long *adr = last_pda->pio_write_status_addr;
> > + unsigned long val = last_pda->pio_write_status_val;
> > +
> > + /* Drain PIO writes from old CPU's Shub */
> > + while (unlikely((*adr & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK)
> > != val))
>
> 80 COLUMNS.
Again, tell me how to split this such that it fits in 80 and I'll gladly
do it. I don't see it.
> > diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
> > index 09b9902..8eabfec 100644
> > --- a/include/asm-ia64/processor.h
> > +++ b/include/asm-ia64/processor.h
> > @@ -50,7 +50,7 @@
> > #define IA64_THREAD_PM_VALID (__IA64_UL(1) << 2) /* performance
> > registers valid? */
> > #define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 3) /* don't log
> > unaligned accesses */
> > #define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4) /* generate
> > SIGBUS on unaligned acc. */
> > - /* bit 5 is currently
> > unused */
> > +#define IA64_THREAD_MIGRATION (__IA64_UL(1) << 5) /* require
> > migration sync at ctx sw */
>
> 80 COLUMNS.
Ditto.
> > diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h
> > index 80c5a23..f382dea 100644
> > --- a/include/asm-ia64/system.h
> > +++ b/include/asm-ia64/system.h
> > @@ -244,6 +244,12 @@ extern void ia64_load_extra (struct task
> > __ia64_save_fpu((prev)->thread.fph);
> > \
> > }
> > \
> > __switch_to(prev, next, last);
> > \
> > + /* "next" in old context is "current" in new context */
> > \
> > + if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) &&
> > \
> > + (task_cpu(current) !> > task_thread_info(current)->last_cpu))) { \
> > + platform_migrate(current);
> > \
> > + task_thread_info(current)->last_cpu = task_cpu(current);
> > \
> > + }
> > \
>
> 80 COLUMNS.
Following existing precedent in the same macro, and again no better
way to do it.
Brent
--
Brent Casavant All music is folk music. I ain't
bcasavan@sgi.com never heard a horse sing a song.
Silicon Graphics, Inc. -- Louis Armstrong
next prev parent reply other threads:[~2006-01-26 19:29 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-20 0:06 [PATCH] SN2 user-MMIO CPU migration Brent Casavant
2006-01-20 2:18 ` Jesse Barnes
2006-01-20 6:47 ` Brent Casavant
2006-01-20 17:36 ` Jesse Barnes
2006-01-20 20:01 ` Brent Casavant
2006-01-20 13:26 ` Jack Steiner
2006-01-20 17:31 ` Jesse Barnes
2006-01-20 19:00 ` Jack Steiner
2006-01-20 8:36 ` Ingo Molnar
2006-01-20 16:14 ` Brent Casavant
2006-01-24 0:33 ` Brent Casavant
2006-01-24 0:48 ` Luck, Tony
2006-01-24 1:23 ` Brent Casavant
2006-01-24 1:42 ` Keith Owens
2006-01-24 3:41 ` Grant Grundler
2006-01-24 6:30 ` Brent Casavant
2006-01-24 6:41 ` Brent Casavant
2006-01-24 7:04 ` Grant Grundler
2006-01-24 9:02 ` Ingo Molnar
2006-01-24 9:14 ` Jes Sorensen
2006-01-24 12:10 ` Robin Holt
2006-01-24 16:40 ` Grant Grundler
2006-01-24 16:52 ` Brent Casavant
2006-01-24 16:57 ` Brent Casavant
2006-01-24 17:00 ` Robin Holt
2006-01-24 17:33 ` Luck, Tony
2006-01-24 18:42 ` Grant Grundler
2006-01-24 21:12 ` Brent Casavant
2006-01-24 21:41 ` Ingo Molnar
2006-01-24 21:43 ` Chen, Kenneth W
2006-01-24 21:51 ` Luck, Tony
2006-01-24 22:04 ` Brent Casavant
2006-01-24 22:07 ` Chen, Kenneth W
2006-01-24 22:12 ` Brent Casavant
2006-01-24 22:19 ` Chen, Kenneth W
2006-01-24 22:31 ` Chen, Kenneth W
2006-01-24 22:41 ` Brent Casavant
2006-01-24 23:25 ` Chen, Kenneth W
2006-01-24 23:28 ` Brent Casavant
2006-01-24 23:36 ` Chen, Kenneth W
2006-01-24 23:54 ` Brent Casavant
2006-01-25 0:10 ` Brent Casavant
2006-01-25 0:29 ` Chen, Kenneth W
2006-01-25 6:27 ` Keith Owens
2006-01-25 9:04 ` Chen, Kenneth W
2006-01-25 9:24 ` Chen, Kenneth W
2006-01-25 17:04 ` Brent Casavant
2006-01-25 17:45 ` Brent Casavant
2006-01-25 17:48 ` Brent Casavant
2006-01-25 19:01 ` Chen, Kenneth W
2006-01-25 19:15 ` Brent Casavant
2006-01-25 19:43 ` Jack Steiner
2006-01-25 22:49 ` Brent Casavant
2006-01-25 23:09 ` Brent Casavant
2006-01-25 23:49 ` Brent Casavant
2006-01-25 23:56 ` Chen, Kenneth W
2006-01-26 1:06 ` Luck, Tony
2006-01-26 1:31 ` Prarit Bhargava
2006-01-26 2:43 ` Keith Owens
2006-01-26 4:40 ` Brent Casavant
2006-01-26 16:29 ` Brent Casavant
2006-01-26 16:41 ` Prarit Bhargava
2006-01-26 19:29 ` Brent Casavant [this message]
2006-01-26 19:54 ` Luck, Tony
2006-01-26 20:28 ` Brent Casavant
2006-01-26 21:05 ` Luck, Tony
2006-01-26 21:34 ` Prarit Bhargava
2006-01-26 22:11 ` Luck, Tony
2006-01-26 23:08 ` Luck, Tony
2006-01-26 23:21 ` Prarit Bhargava
2006-01-26 23:44 ` Prarit Bhargava
2006-01-27 0:07 ` Chen, Kenneth W
2006-01-27 14:01 ` Prarit Bhargava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060126132440.L40136@chenjesu.americas.sgi.com \
--to=bcasavan@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox