All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Tom Graves <tgraves_cs@domain.hid>
Cc: adeos-main@gna.org
Subject: Re: [Adeos-main] test adeos patch
Date: Tue, 25 Apr 2006 16:54:51 +0200	[thread overview]
Message-ID: <444E383B.6010908@domain.hid> (raw)
In-Reply-To: <20060425144447.68645.qmail@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

Tom Graves wrote:
> Hello all,
> 
> I am new to this mailing list and adeos in general.
> 
> I was wondering if there are any test programs out
> there to verify the adeos patch is applied properly? 
> I am applying it to a kernel running on an arm
> processor.
> 

Attached a trivial test intercepting the timer IRQ, which at least 
demonstrates that the pipeline core works properly.

The definitive test would be to run a complete RTOS like this one over 
the patched kernel:
http://download.gna.org/xenomai/stable/xenomai-2.1.tar.bz2

-- 

Philippe.

[-- Attachment #2: ipipe_test.c --]
[-- Type: text/x-csrc, Size: 2474 bytes --]

/*
 *   A simple I-PIPE test module.
 *
 *   Copyright (C) 2005 Philippe Gerum.
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
 *   USA; either version 2 of the License, or (at your option) any later
 *   version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 *   This module implements a trivial IPIPE client domain. Basically,
 *   it creates an IPIPE domain which has a higher priority in the
 *   pipeline than the root (i.e. Linux) domain, then virtualizes the
 *   timer interrupt for it. As a result of this, each timer tick is
 *   first processed by this domain's timer_tick() routine, then by
 *   the Linux domain handler.
 */

#include <linux/module.h>
#include <asm/system.h>

MODULE_LICENSE("GPL");

static struct ipipe_sysinfo sys_info;

static struct ipipe_domain this_domain;

static int timer_hits[IPIPE_NR_CPUS];

void timer_tick (unsigned irq)
{
    timer_hits[ipipe_processor_id()]++;
    ipipe_propagate_irq(irq);
}

void domain_entry (void)
{
    printk("Domain %s started on CPU#%d.\n",
	   ipipe_current_domain->name,
	   ipipe_processor_id());

    ipipe_get_sysinfo(&sys_info);

    ipipe_virtualize_irq(sys_info.archdep.tmirq,
			 &timer_tick,
			 NULL,
			 IPIPE_DYNAMIC_MASK);
}

static int __init __ipipe_domain_init (void)
{
    struct ipipe_domain_attr attr;

    ipipe_init_attr(&attr);

    attr.name = "TestDomain";
    attr.domid = 1;
    attr.entry = &domain_entry;
    attr.priority = IPIPE_ROOT_PRI + 1;
 
    return ipipe_register_domain(&this_domain,&attr);
}

static void __exit __ipipe_domain_exit (void)

{
    int cpu;

    ipipe_unregister_domain(&this_domain);

    for (cpu = 0; cpu < sys_info.ncpus; cpu++)
	{
	printk("IPIPE TEST ON CPU #%d:\n",cpu);
	printk("       %d TIMER TICKS ON IRQ #%d\n",timer_hits[cpu],sys_info.archdep.tmirq);
	}
}

module_init(__ipipe_domain_init);
module_exit(__ipipe_domain_exit);

      reply	other threads:[~2006-04-25 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25 14:44 [Adeos-main] test adeos patch Tom Graves
2006-04-25 14:54 ` Philippe Gerum [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=444E383B.6010908@domain.hid \
    --to=rpm@xenomai.org \
    --cc=adeos-main@gna.org \
    --cc=tgraves_cs@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.