Upload
hoangmien
View
229
Download
3
Embed Size (px)
Citation preview
News from the ARM architecture
1 Historic issues with ARM kernel code
2 Future directions
3 Current workflow
4 Ongoing code changes
5 Ideal architecture ports
6 Working with the arm-soc process
2 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Historic issues withARM kernel code
3 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
History of ARM linux code, some time ago
Strong focus on embedded systems
Lots of out of tree codeAging code baseLosing the war on complexityClose to collapse
4 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
History of ARM linux code, some time ago
Strong focus on embedded systemsLots of out of tree code
Aging code baseLosing the war on complexityClose to collapse
4 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
History of ARM linux code, some time ago
Strong focus on embedded systemsLots of out of tree codeAging code base
Losing the war on complexityClose to collapse
4 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
History of ARM linux code, some time ago
Strong focus on embedded systemsLots of out of tree codeAging code baseLosing the war on complexity
Close to collapse
4 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
History of ARM linux code, some time ago
Strong focus on embedded systemsLots of out of tree codeAging code baseLosing the war on complexityClose to collapse
4 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Technical problems in the ARM codebase
Any new hardware mandates code changesNo common platform modelMultiple platforms mutually exclusive at compile timeInfrastructure in hardware specific code
5 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Management problems
Independent vendor specific communitiesLittle incentive for cooperation and peer review
Russell King could no longer keep up⇒ Lack of pushback on crapLinus Torvalds could not keep up either⇒ Lack of merging new code
6 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Management problems
Independent vendor specific communitiesLittle incentive for cooperation and peer reviewRussell King could no longer keep up⇒ Lack of pushback on crap
Linus Torvalds could not keep up either⇒ Lack of merging new code
6 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Management problems
Independent vendor specific communitiesLittle incentive for cooperation and peer reviewRussell King could no longer keep up⇒ Lack of pushback on crapLinus Torvalds could not keep up either⇒ Lack of merging new code
6 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Going beyond embedded
DesktopsServers64 bit CPU implementation
One out of the two main linux architectures
8 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Going beyond embedded
DesktopsServers64 bit CPU implementationOne out of the two main linux architectures
8 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Ideal architecture port
Generic user space ABIDevice drivers in subsystems, not subarchitecturesBoot time hardware detectionNo mutually exclusive build time optionsMinimum kernel changes for new hardware
9 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2011 direction changes
Flattened device treeSingle zImage for armv6/v7Duplicate code removalMoving device drivers to subsystemsCo-maintaining arm-soc.git
11 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Changes we did not do
Converge on a single clean platformMove legacy platforms to subdir
12 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2011 achievements
1 new source tree
2 subarch maintainer summits3 merge windows using arm-soc.git4 clean new subarchitectures
13 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2011 achievements
1 new source tree2 subarch maintainer summits
3 merge windows using arm-soc.git4 clean new subarchitectures
13 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2011 achievements
1 new source tree2 subarch maintainer summits3 merge windows using arm-soc.git
4 clean new subarchitectures
13 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2011 achievements
1 new source tree2 subarch maintainer summits3 merge windows using arm-soc.git4 clean new subarchitectures
13 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2012 achievements
Common clock implementationClock DT bindings
Pinctrl subsystemStarted removing board files
14 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2012 achievements
Common clock implementationClock DT bindingsPinctrl subsystem
Started removing board files
14 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
2012 achievements
Common clock implementationClock DT bindingsPinctrl subsystemStarted removing board files
14 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Changesets merged
Kernel rmk arm-soc arch/arm total overall2.6.39 680 0 1187 110313.0 265 22 518 98433.1 274 557 980 93803.2 286 701 1355 126953.3 XXX XXX XXX XXX3.4 XXX XXX XXX XXX3.5-rc1 XXX XXX XXX XXX
15 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Top arm-soc contributors by changesets
174 Arnd Bergmann78 Olof Johansson69 Shawn Guo65 Kevin Hilman57 Benoit Cousson53 Kukjin Kim52 Tony Lindgren51 Linus Torvalds50 Jean-Christophe PLAGNIOL-VILLARD46 Fabio Estevam
Total number of contributors: 236
16 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Top contributors by non-merge changesets
69 Shawn Guo65 Kevin Hilman57 Benoit Cousson50 Jean-Christophe PLAGNIOL-VILLARD46 Fabio Estevam43 Stephen Warren43 Mark Brown38 Thomas Abraham34 Paul Walmsley32 Kukjin Kim
Total number of contributors: 235
17 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
arm-soc maintainer role
Sponsored by Linaro and GoogleVendor neutralDefine and enforce common rules for everyoneMerging code upstream to LinusCoordination with RussellPushing back on crap
18 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
arm-soc workflow
Pulling many per soc topic branchesPushing cross-soc topic branchesOne for-next branch, rebasingEarly staging branchesNot quite clean allowed when doing cleanups
DEMO
19 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
arm-soc workflow
Pulling many per soc topic branchesPushing cross-soc topic branchesOne for-next branch, rebasingEarly staging branchesNot quite clean allowed when doing cleanupsDEMO
19 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Multiplatform: Single zImage status
Taking longer than expected
Breakthrough!Progress largely invisibleFocus on ARMv6 and ARMv7Building vexpress+imx+omap2+ux500 nowBooting on vexpress so far
21 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Multiplatform: Single zImage status
Taking longer than expectedBreakthrough!
Progress largely invisibleFocus on ARMv6 and ARMv7Building vexpress+imx+omap2+ux500 nowBooting on vexpress so far
21 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Multiplatform: Single zImage status
Taking longer than expectedBreakthrough!Progress largely invisibleFocus on ARMv6 and ARMv7
Building vexpress+imx+omap2+ux500 nowBooting on vexpress so far
21 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Multiplatform: Single zImage status
Taking longer than expectedBreakthrough!Progress largely invisibleFocus on ARMv6 and ARMv7Building vexpress+imx+omap2+ux500 now
Booting on vexpress so far
21 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Multiplatform: Single zImage status
Taking longer than expectedBreakthrough!Progress largely invisibleFocus on ARMv6 and ARMv7Building vexpress+imx+omap2+ux500 nowBooting on vexpress so far
21 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expected
Breakthrough!Pinmux bindings in 3.4 (Linus Walleij)Clock bindings in 3.4 (Grant Likely/Mike Turquette)New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msmLots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expectedBreakthrough!
Pinmux bindings in 3.4 (Linus Walleij)Clock bindings in 3.4 (Grant Likely/Mike Turquette)New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msmLots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expectedBreakthrough!Pinmux bindings in 3.4 (Linus Walleij)
Clock bindings in 3.4 (Grant Likely/Mike Turquette)New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msmLots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expectedBreakthrough!Pinmux bindings in 3.4 (Linus Walleij)Clock bindings in 3.4 (Grant Likely/Mike Turquette)
New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msmLots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expectedBreakthrough!Pinmux bindings in 3.4 (Linus Walleij)Clock bindings in 3.4 (Grant Likely/Mike Turquette)New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msm
Lots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device tree status
Taking longer than expectedBreakthrough!Pinmux bindings in 3.4 (Linus Walleij)Clock bindings in 3.4 (Grant Likely/Mike Turquette)New platforms: prima2, zynq, highbank, picoxcell,spear13xxLargely converted: exynos, i.mx, tegra, at91, vexpress,ux500In progress: omap, shmobile, lpc32xx, msmLots of simple device driver bindings
22 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Randconfig builds
Taking longer than expected
Delayed-by: Arnd Bergmann <[email protected]>
Integration into Linaro CI loopabout 150 patch seriesRegression testingSubmitted by Mathieu Poirier
23 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Randconfig builds
Taking longer than expectedDelayed-by: Arnd Bergmann <[email protected]>
Integration into Linaro CI loop
about 150 patch seriesRegression testingSubmitted by Mathieu Poirier
23 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Randconfig builds
Taking longer than expectedDelayed-by: Arnd Bergmann <[email protected]>
Integration into Linaro CI loopabout 150 patch seriesRegression testingSubmitted by Mathieu Poirier
23 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Memory management changes
Continuous memory allocatordma-buf infrastructuregeneric iommu handling in dma-mapping API
24 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Device driver subsystems to use
MTDDRM (graphics)ASoC (sound)IndustrialIO (ADC, amplifiers, ...)PWMLED
25 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Framework drivers
iommudma-engineregulatorclockgpiolibpinctrl
26 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform drivers
irqdomainsparse irqclocksourcedevicetree
27 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Ideal file layout
No board filesDrivers in subsystemsplatform data in include/linux/platform data/register definitions in driversIRQ/GPIO/MMIO/... definitions in DT
28 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Good Examples
HighbankSPEAr13xx
29 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Infrastructure under construction
DMA bindingsSystem controller subsystemdrivers/irqchipearly console abstractionpwm subsystemUSB host controllerSMPPCI I/O space
30 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup vs. new code development
Reasonable proportion of cleanups
Reducing the amount of crapMore crap getting removed than added
Coding styleNon-portable codeBloatPrivate infrastructureMissing infrastructureExcessive Macro use
Some crap is very well written
31 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup vs. new code development
Reasonable proportion of cleanupsReducing the amount of crapMore crap getting removed than added
Coding styleNon-portable codeBloatPrivate infrastructureMissing infrastructureExcessive Macro use
Some crap is very well written
31 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup vs. new code development
Reasonable proportion of cleanupsReducing the amount of crapMore crap getting removed than added
Coding styleNon-portable codeBloatPrivate infrastructureMissing infrastructureExcessive Macro use
Some crap is very well written
31 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup vs. new code development
Reasonable proportion of cleanupsReducing the amount of crapMore crap getting removed than added
Coding styleNon-portable codeBloatPrivate infrastructureMissing infrastructureExcessive Macro use
Some crap is very well written
31 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: ux500
out of tree codecommon clock
32 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: ux500
out of tree code
common clock
32 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: ux500
out of tree codecommon clock
32 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: omap
hwmodabsolute code size
33 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: omap
hwmod
absolute code size
33 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: omap
hwmodabsolute code size
33 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: samsung
fragmentation: exynos, s5p, s3c64xx, s3c24xxpremature DMA DT binding
34 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: samsung
fragmentation: exynos, s5p, s3c64xx, s3c24xx
premature DMA DT binding
34 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: samsung
fragmentation: exynos, s5p, s3c64xx, s3c24xxpremature DMA DT binding
34 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: i.mx
macros in arch/arm/plat-mxc/devices/not much else really
35 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: i.mx
macros in arch/arm/plat-mxc/devices/
not much else really
35 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: i.mx
macros in arch/arm/plat-mxc/devices/not much else really
35 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: vexpress
clock supportdevice tree support partial
36 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: vexpress
clock support
device tree support partial
36 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Platform specific problems: vexpress
clock supportdevice tree support partial
36 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Working with the arm-soc process
Topic branchesSeparate cleanups and bug fixesTiming
37 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Topic branches
Independent developmentBased on a -rc versionCan include dependencies
Too many dependencies:
arm-soc cannot linearize them: Game over
Too many conflicts
cannot resolve: Game over
38 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Topic branches
Independent developmentBased on a -rc versionCan include dependenciesToo many dependencies:
arm-soc cannot linearize them: Game over
Too many conflicts
cannot resolve: Game over
38 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Topic branches
Independent developmentBased on a -rc versionCan include dependenciesToo many dependencies:
arm-soc cannot linearize them: Game overToo many conflicts
cannot resolve: Game over
38 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Typical topic branches
fixes (urgent)fixes (non-urgent)cleanupsdtboardpmdrivers
39 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Typical topic branches (continued)
new-socdefconfigmaintainersclockpinctrlnew subsys
40 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup branches
Usually firstFeatures based on cleanupsLarge but nonintrusive
Your ticket for other changes
41 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Cleanup branches
Usually firstFeatures based on cleanupsLarge but nonintrusiveYour ticket for other changes
41 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Changeset comments
Always too shortExplain why a change is done, not howshortlog style ”ARM: omap: do something”Only bug fixes after -rc1Use ”cc: [email protected]” for backports
42 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Pull requests
Send to [email protected] tagsGet your gpg keys signedMake branches bisectableTag descriptions
43 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Pull timing
As early as possible after -rc1...but no earlier
Staging branchesAs early as possible after -rc1
44 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Summary
Lots of work getting done:device tree, consolidation, cleanupNot running out of work anytime soon:new platforms, ARMv8, multiplatform kernels
Linux on ARM world domination coming,still busy with the details
45 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Summary
Lots of work getting done:device tree, consolidation, cleanupNot running out of work anytime soon:new platforms, ARMv8, multiplatform kernelsLinux on ARM world domination coming,still busy with the details
45 / 47 Arnd Bergmann c© 2010 IBM Corporation
News from the ARM architecture
Legal Statement
This work represents the view of the author and does not necessarilyrepresent the view of IBM.IBM, IBM (logo), e-business (logo), pSeries, e (logo) server, andxSeries are trademarks or registered trademarks of InternationalBusiness Machines Corporation in the United States and/or othercountries.Linux is a registered trademark of Linus Torvalds.Other company, product, and service names may be trademarks orservice marks of others.
46 / 47 Arnd Bergmann c© 2010 IBM Corporation