~ubuntu-branches/ubuntu/lucid/xenomai/lucid

« back to all changes in this revision

Viewing changes to include/asm-powerpc/bits/init.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-06-24 22:17:01 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090624221701-mwnah8aj90zmp6uj
Tags: 2.4.8-2ubuntu1
* Merge from debian unstable (LP: #391918), remaining changes:
  - Add lpia to supported architectures.
  - debian/rules: Create file for debhelper to pick up, use debhelper to
    install it.
  - debian/libxenomai1.dirs: Do not create directory.
  - debian/libxenomai1.preinst: Remove symlink on upgrade, remove old udev.
    rule unless modified in which case move to new name.
  - debian/libxenomai1.postinst: Do not create symlink.
  - debian/libxenomai1.postrm: No symlink to remove.
  - Bump build-depend on debhelper to install udev rules into
    /lib/udev/rules.d, add Breaks on udev to get correct version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include <linux/init.h>
31
31
#include <asm/xenomai/calibration.h>
 
32
#include <asm-generic/xenomai/bits/timeconv.h>
32
33
 
33
34
int xnarch_escalation_virq;
34
35
 
67
68
 
68
69
static inline int xnarch_init(void)
69
70
{
70
 
        int err;
71
 
 
72
 
        err = rthal_init();
73
 
 
74
 
        if (err)
75
 
                return err;
 
71
        int ret;
 
72
 
 
73
        ret = rthal_init();
 
74
        if (ret)
 
75
                return ret;
76
76
 
77
77
#if defined(CONFIG_SMP) && defined(MODULE)
78
 
        /* Make sure the init sequence is kept on the same CPU when
79
 
           running as a module. */
 
78
        /*
 
79
         * Make sure the init sequence is kept on the same CPU when
 
80
         * running as a module.
 
81
         */
80
82
        set_cpus_allowed(current, cpumask_of_cpu(0));
81
83
#endif /* CONFIG_SMP && MODULE */
82
84
 
83
 
        err = xnarch_calibrate_sched();
 
85
        xnarch_init_timeconv(RTHAL_CPU_FREQ);
84
86
 
85
 
        if (err)
86
 
                return err;
 
87
        ret = xnarch_calibrate_sched();
 
88
        if (ret)
 
89
                return ret;
87
90
 
88
91
        xnarch_escalation_virq = rthal_alloc_virq();
89
 
 
90
92
        if (xnarch_escalation_virq == 0)
91
93
                return -ENOSYS;
92
94
 
93
95
        rthal_virtualize_irq(&rthal_domain,
94
96
                             xnarch_escalation_virq,
95
 
                             (rthal_irq_handler_t) & xnpod_schedule_handler,
 
97
                             (rthal_irq_handler_t)&xnpod_schedule_handler,
96
98
                             NULL, NULL, IPIPE_HANDLE_MASK | IPIPE_WIRED_MASK);
97
99
 
98
100
        xnarch_old_trap_handler = rthal_trap_catch(&xnarch_trap_fault);