Hi Simon, Thanks for the feedback. > -----Original Message----- > From: linux-renesas-soc-owner@xxxxxxxxxxxxxxx <linux-renesas-soc- > owner@xxxxxxxxxxxxxxx> On Behalf Of Simon Horman > Sent: 29 November 2018 12:49 > To: Biju Das <biju.das@xxxxxxxxxxxxxx> > Cc: Rob Herring <robh+dt@xxxxxxxxxx>; Mark Rutland > <mark.rutland@xxxxxxx>; Magnus Damm <magnus.damm@xxxxxxxxx>; > linux-renesas-soc@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; Geert > Uytterhoeven <geert+renesas@xxxxxxxxx>; Chris Paterson > <Chris.Paterson2@xxxxxxxxxxx>; Fabrizio Castro > <fabrizio.castro@xxxxxxxxxxxxxx> > Subject: Re: [PATCH 7/7] ARM: dts: r8a7744: Add SMP support > > On Thu, Nov 22, 2018 at 09:14:35AM +0000, Biju Das wrote: > > Add DT node for the Advanced Power Management Unit (APMU), add the > > second CPU core, and use "renesas,apmu" as "enable-method". > > > > Also add cpu1 phandle node to the PMU interrupt-affinity property. > > Hi Biju, > > Could you comment on how well this has been tested with respect to CPU > hotplug and suspend to RAM? Please find the snippet from test script. It will details the tests related to CPU hot plug and STR. For cpu hotplug ----------------- SCRIPTS_DIRECTORY="$(cd "$(dirname "$0")"; pwd)" source "${SCRIPTS_DIRECTORY}"/identity.sh PROCESSORS=$(cat /test-data/apmu_t_001-rzg1${RZG1_VARIANT}.txt | grep -c ^processor) for CURRENT_PROCESSOR in $(seq ${PROCESSORS}); do echo "*** Testing CPU hotplug for processor ${CURRENT_PROCESSOR} ***" echo 0 > /sys/devices/system/cpu/cpu$((CURRENT_PROCESSOR - 1))/online CURRENT_PROCESSORS=$(cat /proc/cpuinfo | grep -c ^processor) if [ ${CURRENT_PROCESSORS} -eq ${PROCESSORS} ]; then echo "FAILED: Can't take processor ${CURRENT_PROCESSOR} offline" exit 1 fi echo 1 > /sys/devices/system/cpu/cpu$((CURRENT_PROCESSOR - 1))/online CURRENT_PROCESSORS=$(cat /proc/cpuinfo | grep -c ^processor) if [ ${CURRENT_PROCESSORS} -ne ${PROCESSORS} ]; then echo "FAILED: Can't take processor ${CURRENT_PROCESSOR} online" exit 1 fi done For STR --------- PROCESSORS=$(cat /test-data/apmu_t_001-rzg1${RZG1_VARIANT}.txt | grep -c ^processor) PROCESSORS_COMBINATIONS=$(power_of_two ${PROCESSORS}) PROCESSORS_COMBINATIONS=$((PROCESSORS_COMBINATIONS - 1)) for CURRENT_PROCESSORS in $(seq ${PROCESSORS_COMBINATIONS}); do echo "***********************************************************" echo "* Testing suspend-to-RAM with the following configuration *" echo "***********************************************************" enable_all_cpus disable_cpus ${CURRENT_PROCESSORS} sleep 1 print_cpus_status echo echo dmesg -c > /dev/null echo enabled > /sys/class/tty/${DEBUG_CONSOLE}/power/wakeup echo N > /sys/module/printk/parameters/console_suspend echo mem > /sys/power/state dmesg | grep -F "Restarting tasks ... done." > /dev/null if [ $? -ne 0 ]; then echo "FAILED: Something went wrong either when going to sleep or when waking up" exit 1 fi done regards, Biju > > Signed-off-by: Biju Das <biju.das@xxxxxxxxxxxxxx> > > --- > > arch/arm/boot/dts/r8a7744.dtsi | 28 +++++++++++++++++++++++++++- > > 1 file changed, 27 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm/boot/dts/r8a7744.dtsi > > b/arch/arm/boot/dts/r8a7744.dtsi index 046ed94..79e75e7 100644 > > --- a/arch/arm/boot/dts/r8a7744.dtsi > > +++ b/arch/arm/boot/dts/r8a7744.dtsi > > @@ -49,6 +49,7 @@ > > cpus { > > #address-cells = <1>; > > #size-cells = <0>; > > +enable-method = "renesas,apmu"; > > > > cpu0: cpu@0 { > > device_type = "cpu"; > > @@ -69,6 +70,25 @@ > > < 375000 1000000>; > > }; > > > > +cpu1: cpu@1 { > > +device_type = "cpu"; > > +compatible = "arm,cortex-a15"; > > +reg = <1>; > > +clock-frequency = <1500000000>; > > +clocks = <&cpg CPG_CORE R8A7744_CLK_Z>; > > +clock-latency = <300000>; /* 300 us */ > > +power-domains = <&sysc R8A7744_PD_CA15_CPU1>; > > +next-level-cache = <&L2_CA15>; > > + > > +/* kHz - uV - OPPs unknown yet */ > > +operating-points = <1500000 1000000>, > > + <1312500 1000000>, > > + <1125000 1000000>, > > + < 937500 1000000>, > > + < 750000 1000000>, > > + < 375000 1000000>; > > +}; > > + > > L2_CA15: cache-controller-0 { > > compatible = "cache"; > > cache-unified; > > @@ -96,7 +116,7 @@ > > compatible = "arm,cortex-a15-pmu"; > > interrupts-extended = <&gic GIC_SPI 72 > IRQ_TYPE_LEVEL_HIGH>, > > <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; > > -interrupt-affinity = <&cpu0>; > > +interrupt-affinity = <&cpu0>, <&cpu1>; > > }; > > > > /* External SCIF clock */ > > @@ -250,6 +270,12 @@ > > #reset-cells = <1>; > > }; > > > > +apmu@e6152000 { > > +compatible = "renesas,r8a7744-apmu", > "renesas,apmu"; > > +reg = <0 0xe6152000 0 0x188>; > > +cpus = <&cpu0 &cpu1>; > > +}; > > + > > rst: reset-controller@e6160000 { > > compatible = "renesas,r8a7744-rst"; > > reg = <0 0xe6160000 0 0x100>; > > -- > > 2.7.4 > > Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.