Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Marcin Juszkiewicz
W dniu 27.02.2013 03:10, Wookey pisze:
> State of the Debian/Ubuntu arm64 port
> =
> 
> *** Arm64 lives! ***

Congratulations Wookey (and everyone involved)!


>  * There is now a bootable (raring) image to download and run

> Once you've created a tarball chroot builds are simply done with 
> sbuild -c quantal-amd64-sbuild -d quantal --host=arm64  or 
> sbuild -c quantal-amd64-sbuild -d quantal --host=arm64 _  
> (I'd love it 

s/quantal/raring/ I think.



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Vincent Guittot
On 26 February 2013 18:43, Frederic Weisbecker  wrote:
> 2013/2/26 Vincent Guittot :
>> On 26 February 2013 14:16, Frederic Weisbecker  wrote:
>>> 2013/2/22 Vincent Guittot :
 I wanted to avoid having to use the sd pointer for testing NOHZ_IDLE
 flag because it occurs each time we go into idle but it seems to be
 not easily feasible.
 Another solution could be to add a synchronization step between
 rcu_assign_pointer(dom 1, NULL) and create new domain to ensure that
 all pending access to old sd values, has finished but this will imply
 a potential delay in the rebuild  of sched_domain and i'm not sure
 that it's acceptable
>
> Ah I see what you meant there. Making a synchronize_rcu() after
> setting the dom to NULL, on top of which we could work on preventing
> from any concurrent nohz_flag modification. But cpu hotplug seem to
> become a bit of a performance sensitive path this day.

That's was also my concern

>
> Ok I don't like having a per cpu state in struct sched domain but for
> now I can't find anything better. So my suggestion is that we do this
> and describe well the race, define the issue in the changelog and code
> comments and explain how we are solving it. This way at least the
> issue is identified and known. Then later, on review or after the
> patch is upstream, if somebody with some good taste comes with a
> better idea, we consider it.
>
> What do you think?

I don't have better solution than adding this state in the
sched_domain if we want to keep the exact same behavior. This will be
a bit of waste of mem because we don't need to update all sched_domain
level (1st level is enough).

Vincent

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: 13.01 Versatile Express Android build unstable

2013-02-27 Thread Jon Medhurst (Tixy)
On Tue, 2013-02-26 at 11:27 -0800, D D wrote:

> Yes, I have tried both the config in the release notes as well as
> configurations to boot A7.
> The configurations to boot A7 hang while executing the BOOTSCRIPT.
> The release note configurations get past that state, boot up the
> kernel and hang as shown in this thread.

> As a first step, I am just trying to get the release note
> configuration working without the hang. 

I've just tested out the 13.01 release notes again by following them to
recreate and replacing my TC2's firmware and configure UEFI; and that
works for me to boot a fresh 13.01 Android image from an SD card.

If you aren't having any success with that configuration, then further
things I can suggest are:

1) To make sure any firmware changes have really taken hold, try erasing
all the NOR flash. You can do this from the bootloader Cmd> prompt by
entering "flash" to get a Flash> prompt, then enter 'eraseall'. After
the flash has finished erasing, reboot the board and the firmware will
be reprogrammed again.

2) In case there is an error in the UEFI config (I know it's a bit
fiddly to enter) then you could try the Linaro firmware zip we have for
the forthcoming 13.02 release [1]. This has a UEFI version which ignores
the SD card UUID and so doesn't need reconfiguring every time you create
a new disk image. It also has the benefit that the default boot config
will work without you needing to manually set anything. If you try this
latest UEFI, I suggest you also erase the flash as above, to make extra
sure there is no old config left over from a previous version.

[1] 
https://wiki.linaro.org/ARM/VersatileExpress?action=AttachFile&do=get&target=vemsd-armlt-20130225-001.zip

-- 
Tixy


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v8 2/2] video: drm: exynos: Add pinctrl support to fimd

2013-02-27 Thread Vikas Sajjan
Adds support for pinctrl to drm fimd

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 7932dc2..7d93475 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)
struct exynos_drm_fimd_pdata *pdata;
struct exynos_drm_panel_info *panel;
struct resource *res;
+   struct pinctrl *pctrl;
int win;
int ret = -EINVAL;
 
@@ -898,6 +900,13 @@ static int fimd_probe(struct platform_device *pdev)
"with return value: %d\n", ret);
return ret;
}
+   pctrl = devm_pinctrl_get_select_default(dev);
+   if (IS_ERR(pctrl)) {
+   DRM_ERROR("failed: devm_pinctrl_get_select_default()\n"
+   "with return value: %d\n", PTR_RET(pctrl));
+   return PTR_ERR(pctrl);
+   }
+
} else {
pdata = pdev->dev.platform_data;
if (!pdata) {
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v8 0/2] Add display-timing node parsing to exynos drm fimd

2013-02-27 Thread Vikas Sajjan
Add display-timing node parsing to drm fimd and depends on
the display helper patchset at
http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html

It also adds pinctrl support for drm fimd.

changes since v7:
- addressed comments from Joonyoung Shim  to 
remove a unnecessary variable.

changes since v6:
addressed comments from Inki Dae  to
separated out the pinctrl functionality and made a separate patch.

changes since v5:
- addressed comments from Inki Dae ,
to remove the allocation of 'fbmode' and replaced
'-1'in "of_get_fb_videomode(dev->of_node, fbmode, -1)" with
OF_USE_NATIVE_MODE.

changes since v4:
- addressed comments from Paul Menzel 
, to modify the commit message

changes since v3:
- addressed comments from Sean Paul , to modify
the return values and print messages.

changes since v2:
- moved 'devm_pinctrl_get_select_default' function call under
'if (pdev->dev.of_node)', this makes NON-DT code unchanged.
(reported by: Rahul Sharma )

changes since v1:
- addressed comments from Sean Paul 


Vikas Sajjan (2):
  video: drm: exynos: Add display-timing node parsing using video
helper function
  video: drm: exynos: Add pinctrl support to fimd

 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   34 ++
 1 file changed, 30 insertions(+), 4 deletions(-)

-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Vikas Sajjan
Add support for parsing the display-timing node using video helper
function.

The DT node parsing and pinctrl selection is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25 +
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..7932dc2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
 
DRM_DEBUG_KMS("%s\n", __FILE__);
 
-   pdata = pdev->dev.platform_data;
-   if (!pdata) {
-   dev_err(dev, "no platform data specified\n");
-   return -EINVAL;
+   if (pdev->dev.of_node) {
+   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+   if (!pdata) {
+   DRM_ERROR("memory allocation for pdata failed\n");
+   return -ENOMEM;
+   }
+
+   ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
+   OF_USE_NATIVE_MODE);
+   if (ret) {
+   DRM_ERROR("failed: of_get_fb_videomode()\n"
+   "with return value: %d\n", ret);
+   return ret;
+   }
+   } else {
+   pdata = pdev->dev.platform_data;
+   if (!pdata) {
+   DRM_ERROR("no platform data specified\n");
+   return -EINVAL;
+   }
}
 
panel = &pdata->panel;
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Ian Campbell
On Wed, 2013-02-27 at 02:10 +, Wookey wrote:
> 
> Setting up an arm64 build environment is very simple. Use sbuild-createchroot 
> or mk-sbuild
> and point at the bootstrap repo, with a bit of config and some updated tools 
> packages from
> the repo (amd64 only supplied). Details are given on
> https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap 

I think these are missing a "dpkg --add-architecture arm64" at some
point before apt-get update / install crossbuild-essential-arm64 ?

I tried to adjust those instructions to something similar for Sid + the
debian-bootstrap repo but there were unmet dependencies of
crossbuild-essential-arm64 (libc, pkgbinarymangler), but I get the
impression that is to be expected at this stage?

Ian.
-- 
Ian Campbell

Alea iacta est.
[The die is cast]
-- Gaius Julius Caesar


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Wookey
+++ Ian Campbell [2013-02-27 12:00 +]:
> On Wed, 2013-02-27 at 02:10 +, Wookey wrote:
> > 
> > Setting up an arm64 build environment is very simple. Use 
> > sbuild-createchroot or mk-sbuild
> > and point at the bootstrap repo, with a bit of config and some updated 
> > tools packages from
> > the repo (amd64 only supplied). Details are given on
> > https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap 
> 
> I think these are missing a "dpkg --add-architecture arm64" at some
> point before apt-get update / install crossbuild-essential-arm64 ?

Yes, good point. Now fixed on the wiki page, along with some
s/quantal/raring/ 

Sbuild will do this for you before updating/installing, but when doing
stuff manually in the chroot (as those instructions suggest for
pre-installing crossbuild-essential-arm64) you do indeed need to add
the foreign architecture(s).

> I tried to adjust those instructions to something similar for Sid + the
> debian-bootstrap repo but there were unmet dependencies of
> crossbuild-essential-arm64 (libc, pkgbinarymangler), but I get the
> impression that is to be expected at this stage?

You won't get anywhere in Sid at the moment: No prebuilt
cross-toolchain, and some of the multiarch info missing. If you
actually want to _use_ this (as opposed to fix it) then it has to be
raring. 

I had to choose between getting this working in vaguely finite time
and keeping both Debian and Ubuntu bootstraps in sync, so unstable
just got stuck at the 'toolchain bootstrap needed' stage. Is raring
useful to you or do you need sid? Once the toolchain is done it
shouldn't be _too_ much work to get Debian uptodate although there
will be a _lot_ of patched packages. 

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Ian Campbell
On Wed, 2013-02-27 at 13:37 +, Wookey wrote:
> I had to choose between getting this working in vaguely finite time
> and keeping both Debian and Ubuntu bootstraps in sync, so unstable
> just got stuck at the 'toolchain bootstrap needed' stage.

That's quite reasonable

> Is raring useful to you or do you need sid? Once the toolchain is done it
> shouldn't be _too_ much work to get Debian uptodate although there
> will be a _lot_ of patched packages. 

Raring is fine, just reached for Debian out of habit etc.

To be honest I'm probably getting a little bit ahead of myself anyway --
I'm working on aarch64 guest support for Xen at the minute and your mail
prompted me to wonder how hard it would be to build the Xen tools for
arm64 in a multiarch environment, to some extent the toolchain is the
least of my worries ;-).

