From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Smith Subject: Re: [PATCH 1/1] c/r: define s390-specific checkpoint-restart code (v3) Date: Tue, 03 Feb 2009 11:35:52 -0800 Message-ID: <87k58748kn.fsf@caffeine.danplanet.com> References: <20090203161223.GA17998@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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: "Serge E. Hallyn" 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 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. -- Dan Smith IBM Linux Technology Center email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org