From: Sebastian Smolorz Subject: Re: [Xenomai-core] [PATCH] Don't call __ipipe_mach_set_dec =?iso-8859-15?q?in=09rthal=5Ftimer=5Frelease?= directly Date: Wed, 15 Nov 2006 09:49:08 +0100 References: <4559FA51.6050002@domain.hid> In-Reply-To: <4559FA51.6050002@domain.hid> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org Gilles Chanteperdrix wrote: > Sebastian Smolorz wrote: > > Hi, > > > > here's a proposal for a minor change in the I-pipe implementation for > > ARM. Since it is required for my S3C24xx patch not to call > > __ipipe_mach_set_dec directly when the timer is released by the Xenomai > > domain I suggest the following changes. The patch comprises the necessary > > modifications for PXA, SA1100 and Integrator, too. > > > > Comments or objections? > > Why can not you call __ipipe_mach_set_dec directly when the timer is > released ? The timer used for generating interrupts operates in auto-reloading mode when it is under Linux control. But when Xenomai reloads the timer the mode of operation is one-shot (auto-reload feature in hardware is off). So I have to make a distinction between setting the dec value by Xenomai for programming the next period and setting the dec value to __ipipe_mach_ticks_per_jiffy when the timer control is given back to Linux. The reason for this is the fact that programming a timer on the S3C24xx can take some ticks which means that these ticks aren't count whereas time is going on in the real world. So it is more reasonable to let the timer reload itself when Xenomai hasn't started it. Setting __ipipe_mach_ticks_per_jiffy in the Linux interrupt handler would make every period last some ticks longer. -- Sebastian