Tony Mansson | 1 Dec 2011 02:06
Favicon

[ACTIVITY] Android Platform Team 2011-11-21 to 2011-11-27

Hello.

Here is the weekly status report from the Android Platform Team.

Key Points for wider discussion
===============================
 * Android 4.0 ICS boots with gcc 4.6. Still some workarounds required.
 * Android 4.0 ICS up and running on iMX53.
 * 11.12 Pre-release 1 (ICS) has been validated on all major boards.
 
Team Highlights
===============================
 * 11.11 Post Mortem status, meeting and lessons learned completed.
 * Blueprints for 11.12 are ready and rolling.
 * Demos and articles posted to YouTube, G+ and other sites.
 * Support questions answered.
 * Good progress on adding Gator (for DS-5) to the ICS Builds.
 * The kernel rebuild script has been tested for all boards.
 * Good progress on bringing up hardware accelerated graphics on Origen.
 
Bugs fixed
===============================
871757, 883307, 892881, 892899, 893325, 893150, 893151, 894488, 896467, 896468, 844890, 862327

===============================
 * Hackbox ran out of memory when building Android ICS.

Blueprints
===============================
_______________________________________________
linaro-dev mailing list
linaro-dev@...
http://lists.linaro.org/mailman/listinfo/linaro-dev
Turquette, Mike | 1 Dec 2011 06:53
Picon
Favicon

Re: [PATCH v3 3/5] clk: introduce the common clock framework

On Wed, Nov 30, 2011 at 5:20 PM, Paul Walmsley <paul@...> wrote:
> This implementation of clk_get_rate() is racy, and is, in general, unsafe.
> The problem is that, in many cases, the clock's rate may change between
> the time that clk_get_rate() is called and the time that the returned
> rate is used.  This is the case for many clocks which are part of a
> larger DVFS domain, for example.

Hi Paul,

Thanks much for reviewing.  Just FYI, the v4 patchset I'm working on
has clk_get_rate and clk_get_parent hold the prepare mutex themselves,
so it solves some of the raciness of accessing struct clk members.
This change does not address your points below but I wanted to include
it for completeness sake.

