From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4XwV-0007ts-WA for qemu-devel@nongnu.org; Tue, 08 Jul 2014 12:08:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4XwQ-0002NF-JD for qemu-devel@nongnu.org; Tue, 08 Jul 2014 12:08:31 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:6166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4XwQ-0002MM-Cz for qemu-devel@nongnu.org; Tue, 08 Jul 2014 12:08:26 -0400 Message-ID: <53BC1778.2030908@imgtec.com> Date: Tue, 8 Jul 2014 17:08:24 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1404806257-28048-1-git-send-email-leon.alrae@imgtec.com> <1404806257-28048-3-git-send-email-leon.alrae@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/9] softmmu: provide softmmu access type enum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, QEMU Developers , Aurelien Jarno Hi Peter, On 08/07/2014 14:00, Peter Maydell wrote: > On 8 July 2014 08:57, Leon Alrae wrote: >> New MIPS features depend on the access type and enum is more convenient than >> using the numbers directly. >> > Mmm, I've thought for a while it would be better to have this > be an enum, but never got round to it. > >> Signed-off-by: Leon Alrae >> --- >> include/exec/cpu-common.h | 6 ++++++ >> softmmu_template.h | 26 ++++++++++++++++---------- >> 2 files changed, 22 insertions(+), 10 deletions(-) >> >> diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h >> index e3ec4c8..1c3171a 100644 >> --- a/include/exec/cpu-common.h >> +++ b/include/exec/cpu-common.h >> @@ -26,6 +26,12 @@ typedef struct CPUListState { >> FILE *file; >> } CPUListState; >> >> +enum mmu_access_type { > > CODING_STYLE says enum names should be CamelCase. > I think you also want this to be a typedef. The style was copied from "enum device_endian {" which is few lines below, I assumed it was correct :) I'll fix this. >> + MMU_DATA_LOAD = 0, >> + MMU_DATA_STORE = 1, >> + MMU_INST_FETCH = 2 >> +}; >> + > > We should probably also chase through and update the > prototypes of functions like tlb_fill() and cpu_unaligned_access() > and so on to take this enum type rather than int. (I > suspect there's a lot of those running into different > targets so it might need doing over multiple patches.) > > thanks > -- PMM > I intentionally skipped this here to focus this patchset on the new features only. I also think that eventually we will have to update the prototypes and go through all the targets. Thanks, Leon