From patchwork Fri Feb 21 21:02:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11397345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70EF117F0 for ; Fri, 21 Feb 2020 21:03:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F4FD2073A for ; Fri, 21 Feb 2020 21:03:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="OisuFAV5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F4FD2073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 385806F515; Fri, 21 Feb 2020 21:03:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id E278B6F514 for ; Fri, 21 Feb 2020 21:03:30 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id n3so3156293wmk.4 for ; Fri, 21 Feb 2020 13:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s9Dt4ZAHYBWy2uNMICh4RsHo7p4PctnYq6F5Xys1W4s=; b=OisuFAV5oDBmQKeBs0UymzgY5td1J8RHr3pQvLxZPvhJnjEa25O4P2jGhMG2IYrRL+ qqhzgiJfmXLL3fdEueCsvcSP3jBQmnBoDVV1Yz5y4WJedmJBAAzz8/ZISg0m/0rOs93D GmsNiYIv8PriLG8PGMAYrligQpoh3/yXfRFaE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s9Dt4ZAHYBWy2uNMICh4RsHo7p4PctnYq6F5Xys1W4s=; b=C90kT6+xtk1O8k+4vLNeRQpAT42AmFN1UjJ4LsyxEHpax2nNEy6XcRqIU3HfFW0rMc RotAFUCxzY+tn+aRAoZAhluxhzm4rKg5ob8O0a1Pxw65RakzfFQBFrz6BxUT9Yf1QJrD FjbmanZaJUZunlsGqcyYmCFz/gHwD4KJcjN1bktxJdaYNDcn2pKedbRBI4AwwpHRBfSX QJUPGfYiMxn1LdfIYg2Zbyy8u2vRNQbDijSycmVDaM0zCoUMhj6KbmJQ8xuUejPuJPSF X+1J7uGhK44UlKKlP2peTJL7ot4H5svy/xmTN6hw5sDGuF8QvLkcVwZJH1zUXCT7IRJh jJ0Q== X-Gm-Message-State: APjAAAVRxj6wf3nQfHetwJuik55+YQd1hR4KUWX49imJxQzOSh7p0Y3d 6HfThv57nggLLFC3NwldPknViLoCCVA= X-Google-Smtp-Source: APXvYqzu33NHGHJEAZjKXzUtN7bRj7hzr3IZyM1qrp8yQSBh8JIdkgH8hUKTBDoienQiI/4TPDI/2A== X-Received: by 2002:a1c:1984:: with SMTP id 126mr5904804wmz.78.1582319009321; Fri, 21 Feb 2020 13:03:29 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z6sm5483930wrw.36.2020.02.21.13.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 13:03:25 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 01/51] mm/sl[uo]b: export __kmalloc_track(_node)_caller Date: Fri, 21 Feb 2020 22:02:29 +0100 Message-Id: <20200221210319.2245170-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200221210319.2245170-1-daniel.vetter@ffwll.ch> References: <20200221210319.2245170-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, Daniel Vetter , Intel Graphics Development , Pekka Enberg , Joonsoo Kim , David Rientjes , Daniel Vetter , Christoph Lameter , Andrew Morton Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux-mm@kvack.org --- I plan to merge this through drm-misc-next (with Andrew's ack) once the remainder of the drm series is in shape. -Daniel --- mm/slob.c | 2 ++ mm/slub.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/slob.c b/mm/slob.c index fa53e9f73893..ac2aecfbc7a8 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -524,6 +524,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) { return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, @@ -531,6 +532,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, { return __do_kmalloc_node(size, gfp, node, caller); } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif void kfree(const void *block) diff --git a/mm/slub.c b/mm/slub.c index be2854b5b1c9..7271fb235ed8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4358,6 +4358,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) return ret; } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, @@ -4388,6 +4389,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS