aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/netsupport.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: add AutoProbe for ppp_async and ppp_synctty (should fix #14185)Felix Fietkau2013-09-191-1/+2
* kernel: make most modules use AutoProbeJohn Crispin2013-09-171-8/+5
* kernel: kmod-appletalk: fix dependenciesHauke Mehrtens2013-08-041-2/+6
* kernel: split slhc into a separate package and make slip depend on itFelix Fietkau2013-07-181-6/+18
* kernel: fix accidental depends line duplicationFelix Fietkau2013-07-181-2/+1
* kernel: sctp depends on ipv6 if ipv6 is enabledFelix Fietkau2013-07-181-0/+1
* kernel: make kmod-sched depend on kmod-ipt-coreFelix Fietkau2013-07-181-1/+1
* linux: introduce new kmod-iptunnel for Linux 3.10+, add missing dependencies ...Jo-Philipp Wich2013-07-181-7/+25
* kernel: move codel from kmod-sched-core to kmod-sched, it is rarely neededFelix Fietkau2013-07-111-2/+2
* packages: clean up the package folderJohn Crispin2013-06-211-0/+908
lor: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * 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; 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, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Copyright (C) IBM Corp. 2005
 *
 * Authors: Jimi Xenidis <jimix@watson.ibm.com>
 */

#include <xen/config.h>
#include <xen/time.h>
#include <xen/smp.h>
#include <xen/lib.h>
#include <xen/sched.h>
#include <asm/processor.h>
#include <asm/current.h>
#include <asm/debugger.h>

#define Dprintk(x...) printk(x)

static int cpu_has_hdec = 1;
ulong ticks_per_usec;
unsigned long cpu_khz;
s64 timebase_freq;

s_time_t get_s_time(void)
{
    return tb_to_ns(get_timebase());
}

static void set_preempt(unsigned ns)
{
    ulong ticks = ns_to_tb(ns);
    if (cpu_has_hdec) {
        mthdec(ticks);
    } else {
        mtdec(ticks);
    }
}

/*
 * set preemption timer  Timeout value is in ticks from start of boot
 * returns 1 on success
 * returns 0 if the timeout value is too small or in the past.
 */
extern int reprogram_timer(s_time_t timeout);
int reprogram_timer(s_time_t timeout)
{
    s_time_t expire;

    if (timeout == 0) {
        expire = INT_MAX;
    } else {
        s_time_t now;

        now = get_s_time();
        expire = timeout - now; /* value from now */

        if (expire <= 0) {
            Dprintk("%s[%02d] Timeout in the past "
                    "0x%08X%08X > 0x%08X%08X\n", __func__,
                    smp_processor_id(), (u32)(now >> 32), 
                    (u32)now, (u32)(timeout >> 32), (u32)timeout);
            return 0;
        }
    }
    set_preempt(expire);
    return 1;
}

void send_timer_event(struct vcpu *v)
{
    v->arch.dec = 1;
    vcpu_unblock(v);
}

void update_vcpu_system_time(struct vcpu *v)
{
}