[Gta04-owner] Linux 3.2-rc3 on GTA04

Dr. H. Nikolaus Schaller hns at goldelico.com
Wed Nov 30 08:47:01 CET 2011


Am 30.11.2011 um 08:08 schrieb NeilBrown:

> On Wed, 30 Nov 2011 07:34:09 +0100 "Dr. H. Nikolaus Schaller"
> <hns at goldelico.com> wrote:
> 
>> 
>> Am 30.11.2011 um 01:48 schrieb NeilBrown:
>> 
>>> On Wed, 30 Nov 2011 00:17:04 +0000 Neil Jerram <neil at ossau.homelinux.net>
>>> wrote:
>>> 
>>>> On 28.11.2011 23:58, Neil Jerram wrote:
>>>> 
>>>> A few other things to report...
>>>> 
>>>> 1. I don't think the phone is shutting down fully when I say "shutdown 
>>>> -h now" and then remove the USB cable, whereas the hw-validation kernel 
>>>> did.  Is it a known problem?  If not, is there something I can do to pin 
>>>> it down more precisely?
>>> 
>>> Yes, I noticed that too.
>>> 
>>> The only strategy I know of to get more info is to read the code, try to
>>> follow what is meant to happen, and put in "printk" statements to find out
>>> what actually happens.
>>> 
>>> (... uses "git grep" a bit a looks around ....)
>>> 
>>> The key information is the "pm_power_off" variable.
>>> Something needs to set this to make power_off happen.
>>> In the hw-validation kernel, drivers/mfd/twl4030-power.c
>>> sets it.  In the mainline kernel nothing does.
>> 
>> I think we also have added:
>> 
>> https://github.com/goldelico/gta04-kernel/commit/d8c5533f5695ec948dea89fba332144644584680#arch/arm/kernel/process.c
> 
> Ahh... I think that is "wrong".  i.e. it'll never go upstream.

Well, it made "halt" do what (apparently we all) are thinking it
should do :)

Especially if that is a command that easily makes the machine
hang in a state where you can only remove the battery or
wait until it is drained...

Maybe we should suggest the patch (as the default halt action)
and learn the arguments against it?

> 
> "shutdown -h now" is not suppose to power off.  The "correct" command is
> "shutdown -h -P now"  so we should probably get use to that.

Ok, that appears to be "right".

> 
> I tend to use
>   halt -f -p

> or
>   echo o > /proc/sysrq-trigger
> 
> I don't see the point in running lots of shutdown scripts - when I want to
> power off, I want it of *now* :-)

Sometimes these scripts do a cleanup you have forgotten or don't
even know about it... Most importantly they do a sync.

> 
> An alternative is
>  poweroff
> 
> which is probably easy to remember and will do the "right" thing.

but more to type if you are in a hurry :)

I think we should also rename the "halt" command of our U-Boot extensions
to "poweroff". I make a note for the next U-Boot release.

> 
> Lots more reading to do :-)

This is the good thing with the TI OMAP that we have several
thousands of pages of user / programming manuals for
these chips...

Nikolaus



More information about the Gta04-owner mailing list