Page MenuHomeFreeBSD

Allwinner A31 add smp support
ClosedPublic

Authored by manu_bidouilliste.com on Feb 19 2016, 3:10 AM.
Tags
Referenced Files
Unknown Object (File)
Tue, Dec 10, 8:54 PM
Unknown Object (File)
Mon, Dec 9, 12:56 AM
Unknown Object (File)
Sat, Nov 30, 3:56 PM
Unknown Object (File)
Thu, Nov 28, 10:32 PM
Unknown Object (File)
Nov 11 2024, 12:12 AM
Unknown Object (File)
Oct 19 2024, 9:09 AM
Unknown Object (File)
Oct 18 2024, 4:07 AM
Unknown Object (File)
Sep 30 2024, 11:41 AM

Details

Summary

Add SMP support to A31.
All allwinner SoC with the same number of core use the same register address for core configuration so we use that.
Move the file from a20/a20_mp.c to aw_mp.c

Test Plan

Apply patch and build kernel

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2699
Build 2719: arc lint + arc unit

Event Timeline

manu_bidouilliste.com retitled this revision from to Allwinner A31 add smp support.
manu_bidouilliste.com updated this object.
manu_bidouilliste.com edited the test plan for this revision. (Show Details)
manu_bidouilliste.com set the repository for this revision to rS FreeBSD src repository - subversion.
manu_bidouilliste.com added a project: ARM.

Fix a bug, the power off gating reg is in the prcm region in the a31.

sys/arm/allwinner/aw_mp.c
70–71

Indentation (and below)

105–117

This is bogus, we should be checking which SoC we are on & mapping based on that.

Split start_ap in two function, one of each supported SoC.
Fix style(9).

jmcneill_invisible.ca added inline comments.
sys/arm/allwinner/aw_mp.c
168

Missing unmap for prcm handle

237

Missing unmap for prcm handle

sys/arm/allwinner/aw_mp.c
91

You can use cp15_l2ctlr_get here, from machine/cpu-v6.h.

92

Use CPUV7_L2CTLR_NPROC from machine/armreg.h

172

How similar are the two functions? i.e. could the common bits be pulled out to a helper function?

180

Split lines should be indented the same number of tabs, followed by 4 spaces.

213

8?

sys/arm/allwinner/aw_mp.c
213

We need to write 0xff, 0x7f, 0x3f etc ...
I guess I could add a CPU_POWER_CLAMP_STEPS define.

Merge back into one function and split the diff bits into switch statement.
Use cp15_l2ctlr_get and CPUV7_L2CTLR_NPROC instead of inline assembly.

sys/arm/allwinner/aw_mp.c
101–102

I think this code could be reworked a little to add separate functions for the two groups of SoCs. These would just map/unmap the registers, then call into common functions to power on the new CPUs. They should pass in the needed tag and handles, and maybe registers if applicable.

This would help for when we move to start CPUs through the PLATFORM code.

105

The indentation here was correct

133–134

This should be tabbed out to the same level as the previous line, followed by 4 spaces. You should then be able to fit both on a single line.

I'll wait till D5466 is commited to update this review.

Update diff to use PLATFORM_SMP bits.

sys/arm/allwinner/aw_mp.c
132–133

It looks like you don't need to split this line, it should be should enough.

134–135

These should be on a single line

162

Do we know the meaning of 3?

Add defines for previously hardcoded value.
Fix minor style(9) issues.

manu_bidouilliste.com added inline comments.
sys/arm/allwinner/aw_mp.c
162

Yeah, last diff add defines for this value.

jmcneill added inline comments.
sys/arm/allwinner/aw_mp.c
134

} else { on a single line

151

} else { on a single line

180

4 spaces instead of a tab for multi-line if

195

4 spaces instead of a tab for multi-line if

198

4 spaces instead of a tab for multi-line if

andrew added a reviewer: andrew.
andrew added inline comments.
sys/arm/conf/A20
34

options <tab>

This revision is now accepted and ready to land.Mar 4 2016, 11:28 AM
manu_bidouilliste.com edited edge metadata.

Fix space/tab in kernel config files.

This revision now requires review to proceed.Mar 4 2016, 2:42 PM
This revision is now accepted and ready to land.Mar 5 2016, 10:57 AM
andrew edited edge metadata.
This revision was automatically updated to reflect the committed changes.