> Several changes are needed to fix this:
>
> 1. When a clock user calls clk_enable() on a clock, the clock framework
> should prevent other users of the clock from changing the clock's rate.
> This should persist until the clock user calls clk_disable() (but see also
> #2 below).  This will ensure that clock users can rely on the rate
> returned by clk_get_rate(), as long as it's called between clk_enable()
> and clk_disable().  And since the clock's rate is guaranteed to remain the
> same during this time, code that cannot tolerate clock rate changes
> without special handling (such as driver code for external I/O devices)
> will work safely without further modification.

This is certainly imposing a default behavior in the clk framework core.

> 2. Since the protocol described in #1 above will prevent DVFS from working
> when the clock is part of a larger DVFS clock group, functions need to be
> added to allow and prevent other clock users from changing the clock's
> rate.  I'll use the function names "clk_allow_rate_changes(struct clk *)"
> and "clk_block_rate_changes(struct clk *)" for this discussion.  These
> functions can be used by clock users to define critical sections during
> which other entities on the system are allowed to change a clock's rate -
> even if the clock is currently enabled.  (Note that when a clock is
> prevented from changing its rate, all of the clocks from it up to the root
> of the tree should also be prevented from changing rates, since parent
> rate changes generally cause disruptions in downstream clocks.)

Likewise when a clk is requested to transition to a new frequency it
will have to clear it with all of the clks below it, so there is still
a need to propagate a request throughout the clk tree whenever
clk_set_rate is called and take a decision.

One way to solve this is for driver owners to sprinkle their code with
clk_block_rate_change and clk_allow_rate_change as you propose.  There
is a problem with this method if it is not supplemented with
rate-change notifications that drivers are allowed to handle
asynchronously.  Take for example a MMC driver which normally runs
it's functional clk at 24MHz.  However for a low-intensity, periodic
task such as playing an mp3 from SD card we would really like to lower
clk rates across the whole SoC.  Assuming that the MMC driver holds
clk_block_rate_change across any SD card transaction, our low power
scheme to lower clks across the SoC is stuck in a racy game of trying
to request a lower clk rate for the MMC functional clk while that same
MMC controller is mostly saturated serving up the mp3.

In this case it would be nice to have asynchronous notifiers that can
interrupt the MMC driver with a pre-change notifier and say "please
finish your current transaction, stall your next transaction, and then
return so I can change your clk rate".  Then after the clk rate change
occurs a post-change notification would also go out to the MMC driver
saying "ok I'm done changing rates.  here is your new clk rate and
please continue working".  The notification is very polite.

It is worth nothing that the MMC driver can return NOTIFY_STOP in it's
pre-change notification handler and this effectively does the same
thing as traversing the clk subtree and checking to make sure that
nobody is holding clk_block_rate_change against any of the children
clocks.

The point of all of that text above is to say: if we have to walk the
whole clk subtree below the point where we want to change rates AND we
want to make a dynamic case-by-case call on whether to allow the rate
change to happen (as opposed to contending with the allow/block
semantics) then I think that only having notifications will suffice.

> 3. For the above changes to work, the clock framework will need to
> discriminate between different clock users' calls to clock functions like
> clk_{get,set}_rate(), etc.  Luckily this should be possible within the
> current clock interface.  clk_get() can allocate and return a new struct
> clk that clk_put() can later free.  One useful side effect of doing this
> is that the clock framework could catch unbalanced clk_{enable,disable}()
> calls.

This is definitely worth thinking about.  Another way to accomplish
this is stop treating prepare_count and enable_count as scalars and
instead vectorize them by tracking a list of struct device *'s.  This
starts to get into can-of-worms territory if we want to consider
clk_set_rate_range(dev, clk, min, max) and the broader DVFS
implications.  I'm a little worried about under-designing now for
future DVFS stuff, but I also don't want the common clk fundamentals
to stall any more than it has (2+ years!).

> 4. clk_get_rate() must return an error when it's called in situations
> where the caller hasn't ensured that the clock's rate won't be changed by
> other entities.  For non-fixed rate clocks, these forbidden sections would
> include code between a clk_get() and a clk_enable(), or between a
> clk_disable() and a clk_put() or clk_enable(), or between a
> clk_allow_rate_changes() and clk_block_rate_changes().  The first and
> second of those three cases will require some code auditing of
> clk_get_rate() users to ensure that they are only calling it after they've
> enabled the clock.  And presumably most of them are not checking for
> error.  include/linux/clk.h doesn't define an error return value, so this
> needs to be explicitly defined in clk.h.

This adds a lot of burden to a driver that just wants to know a rate.
Especially if that purpose is for something as simple/transient as a
pr_debug message or something.

Thanks again for the review.  I'll chew on it a bit.

Regards,
Mike
Dave Martin | 1 Dec 2011 11:49
Favicon

-Werror issues in cm-kernel [was: gcc4.6,how to remove werror]

On Thu, Dec 01, 2011 at 03:31:38PM +0700, tknv wrote:
> I could not find that WERROR override code at my kernels...
> 
> Sorry delay it, I did make V=1.
> There are three kinds test.
> All targets are ARM.
> All Makefiles(top of kernel tree)-KBUILD_CFLAGS are same.
> KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
>                    -fno-strict-aliasing -fno-common \
>                    -Wno-format-security \
>                    -fno-delete-null-pointer-checks
> 
> I think linaro Werror behaviour is different or I need to add FLAGS more.
> 
> Compile CM-kernel with android SDK
> make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329
>      rm -f drivers/net/wireless/bcm4329/built-in.o;
>      /home/tknv/android/Oxygen/prebuil
>      t/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-ar rcs
>      drivers/net/wireless/bcm43  29/built-in.o
>          /home/tknv/android/Oxygen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eab
> 	 i-gcc -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d
> 	 -nostdinc -isystem /home
> 	 /tknv/android/Oxygen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm
> 	 -eabi/4.4.3/include
> 	 -I/home/tknv/android/SuperSonic/kernels/CM-kernel/arch/arm/incl
> 	 ude -Iinclude  -include include/generated/autoconf.h
> 	 -D__KERNEL__ -mlittle-endian -  Iarch/arm/mach-msm/include
> 	 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-st
> 	 rict-aliasing -fno-common -Wno-format-security
> 	 -fno-delete-null-pointer-checks -Os   -marm -mabi=aapcs-linux
> 	 -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7
> 	 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024
> 	 -fno-stack-protector -f  omit-frame-pointer
> 	 -Wdeclaration-after-statement -Wno-pointer-sign
> 	 -fno-strict-over  flow -fno-dwarf2-cfi-asm -fconserve-stack
> 	 -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHD  THREAD -DBCMWPA2
> 	 -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64
> 	 -DDHD_  FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE
> 	 -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMS  DIO -DDHD_GPL
> 	 -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall -Wstrict-prototypes
> 	 -Werror -DOO  B_INTR_ONLY -DCUSTOMER_HW2 -DDHD_USE_STATIC_BUF
> 	 -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -  DSOFTAP
> 	 -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT
> 	 -DGET_CUSTOM  _MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DHW_OOB
> 	 -Idrivers/net/wireless/bcm4329 -Idrive
> 	 rs/net/wireless/bcm4329/include  -DMODULE -D"KBUILD_STR(s)=#s"
> 	 -D"KBUILD_BASENAME=K  BUILD_STR(dhd_linux)"
> 	 -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)"  -c -o drivers/net/wi
> 	 reless/bcm4329/dhd_linux.o
> 	 drivers/net/wireless/bcm4329/dhd_linux.
> 	 ...
> [1]+  Done                    make V=1 > build.log 2>&1
> 
> Compile CM-kernel with linaro.
> make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329
>    rm -f drivers/net/wireless/bcm4329/built-in.o;
>    /usr/bin/arm-linux-gnueabi-ar rcs
>    drivers/net/wireless/bcm4329/built-in.o
>      /usr/bin/arm-linux-gnueabi-gcc
>      -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d  -nostdinc
>      -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include
>      -I/home/tknv/android/SuperSonic/kernels/CM-kernel/arch/arm/include
>      -Iinclude  -include include/generated/autoconf.h -D__KERNEL__
>      -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef
>      -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
>      -Wno-format-security -fno-delete-null-pointer-checks -Os -marm
>      -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables
>      -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm
>      -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer
>      -Wdeclaration-after-statement -Wno-pointer-sign
>      -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -DLINUX
>      -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 -DUNRELEASEDCHIP
>      -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 -DDHD_FIRSTREAD=64
>      -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS
>      -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall
>      -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2
>      -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP
>      -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT
>      -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DHW_OOB
>      -Idrivers/net/wireless/bcm4329
>      -Idrivers/net/wireless/bcm4329/include  -DMODULE
>      -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(dhd_linux)"
>      -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)"  -c -o
>      drivers/net/wireless/bcm4329/dhd_linux.o
>      drivers/net/wireless/bcm4329/dhd_linux.c
>      drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘
>      dhd_rx_frame’:
>      drivers/net/wireless/bcm4329/dhd_linux.c:1282:24: error: variable
>      ‘save_pktbuf’ set but not used [-Werror=unused-but-set-variable]
>      drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘
>      dhd_os_wd_timer’:
>      drivers/net/wireless/bcm4329/dhd_linux.c:2737:14: error: variable
>      ‘save_dhd_watchdog_ms’ set but not used
>      [-Werror=unused-but-set-variable]
>      cc1: all warnings being treated as errors
> 
>      make[4]: *** [drivers/net/wireless/bcm4329/dhd_linux.o] Error 1
>      make[3]: *** [drivers/net/wireless/bcm4329] Error 2
>      make[2]: *** [drivers/net/wireless] Error 2
>      make[1]: *** [drivers/net] Error 2
>      make: *** [drivers] Error 2
>      ^C[1]+  Exit 2                  make V=1 > build.log 2>&1
> 
> Compile tiamatat-kernel with linaro.
> make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329
>   /usr/bin/arm-linux-gnueabi-gcc
>   -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d  -nostdinc
>   -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include
>   -I/home/tknv/android/SuperSonic/kernels/tiamat-kernel/arch/arm/include
>   -Iinclude  -include include/generated/autoconf.h -D__KERNEL__
>   -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef
>   -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
>   -Wno-format-security -fno-delete-null-pointer-checks -Os -marm
>   -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog
>   -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7
>   -march=armv7-a -mhard-float -Uarm -Wframe-larger-than=1024
>   -fno-stack-protector -fno-omit-frame-pointer
>   -fno-optimize-sibling-calls -Wdeclaration-after-statement
>   -Wno-pointer-sign -fno-strict-overflow -fconserve-stack
>   -DCC_HAVE_ASM_GOTO -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD
>   -DBCMWPA2 -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64
>   -DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS
>   -DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall
>   -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2
>   -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP
>   -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT
>   -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN -DHW_OOB
>   -DKEEP_ALIVE -DPNO_SUPPORT -Idrivers/net/wireless/bcm4329
>   -Idrivers/net/wireless/bcm4329/include  -DMODULE -DMODULE
>   -march=armv7-a -mfpu=vfpv3 -ftree-vectorize -D"KBUILD_STR(s)=#s"
>   -D"KBUILD_BASENAME=KBUILD_STR(dhd_linux)"
>   -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)" -c -o
>   drivers/net/wireless/bcm4329/dhd_linux.o
>   drivers/net/wireless/bcm4329/dhd_linux.c
>   drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘dhd_rx_frame’
>   :
>   drivers/net/wireless/bcm4329/dhd_linux.c:1256:24: error: variable ‘
>   save_pktbuf’ set but not used [-Werror=unused-but-set-variable]
>   cc1: all warnings being treated as errors
> 
>   make[4]: *** [drivers/net/wireless/bcm4329/dhd_linux.o] Error 1
>   make[3]: *** [drivers/net/wireless/bcm4329] Error 2
>   make[2]: *** [drivers/net/wireless] Error 2
>   make[1]: *** [drivers/net] Error 2
>   make: *** [drivers] Error 2
>   ^C[1]+  Exit 2                  make V=1 > build.log 2>&1

