text
stringlengths
213
7.14k
idx
int64
16
12.5k
--- initial +++ final @@ -1,79 +1,79 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { struct virtio_gpu_fbdev *vfbdev = container_of(helper, struct virtio_gpu_fbdev, helper); struct drm_device *dev = helper->dev; struct virtio_gpu_device *vgdev = dev-...
8,672
--- initial +++ final @@ -1,53 +1,53 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) { struct vmw_legacy_display *lds = dev_priv->ldu_priv; struct vmw_legacy_display_unit *entry; struct vmw_display_unit *du = NULL; struct drm_framebuffer *fb = NULL; struct drm_crtc *crtc = NULL; int i...
8,673
--- initial +++ final @@ -1,7 +1,7 @@ static u32 flow_get_nfct(const struct sk_buff *skb) { #if IS_ENABLED(CONFIG_NF_CONNTRACK) - return addr_fold(skb->nfct); + return addr_fold(skb_nfct(skb)); #else return 0; #endif }<sep>@@ struct sk_buff *skb; expression e; statement S1, S2; @@ ( skb->nfct = e | - ...
8,674
--- initial +++ final @@ -1,60 +1,60 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key, const struct ovs_conntrack_info *info, struct sk_buff *skb) { /* If we are recirculating packets to match on conntrack fields and * committing with a separate conntrack action, then we don't need to ...
8,675
--- initial +++ final @@ -1,27 +1,27 @@ static int ovs_ct_lookup(struct net *net, struct sw_flow_key *key, const struct ovs_conntrack_info *info, struct sk_buff *skb) { struct nf_conntrack_expect *exp; /* If we pass an expected packet through nf_conntrack_in() the * expectation is typically removed, but the ...
8,676
--- initial +++ final @@ -1,25 +1,25 @@ static void synproxy_send_client_ack(struct net *net, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) { struct sk_buff *nskb; struct ipv6hdr *iph, *niph; struct tcphdr *nth; unsigned int tcp_hdr_size; iph = ipv6_hdr(skb); ...
8,677
--- initial +++ final @@ -1,27 +1,27 @@ static void synproxy_send_client_synack(struct net *net, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) { struct sk_buff *nskb; struct ipv6hdr *iph, *niph; struct tcphdr *nth; unsigned int tcp_hdr_size; u16 mss = opts->mss...
8,678
--- initial +++ final @@ -1,25 +1,25 @@ static void synproxy_send_client_ack(struct net *net, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) { struct sk_buff *nskb; struct iphdr *iph, *niph; struct tcphdr *nth; unsigned int tcp_hdr_size; iph = ip_hdr(skb); tc...
8,679
--- initial +++ final @@ -1,27 +1,27 @@ static void synproxy_send_client_synack(struct net *net, const struct sk_buff *skb, const struct tcphdr *th, const struct synproxy_options *opts) { struct sk_buff *nskb; struct iphdr *iph, *niph; struct tcphdr *nth; unsigned int tcp_hdr_size; u16 mss = opts->mss; ...
8,680
--- initial +++ final @@ -1,34 +1,34 @@ static int icmp_error_message(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb, unsigned int hooknum) { struct nf_conntrack_tuple innertuple, origtuple; const struct nf_conntrack_l4proto *innerproto; const struct nf_conntrack_tuple_hash *h; const struct nf_...
8,681
--- initial +++ final @@ -1,24 +1,24 @@ static int icmpv6_error(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb, unsigned int dataoff, u8 pf, unsigned int hooknum) { const struct icmp6hdr *icmp6h; struct icmp6hdr _ih; int type; icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); if ...
8,682
--- initial +++ final @@ -1,33 +1,33 @@ static int icmpv6_error_message(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb, unsigned int icmp6off, unsigned int hooknum) { struct nf_conntrack_tuple intuple, origtuple; const struct nf_conntrack_tuple_hash *h; const struct nf_conntrack_l4proto *inproto; ...
8,683
--- initial +++ final @@ -1,17 +1,17 @@ static unsigned int ipv4_conntrack_defrag(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { struct sock *sk = skb->sk; if (sk && sk_fullsock(sk) && (sk->sk_family == PF_INET) && inet_sk(sk)->nodefrag) return NF_ACCEPT; #if IS_ENABLED(CONFIG_NF_CONNTRAC...
8,684
--- initial +++ final @@ -1,15 +1,15 @@ static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum, struct sk_buff *skb) { u16 zone_id = NF_CT_DEFAULT_ZONE_ID; #if IS_ENABLED(CONFIG_NF_CONNTRACK) - if (skb->nfct) { + if (skb_nfct(skb)) { enum ip_conntrack_info ctinfo; const struct nf_conn *ct =...
8,685
--- initial +++ final @@ -1,11 +1,11 @@ static unsigned int ipv6_defrag(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { int err; #if IS_ENABLED(CONFIG_NF_CONNTRACK) /* Previously seen (loopback)? */ - if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct)) return NF_ACCEPT; + i...
8,686
--- initial +++ final @@ -1,15 +1,15 @@ static enum ip6_defrag_users nf_ct6_defrag_user(unsigned int hooknum, struct sk_buff *skb) { u16 zone_id = NF_CT_DEFAULT_ZONE_ID; #if IS_ENABLED(CONFIG_NF_CONNTRACK) - if (skb->nfct) { + if (skb_nfct(skb)) { enum ip_conntrack_info ctinfo; const struct nf_conn *ct...
8,687
--- initial +++ final @@ -1,37 +1,37 @@ void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum, const struct in_addr *gw, int oif) { struct iphdr *iph; if (this_cpu_read(nf_skb_duplicated)) return; /* * Copy the skb, and route the copy. Will later return %XT_CONTINUE for * the ori...
8,688
--- initial +++ final @@ -1,27 +1,27 @@ static void mangle_contents(struct sk_buff *skb, unsigned int dataoff, unsigned int match_offset, unsigned int match_len, const char *rep_buffer, unsigned int rep_len) { unsigned char *data; BUG_ON(skb_is_nonlinear(skb)); data = skb_network_header(skb) + dataoff; /* ...
8,689
--- initial +++ final @@ -1,16 +1,16 @@ static void skb_release_head_state(struct sk_buff *skb) { skb_dst_drop(skb); #ifdef CONFIG_XFRM secpath_put(skb->sp); #endif if (skb->destructor) { WARN_ON(in_irq()); skb->destructor(skb); } #if IS_ENABLED(CONFIG_NF_CONNTRACK) - nf_conntrack_put(skb->nf...
8,690
--- initial +++ final @@ -1,9 +1,9 @@ void nf_ct_attach(struct sk_buff *new, const struct sk_buff *skb) { void (*attach)(struct sk_buff *, const struct sk_buff *); - if (skb->nfct) { + if (skb_nfct(skb)) { rcu_read_lock(); attach = rcu_dereference(ip_ct_attach); if (attach) attach(new, skb); r...
8,691
--- initial +++ final @@ -1,83 +1,83 @@ unsigned int nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum, struct sk_buff *skb) { struct nf_conn *ct, *tmpl; enum ip_conntrack_info ctinfo; struct nf_conntrack_l3proto *l3proto; struct nf_conntrack_l4proto *l4proto; unsigned int *timeouts; ...
8,692
--- initial +++ final @@ -1,21 +1,21 @@ void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum, const struct in6_addr *gw, int oif) { if (this_cpu_read(nf_skb_duplicated)) return; skb = pskb_copy(skb, GFP_ATOMIC); if (skb == NULL) return; #if IS_ENABLED(CONFIG_NF_CONNTRACK) nf_reset(s...
8,693
--- initial +++ final @@ -1,7 +1,7 @@ static unsigned int notrack_tg(struct sk_buff *skb, const struct xt_action_param *par) { /* Previously seen (loopback)? Ignore. */ - if (skb->nfct != NULL) return XT_CONTINUE; + if (skb_nfct(skb) != NULL) return XT_CONTINUE; nf_ct_set(skb, nf_ct_untracked_get(), IP_CT_NEW)...
8,694
--- initial +++ final @@ -1,9 +1,9 @@ static inline int xt_ct_target(struct sk_buff *skb, struct nf_conn *ct) { /* Previously seen (loopback)? Ignore. */ - if (skb->nfct != NULL) return XT_CONTINUE; + if (skb_nfct(skb) != NULL) return XT_CONTINUE; /* special case the untracked ct : we want the percpu object */...
8,695
--- initial +++ final @@ -1,45 +1,45 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, struct ieee80211_sta_ht_cap *ht_cap) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); ht_cap->ht_supported = true; ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE8021...
8,821
--- initial +++ final @@ -1,99 +1,99 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_hal *rtlhal = rtl_hal(rtlpriv); struct rtl_mac *rtlmac = rtl_mac(rtl_priv(hw)); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); struct ieee80211_sup...
8,822
--- initial +++ final @@ -1,86 +1,86 @@ static bool _rtl92s_firmware_checkready(struct ieee80211_hw *hw, u8 loadfw_status) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rt_firmware *firmware = (struct rt_firmware *)rtlhal->pfirmware; u32 tmpu4b; u8 cpu...
8,823
--- initial +++ final @@ -1,11 +1,11 @@ static u8 _rtl92s_firmware_header_map_rftype(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); switch (rtlphy->rf_type) { case RF_1T1R: return 0x11; case RF_1T2R: return 0x12; case RF_2T2R: return 0x22...
8,824
--- initial +++ final @@ -1,42 +1,42 @@ static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); bool rtstatus = true; /* 1. Read PHY_REG.TXT BB INIT!! */...
8,826
--- initial +++ final @@ -1,25 +1,25 @@ bool rtl92s_phy_bb_config(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); bool rtstatus = true; u8 pathmap, index, rf_num = 0; u8 path1, path2; _rtl92s_phy_init_register_definition(hw); /* Config ...
8,827
--- initial +++ final @@ -1,28 +1,28 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); enum version_8192d chipver = rtlpriv->rtlhal.version; u8 cutvalue[2]; u16 chipvalue; rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_H, &...
8,828
--- initial +++ final @@ -1,21 +1,21 @@ static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw, bool wmm_enable, u8 queue_sel) { u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ; struct rtl_priv *rtlpriv = rtl_priv(hw); if (!wmm_enable) { /* typical setting */ beQ = QUEUE_LOW; bkQ = QUEUE_LO...
8,829
--- initial +++ final @@ -1,26 +1,26 @@ static void _rtl92cu_init_chipT_queue_priority(struct ieee80211_hw *hw, bool wmm_enable, u8 out_ep_num, u8 queue_sel) { u8 hq_sele = 0; struct rtl_priv *rtlpriv = rtl_priv(hw); switch (out_ep_num) { case 2: /* (TX_SELE_HQ|TX_SELE_LQ) */ if (!wmm_enabl...
8,830
--- initial +++ final @@ -1,66 +1,66 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); int status = 0; u16 value16; u8 value8; /* polling autoload done. */ u32 pollingCount = 0; do { if (rtl_read_byte(rtlpriv, REG_APS_FSMCO) & PFM_ALDN) ...
8,831
--- initial +++ final @@ -1,43 +1,43 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); enum version_8192c version = VERSION_UNKNOWN; u32 value32; const char *versionid; value32 = rtl_re...
8,832
--- initial +++ final @@ -1,38 +1,38 @@ void smp_callin(void) { int cpuid = hard_smp_processor_id(); if (cpu_online(cpuid)) { printk("??, cpu 0x%x already present??\n", cpuid); BUG(); } set_cpu_online(cpuid, true); /* Turn on machine checks. */ wrmces(7); /* Set trap vectors. */ tra...
8,833
--- initial +++ final @@ -1,19 +1,19 @@ void start_kernel_secondary(void) { struct mm_struct *mm = &init_mm; unsigned int cpu = smp_processor_id(); /* MMU, Caches, Vector Table, Interrupts etc */ setup_processor(); atomic_inc(&mm->mm_users); - atomic_inc(&mm->mm_count); + mmgrab(mm); current->activ...
8,834
--- initial +++ final @@ -1,50 +1,50 @@ asmlinkage void secondary_start_kernel(void) { struct mm_struct *mm = &init_mm; unsigned int cpu; cpu = task_cpu(current); set_my_cpu_offset(per_cpu_offset(cpu)); /* * All kernel threads share the same mm context; grab a * reference and switch to it. *...
8,835
--- initial +++ final @@ -1,45 +1,45 @@ asmlinkage void secondary_start_kernel(void) { struct mm_struct *mm = &init_mm; unsigned int cpu; /* * The identity mapping is uncached (strongly ordered), so * switch away from it before attempting any exclusive accesses. */ cpu_switch_mm(mm->pgd, mm); ...
8,836
--- initial +++ final @@ -1,65 +1,65 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy) { static DEFINE_MUTEX(oom_adj_mutex); struct mm_struct *mm = NULL; struct task_struct *task; int err = 0; task = get_proc_task(file_inode(file)); if (!task) return -ESRCH; mutex_lock(&oom_...
8,837
--- initial +++ final @@ -1,15 +1,15 @@ struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode) { struct task_struct *task = get_proc_task(inode); struct mm_struct *mm = ERR_PTR(-ESRCH); if (task) { mm = mm_access(task, mode | PTRACE_MODE_FSCREDS); put_task_struct(task); if (!IS...
8,838
--- initial +++ final @@ -1,141 +1,141 @@ void __init sched_init(void) { int i, j; unsigned long alloc_size = 0, ptr; sched_clock_init(); for (i = 0; i < WAIT_TABLE_SIZE; i++) init_waitqueue_head(bit_wait_table + i); #ifdef CONFIG_FAIR_GROUP_SCHED alloc_size += 2 * nr_cpu_ids * sizeof(void **); #...
8,839
--- initial +++ final @@ -1,47 +1,47 @@ static void exit_mm(void) { struct mm_struct *mm = current->mm; struct core_state *core_state; mm_release(current, mm); if (!mm) return; sync_mm_rss(mm); /* * Serialize with any possible pending coredump. * We must hold mmap_sem around checking core_sta...
8,840
--- initial +++ final @@ -1,20 +1,20 @@ static int hfi1_file_open(struct inode *inode, struct file *fp) { struct hfi1_filedata *fd; struct hfi1_devdata *dd = container_of(inode->i_cdev, struct hfi1_devdata, user_cdev); if (!atomic_inc_not_zero(&dd->user_refcount)) return -ENXIO; /* Just take a ref now. Not...
8,841
--- initial +++ final @@ -1,9 +1,9 @@ static inline void futex_get_mm(union futex_key *key) { - atomic_inc(&key->private.mm->mm_count); + mmgrab(key->private.mm); /* * Ensure futex_get_mm() implies a full barrier such that * get_futex_key() implies a full barrier. This is relied upon * as smp_mb(); (B...
8,842
--- initial +++ final @@ -1,20 +1,20 @@ void start_secondary(void) { unsigned int cpu; unsigned long thread_ptr; /* Calculate thread_info pointer from stack pointer */ __asm__ __volatile__("%0 = SP;\n" : "=r"(thread_ptr)); thread_ptr = thread_ptr & ~(THREAD_SIZE - 1); __asm__ __volatile__(QUOTED_TH...
8,843
--- initial +++ final @@ -1,36 +1,36 @@ static int i915_gem_userptr_init__mm_struct(struct drm_i915_gem_object *obj) { struct drm_i915_private *dev_priv = to_i915(obj->base.dev); struct i915_mm_struct *mm; int ret = 0; /* During release of the GEM object we hold the struct_mutex. This * precludes us fr...
8,844
--- initial +++ final @@ -1,113 +1,113 @@ void cpu_init(void) { extern void ia64_mmu_init(void *); static unsigned long max_num_phys_stacked = IA64_NUM_PHYS_STACK_REG; unsigned long num_phys_stacked; pal_vm_info_2_u_t vmi; unsigned int max_ctx; struct cpuinfo_ia64 *cpu_info; void *cpu_data; cpu...
8,845
--- initial +++ final @@ -1,21 +1,21 @@ asmlinkage void start_secondary(void) { unsigned int cpu = smp_processor_id(); struct mm_struct *mm = &init_mm; enable_mmu(); - atomic_inc(&mm->mm_count); + mmgrab(mm); atomic_inc(&mm->mm_users); current->active_mm = mm; #ifdef CONFIG_MMU enter_lazy_tlb(mm, ...
8,846
--- initial +++ final @@ -1,49 +1,49 @@ void per_cpu_trap_init(bool is_boot_cpu) { unsigned int cpu = smp_processor_id(); configure_status(); configure_hwrena(); configure_exception_vector(); /* * Before R2 both interrupt numbers were fixed to 7, so on R2 only: * * o read IntCtl.IPTI to det...
8,847
--- initial +++ final @@ -1,37 +1,37 @@ static void kfd_process_notifier_release(struct mmu_notifier *mn, struct mm_struct *mm) { struct kfd_process *p; struct kfd_process_device *pdd = NULL; /* * The kfd_process structure can not be free because the * mmu_notifier srcu is read locked */ p = co...
8,848
--- initial +++ final @@ -1,24 +1,24 @@ int __khugepaged_enter(struct mm_struct *mm) { struct mm_slot *mm_slot; int wakeup; mm_slot = alloc_mm_slot(); if (!mm_slot) return -ENOMEM; /* __khugepaged_exit() must not run from under us */ VM_BUG_ON_MM(khugepaged_test_exit(mm), mm); if (unlikely(test_an...
8,849
--- initial +++ final @@ -1,29 +1,29 @@ int __ksm_enter(struct mm_struct *mm) { struct mm_slot *mm_slot; int needs_wakeup; mm_slot = alloc_mm_slot(); if (!mm_slot) return -ENOMEM; /* Check ksm_run too? Would need tighter locking */ needs_wakeup = list_empty(&ksm_mm_head.mm_list); spin_lock(&ksm_m...
8,850
--- initial +++ final @@ -1,61 +1,61 @@ static struct kvm *kvm_create_vm(unsigned long type) { int r, i; struct kvm *kvm = kvm_arch_alloc_vm(); if (!kvm) return ERR_PTR(-ENOMEM); spin_lock_init(&kvm->mmu_lock); - atomic_inc(&current->mm->mm_count); + mmgrab(current->mm); kvm->mm = current->mm; kvm_...
8,851
--- initial +++ final @@ -1,18 +1,18 @@ void leon_cpu_pre_online(void *arg) { int cpuid = hard_smp_processor_id(); /* Allow master to continue. The master will then give us the * go-ahead by setting the smp_commenced_mask and will wait without * timeouts until our setup is completed fully (signified by ...
8,852
--- initial +++ final @@ -1,41 +1,41 @@ void secondary_start_kernel(void) { unsigned int cpu = smp_processor_id(); struct mm_struct *mm = &init_mm; if (_bfin_swrst & SWRST_DBL_FAULT_B) { printk(KERN_EMERG "CoreB Recovering from DOUBLE FAULT event\n"); #ifdef CONFIG_DEBUG_DOUBLEFAULT printk(KERN_EME...
8,853
--- initial +++ final @@ -1,48 +1,48 @@ asmlinkage void secondary_start_kernel(void) { struct mm_struct *mm = &init_mm; unsigned int cpu = smp_processor_id(); /* * All kernel threads share the same mm context; grab a * reference and switch to it. */ atomic_inc(&mm->mm_users); - atomic_inc(&mm-...
8,854
--- initial +++ final @@ -1,17 +1,17 @@ void use_mm(struct mm_struct *mm) { struct mm_struct *active_mm; struct task_struct *tsk = current; task_lock(tsk); active_mm = tsk->active_mm; if (active_mm != mm) { - atomic_inc(&mm->mm_count); + mmgrab(mm); tsk->active_mm = mm; } tsk->mm = mm; ...
8,855
--- initial +++ final @@ -1,41 +1,41 @@ static int do_mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm, int take_mmap_sem) { struct mmu_notifier_mm *mmu_notifier_mm; int ret; BUG_ON(atomic_read(&mm->mm_users) <= 0); /* * Verify that mmu_notifier_init() already run and the global srcu...
8,856
--- initial +++ final @@ -1,33 +1,33 @@ static void __init smp_cpu_init(void) { unsigned long flags; int cpu_id = smp_processor_id(); u16 tmp16; if (test_and_set_bit(cpu_id, &cpu_initialized)) { printk(KERN_WARNING "CPU#%d already initialized!\n", cpu_id); for (;;) local_irq_enable(); }...
8,857
--- initial +++ final @@ -1,16 +1,16 @@ static void mark_oom_victim(struct task_struct *tsk) { struct mm_struct *mm = tsk->mm; WARN_ON(oom_killer_disabled); /* OOM killer might race with memcg OOM */ if (test_and_set_tsk_thread_flag(tsk, TIF_MEMDIE)) return; /* oom_mm is bound to the signal struct life ...
8,858
--- initial +++ final @@ -1,101 +1,101 @@ static void oom_kill_process(struct oom_control *oc, const char *message) { struct task_struct *p = oc->chosen; unsigned int points = oc->chosen_points; struct task_struct *victim = p; struct task_struct *child; struct task_struct *t; struct mm_struct *mm; ...
8,859
--- initial +++ final @@ -1,24 +1,24 @@ static void __init smp_cpu_init(int cpunum) { extern int init_per_cpu(int); /* arch/parisc/kernel/processor.c */ extern void init_IRQ(void); /* arch/parisc/kernel/irq.c */ extern void start_cpu_itimer(void); /* arch/parisc/kernel/time.c */ /* Set modes ...
8,860
--- initial +++ final @@ -1,39 +1,39 @@ void start_secondary(void *unused) { unsigned int cpu = smp_processor_id(); int i, base; - atomic_inc(&init_mm.mm_count); + mmgrab(&init_mm); current->active_mm = &init_mm; smp_store_cpu_info(cpu); set_dec(tb_ticks_per_jiffy); preempt_disable(); cpu_callin...
8,861
--- initial +++ final @@ -1,9 +1,9 @@ void cpu_init(void) { struct cpuid *id = this_cpu_ptr(&cpu_info.cpu_id); get_cpu_id(id); if (machine_has_cpu_mhz) update_cpu_mhz(NULL); - atomic_inc(&init_mm.mm_count); + mmgrab(&init_mm); current->active_mm = &init_mm; BUG_ON(current->mm); enter_lazy_tlb(&init...
8,862
--- initial +++ final @@ -1,22 +1,22 @@ void __init cpu_init(void) { int cpu_id = smp_processor_id(); if (test_and_set_bit(cpu_id, &cpu_initialized)) { printk(KERN_WARNING "CPU#%d already initialized!\n", cpu_id); for (;;) local_irq_enable(); } printk(KERN_INFO "Initializing CPU#%d\n", cpu...
8,863
--- initial +++ final @@ -1,30 +1,30 @@ void smp_callin(void) { int cpuid = hard_smp_processor_id(); __local_per_cpu_offset = __per_cpu_offset(cpuid); if (tlb_type == hypervisor) sun4v_ktsb_register(); __flush_tlb_all(); setup_sparc64_timer(); if (cheetah_pcache_forced_on) cheetah_enable_pcache(); ...
8,864
--- initial +++ final @@ -1,31 +1,31 @@ void secondary_start_kernel(void) { struct mm_struct *mm = &init_mm; unsigned int cpu = smp_processor_id(); init_mmu(); #ifdef CONFIG_DEBUG_KERNEL if (boot_secondary_processors == 0) { pr_debug("%s: boot_secondary_processors:%d; Hanging cpu:%d\n", __func__, boo...
8,865
--- initial +++ final @@ -1,30 +1,30 @@ static void start_secondary(void) { int cpuid; preempt_disable(); cpuid = smp_processor_id(); /* Set our thread pointer appropriately. */ set_my_cpu_offset(__per_cpu_offset[cpuid]); /* * In large machines even this will slow us down, since we * will be ...
8,866
--- initial +++ final @@ -1,31 +1,31 @@ void sun4d_cpu_pre_online(void *arg) { unsigned long flags; int cpuid; cpuid = hard_smp_processor_id(); /* Unblock the master CPU _only_ when the scheduler state * of all secondary CPUs will be up-to-date, so after * the SMP initialization the master will be ...
8,867
--- initial +++ final @@ -1,19 +1,19 @@ void sun4m_cpu_pre_online(void *arg) { int cpuid = hard_smp_processor_id(); /* Allow master to continue. The master will then give us the * go-ahead by setting the smp_commenced_mask and will wait without * timeouts until our setup is completed fully (signified by ...
8,868
--- initial +++ final @@ -1,11 +1,11 @@ void trap_init(void) { extern void thread_info_offsets_are_bolixed_pete(void); /* Force linker to barf if mismatched */ if (TI_UWINMASK != offsetof(struct thread_info, uwinmask) || TI_TASK != offsetof(struct thread_info, task) || TI_FLAGS != offsetof(struct thread_info,...
8,869
--- initial +++ final @@ -1,11 +1,11 @@ void __init trap_init(void) { /* Compile time sanity check. */ BUILD_BUG_ON(TI_TASK != offsetof(struct thread_info, task) || TI_FLAGS != offsetof(struct thread_info, flags) || TI_CPU != offsetof(struct thread_info, cpu) || TI_FPSAVED != offsetof(struct thread_info, fpsaved...
8,870
--- initial +++ final @@ -1,35 +1,35 @@ void __init trap_init(void) { int i; pgd_current = (unsigned long)init_mm.pgd; /* DEBUG EXCEPTION */ memcpy((void *)DEBUG_VECTOR_BASE_ADDR, &debug_exception_vector, DEBUG_VECTOR_SIZE); /* NMI EXCEPTION */ memcpy((void *)GENERAL_VECTOR_BASE_ADDR, &general_except...
8,871
--- initial +++ final @@ -1,36 +1,36 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs) { struct userfaultfd_ctx *ctx = NULL, *octx; struct userfaultfd_fork_ctx *fctx; octx = vma->vm_userfaultfd_ctx.ctx; if (!octx || !(octx->features & UFFD_FEATURE_EVENT_FORK)) { vma->vm_userfau...
8,872
--- initial +++ final @@ -1,28 +1,28 @@ static struct file *userfaultfd_file_create(int flags) { struct file *file; struct userfaultfd_ctx *ctx; BUG_ON(!current->mm); /* Check the UFFD_* constants for consistency. */ BUILD_BUG_ON(UFFD_CLOEXEC != O_CLOEXEC); BUILD_BUG_ON(UFFD_NONBLOCK != O_NONBLOCK);...
8,873
--- initial +++ final @@ -1,20 +1,18 @@ int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np) { struct drm_encoder *encoder; struct drm_bridge *bridge; int ret = 0; encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL); if (encoder == NULL) return -ENOMEM; /* Locate drm br...
8,958
--- initial +++ final @@ -1,31 +1,29 @@ static int imx_pd_register(struct drm_device *drm, struct imx_parallel_display *imxpd) { struct drm_encoder *encoder = &imxpd->encoder; int ret; ret = imx_drm_encoder_parse_of(drm, encoder, imxpd->dev->of_node); if (ret) return ret; /* set the connector's dpms to ...
8,959
--- initial +++ final @@ -1,26 +1,26 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev) { struct amdgpu_fbdev *rfbdev; int bpp_sel = 32; int ret; /* don't init fbdev on hw without DCE */ if (!adev->mode_info.mode_config_initialized) return 0; /* don't init fbdev if there are no connectors */ if ...
8,960
--- initial +++ final @@ -1,42 +1,42 @@ static int arcpgu_load(struct drm_device *drm) { struct platform_device *pdev = to_platform_device(drm->dev); struct arcpgu_drm_private *arcpgu; struct device_node *encoder_node; struct resource *res; int ret; arcpgu = devm_kzalloc(&pdev->dev, sizeof(*arcpgu), ...
8,961
--- initial +++ final @@ -1,31 +1,31 @@ int armada_fbdev_init(struct drm_device *dev) { struct armada_private *priv = dev->dev_private; struct drm_fb_helper *fbh; int ret; fbh = devm_kzalloc(dev->dev, sizeof(*fbh), GFP_KERNEL); if (!fbh) return -ENOMEM; priv->fbdev = fbh; drm_fb_helper_prepare(dev...
8,962
--- initial +++ final @@ -1,24 +1,24 @@ int ast_fbdev_init(struct drm_device *dev) { struct ast_private *ast = dev->dev_private; struct ast_fbdev *afbdev; int ret; afbdev = kzalloc(sizeof(struct ast_fbdev), GFP_KERNEL); if (!afbdev) return -ENOMEM; ast->fbdev = afbdev; spin_lock_init(&afbdev->dirt...
8,963
--- initial +++ final @@ -1,58 +1,58 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) { struct platform_device *pdev = to_platform_device(dev->dev); const struct of_device_id *match; struct atmel_hlcdc_dc *dc; int ret; match = of_match_node(atmel_hlcdc_of_match, dev->dev->parent->of_node); i...
8,964
--- initial +++ final @@ -1,16 +1,16 @@ int bochs_fbdev_init(struct bochs_device *bochs) { int ret; drm_fb_helper_prepare(bochs->dev, &bochs->fb.helper, &bochs_fb_helper_funcs); - ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper, 1, 1); + ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper, 1); if ...
8,965
--- initial +++ final @@ -1,18 +1,18 @@ int cirrus_fbdev_init(struct cirrus_device *cdev) { struct cirrus_fbdev *gfbdev; int ret; int bpp_sel = 24; /*bpp_sel = 8;*/ gfbdev = kzalloc(sizeof(struct cirrus_fbdev), GFP_KERNEL); if (!gfbdev) return -ENOMEM; cdev->mode_info.gfbdev = gfbdev; spin_lock...
8,966
--- initial +++ final @@ -1,3 +1,3 @@ struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_conn_count) { - return drm_fbdev_cma_init_with_funcs(dev, preferred_bpp, num_crtc, max_conn_count, &drm_fb_cma_funcs); + return drm_fbdev_cma_init...
8,967
--- initial +++ final @@ -1,34 +1,34 @@ struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_conn_count, const struct drm_framebuffer_funcs *funcs) { struct drm_fbdev_cma *fbdev_cma; struct drm_fb_helper *helper; int re...
8,968
--- initial +++ final @@ -1,38 +1,36 @@ int exynos_drm_fbdev_init(struct drm_device *dev) { struct exynos_drm_fbdev *fbdev; struct exynos_drm_private *private = dev->dev_private; struct drm_fb_helper *helper; - unsigned int num_crtc; int ret; if (!dev->mode_config.num_crtc || !dev->mode_config.num_conn...
8,969
--- initial +++ final @@ -1,23 +1,23 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_connectors) { struct drm_device *drm = fbdev->base.dev; int err; - err = drm_fb_helper_init(drm, &fbdev->base, num_crtc, max_connectors); + err = dr...
8,970
--- initial +++ final @@ -1,26 +1,26 @@ int psb_fbdev_init(struct drm_device *dev) { struct psb_fbdev *fbdev; struct drm_psb_private *dev_priv = dev->dev_private; int ret; fbdev = kzalloc(sizeof(struct psb_fbdev), GFP_KERNEL); if (!fbdev) { dev_err(dev->dev, "no memory\n"); return -ENOMEM; ...
8,971
--- initial +++ final @@ -1,36 +1,36 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) { struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; int ret; ret = fsl_dcu_drm_modeset_init(fsl_dev); if (ret < 0) { dev_err(dev->dev, "failed to initialize mode setting\n"); return r...
8,972
--- initial +++ final @@ -1,58 +1,58 @@ static int hdlcd_drm_bind(struct device *dev) { struct drm_device *drm; struct hdlcd_drm_private *hdlcd; int ret; hdlcd = devm_kzalloc(dev, sizeof(*hdlcd), GFP_KERNEL); if (!hdlcd) return -ENOMEM; drm = drm_dev_alloc(&hdlcd_driver, dev); if (IS_ERR(drm)) ret...
8,973
--- initial +++ final @@ -1,59 +1,59 @@ int hibmc_fbdev_init(struct hibmc_drm_private *priv) { int ret; struct fb_var_screeninfo *var; struct fb_fix_screeninfo *fix; struct hibmc_fbdev *hifbdev; hifbdev = devm_kzalloc(priv->dev->dev, sizeof(*hifbdev), GFP_KERNEL); if (!hifbdev) { DRM_ERROR("fail...
8,974
--- initial +++ final @@ -1,78 +1,78 @@ static int imx_drm_bind(struct device *dev) { struct drm_device *drm; struct imx_drm_device *imxdrm; int ret; drm = drm_dev_alloc(&imx_drm_driver, dev); if (IS_ERR(drm)) return PTR_ERR(drm); imxdrm = devm_kzalloc(dev, sizeof(*imxdrm), GFP_KERNEL); if (!imxdr...
8,975
--- initial +++ final @@ -1,19 +1,19 @@ int intel_fbdev_init(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); struct intel_fbdev *ifbdev; int ret; if (WARN_ON(INTEL_INFO(dev_priv)->num_pipes == 0)) return -ENODEV; ifbdev = kzalloc(sizeof(struct intel_fbdev), GFP_KERNEL); if...
8,976
--- initial +++ final @@ -1,9 +1,9 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev) { struct kirin_drm_private *priv = dev->dev_private; if (priv->fbdev) { drm_fbdev_cma_hotplug_event(priv->fbdev); } else { - priv->fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc, de...
8,977
--- initial +++ final @@ -1,143 +1,143 @@ static int malidp_bind(struct device *dev) { struct resource *res; struct drm_device *drm; struct device_node *ep; struct malidp_drm *malidp; struct malidp_hw_device *hwdev; struct platform_device *pdev = to_platform_device(dev); struct of_device_id const ...
8,978
--- initial +++ final @@ -1,78 +1,78 @@ static int meson_drv_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct meson_drm *priv; struct drm_device *drm; struct resource *res; void __iomem *regs; int ret; /* Checks if an output connector is available */ if (!meson_vpu_...
8,979
--- initial +++ final @@ -1,26 +1,26 @@ int mgag200_fbdev_init(struct mga_device *mdev) { struct mga_fbdev *mfbdev; int ret; int bpp_sel = 32; /* prefer 16bpp on low end gpus with limited VRAM */ if (IS_G200_SE(mdev) && mdev->mc.vram_size < (2048 * 1024)) bpp_sel = 16; mfbdev = devm_kzalloc(mdev->dev...
8,980
--- initial +++ final @@ -1,26 +1,26 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev) { struct msm_drm_private *priv = dev->dev_private; struct msm_fbdev *fbdev = NULL; struct drm_fb_helper *helper; int ret; fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); if (!fbdev) goto fail; helper ...
8,981