Ian.
-- 
Ian Campbell

A witty saying proves nothing, but saying something pointless gets
people's attention.


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


big.LITTLE MP Scheduler test summary-(week-9)-13.02

2013-02-27 Thread Naresh Kamboju
Hi,

Release test report (week-9) 13.02: Here is test result summary for
big.LITTLE MP Scheduler test on TC2 platform with Android image

sched_tests.git No of Test Cases Tests Run Tests Pass Tests Fail Absolute
pass rate (%) Failure Analysis/Comments
Regression20 19 19 0 100 -
mpbasicsuite10 9 9 1 90 -
mpcoresuite 4 4 4 0 75 -
mpextendedsuite 6 6 4 2 66.7 -
mploadbalance2 2 2 0 100 -

Android Build:
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-mp-13.02-release/

Linux kernel:

Linux version 3.8.0-00928-g7d866cd (jenkins-build@ip-10-10-66-148
) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02) ) #1 SMP Sat
 Feb 23 11:31:29 UTC 2013

Results spread sheet:
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0Ai9ggMs8bsGJdER3azBqWGtXNjRwb1UzSnZ4RGg3OUE#gid=10

summary:
No regression or new bugs found in this test cycle.
Results are same as week-8.

Best regards
Naresh Kamboju
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC/PATCH 1/5] context tracking: conditionalize guest support based on CONFIG_KVM

2013-02-27 Thread Kevin Hilman
Namhyung Kim  writes:

> 2013-02-26 (화), 11:29 -0800, Kevin Hilman:
>> Frederic Weisbecker  writes:
>> 
>> > On Wed, Feb 20, 2013 at 11:41:38AM -0800, Kevin Hilman wrote:
>> >> So that it can build on !KVM systems too.
>> >> 
>> >> Signed-off-by: Kevin Hilman 
>> >> ---
>> >>  kernel/context_tracking.c | 4 
>> >>  1 file changed, 4 insertions(+)
>> >> 
>> >> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
>> >> index 74f68f4..6fe96b1 100644
>> >> --- a/kernel/context_tracking.c
>> >> +++ b/kernel/context_tracking.c
>> >> @@ -1,5 +1,7 @@
>> >>  #include 
>> >> +#ifdef CONFIG_KVM
>> >>  #include 
>> >> +#endif
>> >
>> > The header should take care of the off-case, no need to ifdef its 
>> > inclusion.
>> 
>> In their current form, the headers will not build on platforms without
>> KVM support.  For example, these platforms (like ARM) don't even have
>>  or .
>> 
>> >>  #include 
>> >>  #include 
>> >>  #include 
>> >> @@ -62,6 +64,7 @@ void user_exit(void)
>> >>   local_irq_restore(flags);
>> >>  }
>> >>  
>> >> +#ifdef CONFIG_KVM
>> >>  void guest_enter(void)
>> >>  {
>> >>   if (vtime_accounting_enabled())
>> >> @@ -79,6 +82,7 @@ void guest_exit(void)
>> >>   __guest_exit();
>> >>  }
>> >>  EXPORT_SYMBOL_GPL(guest_exit);
>> >> +#endif
>> >
>> > Kvm might be built as a module so we can't actually do this unfortunately.
>> 
>> Ah, right.  How bout using 
>> 
>> #if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE)
>> 
>> for both conditionals above?  Updated patch below.
>
> This is what IS_ENABLED(CONFIG_KVM) is for.

Right, updated patch below.

Kevin


From 61e35f069a64c03a2bce348487d41072aeb9f36b Mon Sep 17 00:00:00 2001
From: Kevin Hilman 
Date: Thu, 14 Feb 2013 10:17:37 -0800
Subject: [PATCH] context tracking: conditionalize guest support based on
 CONFIG_KVM

So that it can build on !KVM systems too.

Signed-off-by: Kevin Hilman 
---
 kernel/context_tracking.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 74f68f4..fda6cd6 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -1,5 +1,7 @@
 #include 
+#if IS_ENABLED(CONFIG_KVM)
 #include 
+#endif
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ void user_exit(void)
local_irq_restore(flags);
 }
 
+#if IS_ENABLED(CONFIG_KVM)
 void guest_enter(void)
 {
if (vtime_accounting_enabled())
@@ -79,6 +82,7 @@ void guest_exit(void)
__guest_exit();
 }
 EXPORT_SYMBOL_GPL(guest_exit);
+#endif
 
 void context_tracking_task_switch(struct task_struct *prev,
 struct task_struct *next)
-- 
1.8.1.2


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC/PATCH 1/5] context tracking: conditionalize guest support based on CONFIG_KVM

2013-02-27 Thread Frederic Weisbecker
2013/2/27 Kevin Hilman :
> From 61e35f069a64c03a2bce348487d41072aeb9f36b Mon Sep 17 00:00:00 2001
> From: Kevin Hilman 
> Date: Thu, 14 Feb 2013 10:17:37 -0800
> Subject: [PATCH] context tracking: conditionalize guest support based on
>  CONFIG_KVM
>
> So that it can build on !KVM systems too.
>
> Signed-off-by: Kevin Hilman 
> ---
>  kernel/context_tracking.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
> index 74f68f4..fda6cd6 100644
> --- a/kernel/context_tracking.c
> +++ b/kernel/context_tracking.c
> @@ -1,5 +1,7 @@
>  #include 
> +#if IS_ENABLED(CONFIG_KVM)
>  #include 
> +#endif

Please fix the header rather than its inclusion.
General purpose headers like this must be able to handle the off-cases.

Thanks.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Frederic Weisbecker
On Wed, Feb 27, 2013 at 09:28:26AM +0100, Vincent Guittot wrote:
> > Ok I don't like having a per cpu state in struct sched domain but for
> > now I can't find anything better. So my suggestion is that we do this
> > and describe well the race, define the issue in the changelog and code
> > comments and explain how we are solving it. This way at least the
> > issue is identified and known. Then later, on review or after the
> > patch is upstream, if somebody with some good taste comes with a
> > better idea, we consider it.
> >
> > What do you think?
> 
> I don't have better solution than adding this state in the
> sched_domain if we want to keep the exact same behavior. This will be
> a bit of waste of mem because we don't need to update all sched_domain
> level (1st level is enough).

Or you can try something like the below. Both flags and sched_domain share the 
same
object here so the same RCU lifecycle. And there shouldn't be more overhead 
there
since accessing rq->sd_rq.sd is the same than rq->sd_rq in the ASM level: only
one pointer to dereference.

Also rq_idle becomes a separate value from rq->nohz_flags. It's a simple boolean
(just making it an int here because boolean size are a bit opaque, although they
are supposed to be char, let's just avoid surprises in structures).

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index cc03cfd..16c0d55 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -417,7 +417,10 @@ struct rq {
 
 #ifdef CONFIG_SMP
struct root_domain *rd;
-   struct sched_domain *sd;
+   struct sched_domain_rq {
+   struct sched_domain sd;
+   int rq_idle;
+   } __rcu *sd_rq;
 
unsigned long cpu_power;
 
@@ -505,9 +508,14 @@ DECLARE_PER_CPU(struct rq, runqueues);
 
 #ifdef CONFIG_SMP
 
-#define rcu_dereference_check_sched_domain(p) \
-   rcu_dereference_check((p), \
- lockdep_is_held(&sched_domains_mutex))
+#define rcu_dereference_check_sched_domain(p) ({\
+   struct sched_domain_rq *__sd_rq = rcu_dereference_check((p),\
+   lockdep_is_held(&sched_domains_mutex)); \
+   if (!__sd_rq)   \
+   NULL;   \
+   else\
+   &__sd_rq->sd;   \
+})
 
 /*
  * The domain tree (rq->sd) is protected by RCU's quiescent state transition.
@@ -517,7 +525,7 @@ DECLARE_PER_CPU(struct rq, runqueues);
  * preempt-disabled sections.
  */
 #define for_each_domain(cpu, __sd) \
-   for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); \
+   for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd_rq); \
__sd; __sd = __sd->parent)
 
 #define for_each_lower_domain(sd) for (; sd; sd = sd->child)


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Vincent Guittot
On 27 February 2013 17:13, Frederic Weisbecker  wrote:
> On Wed, Feb 27, 2013 at 09:28:26AM +0100, Vincent Guittot wrote:
>> > Ok I don't like having a per cpu state in struct sched domain but for
>> > now I can't find anything better. So my suggestion is that we do this
>> > and describe well the race, define the issue in the changelog and code
>> > comments and explain how we are solving it. This way at least the
>> > issue is identified and known. Then later, on review or after the
>> > patch is upstream, if somebody with some good taste comes with a
>> > better idea, we consider it.
>> >
>> > What do you think?
>>
>> I don't have better solution than adding this state in the
>> sched_domain if we want to keep the exact same behavior. This will be
>> a bit of waste of mem because we don't need to update all sched_domain
>> level (1st level is enough).
>
> Or you can try something like the below. Both flags and sched_domain share 
> the same
> object here so the same RCU lifecycle. And there shouldn't be more overhead 
> there
> since accessing rq->sd_rq.sd is the same than rq->sd_rq in the ASM level: only
> one pointer to dereference.

your proposal solves the waste of memory and keeps the sync between
flag and nr_busy. I'm going to try it

Thanks