OK, so the reason why you can't turn -Werror off is because
drivers/net/wireless/bcm4329/Makefile adds it again:

DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \
-DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 \
-DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS \
-DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS \
-Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 \
-DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP \
-DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT \
-DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN -DHW_OOB \
-DKEEP_ALIVE -DPNO_SUPPORT \
-Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include

EXTRA_CFLAGS = $(DHDCFLAGS)

Kbuild doesn't allow you to override such things from the top level.

Adding -Werror overrides any preceding -Wno-error flag.

-Werror really should only be added in subdirectory Makefiles if
the code in that directory is super-clean.  The exact behaviour of GCC
with -Werror *will* change between different compiler versions -- this
is not a bug.  It explicitly allows GCC to fail to compile code which
might be correct.

There seems to be no good way to override -Werror in a subdirectory
Makefile from higher-level Makefiles.  You may be able to remove the
error behaviour for individual warnings with -Wno-error=<warning>, but
it's not really a good idea to do this at the top level because it will
affect the whole kernel.

So far as I can see, the warnings/errors you get probably indicate real
issues in the code.  It doesn't look like a compiler bug, or a problem
with Kbuild -- it's just an effect of the way the writers of that
subdirectory wrote their Makefile.

If you have not already done so, you should check for newer versions of
the code which may fix the problems.  If there is no newer version, it
would be a good idea to fix the source code issues and propose those
changes for merging so that the problem gets solved for everyone.

