All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
@ 2013-02-14 12:27 Paul
  2013-02-14 19:48 ` Gilles Chanteperdrix
       [not found] ` <718DFA7882181D45B8BD18F31C46D55427A69659@MBX204.domain.local>
  0 siblings, 2 replies; 12+ messages in thread
From: Paul @ 2013-02-14 12:27 UTC (permalink / raw)
  To: xenomai


Attached, a patch set aimed at providing support for the Broadcom 
BCM2835 SoC as used in the Raspberry Pi[1].

The first patch assumes that the core-ipipe-3.5.7-arm patch has already 
been applied or the sources have been pulled from the ipipe git 
repository[2]. Most of the changes have been pulled from the 3.6.11 
kernel sources maintained by the Rasbperry team and adds a number of 
drivers needed by the BCM2835 chip. Low level changes to the timer 
support have been made courtesy of ian-cim and his preliminary 3.2.21 
patch[3]

Patch number 2 silences a trivial compile time warning and can be 
skipped..
Patch number three adds a minimal default config (bcmrpi_defconfig) that 
can be used as a basis for compiling a Xenomai enabled kernel. This 
patch can also be skipped if a defconfig is not required.

Patch number four makes some changes to the way GPIO interrupts are 
handled - Interrupt latencies are considerably improved (typically in 
the 15-30uS range).

Work is being undertaken by the Raspberry team to get support built in 
to the mainline kernel - I believe the window has been missed for 
3.8.x, so fingers are crossed for 3.10.x.


Regards, Paul.


[1] www.raspberrypi.org
[2] git://git.denx.de/ipipe.git
[3] www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=12368