>
> Also rq_idle becomes a separate value from rq->nohz_flags. It's a simple 
> boolean
> (just making it an int here because boolean size are a bit opaque, although 
> they
> are supposed to be char, let's just avoid surprises in structures).
>
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index cc03cfd..16c0d55 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -417,7 +417,10 @@ struct rq {
>
>  #ifdef CONFIG_SMP
> struct root_domain *rd;
> -   struct sched_domain *sd;
> +   struct sched_domain_rq {
> +   struct sched_domain sd;
> +   int rq_idle;
> +   } __rcu *sd_rq;
>
> unsigned long cpu_power;
>
> @@ -505,9 +508,14 @@ DECLARE_PER_CPU(struct rq, runqueues);
>
>  #ifdef CONFIG_SMP
>
> -#define rcu_dereference_check_sched_domain(p) \
> -   rcu_dereference_check((p), \
> - lockdep_is_held(&sched_domains_mutex))
> +#define rcu_dereference_check_sched_domain(p) ({\
> +   struct sched_domain_rq *__sd_rq = rcu_dereference_check((p),\
> +   lockdep_is_held(&sched_domains_mutex)); \
> +   if (!__sd_rq)   \
> +   NULL;   \
> +   else\
> +   &__sd_rq->sd;   \
> +})
>
>  /*
>   * The domain tree (rq->sd) is protected by RCU's quiescent state transition.
> @@ -517,7 +525,7 @@ DECLARE_PER_CPU(struct rq, runqueues);
>   * preempt-disabled sections.
>   */
>  #define for_each_domain(cpu, __sd) \
> -   for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); \
> +   for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd_rq); \
> __sd; __sd = __sd->parent)
>
>  #define for_each_lower_domain(sd) for (; sd; sd = sd->child)
>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Unable to install svn on Ubuntu 12.04 (64-bit)

2013-02-27 Thread James Tunnicliffe
To get the latest release of linaro-media-create please add the
following PPA and update:
https://launchpad.net/~linaro-maintainers/+archive/tools

We released a new version of linaro-media-create yesterday that should
resolve this issue.

Thanks,

James

On 27 February 2013 06:40, Amar Shankar
 wrote:
>
> Hi Dave,
>
> We have installed latest Ubuntu 12.04 (Precise Pangolin) 64-bit from net and
> tried to execute the steps to build UEFI image as in link below:-
>
> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=BeagleBoardPkg#How_to_build_UEFI_for_the_BeagleBoard
>
> However on executing below command to create beagle_sd.img, we are getting
> the error as below (shown in red).
>
> raj@Rajkiran:~/uefi/beagle_image$ sudo linaro-media-create --image_file
> beagle_sd.img --dev beagle --binary linaro-m-headless-tar-20101101-0.tar.gz
> --hwpack
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gzraj@Rajkiran:~/uefi/beagle_image$
> sudo linaro-media-create --image_file beagle_sd.img --dev beagle --binary
> linaro-m-headless-tar-20101101-0.tar.gz --hwpack
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
> 
> Installing (linaro-hwpack-install)
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz in target rootfs.
> Unpacking hardware pack ...Done
> Updating apt package lists ...
> Ign file: ./ Release.gpg
> Ign filetmp/tmp.TAq3ZPdSgS/unpacked/pkgs/ ./ Translation-en
> Ign file: ./ Release
> Ign file: ./ Packages
> Ign http://ports.ubuntu.com maverick Release.gpg
> Ign http://ports.ubuntu.com/ maverick/main Translation-en
> Get:1 http://ppa.launchpad.net maverick Release.gpg [316B]
> Ign http://ports.ubuntu.com/ maverick/universe Translation-en
> Ign http://ports.ubuntu.com maverick-security Release.gpg
> Ign http://ports.ubuntu.com/ maverick-security/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-security/universe Translation-en
> Ign http://ports.ubuntu.com maverick-updates Release.gpg
> Ign http://ports.ubuntu.com/ maverick-updates/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-updates/universe Translation-en
> Ign http://ports.ubuntu.com maverick-proposed Release.gpg
> Ign http://ports.ubuntu.com/ maverick-proposed/main Translation-en
> Ign http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu/
> maverick/main Translation-en
> Get:2 http://ppa.launchpad.net maverick Release [9762B]
> Ign http://ports.ubuntu.com/ maverick-proposed/universe Translation-en
> Ign http://ports.ubuntu.com maverick Release
> Ign http://ports.ubuntu.com maverick-security Release
> Ign http://ports.ubuntu.com maverick-updates Release
> Ign http://ports.ubuntu.com maverick-proposed Release
> Ign http://ports.ubuntu.com maverick/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick/universe armel Packages/DiffIndex
> Get:3 http://ppa.launchpad.net maverick/main armel Packages [11.7kB]
> Ign http://ports.ubuntu.com maverick-security/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-security/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick/main armel Packages
> Ign http://ports.ubuntu.com maverick/universe armel Packages
> Ign http://ports.ubuntu.com maverick-security/main armel Packages
> Ign http://ports.ubuntu.com maverick-security/universe armel Packages
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages
> Ign http://ports.ubuntu.com maverick-updates/universe armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/universe armel Packages
> Err http://ports.ubuntu.com maverick/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick/universe armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-security/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-security/universe armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-updates/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-updates/universe armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-proposed/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-proposed/universe armel Packages
> 404 Not Found
> Fetched 21.8kB in 3s (5576B/s)
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick/main/binary-armel/Packages.gz 404 Not
> Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick/universe/binary-armel/Packages.gz 404
> Not Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick-security/main/binary-armel/Packages.gz
> 404 Not F

Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Lennart Sorensen
On Wed, Feb 27, 2013 at 06:38:55PM -0300, Cláudio Sampaio wrote:
> Is there any device with Aarch64 on sale? I couldn't find any, only some
> mentions from Calxeda.
> Would you mind to provide suggestions of any seller which sells through the
> internet?

There are none for sale yet.  I believe some prototype chips exist,
as does an emulator from ARM.

-- 
Len Sorensen

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: arm64 Debian/Ubuntu port image available

2013-02-27 Thread Cláudio Sampaio
On Tue, Feb 26, 2013 at 11:10 PM, Wookey  wrote:

> State of the Debian/Ubuntu arm64 port
> =
>
> *** Arm64 lives! ***
>

Hi,

Is there any device with Aarch64 on sale? I couldn't find any, only some
mentions from Calxeda.
Would you mind to provide suggestions of any seller which sells through the
internet?

-- 
Cláudio "Patola" Sampaio
IRC: ptl  - Yahoo: patolaaa
Campinas, SP - Brazil.
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Stéphane Marchesin
On Wed, Feb 27, 2013 at 11:21 AM, Stéphane Marchesin
 wrote:
> On Wed, Feb 27, 2013 at 3:49 AM, Vikas Sajjan  wrote:
>> Add support for parsing the display-timing node using video helper
>> function.
>>
>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>> exists and the NON-DT logic is still maintained under the 'else' part.
>>
>> Signed-off-by: Leela Krishna Amudala 
>> Signed-off-by: Vikas Sajjan 
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25 +
>>  1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 9537761..7932dc2 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -20,6 +20,7 @@
>>  #include 
>>  #include 
>>
>> +#include 
>>  #include 
>>  #include 
>>
>> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
>>
>> DRM_DEBUG_KMS("%s\n", __FILE__);
>>
>> -   pdata = pdev->dev.platform_data;
>> -   if (!pdata) {
>> -   dev_err(dev, "no platform data specified\n");
>> -   return -EINVAL;
>> +   if (pdev->dev.of_node) {
>> +   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>> +   if (!pdata) {
>> +   DRM_ERROR("memory allocation for pdata failed\n");
>> +   return -ENOMEM;
>> +   }
>> +
>> +   ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
>> +   OF_USE_NATIVE_MODE);
>> +   if (ret) {
>> +   DRM_ERROR("failed: of_get_fb_videomode()\n"
>> +   "with return value: %d\n", ret);
>> +   return ret;
>
> Here I think you leak pdata in the error path.
>

Hmm nevermind it goes away with the dev.

Stéphane

> Stéphane
>
>> +   }
>> +   } else {
>> +   pdata = pdev->dev.platform_data;
>> +   if (!pdata) {
>> +   DRM_ERROR("no platform data specified\n");
>> +   return -EINVAL;
>> +   }
>> }
>>
>> panel = &pdata->panel;
>> --
>> 1.7.9.5
>>
>> ___
>> dri-devel mailing list
>> dri-de...@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Stéphane Marchesin
On Wed, Feb 27, 2013 at 3:49 AM, Vikas Sajjan  wrote:
> Add support for parsing the display-timing node using video helper
> function.
>
> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
> exists and the NON-DT logic is still maintained under the 'else' part.
>
> Signed-off-by: Leela Krishna Amudala 
> Signed-off-by: Vikas Sajjan 
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25 +
>  1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 9537761..7932dc2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -20,6 +20,7 @@
>  #include 
>  #include 
>
> +#include 
>  #include 
>  #include 
>
> @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
>
> DRM_DEBUG_KMS("%s\n", __FILE__);
>
> -   pdata = pdev->dev.platform_data;
> -   if (!pdata) {
> -   dev_err(dev, "no platform data specified\n");
> -   return -EINVAL;
> +   if (pdev->dev.of_node) {
> +   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> +   if (!pdata) {
> +   DRM_ERROR("memory allocation for pdata failed\n");
> +   return -ENOMEM;
> +   }
> +
> +   ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
> +   OF_USE_NATIVE_MODE);
> +   if (ret) {
> +   DRM_ERROR("failed: of_get_fb_videomode()\n"
> +   "with return value: %d\n", ret);
> +   return ret;

Here I think you leak pdata in the error path.

Stéphane

> +   }
> +   } else {
> +   pdata = pdev->dev.platform_data;
> +   if (!pdata) {
> +   DRM_ERROR("no platform data specified\n");
> +   return -EINVAL;
> +   }
> }
>
> panel = &pdata->panel;
> --
> 1.7.9.5
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Vikas Sajjan
Hi,