You can also simply remove -Werror from DHDCFLAGS in your local
build tree.  This will allow you to build the kernel, but it won't
prevent other people from encountering the same problem.

Since this appears to be an issue with an Android kernel tree, I suggest
if you have more questions on this you should reply via
linaro-dev <at> lists.linaro.org, or ask questions on the #linaro or
#linaro-android channels on IRC at chat.freenode.net if you need
additional help.

Cheers
---Dave

_______________________________________________
linaro-dev mailing list
linaro-dev <at> lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev
Ilias Biris | 1 Dec 2011 12:44
Favicon

[ACTIVITY] OCTO weekly status report - wk47.2011 (20111121-20111125)

Status report in detail in
https://wiki.linaro.org/OfficeofCTO/WeeklyReport

Last weekly meeting:
https://wiki.linaro.org/OfficeofCTO/2011-11-29

Highlights:

- ARMHF (also tracked via https://launchpad.net/linaro-octo-armhf
Launchpad project)
  + Debian builds are now churning
  + Ubuntu ARMHF now happening - there were some problems unearthed (eg
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/898172) but
moving on. Bugs which will appear will be tackled
  + Bug https://bugs.launchpad.net/offspring/+bug/892240 - offspring
does not currently support armhf. This will impede efforts to get armhf
benchmarks running on LAVA. The issue is being now tackled by infra, a
machine will be set to handle putting together *unsupported*
experimental armhf Debian images as a precursor to getting eventually
Ubuntu armhf builds supported by offspring.

