type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf)
{
struct net *net;
int old;
if (!rtnl_trylock())
return restart_syscall();
net = (struct net *)table->extra2;
old = *p;
*p = newf;
if (p == &net->ipv6.devconf_dflt->disable_ipv6) {
rtnl_unlock();
return 0;
} |
functions | int addrconf_sysctl_disable(ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
int *valp = ctl->data;
int val = *valp;
loff_t pos = *ppos;
ctl_table lctl;
int ret;
/*
* ctl->data points to idev->cnf.disable_ipv6, we should
* not modify it until we get the rtnl lock.
*/
lc... |
functions | int __addrconf_sysctl_register(struct net *net, char *dev_name,
struct inet6_dev *idev, struct ipv6_devconf *p)
{
int i;
struct addrconf_sysctl_table *t;
char path[sizeof("net/ipv6/conf/") + IFNAMSIZ];
t = kmemdup(&addrconf_sysctl, sizeof(*t), GFP_KERNEL);
if (t == NULL)
goto out;
for (i = 0; t->addrconf_va... |
functions | void __addrconf_sysctl_unregister(struct ipv6_devconf *p)
{
struct addrconf_sysctl_table *t;
if (p->sysctl == NULL)
return;
t = p->sysctl;
p->sysctl = NULL;
unregister_net_sysctl_table(t->sysctl_header);
kfree(t);
} |
functions | void addrconf_sysctl_register(struct inet6_dev *idev)
{
neigh_sysctl_register(idev->dev, idev->nd_parms, "ipv6",
&ndisc_ifinfo_sysctl_change);
__addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name,
idev, &idev->cnf);
} |
functions | void addrconf_sysctl_unregister(struct inet6_dev *idev)
{
__addrconf_sysctl_unregister(&idev->cnf);
neigh_sysctl_unregister(idev->nd_parms);
} |
functions | __net_init addrconf_init_net(struct net *net)
{
int err = -ENOMEM;
struct ipv6_devconf *all, *dflt;
all = kmemdup(&ipv6_devconf, sizeof(ipv6_devconf), GFP_KERNEL);
if (all == NULL)
goto err_alloc_all;
dflt = kmemdup(&ipv6_devconf_dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL);
if (dflt == NULL)
goto err_alloc... |
functions | __net_exit addrconf_exit_net(struct net *net)
{
#ifdef CONFIG_SYSCTL
__addrconf_sysctl_unregister(net->ipv6.devconf_dflt);
__addrconf_sysctl_unregister(net->ipv6.devconf_all);
#endif
if (!net_eq(net, &init_net)) {
kfree(net->ipv6.devconf_dflt);
kfree(net->ipv6.devconf_all);
} |
functions | __init addrconf_init(void)
{
int i, err;
err = ipv6_addr_label_init();
if (err < 0) {
pr_crit("%s: cannot initialize default policy table: %d\n",
__func__, err);
goto out;
} |
functions | void addrconf_cleanup(void)
{
struct net_device *dev;
int i;
unregister_netdevice_notifier(&ipv6_dev_notf);
unregister_pernet_subsys(&addrconf_ops);
ipv6_addr_label_cleanup();
rtnl_lock();
__rtnl_af_unregister(&inet6_ops);
/* clean dev list */
for_each_netdev(&init_net, dev) {
if (__in6_dev_get(dev) == N... |
includes |
#include <linux/errno.h> |
includes | #include <linux/module.h> |
includes | #include <linux/sched.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/param.h> |
includes | #include <linux/string.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/interrupt.h> |
includes | #include <linux/timex.h> |
includes | #include <linux/kernel_stat.h> |
includes | #include <linux/time.h> |
includes | #include <linux/init.h> |
includes | #include <linux/profile.h> |
includes | #include <linux/cpu.h> |
includes | #include <linux/security.h> |
includes | #include <linux/percpu.h> |
includes | #include <linux/rtc.h> |
includes | #include <linux/jiffies.h> |
includes | #include <linux/posix-timers.h> |
includes | #include <linux/irq.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/perf_event.h> |
includes | #include <asm/trace.h> |
includes |
#include <asm/io.h> |
includes | #include <asm/processor.h> |
includes | #include <asm/nvram.h> |
includes | #include <asm/cache.h> |
includes | #include <asm/machdep.h> |
includes | #include <asm/uaccess.h> |
includes | #include <asm/time.h> |
includes | #include <asm/prom.h> |
includes | #include <asm/irq.h> |
includes | #include <asm/div64.h> |
includes | #include <asm/smp.h> |
includes | #include <asm/vdso_datapage.h> |
includes | #include <asm/firmware.h> |
includes | #include <asm/cputime.h> |
includes | #include <asm/iseries/it_lp_queue.h> |
includes | #include <asm/iseries/hv_call_xm.h> |
includes |
#include <linux/clockchips.h> |
includes | #include <linux/clocksource.h> |
defines |
#define DECREMENTER_MAX 0x7fffffff |
defines |
#define XSEC_PER_SEC (1024*1024) |
defines | #define SCALE_XSEC(xsec, max) (((xsec) * max) / XSEC_PER_SEC) |
defines | #define SCALE_XSEC(xsec, max) mulhwu((xsec) << 12, max) |
defines |
#define TICKLEN_SCALE NTP_SCALE_SHIFT |
defines | #define TICKLEN_SHIFT (63 - 30 - TICKLEN_SCALE + SHIFT_HZ) |
defines | #define calc_cputime_factors() |
defines | #define calculate_steal_time() do { } while (0) |
defines | #define snapshot_purr() do { } while (0) |
defines |
#define set_perf_event_pending_flag() __get_cpu_var(perf_event_pending) = 1 |
defines | #define test_perf_event_pending() __get_cpu_var(perf_event_pending) |
defines | #define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0 |
defines |
#define test_perf_event_pending() 0 |
defines | #define clear_perf_event_pending() |
defines |
#define FEBRUARY 2 |
defines | #define STARTOFTIME 1970 |
defines | #define SECDAY 86400L |
defines | #define SECYR (SECDAY * 365) |
defines | #define leapyear(year) ((year) % 4 == 0 && \ |
defines | #define days_in_year(a) (leapyear(a) ? 366 : 365) |
defines | #define days_in_month(a) (month_days[(a) - 1]) |
structs | struct decrementer_clock {
struct clock_event_device event;
u64 next_tb;
}; |
structs | struct cpu_purr_data {
int initialized; /* thread is running */
u64 tb; /* last TB value read */
u64 purr; /* last PURR value read */
u64 spurr; /* last SPURR value read */
}; |
functions | void calc_cputime_factors(void)
{
struct div_result res;
div128_by_32(HZ, 0, tb_ticks_per_sec, &res);
__cputime_jiffies_factor = res.result_low;
div128_by_32(1000, 0, tb_ticks_per_sec, &res);
__cputime_msec_factor = res.result_low;
div128_by_32(1, 0, tb_ticks_per_sec, &res);
__cputime_sec_factor = res.result_lo... |
functions | u64 read_purr(void)
{
if (cpu_has_feature(CPU_FTR_PURR))
return mfspr(SPRN_PURR);
return mftb();
} |
functions | u64 read_spurr(u64 purr)
{
/*
* cpus without PURR won't have a SPURR
* We already know the former when we use this, so tell gcc
*/
if (cpu_has_feature(CPU_FTR_PURR) && cpu_has_feature(CPU_FTR_SPURR))
return mfspr(SPRN_SPURR);
return purr;
} |
functions | void account_system_vtime(struct task_struct *tsk)
{
u64 now, nowscaled, delta, deltascaled, sys_time;
unsigned long flags;
local_irq_save(flags);
now = read_purr();
nowscaled = read_spurr(now);
delta = now - get_paca()->startpurr;
deltascaled = nowscaled - get_paca()->startspurr;
get_paca()->startpurr = now;
... |
functions | void account_process_tick(struct task_struct *tsk, int user_tick)
{
cputime_t utime, utimescaled;
utime = get_paca()->user_time;
get_paca()->user_time = 0;
utimescaled = cputime_to_scaled(utime);
account_user_time(tsk, utime, utimescaled);
} |
functions | void snapshot_tb_and_purr(void *data)
{
unsigned long flags;
struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
local_irq_save(flags);
p->tb = get_tb_or_rtc();
p->purr = mfspr(SPRN_PURR);
wmb();
p->initialized = 1;
local_irq_restore(flags);
} |
functions | void snapshot_timebases(void)
{
if (!cpu_has_feature(CPU_FTR_PURR))
return;
on_each_cpu(snapshot_tb_and_purr, NULL, 1);
} |
functions | void calculate_steal_time(void)
{
u64 tb, purr;
s64 stolen;
struct cpu_purr_data *pme;
pme = &__get_cpu_var(cpu_purr_data);
if (!pme->initialized)
return; /* !CPU_FTR_PURR or early in early boot */
tb = mftb();
purr = mfspr(SPRN_PURR);
stolen = (tb - pme->tb) - (purr - pme->purr);
if (stolen > 0) {
if (i... |
functions | void snapshot_purr(void)
{
struct cpu_purr_data *pme;
unsigned long flags;
if (!cpu_has_feature(CPU_FTR_PURR))
return;
local_irq_save(flags);
pme = &__get_cpu_var(cpu_purr_data);
pme->tb = mftb();
pme->purr = mfspr(SPRN_PURR);
pme->initialized = 1;
local_irq_restore(flags);
} |
functions | void snapshot_timebase(void)
{
__get_cpu_var(last_jiffy) = get_tb_or_rtc();
snapshot_purr();
} |
functions | void __delay(unsigned long loops)
{
unsigned long start;
int diff;
if (__USE_RTC()) {
start = get_rtcl();
do {
/* the RTCL register wraps at 1000000000 */
diff = get_rtcl() - start;
if (diff < 0)
diff += 1000000000;
} |
functions | void udelay(unsigned long usecs)
{
__delay(tb_ticks_per_usec * usecs);
} |
functions | void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
u64 new_tb_to_xs)
{
/*
* tb_update_count is used to allow the userspace gettimeofday code
* to assure itself that it sees a consistent view of the tb_to_xs and
* stamp_xsec variables. It reads the tb_update_count, then reads
* tb_to_xs and stamp... |
functions | long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
if (in_lock_functions(pc))
return regs->link;
return pc;
} |
functions | __init iSeries_tb_recal(void)
{
struct div_result divres;
unsigned long titan, tb;
/* Make sure we only run on iSeries */
if (!firmware_has_feature(FW_FEATURE_ISERIES))
return -ENODEV;
tb = get_tb();
titan = HvCallXm_loadTod();
if ( iSeries_recal_titan ) {
unsigned long tb_ticks = tb - iSeries_recal_tb;
... |
functions | __init iSeries_time_init_early(void)
{
iSeries_recal_tb = get_tb();
iSeries_recal_titan = HvCallXm_loadTod();
} |
functions | long test_perf_event_pending(void)
{
unsigned long x;
asm volatile("lbz %0,%1(13)"
: "=r" (x)
: "i" (offsetof(struct paca_struct, perf_event_pending)));
return x;
} |
functions | void set_perf_event_pending_flag(void)
{
asm volatile("stb %0,%1(13)" : :
"r" (1),
"i" (offsetof(struct paca_struct, perf_event_pending)));
} |
functions | void clear_perf_event_pending(void)
{
asm volatile("stb %0,%1(13)" : :
"r" (0),
"i" (offsetof(struct paca_struct, perf_event_pending)));
} |
functions | void set_perf_event_pending(void)
{
preempt_disable();
set_perf_event_pending_flag();
set_dec(1);
preempt_enable();
} |
functions | void timer_interrupt(struct pt_regs * regs)
{
struct pt_regs *old_regs;
struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
struct clock_event_device *evt = &decrementer->event;
u64 now;
trace_timer_interrupt_entry(regs);
/* Ensure a positive value is written to the decrementer, or else
* s... |
functions | void wakeup_decrementer(void)
{
unsigned long ticks;
/*
* The timebase gets saved on sleep and restored on wakeup,
* so all we need to do is to reset the decrementer.
*/
ticks = tb_ticks_since(__get_cpu_var(last_jiffy));
if (ticks < tb_ticks_per_jiffy)
ticks = tb_ticks_per_jiffy - ticks;
else
ticks = 1;... |
functions | void generic_suspend_disable_irqs(void)
{
preempt_disable();
/* Disable the decrementer, so that it doesn't interfere
* with suspending.
*/
set_dec(0x7fffffff);
local_irq_disable();
set_dec(0x7fffffff);
} |
functions | void generic_suspend_enable_irqs(void)
{
wakeup_decrementer();
local_irq_enable();
preempt_enable();
} |
functions | void arch_suspend_disable_irqs(void)
{
if (ppc_md.suspend_disable_irqs)
ppc_md.suspend_disable_irqs();
generic_suspend_disable_irqs();
} |
functions | void arch_suspend_enable_irqs(void)
{
generic_suspend_enable_irqs();
if (ppc_md.suspend_enable_irqs)
ppc_md.suspend_enable_irqs();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.