On 28 February 2013 08:07, Joonyoung Shim  wrote:
> On 02/27/2013 08:49 PM, Vikas Sajjan wrote:
>>
>> Add support for parsing the display-timing node using video helper
>> function.
>>
>> The DT node parsing and pinctrl selection is done only if 'dev.of_node'
>> exists and the NON-DT logic is still maintained under the 'else' part.
>>
>> Signed-off-by: Leela Krishna Amudala 
>> Signed-off-by: Vikas Sajjan 
>> ---
>>   drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25
>> +
>>   1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 9537761..7932dc2 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -20,6 +20,7 @@
>>   #include 
>>   #include 
>>   +#include 
>>   #include 
>>   #include 
>>   @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
>> *pdev)
>> DRM_DEBUG_KMS("%s\n", __FILE__);
>>   - pdata = pdev->dev.platform_data;
>> -   if (!pdata) {
>> -   dev_err(dev, "no platform data specified\n");
>> -   return -EINVAL;
>> +   if (pdev->dev.of_node) {
>> +   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>> +   if (!pdata) {
>> +   DRM_ERROR("memory allocation for pdata failed\n");
>> +   return -ENOMEM;
>> +   }
>> +
>> +   ret = of_get_fb_videomode(dev->of_node,
>> &pdata->panel.timing,
>> +   OF_USE_NATIVE_MODE);
>> +   if (ret) {
>> +   DRM_ERROR("failed: of_get_fb_videomode()\n"
>> +   "with return value: %d\n", ret);
>
>
> Could you make this error log to one line?
>
The Line was going beyond 80 line marks, hence I had to split it.

> except this,
> Acked-by: Joonyoung Shim 
>
>
>> +   return ret;
>> +   }
>> +   } else {
>> +   pdata = pdev->dev.platform_data;
>> +   if (!pdata) {
>> +   DRM_ERROR("no platform data specified\n");
>> +   return -EINVAL;
>> +   }
>> }
>> panel = &pdata->panel;
>
>



-- 
Thanks and Regards
 Vikas Sajjan

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Joonyoung Shim

On 02/27/2013 08:49 PM, Vikas Sajjan wrote:

Add support for parsing the display-timing node using video helper
function.

The DT node parsing and pinctrl selection is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
---
  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25 +
  1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..7932dc2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -20,6 +20,7 @@
  #include 
  #include 
  
+#include 

  #include 
  #include 
  
@@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device *pdev)
  
  	DRM_DEBUG_KMS("%s\n", __FILE__);
  
-	pdata = pdev->dev.platform_data;

-   if (!pdata) {
-   dev_err(dev, "no platform data specified\n");
-   return -EINVAL;
+   if (pdev->dev.of_node) {
+   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+   if (!pdata) {
+   DRM_ERROR("memory allocation for pdata failed\n");
+   return -ENOMEM;
+   }
+
+   ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
+   OF_USE_NATIVE_MODE);
+   if (ret) {
+   DRM_ERROR("failed: of_get_fb_videomode()\n"
+   "with return value: %d\n", ret);


Could you make this error log to one line?

except this,
Acked-by: Joonyoung Shim 


+   return ret;
+   }
+   } else {
+   pdata = pdev->dev.platform_data;
+   if (!pdata) {
+   DRM_ERROR("no platform data specified\n");
+   return -EINVAL;
+   }
}
  
  	panel = &pdata->panel;



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Joonyoung Shim

On 02/28/2013 11:45 AM, Vikas Sajjan wrote:

Hi,

On 28 February 2013 08:07, Joonyoung Shim  wrote:

On 02/27/2013 08:49 PM, Vikas Sajjan wrote:

Add support for parsing the display-timing node using video helper
function.

The DT node parsing and pinctrl selection is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
---
   drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25
+
   1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..7932dc2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -20,6 +20,7 @@
   #include 
   #include 
   +#include 
   #include 
   #include 
   @@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
*pdev)
 DRM_DEBUG_KMS("%s\n", __FILE__);
   - pdata = pdev->dev.platform_data;
-   if (!pdata) {
-   dev_err(dev, "no platform data specified\n");
-   return -EINVAL;
+   if (pdev->dev.of_node) {
+   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+   if (!pdata) {
+   DRM_ERROR("memory allocation for pdata failed\n");
+   return -ENOMEM;
+   }
+
+   ret = of_get_fb_videomode(dev->of_node,
&pdata->panel.timing,
+   OF_USE_NATIVE_MODE);
+   if (ret) {
+   DRM_ERROR("failed: of_get_fb_videomode()\n"
+   "with return value: %d\n", ret);


Could you make this error log to one line?


The Line was going beyond 80 line marks, hence I had to split it.


So remove or contract some log messages, e.g. "with return value"
I think that is unnecessary.


except this,
Acked-by: Joonyoung Shim 



+   return ret;
+   }
+   } else {
+   pdata = pdev->dev.platform_data;
+   if (!pdata) {
+   DRM_ERROR("no platform data specified\n");
+   return -EINVAL;
+   }
 }
 panel = &pdata->panel;








___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v8 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Vikas Sajjan
On Thu, Feb 28, 2013 at 8:21 AM, Joonyoung Shim  wrote:
> On 02/28/2013 11:45 AM, Vikas Sajjan wrote:
>>
>> Hi,
>>
>> On 28 February 2013 08:07, Joonyoung Shim  wrote:
>>>
>>> On 02/27/2013 08:49 PM, Vikas Sajjan wrote:

 Add support for parsing the display-timing node using video helper
 function.

 The DT node parsing and pinctrl selection is done only if 'dev.of_node'
 exists and the NON-DT logic is still maintained under the 'else' part.

 Signed-off-by: Leela Krishna Amudala 
 Signed-off-by: Vikas Sajjan 
 ---
drivers/gpu/drm/exynos/exynos_drm_fimd.c |   25
 +
1 file changed, 21 insertions(+), 4 deletions(-)

 diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
 b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
 index 9537761..7932dc2 100644
 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
 +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
 @@ -20,6 +20,7 @@
#include 
#include 
+#include 
#include 
#include 
@@ -883,10 +884,26 @@ static int fimd_probe(struct platform_device
 *pdev)
  DRM_DEBUG_KMS("%s\n", __FILE__);
- pdata = pdev->dev.platform_data;
 -   if (!pdata) {
 -   dev_err(dev, "no platform data specified\n");
 -   return -EINVAL;
 +   if (pdev->dev.of_node) {
 +   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 +   if (!pdata) {
 +   DRM_ERROR("memory allocation for pdata
 failed\n");
 +   return -ENOMEM;
 +   }
 +
 +   ret = of_get_fb_videomode(dev->of_node,
 &pdata->panel.timing,
 +   OF_USE_NATIVE_MODE);
 +   if (ret) {
 +   DRM_ERROR("failed: of_get_fb_videomode()\n"
 +   "with return value: %d\n", ret);
>>>
>>>
>>> Could you make this error log to one line?
>>>
>> The Line was going beyond 80 line marks, hence I had to split it.
>
>
> So remove or contract some log messages, e.g. "with return value"
> I think that is unnecessary.
>
Will do and resend.
>
>>> except this,
>>> Acked-by: Joonyoung Shim 
>>>
>>>
 +   return ret;
 +   }
 +   } else {
 +   pdata = pdev->dev.platform_data;
 +   if (!pdata) {
 +   DRM_ERROR("no platform data specified\n");
 +   return -EINVAL;
 +   }
  }
  panel = &pdata->panel;
>>>
>>>
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v9 0/2] Add display-timing node parsing to exynos drm fimd

2013-02-27 Thread Vikas Sajjan
Add display-timing node parsing to drm fimd and depends on
the display helper patchset at
http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html

It also adds pinctrl support for drm fimd.

changes since v8:
- replaced IS_ERR() with IS_ERR_OR_NULL(),
because devm_pinctrl_get_select_default can return NULL,
If CONFIG_PINCTRL is disabled.
- modified the error log, such that it shall NOT cross 80 column.
- added Acked-by.
changes since v7:
- addressed comments from Joonyoung Shim  
to remove a unnecessary variable.

changes since v6:
addressed comments from Inki Dae  to
separated out the pinctrl functionality and made a separate patch.

changes since v5:
- addressed comments from Inki Dae ,
to remove the allocation of 'fbmode' and replaced
'-1'in "of_get_fb_videomode(dev->of_node, fbmode, -1)" with
OF_USE_NATIVE_MODE.

changes since v4:
- addressed comments from Paul Menzel 
, to modify the commit message

changes since v3:
- addressed comments from Sean Paul , to modify
the return values and print messages.

changes since v2:
- moved 'devm_pinctrl_get_select_default' function call under
'if (pdev->dev.of_node)', this makes NON-DT code unchanged.
(reported by: Rahul Sharma )

changes since v1:
- addressed comments from Sean Paul 


Vikas Sajjan (2):
  video: drm: exynos: Add display-timing node parsing using video
helper function
  video: drm: exynos: Add pinctrl support to fimd

 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   33 ++
 1 file changed, 29 insertions(+), 4 deletions(-)

-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v9 2/2] video: drm: exynos: Add pinctrl support to fimd

2013-02-27 Thread Vikas Sajjan
Adds support for pinctrl to drm fimd

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index e323cf9..21ada8d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)
struct exynos_drm_fimd_pdata *pdata;
struct exynos_drm_panel_info *panel;
struct resource *res;
+   struct pinctrl *pctrl;
int win;
int ret = -EINVAL;
 
@@ -897,6 +899,13 @@ static int fimd_probe(struct platform_device *pdev)
DRM_ERROR("failed: of_get_fb_videomode() : %d\n", ret);
return ret;
}
+   pctrl = devm_pinctrl_get_select_default(dev);
+   if (IS_ERR_OR_NULL(pctrl)) {
+   DRM_ERROR("failed: devm_pinctrl_get_select_default():"
+   "%d\n", PTR_RET(pctrl));
+   return PTR_ERR(pctrl);
+   }
+
} else {
pdata = pdev->dev.platform_data;
if (!pdata) {
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v9 1/2] video: drm: exynos: Add display-timing node parsing using video helper function

2013-02-27 Thread Vikas Sajjan
Add support for parsing the display-timing node using video helper
function.

The DT node parsing is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.

Signed-off-by: Leela Krishna Amudala 
Signed-off-by: Vikas Sajjan 
Acked-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..e323cf9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -883,10 +884,25 @@ static int fimd_probe(struct platform_device *pdev)
 
DRM_DEBUG_KMS("%s\n", __FILE__);
 
-   pdata = pdev->dev.platform_data;
-   if (!pdata) {
-   dev_err(dev, "no platform data specified\n");
-   return -EINVAL;
+   if (pdev->dev.of_node) {
+   pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+   if (!pdata) {
+   DRM_ERROR("memory allocation for pdata failed\n");
+   return -ENOMEM;
+   }
+
+   ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
+   OF_USE_NATIVE_MODE);
+   if (ret) {
+   DRM_ERROR("failed: of_get_fb_videomode() : %d\n", ret);
+   return ret;
+   }
+   } else {
+   pdata = pdev->dev.platform_data;
+   if (!pdata) {
+   DRM_ERROR("no platform data specified\n");
+   return -EINVAL;
+   }
}
 
panel = &pdata->panel;
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v9 0/2] Add display-timing node parsing to exynos drm fimd