- ARM Server: Preparation work is ongoing, for the roadmap and
requirements as well as initial planning for the first steps. A server
LEB will also be discussed from next week onwards.

- A number of patches sent already to deal with reducing ticks as a way
to reduce power consumption. Check patches from
http://patches.linaro.org/team/linaro-octo/

- Finally a short account of memory management:
  + CMA has seen a new version of the patches as result of the
discussion on Kernel Summit
  + there is ongoing work to enable testing of CMA via LAVA
  + getting dma-buf sharing improved based on the review comments, and
also pushing implementation of v4l2 as a user of dmabuf
  + we have a first implementation of dri2video for nouveau driver, and
also coming soon for omap

All questions, comments,  are welcome,

--

-- 
Ilias Biris ilias.biris <at> linaro.org
Project Manager, Linaro
M: +358504839608, IRC: ibiris Skype: ilias_biris
Linaro.org│ Open source software for ARM SoCs

_______________________________________________
linaro-dev mailing list
linaro-dev <at> lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev
Zach Pfeffer | 1 Dec 2011 15:07
Favicon

Re: cpu_idle?

On 30 November 2011 13:34, Daniel Lezcano <daniel.lezcano <at> linaro.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/30/2011 08:56 PM, Zach Pfeffer wrote:
>> On 30 November 2011 11:41, Amit Kucheria <amit.kucheria <at> linaro.org> wrote:
>>> Wow - quite a cc-list :)
>>>
>>> On Tue, Nov 29, 2011 at 7:47 PM, Zach Pfeffer <zach.pfeffer <at> linaro.org> wrote:
>>>> Amit/Mounir,
>>>>
>>>> What's your guys plan with cpu_idle for each board? Are you going to
>>>> try and upstream a solution that will work across all boards? Would
>>>> you or Mounir be open to filing a BP per board so we can track when
>>>> cpu_idle will hit each board? Does it make sense to prototype
>>>> something across each board that we could land in Ubuntu and Android?
>>>>
>>>> Adding other people, leads, etc...
>>>
>>> I'll add four more.
>>>
>>> The people I've added to cc are the ones looking at upstreaming
>>> cpuidle for the various member platforms (the first 3 are Linaro
>>> assignees):
>>>
>>> Samsung - Amit Kachhap
>>> ST-E - Daniel Lezcano
>>> Freescale - Rob Lee
>>> TI - Kevin Hilman and Santosh Shilimkar
>>>
>>> Rob tried to upstream a driver for the imx5 platform. Russell
>>> suggested that it is time to have a common cpuidle stub driver for
>>> ARM[1].
>>>
>>> Daniel Lezcano and Rob are currently working on such a common stub
>>> driver. The imx5 cpuidle will get rebased on top of that. Daniel has
>>> actively started work on a u8500 cpuidle driver in the meanwhile but
>>> is awaiting documentation.
>>>
>>> For OMAP4, I was told that there was now a cpuidle driver on its way
>>> into mainline. But I didn't find one after a cursory glance at the
>>> lists. Perhaps Kevin/Santosh can shed some light there. The last known
>>> tree I was aware of for an OMAP4 cpuidle driver was TI maintained
>>> one[2].
>>>
>>> For exynos, there is a basic cpuidle driver in mainline. Amit Kachhap
>>> has been working on enhancing it[3] (adding more states and using more
>>> of the common code that was recently added).
>>>
>>> In summary, we should have cpuidle working on the member platforms in
>>> the coming month. If you want something today, you should look at
>>> enabling OMAP4 and Exynos cpuidle configs.
>>>
>>> Regards,
>>> Amit
>>
>> Cool, thanks for the overview Amit.
>>
>> Is there a test that a QA guy can run to verify that cpu_idle is
>> working? A set of commands and a proc node to cat out with some stats
>> perhaps?
>
> This is something we are working on [1]. The test suite [2] has a few
> trivial tests but we want to add more tests, so it is is in the radar.

Would you share a pointer to the source?

