lkml.org 
[lkml]   [2008]   [Sep]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 7 Sep 2008 09:55:17 +0200
From"Bert Wesarg" <>
SubjectRe: [RFC 11/13] genapic: reduce stack pressuge in io_apic.c step 3 target_cpus
On Sun, Sep 7, 2008 at 01:50, Mike Travis <travis@sgi.com> wrote:
>  * Step 3 "target_cpus" of cleaning up io_apic.c modifies the TARGET_CPUS
>    interface to pass a pointer to the returned mask for arch X86_64,
>    removing yet another "cpumask_t variable on the stack".
>
>        target_cpus = TARGET_CPUS;
>
>    becomes:
>
>        TARGET_CPUS(target_cpus);
>
>    For x86_32 this is expanded to:
>
>        target_cpus = (genapic->target_cpus());
>
>    For x86_64 this is expanded to:
>
>        target_cpus = (genapic->target_cpus)(&(target_cpus));
But its expended to:
         (genapic->target_cpus)(&(target_cpus));

> -#define TARGET_CPUS      (genapic->target_cpus())
> +#define TARGET_CPUS(retval) (genapic->target_cpus)(&(retval))


> +#ifdef CONFIG_X86_64
> +#define TARGET_CPUS(retval)      (genapic->target_cpus)(&(retval))
> +#else
> +#define TARGET_CPUS(retval)      retval = (genapic->target_cpus())
> +#endif

Bert


\
 
 \ /
  Last update: 2008-09-07 09:57    [from the cache]
©2003-2008