-------------- next part --------------
A non-text attachment was scrubbed...
Name: raspberry-pi.bz2
Type: application/x-bzip2
Size: 458222 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130214/bb9244d7/attachment.bin>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-02-14 12:27 [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel Paul
@ 2013-02-14 19:48 ` Gilles Chanteperdrix
  2013-02-15 11:50   ` Paul
       [not found] ` <718DFA7882181D45B8BD18F31C46D55427A69659@MBX204.domain.local>
  1 sibling, 1 reply; 12+ messages in thread
From: Gilles Chanteperdrix @ 2013-02-14 19:48 UTC (permalink / raw)
  To: Paul; +Cc: xenomai

On 02/14/2013 01:27 PM, Paul wrote:

> 
> Attached, a patch set aimed at providing support for the Broadcom 
> BCM2835 SoC as used in the Raspberry Pi[1].
> 
> The first patch assumes that the core-ipipe-3.5.7-arm patch has already 
> been applied or the sources have been pulled from the ipipe git 
> repository[2]. Most of the changes have been pulled from the 3.6.11 
> kernel sources maintained by the Rasbperry team and adds a number of 
> drivers needed by the BCM2835 chip. Low level changes to the timer 
> support have been made courtesy of ian-cim and his preliminary 3.2.21 
> patch[3]
> 
> Patch number 2 silences a trivial compile time warning and can be 
> skipped..
> Patch number three adds a minimal default config (bcmrpi_defconfig) that 
> can be used as a basis for compiling a Xenomai enabled kernel. This 
> patch can also be skipped if a defconfig is not required.
> 
> Patch number four makes some changes to the way GPIO interrupts are 
> handled - Interrupt latencies are considerably improved (typically in 
> the 15-30uS range).
> 
> Work is being undertaken by the Raspberry team to get support built in 
> to the mainline kernel - I believe the window has been missed for 
> 3.8.x, so fingers are crossed for 3.10.x.


In the meantime, we can put it in a raspberry subdirectory in Xenomai
sources. Would you mind making a single patch? Or do you prefer the
patches to be kept separated?

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] [beagleboard] FW:  Xenomai, Raspberry Pi, 3.5.7 kernel
       [not found] ` <718DFA7882181D45B8BD18F31C46D55427A69659@MBX204.domain.local>
@ 2013-02-14 20:15   ` Jason Kridner
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Kridner @ 2013-02-14 20:15 UTC (permalink / raw)
  To: beagleboard; +Cc: xenomai

On Thu, Feb 14, 2013 at 8:59 AM, Gregory Perry
<Gregory.Perry@govirtual.tv> wrote:
> Any chance of getting similar Xenomai support built into the mainline 3.8 kernel for the BeagleBoard?  A patch set for Xenomai support for the BeagleBone was recently submitted to the Xenomai project, mainline kernel support would in turn facilitate direct support from the Xenomai team for the BeagleBone (probably wouldn't hurt to send the Xenomai team a care package of a couple BeagleBoards/Bones etc to increase their enthusiasm about maintaining support for both with their development efforts).

If there are individuals who would actively work on this, sending a
couple of boards would be something I can do. I just don't want to go
sending out boards that'll sit idle. Contact me with names/emails of
people who will actively work this.

>
> ________________________________________
> From: xenomai-bounces@xenomai.org [xenomai-bounces@xenomai.org] on behalf of Paul [paul_c@tuxcnc.org]
> Sent: Thursday, February 14, 2013 7:27 AM
> To: xenomai@xenomai.org
> Subject: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
>
> Attached, a patch set aimed at providing support for the Broadcom
> BCM2835 SoC as used in the Raspberry Pi[1].
>
> The first patch assumes that the core-ipipe-3.5.7-arm patch has already
> been applied or the sources have been pulled from the ipipe git
> repository[2]. Most of the changes have been pulled from the 3.6.11
> kernel sources maintained by the Rasbperry team and adds a number of
> drivers needed by the BCM2835 chip. Low level changes to the timer
> support have been made courtesy of ian-cim and his preliminary 3.2.21
> patch[3]
>
> Patch number 2 silences a trivial compile time warning and can be
> skipped..
> Patch number three adds a minimal default config (bcmrpi_defconfig) that
> can be used as a basis for compiling a Xenomai enabled kernel. This
> patch can also be skipped if a defconfig is not required.
>
> Patch number four makes some changes to the way GPIO interrupts are
> handled - Interrupt latencies are considerably improved (typically in
> the 15-30uS range).
>
> Work is being undertaken by the Raspberry team to get support built in
> to the mainline kernel - I believe the window has been missed for
> 3.8.x, so fingers are crossed for 3.10.x.
>
>
> Regards, Paul.
>
>
> [1] www.raspberrypi.org
> [2] git://git.denx.de/ipipe.git
> [3] www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=12368
>
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: raspberry-pi.bz2
> Type: application/x-bzip2
> Size: 458222 bytes
> Desc: not available
> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130214/bb9244d7/attachment.bin>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-02-14 19:48 ` Gilles Chanteperdrix
@ 2013-02-15 11:50   ` Paul
  2013-02-16  0:20     ` Paul
  0 siblings, 1 reply; 12+ messages in thread
From: Paul @ 2013-02-15 11:50 UTC (permalink / raw)
  To: xenomai

On Thursday 14 February 2013, Gilles Chanteperdrix wrote:
> On 02/14/2013 01:27 PM, Paul wrote:
> > Attached, a patch set aimed at providing support for the Broadcom
> > BCM2835 SoC as used in the Raspberry Pi[1].

> In the meantime, we can put it in a raspberry subdirectory in Xenomai
> sources. Would you mind making a single patch? Or do you prefer the
> patches to be kept separated?

A single patch would be preferable for most people - The multi-patch set 
was mainly for the benefit of the guys who had a working kernel but 
were sturggling with the GPIO problem (patch No.4 should apply on a 
3.2.2x kernel).

I'll rename the defconfig and add some recent changes made to 
the "official" Raspberry kernel. Expect a single patch in a day or two.


Regards, Paul.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-02-15 11:50   ` Paul
@ 2013-02-16  0:20     ` Paul
  2013-02-18 21:34       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 12+ messages in thread
From: Paul @ 2013-02-16  0:20 UTC (permalink / raw)
  To: xenomai

On Friday 15 February 2013, Paul wrote:
> On Thursday 14 February 2013, Gilles Chanteperdrix wrote:
> > On 02/14/2013 01:27 PM, Paul wrote:
> > > Attached, a patch set aimed at providing support for the Broadcom
> > > BCM2835 SoC as used in the Raspberry Pi[1].
> >
> > In the meantime, we can put it in a raspberry subdirectory in
> > Xenomai sources. Would you mind making a single patch? Or do you
> > prefer the patches to be kept separated?
>
> A single patch would be preferable for most people - The multi-patch
> set was mainly for the benefit of the guys who had a working kernel
> but were sturggling with the GPIO problem (patch No.4 should apply on
> a 3.2.2x kernel).
>
> I'll rename the defconfig and add some recent changes made to
> the "official" Raspberry kernel. Expect a single patch in a day or
> two.

Attached, a single patch against ipipe-core-3.5.7. This assumes the 
appropriate arm patch has already been applied to a virgin stable 3.5.7 
tree as per standard instructions.

The raspberry-post.patch provides support for the BCM2835 SoC backported 
from the rpi-3.6.y branch[1] up to, and including commit 871eef1b84. A 
minimal config is provided (bcmrpi_xenomai_defconfig) in place of the 
usual bcmrpi_*_defconfigs.

Credit for the original 3.2.21 Xenomai support should go to ian-cim as 
noted in earlier emails - My efforts are limited to backporting and 
hacks to the gpio interrupts.


Regards, Paul.


[1] git://github.com/raspberrypi/linux.git


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipipe-core-3.5.7-raspberry-post.patch
Type: text/x-diff
Size: 2724091 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130216/4f487e30/attachment.patch>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-02-16  0:20     ` Paul
@ 2013-02-18 21:34       ` Gilles Chanteperdrix
  2013-07-01 23:21         ` John Pham
  0 siblings, 1 reply; 12+ messages in thread
From: Gilles Chanteperdrix @ 2013-02-18 21:34 UTC (permalink / raw)
  To: Paul; +Cc: xenomai

On 02/16/2013 01:20 AM, Paul wrote:

> On Friday 15 February 2013, Paul wrote:
>> On Thursday 14 February 2013, Gilles Chanteperdrix wrote:
>>> On 02/14/2013 01:27 PM, Paul wrote:
>>>> Attached, a patch set aimed at providing support for the Broadcom
>>>> BCM2835 SoC as used in the Raspberry Pi[1].
>>>
>>> In the meantime, we can put it in a raspberry subdirectory in
>>> Xenomai sources. Would you mind making a single patch? Or do you
>>> prefer the patches to be kept separated?
>>
>> A single patch would be preferable for most people - The multi-patch
>> set was mainly for the benefit of the guys who had a working kernel
>> but were sturggling with the GPIO problem (patch No.4 should apply on
>> a 3.2.2x kernel).
>>
>> I'll rename the defconfig and add some recent changes made to
>> the "official" Raspberry kernel. Expect a single patch in a day or
>> two.
> 
> Attached, a single patch against ipipe-core-3.5.7. This assumes the 
> appropriate arm patch has already been applied to a virgin stable 3.5.7 
> tree as per standard instructions.
> 
> The raspberry-post.patch provides support for the BCM2835 SoC backported 
> from the rpi-3.6.y branch[1] up to, and including commit 871eef1b84. A 
> minimal config is provided (bcmrpi_xenomai_defconfig) in place of the 
> usual bcmrpi_*_defconfigs.
> 
> Credit for the original 3.2.21 Xenomai support should go to ian-cim as 
> noted in earlier emails - My efforts are limited to backporting and 
> hacks to the gpio interrupts.

>
>
> Regards, Paul.

Included in the repository, thanks.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-02-18 21:34       ` Gilles Chanteperdrix
@ 2013-07-01 23:21         ` John Pham
  2013-07-04 11:14           ` Paul
       [not found]           ` <32348a0f3aab4463894a5a65efe02ab8@BLUPRD0113HT002.prod.exchangelabs.com>
  0 siblings, 2 replies; 12+ messages in thread
From: John Pham @ 2013-07-01 23:21 UTC (permalink / raw)
  To: xenomai

Gilles Chanteperdrix <gilles.chanteperdrix <at> xenomai.org> writes:

> 
> On 02/16/2013 01:20 AM, Paul wrote:
> 
> > On Friday 15 February 2013, Paul wrote:
> >> On Thursday 14 February 2013, Gilles Chanteperdrix wrote:
> >>> On 02/14/2013 01:27 PM, Paul wrote:
> >>>> Attached, a patch set aimed at providing support for the Broadcom
> >>>> BCM2835 SoC as used in the Raspberry Pi[1].
> >>>
> >>> In the meantime, we can put it in a raspberry subdirectory in
> >>> Xenomai sources. Would you mind making a single patch? Or do you
> >>> prefer the patches to be kept separated?
> >>
> >> A single patch would be preferable for most people - The multi-patch
> >> set was mainly for the benefit of the guys who had a working kernel
> >> but were sturggling with the GPIO problem (patch No.4 should apply on
> >> a 3.2.2x kernel).
> >>
> >> I'll rename the defconfig and add some recent changes made to
> >> the "official" Raspberry kernel. Expect a single patch in a day or
> >> two.
> > 
> > Attached, a single patch against ipipe-core-3.5.7. This assumes the 
> > appropriate arm patch has already been applied to a virgin stable 3.5.7 
> > tree as per standard instructions.
> > 
> > The raspberry-post.patch provides support for the BCM2835 SoC backported 
> > from the rpi-3.6.y branch[1] up to, and including commit 871eef1b84. A 
> > minimal config is provided (bcmrpi_xenomai_defconfig) in place of the 
> > usual bcmrpi_*_defconfigs.
> > 
> > Credit for the original 3.2.21 Xenomai support should go to ian-cim as 
> > noted in earlier emails - My efforts are limited to backporting and 
> > hacks to the gpio interrupts.
> 
> >
> >
> > Regards, Paul.
> 
> Included in the repository, thanks.
> 
Hi,

I've run into problems compiling the kernel with the above patch from git
when sound drivers are enabled. It looks like some DMA code from commit
https://github.com/torvalds/linux/commit/64ccc9c033c6089b2d426dad3c56477ab066c999
was missing. I've added them in the patch inlined below (to be applied after
Paul's patch). 

Thanks for the work with getting Xenomai on the Pi! :)





diff --git a/include/asm-generic/dma-coherent.h
b/include/asm-generic/dma-coherent.h
index abfb268..2be8a2d 100644
--- a/include/asm-generic/dma-coherent.h
+++ b/include/asm-generic/dma-coherent.h
@@ -29,6 +29,7 @@ int dma_mmap_from_coherent(struct device *dev, struct
vm_area_struct *vma,
 #else
 #define dma_alloc_from_coherent(dev, size, handle, ret) (0)
 #define dma_release_from_coherent(dev, order, vaddr) (0)
+#define dma_mmap_from_coherent(dev, vma, vaddr, order, ret) (0)
 #endif
 
 #endif
diff --git a/include/asm-generic/dma-mapping-common.h
b/include/asm-generic/dma-mapping-common.h
index 2e248d8..9073aeb 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -176,7 +176,44 @@ static inline void
dma_sync_single_range_for_device(struct device *dev,
 #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
 #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
 
+extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
+              void *cpu_addr, dma_addr_t dma_addr, size_t size);
+
+/**
+ * dma_mmap_attrs - map a coherent DMA allocation into user space
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @vma: vm_area_struct describing requested user mapping
+ * @cpu_addr: kernel CPU-view address returned from dma_alloc_attrs
+ * @handle: device-view address returned from dma_alloc_attrs
+ * @size: size of memory originally requested in dma_alloc_attrs
+ * @attrs: attributes of mapping properties requested in dma_alloc_attrs
+ *
+ * Map a coherent DMA buffer previously allocated by dma_alloc_attrs
+ * into user space.  The coherent DMA buffer must not be freed by the
+ * driver until the user space mapping has been released.
+ */
+static inline int
+dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma, void *cpu_addr,
+          dma_addr_t dma_addr, size_t size, struct dma_attrs *attrs)
+{
+   struct dma_map_ops *ops = get_dma_ops(dev);
+   BUG_ON(!ops);
+   if (ops->mmap)
+       return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
+   return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+
+#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, NULL)
+
+static inline int dma_mmap_writecombine(struct device *dev, struct
vm_area_struct *vma,
+             void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+   DEFINE_DMA_ATTRS(attrs);
+   dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs);
+   return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs);
+}
+
 int
 dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
 		       void *cpu_addr, dma_addr_t dma_addr, size_t size);
 






^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-07-01 23:21         ` John Pham
@ 2013-07-04 11:14           ` Paul
       [not found]           ` <32348a0f3aab4463894a5a65efe02ab8@BLUPRD0113HT002.prod.exchangelabs.com>
  1 sibling, 0 replies; 12+ messages in thread
From: Paul @ 2013-07-04 11:14 UTC (permalink / raw)
  To: xenomai

On Tuesday 02 July 2013, John Pham wrote:
> I've run into problems compiling the kernel with the above patch from
> git when sound drivers are enabled. It looks like some DMA code from
> commit
> https://github.com/torvalds/linux/commit/64ccc9c033c6089b2d426dad3c56
>477ab066c999 was missing. I've added them in the patch inlined below
> (to be applied after Paul's patch).
>
> Thanks for the work with getting Xenomai on the Pi! :)

Sound has never been a high priority for me, so I don't generally enable 
the drivers - Hence the reason I missed this... That said, got a "real 
time" voice recognition project surfacing at work.

Could you try the two attached patches - These are intended for 
the "official" Rasperry Pi kernel from 
https://github.com/raspberrypi/linux (rpi-3.8.y branch). Apply the 
*-pre.patch, followed by the ipipe-core.patch, and finish with the 
*-post.patch - Any failed hunks or other issues, let me know and I'll 
take a look when time allows.


Regards, Paul.





-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipipe-core-3.8.13-RPi-pre.patch
Type: text/x-diff
Size: 5292 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130704/85668b14/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipipe-core-3.8.13-RPi-post.patch
Type: text/x-diff
Size: 12108 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130704/85668b14/attachment-0001.patch>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
       [not found]           ` <32348a0f3aab4463894a5a65efe02ab8@BLUPRD0113HT002.prod.exchangelabs.com>
@ 2013-07-08 22:59             ` John Pham
  0 siblings, 0 replies; 12+ messages in thread
From: John Pham @ 2013-07-08 22:59 UTC (permalink / raw)
  To: Paul; +Cc: xenomai

Hi,

They seem to apply and the compiled kernel boots and apparently runs
correctly, although I haven't run any xenomai applications on it. I'll
post if any problems come up. Thanks!


On Thu, Jul 4, 2013 at 7:14 AM, Paul <paul_c@tuxcnc.org> wrote:
> On Tuesday 02 July 2013, John Pham wrote:
>> I've run into problems compiling the kernel with the above patch from
>> git when sound drivers are enabled. It looks like some DMA code from
>> commit
>> https://github.com/torvalds/linux/commit/64ccc9c033c6089b2d426dad3c56
>>477ab066c999 was missing. I've added them in the patch inlined below
>> (to be applied after Paul's patch).
>>
>> Thanks for the work with getting Xenomai on the Pi! :)
>
> Sound has never been a high priority for me, so I don't generally enable
> the drivers - Hence the reason I missed this... That said, got a "real
> time" voice recognition project surfacing at work.
>
> Could you try the two attached patches - These are intended for
> the "official" Rasperry Pi kernel from
> https://github.com/raspberrypi/linux (rpi-3.8.y branch). Apply the
> *-pre.patch, followed by the ipipe-core.patch, and finish with the
> *-post.patch - Any failed hunks or other issues, let me know and I'll
> take a look when time allows.
>
>
> Regards, Paul.
>
>
>
>
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
       [not found] <CAOfKkXHkoPvJmp1mFNWCMpiyH1vGP1fjOLs=6awoSc8gF3C_9Q@mail.gmail.com>
@ 2013-07-02 20:03 ` John Pham
  0 siblings, 0 replies; 12+ messages in thread
From: John Pham @ 2013-07-02 20:03 UTC (permalink / raw)
  To: xenomai

Patch was missing stuff, corrected patch below:

diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index 6f3676f..db5db02 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -10,6 +10,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/export.h>
 #include <linux/gfp.h>
+#include <asm-generic/dma-coherent.h>

 /*
  * Managed DMA API
@@ -218,3 +219,33 @@ void dmam_release_declared_memory(struct device *dev)
 EXPORT_SYMBOL(dmam_release_declared_memory);

 #endif
+
+/*
+ * Create userspace mapping for the DMA-coherent memory.
+ */
+int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
+           void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+   int ret = -ENXIO;
+#ifdef CONFIG_MMU
+   unsigned long user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+   unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
+   unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr));
+   unsigned long off = vma->vm_pgoff;
+
+   vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+
+   if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret))
+       return ret;
+
+   if (off < count && user_count <= (count - off)) {
+       ret = remap_pfn_range(vma, vma->vm_start,
+                     pfn + off,
+                     user_count << PAGE_SHIFT,
+                     vma->vm_page_prot);
+   }
+#endif /* CONFIG_MMU */
+
+   return ret;
+}
+EXPORT_SYMBOL(dma_common_mmap);
diff --git a/include/asm-generic/dma-coherent.h
b/include/asm-generic/dma-coherent.h
index abfb268..2be8a2d 100644
--- a/include/asm-generic/dma-coherent.h
+++ b/include/asm-generic/dma-coherent.h
@@ -29,6 +29,7 @@ int dma_mmap_from_coherent(struct device *dev,
struct vm_area_struct *vma,
 #else
 #define dma_alloc_from_coherent(dev, size, handle, ret) (0)
 #define dma_release_from_coherent(dev, order, vaddr) (0)
+#define dma_mmap_from_coherent(dev, vma, vaddr, order, ret) (0)
 #endif

 #endif
diff --git a/include/asm-generic/dma-mapping-common.h
b/include/asm-generic/dma-mapping-common.h
index 2e248d8..9073aeb 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -176,7 +176,44 @@ static inline void
dma_sync_single_range_for_device(struct device *dev,
 #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
 #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)

+extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
+              void *cpu_addr, dma_addr_t dma_addr, size_t size);
+
+/**
+ * dma_mmap_attrs - map a coherent DMA allocation into user space
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @vma: vm_area_struct describing requested user mapping
+ * @cpu_addr: kernel CPU-view address returned from dma_alloc_attrs
+ * @handle: device-view address returned from dma_alloc_attrs
+ * @size: size of memory originally requested in dma_alloc_attrs
+ * @attrs: attributes of mapping properties requested in dma_alloc_attrs
+ *
+ * Map a coherent DMA buffer previously allocated by dma_alloc_attrs
+ * into user space.  The coherent DMA buffer must not be freed by the
+ * driver until the user space mapping has been released.
+ */
+static inline int
+dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma, void *cpu_addr,
+          dma_addr_t dma_addr, size_t size, struct dma_attrs *attrs)
+{
+   struct dma_map_ops *ops = get_dma_ops(dev);
+   BUG_ON(!ops);
+   if (ops->mmap)
+       return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
+   return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+
+#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, NULL)
+
+static inline int dma_mmap_writecombine(struct device *dev, struct
vm_area_struct *vma,
+             void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+   DEFINE_DMA_ATTRS(attrs);
+   dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs);
+   return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs);
+}
+
 int
 dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
                       void *cpu_addr, dma_addr_t dma_addr, size_t size);




> Gilles Chanteperdrix <gilles.chanteperdrix <at> xenomai.org> writes:
>
> >
> > On 02/16/2013 01:20 AM, Paul wrote:
> >
> > > On Friday 15 February 2013, Paul wrote:
> > >> On Thursday 14 February 2013, Gilles Chanteperdrix wrote:
> > >>> On 02/14/2013 01:27 PM, Paul wrote:
> > >>>> Attached, a patch set aimed at providing support for the Broadcom
> > >>>> BCM2835 SoC as used in the Raspberry Pi[1].
> > >>>
> > >>> In the meantime, we can put it in a raspberry subdirectory in
> > >>> Xenomai sources. Would you mind making a single patch? Or do you
> > >>> prefer the patches to be kept separated?
> > >>
> > >> A single patch would be preferable for most people - The multi-patch
> > >> set was mainly for the benefit of the guys who had a working kernel
> > >> but were sturggling with the GPIO problem (patch No.4 should apply on
> > >> a 3.2.2x kernel).
> > >>
> > >> I'll rename the defconfig and add some recent changes made to
> > >> the "official" Raspberry kernel. Expect a single patch in a day or
> > >> two.
> > >
> > > Attached, a single patch against ipipe-core-3.5.7. This assumes the
> > > appropriate arm patch has already been applied to a virgin stable 3.5.7
> > > tree as per standard instructions.
> > >
> > > The raspberry-post.patch provides support for the BCM2835 SoC backported
> > > from the rpi-3.6.y branch[1] up to, and including commit 871eef1b84. A
> > > minimal config is provided (bcmrpi_xenomai_defconfig) in place of the
> > > usual bcmrpi_*_defconfigs.
> > >
> > > Credit for the original 3.2.21 Xenomai support should go to ian-cim as
> > > noted in earlier emails - My efforts are limited to backporting and
> > > hacks to the gpio interrupts.
> >
> > >
> > >
> > > Regards, Paul.
> >
> > Included in the repository, thanks.
> >
> Hi,
>
> I've run into problems compiling the kernel with the above patch from git
> when sound drivers are enabled. It looks like some DMA code from commit
> https://github.com/torvalds/linux/commit/64ccc9c033c6089b2d426dad3c56477ab066c999
> was missing. I've added them in the patch inlined below (to be applied after
> Paul's patch).
>
> Thanks for the work with getting Xenomai on the Pi! :)
>
>
>
>
>
> diff --git a/include/asm-generic/dma-coherent.h
> b/include/asm-generic/dma-coherent.h
> index abfb268..2be8a2d 100644
> --- a/include/asm-generic/dma-coherent.h
> +++ b/include/asm-generic/dma-coherent.h
> @@ -29,6 +29,7 @@ int dma_mmap_from_coherent(struct device *dev, struct
> vm_area_struct *vma,
>  #else
>  #define dma_alloc_from_coherent(dev, size, handle, ret) (0)
>  #define dma_release_from_coherent(dev, order, vaddr) (0)
> +#define dma_mmap_from_coherent(dev, vma, vaddr, order, ret) (0)
>  #endif
>
>  #endif
> diff --git a/include/asm-generic/dma-mapping-common.h
> b/include/asm-generic/dma-mapping-common.h
> index 2e248d8..9073aeb 100644
> --- a/include/asm-generic/dma-mapping-common.h
> +++ b/include/asm-generic/dma-mapping-common.h
> @@ -176,7 +176,44 @@ static inline void
> dma_sync_single_range_for_device(struct device *dev,
>  #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
>  #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
>
> +extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
> +              void *cpu_addr, dma_addr_t dma_addr, size_t size);
> +
> +/**
> + * dma_mmap_attrs - map a coherent DMA allocation into user space
> + * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
> + * @vma: vm_area_struct describing requested user mapping
> + * @cpu_addr: kernel CPU-view address returned from dma_alloc_attrs
> + * @handle: device-view address returned from dma_alloc_attrs
> + * @size: size of memory originally requested in dma_alloc_attrs
> + * @attrs: attributes of mapping properties requested in dma_alloc_attrs
> + *
> + * Map a coherent DMA buffer previously allocated by dma_alloc_attrs
> + * into user space.  The coherent DMA buffer must not be freed by the
> + * driver until the user space mapping has been released.
> + */
> +static inline int
> +dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma, void *cpu_addr,
> +          dma_addr_t dma_addr, size_t size, struct dma_attrs *attrs)
> +{
> +   struct dma_map_ops *ops = get_dma_ops(dev);
> +   BUG_ON(!ops);
> +   if (ops->mmap)
> +       return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
> +   return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size);
> +}
> +
> +#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, NULL)
> +
> +static inline int dma_mmap_writecombine(struct device *dev, struct
> vm_area_struct *vma,
> +             void *cpu_addr, dma_addr_t dma_addr, size_t size)
> +{
> +   DEFINE_DMA_ATTRS(attrs);
> +   dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs);
> +   return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs);
> +}
> +
>  int
>  dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
>                      void *cpu_addr, dma_addr_t dma_addr, size_t size);
>
>
>
>
>
>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
  2013-04-19 12:23 [Xenomai] " chrono
@ 2013-04-19 14:19 ` Paul
  0 siblings, 0 replies; 12+ messages in thread
From: Paul @ 2013-04-19 14:19 UTC (permalink / raw)
  To: chrono; +Cc: xenomai

On Friday 19 April 2013, chrono wrote:
> Hi everyone, Paul

> I was looking for a more recent xenomai + pi setup than 3.2.27 and
> found
> your post on the ML which encouraged me to try to compile a more
> recent PI Kernel with Xenomai in order to play with LinuxCNC on the
> PI.

You really don't want to go down that route... Accept that the Raspberry 
is an educational tool and teaching aid.

> Test 1:
>
> 1. Fetched the RPI Kernel sources:
> git clone git://github.com/raspberrypi/linux.git linux-rpi

Wrong. No one has suggested using the modified sources from the 
RaspberryPi repository.

> 2. Tried to get back to the commit you suggested (871eef1b84)
> 3. Download xenomai-2.6.1 and unpack
> 4. Downloaded Paul's combined patch
> (http://www.xenomai.org/pipermail/xenomai/attachments/20130216/4f487e
>30/attachment.patch)
>
> xenomai-2.6.1/scripts/prepare-kernel.sh  --arch=arm
> --adeos=/usr/src/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.5.7
>-arm.patch --linux=/usr/src/linux-rpi
>
> Almost all hunks failed to apply and it ends with:
>
> prepare-kernel.sh: Unable to patch kernel 3.6.11 with
> ipipe-core-3.5.7-arm.patch.

Entirely predictable - You are trying to patch one (modified) kernel 
version with a patch intended for a completely different one.


> Test 2:
> 1. Reset kernel to suggested commit
> git reset --hard 871eef1b84
> 2. Download xenomai-2.6.2.1 and unpack
> 3. Trying to patch with the bundled ipipe arm patch
> xenomai-2.6.2.1/scripts/prepare-kernel.sh  --arch=arm
> --adeos=/usr/src/xenomai-2.6.2.1/ksrc/arch/arm/patches/ipipe-core-3.5
>.7-arm-3.patch --linux=/usr/src/linux-rpi
[...]
> prepare-kernel.sh: Unable to patch kernel 3.6.11 with
> ipipe-core-3.5.7-arm-3.patch.

See above. 

> Paul, you mentioned: "This assumes the appropriate arm patch has
> already
> been applied to a virgin stable 3.5.7 tree as per standard
> instructions."

Download an unpatched kernel source tarball from www.kernel.org, 
specifically the 3.5.7, unpack, run the prepare-kernel.sh script, and 
THEN apply the Raspberry Pi patch that accompanies the xenomai-2.6.2.1 
sources.

> What am I missing here?

No comment.

> Thanks a lot for all your time and efforts to put Xenomai/LinuxCNC to
> the PI :)