> The test suite is integrated in LAVA and is run daily. The LAVA script
> checkout the head git tree and run automatically the tests. Each time we
> commit a new tests, it is take into account and run in LAVA.
>
> For the moment, all the PM features are not available for all the
> boards, so most of the tests fail and the results are not very
> significant but the more we will merge the different PM blocks upstream,
> the greener the test suite will be :)
>
> [1] https://blueprints.launchpad.net/linaro-power-qa/+spec/qa-cpuidle
> [2] http://git.linaro.org/gitweb?p=people/dlezcano/pm-qa.git;a=summary
>
>
>>> p.s Andy, was the breakage you reported in cpuidle related to the
>>> missing export.h patch?
>>>
>>> [1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/132859/focus=133279
>>> [2] git://gitorious.org/omap-sw-develoment/linux-omap-dev.git
>>> for_3_2/omap4_mpuss_pm-integrated_2
>>> [3] http://thread.gmane.org/gmane.linux.kernel.samsung-soc/7877
>>
>>
>>
>
>
> - --
>  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJO1qFZAAoJEAKBbMCpUGYA+lEIAIIYZaVDpwnwKOVshB/+tkQ/
> jiRE9Ncq4iY7WyW5Acs0ev1bKfbEohX0pIJb9eA8lj9xbdRWUv/EoBLGC5b7mceH
> 5Ga2RRjU2x8BeeeXcwf3joS6bW3zt5JGd2i688bb4XHNRcJv1vG23/6Uu3NIYZJ9
> J0NW7sYkhl0ByrYqmaRwBjl42NjRx1MmHmvsxAQXUArCY1iyr7/3pVIa+NhrHatK
> 0PGFhjpeUmUWZGNAdOLYzN5/sL0uoVLiOxulZsoSWru8UUpqcOfZqPCMgyKCl9im
> 7zfVT7w3B9KTUkjlnw9mB0raq8B7X+Ro/Gpc2/H182+Rvm6F+rbiU5hrCj7V+E8=
> =5t4S
> -----END PGP SIGNATURE-----

--

-- 
Zach Pfeffer
Android Platform Team Lead, Linaro Platform Teams
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

_______________________________________________
linaro-dev mailing list
linaro-dev <at> lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev
Daniel Lezcano | 1 Dec 2011 15:11
Favicon

Re: cpu_idle?


On 12/01/2011 03:07 PM, Zach Pfeffer wrote:
> On 30 November 2011 13:34, Daniel Lezcano <daniel.lezcano <at> linaro.org> wrote:
> On 11/30/2011 08:56 PM, Zach Pfeffer wrote:
>>>> On 30 November 2011 11:41, Amit Kucheria <amit.kucheria <at> linaro.org> wrote:
>>>>> Wow - quite a cc-list :)
>>>>>
>>>>> On Tue, Nov 29, 2011 at 7:47 PM, Zach Pfeffer <zach.pfeffer <at> linaro.org> wrote:
>>>>>> Amit/Mounir,
>>>>>>
>>>>>> What's your guys plan with cpu_idle for each board? Are you going to
>>>>>> try and upstream a solution that will work across all boards? Would
>>>>>> you or Mounir be open to filing a BP per board so we can track when
>>>>>> cpu_idle will hit each board? Does it make sense to prototype
>>>>>> something across each board that we could land in Ubuntu and Android?
>>>>>>
>>>>>> Adding other people, leads, etc...
>>>>>
>>>>> I'll add four more.
>>>>>
>>>>> The people I've added to cc are the ones looking at upstreaming
>>>>> cpuidle for the various member platforms (the first 3 are Linaro
>>>>> assignees):
>>>>>
>>>>> Samsung - Amit Kachhap
>>>>> ST-E - Daniel Lezcano
>>>>> Freescale - Rob Lee
>>>>> TI - Kevin Hilman and Santosh Shilimkar
>>>>>
>>>>> Rob tried to upstream a driver for the imx5 platform. Russell
>>>>> suggested that it is time to have a common cpuidle stub driver for
>>>>> ARM[1].
>>>>>
>>>>> Daniel Lezcano and Rob are currently working on such a common stub
>>>>> driver. The imx5 cpuidle will get rebased on top of that. Daniel has
>>>>> actively started work on a u8500 cpuidle driver in the meanwhile but
>>>>> is awaiting documentation.
>>>>>
>>>>> For OMAP4, I was told that there was now a cpuidle driver on its way
>>>>> into mainline. But I didn't find one after a cursory glance at the
>>>>> lists. Perhaps Kevin/Santosh can shed some light there. The last known
>>>>> tree I was aware of for an OMAP4 cpuidle driver was TI maintained
>>>>> one[2].
>>>>>
>>>>> For exynos, there is a basic cpuidle driver in mainline. Amit Kachhap
>>>>> has been working on enhancing it[3] (adding more states and using more
>>>>> of the common code that was recently added).
>>>>>
>>>>> In summary, we should have cpuidle working on the member platforms in
>>>>> the coming month. If you want something today, you should look at
>>>>> enabling OMAP4 and Exynos cpuidle configs.
>>>>>
>>>>> Regards,
>>>>> Amit
>>>>
>>>> Cool, thanks for the overview Amit.
>>>>
>>>> Is there a test that a QA guy can run to verify that cpu_idle is
>>>> working? A set of commands and a proc node to cat out with some stats
>>>> perhaps?
> 
> This is something we are working on [1]. The test suite [2] has a few
> trivial tests but we want to add more tests, so it is is in the radar.
> 
>> Would you share a pointer to the source?