2013-02-27 Thread Viresh Kumar
On 28 February 2013 09:42, Vikas Sajjan  wrote:
> Add display-timing node parsing to drm fimd and depends on
> the display helper patchset at
> http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
>
> It also adds pinctrl support for drm fimd.

Hi Vikas,

Can you please keep linaro-kernel instead of linaro-dev in cc for patches?
And probably keeping patc...@linaro.org in bcc is better.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 4/5] HACK: set_parent callback for OMAP4 non-core DPLLs

2013-02-27 Thread Mike Turquette
This is a silly patch that demonstrates calling clk_set_parent from
within a .set_rate callback, which itself was called by clk_set_rate.
It may make your board burst into flames or otherwise void various
warrantees.

I do not suggest that the OMAP folks take this approach in unless they
really want to.  Instead it was a way for me to increase code coverage
while testing the reentrancy changes to the core clock framework.

Changes in this patch include removing __clk_prepare and __clk_unprepare
from omap3_noncore_dpll_set_rate and using the (now reentrant)
clk_prepare & clk_unprepare versions.  Most importantly this patch
introduces omap3_noncore_dpll_set_parent and adds it to the clk_ops for
all OMAP3+ DPLLs.

The net gain is that on OMAP4 platforms it is now possible to call
clk_set_parent(some_dpll_ck, ...) in order to change the PLL input from
the reference clock to the bypass clock, and vice versa.

omap3_noncore_dpll_set_rate is modified to call clk_set_parent when
appropriate as a way to test reentrancy.

Not-signed-off-by: Mike Turquette 
---
 arch/arm/mach-omap2/cclock44xx_data.c |1 +
 arch/arm/mach-omap2/clock.h   |1 +
 arch/arm/mach-omap2/dpll3xxx.c|  107 +
 3 files changed, 84 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-omap2/cclock44xx_data.c 
b/arch/arm/mach-omap2/cclock44xx_data.c
index 5789a5e..df5da7f 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -386,6 +386,7 @@ static const struct clk_ops dpll_ck_ops = {
.round_rate = &omap2_dpll_round_rate,
.set_rate   = &omap3_noncore_dpll_set_rate,
.get_parent = &omap2_init_dpll_parent,
+   .set_parent = &omap3_noncore_dpll_set_parent,
 };
 
 static struct clk_hw_omap dpll_iva_ck_hw = {
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index b402048..1cf43a5 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -367,6 +367,7 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long 
target_rate,
 unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate);
 int omap3_noncore_dpll_enable(struct clk_hw *hw);
 void omap3_noncore_dpll_disable(struct clk_hw *hw);
+int omap3_noncore_dpll_set_parent(struct clk_hw *hw, u8 index);
 int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate);
 u32 omap3_dpll_autoidle_read(struct clk_hw_omap *clk);
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index 0a02aab5..bae123e 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -450,6 +450,76 @@ void omap3_noncore_dpll_disable(struct clk_hw *hw)
clkdm_clk_disable(clk->clkdm, hw->clk);
 }
 
