Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-20 Thread Heiko Carstens
On Wed, Feb 20, 2008 at 11:09:33AM +0100, Bastian Blank wrote: > On Wed, Feb 20, 2008 at 10:45:52AM +0100, Heiko Carstens wrote: > > - copy_page(lowcore, &S390_lowcore); > > + memcpy(lowcore, &S390_lowcore, 512); > > Okay > > > memset((void *)lowcore + 512, 0, sizeof(*lowcore) - 512); >

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-20 Thread Bastian Blank
On Wed, Feb 20, 2008 at 10:45:52AM +0100, Heiko Carstens wrote: > - copy_page(lowcore, &S390_lowcore); > + memcpy(lowcore, &S390_lowcore, 512); Okay > memset((void *)lowcore + 512, 0, sizeof(*lowcore) - 512); Not completely okay. void pointer are not allowed in arithmetic. gcc hand

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-20 Thread Heiko Carstens
Boah, workaround alert. Why do you not fix the compiler? >>> >>> We need to copy from address 0 (that's where the lowcore resides). But >>> gcc >>> insists to complain if memcpy is used with src == NULL.. Now what? >> >> Erm sorry, misread your question. Usually it's a bug to use memcpy with

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-19 Thread Segher Boessenkool
+ /* +* Only need to copy the first 512 bytes from address 0. But since + * the compiler emits a warning if src == NULL for memcpy use copy_page + * instead. Copies more than needed but this code is not performance +* critical. +*/ + copy_page(lowcore, &S39

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-19 Thread Heiko Carstens
On Tue, Feb 19, 2008 at 04:38:56PM +0100, Heiko Carstens wrote: > On Tue, Feb 19, 2008 at 04:13:55PM +0100, Bastian Blank wrote: > > On Tue, Feb 19, 2008 at 03:40:54PM +0100, Martin Schwidefsky wrote: > > > + /* > > > + * Only need to copy the first 512 bytes from address 0. But since > > > + * t

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-19 Thread Heiko Carstens
On Tue, Feb 19, 2008 at 04:13:55PM +0100, Bastian Blank wrote: > On Tue, Feb 19, 2008 at 03:40:54PM +0100, Martin Schwidefsky wrote: > > + /* > > +* Only need to copy the first 512 bytes from address 0. But since > > +* the compiler emits a warning if src == NULL for memcpy use copy_page

Re: [patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-19 Thread Bastian Blank
On Tue, Feb 19, 2008 at 03:40:54PM +0100, Martin Schwidefsky wrote: > + /* > + * Only need to copy the first 512 bytes from address 0. But since > + * the compiler emits a warning if src == NULL for memcpy use copy_page > + * instead. Copies more than needed but this code is not

[patch 07/13] Initialize per cpu lowcores on cpu hotplug.

2008-02-19 Thread Martin Schwidefsky
From: Heiko Carstens <[EMAIL PROTECTED]> Just copy the first 512 read-only bytes of the current cpu lowcore if a new cpu gets onlined. The rest is zeroed out and must be explicitly initialized. Current code just copies the entire lowcore and initializes the needed fields. This should reveal bugs i