* Re: Export pda_percpu?
2005-03-15 4:44 Export pda_percpu? Christoph Lameter
@ 2005-03-15 15:37 ` Jack Steiner
2005-03-15 16:24 ` Jesse Barnes
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jack Steiner @ 2005-03-15 15:37 UTC (permalink / raw)
To: linux-ia64
On Mon, Mar 14, 2005 at 08:44:10PM -0800, Christoph Lameter wrote:
> In order for mmtimer to properly build as a module, it seems that we need
> access to the pda structure. This has been discussed before
> http://www.mail-archive.com/linux-ia64@vger.kernel.org/msg00472.html
> and was rejected. What else can I do? Define functions as suggested? Do
> these exist somewhere?
What fields from the pda do you need? I think we need to eliminate the pda.
The pda made sense in the 2.4 kernels but not in 2.6.
Some of the fields were recently removed as part of a SHUB2 patch.
The rest should be eliminated or moved.
>
> The mmtimer driver needs to muck around with pretty low level things in order
> to program the timer registers correctly.
>
> Index: linux-2.6.11/arch/ia64/sn/kernel/setup.c
> =================================> --- linux-2.6.11.orig/arch/ia64/sn/kernel/setup.c 2005-03-14 20:25:43.000000000 -0800
> +++ linux-2.6.11/arch/ia64/sn/kernel/setup.c 2005-03-14 20:31:49.000000000 -0800
> @@ -54,6 +54,9 @@
>
> DEFINE_PER_CPU(struct pda_s, pda_percpu);
>
> +/* mmtimer needs this to properly function */
> +EXPORT_SYMBOL(per_cpu__pda_percpu);
> +
> #define MAX_PHYS_MEMORY (1UL << 49) /* 1 TB */
>
> lboard_t *root_lboard[MAX_COMPACT_NODES];
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Export pda_percpu?
2005-03-15 4:44 Export pda_percpu? Christoph Lameter
2005-03-15 15:37 ` Jack Steiner
@ 2005-03-15 16:24 ` Jesse Barnes
2005-03-16 4:33 ` Christoph Lameter
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jesse Barnes @ 2005-03-15 16:24 UTC (permalink / raw)
To: linux-ia64
On Tuesday, March 15, 2005 7:37 am, Jack Steiner wrote:
> On Mon, Mar 14, 2005 at 08:44:10PM -0800, Christoph Lameter wrote:
> > In order for mmtimer to properly build as a module, it seems that we need
> > access to the pda structure. This has been discussed before
> > http://www.mail-archive.com/linux-ia64@vger.kernel.org/msg00472.html
> > and was rejected. What else can I do? Define functions as suggested? Do
> > these exist somewhere?
>
> What fields from the pda do you need? I think we need to eliminate the pda.
> The pda made sense in the 2.4 kernels but not in 2.6.
>
> Some of the fields were recently removed as part of a SHUB2 patch.
> The rest should be eliminated or moved.
You can also create accessor functions for the fields you need and export them
instead. I'd rather get rid of the PDA though.
Jesse
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Export pda_percpu?
2005-03-15 4:44 Export pda_percpu? Christoph Lameter
2005-03-15 15:37 ` Jack Steiner
2005-03-15 16:24 ` Jesse Barnes
@ 2005-03-16 4:33 ` Christoph Lameter
2005-03-16 6:42 ` Luck, Tony
2005-03-16 13:51 ` Jack Steiner
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2005-03-16 4:33 UTC (permalink / raw)
To: linux-ia64
On Tue, 15 Mar 2005, Jesse Barnes wrote:
> > What fields from the pda do you need? I think we need to eliminate the pda.
> > The pda made sense in the 2.4 kernels but not in 2.6.
> >
> > Some of the fields were recently removed as part of a SHUB2 patch.
> > The rest should be eliminated or moved.
>
> You can also create accessor functions for the fields you need and export them
> instead. I'd rather get rid of the PDA though.
I need cnodeid_to_nasid() to figure out which SHUB to use from mmtimer.
however cnodeid_to_nasid is defined as
#define cnodeid_to_nasid(cnodeid) pda->cnodeid_to_nasid_table[cnodeid]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Export pda_percpu?
2005-03-15 4:44 Export pda_percpu? Christoph Lameter
` (2 preceding siblings ...)
2005-03-16 4:33 ` Christoph Lameter
@ 2005-03-16 6:42 ` Luck, Tony
2005-03-16 13:51 ` Jack Steiner
4 siblings, 0 replies; 6+ messages in thread
From: Luck, Tony @ 2005-03-16 6:42 UTC (permalink / raw)
To: linux-ia64
>I need cnodeid_to_nasid() to figure out which SHUB to use from mmtimer.
>
>
>however cnodeid_to_nasid is defined as
>
>#define cnodeid_to_nasid(cnodeid)
>pda->cnodeid_to_nasid_table[cnodeid]
Cleaner to turn cnodeid_to_nasid() into a real function
and export that. Is it used in critical performance paths?
-Tony
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Export pda_percpu?
2005-03-15 4:44 Export pda_percpu? Christoph Lameter
` (3 preceding siblings ...)
2005-03-16 6:42 ` Luck, Tony
@ 2005-03-16 13:51 ` Jack Steiner
4 siblings, 0 replies; 6+ messages in thread
From: Jack Steiner @ 2005-03-16 13:51 UTC (permalink / raw)
To: linux-ia64
On Tue, Mar 15, 2005 at 10:42:02PM -0800, Luck, Tony wrote:
> >I need cnodeid_to_nasid() to figure out which SHUB to use from mmtimer.
> >
> >
> >however cnodeid_to_nasid is defined as
> >
> >#define cnodeid_to_nasid(cnodeid)
> >pda->cnodeid_to_nasid_table[cnodeid]
>
> Cleaner to turn cnodeid_to_nasid() into a real function
> and export that. Is it used in critical performance paths?
>
> -Tony
AFAICT, none of the current uses are on performance critical pathes.
Making it a real function & exporting it is probably the best thing to
do. An alternative would be to remove cnodeid_to_nasid_table[] from
the pda & make it an exported table.
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
^ permalink raw reply [flat|nested] 6+ messages in thread