linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Piet Delaney <piet@www.piet.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Thomas Schlichter <schlicht@uni-mannheim.de>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out
Date: 09 Jul 2003 22:44:50 -0700	[thread overview]
Message-ID: <1057815890.22772.19.camel@www.piet.net> (raw)
In-Reply-To: <20030709021849.31eb3aec.akpm@osdl.org>

On Wed, 2003-07-09 at 02:18, Andrew Morton wrote:
> Thomas Schlichter <schlicht@uni-mannheim.de> wrote:
.
.
. 
> Seems complex.  I just have this:
> 
> 
> diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c
> --- 25/arch/i386/kernel/apm.c~cpumask-apm-fix-2	2003-07-08 23:09:23.000000000 -0700
> +++ 25-akpm/arch/i386/kernel/apm.c	2003-07-08 23:28:50.000000000 -0700
> @@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
>   *	No CPU lockdown needed on a uniprocessor
>   */
>   
> -#define apm_save_cpus()	0
> +#define apm_save_cpus()		CPU_MASK_NONE
>  #define apm_restore_cpus(x)	(void)(x)

I tried this and got a parse error. So I assumed perhaps I
needed to upgrade to the latest C compiler to be able
to handle the assignment of a inline static initializer:

      #define CPU_MASK_NONE   { {[0 ... CPU_ARRAY_SIZE-1] =  0UL} }

I was disappointed that using gcc 3.3 didn't fix the problem:
----------------------------------------------------------------------
  CC      arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:599: error: parse error before '{' token
arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:642: error: parse error before '{' token
arch/i386/kernel/apm.c: In function `apm_power_off':
arch/i386/kernel/apm.c:920: warning: braces around scalar initializer
arch/i386/kernel/apm.c:920: warning: (near initialization for
`(anonymous)')
arch/i386/kernel/apm.c:920: error: array index in non-array initializer
arch/i386/kernel/apm.c:920: error: (near initialization for
`(anonymous)')
arch/i386/kernel/apm.c:920: error: invalid initializer
arch/i386/kernel/apm.c:920: error: (near initialization for
`(anonymous)')
------------------------------------------------------------------------------

I'll settle for Matt Mackall <mpm@selenic.com> fix for now:

    +#define apm_save_cpus()        (current->cpus_allowed)

I wonder why other, like Thomas Schlichter <schlicht@uni-mannheim.de>,
had no problem with the CPU_MASK_NONE fix.

I tried adding the #include <linux/cpumask.h> that Marc-Christian
Petersen <m.c.p@wolk-project.de> sugested but it didn't help. Looks
like Jan De Luyck <lkml@kcore.org> had a similar result. 

-piet
 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
-- 
piet@www.piet.net


  parent reply	other threads:[~2003-07-10  5:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09  5:35 2.5.74-mm3 Andrew Morton
2003-07-09  9:05 ` 2.5.74-mm3 Thomas Schlichter
2003-07-09  9:18   ` 2.5.74-mm3 Andrew Morton
2003-07-09  9:25     ` 2.5.74-mm3 Thomas Schlichter
2003-07-09  9:38     ` 2.5.74-mm3 Marc-Christian Petersen
2003-07-09 11:23       ` 2.5.74-mm3 Jan De Luyck
2003-07-09 13:23       ` 2.5.74-mm3 Ramón Rey Vicente󮠒
2003-07-10  5:44     ` Piet Delaney [this message]
2003-07-10  6:08       ` 2.5.74-mm3 - apm_save_cpus() Macro still bombs out William Lee Irwin III
2003-07-10  7:10         ` William Lee Irwin III
2003-07-10  7:18           ` Andrew Morton
2003-07-10  7:59             ` William Lee Irwin III
2003-07-10  4:09               ` hptraid.o -- No array found? Seth Chromick
2003-07-10 12:20                 ` Alan Cox
2003-07-10  8:15             ` 2.5.74-mm3 - module-init-tools: necessary to replace root copies? Piet Delaney
2003-07-10  8:15             ` Piet Delaney
2003-07-10  8:23               ` Andrew Morton
2003-07-10  9:22       ` 2.5.74-mm3 - apm_save_cpus() Macro still bombs out Thomas Schlichter
2003-07-10  9:27         ` William Lee Irwin III
2003-07-10  9:42           ` Thomas Schlichter
2003-07-10  9:48             ` William Lee Irwin III
2003-07-10  9:59               ` Thomas Schlichter
2003-07-10 10:30                 ` William Lee Irwin III
2003-07-10 10:49                   ` Thomas Schlichter
2003-07-11 14:56                   ` Matt Mackall
2003-07-09  9:24 ` 2.5.74-mm3 Matt Mackall
2003-07-09  9:29   ` 2.5.74-mm3 William Lee Irwin III
2003-07-10 18:21 ` 2.5.74-mm3 Valdis.Kletnieks
2003-07-11  8:25   ` 2.5.74-mm3 Joe Thornber
2003-07-11 16:02     ` 2.5.74-mm3 Anton Blanchard

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=1057815890.22772.19.camel@www.piet.net \
    --to=piet@www.piet.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schlicht@uni-mannheim.de \
    /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;
as well as URLs for NNTP newsgroup(s).