Re: [PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__

2015-09-10 Thread David Howells
Palmer Dabbelt wrote: > +#ifdef __KERNEL__ > enum bp_type_idx { > TYPE_INST = 0, > -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS > +#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS) > TYPE_DATA = 0, > #else > TYPE_DATA = 1, > #endif >

[PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
I'm actually not sure what to do here: if this enum is meant to be used by userspace, then it has to be the same regardless of kernel configuration. One option would be to have the kernel expose all the values to userspace and then map them internally if CONFIG_HAVE_MIXED_BREAKPOINT_REGS isn't