Do you mean the source of the pm-qa code ?

> The test suite is integrated in LAVA and is run daily. The LAVA script
> checkout the head git tree and run automatically the tests. Each time we
> commit a new tests, it is take into account and run in LAVA.
> 
> For the moment, all the PM features are not available for all the
> boards, so most of the tests fail and the results are not very
> significant but the more we will merge the different PM blocks upstream,
> the greener the test suite will be :)
> 
> [1] https://blueprints.launchpad.net/linaro-power-qa/+spec/qa-cpuidle
> [2] http://git.linaro.org/gitweb?p=people/dlezcano/pm-qa.git;a=summary
> 
> 
>>>>> p.s Andy, was the breakage you reported in cpuidle related to the
>>>>> missing export.h patch?
>>>>>
>>>>> [1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/132859/focus=133279
>>>>> [2] git://gitorious.org/omap-sw-develoment/linux-omap-dev.git
>>>>> for_3_2/omap4_mpuss_pm-integrated_2
>>>>> [3] http://thread.gmane.org/gmane.linux.kernel.samsung-soc/7877
>>>>
>>>>
>>>>
> 
> 

--

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Mark Brown | 1 Dec 2011 15:58
Favicon
Gravatar

Re: linux-next not booting on snowball

On Thu, Dec 01, 2011 at 03:51:00PM +0100, Daniel Lezcano wrote:

> commit 549158d2ab01e8370d2773044fe09738a26f7086
> Author: Nicolas Pitre <nicolas.pitre@...>
> Date:   Thu Aug 25 00:35:59 2011 -0400

>     ARM: move iotable mappings within the vmalloc region
>    
>     In order to remove the build time variation between different SOCs
> with
>     regards to VMALLOC_END, the iotable mappings are now allocated inside
>     the vmalloc region.  This allows for VMALLOC_END to be identical
> across
>     all machines.

I recently reported an issue with this patch on s3c64xx which I'm
avoiding with the below change, I believe Nicolas folded this in to his
code but it's not propagated into -next yet.

From d53e2ce3fb18e097678b324932591044eb80c0f1 Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@...>
Date: Thu, 24 Nov 2011 12:46:04 +0000
Subject: [PATCH] ARM: Handle empty maps in iotable_init()

Some CPUs (such as the S3C6410) have been relying on being able to call
iotable_init() with no io_descs in order to simplify passing through
machine-specific io_descs. The changes in "ARM: move iotable mappings
within the vmalloc region" broke this by adding an early_alloc_aligned()
for an array of vm_structs. Fix this by returning early if no descriptors
have been passed.

I'm not sure if this is the most tasteful fix but it preserves existing
behaviour and allows boot to proceed on my system.

Signed-off-by: Mark Brown <broonie@...>
---
 arch/arm/mm/mmu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 06e2aef..94c5a0c 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
 <at>  <at>  -763,6 +763,9  <at>  <at>  void __init iotable_init(struct map_desc *io_desc, int nr)
 	struct map_desc *md;
 	struct vm_struct *vm;

+	if (!nr)
+		return;
+
 	vm = early_alloc_aligned(sizeof(*vm) * nr, __alignof__(*vm));

 	for (md = io_desc; nr; md++, nr--) {
--

-- 
1.7.7.3
Catalin Marinas | 1 Dec 2011 16:10
Favicon

Re: [Android-virt] [Embeddedxen-devel] [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

On Thu, Dec 01, 2011 at 10:26:37AM +0000, Ian Campbell wrote:
> On Wed, 2011-11-30 at 18:32 +0000, Stefano Stabellini wrote:
> > On Wed, 30 Nov 2011, Arnd Bergmann wrote:
> > > KVM and Xen at least both fall into the single-return-value category,
> > > so we should be able to agree on a calling conventions. KVM does not
> > > have an hcall API on ARM yet, and I see no reason not to use the
> > > same implementation that you have in the Xen guest.
> > > 
> > > Stefano, can you split out the generic parts of your asm/xen/hypercall.h
> > > file into a common asm/hypercall.h and submit it for review to the
> > > arm kernel list?
> > 
> > Sure, I can do that.
> > Usually the hypercall calling convention is very hypervisor specific,
> > but if it turns out that we have the same requirements I happy to design
> > a common interface.
> 
> I expect the only real decision to be made is hypercall page vs. raw hvc
> instruction.
> 
> The page was useful on x86 where there is a variety of instructions
> which could be used (at least for PV there was systenter/syscall/int, I
> think vmcall instruction differs between AMD and Intel also) and gives
> some additional flexibility. It's hard to predict but I don't think I'd
> expect that to be necessary on ARM.
> 
> Another reason for having a hypercall page instead of a raw instruction
> might be wanting to support 32 bit guests (from ~today) on a 64 bit
> hypervisor in the future and perhaps needing to do some shimming/arg
> translation. It would be better to aim for having the interface just be
> 32/64 agnostic but mistakes do happen.

Given the way register banking is done on AArch64, issuing an HVC on a
32-bit guest OS doesn't require translation on a 64-bit hypervisor. We
have a similar implementation at the SVC level (for 32-bit user apps on
a 64-bit kernel), the only modification was where a 32-bit SVC takes a
64-bit parameter in two separate 32-bit registers, so packing needs to
be done in a syscall wrapper.

I'm not closely involved with any of the Xen or KVM work but I would
vote for using HVC than a hypercall page.

--

-- 
Catalin
Paul Sokolovsky | 1 Dec 2011 16:46
Favicon

Android Build seeded builds report

Hello,

We launched "seeded" builds on Linaro Android Build System
(https://android-build.linaro.org) more than a week ago with the aim to
improve build performance and stability, following Android ICS import
which overloaded our previous build infrastructure, and looking forward
into making Android RC preparation to be comfortable instead of
stressful it became due to infra overload.

From the very first builds it was clear that it is huge relief
for problems we have, but it took entire Android team involvement to
prove that they're working as expected. And now, almost 2 weeks later,
we even enough stats materials to assess how much improvement they
actually did. So, I wrote a blog article about that, which includes
nice build time chart which vividly shows it all:
http://www.linaro.org/linaro-blog/2011/12/01/improving-performance-of-linaro-android-build-service/

The seeded builds launch effort was a big success in cooperation
between Infrastructure and Android team, led by Platform Director, and
I would like to thank everyone for you discussion, involvement, peer
review!

One last thing I would like to add though is that we essentially just
*started* deployment of the seeded builds, they will require more time
to uncover their full potential and made be well maintainable, so work
on that continues thru 11.12

Thanks,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
Mark Brown | 1 Dec 2011 19:32
Favicon
Gravatar

Re: [PATCH v3 3/5] clk: introduce the common clock framework

On Thu, Dec 01, 2011 at 11:30:16AM -0700, Paul Walmsley wrote:

> So for example, if you had a driver that did:

> c = clk_get(dev, clk_name);
> clk_enable(c);
> clk_set_rate(c, clk_rate);

> and c was currently not enabled by any other driver on the system, and 
> nothing else had called clk_block_rate_change(c), then the rate change 
> would be allowed to proceed.  (modulo any notifier activity, etc.)  

> So clk_{allow,block}_rate_change() was simply intended to allow or 
> restrict other users of the same clock, not the current user.

Ah, sorry!  I'd totally misunderstood what you were proposing.

Gmane