My interest lies purely with Xenomai and real applications - A patch for 
3.8.y should be ready in a day or three.


Regards, Paul.







^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel
@ 2013-04-19 12:23 chrono
  2013-04-19 14:19 ` Paul
  0 siblings, 1 reply; 12+ messages in thread
From: chrono @ 2013-04-19 12:23 UTC (permalink / raw)
  To: xenomai, paul_c

Hi everyone, Paul

> > > On 02/14/2013 01:27 PM, Paul wrote:
> > > Attached, a patch set aimed at providing support for the Broadcom
> > > BCM2835 SoC as used in the Raspberry Pi[1].
> > >
> > > In the meantime, we can put it in a raspberry subdirectory in
> > > Xenomai sources. Would you mind making a single patch? Or do you
> > > prefer the patches to be kept separated?

> > A single patch would be preferable for most people - The 
> multi-patch
> > set was mainly for the benefit of the guys who had a working kernel
> > but were sturggling with the GPIO problem (patch No.4 should apply 
> on
> > a 3.2.2x kernel).
> >
> > I'll rename the defconfig and add some recent changes made to
> > the "official" Raspberry kernel. Expect a single patch in a day or
> > two.

> Attached, a single patch against ipipe-core-3.5.7. This assumes the
> appropriate arm patch has already been applied to a virgin stable 
> 3.5.7
> tree as per standard instructions.

> The raspberry-post.patch provides support for the BCM2835 SoC 
> backported
> from the rpi-3.6.y branch[1] up to, and including commit 871eef1b84. 
> A
> minimal config is provided (bcmrpi_xenomai_defconfig) in place of the
> usual bcmrpi_*_defconfigs.

> Credit for the original 3.2.21 Xenomai support should go to ian-cim 
> as
> noted in earlier emails - My efforts are limited to backporting and
> hacks to the gpio interrupts.

I was looking for a more recent xenomai + pi setup than 3.2.27 and 
found
your post on the ML which encouraged me to try to compile a more recent
PI Kernel with Xenomai in order to play with LinuxCNC on the PI.

I've setup a cross-compile env which seems to be working fine, but I've 
never
build a xenomai kernel before, so I'm not quite sure what I'm doing 
wrong, this
is a short trace of what I've tried to do, maybe someone else can offer
some advice what I seem to be missing:

Test 1:

1. Fetched the RPI Kernel sources:

git clone git://github.com/raspberrypi/linux.git linux-rpi

2. Tried to get back to the commit you suggested (871eef1b84)

cd linux-rpi
git reset --hard 871eef1b84

3. Download xenomai-2.6.1 and unpack

4. Downloaded Paul's combined patch 
(http://www.xenomai.org/pipermail/xenomai/attachments/20130216/4f487e30/attachment.patch)

xenomai-2.6.1/scripts/prepare-kernel.sh  --arch=arm 
--adeos=/usr/src/xenomai-2.6.1/ksrc/arch/arm/patches/ipipe-core-3.5.7-arm.patch 
--linux=/usr/src/linux-rpi

Almost all hunks failed to apply and it ends with:

prepare-kernel.sh: Unable to patch kernel 3.6.11 with 
ipipe-core-3.5.7-arm.patch.


Test 2:

1. Reset kernel to suggested commit

git reset --hard 871eef1b84

2. Download xenomai-2.6.2.1 and unpack

3. Trying to patch with the bundled ipipe arm patch

xenomai-2.6.2.1/scripts/prepare-kernel.sh  --arch=arm 
--adeos=/usr/src/xenomai-2.6.2.1/ksrc/arch/arm/patches/ipipe-core-3.5.7-arm-3.patch 
--linux=/usr/src/linux-rpi

patching file arch/arm/Kconfig
Hunk #1 succeeded at 421 (offset 23 lines).
Hunk #2 succeeded at 555 (offset 25 lines).
Hunk #3 succeeded at 992 (offset 42 lines).
Hunk #4 succeeded at 1180 (offset 60 lines).
Hunk #5 succeeded at 1668 (offset 71 lines).
patching file arch/arm/boot/compressed/decompress.c
patching file arch/arm/boot/compressed/head.S
patching file arch/arm/boot/compressed/string.c
patching file arch/arm/common/gic.c
patching file arch/arm/common/it8152.c
patching file arch/arm/common/timer-sp.c
patching file arch/arm/common/vic.c
patching file arch/arm/include/asm/Kbuild
patching file arch/arm/include/asm/assembler.h
patching file arch/arm/include/asm/atomic.h
patching file arch/arm/include/asm/bitops.h
patching file arch/arm/include/asm/bug.h
patching file arch/arm/include/asm/cacheflush.h
patching file arch/arm/include/asm/cmpxchg.h
patching file arch/arm/include/asm/entry-macro-multi.S
patching file arch/arm/include/asm/fcse.h
patching file arch/arm/include/asm/hardware/timer-sp.h
patching file arch/arm/include/asm/ipipe.h
patching file arch/arm/include/asm/ipipe_base.h
patching file arch/arm/include/asm/ipipe_hwirq.h
patching file arch/arm/include/asm/irq.h
patching file arch/arm/include/asm/irqflags.h
patching file arch/arm/include/asm/memory.h
patching file arch/arm/include/asm/mman.h
patching file arch/arm/include/asm/mmu.h
patching file arch/arm/include/asm/mmu_context.h
patching file arch/arm/include/asm/percpu.h
patching file arch/arm/include/asm/pgtable.h
patching file arch/arm/include/asm/proc-fns.h
patching file arch/arm/include/asm/processor.h
patching file arch/arm/include/asm/resource.h
patching file arch/arm/include/asm/switch_to.h
patching file arch/arm/include/asm/thread_info.h
patching file arch/arm/include/asm/tlbflush.h
patching file arch/arm/kernel/Makefile
patching file arch/arm/kernel/entry-armv.S
patching file arch/arm/kernel/entry-common.S
Hunk #3 FAILED at 70.
Hunk #4 FAILED at 77.
Hunk #5 succeeded at 84 (offset -8 lines).
Hunk #6 succeeded at 92 with fuzz 1 (offset -8 lines).
Hunk #7 succeeded at 346 (offset -14 lines).
Hunk #8 succeeded at 401 (offset -14 lines).
Hunk #9 FAILED at 435.
Hunk #10 succeeded at 429 (offset -13 lines).
Hunk #11 succeeded at 446 (offset -13 lines).
Hunk #12 succeeded at 481 (offset -14 lines).
Hunk #13 succeeded at 639 (offset -14 lines).
3 out of 13 hunks FAILED -- saving rejects to file 
arch/arm/kernel/entry-common.S.rej
patching file arch/arm/kernel/entry-header.S
patching file arch/arm/kernel/ipipe.c
patching file arch/arm/kernel/ipipe_tsc.c
patching file arch/arm/kernel/ipipe_tsc_asm.S
patching file arch/arm/kernel/irq.c
Hunk #1 FAILED at 85.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/kernel/irq.c.rej
patching file arch/arm/kernel/process.c
patching file arch/arm/kernel/ptrace.c
Hunk #1 succeeded at 211 (offset 1 line).
patching file arch/arm/kernel/setup.c
patching file arch/arm/kernel/smp.c
Hunk #2 FAILED at 238.
Hunk #3 succeeded at 411 (offset 6 lines).
Hunk #4 succeeded at 608 (offset 6 lines).
Hunk #5 succeeded at 618 (offset 6 lines).
1 out of 5 hunks FAILED -- saving rejects to file 
arch/arm/kernel/smp.c.rej
patching file arch/arm/kernel/smp_twd.c
Hunk #1 succeeded at 21 (offset -1 lines).
Hunk #2 succeeded at 38 (offset -1 lines).
Hunk #3 succeeded at 114 (offset -1 lines).
Hunk #4 succeeded at 300 (offset 44 lines).
Hunk #5 succeeded at 313 (offset 44 lines).
Hunk #6 succeeded at 349 (offset 44 lines).
Hunk #7 succeeded at 357 (offset 44 lines).
Hunk #8 succeeded at 369 (offset 44 lines).
Hunk #9 succeeded at 414 (offset 44 lines).
Hunk #10 succeeded at 441 (offset 44 lines).
Hunk #11 succeeded at 479 (offset 44 lines).
patching file arch/arm/kernel/suspend.c
patching file arch/arm/kernel/traps.c
Hunk #2 succeeded at 468 (offset 32 lines).
Hunk #3 succeeded at 483 (offset 32 lines).
Hunk #4 succeeded at 836 (offset 32 lines).
Hunk #5 succeeded at 853 (offset 32 lines).
patching file arch/arm/mach-at91/Kconfig
Hunk #1 succeeded at 457 (offset 6 lines).
Hunk #2 succeeded at 507 (offset 6 lines).
patching file arch/arm/mach-at91/Makefile
patching file arch/arm/mach-at91/at91_ipipe.c
patching file arch/arm/mach-at91/at91_ipipe.h
patching file arch/arm/mach-at91/at91rm9200.c
Hunk #1 succeeded at 150 (offset 1 line).
Hunk #2 succeeded at 306 (offset 1 line).
Hunk #3 succeeded at 340 (offset 1 line).
Hunk #4 succeeded at 373 (offset 1 line).
patching file arch/arm/mach-at91/at91rm9200_time.c
patching file arch/arm/mach-at91/at91sam9260.c
Hunk #1 succeeded at 29 (offset 1 line).
Hunk #2 succeeded at 323 (offset 1 line).
Hunk #3 succeeded at 368 (offset 1 line).
Hunk #4 succeeded at 401 (offset 1 line).
patching file arch/arm/mach-at91/at91sam9261.c
Hunk #1 succeeded at 28 (offset 1 line).
Hunk #2 succeeded at 278 (offset 1 line).
Hunk #3 succeeded at 312 (offset 1 line).
Hunk #4 succeeded at 345 (offset 1 line).
patching file arch/arm/mach-at91/at91sam9263.c
Hunk #1 succeeded at 27 (offset 1 line).
Hunk #2 succeeded at 308 (offset 1 line).
Hunk #3 succeeded at 343 (offset 1 line).
Hunk #4 succeeded at 376 (offset 1 line).
patching file arch/arm/mach-at91/at91sam926x_time.c
patching file arch/arm/mach-at91/at91sam9g45.c
Hunk #1 succeeded at 27 (offset 1 line).
Hunk #2 succeeded at 351 (offset 12 lines).
Hunk #3 succeeded at 385 (offset 12 lines).
Hunk #4 succeeded at 420 (offset 12 lines).
patching file arch/arm/mach-at91/at91sam9rl.c
Hunk #1 succeeded at 28 (offset 1 line).
Hunk #2 succeeded at 283 (offset 1 line).
Hunk #3 succeeded at 316 (offset 1 line).
Hunk #4 succeeded at 349 (offset 1 line).
patching file arch/arm/mach-at91/at91x40.c
Hunk #1 succeeded at 47 (offset 2 lines).
patching file arch/arm/mach-at91/at91x40_time.c
patching file arch/arm/mach-at91/clock.c
Hunk #1 succeeded at 897 (offset 12 lines).
patching file arch/arm/mach-at91/gpio.c
Hunk #1 FAILED at 25.
Hunk #2 succeeded at 42 (offset 2 lines).
Hunk #3 succeeded at 585 (offset 2 lines).
Hunk #4 FAILED at 604.
Hunk #5 succeeded at 621 (offset 1 line).
Hunk #6 succeeded at 1098 (offset 1 line).
2 out of 6 hunks FAILED -- saving rejects to file 
arch/arm/mach-at91/gpio.c.rej
patching file arch/arm/mach-at91/include/mach/hardware.h
patching file arch/arm/mach-at91/irq.c
Hunk #1 succeeded at 296 with fuzz 2 (offset 166 lines).
patching file arch/arm/mach-bcmring/core.c
patching file arch/arm/mach-highbank/highbank.c
Hunk #1 succeeded at 113 (offset 5 lines).
Hunk #2 FAILED at 122.
1 out of 2 hunks FAILED -- saving rejects to file 
arch/arm/mach-highbank/highbank.c.rej
patching file arch/arm/mach-imx/clk-imx1.c
patching file arch/arm/mach-imx/clk-imx21.c
patching file arch/arm/mach-imx/clk-imx25.c
Hunk #1 FAILED at 241.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-imx/clk-imx25.c.rej
patching file arch/arm/mach-imx/clk-imx27.c
Hunk #1 succeeded at 265 (offset 2 lines).
patching file arch/arm/mach-imx/clk-imx31.c
Hunk #1 succeeded at 176 (offset 1 line).
patching file arch/arm/mach-imx/clk-imx35.c
patching file arch/arm/mach-imx/clk-imx51-imx53.c
Hunk #1 succeeded at 376 (offset 9 lines).
Hunk #2 succeeded at 462 (offset 9 lines).
patching file arch/arm/mach-imx/clk-imx6q.c
Hunk #1 succeeded at 447 (offset 15 lines).
patching file arch/arm/mach-imx/mach-imx6q.c
Hunk #1 succeeded at 211 (offset 45 lines).
patching file arch/arm/mach-imx/mach-mx31_3ds.c
patching file arch/arm/mach-imx/mach-mx31ads.c
Hunk #1 FAILED at 21.
Hunk #2 FAILED at 162.
2 out of 2 hunks FAILED -- saving rejects to file 
arch/arm/mach-imx/mach-mx31ads.c.rej
patching file arch/arm/mach-imx/mm-imx1.c
patching file arch/arm/mach-imx/mm-imx3.c
Hunk #1 succeeded at 142 (offset -1 lines).
Hunk #2 succeeded at 221 (offset -1 lines).
patching file arch/arm/mach-imx/mm-imx5.c
Hunk #1 FAILED at 105.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-imx/mm-imx5.c.rej
patching file arch/arm/mach-integrator/core.c
patching file arch/arm/mach-integrator/include/mach/platform.h
patching file arch/arm/mach-integrator/include/mach/timex.h
patching file arch/arm/mach-integrator/integrator_cp.c
Hunk #2 succeeded at 379 (offset -59 lines).
patching file arch/arm/mach-ixp4xx/common.c
patching file arch/arm/mach-ixp4xx/include/mach/platform.h
patching file arch/arm/mach-mxs/Kconfig
Hunk #1 succeeded at 16 with fuzz 1 (offset -2 lines).
patching file arch/arm/mach-mxs/icoll.c
patching file arch/arm/mach-mxs/mach-m28evk.c
patching file arch/arm/mach-mxs/timer.c
patching file arch/arm/mach-omap1/leds-innovator.c
patching file arch/arm/mach-omap2/clock3xxx_data.c
Hunk #1 FAILED at 3391.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-omap2/clock3xxx_data.c.rej
patching file arch/arm/mach-omap2/gpmc.c
Hunk #2 succeeded at 786 (offset 1 line).
patching file arch/arm/mach-omap2/io.c
Hunk #2 succeeded at 435 (offset 36 lines).
Hunk #3 succeeded at 472 (offset 36 lines).
patching file arch/arm/mach-omap2/irq.c
Hunk #2 succeeded at 43 (offset 1 line).
Hunk #3 succeeded at 52 (offset 1 line).
Hunk #4 succeeded at 88 (offset 1 line).
Hunk #5 succeeded at 127 (offset 1 line).
Hunk #6 succeeded at 165 (offset 1 line).
Hunk #7 succeeded at 267 (offset 1 line).
Hunk #8 FAILED at 299.
1 out of 8 hunks FAILED -- saving rejects to file 
arch/arm/mach-omap2/irq.c.rej
patching file arch/arm/mach-omap2/mux.c
patching file arch/arm/mach-omap2/omap-wakeupgen.c
Hunk #1 succeeded at 432 (offset 64 lines).
Hunk #2 succeeded at 440 (offset 64 lines).
patching file arch/arm/mach-omap2/pm34xx.c
Hunk #1 succeeded at 346 (offset -47 lines).
patching file arch/arm/mach-omap2/pm44xx.c
patching file arch/arm/mach-omap2/prm_common.c
Hunk #1 FAILED at 122.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-omap2/prm_common.c.rej
patching file arch/arm/mach-omap2/timer.c
Hunk #2 succeeded at 77 (offset -5 lines).
Hunk #3 succeeded at 107 (offset -5 lines).
Hunk #4 succeeded at 117 (offset -5 lines).
Hunk #5 succeeded at 125 (offset -5 lines).
Hunk #6 succeeded at 149 (offset -4 lines).
Hunk #7 succeeded at 207 (offset -4 lines).
Hunk #8 succeeded at 217 (offset -4 lines).
Hunk #9 FAILED at 314.
Hunk #10 succeeded at 392 (offset -3 lines).
Hunk #11 succeeded at 445 (offset -3 lines).
Hunk #12 succeeded at 461 (offset -3 lines).
Hunk #13 succeeded at 508 (offset 2 lines).
1 out of 13 hunks FAILED -- saving rejects to file 
arch/arm/mach-omap2/timer.c.rej
patching file arch/arm/mach-pxa/irq.c
patching file arch/arm/mach-pxa/leds-idp.c
patching file arch/arm/mach-pxa/leds-lubbock.c
patching file arch/arm/mach-pxa/leds-mainstone.c
patching file arch/arm/mach-pxa/lpd270.c
patching file arch/arm/mach-pxa/lubbock.c
patching file arch/arm/mach-pxa/mainstone.c
patching file arch/arm/mach-pxa/pcm990-baseboard.c
patching file arch/arm/mach-pxa/time.c
Hunk #2 FAILED at 43.
Hunk #3 FAILED at 61.
Hunk #6 FAILED at 148.
3 out of 6 hunks FAILED -- saving rejects to file 
arch/arm/mach-pxa/time.c.rej
patching file arch/arm/mach-pxa/viper.c
patching file arch/arm/mach-realview/core.c
patching file arch/arm/mach-realview/core.h
patching file arch/arm/mach-realview/realview_eb.c
patching file arch/arm/mach-realview/realview_pb1176.c
patching file arch/arm/mach-realview/realview_pb11mp.c
patching file arch/arm/mach-realview/realview_pba8.c
patching file arch/arm/mach-realview/realview_pbx.c
patching file arch/arm/mach-s3c24xx/bast-irq.c
patching file arch/arm/mach-s3c24xx/irq-s3c2412.c
patching file arch/arm/mach-s3c24xx/irq-s3c2416.c
patching file arch/arm/mach-s3c24xx/irq-s3c2440.c
patching file arch/arm/mach-s3c24xx/irq-s3c2443.c
patching file arch/arm/mach-s3c24xx/irq-s3c244x.c
patching file arch/arm/mach-sa1100/irq.c
Hunk #1 succeeded at 16 (offset 1 line).
Hunk #2 succeeded at 128 (offset 1 line).
Hunk #3 succeeded at 220 (offset 1 line).
Hunk #4 succeeded at 258 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-assabet.c
patching file arch/arm/mach-sa1100/leds-badge4.c
patching file arch/arm/mach-sa1100/leds-cerf.c
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-sa1100/leds-cerf.c.rej
patching file arch/arm/mach-sa1100/leds-hackkit.c
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-sa1100/leds-hackkit.c.rej
patching file arch/arm/mach-sa1100/leds-lart.c
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file 
arch/arm/mach-sa1100/leds-lart.c.rej
patching file arch/arm/mach-sa1100/time.c
Hunk #2 FAILED at 29.
Hunk #4 FAILED at 113.
2 out of 4 hunks FAILED -- saving rejects to file 
arch/arm/mach-sa1100/time.c.rej
patching file arch/arm/mach-versatile/core.c
patching file arch/arm/mach-vexpress/v2m.c
Hunk #1 succeeded at 80 (offset 3 lines).
patching file arch/arm/mm/Kconfig
patching file arch/arm/mm/Makefile
patching file arch/arm/mm/alignment.c
Hunk #3 succeeded at 915 (offset 2 lines).
Hunk #4 succeeded at 942 (offset 2 lines).
patching file arch/arm/mm/cache-l2x0.c
patching file arch/arm/mm/context.c
Hunk #1 FAILED at 12.
Hunk #2 succeeded at 130 (offset 36 lines).
Hunk #3 succeeded at 140 (offset 36 lines).
Hunk #4 succeeded at 157 (offset 36 lines).
Hunk #5 succeeded at 165 (offset 36 lines).
Hunk #6 succeeded at 202 (offset 36 lines).
1 out of 6 hunks FAILED -- saving rejects to file 
arch/arm/mm/context.c.rej
patching file arch/arm/mm/copypage-v4mc.c
patching file arch/arm/mm/copypage-xscale.c
patching file arch/arm/mm/fault-armv.c
patching file arch/arm/mm/fault.c
patching file arch/arm/mm/fcse.c
patching file arch/arm/mm/flush.c
patching file arch/arm/mm/idmap.c
patching file arch/arm/mm/ioremap.c
patching file arch/arm/mm/mmap.c
patching file arch/arm/mm/mmu.c
patching file arch/arm/mm/pgd.c
patching file arch/arm/mm/proc-arm920.S
patching file arch/arm/mm/proc-arm926.S
patching file arch/arm/mm/proc-feroceon.S
patching file arch/arm/mm/proc-xscale.S
patching file arch/arm/plat-mxc/3ds_debugboard.c
Hunk #1 succeeded at 20 (offset 2 lines).
Hunk #2 FAILED at 105.
1 out of 2 hunks FAILED -- saving rejects to file 
arch/arm/plat-mxc/3ds_debugboard.c.rej
patching file arch/arm/plat-mxc/Kconfig
patching file arch/arm/plat-mxc/avic.c
Hunk #1 succeeded at 152 (offset 9 lines).
Hunk #2 FAILED at 164.
1 out of 2 hunks FAILED -- saving rejects to file 
arch/arm/plat-mxc/avic.c.rej
patching file arch/arm/plat-mxc/cpu.c
patching file arch/arm/plat-mxc/devices.c
patching file arch/arm/plat-mxc/include/mach/common.h
Hunk #1 succeeded at 56 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 161 (offset 5 lines).
patching file arch/arm/plat-mxc/include/mach/irqs.h
Hunk #1 FAILED at 11.
Hunk #2 succeeded at 2 with fuzz 2 (offset -28 lines).
1 out of 2 hunks FAILED -- saving rejects to file 
arch/arm/plat-mxc/include/mach/irqs.h.rej
patching file arch/arm/plat-mxc/time.c
Hunk #2 succeeded at 228 (offset 1 line).
Hunk #3 succeeded at 238 (offset 1 line).
Hunk #4 succeeded at 285 (offset 1 line).
Hunk #5 succeeded at 311 (offset 1 line).
Hunk #6 succeeded at 350 (offset 1 line).
patching file arch/arm/plat-mxc/tzic.c
Hunk #1 FAILED at 15.
Hunk #2 succeeded at 118 (offset 2 lines).
Hunk #3 FAILED at 143.
Hunk #4 succeeded at 171 (offset 5 lines).
2 out of 4 hunks FAILED -- saving rejects to file 
arch/arm/plat-mxc/tzic.c.rej
patching file arch/arm/plat-omap/dmtimer.c
Hunk #1 FAILED at 40.
Hunk #2 succeeded at 235 (offset 22 lines).
Hunk #3 succeeded at 269 (offset 22 lines).
Hunk #4 succeeded at 496 (offset 63 lines).
1 out of 4 hunks FAILED -- saving rejects to file 
arch/arm/plat-omap/dmtimer.c.rej
patching file arch/arm/plat-omap/include/plat/dmtimer.h
Hunk #1 succeeded at 331 (offset -12 lines).
Hunk #2 succeeded at 415 (offset -12 lines).
patching file arch/arm/plat-s3c24xx/irq.c
patching file arch/arm/plat-samsung/include/plat/gpio-core.h
patching file arch/arm/plat-samsung/time.c
patching file arch/arm/plat-spear/shirq.c
patching file arch/arm/plat-spear/time.c
patching file arch/arm/plat-versatile/fpga-irq.c
patching file arch/arm/vfp/entry.S
patching file arch/arm/vfp/vfphw.S
Hunk #1 succeeded at 20 (offset 1 line).
Hunk #2 succeeded at 32 (offset 1 line).
Hunk #3 succeeded at 45 (offset 1 line).
Hunk #4 succeeded at 92 (offset 1 line).
Hunk #5 succeeded at 134 (offset 1 line).
Hunk #6 succeeded at 177 (offset 1 line).
Hunk #7 succeeded at 206 (offset 1 line).
Hunk #8 succeeded at 252 (offset 1 line).
patching file arch/arm/vfp/vfpmodule.c
patching file drivers/gpio/gpio-mxc.c
Hunk #1 succeeded at 31 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 67 with fuzz 1 (offset 1 line).
Hunk #3 FAILED at 230.
Hunk #4 succeeded at 295 (offset 39 lines).
Hunk #5 succeeded at 310 (offset 39 lines).
Hunk #6 succeeded at 528 (offset 50 lines).
1 out of 6 hunks FAILED -- saving rejects to file 
drivers/gpio/gpio-mxc.c.rej
patching file drivers/gpio/gpio-omap.c
Hunk #14 succeeded at 1071 (offset -2 lines).
Hunk #15 succeeded at 1179 (offset -2 lines).
patching file drivers/gpio/gpio-pxa.c
Hunk #2 succeeded at 93 (offset 1 line).
Hunk #3 succeeded at 418 (offset 24 lines).
patching file drivers/gpio/gpio-sa1100.c
patching file drivers/mfd/twl6030-irq.c
patching file drivers/misc/Kconfig
Hunk #1 succeeded at 80 (offset 1 line).
Hunk #2 succeeded at 356 (offset 1 line).
patching file drivers/cpuidle/Kconfig
patching file drivers/tty/serial/8250/8250.c
Hunk #1 succeeded at 3063 (offset 8 lines).
patching file fs/exec.c
patching file fs/proc/array.c
patching file include/asm-generic/atomic.h
patching file include/asm-generic/bitops/atomic.h
patching file include/asm-generic/cmpxchg-local.h
patching file include/asm-generic/mman-common.h
patching file include/asm-generic/percpu.h
patching file include/asm-generic/resource.h
patching file include/ipipe/setup.h
patching file include/ipipe/thread_info.h
patching file include/linux/clockchips.h
patching file include/linux/clocksource.h
patching file include/linux/hardirq.h
patching file include/linux/i8253.h
patching file include/linux/ipipe.h
patching file include/linux/ipipe_base.h
patching file include/linux/ipipe_compat.h
patching file include/linux/ipipe_debug.h
patching file include/linux/ipipe_domain.h
patching file include/linux/ipipe_lock.h
patching file include/linux/ipipe_tickdev.h
patching file include/linux/ipipe_trace.h
patching file include/linux/irq.h
Hunk #1 succeeded at 320 (offset -2 lines).
Hunk #2 succeeded at 527 (offset -1 lines).
Hunk #3 succeeded at 670 (offset -1 lines).
Hunk #4 succeeded at 732 (offset -1 lines).
patching file include/linux/irqdesc.h
patching file include/linux/irqnr.h
patching file include/linux/kernel.h
Hunk #2 succeeded at 150 (offset 8 lines).
patching file include/linux/kvm_host.h
patching file include/linux/preempt.h
patching file include/linux/resource.h
patching file include/linux/rwlock.h
patching file include/linux/rwlock_api_smp.h
patching file include/linux/sched.h
Hunk #4 succeeded at 463 (offset 5 lines).
Hunk #5 succeeded at 1545 (offset 5 lines).
Hunk #6 succeeded at 1829 (offset 3 lines).
patching file include/linux/spinlock.h
patching file include/linux/spinlock_api_smp.h
patching file include/linux/spinlock_up.h
patching file include/linux/time.h
patching file init/Kconfig
patching file init/main.c
Hunk #1 succeeded at 483 (offset 1 line).
Hunk #2 succeeded at 521 (offset 1 line).
Hunk #3 succeeded at 554 (offset 1 line).
Hunk #4 succeeded at 784 (offset 5 lines).
patching file kernel/Makefile
patching file kernel/exit.c
Hunk #1 succeeded at 988 (offset -3 lines).
patching file kernel/fork.c
Hunk #1 FAILED at 315.
Hunk #2 succeeded at 610 (offset -4 lines).
Hunk #3 succeeded at 1101 (offset -4 lines).
Hunk #4 succeeded at 1490 (offset -4 lines).
1 out of 4 hunks FAILED -- saving rejects to file kernel/fork.c.rej
patching file kernel/ipipe/Kconfig
patching file kernel/ipipe/Kconfig.debug
patching file kernel/ipipe/Makefile
patching file kernel/ipipe/compat.c
patching file kernel/ipipe/core.c
patching file kernel/ipipe/timer.c
patching file kernel/ipipe/tracer.c
patching file kernel/irq/chip.c
patching file kernel/irq/generic-chip.c
patching file kernel/irq/irqdesc.c
patching file kernel/lockdep.c
patching file kernel/panic.c
Hunk #2 succeeded at 361 (offset 8 lines).
patching file kernel/power/hibernate.c
Hunk #1 succeeded at 274 (offset 4 lines).
Hunk #2 succeeded at 428 (offset 4 lines).
Hunk #3 succeeded at 544 (offset 4 lines).
patching file kernel/printk.c
Hunk #1 succeeded at 1643 (offset 63 lines).
Hunk #2 succeeded at 1703 (offset 63 lines).
Hunk #3 succeeded at 1773 with fuzz 1 (offset 63 lines).
Hunk #4 succeeded at 2482 (offset 86 lines).
patching file kernel/sched/core.c
Hunk #15 succeeded at 4410 (offset -2 lines).
Hunk #16 succeeded at 5158 (offset -2 lines).
Hunk #17 succeeded at 8574 (offset -14 lines).
patching file kernel/signal.c
patching file kernel/spinlock.c
patching file kernel/time/clockevents.c
patching file kernel/time/clocksource.c
patching file kernel/time/tick-common.c
patching file kernel/time/tick-sched.c
Hunk #1 succeeded at 680 (offset 23 lines).
Hunk #2 succeeded at 838 with fuzz 2 (offset 24 lines).
patching file kernel/time/timekeeping.c
Hunk #1 succeeded at 1440 (offset 78 lines).
patching file kernel/timer.c
Hunk #1 succeeded at 1374 (offset 15 lines).
patching file kernel/trace/Kconfig
patching file kernel/trace/ftrace.c
patching file lib/Kconfig.debug
patching file lib/bust_spinlocks.c
patching file lib/ioremap.c
patching file lib/smp_processor_id.c
patching file mm/Kconfig
Hunk #1 succeeded at 319 (offset 5 lines).
patching file mm/memory.c
Hunk #1 succeeded at 826 (offset 4 lines).
Hunk #2 succeeded at 860 (offset 4 lines).
Hunk #3 succeeded at 913 (offset 4 lines).
Hunk #4 succeeded at 965 (offset 4 lines).
Hunk #5 succeeded at 1008 (offset 4 lines).
Hunk #6 succeeded at 2539 (offset 12 lines).
Hunk #7 succeeded at 4084 (offset 12 lines).
patching file mm/mlock.c
patching file mm/mmap.c
Hunk #1 succeeded at 2173 (offset -1 lines).
patching file mm/mmu_context.c
patching file mm/mprotect.c
patching file mm/vmalloc.c
prepare-kernel.sh: Unable to patch kernel 3.6.11 with 
ipipe-core-3.5.7-arm-3.patch.

Paul, you mentioned: "This assumes the appropriate arm patch has 
already
been applied to a virgin stable 3.5.7 tree as per standard 
instructions."

What am I missing here?

Thanks a lot for all your time and efforts to put Xenomai/LinuxCNC to 
the PI :)

chrono








^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-07-08 22:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14 12:27 [Xenomai] Xenomai, Raspberry Pi, 3.5.7 kernel Paul
2013-02-14 19:48 ` Gilles Chanteperdrix
2013-02-15 11:50   ` Paul
2013-02-16  0:20     ` Paul
2013-02-18 21:34       ` Gilles Chanteperdrix
2013-07-01 23:21         ` John Pham
2013-07-04 11:14           ` Paul
     [not found]           ` <32348a0f3aab4463894a5a65efe02ab8@BLUPRD0113HT002.prod.exchangelabs.com>
2013-07-08 22:59             ` John Pham
     [not found] ` <718DFA7882181D45B8BD18F31C46D55427A69659@MBX204.domain.local>
2013-02-14 20:15   ` [Xenomai] [beagleboard] FW: " Jason Kridner
2013-04-19 12:23 [Xenomai] " chrono
2013-04-19 14:19 ` Paul
     [not found] <CAOfKkXHkoPvJmp1mFNWCMpiyH1vGP1fjOLs=6awoSc8gF3C_9Q@mail.gmail.com>
2013-07-02 20:03 ` John Pham

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.