From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [PATCH 1/1] c/r: define s390-specific checkpoint-restart code (v3) Date: Tue, 3 Feb 2009 13:41:18 -0600 Message-ID: <20090203194118.GA21391@us.ibm.com> References: <20090203161223.GA17998@us.ibm.com> <87k58748kn.fsf@caffeine.danplanet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <87k58748kn.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dan Smith Cc: linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, schwidefsky-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Linux Containers , linux390-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Thomas Gleixner List-Id: containers.vger.kernel.org Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org): > SH> +static void cr_save_cpu_regs(struct cr_hdr_cpu *hh, struct task_struct *t) > SH> +{ > > > > SH> + /* per_info */ > SH> + memcpy(&hh->per_control_regs, &thread->per_info.control_regs.words, > SH> + 3 * sizeof(unsigned long)); > SH> + hh->em_instr = 0; > SH> + if (thread->per_info.single_step) > SH> + hh->em_instr |= 1; > SH> + if (thread->per_info.instruction_fetch) > SH> + hh->em_instr |= 2; > > I think that defining these constants (3, 1, and 2) would help me > understand what's being done here. You use them again in > cr_read_cpu(), which also makes it worthwhile I think. Good point, those should be defines. Thanks. -serge