All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Alexey Galakhov <agalakhov@domain.hid>
Cc: adeos-main@gna.org
Subject: Re: [Adeos-main] Ipipe hangs on ARM MINI2440 after switching	clocksource
Date: Thu, 28 Apr 2011 22:33:09 +0200	[thread overview]
Message-ID: <4DB9CF05.2030205@domain.hid> (raw)
In-Reply-To: <4DB94C9C.7080904@domain.hid>

Gilles Chanteperdrix wrote:
> Alexey Galakhov wrote:
>> On 04/27/2011 09:56 PM, Gilles Chanteperdrix wrote:
>>> But I think your problem has more to do with the following commit, could
>>> you try reverting it?
>>> http://git.xenomai.org/?p=ipipe-gch.git;a=commitdiff;h=6ab29d9c7a4b119f45ef4d93780e894fe1c0c6c6;hp=cd9c5e016092258d4450e137be2d0844d0fe8b38
>>>
>>> The same issue was reported on ixp4xx.
>> Just tried to revert this patch. Hangs. But now in a different way: it
>> starts to initialize peripherals and stops on LED initialization. Looks
>> like race conditions since it stops in slightly different place each
>> time I try to boot (randomly at led3, led4 or "backlight" LED). Last
>> lines of dmesg are, i.e.:
>>
>> [    3.090000] samsung-ts s3c2440-ts: driver attached, registering input
>> device
>> [    3.100000] input: S3C24XX TouchScreen as /devices/virtual/input/input0
>> [    3.120000] S3C24XX RTC, (c) 2004,2006 Simtec Electronics
>> [    3.120000] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
>> [    3.135000] s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
>> [    3.135000] i2c /dev entries driver
>> [    3.155000] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
>> [    3.160000] s3c2410-wdt s3c2410-wdt: watchdog inactive, reset
>> disabled, irq enabled
>> [    3.180000] s3c-sdi s3c2440-sdi: powered down.
>> [    3.180000] s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
>> [    3.185000] s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
>> [    3.200000] Registered led device: led1
>> [    3.205000] Registered led device: led2
>> [    3.210000] s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
>> [    3.215000] Registered led device: led3
>> [    3.220000] Registered led device: led4
>> (hangs)
>>
>> Going to try kgdb over serial line.
> 
> Ok. Better try without this patch first, then try reapplying the patch
> when you are certain that everything else works correctly. The patch
> enables some assembly code that was never actually tested. On my side, I
> will try and test it separately.
> 

With the following patch, the asm code looks fine to me:

diff --git a/arch/arm/kernel/ipipe_tsc_asm.S
b/arch/arm/kernel/ipipe_tsc_asm.S
index ca88882..d3c833f 100644
--- a/arch/arm/kernel/ipipe_tsc_asm.S
+++ b/arch/arm/kernel/ipipe_tsc_asm.S
@@ -143,7 +143,7 @@ __ipipe_decrementer_16:
 	ldr	ip, [r0]
 	ldr	r2, .LCdec16_last_cnt
 	subs 	ip, r2, ip
-	addcs	ip, ip, #0x10000
+	addcc	ip, ip, #0x10000
 	myldrd	r2, r3, r3, .LCdec16_last_tsc
 	cmp	r1, r2
 	bne	1b
@@ -155,7 +155,7 @@ __ipipe_decrementer_16:
 	ldr	ip, [r0]
 	ldr	r2, .LCdec16_last_cnt
 	subs 	ip, r2, ip
-	addcs	ip, ip, #0x10000
+	addcc	ip, ip, #0x10000
 	myldrd	r2, r3, r3, .LCdec16_last_tsc
 	cmp	r1, r3
 	bne	1b



-- 
                                                                Gilles.


      parent reply	other threads:[~2011-04-28 20:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 13:05 [Adeos-main] Ipipe hangs on ARM MINI2440 after switching clocksource Alexey Galakhov
2011-04-27 15:56 ` Gilles Chanteperdrix
2011-04-27 17:49   ` Alexey Galakhov
2011-04-27 17:55     ` Gilles Chanteperdrix
2011-04-27 18:10     ` Gilles Chanteperdrix
2011-04-28 11:12   ` Alexey Galakhov
2011-04-28 11:16     ` Gilles Chanteperdrix
2011-04-28 11:24       ` Alexey Galakhov
2011-04-28 11:27         ` Gilles Chanteperdrix
2011-04-28 13:37       ` Alexey Galakhov
2011-04-28 13:47         ` Gilles Chanteperdrix
2011-04-28 16:12       ` Alexey Galakhov
2011-04-28 17:05         ` Gilles Chanteperdrix
2011-04-28 18:43           ` Alexey Galakhov
2011-04-28 19:01             ` Gilles Chanteperdrix
2011-04-28 19:28               ` Alexey Galakhov
2011-04-28 19:32                 ` Gilles Chanteperdrix
2011-04-28 19:47                   ` Alexey Galakhov
2011-04-29  6:44                     ` Gilles Chanteperdrix
2011-04-29  6:49                       ` Gilles Chanteperdrix
2011-04-29 11:08                   ` Alexey Galakhov
2011-04-29 11:32                     ` Gilles Chanteperdrix
2011-04-29 12:08                       ` Alexey Galakhov
2011-04-29 12:14                         ` Gilles Chanteperdrix
2011-04-29 13:09                           ` Alexey Galakhov
2011-04-30  9:55                       ` Gilles Chanteperdrix
2011-04-30 17:33                         ` Alexey Galakhov
2011-04-30 17:39                           ` Alexey Galakhov
2011-04-30 18:41                             ` Alexey Galakhov
2011-04-30 20:14                           ` Gilles Chanteperdrix
2011-04-30 20:28                             ` Alexey Galakhov
2011-04-30 22:01                               ` Gilles Chanteperdrix
2011-04-30 22:36                               ` Gilles Chanteperdrix
2011-05-01 14:23                                 ` Alexey Galakhov
2011-05-01 14:34                                   ` Gilles Chanteperdrix
2011-04-28 18:46           ` Alexey Galakhov
2011-04-28 20:33       ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB9CF05.2030205@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=adeos-main@gna.org \
    --cc=agalakhov@domain.hid \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.