# Re: powerpc/pseries: Use new defines when calling h\_set\_mode

- From: Michael Neuling \<hidden\>
- Date: 2014-05-30 09:10:47 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2014/05/9479491
- Thread: https://ratatoskr.run/linuxppc-dev/2014/05/9479473/t.md

```text
On Fri, 2014-05-30 at 18:56 +1000, Michael Ellerman wrote:
> On Thu, 2014-05-29 at 17:45 +1000, Michael Neuling wrote:
> > > > +/* Values for 2nd argument to H_SET_MODE */
> > > > +#define H_SET_MODE_RESOURCE_SET_CIABR        1
> > > > +#define H_SET_MODE_RESOURCE_SET_DAWR        2
> > > > +#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE    3
> > > > +#define H_SET_MODE_RESOURCE_LE            4
> > >=20
> > > Much better, but I think you want to make use of these in non-kvm cod=
e too,
> > > no? At least the LE one is definitely already implemented as call :)
> >=20
> > powerpc/pseries: Use new defines when calling h_set_mode
> >=20
> > Now that we define these in the KVM code, use these defines when we cal=
l
> > h_set_mode.  No functional change.
> >=20
> > Signed-off-by: Michael Neuling <redacted>
> > --
> > This depends on the KVM h_set_mode patches.
> >=20
> > diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/i=
nclude/asm/plpar_wrappers.h
> > index 12c32c5..67859ed 100644
> > --- a/arch/powerpc/include/asm/plpar_wrappers.h
> > +++ b/arch/powerpc/include/asm/plpar_wrappers.h
> > @@ -273,7 +273,7 @@ static inline long plpar_set_mode(unsigned long mfl=
ags, unsigned long resource,
> >  static inline long enable_reloc_on_exceptions(void)
> >  {
> >  	/* mflags =3D 3: Exceptions at 0xC000000000004000 */
> > -	return plpar_set_mode(3, 3, 0, 0);
> > +	return plpar_set_mode(3, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
> >  }
>=20
> Which header are these coming from, and why aren't we including it? And i=
s it
> going to still build with CONFIG_KVM=3Dn?

=46rom include/asm/hvcall.h in the h_set_mode patch set I sent before.

And yes it compiles with CONFIG_KVM=3Dn fine.

Mikey
```
