Message ID | 20210118162537.779542-1-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
Series | arm: rename xlnx-zcu102.canbusN properties | expand |
On Mon, 18 Jan 2021 at 16:25, Paolo Bonzini <pbonzini@redhat.com> wrote: > > The properties to attach a CANBUS object to the xlnx-zcu102 machine have > a period in them. We want to use periods in properties for compound QAPI types, > and besides the "xlnx-zcu102." prefix is both unnecessary and different > from any other machine property name. Remove it. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> I was wondering if we needed to go through the 2-release deprecate-and-drop before we could rename these, but luckily for us they were only added in this cycle so we've never released a QEMU with the current naming. thanks -- PMM
Just noticed this wasn't cc'd to the Xilinx folks. Would one of you like to review it? thanks -- PMM On Mon, 18 Jan 2021 at 16:25, Paolo Bonzini <pbonzini@redhat.com> wrote: > > The properties to attach a CANBUS object to the xlnx-zcu102 machine have > a period in them. We want to use periods in properties for compound QAPI types, > and besides the "xlnx-zcu102." prefix is both unnecessary and different > from any other machine property name. Remove it. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > hw/arm/xlnx-zcu102.c | 4 ++-- > tests/qtest/xlnx-can-test.c | 30 +++++++++++++++--------------- > 2 files changed, 17 insertions(+), 17 deletions(-) > > diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c > index 4ef0c516bf..c9713638c5 100644 > --- a/hw/arm/xlnx-zcu102.c > +++ b/hw/arm/xlnx-zcu102.c > @@ -219,12 +219,12 @@ static void xlnx_zcu102_machine_instance_init(Object *obj) > s->secure = false; > /* Default to virt (EL2) being disabled */ > s->virt = false; > - object_property_add_link(obj, "xlnx-zcu102.canbus0", TYPE_CAN_BUS, > + object_property_add_link(obj, "canbus0", TYPE_CAN_BUS, > (Object **)&s->canbus[0], > object_property_allow_set_link, > 0); > > - object_property_add_link(obj, "xlnx-zcu102.canbus1", TYPE_CAN_BUS, > + object_property_add_link(obj, "canbus1", TYPE_CAN_BUS, > (Object **)&s->canbus[1], > object_property_allow_set_link, > 0); > diff --git a/tests/qtest/xlnx-can-test.c b/tests/qtest/xlnx-can-test.c > index 3d1120005b..54de71a686 100644 > --- a/tests/qtest/xlnx-can-test.c > +++ b/tests/qtest/xlnx-can-test.c > @@ -138,9 +138,9 @@ static void test_can_bus(void) > uint8_t can_timestamp = 1; > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > - " -object can-bus,id=canbus0" > - " -machine xlnx-zcu102.canbus0=canbus0" > - " -machine xlnx-zcu102.canbus1=canbus0" > + " -object can-bus,id=canbus" > + " -machine canbus0=canbus" > + " -machine canbus1=canbus" > ); > > /* Configure the CAN0 and CAN1. */ > @@ -175,9 +175,9 @@ static void test_can_loopback(void) > uint32_t status = 0; > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > - " -object can-bus,id=canbus0" > - " -machine xlnx-zcu102.canbus0=canbus0" > - " -machine xlnx-zcu102.canbus1=canbus0" > + " -object can-bus,id=canbus" > + " -machine canbus0=canbus" > + " -machine canbus1=canbus" > ); > > /* Configure the CAN0 in loopback mode. */ > @@ -223,9 +223,9 @@ static void test_can_filter(void) > uint8_t can_timestamp = 1; > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > - " -object can-bus,id=canbus0" > - " -machine xlnx-zcu102.canbus0=canbus0" > - " -machine xlnx-zcu102.canbus1=canbus0" > + " -object can-bus,id=canbus" > + " -machine canbus0=canbus" > + " -machine canbus1=canbus" > ); > > /* Configure the CAN0 and CAN1. */ > @@ -271,9 +271,9 @@ static void test_can_sleepmode(void) > uint8_t can_timestamp = 1; > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > - " -object can-bus,id=canbus0" > - " -machine xlnx-zcu102.canbus0=canbus0" > - " -machine xlnx-zcu102.canbus1=canbus0" > + " -object can-bus,id=canbus" > + " -machine canbus0=canbus" > + " -machine canbus1=canbus" > ); > > /* Configure the CAN0. */ > @@ -317,9 +317,9 @@ static void test_can_snoopmode(void) > uint8_t can_timestamp = 1; > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > - " -object can-bus,id=canbus0" > - " -machine xlnx-zcu102.canbus0=canbus0" > - " -machine xlnx-zcu102.canbus1=canbus0" > + " -object can-bus,id=canbus" > + " -machine canbus0=canbus" > + " -machine canbus1=canbus" > ); > > /* Configure the CAN0. */ > -- > 2.26.2
On Fri, Jan 22, 2021 at 01:21:53PM +0000, Peter Maydell wrote: > Just noticed this wasn't cc'd to the Xilinx folks. Would one > of you like to review it? Looks good to me but we need to also update the test cases in tests/qtest/xlnx-can-test.c. Cheers, Edgar > > thanks > -- PMM > > On Mon, 18 Jan 2021 at 16:25, Paolo Bonzini <pbonzini@redhat.com> wrote: > > > > The properties to attach a CANBUS object to the xlnx-zcu102 machine have > > a period in them. We want to use periods in properties for compound QAPI types, > > and besides the "xlnx-zcu102." prefix is both unnecessary and different > > from any other machine property name. Remove it. > > > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > --- > > hw/arm/xlnx-zcu102.c | 4 ++-- > > tests/qtest/xlnx-can-test.c | 30 +++++++++++++++--------------- > > 2 files changed, 17 insertions(+), 17 deletions(-) > > > > diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c > > index 4ef0c516bf..c9713638c5 100644 > > --- a/hw/arm/xlnx-zcu102.c > > +++ b/hw/arm/xlnx-zcu102.c > > @@ -219,12 +219,12 @@ static void xlnx_zcu102_machine_instance_init(Object *obj) > > s->secure = false; > > /* Default to virt (EL2) being disabled */ > > s->virt = false; > > - object_property_add_link(obj, "xlnx-zcu102.canbus0", TYPE_CAN_BUS, > > + object_property_add_link(obj, "canbus0", TYPE_CAN_BUS, > > (Object **)&s->canbus[0], > > object_property_allow_set_link, > > 0); > > > > - object_property_add_link(obj, "xlnx-zcu102.canbus1", TYPE_CAN_BUS, > > + object_property_add_link(obj, "canbus1", TYPE_CAN_BUS, > > (Object **)&s->canbus[1], > > object_property_allow_set_link, > > 0); > > diff --git a/tests/qtest/xlnx-can-test.c b/tests/qtest/xlnx-can-test.c > > index 3d1120005b..54de71a686 100644 > > --- a/tests/qtest/xlnx-can-test.c > > +++ b/tests/qtest/xlnx-can-test.c > > @@ -138,9 +138,9 @@ static void test_can_bus(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 and CAN1. */ > > @@ -175,9 +175,9 @@ static void test_can_loopback(void) > > uint32_t status = 0; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 in loopback mode. */ > > @@ -223,9 +223,9 @@ static void test_can_filter(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 and CAN1. */ > > @@ -271,9 +271,9 @@ static void test_can_sleepmode(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0. */ > > @@ -317,9 +317,9 @@ static void test_can_snoopmode(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0. */ > > -- > > 2.26.2
On Fri, 22 Jan 2021 at 15:19, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote: > > On Fri, Jan 22, 2021 at 01:21:53PM +0000, Peter Maydell wrote: > > Just noticed this wasn't cc'd to the Xilinx folks. Would one > > of you like to review it? > > Looks good to me but we need to also update the test cases in > tests/qtest/xlnx-can-test.c. ...looks like the patch does that, did it miss something? > > > hw/arm/xlnx-zcu102.c | 4 ++-- > > > tests/qtest/xlnx-can-test.c | 30 +++++++++++++++--------------- thanks -- PMM
On Fri, Jan 22, 2021 at 01:21:53PM +0000, Peter Maydell wrote: Patch looks good to me. Reviewed-by: Vikram Garhwal <fnu.vikram@xilinx.com> > Just noticed this wasn't cc'd to the Xilinx folks. Would one > of you like to review it? > > thanks > -- PMM > > On Mon, 18 Jan 2021 at 16:25, Paolo Bonzini <pbonzini@redhat.com> wrote: > > > > The properties to attach a CANBUS object to the xlnx-zcu102 machine have > > a period in them. We want to use periods in properties for compound QAPI types, > > and besides the "xlnx-zcu102." prefix is both unnecessary and different > > from any other machine property name. Remove it. > > > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > --- > > hw/arm/xlnx-zcu102.c | 4 ++-- > > tests/qtest/xlnx-can-test.c | 30 +++++++++++++++--------------- > > 2 files changed, 17 insertions(+), 17 deletions(-) > > > > diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c > > index 4ef0c516bf..c9713638c5 100644 > > --- a/hw/arm/xlnx-zcu102.c > > +++ b/hw/arm/xlnx-zcu102.c > > @@ -219,12 +219,12 @@ static void xlnx_zcu102_machine_instance_init(Object *obj) > > s->secure = false; > > /* Default to virt (EL2) being disabled */ > > s->virt = false; > > - object_property_add_link(obj, "xlnx-zcu102.canbus0", TYPE_CAN_BUS, > > + object_property_add_link(obj, "canbus0", TYPE_CAN_BUS, > > (Object **)&s->canbus[0], > > object_property_allow_set_link, > > 0); > > > > - object_property_add_link(obj, "xlnx-zcu102.canbus1", TYPE_CAN_BUS, > > + object_property_add_link(obj, "canbus1", TYPE_CAN_BUS, > > (Object **)&s->canbus[1], > > object_property_allow_set_link, > > 0); > > diff --git a/tests/qtest/xlnx-can-test.c b/tests/qtest/xlnx-can-test.c > > index 3d1120005b..54de71a686 100644 > > --- a/tests/qtest/xlnx-can-test.c > > +++ b/tests/qtest/xlnx-can-test.c > > @@ -138,9 +138,9 @@ static void test_can_bus(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 and CAN1. */ > > @@ -175,9 +175,9 @@ static void test_can_loopback(void) > > uint32_t status = 0; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 in loopback mode. */ > > @@ -223,9 +223,9 @@ static void test_can_filter(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0 and CAN1. */ > > @@ -271,9 +271,9 @@ static void test_can_sleepmode(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0. */ > > @@ -317,9 +317,9 @@ static void test_can_snoopmode(void) > > uint8_t can_timestamp = 1; > > > > QTestState *qts = qtest_init("-machine xlnx-zcu102" > > - " -object can-bus,id=canbus0" > > - " -machine xlnx-zcu102.canbus0=canbus0" > > - " -machine xlnx-zcu102.canbus1=canbus0" > > + " -object can-bus,id=canbus" > > + " -machine canbus0=canbus" > > + " -machine canbus1=canbus" > > ); > > > > /* Configure the CAN0. */ > > -- > > 2.26.2
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 4ef0c516bf..c9713638c5 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c @@ -219,12 +219,12 @@ static void xlnx_zcu102_machine_instance_init(Object *obj) s->secure = false; /* Default to virt (EL2) being disabled */ s->virt = false; - object_property_add_link(obj, "xlnx-zcu102.canbus0", TYPE_CAN_BUS, + object_property_add_link(obj, "canbus0", TYPE_CAN_BUS, (Object **)&s->canbus[0], object_property_allow_set_link, 0); - object_property_add_link(obj, "xlnx-zcu102.canbus1", TYPE_CAN_BUS, + object_property_add_link(obj, "canbus1", TYPE_CAN_BUS, (Object **)&s->canbus[1], object_property_allow_set_link, 0); diff --git a/tests/qtest/xlnx-can-test.c b/tests/qtest/xlnx-can-test.c index 3d1120005b..54de71a686 100644 --- a/tests/qtest/xlnx-can-test.c +++ b/tests/qtest/xlnx-can-test.c @@ -138,9 +138,9 @@ static void test_can_bus(void) uint8_t can_timestamp = 1; QTestState *qts = qtest_init("-machine xlnx-zcu102" - " -object can-bus,id=canbus0" - " -machine xlnx-zcu102.canbus0=canbus0" - " -machine xlnx-zcu102.canbus1=canbus0" + " -object can-bus,id=canbus" + " -machine canbus0=canbus" + " -machine canbus1=canbus" ); /* Configure the CAN0 and CAN1. */ @@ -175,9 +175,9 @@ static void test_can_loopback(void) uint32_t status = 0; QTestState *qts = qtest_init("-machine xlnx-zcu102" - " -object can-bus,id=canbus0" - " -machine xlnx-zcu102.canbus0=canbus0" - " -machine xlnx-zcu102.canbus1=canbus0" + " -object can-bus,id=canbus" + " -machine canbus0=canbus" + " -machine canbus1=canbus" ); /* Configure the CAN0 in loopback mode. */ @@ -223,9 +223,9 @@ static void test_can_filter(void) uint8_t can_timestamp = 1; QTestState *qts = qtest_init("-machine xlnx-zcu102" - " -object can-bus,id=canbus0" - " -machine xlnx-zcu102.canbus0=canbus0" - " -machine xlnx-zcu102.canbus1=canbus0" + " -object can-bus,id=canbus" + " -machine canbus0=canbus" + " -machine canbus1=canbus" ); /* Configure the CAN0 and CAN1. */ @@ -271,9 +271,9 @@ static void test_can_sleepmode(void) uint8_t can_timestamp = 1; QTestState *qts = qtest_init("-machine xlnx-zcu102" - " -object can-bus,id=canbus0" - " -machine xlnx-zcu102.canbus0=canbus0" - " -machine xlnx-zcu102.canbus1=canbus0" + " -object can-bus,id=canbus" + " -machine canbus0=canbus" + " -machine canbus1=canbus" ); /* Configure the CAN0. */ @@ -317,9 +317,9 @@ static void test_can_snoopmode(void) uint8_t can_timestamp = 1; QTestState *qts = qtest_init("-machine xlnx-zcu102" - " -object can-bus,id=canbus0" - " -machine xlnx-zcu102.canbus0=canbus0" - " -machine xlnx-zcu102.canbus1=canbus0" + " -object can-bus,id=canbus" + " -machine canbus0=canbus" + " -machine canbus1=canbus" ); /* Configure the CAN0. */
The properties to attach a CANBUS object to the xlnx-zcu102 machine have a period in them. We want to use periods in properties for compound QAPI types, and besides the "xlnx-zcu102." prefix is both unnecessary and different from any other machine property name. Remove it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- hw/arm/xlnx-zcu102.c | 4 ++-- tests/qtest/xlnx-can-test.c | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-)