From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH v2] booke: Added ONE_REG interface for IAC/DAC debug registers Date: Tue, 24 Jul 2012 16:56:46 +0200 Message-ID: <500EB7AE.1090004@suse.de> References: <1343042364-30869-1-git-send-email-Bharat.Bhushan@freescale.com> <500D70C9.2080609@freescale.com> <6A3DF150A5B70D4F9B66A25E3F7C888D03DD59C8@039-SN2MPN1-023.039d.mgd.msft.net> <500D8CE1.1050707@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D03DD61E6@039-SN2MPN1-023.039d.mgd.msft.net> <500E9923.8070504@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D03DD6CD4@039-SN2MPN1-023.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Wood Scott-B07421 , "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" To: Bhushan Bharat-R65777 Return-path: Received: from cantor2.suse.de ([195.135.220.15]:48416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754476Ab2GXO4v (ORCPT ); Tue, 24 Jul 2012 10:56:51 -0400 In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D03DD6CD4@039-SN2MPN1-023.039d.mgd.msft.net> Sender: kvm-owner@vger.kernel.org List-ID: On 07/24/2012 03:26 PM, Bhushan Bharat-R65777 wrote: >>>>>>> +struct kvmppc_debug_reg { >>>>>>> +#ifdef CONFIG_BOOKE >>>>>>> + u32 dbcr0; >>>>>>> + u32 dbcr1; >>>>>>> + u32 dbcr2; >>>>>>> +#ifdef CONFIG_KVM_E500MC >>>>>>> + u32 dbcr4; >>>>>>> +#endif >>>>>>> + u64 iac[KVMPPC_MAX_IAC]; >>>>>>> + u64 dac[KVMPPC_MAX_DAC]; >>>>>>> +#endif >>>>>>> +}; >>>>>> Is there any reason for this to be a separate struct? >>>>> No specific reason, The rest of debug ( which will follow sometime >>>>> soon) uses >>>> this structure and looks to make code look easy. >>>> >>>> So why not use an fsl / booke specific struct for the debug patches >>>> then? Debug registers are really nothing common between book3s and >>>> booke, so we shouldn't treat them as such by using the same struct >> definition. >>> All elements of struct are under #ifdef CONFIG_BOOKE? So for book3s it is as >> good as void, only struct type if declared. Do you want the struct type also >> under config_booke ? >> >> struct kvmppc_booke_debug_reg { >> >> }; >> >> struct kvmppc_book3s_debug_reg { >> >> }; >> >> void booke_foo() { >> struct kvmppc_booke_debug_reg r; > kvmppc_booke_debug_reg or kvmppc_book3s_debug_reg ? In booke_foo() you certainly will never want to use struct kvmppc_book3s_debug_reg, no? Alex