···129129 if (!stack) {130130 if (regs)131131 stack = (unsigned long *)regs->sp;132132- else if (task && task != current)132132+ else if (task != current)133133 stack = (unsigned long *)task->thread.sp;134134 else135135 stack = &dummy;···269269 unsigned char c;270270 u8 *ip;271271272272- printk(KERN_EMERG "Stack:\n");272272+ printk(KERN_DEFAULT "Stack:\n");273273 show_stack_log_lvl(NULL, regs, (unsigned long *)sp,274274- 0, KERN_EMERG);274274+ 0, KERN_DEFAULT);275275276276- printk(KERN_EMERG "Code: ");276276+ printk(KERN_DEFAULT "Code: ");277277278278 ip = (u8 *)regs->ip - code_prologue;279279 if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) {
+26-10
arch/x86/kernel/reboot.c
···3939enum reboot_type reboot_type = BOOT_ACPI;4040int reboot_force;41414242+/* This variable is used privately to keep track of whether or not4343+ * reboot_type is still set to its default value (i.e., reboot= hasn't4444+ * been set on the command line). This is needed so that we can4545+ * suppress DMI scanning for reboot quirks. Without it, it's4646+ * impossible to override a faulty reboot quirk without recompiling.4747+ */4848+static int reboot_default = 1;4949+4250#if defined(CONFIG_X86_32) && defined(CONFIG_SMP)4351static int reboot_cpu = -1;4452#endif···7567static int __init reboot_setup(char *str)7668{7769 for (;;) {7070+ /* Having anything passed on the command line via7171+ * reboot= will cause us to disable DMI checking7272+ * below.7373+ */7474+ reboot_default = 0;7575+7876 switch (*str) {7977 case 'w':8078 reboot_mode = 0x1234;···309295 DMI_MATCH(DMI_BOARD_NAME, "P4S800"),310296 },311297 },312312- { /* Handle problems with rebooting on VersaLogic Menlow boards */313313- .callback = set_bios_reboot,314314- .ident = "VersaLogic Menlow based board",315315- .matches = {316316- DMI_MATCH(DMI_BOARD_VENDOR, "VersaLogic Corporation"),317317- DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),318318- },319319- },320298 { /* Handle reboot issue on Acer Aspire one */321299 .callback = set_kbd_reboot,322300 .ident = "Acer Aspire One A110",···322316323317static int __init reboot_init(void)324318{325325- dmi_check_system(reboot_dmi_table);319319+ /* Only do the DMI check if reboot_type hasn't been overridden320320+ * on the command line321321+ */322322+ if (reboot_default) {323323+ dmi_check_system(reboot_dmi_table);324324+ }326325 return 0;327326}328327core_initcall(reboot_init);···476465477466static int __init pci_reboot_init(void)478467{479479- dmi_check_system(pci_reboot_dmi_table);468468+ /* Only do the DMI check if reboot_type hasn't been overridden469469+ * on the command line470470+ */471471+ if (reboot_default) {472472+ dmi_check_system(pci_reboot_dmi_table);473473+ }480474 return 0;481475}482476core_initcall(pci_reboot_init);
+2-2
arch/x86/mm/fault.c
···673673674674 stackend = end_of_stack(tsk);675675 if (tsk != &init_task && *stackend != STACK_END_MAGIC)676676- printk(KERN_ALERT "Thread overran stack, or stack corrupted\n");676676+ printk(KERN_EMERG "Thread overran stack, or stack corrupted\n");677677678678 tsk->thread.cr2 = address;679679 tsk->thread.trap_no = 14;···684684 sig = 0;685685686686 /* Executive summary in case the body of the oops scrolled away */687687- printk(KERN_EMERG "CR2: %016lx\n", address);687687+ printk(KERN_DEFAULT "CR2: %016lx\n", address);688688689689 oops_end(flags, regs, sig);690690}
···219219 if (ret)220220 return ret;221221222222+ /* power on internal panel if it's not already. the init tables of223223+ * some vbios default this to off for some reason, causing the224224+ * panel to not work after resume225225+ */226226+ if (nouveau_gpio_func_get(dev, DCB_GPIO_PANEL_POWER) == 0) {227227+ nouveau_gpio_func_set(dev, DCB_GPIO_PANEL_POWER, true);228228+ msleep(300);229229+ }230230+231231+ /* enable polling for external displays */222232 drm_kms_helper_poll_enable(dev);223233224234 /* enable hotplug interrupts */
+1-1
drivers/gpu/drm/nouveau/nouveau_drv.c
···124124int nouveau_ctxfw;125125module_param_named(ctxfw, nouveau_ctxfw, int, 0400);126126127127-MODULE_PARM_DESC(ctxfw, "Santise DCB table according to MXM-SIS\n");127127+MODULE_PARM_DESC(mxmdcb, "Santise DCB table according to MXM-SIS\n");128128int nouveau_mxmdcb = 1;129129module_param_named(mxmdcb, nouveau_mxmdcb, int, 0400);130130
+21-2
drivers/gpu/drm/nouveau/nouveau_gem.c
···380380}381381382382static int383383+validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo)384384+{385385+ struct nouveau_fence *fence = NULL;386386+ int ret = 0;387387+388388+ spin_lock(&nvbo->bo.bdev->fence_lock);389389+ if (nvbo->bo.sync_obj)390390+ fence = nouveau_fence_ref(nvbo->bo.sync_obj);391391+ spin_unlock(&nvbo->bo.bdev->fence_lock);392392+393393+ if (fence) {394394+ ret = nouveau_fence_sync(fence, chan);395395+ nouveau_fence_unref(&fence);396396+ }397397+398398+ return ret;399399+}400400+401401+static int383402validate_list(struct nouveau_channel *chan, struct list_head *list,384403 struct drm_nouveau_gem_pushbuf_bo *pbbo, uint64_t user_pbbo_ptr)385404{···412393 list_for_each_entry(nvbo, list, entry) {413394 struct drm_nouveau_gem_pushbuf_bo *b = &pbbo[nvbo->pbbo_index];414395415415- ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan);396396+ ret = validate_sync(chan, nvbo);416397 if (unlikely(ret)) {417398 NV_ERROR(dev, "fail pre-validate sync\n");418399 return ret;···435416 return ret;436417 }437418438438- ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan);419419+ ret = validate_sync(chan, nvbo);439420 if (unlikely(ret)) {440421 NV_ERROR(dev, "fail post-validate sync\n");441422 return ret;
+9
drivers/gpu/drm/nouveau/nouveau_mxm.c
···656656657657 if (mxm_shadow(dev, mxm[0])) {658658 MXM_MSG(dev, "failed to locate valid SIS\n");659659+#if 0660660+ /* we should, perhaps, fall back to some kind of limited661661+ * mode here if the x86 vbios hasn't already done the662662+ * work for us (so we prevent loading with completely663663+ * whacked vbios tables).664664+ */659665 return -EINVAL;666666+#else667667+ return 0;668668+#endif660669 }661670662671 MXM_MSG(dev, "MXMS Version %d.%d\n",
+2-2
drivers/gpu/drm/nouveau/nv50_pm.c
···495495 struct drm_nouveau_private *dev_priv = dev->dev_private;496496 struct nv50_pm_state *info;497497 struct pll_lims pll;498498- int ret = -EINVAL;498498+ int clk, ret = -EINVAL;499499 int N, M, P1, P2;500500- u32 clk, out;500500+ u32 out;501501502502 if (dev_priv->chipset == 0xaa ||503503 dev_priv->chipset == 0xac)
+2-2
drivers/gpu/drm/radeon/atombios_crtc.c
···11841184 WREG32(EVERGREEN_GRPH_ENABLE + radeon_crtc->crtc_offset, 1);1185118511861186 WREG32(EVERGREEN_DESKTOP_HEIGHT + radeon_crtc->crtc_offset,11871187- crtc->mode.vdisplay);11871187+ target_fb->height);11881188 x &= ~3;11891189 y &= ~1;11901190 WREG32(EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset,···13531353 WREG32(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 1);1354135413551355 WREG32(AVIVO_D1MODE_DESKTOP_HEIGHT + radeon_crtc->crtc_offset,13561356- crtc->mode.vdisplay);13561356+ target_fb->height);13571357 x &= ~3;13581358 y &= ~1;13591359 WREG32(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset,
+15-3
drivers/gpu/drm/radeon/atombios_dp.c
···564564 ENCODER_OBJECT_ID_NUTMEG)565565 panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;566566 else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==567567- ENCODER_OBJECT_ID_TRAVIS)568568- panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;569569- else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {567567+ ENCODER_OBJECT_ID_TRAVIS) {568568+ u8 id[6];569569+ int i;570570+ for (i = 0; i < 6; i++)571571+ id[i] = radeon_read_dpcd_reg(radeon_connector, 0x503 + i);572572+ if (id[0] == 0x73 &&573573+ id[1] == 0x69 &&574574+ id[2] == 0x76 &&575575+ id[3] == 0x61 &&576576+ id[4] == 0x72 &&577577+ id[5] == 0x54)578578+ panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;579579+ else580580+ panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;581581+ } else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {570582 u8 tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);571583 if (tmp & 1)572584 panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
+25-10
drivers/gpu/drm/radeon/r600_blit_kms.c
···468468 radeon_ring_write(ring, sq_stack_resource_mgmt_2);469469}470470471471+#define I2F_MAX_BITS 15472472+#define I2F_MAX_INPUT ((1 << I2F_MAX_BITS) - 1)473473+#define I2F_SHIFT (24 - I2F_MAX_BITS)474474+475475+/*476476+ * Converts unsigned integer into 32-bit IEEE floating point representation.477477+ * Conversion is not universal and only works for the range from 0478478+ * to 2^I2F_MAX_BITS-1. Currently we only use it with inputs between479479+ * 0 and 16384 (inclusive), so I2F_MAX_BITS=15 is enough. If necessary,480480+ * I2F_MAX_BITS can be increased, but that will add to the loop iterations481481+ * and slow us down. Conversion is done by shifting the input and counting482482+ * down until the first 1 reaches bit position 23. The resulting counter483483+ * and the shifted input are, respectively, the exponent and the fraction.484484+ * The sign is always zero.485485+ */471486static uint32_t i2f(uint32_t input)472487{473488 u32 result, i, exponent, fraction;474489475475- if ((input & 0x3fff) == 0)476476- result = 0; /* 0 is a special case */490490+ WARN_ON_ONCE(input > I2F_MAX_INPUT);491491+492492+ if ((input & I2F_MAX_INPUT) == 0)493493+ result = 0;477494 else {478478- exponent = 140; /* exponent biased by 127; */479479- fraction = (input & 0x3fff) << 10; /* cheat and only480480- handle numbers below 2^^15 */481481- for (i = 0; i < 14; i++) {495495+ exponent = 126 + I2F_MAX_BITS;496496+ fraction = (input & I2F_MAX_INPUT) << I2F_SHIFT;497497+498498+ for (i = 0; i < I2F_MAX_BITS; i++) {482499 if (fraction & 0x800000)483500 break;484501 else {485485- fraction = fraction << 1; /* keep486486- shifting left until top bit = 1 */502502+ fraction = fraction << 1;487503 exponent = exponent - 1;488504 }489505 }490490- result = exponent << 23 | (fraction & 0x7fffff); /* mask491491- off top bit; assumed 1 */506506+ result = exponent << 23 | (fraction & 0x7fffff);492507 }493508 return result;494509}
···257257 return IB_MAD_RESULT_SUCCESS;258258259259 /*260260- * Don't process SMInfo queries or vendor-specific261261- * MADs -- the SMA can't handle them.260260+ * Don't process SMInfo queries -- the SMA can't handle them.262261 */263263- if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||264264- ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==265265- IB_SMP_ATTR_VENDOR_MASK))262262+ if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO)266263 return IB_MAD_RESULT_SUCCESS;267264 } else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||268265 in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS1 ||
+1-1
drivers/infiniband/hw/nes/nes.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.44 *55 * This software is available to you under a choice of one of two
+1-1
drivers/infiniband/hw/nes/nes.h
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.44 *55 * This software is available to you under a choice of one of two
+7-3
drivers/infiniband/hw/nes/nes_cm.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU···233233 u8 *start_ptr = &start_addr;234234 u8 **start_buff = &start_ptr;235235 u16 buff_len = 0;236236+ struct ietf_mpa_v1 *mpa_frame;236237237238 skb = dev_alloc_skb(MAX_CM_BUFFER);238239 if (!skb) {···243242244243 /* send an MPA reject frame */245244 cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY);245245+ mpa_frame = (struct ietf_mpa_v1 *)*start_buff;246246+ mpa_frame->flags |= IETF_MPA_FLAGS_REJECT;246247 form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN);247248248249 cm_node->state = NES_CM_STATE_FIN_WAIT1;···13631360 if (!memcmp(nesadapter->arp_table[arpindex].mac_addr,13641361 neigh->ha, ETH_ALEN)) {13651362 /* Mac address same as in nes_arp_table */13661366- ip_rt_put(rt);13671367- return rc;13631363+ goto out;13681364 }1369136513701366 nes_manage_arp_cache(nesvnic->netdev,···13791377 neigh_event_send(neigh, NULL);13801378 }13811379 }13801380+13811381+out:13821382 rcu_read_unlock();13831383 ip_rt_put(rt);13841384 return rc;
+1-1
drivers/infiniband/hw/nes/nes_cm.h
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_context.h
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_hw.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_hw.h
···11/*22-* Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+* Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33*44* This software is available to you under a choice of one of two55* licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_mgt.c
···11/*22- * Copyright (c) 2006 - 2009 Intel-NE, Inc. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel-NE, Inc. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_mgt.h
···11/*22-* Copyright (c) 2010 Intel-NE, Inc. All rights reserved.22+* Copyright (c) 2006 - 2011 Intel-NE, Inc. All rights reserved.33*44* This software is available to you under a choice of one of two55* licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_nic.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
drivers/infiniband/hw/nes/nes_user.h
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 * Copyright (c) 2005 Topspin Communications. All rights reserved.44 * Copyright (c) 2005 Cisco Systems. All rights reserved.55 * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
+1-1
drivers/infiniband/hw/nes/nes_utils.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU
+4-2
drivers/infiniband/hw/nes/nes_verbs.c
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 *44 * This software is available to you under a choice of one of two55 * licenses. You may choose to be licensed under the terms of the GNU···34283428 NES_IWARP_SQ_FMR_WQE_LENGTH_LOW_IDX,34293429 ib_wr->wr.fast_reg.length);34303430 set_wqe_32bit_value(wqe->wqe_words,34313431+ NES_IWARP_SQ_FMR_WQE_LENGTH_HIGH_IDX, 0);34323432+ set_wqe_32bit_value(wqe->wqe_words,34313433 NES_IWARP_SQ_FMR_WQE_MR_STAG_IDX,34323434 ib_wr->wr.fast_reg.rkey);34333435 /* Set page size: */···37263724 entry->opcode = IB_WC_SEND;37273725 break;37283726 case NES_IWARP_SQ_OP_LOCINV:37293729- entry->opcode = IB_WR_LOCAL_INV;37273727+ entry->opcode = IB_WC_LOCAL_INV;37303728 break;37313729 case NES_IWARP_SQ_OP_FAST_REG:37323730 entry->opcode = IB_WC_FAST_REG_MR;
+1-1
drivers/infiniband/hw/nes/nes_verbs.h
···11/*22- * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved.22+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.33 * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.44 *55 * This software is available to you under a choice of one of two
+1-1
drivers/infiniband/hw/qib/qib_iba6120.c
···21052105 dd->cspec->dummy_hdrq = dma_alloc_coherent(&dd->pcidev->dev,21062106 dd->rcd[0]->rcvhdrq_size,21072107 &dd->cspec->dummy_hdrq_phys,21082108- GFP_KERNEL | __GFP_COMP);21082108+ GFP_ATOMIC | __GFP_COMP);21092109 if (!dd->cspec->dummy_hdrq) {21102110 qib_devinfo(dd->pcidev, "Couldn't allocate dummy hdrq\n");21112111 /* fallback to just 0'ing */
+1-1
drivers/infiniband/hw/qib/qib_pcie.c
···560560 * BIOS may not set PCIe bus-utilization parameters for best performance.561561 * Check and optionally adjust them to maximize our throughput.562562 */563563-static int qib_pcie_caps = 0x51;563563+static int qib_pcie_caps;564564module_param_named(pcie_caps, qib_pcie_caps, int, S_IRUGO);565565MODULE_PARM_DESC(pcie_caps, "Max PCIe tuning: Payload (0..3), ReadReq (4..7)");566566
···641641 unsigned long ttl;642642 u32 gen;643643644644- spin_lock(&cap->session->s_cap_lock);644644+ spin_lock(&cap->session->s_gen_ttl_lock);645645 gen = cap->session->s_cap_gen;646646 ttl = cap->session->s_cap_ttl;647647- spin_unlock(&cap->session->s_cap_lock);647647+ spin_unlock(&cap->session->s_gen_ttl_lock);648648649649 if (cap->cap_gen < gen || time_after_eq(jiffies, ttl)) {650650 dout("__cap_is_valid %p cap %p issued %s "
+2-2
fs/ceph/dir.c
···975975 di = ceph_dentry(dentry);976976 if (di->lease_session) {977977 s = di->lease_session;978978- spin_lock(&s->s_cap_lock);978978+ spin_lock(&s->s_gen_ttl_lock);979979 gen = s->s_cap_gen;980980 ttl = s->s_cap_ttl;981981- spin_unlock(&s->s_cap_lock);981981+ spin_unlock(&s->s_gen_ttl_lock);982982983983 if (di->lease_gen == gen &&984984 time_before(jiffies, dentry->d_time) &&
···117117 void *s_authorizer_buf, *s_authorizer_reply_buf;118118 size_t s_authorizer_buf_len, s_authorizer_reply_buf_len;119119120120- /* protected by s_cap_lock */121121- spinlock_t s_cap_lock;120120+ /* protected by s_gen_ttl_lock */121121+ spinlock_t s_gen_ttl_lock;122122 u32 s_cap_gen; /* inc each time we get mds stale msg */123123 unsigned long s_cap_ttl; /* when session caps expire */124124+125125+ /* protected by s_cap_lock */126126+ spinlock_t s_cap_lock;124127 struct list_head s_caps; /* all caps issued by this session */125128 int s_nr_caps, s_trim_caps;126129 int s_num_cap_releases;
+3-1
fs/ceph/xattr.c
···111111}112112113113static struct ceph_vxattr_cb ceph_file_vxattrs[] = {114114+ { true, "ceph.file.layout", ceph_vxattrcb_layout},115115+ /* The following extended attribute name is deprecated */114116 { true, "ceph.layout", ceph_vxattrcb_layout},115115- { NULL, NULL }117117+ { true, NULL, NULL }116118};117119118120static struct ceph_vxattr_cb *ceph_inode_vxattrs(struct inode *inode)
···22592259extern void mmput(struct mm_struct *);22602260/* Grab a reference to a task's mm, if it is not already going away */22612261extern struct mm_struct *get_task_mm(struct task_struct *task);22622262+/*22632263+ * Grab a reference to a task's mm, if it is not already going away22642264+ * and ptrace_may_access with the mode parameter passed to it22652265+ * succeeds.22662266+ */22672267+extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);22622268/* Remove the current tasks stale references to the old mm_struct */22632269extern void mm_release(struct task_struct *, struct mm_struct *);22642270/* Allocate a new mm structure and copy contents from tsk->mm */
···23002300 return div64_u64(dividend, divisor);23012301}2302230223032303+static DEFINE_PER_CPU(int, perf_throttled_count);23042304+static DEFINE_PER_CPU(u64, perf_throttled_seq);23052305+23032306static void perf_adjust_period(struct perf_event *event, u64 nsec, u64 count)23042307{23052308 struct hw_perf_event *hwc = &event->hw;···23282325 }23292326}2330232723312331-static void perf_ctx_adjust_freq(struct perf_event_context *ctx, u64 period)23282328+/*23292329+ * combine freq adjustment with unthrottling to avoid two passes over the23302330+ * events. At the same time, make sure, having freq events does not change23312331+ * the rate of unthrottling as that would introduce bias.23322332+ */23332333+static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx,23342334+ int needs_unthr)23322335{23332336 struct perf_event *event;23342337 struct hw_perf_event *hwc;23352335- u64 interrupts, now;23382338+ u64 now, period = TICK_NSEC;23362339 s64 delta;2337234023382338- if (!ctx->nr_freq)23412341+ /*23422342+ * only need to iterate over all events iff:23432343+ * - context have events in frequency mode (needs freq adjust)23442344+ * - there are events to unthrottle on this cpu23452345+ */23462346+ if (!(ctx->nr_freq || needs_unthr))23392347 return;23482348+23492349+ raw_spin_lock(&ctx->lock);2340235023412351 list_for_each_entry_rcu(event, &ctx->event_list, event_entry) {23422352 if (event->state != PERF_EVENT_STATE_ACTIVE)···2360234423612345 hwc = &event->hw;2362234623632363- interrupts = hwc->interrupts;23642364- hwc->interrupts = 0;23652365-23662366- /*23672367- * unthrottle events on the tick23682368- */23692369- if (interrupts == MAX_INTERRUPTS) {23472347+ if (needs_unthr && hwc->interrupts == MAX_INTERRUPTS) {23482348+ hwc->interrupts = 0;23702349 perf_log_throttle(event, 1);23712350 event->pmu->start(event, 0);23722351 }···23692358 if (!event->attr.freq || !event->attr.sample_freq)23702359 continue;2371236023722372- event->pmu->read(event);23612361+ /*23622362+ * stop the event and update event->count23632363+ */23642364+ event->pmu->stop(event, PERF_EF_UPDATE);23652365+23732366 now = local64_read(&event->count);23742367 delta = now - hwc->freq_count_stamp;23752368 hwc->freq_count_stamp = now;2376236923702370+ /*23712371+ * restart the event23722372+ * reload only if value has changed23732373+ */23772374 if (delta > 0)23782375 perf_adjust_period(event, period, delta);23762376+23772377+ event->pmu->start(event, delta > 0 ? PERF_EF_RELOAD : 0);23792378 }23792379+23802380+ raw_spin_unlock(&ctx->lock);23802381}2381238223822383/*···24112388 */24122389static void perf_rotate_context(struct perf_cpu_context *cpuctx)24132390{24142414- u64 interval = (u64)cpuctx->jiffies_interval * TICK_NSEC;24152391 struct perf_event_context *ctx = NULL;24162416- int rotate = 0, remove = 1, freq = 0;23922392+ int rotate = 0, remove = 1;2417239324182394 if (cpuctx->ctx.nr_events) {24192395 remove = 0;24202396 if (cpuctx->ctx.nr_events != cpuctx->ctx.nr_active)24212397 rotate = 1;24222422- if (cpuctx->ctx.nr_freq)24232423- freq = 1;24242398 }2425239924262400 ctx = cpuctx->task_ctx;···24252405 remove = 0;24262406 if (ctx->nr_events != ctx->nr_active)24272407 rotate = 1;24282428- if (ctx->nr_freq)24292429- freq = 1;24302408 }2431240924322432- if (!rotate && !freq)24102410+ if (!rotate)24332411 goto done;2434241224352413 perf_ctx_lock(cpuctx, cpuctx->task_ctx);24362414 perf_pmu_disable(cpuctx->ctx.pmu);2437241524382438- if (freq) {24392439- perf_ctx_adjust_freq(&cpuctx->ctx, interval);24402440- if (ctx)24412441- perf_ctx_adjust_freq(ctx, interval);24422442- }24162416+ cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE);24172417+ if (ctx)24182418+ ctx_sched_out(ctx, cpuctx, EVENT_FLEXIBLE);2443241924442444- if (rotate) {24452445- cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE);24462446- if (ctx)24472447- ctx_sched_out(ctx, cpuctx, EVENT_FLEXIBLE);24202420+ rotate_ctx(&cpuctx->ctx);24212421+ if (ctx)24222422+ rotate_ctx(ctx);2448242324492449- rotate_ctx(&cpuctx->ctx);24502450- if (ctx)24512451- rotate_ctx(ctx);24522452-24532453- perf_event_sched_in(cpuctx, ctx, current);24542454- }24242424+ perf_event_sched_in(cpuctx, ctx, current);2455242524562426 perf_pmu_enable(cpuctx->ctx.pmu);24572427 perf_ctx_unlock(cpuctx, cpuctx->task_ctx);24582458-24592428done:24602429 if (remove)24612430 list_del_init(&cpuctx->rotation_list);···24542445{24552446 struct list_head *head = &__get_cpu_var(rotation_list);24562447 struct perf_cpu_context *cpuctx, *tmp;24482448+ struct perf_event_context *ctx;24492449+ int throttled;2457245024582451 WARN_ON(!irqs_disabled());2459245224532453+ __this_cpu_inc(perf_throttled_seq);24542454+ throttled = __this_cpu_xchg(perf_throttled_count, 0);24552455+24602456 list_for_each_entry_safe(cpuctx, tmp, head, rotation_list) {24572457+ ctx = &cpuctx->ctx;24582458+ perf_adjust_freq_unthr_context(ctx, throttled);24592459+24602460+ ctx = cpuctx->task_ctx;24612461+ if (ctx)24622462+ perf_adjust_freq_unthr_context(ctx, throttled);24632463+24612464 if (cpuctx->jiffies_interval == 1 ||24622465 !(jiffies % cpuctx->jiffies_interval))24632466 perf_rotate_context(cpuctx);···45304509{45314510 int events = atomic_read(&event->event_limit);45324511 struct hw_perf_event *hwc = &event->hw;45124512+ u64 seq;45334513 int ret = 0;4534451445354515 /*···45404518 if (unlikely(!is_sampling_event(event)))45414519 return 0;4542452045434543- if (unlikely(hwc->interrupts >= max_samples_per_tick)) {45444544- if (throttle) {45214521+ seq = __this_cpu_read(perf_throttled_seq);45224522+ if (seq != hwc->interrupts_seq) {45234523+ hwc->interrupts_seq = seq;45244524+ hwc->interrupts = 1;45254525+ } else {45264526+ hwc->interrupts++;45274527+ if (unlikely(throttle45284528+ && hwc->interrupts >= max_samples_per_tick)) {45294529+ __this_cpu_inc(perf_throttled_count);45454530 hwc->interrupts = MAX_INTERRUPTS;45464531 perf_log_throttle(event, 0);45474532 ret = 1;45484533 }45494549- } else45504550- hwc->interrupts++;45344534+ }4551453545524536 if (event->attr.freq) {45534537 u64 now = perf_clock();
+16
kernel/exit.c
···10381038 if (tsk->nr_dirtied)10391039 __this_cpu_add(dirty_throttle_leaks, tsk->nr_dirtied);10401040 exit_rcu();10411041+10421042+ /*10431043+ * The setting of TASK_RUNNING by try_to_wake_up() may be delayed10441044+ * when the following two conditions become true.10451045+ * - There is race condition of mmap_sem (It is acquired by10461046+ * exit_mm()), and10471047+ * - SMI occurs before setting TASK_RUNINNG.10481048+ * (or hypervisor of virtual machine switches to other guest)10491049+ * As a result, we may become TASK_RUNNING after becoming TASK_DEAD10501050+ *10511051+ * To avoid it, we have to wait for releasing tsk->pi_lock which10521052+ * is held by try_to_wake_up()10531053+ */10541054+ smp_mb();10551055+ raw_spin_unlock_wait(&tsk->pi_lock);10561056+10411057 /* causes final put_task_struct in finish_task_switch(). */10421058 tsk->state = TASK_DEAD;10431059 tsk->flags |= PF_NOFREEZE; /* tell freezer to ignore us */
+20
kernel/fork.c
···647647}648648EXPORT_SYMBOL_GPL(get_task_mm);649649650650+struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)651651+{652652+ struct mm_struct *mm;653653+ int err;654654+655655+ err = mutex_lock_killable(&task->signal->cred_guard_mutex);656656+ if (err)657657+ return ERR_PTR(err);658658+659659+ mm = get_task_mm(task);660660+ if (mm && mm != current->mm &&661661+ !ptrace_may_access(task, mode)) {662662+ mmput(mm);663663+ mm = ERR_PTR(-EACCES);664664+ }665665+ mutex_unlock(&task->signal->cred_guard_mutex);666666+667667+ return mm;668668+}669669+650670/* Please note the differences between mmput and mm_release.651671 * mmput is called whenever we stop holding onto a mm_struct,652672 * error success whatever.
+7-12
kernel/sched/core.c
···74747575#include <asm/tlb.h>7676#include <asm/irq_regs.h>7777+#include <asm/mutex.h>7778#ifdef CONFIG_PARAVIRT7879#include <asm/paravirt.h>7980#endif···724723 p->sched_class->dequeue_task(rq, p, flags);725724}726725727727-/*728728- * activate_task - move a task to the runqueue.729729- */730726void activate_task(struct rq *rq, struct task_struct *p, int flags)731727{732728 if (task_contributes_to_load(p))···732734 enqueue_task(rq, p, flags);733735}734736735735-/*736736- * deactivate_task - remove a task from the runqueue.737737- */738737void deactivate_task(struct rq *rq, struct task_struct *p, int flags)739738{740739 if (task_contributes_to_load(p))···41294134 on_rq = p->on_rq;41304135 running = task_current(rq, p);41314136 if (on_rq)41324132- deactivate_task(rq, p, 0);41374137+ dequeue_task(rq, p, 0);41334138 if (running)41344139 p->sched_class->put_prev_task(rq, p);41354140···41424147 if (running)41434148 p->sched_class->set_curr_task(rq);41444149 if (on_rq)41454145- activate_task(rq, p, 0);41504150+ enqueue_task(rq, p, 0);4146415141474152 check_class_changed(rq, p, prev_class, oldprio);41484153 task_rq_unlock(rq, p, &flags);···49934998 * placed properly.49944999 */49955000 if (p->on_rq) {49964996- deactivate_task(rq_src, p, 0);50015001+ dequeue_task(rq_src, p, 0);49975002 set_task_cpu(p, dest_cpu);49984998- activate_task(rq_dest, p, 0);50035003+ enqueue_task(rq_dest, p, 0);49995004 check_preempt_curr(rq_dest, p, 0);50005005 }50015006done:···7027703270287033 on_rq = p->on_rq;70297034 if (on_rq)70307030- deactivate_task(rq, p, 0);70357035+ dequeue_task(rq, p, 0);70317036 __setscheduler(rq, p, SCHED_NORMAL, 0);70327037 if (on_rq) {70337033- activate_task(rq, p, 0);70387038+ enqueue_task(rq, p, 0);70347039 resched_task(rq->curr);70357040 }70367041
+29-5
kernel/sched/fair.c
···48664866 return;48674867}4868486848694869+static inline void clear_nohz_tick_stopped(int cpu)48704870+{48714871+ if (unlikely(test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu)))) {48724872+ cpumask_clear_cpu(cpu, nohz.idle_cpus_mask);48734873+ atomic_dec(&nohz.nr_cpus);48744874+ clear_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu));48754875+ }48764876+}48774877+48694878static inline void set_cpu_sd_state_busy(void)48704879{48714880 struct sched_domain *sd;···49134904{49144905 int cpu = smp_processor_id();4915490649074907+ /*49084908+ * If this cpu is going down, then nothing needs to be done.49094909+ */49104910+ if (!cpu_active(cpu))49114911+ return;49124912+49164913 if (stop_tick) {49174914 if (test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu)))49184915 return;···49284913 set_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu));49294914 }49304915 return;49164916+}49174917+49184918+static int __cpuinit sched_ilb_notifier(struct notifier_block *nfb,49194919+ unsigned long action, void *hcpu)49204920+{49214921+ switch (action & ~CPU_TASKS_FROZEN) {49224922+ case CPU_DYING:49234923+ clear_nohz_tick_stopped(smp_processor_id());49244924+ return NOTIFY_OK;49254925+ default:49264926+ return NOTIFY_DONE;49274927+ }49314928}49324929#endif49334930···50975070 * busy tick after returning from idle, we will update the busy stats.50985071 */50995072 set_cpu_sd_state_busy();51005100- if (unlikely(test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu)))) {51015101- clear_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu));51025102- cpumask_clear_cpu(cpu, nohz.idle_cpus_mask);51035103- atomic_dec(&nohz.nr_cpus);51045104- }50735073+ clear_nohz_tick_stopped(cpu);5105507451065075 /*51075076 * None are in tickless mode and hence no need for NOHZ idle load···5613559056145591#ifdef CONFIG_NO_HZ56155592 zalloc_cpumask_var(&nohz.idle_cpus_mask, GFP_NOWAIT);55935593+ cpu_notifier(sched_ilb_notifier, 0);56165594#endif56175595#endif /* SMP */56185596
+5
kernel/sched/rt.c
···15871587 if (!next_task)15881588 return 0;1589158915901590+#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW15911591+ if (unlikely(task_running(rq, next_task)))15921592+ return 0;15931593+#endif15941594+15901595retry:15911596 if (unlikely(next_task == rq->curr)) {15921597 WARN_ON(1);
···149149 mpi_ptr_t marker[5];150150 int markidx = 0;151151152152+ if (!dsize)153153+ return -EINVAL;154154+152155 memset(marker, 0, sizeof(marker));153156154157 /* Ensure space is enough for quotient and remainder.···210207 * numerator would be gradually overwritten by the quotient limbs. */211208 if (qp == np) { /* Copy NP object to temporary space. */212209 np = marker[markidx++] = mpi_alloc_limb_space(nsize);210210+ if (!np)211211+ goto nomem;213212 MPN_COPY(np, qp, nsize);214213 }215214 } else /* Put quotient at top of remainder. */
+1-1
lib/mpi/mpi-pow.c
···5959 ep = exp->d;60606161 if (!msize)6262- msize = 1 / msize; /* provoke a signal */6262+ return -EINVAL;63636464 if (!esize) {6565 /* Exponent is zero, result is 1 mod MOD, i.e., 1 or 0
+2-89
lib/mpi/mpicoder.c
···20202121#include "mpi-internal.h"22222323-#define DIM(v) (sizeof(v)/sizeof((v)[0]))2423#define MAX_EXTERN_MPI_BITS 163842525-2626-static uint8_t asn[15] = /* Object ID is 1.3.14.3.2.26 */2727-{ 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03,2828- 0x02, 0x1a, 0x05, 0x00, 0x04, 0x142929-};3030-3131-MPI do_encode_md(const void *sha_buffer, unsigned nbits)3232-{3333- int nframe = (nbits + 7) / 8;3434- uint8_t *frame, *fr_pt;3535- int i = 0, n;3636- size_t asnlen = DIM(asn);3737- MPI a = MPI_NULL;3838-3939- if (SHA1_DIGEST_LENGTH + asnlen + 4 > nframe)4040- pr_info("MPI: can't encode a %d bit MD into a %d bits frame\n",4141- (int)(SHA1_DIGEST_LENGTH * 8), (int)nbits);4242-4343- /* We encode the MD in this way:4444- *4545- * 0 A PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes)4646- *4747- * PAD consists of FF bytes.4848- */4949- frame = kmalloc(nframe, GFP_KERNEL);5050- if (!frame)5151- return MPI_NULL;5252- n = 0;5353- frame[n++] = 0;5454- frame[n++] = 1; /* block type */5555- i = nframe - SHA1_DIGEST_LENGTH - asnlen - 3;5656-5757- if (i <= 1) {5858- pr_info("MPI: message digest encoding failed\n");5959- kfree(frame);6060- return a;6161- }6262-6363- memset(frame + n, 0xff, i);6464- n += i;6565- frame[n++] = 0;6666- memcpy(frame + n, &asn, asnlen);6767- n += asnlen;6868- memcpy(frame + n, sha_buffer, SHA1_DIGEST_LENGTH);6969- n += SHA1_DIGEST_LENGTH;7070-7171- i = nframe;7272- fr_pt = frame;7373-7474- if (n != nframe) {7575- printk7676- ("MPI: message digest encoding failed, frame length is wrong\n");7777- kfree(frame);7878- return a;7979- }8080-8181- a = mpi_alloc((nframe + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB);8282- mpi_set_buffer(a, frame, nframe, 0);8383- kfree(frame);8484-8585- return a;8686-}87248825MPI mpi_read_from_buffer(const void *xbuffer, unsigned *ret_nread)8926{···2891 int i, j;2992 unsigned nbits, nbytes, nlimbs, nread = 0;3093 mpi_limb_t a;3131- MPI val = MPI_NULL;9494+ MPI val = NULL;32953396 if (*ret_nread < 2)3497 goto leave;···45108 nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;46109 val = mpi_alloc(nlimbs);47110 if (!val)4848- return MPI_NULL;111111+ return NULL;49112 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB;50113 i %= BYTES_PER_MPI_LIMB;51114 val->nbits = nbits;···147210 return 0;148211}149212EXPORT_SYMBOL_GPL(mpi_fromstr);150150-151151-/****************152152- * Special function to get the low 8 bytes from an mpi.153153- * This can be used as a keyid; KEYID is an 2 element array.154154- * Return the low 4 bytes.155155- */156156-u32 mpi_get_keyid(const MPI a, u32 *keyid)157157-{158158-#if BYTES_PER_MPI_LIMB == 4159159- if (keyid) {160160- keyid[0] = a->nlimbs >= 2 ? a->d[1] : 0;161161- keyid[1] = a->nlimbs >= 1 ? a->d[0] : 0;162162- }163163- return a->nlimbs >= 1 ? a->d[0] : 0;164164-#elif BYTES_PER_MPI_LIMB == 8165165- if (keyid) {166166- keyid[0] = a->nlimbs ? (u32) (a->d[0] >> 32) : 0;167167- keyid[1] = a->nlimbs ? (u32) (a->d[0] & 0xffffffff) : 0;168168- }169169- return a->nlimbs ? (u32) (a->d[0] & 0xffffffff) : 0;170170-#else171171-#error Make this function work with other LIMB sizes172172-#endif173173-}174213175214/****************176215 * Return an allocated buffer with the MPI (msb first).
+4
lib/mpi/mpih-div.c
···217217 case 0:218218 /* We are asked to divide by zero, so go ahead and do it! (To make219219 the compiler not remove this statement, return the value.) */220220+ /*221221+ * existing clients of this function have been modified222222+ * not to call it with dsize == 0, so this should not happen223223+ */220224 return 1 / dsize;221225222226 case 1:
···230230231231/* GTA02 specific routes and controls */232232233233-#ifdef CONFIG_MACH_NEO1973_GTA02234234-235233static int gta02_speaker_enabled;236234237235static int lm4853_set_spk(struct snd_kcontrol *kcontrol,···309311 return 0;310312}311313312312-#else313313-static int neo1973_gta02_wm8753_init(struct snd_soc_code *codec) { return 0; }314314-#endif315315-316314static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)317315{318316 struct snd_soc_codec *codec = rtd->codec;···316322 int ret;317323318324 /* set up NC codec pins */319319- if (machine_is_neo1973_gta01()) {320320- snd_soc_dapm_nc_pin(dapm, "LOUT2");321321- snd_soc_dapm_nc_pin(dapm, "ROUT2");322322- }323325 snd_soc_dapm_nc_pin(dapm, "OUT3");324326 snd_soc_dapm_nc_pin(dapm, "OUT4");325327 snd_soc_dapm_nc_pin(dapm, "LINE1");···360370 return 0;361371}362372363363-/* GTA01 specific controls */364364-365365-#ifdef CONFIG_MACH_NEO1973_GTA01366366-367367-static const struct snd_soc_dapm_route neo1973_lm4857_routes[] = {368368- {"Amp IN", NULL, "ROUT1"},369369- {"Amp IN", NULL, "LOUT1"},370370-371371- {"Handset Spk", NULL, "Amp EP"},372372- {"Stereo Out", NULL, "Amp LS"},373373- {"Headphone", NULL, "Amp HP"},374374-};375375-376376-static const struct snd_soc_dapm_widget neo1973_lm4857_dapm_widgets[] = {377377- SND_SOC_DAPM_SPK("Handset Spk", NULL),378378- SND_SOC_DAPM_SPK("Stereo Out", NULL),379379- SND_SOC_DAPM_HP("Headphone", NULL),380380-};381381-382382-static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm)383383-{384384- int ret;385385-386386- ret = snd_soc_dapm_new_controls(dapm, neo1973_lm4857_dapm_widgets,387387- ARRAY_SIZE(neo1973_lm4857_dapm_widgets));388388- if (ret)389389- return ret;390390-391391- ret = snd_soc_dapm_add_routes(dapm, neo1973_lm4857_routes,392392- ARRAY_SIZE(neo1973_lm4857_routes));393393- if (ret)394394- return ret;395395-396396- snd_soc_dapm_ignore_suspend(dapm, "Stereo Out");397397- snd_soc_dapm_ignore_suspend(dapm, "Handset Spk");398398- snd_soc_dapm_ignore_suspend(dapm, "Headphone");399399-400400- return 0;401401-}402402-403403-#else404404-static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; };405405-#endif406406-407373static struct snd_soc_dai_link neo1973_dai[] = {408374{ /* Hifi Playback - for similatious use with voice below */409375 .name = "WM8753",···386440 .name = "dfbmcs320",387441 .codec_name = "dfbmcs320.0",388442 },389389- {390390- .name = "lm4857",391391- .codec_name = "lm4857.0-007c",392392- .init = neo1973_lm4857_init,393393- },394443};395444396445static struct snd_soc_codec_conf neo1973_codec_conf[] = {···395454 },396455};397456398398-#ifdef CONFIG_MACH_NEO1973_GTA02399457static const struct gpio neo1973_gta02_gpios[] = {400458 { GTA02_GPIO_HP_IN, GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" },401459 { GTA02_GPIO_AMP_SHUT, GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" },402460};403403-#else404404-static const struct gpio neo1973_gta02_gpios[] = {};405405-#endif406461407462static struct snd_soc_card neo1973 = {408463 .name = "neo1973",···417480{418481 int ret;419482420420- if (!machine_is_neo1973_gta01() && !machine_is_neo1973_gta02())483483+ if (!machine_is_neo1973_gta02())421484 return -ENODEV;422485423486 if (machine_is_neo1973_gta02()) {
+2-5
tools/perf/Makefile
···104104105105CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)106106EXTLIBS = -lpthread -lrt -lelf -lm107107-ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64107107+ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE108108ALL_LDFLAGS = $(LDFLAGS)109109STRIP ?= strip110110···168168169169### --- END CONFIGURATION SECTION ---170170171171-# Those must not be GNU-specific; they are shared with perl/ which may172172-# be built by a different compiler. (Note that this is an artifact now173173-# but it still might be nice to keep that distinction.)174174-BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include171171+BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE175172BASIC_LDFLAGS =176173177174# Guard against environment variables
-2
tools/perf/builtin-probe.c
···2020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.2121 *2222 */2323-#define _GNU_SOURCE2423#include <sys/utsname.h>2524#include <sys/types.h>2625#include <sys/stat.h>···3031#include <stdlib.h>3132#include <string.h>32333333-#undef _GNU_SOURCE3434#include "perf.h"3535#include "builtin.h"3636#include "util/util.h"
···2121 * The parts for function graph printing was taken and modified from the2222 * Linux Kernel that were written by Frederic Weisbecker.2323 */2424-#define _GNU_SOURCE2424+2525#include <stdio.h>2626#include <stdlib.h>2727#include <string.h>2828#include <ctype.h>2929#include <errno.h>30303131-#undef _GNU_SOURCE3231#include "../perf.h"3332#include "util.h"3433#include "trace-event.h"