+/* Non-CORE DPLL set parent code */
+
+/**
+ * omap3_noncore_dpll_set_parent - set non-core DPLL input
+ * @hw: hardware object for this clock/dpll
+ * @index: parent to switch to in the array of possible parents
+ *
+ * Sets the input to the DPLL to either the reference clock or bypass
+ * clock.  Returns error code upon failure or 0 upon success.
+ */
+int omap3_noncore_dpll_set_parent(struct clk_hw *hw, u8 index)
+{
+   struct clk_hw_omap *clk = to_clk_hw_omap(hw);
+   u16 freqsel = 0;
+   struct dpll_data *dd;
+   int ret;
+
+   if (!hw)
+   return -EINVAL;
+
+   dd = clk->dpll_data;
+   if (!dd)
+   return -EINVAL;
+
+   clk_prepare(dd->clk_bypass);
+   clk_enable(dd->clk_bypass);
+   clk_prepare(dd->clk_ref);
+   clk_enable(dd->clk_ref);
+
+   /* FIXME hard coded magic numbers are gross */
+   switch (index) {
+   /* dpll input is the reference clock */
+   case 0:
+   if (dd->last_rounded_rate == 0)
+   return -EINVAL;
+
+   /* No freqsel on OMAP4 and OMAP3630 */
+   if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
+   freqsel = _omap3_dpll_compute_freqsel(clk,
+   dd->last_rounded_n);
+   WARN_ON(!freqsel);
+   }
+
+   pr_debug("%s: %s: set rate: locking rate to %lu.\n",
+   __func__, __clk_get_name(hw->clk), 
dd->last_rounded_rate);
+
+   ret = omap3_noncore_dpll_program(clk, freqsel);
+   break;
+
+   /* dpll input is the bypass clock */
+   case 1:
+   pr_debug("%s: %s: set rate: entering bypass.\n",
+   __func__, __clk_get_name(hw->clk));
+
+   ret = _omap3_noncore_dpll_bypass(clk);
+   break;
+
+   default:
+   pr_warn("%s: %s: set parent: invalid pare

[PATCH v3 0/5] common clk framework reentrancy & dvfs, take 3

2013-02-27 Thread Mike Turquette
Hello,

This series implements reentrancy for the common clk implementation of
the clk.h api.  Making reentrant calls into the clock framework is both
necessary and desirable for many use cases such as enabling off-chip
clocks via i2c.  The first patch in the series implements this.

A neat side effect of reentrancy is that it is possible for platforms
using voltage regulators controlled via i2c to register rate-change
notifier handlers to scale voltage as a function of clock rate.  This is
an effective way to implement dynamic voltage & frequency scaling.
Patch #2 implements a helper function for registering such a notifier
handler.

The third patch in the series demonstrates dvfs on OMAP platforms by
modifying the cpufreq-omap driver; it migrates the voltage scaling logic
out of the cpufreq driver's .target callback and registers callbacks via
the helper introduced in patch #2.

Patches four and five are purely test coverage.  And what better way to
test than to muck with fragile PLL programming code?  These patches test
out a lot of the aforementioned reentrancy in the OMAP3+ DPLL code.
They are not for merging, but as a demonstration of what is now
possible.

Finally, I know that Documentation/clk.txt needs an update for these
changes but I wanted this on the list before I flew out to LCA 2013.
I'll provide that update during or after the conference.

Two previous (and considerably more insane) attempts at this,
v1: http://article.gmane.org/gmane.linux.kernel/1327866
v2: http://marc.info/?l=linux-kernel&m=134507429302463&w=2

Mike Turquette (5):
  clk: allow reentrant calls into the clk framework
  clk: notifier handler for dynamic voltage scaling
  cpufreq: omap: scale regulator from clk notifier
  HACK: set_parent callback for OMAP4 non-core DPLLs
  HACK: omap: opp: add fake 400MHz OPP to bypass MPU

 arch/arm/mach-omap2/cclock44xx_data.c |1 +
 arch/arm/mach-omap2/clock.h   |1 +
 arch/arm/mach-omap2/dpll3xxx.c|  107 ++
 arch/arm/mach-omap2/opp4xxx_data.c|   18 +++
 drivers/clk/Makefile  |1 +
 drivers/clk/clk.c |  254 -
 drivers/clk/dvfs.c|  125 
 drivers/cpufreq/omap-cpufreq.c|   82 +++
 include/linux/clk.h   |   27 +++-
 9 files changed, 459 insertions(+), 157 deletions(-)
 create mode 100644 drivers/clk/dvfs.c

-- 
1.7.10.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 5/5] HACK: omap: opp: add fake 400MHz OPP to bypass MPU

2013-02-27 Thread Mike Turquette
From: Mike Turquette 

The following is another silly patch which was done to test calling
clk_set_parent from within a call to clk_set_rate.  It may make your
board burst into flames or otherwise void various warrantees.

This patch introduces a 400MHz OPP for the MPU, which happens to
correspond to the bypass clk rate on the 4430 Panda board and 4460 Panda
ES board, both using a 38.4MHz SYS_CLK oscillator rate.

One may test this by using the cpufreq-userspace governor and executing:
echo 40 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

On Panda ES validation can be done via:
$ find /debug/clk/ -iname "dpll_mpu_ck"
/debug/clk/virt_3840_ck/sys_clkin_ck/dpll_mpu_ck
$ echo 40 > scaling_setspeed
$ find /debug/clk/ -iname "dpll_mpu_ck"
/debug/clk/virt_3840_ck/sys_clkin_ck/dpll_core_ck/dpll_core_x2_ck/dpll_core_m5x2_ck/div_mpu_hs_clk/dpll_mpu_ck
$ cat /proc/cpuinfo
...
BogoMIPS: 794.26
...
$ cat /sys/class/regulator/regulator.3/microvolts
120

Not-signed-off-by: Mike Turquette 
---
 arch/arm/mach-omap2/opp4xxx_data.c |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/mach-omap2/opp4xxx_data.c 
b/arch/arm/mach-omap2/opp4xxx_data.c
index d470b72..c7bccf7 100644
--- a/arch/arm/mach-omap2/opp4xxx_data.c
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -67,6 +67,15 @@ struct omap_volt_data omap443x_vdd_core_volt_data[] = {
 static struct omap_opp_def __initdata omap443x_opp_def_list[] = {
/* MPU OPP1 - OPP50 */
OPP_INITIALIZER("mpu", true, 3, OMAP4430_VDD_MPU_OPP50_UV),
+   /*
+* MPU OPP1.5 - 400MHz - completely FAKE - not endorsed by TI
+*
+* DPLL_MPU is in Low Power Bypass driven by DPLL_CORE.  After
+* transitioning to this OPP you can see the migration in debugfs:
+* /d/clk/virt_3840_ck/sys_clkin_ck/dpll_mpu_ck to
+* /d/.../dpll_core_ck/dpll_core_x2_ck/dpll_core_m5x2_ck/div_mpu_hs_clk
+*/
+   OPP_INITIALIZER("mpu", true, 4, 110),
/* MPU OPP2 - OPP100 */
OPP_INITIALIZER("mpu", true, 6, OMAP4430_VDD_MPU_OPP100_UV),
/* MPU OPP3 - OPP-Turbo */
@@ -126,6 +135,15 @@ struct omap_volt_data omap446x_vdd_core_volt_data[] = {
 static struct omap_opp_def __initdata omap446x_opp_def_list[] = {
/* MPU OPP1 - OPP50 */
OPP_INITIALIZER("mpu", true, 35000, OMAP4460_VDD_MPU_OPP50_UV),
+   /*
+* MPU OPP1.5 - 400MHz - completely FAKE - not endorsed by TI
+*
+* DPLL_MPU is in Low Power Bypass driven by DPLL_CORE.  After
+* transitioning to this OPP you can see the migration in debugfs:
+* /d/clk/virt_3840_ck/sys_clkin_ck/dpll_mpu_ck to
+* /d/.../dpll_core_ck/dpll_core_x2_ck/dpll_core_m5x2_ck/div_mpu_hs_clk
+*/
+   OPP_INITIALIZER("mpu", true, 4, 110),
/* MPU OPP2 - OPP100 */
OPP_INITIALIZER("mpu", true, 7, OMAP4460_VDD_MPU_OPP100_UV),
/* MPU OPP3 - OPP-Turbo */
-- 
1.7.10.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-02-27 Thread Mike Turquette
Dynamic voltage and frequency scaling (dvfs) is a common power saving
technique in many of today's modern processors.  This patch introduces a
common clk rate-change notifier handler which scales voltage
appropriately whenever clk_set_rate is called on an affected clock.

There are three prerequisites to using this feature:

1) the affected clocks must be using the common clk framework
2) voltage must be scaled using the regulator framework
3) clock frequency and regulator voltage values must be paired via the
OPP library

If a platform or device meets these requirements then using the notifier
handler is straightforward.  A struct device is used as the basis for
performing initial look-ups for clocks via clk_get and regulators via
regulator_get.  This means that notifiers are subscribed on a per-device
basis and multiple devices can have notifiers subscribed to the same
clock.  Put another way, the voltage chosen for a rail during a call to
clk_set_rate is a function of the device, not the clock.

Signed-off-by: Mike Turquette 
---
 drivers/clk/Makefile |1 +
 drivers/clk/dvfs.c   |  125 ++
 include/linux/clk.h  |   27 ++-
 3 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/dvfs.c

diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index e73b1d6..e720b7c 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_COMMON_CLK)+= clk-fixed-factor.o
 obj-$(CONFIG_COMMON_CLK)   += clk-fixed-rate.o
 obj-$(CONFIG_COMMON_CLK)   += clk-gate.o
 obj-$(CONFIG_COMMON_CLK)   += clk-mux.o
+obj-$(CONFIG_COMMON_CLK)   += dvfs.o
 
 # SoCs specific
 obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835.o
diff --git a/drivers/clk/dvfs.c b/drivers/clk/dvfs.c
new file mode 100644
index 000..d916d0b
--- /dev/null
+++ b/drivers/clk/dvfs.c
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2011-2012 Linaro Ltd 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Helper functions for dynamic voltage & frequency transitions using
+ * the OPP library.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * XXX clk, regulator & tolerance should be stored in the OPP table?
+ */
+struct dvfs_info {
+   struct device *dev;
+   struct clk *clk;
+   struct regulator *reg;
+   int tol;
+   struct notifier_block nb;
+};
+
+#define to_dvfs_info(_nb) container_of(_nb, struct dvfs_info, nb)
+
+static int dvfs_clk_notifier_handler(struct notifier_block *nb,
+   unsigned long flags, void *data)
+{
+   struct clk_notifier_data *cnd = data;
+   struct dvfs_info *di = to_dvfs_info(nb);
+   int ret, volt_new, volt_old;
+   struct opp *opp;
+
+   volt_old = regulator_get_voltage(di->reg);
+   rcu_read_lock();
+   opp = opp_find_freq_floor(di->dev, &cnd->new_rate);
+   volt_new = opp_get_voltage(opp);
+   rcu_read_unlock();
+
+   /* scaling up?  scale voltage before frequency */
+   if (flags & PRE_RATE_CHANGE && cnd->new_rate > cnd->old_rate) {
+   dev_dbg(di->dev, "%s: %d mV --> %d mV\n",
+   __func__, volt_old, volt_new);
+
+   ret = regulator_set_voltage_tol(di->reg, volt_new, di->tol);
+
+   if (ret) {
+   dev_warn(di->dev, "%s: unable to scale voltage up.\n",
+__func__);
+   return notifier_from_errno(ret);
+   }
+   }
+
+   /* scaling down?  scale voltage after frequency */
+   if (flags & POST_RATE_CHANGE && cnd->new_rate < cnd->old_rate) {
+   dev_dbg(di->dev, "%s: %d mV --> %d mV\n",
+   __func__, volt_old, volt_new);
+
+   ret = regulator_set_voltage_tol(di->reg, volt_new, di->tol);
+
+   if (ret) {
+   dev_warn(di->dev, "%s: unable to scale voltage down.\n",
+__func__);
+   return notifier_from_errno(ret);
+   }
+   }
+
+   return NOTIFY_OK;
+}
+
+struct dvfs_info *dvfs_clk_notifier_register(struct dvfs_info_init *dii)
+{
+   struct dvfs_info *di;
+   int ret = 0;
+
+   if (!dii)
+   return ERR_PTR(-EINVAL);
+
+   di = kzalloc(sizeof(struct dvfs_info), GFP_KERNEL);
+   if (!di)
+   return ERR_PTR(-ENOMEM);
+
+   di->dev = dii->dev;
+   di->clk = clk_get(di->dev, dii->con_id);
+   if (IS_ERR(di->clk)) {
+   ret = -ENOMEM;
+   goto err;
+   }
+
+   di->reg = regulator_get(di->dev, dii->reg_id);
+   if (IS_ERR(di->reg)) {
+   ret = -ENOMEM;
+   goto err;
+   }
+
+   di->tol = dii->tol;
+   di->nb.notifier_call = dvfs_clk_notif

[PATCH 3/5] cpufreq: omap: scale regulator from clk notifier

2013-02-27 Thread Mike Turquette
This patch moves direct control of the MPU voltage regulator out of the
cpufreq driver .target callback and instead uses the common dvfs clk
rate-change notifier infrastructure.

Ideally it would be nice to reduce the .target callback for omap's
cpufreq driver to a simple call to clk_set_rate.  For now there is still
some other stuff needed there (jiffies per loop, rounding the rate, etc
etc).

Signed-off-by: Mike Turquette 
---
 drivers/cpufreq/omap-cpufreq.c |   82 ++--
 1 file changed, 20 insertions(+), 62 deletions(-)

diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 1f3417a..6bec1c4 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -37,7 +37,7 @@ static struct cpufreq_frequency_table *freq_table;
 static atomic_t freq_table_users = ATOMIC_INIT(0);
 static struct clk *mpu_clk;
 static struct device *mpu_dev;
-static struct regulator *mpu_reg;
+static struct dvfs_info *di;
 
 static int omap_verify_speed(struct cpufreq_policy *policy)
 {
@@ -62,10 +62,9 @@ static int omap_target(struct cpufreq_policy *policy,
   unsigned int relation)
 {
unsigned int i;
-   int r, ret = 0;
+   int ret = 0;
struct cpufreq_freqs freqs;
-   struct opp *opp;
-   unsigned long freq, volt = 0, volt_old = 0, tol = 0;
+   unsigned long freq;
 
if (!freq_table) {
dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__,
@@ -109,50 +108,13 @@ static int omap_target(struct cpufreq_policy *policy,
}
freq = ret;
 
-   if (mpu_reg) {
-   opp = opp_find_freq_ceil(mpu_dev, &freq);
-   if (IS_ERR(opp)) {
-   dev_err(mpu_dev, "%s: unable to find MPU OPP for %d\n",
-   __func__, freqs.new);
-   return -EINVAL;
-   }
-   volt = opp_get_voltage(opp);
-   tol = volt * OPP_TOLERANCE / 100;
-   volt_old = regulator_get_voltage(mpu_reg);
-   }
-
-   dev_dbg(mpu_dev, "cpufreq-omap: %u MHz, %ld mV --> %u MHz, %ld mV\n", 
-   freqs.old / 1000, volt_old ? volt_old / 1000 : -1,
-   freqs.new / 1000, volt ? volt / 1000 : -1);
-
-   /* scaling up?  scale voltage before frequency */
-   if (mpu_reg && (freqs.new > freqs.old)) {
-   r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol);
-   if (r < 0) {
-   dev_warn(mpu_dev, "%s: unable to scale voltage up.\n",
-__func__);
-   freqs.new = freqs.old;
-   goto done;
-   }
-   }
+   dev_dbg(mpu_dev, "cpufreq-omap: %u MHz --> %u MHz\n",
+   freqs.old / 1000, freqs.new / 1000); 
 
ret = clk_set_rate(mpu_clk, freqs.new * 1000);
 
-   /* scaling down?  scale voltage after frequency */
-   if (mpu_reg && (freqs.new < freqs.old)) {
-   r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol);
-   if (r < 0) {
-   dev_warn(mpu_dev, "%s: unable to scale voltage down.\n",
-__func__);
-   ret = clk_set_rate(mpu_clk, freqs.old * 1000);
-   freqs.new = freqs.old;
-   goto done;
-   }
-   }
-
freqs.new = omap_getspeed(policy->cpu);
 
-done:
/* notifiers */
for_each_cpu(i, policy->cpus) {
freqs.cpu = i;
@@ -172,10 +134,6 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy 
*policy)
 {
int result = 0;
 
-   mpu_clk = clk_get(NULL, "cpufreq_ck");
-   if (IS_ERR(mpu_clk))
-   return PTR_ERR(mpu_clk);
-
if (policy->cpu >= NR_CPUS) {
result = -EINVAL;
goto fail_ck;
@@ -253,34 +211,34 @@ static struct cpufreq_driver omap_driver = {
 
 static int __init omap_cpufreq_init(void)
 {
+   struct dvfs_info_init dii;
+
+   mpu_clk = clk_get(NULL, "cpufreq_ck");
+   if (IS_ERR(mpu_clk))
+   return PTR_ERR(mpu_clk);
+
mpu_dev = get_cpu_device(0);
if (!mpu_dev) {
pr_warning("%s: unable to get the mpu device\n", __func__);
return -EINVAL;
}
 
-   mpu_reg = regulator_get(mpu_dev, "vcc");
-   if (IS_ERR(mpu_reg)) {
-   pr_warning("%s: unable to get MPU regulator\n", __func__);
-   mpu_reg = NULL;
-   } else {
-   /* 
-* Ensure physical regulator is present.
-* (e.g. could be dummy regulator.)
-*/
-   if (regulator_get_voltage(mpu_reg) < 0) {
-   pr_warn("%s: physical regulator not present for MPU\n",
+   dii.dev = mpu_dev;
+   dii.con_id = "cpufreq_ck";
+   dii.reg_id = "vcc";
+   dii.tol = OPP_TOLERANCE;

[PATCH 1/5] clk: allow reentrant calls into the clk framework

2013-02-27 Thread Mike Turquette
Reentrancy into the clock framework from the clk.h api is highly
desirable.  This feature is necessary for clocks that are prepared and
unprepared via i2c_transfer (which includes many PMICs and discrete
audio chips) and it is also necessary for performing dynamic voltage &
frequency scaling via clock rate-change notifiers.

This patch implements reentrancy by adding a global atomic_t which
tracks the context of the current caller.  Context in this case is the
return value from get_current().  The clk.h api implementations are
modified to first see if the relevant global lock is already held and if
so compare the global context (set by whoever is holding the lock)
against their own context (via a call to get_current()).  If the two
match then this function is a nested call from the one already holding
the lock and we procede.  If the context does not match then procede to
call mutex_lock and busy-wait for the existing task to complete.

Thus this patch set does not increase concurrency for unrelated calls
into the clock framework.  Instead it simply allows reentrancy by the
single task which is currently holding the global clock framework lock.

Thanks to Rajagoapl Venkat for the original idea to use get_current()
and to David Brown for the suggestion to replace my previous rwlock
scheme with atomic operations during code review at ELC 2013.

Signed-off-by: Mike Turquette 
Cc: Rajagopal Venkat 
Cc: David Brown 
---
 drivers/clk/clk.c |  254 ++---
 1 file changed, 185 insertions(+), 69 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index fabbfe1..b7d6a0a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -19,9 +19,11 @@
 #include 
 #include 
 #include 
+#include 
 
 static DEFINE_SPINLOCK(enable_lock);
 static DEFINE_MUTEX(prepare_lock);
+static atomic_t context;
 
 static HLIST_HEAD(clk_root_list);
 static HLIST_HEAD(clk_orphan_list);
@@ -433,27 +435,6 @@ unsigned int __clk_get_prepare_count(struct clk *clk)
return !clk ? 0 : clk->prepare_count;
 }
 
-unsigned long __clk_get_rate(struct clk *clk)
-{
-   unsigned long ret;
-
-   if (!clk) {
-   ret = 0;
-   goto out;
-   }
-
-   ret = clk->rate;
-
-   if (clk->flags & CLK_IS_ROOT)
-   goto out;
-
-   if (!clk->parent)
-   ret = 0;
-
-out:
-   return ret;
-}
-
 unsigned long __clk_get_flags(struct clk *clk)
 {
return !clk ? 0 : clk->flags;
@@ -524,6 +505,35 @@ struct clk *__clk_lookup(const char *name)
return NULL;
 }
 
+/***  locking & reentrancy ***/
+
+static void clk_fwk_lock(void)
+{
+   /* hold the framework-wide lock, context == NULL */
+   mutex_lock(&prepare_lock);
+
+   /* set context for any reentrant calls */
+   atomic_set(&context, (int) get_current());
+}
+
+static void clk_fwk_unlock(void)
+{
+   /* clear the context */
+   atomic_set(&context, 0);
+
+   /* release the framework-wide lock, context == NULL */
+   mutex_unlock(&prepare_lock);
+}
+
+static bool clk_is_reentrant(void)
+{
+   if (mutex_is_locked(&prepare_lock))
+   if ((void *) atomic_read(&context) == get_current())
+   return true;
+
+   return false;
+}
+
 /***clk api***/
 
 void __clk_unprepare(struct clk *clk)
@@ -558,9 +568,15 @@ void __clk_unprepare(struct clk *clk)
  */
 void clk_unprepare(struct clk *clk)
 {
-   mutex_lock(&prepare_lock);
+   /* re-enter if call is from the same context */
+   if (clk_is_reentrant()) {
+   __clk_unprepare(clk);
+   return;
+   }
+
+   clk_fwk_lock();
__clk_unprepare(clk);
-   mutex_unlock(&prepare_lock);
+   clk_fwk_unlock();
 }
 EXPORT_SYMBOL_GPL(clk_unprepare);
 
@@ -606,10 +622,16 @@ int clk_prepare(struct clk *clk)
 {
int ret;
 
-   mutex_lock(&prepare_lock);
-   ret = __clk_prepare(clk);
-   mutex_unlock(&prepare_lock);
+   /* re-enter if call is from the same context */
+   if (clk_is_reentrant()) {
+   ret = __clk_prepare(clk);
+   goto out;
+   }
 
+   clk_fwk_lock();
+   ret = __clk_prepare(clk);
+   clk_fwk_unlock();
+out:
return ret;
 }
 EXPORT_SYMBOL_GPL(clk_prepare);
@@ -650,8 +672,27 @@ void clk_disable(struct clk *clk)
 {
unsigned long flags;
 
+   /* must check both the global spinlock and the global mutex */
+   if (spin_is_locked(&enable_lock) || mutex_is_locked(&prepare_lock)) {
+   if ((void *) atomic_read(&context) == get_current()) {
+   __clk_disable(clk);
+   return;
+   }
+   }
+
+   /* hold the framework-wide lock, context == NULL */
spin_lock_irqsave(&enable_lock, flags);
+
+   /* set context for any reentrant calls */
+   atomic_set(&context, (int) get_current());
+
+   /* disable the clock(s) */
__clk_disab

RE: Unable to install svn on Ubuntu 12.04 (64-bit)

2013-02-27 Thread Rajkiran Mulugu
Hi James,
We tried the link you sent for Latest Release of linaro-media-create as below:

But we are facing below error (shown in RED COLOUR).

raj@Rajkiran:~/uefi$ sudo add-apt-repository 
ppa:https://launchpad.net/~linaro-maintainers/+archive/tools
Cannot access PPA (https://launchpad.net/api/1.0/~https/+archive/ppa) to get 
PPA information, please check your internet connection.

Thanks & Regards,
RAJ KIRAN

From: James Tunnicliffe [james.tunnicli...@linaro.org]
Sent: Thursday, February 28, 2013 0:08
To: Amar Shankar
Cc: Dave Pigott; Prasad Raju; Rajkiran Mulugu; linaro-dev@lists.linaro.org
Subject: Re: Unable to install svn on Ubuntu 12.04 (64-bit)

To get the latest release of linaro-media-create please add the
following PPA and update:
https://launchpad.net/~linaro-maintainers/+archive/tools

We released a new version of linaro-media-create yesterday that should
resolve this issue.

Thanks,

James

On 27 February 2013 06:40, Amar Shankar
 wrote:
>
> Hi Dave,
>
> We have installed latest Ubuntu 12.04 (Precise Pangolin) 64-bit from net and
> tried to execute the steps to build UEFI image as in link below:-
>
> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=BeagleBoardPkg#How_to_build_UEFI_for_the_BeagleBoard
>
> However on executing below command to create beagle_sd.img, we are getting
> the error as below (shown in red).
>
> raj@Rajkiran:~/uefi/beagle_image$ sudo linaro-media-create --image_file
> beagle_sd.img --dev beagle --binary linaro-m-headless-tar-20101101-0.tar.gz
> --hwpack
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gzraj@Rajkiran:~/uefi/beagle_image$
> sudo linaro-media-create --image_file beagle_sd.img --dev beagle --binary
> linaro-m-headless-tar-20101101-0.tar.gz --hwpack
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
> 
> Installing (linaro-hwpack-install)
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz in target rootfs.
> Unpacking hardware pack ...Done
> Updating apt package lists ...
> Ign file: ./ Release.gpg
> Ign filetmp/tmp.TAq3ZPdSgS/unpacked/pkgs/ ./ Translation-en
> Ign file: ./ Release
> Ign file: ./ Packages
> Ign http://ports.ubuntu.com maverick Release.gpg
> Ign http://ports.ubuntu.com/ maverick/main Translation-en
> Get:1 http://ppa.launchpad.net maverick Release.gpg [316B]
> Ign http://ports.ubuntu.com/ maverick/universe Translation-en
> Ign http://ports.ubuntu.com maverick-security Release.gpg
> Ign http://ports.ubuntu.com/ maverick-security/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-security/universe Translation-en
> Ign http://ports.ubuntu.com maverick-updates Release.gpg
> Ign http://ports.ubuntu.com/ maverick-updates/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-updates/universe Translation-en
> Ign http://ports.ubuntu.com maverick-proposed Release.gpg
> Ign http://ports.ubuntu.com/ maverick-proposed/main Translation-en
> Ign http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu/
> maverick/main Translation-en
> Get:2 http://ppa.launchpad.net maverick Release [9762B]
> Ign http://ports.ubuntu.com/ maverick-proposed/universe Translation-en
> Ign http://ports.ubuntu.com maverick Release
> Ign http://ports.ubuntu.com maverick-security Release
> Ign http://ports.ubuntu.com maverick-updates Release
> Ign http://ports.ubuntu.com maverick-proposed Release
> Ign http://ports.ubuntu.com maverick/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick/universe armel Packages/DiffIndex
> Get:3 http://ppa.launchpad.net maverick/main armel Packages [11.7kB]
> Ign http://ports.ubuntu.com maverick-security/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-security/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick/main armel Packages
> Ign http://ports.ubuntu.com maverick/universe armel Packages
> Ign http://ports.ubuntu.com maverick-security/main armel Packages
> Ign http://ports.ubuntu.com maverick-security/universe armel Packages
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages
> Ign http://ports.ubuntu.com maverick-updates/universe armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/universe armel Packages
> Err http://ports.ubuntu.com maverick/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick/universe armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-security/main armel Packages
> 404 Not Found
> Err http://ports.ubuntu.com maverick-security/universe armel Packages
> 404 Not Found
> Err htt

Re: Unable to install svn on Ubuntu 12.04 (64-bit)

2013-02-27 Thread Fathi Boudra
On 28 February 2013 07:54, Rajkiran Mulugu
 wrote:
> Hi James,
> We tried the link you sent for Latest Release of linaro-media-create as
> below:
>
> But we are facing below error (shown in RED COLOUR).
>
> raj@Rajkiran:~/uefi$ sudo add-apt-repository
> ppa:https://launchpad.net/~linaro-maintainers/+archive/tools

the command should be:
sudo add-apt-repository ppa:linaro-maintainers/tools

> Cannot access PPA (https://launchpad.net/api/1.0/~https/+archive/ppa) to get
> PPA information, please check your internet connection.
>
> Thanks & Regards,
> RAJ KIRAN
> 
> From: James Tunnicliffe [james.tunnicli...@linaro.org]
> Sent: Thursday, February 28, 2013 0:08
> To: Amar Shankar
> Cc: Dave Pigott; Prasad Raju; Rajkiran Mulugu; linaro-dev@lists.linaro.org
> Subject: Re: Unable to install svn on Ubuntu 12.04 (64-bit)
>
>
> To get the latest release of linaro-media-create please add the
> following PPA and update:
> https://launchpad.net/~linaro-maintainers/+archive/tools
>
> We released a new version of linaro-media-create yesterday that should
> resolve this issue.
>
> Thanks,
>
> James
>
> On 27 February 2013 06:40, Amar Shankar
>  wrote:
>>
>> Hi Dave,
>>
>> We have installed latest Ubuntu 12.04 (Precise Pangolin) 64-bit from net
>> and
>> tried to execute the steps to build UEFI image as in link below:-
>>
>>
>> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=BeagleBoardPkg#How_to_build_UEFI_for_the_BeagleBoard
>>
>> However on executing below command to create beagle_sd.img, we are getting
>> the error as below (shown in red).
>>
>> raj@Rajkiran:~/uefi/beagle_image$ sudo linaro-media-create --image_file
>> beagle_sd.img --dev beagle --binary
>> linaro-m-headless-tar-20101101-0.tar.gz
>> --hwpack
>>
>> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gzraj@Rajkiran:~/uefi/beagle_image$
>> sudo linaro-media-create --image_file beagle_sd.img --dev beagle --binary
>> linaro-m-headless-tar-20101101-0.tar.gz --hwpack
>> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
>> 
>> Installing (linaro-hwpack-install)
>> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz in target rootfs.
>> Unpacking hardware pack ...Done
>> Updating apt package lists ...
>> Ign file: ./ Release.gpg
>> Ign filetmp/tmp.TAq3ZPdSgS/unpacked/pkgs/ ./ Translation-en
>> Ign file: ./ Release
>> Ign file: ./ Packages
>> Ign http://ports.ubuntu.com maverick Release.gpg
>> Ign http://ports.ubuntu.com/ maverick/main Translation-en
>> Get:1 http://ppa.launchpad.net maverick Release.gpg [316B]
>> Ign http://ports.ubuntu.com/ maverick/universe Translation-en
>> Ign http://ports.ubuntu.com maverick-security Release.gpg
>> Ign http://ports.ubuntu.com/ maverick-security/main Translation-en
>> Ign http://ports.ubuntu.com/ maverick-security/universe Translation-en
>> Ign http://ports.ubuntu.com maverick-updates Release.gpg
>> Ign http://ports.ubuntu.com/ maverick-updates/main Translation-en
>> Ign http://ports.ubuntu.com/ maverick-updates/universe Translation-en
>> Ign http://ports.ubuntu.com maverick-proposed Release.gpg
>> Ign http://ports.ubuntu.com/ maverick-proposed/main Translation-en
>> Ign http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu/
>> maverick/main Translation-en
>> Get:2 http://ppa.launchpad.net maverick Release [9762B]
>> Ign http://ports.ubuntu.com/ maverick-proposed/universe Translation-en
>> Ign http://ports.ubuntu.com maverick Release
>> Ign http://ports.ubuntu.com maverick-security Release
>> Ign http://ports.ubuntu.com maverick-updates Release
>> Ign http://ports.ubuntu.com maverick-proposed Release
>> Ign http://ports.ubuntu.com maverick/main armel Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick/universe armel Packages/DiffIndex
>> Get:3 http://ppa.launchpad.net maverick/main armel Packages [11.7kB]
>> Ign http://ports.ubuntu.com maverick-security/main armel
>> Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick-security/universe armel
>> Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick-updates/main armel Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick-updates/universe armel
>> Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick-proposed/main armel
>> Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick-proposed/universe armel
>> Packages/DiffIndex
>> Ign http://ports.ubuntu.com maverick/main armel Packages
>> Ign http://ports.ubuntu.com maverick/universe armel Packages
>> Ign http://ports.ubuntu.com maverick-security/main armel Packages
>> Ign http://ports.ubuntu.com maverick-security/universe armel Packages
>> Ign http://ports.ubuntu.com maverick-updates/main armel Packages
>> Ign http://ports.ubuntu.com maverick-updates/universe armel Packages
>> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages
>> Ign http://ports.ubuntu.com maverick-proposed/universe armel Packages
>> Err http://ports.ubuntu.com maverick/main armel Packages
>> 

Re: Unable to install svn on Ubuntu 12.04 (64-bit)

2013-02-27 Thread Fathi Boudra
On 28 February 2013 08:27, Rajkiran Mulugu
 wrote:
> Hi Fathi Boudra,
>
> We tried with below commands but we are getting error as follows :
>
> 1.)Getting from the Ubuntu package:
>
> sudo add-apt-repository ppa:linaro-maintainers/tools
> sudo apt-get update
> sudo apt-get install linaro-image-tools
>
> 2.)Creating the u-boot + Linux Linaro image:
>
> mkdir $(WORKROOT)/beagle_image && cd $(WORKROOT)/beagle_image
> wget
> http://releases.linaro.org/platform/linaro-m/hwpacks/final/hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
> wget
> http://releases.linaro.org/platform/linaro-m/headless/release-candidate/linaro-m-headless-tar-20101101-0.tar.gz
> sudo linaro-media-create --image_file beagle_sd.img --dev beagle --binary
> linaro-m-headless-tar-20101101-0.tar.gz --hwpack
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz
> 
>
> Installing (linaro-hwpack-install)
> hwpack_linaro-omap3_20101109-1_armel_supported.tar.gz in target rootfs.
> Unpacking hardware pack ...Done
> Updating apt package lists ...
> Ign file: ./ Release.gpg
> Ign file:/tmp/tmp.6XUobqnK3P/unpacked/pkgs/ ./ Translation-en
>
> Ign file: ./ Release
> Ign file: ./ Packages
> Get:1 http://ppa.launchpad.net maverick Release.gpg [316B]
> Ign http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu/
> maverick/main Translation-en
>
> Ign http://ports.ubuntu.com maverick Release.gpg
> Ign http://ports.ubuntu.com/ maverick/main Translation-en
> Ign http://ports.ubuntu.com/ maverick/universe Translation-en
> Ign http://ports.ubuntu.com maverick-security Release.gpg
> Ign http://ports.ubuntu.com/ maverick-security/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-security/universe Translation-en
> Ign http://ports.ubuntu.com maverick-updates Release.gpg
> Ign http://ports.ubuntu.com/ maverick-updates/main Translation-en
> Ign http://ports.ubuntu.com/ maverick-updates/universe Translation-en
> Ign http://ports.ubuntu.com maverick-proposed Release.gpg
> Get:2 http://ppa.launchpad.net maverick Release [9762B]
> Ign http://ports.ubuntu.com/ maverick-proposed/main Translation-en
>
> Ign http://ports.ubuntu.com/ maverick-proposed/universe Translation-en
> Ign http://ports.ubuntu.com maverick Release
> Ign http://ports.ubuntu.com maverick-security Release
> Ign http://ports.ubuntu.com maverick-updates Release
> Ign http://ports.ubuntu.com maverick-proposed Release
> Ign http://ports.ubuntu.com maverick/main armel Packages/DiffIndex
> Get:3 http://ppa.launchpad.net maverick/main armel Packages [11.7kB]
> Ign http://ports.ubuntu.com maverick/universe armel Packages/DiffIndex
>
> Ign http://ports.ubuntu.com maverick-security/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-security/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-updates/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick-proposed/universe armel
> Packages/DiffIndex
> Ign http://ports.ubuntu.com maverick/main armel Packages
> Ign http://ports.ubuntu.com maverick/universe armel Packages
> Ign http://ports.ubuntu.com maverick-security/main armel Packages
> Ign http://ports.ubuntu.com maverick-security/universe armel Packages
> Ign http://ports.ubuntu.com maverick-updates/main armel Packages
> Ign http://ports.ubuntu.com maverick-updates/universe armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/main armel Packages
> Ign http://ports.ubuntu.com maverick-proposed/universe armel Packages
> Err http://ports.ubuntu.com maverick/main armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick/universe armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-security/main armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-security/universe armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-updates/main armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-updates/universe armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-proposed/main armel Packages
>   404  Not Found
> Err http://ports.ubuntu.com maverick-proposed/universe armel Packages
>   404  Not Found
> Fetched 21.8kB in 3s (6379B/s)
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick/main/binary-armel/Packages.gz  404
> Not Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick/universe/binary-armel/Packages.gz
> 404  Not Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick-security/main/binary-armel/Packages.gz
> 404  Not Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick-security/universe/binary-armel/Packages.gz
> 404  Not Found
>
> W: Failed to fetch
> http://ports.ubuntu.com/dists/maverick-updates/main/binary-armel/Packages.gz
> 404  Not Found
>
> W: F