Received: by 10.223.185.116 with SMTP id b49csp3798322wrg; Tue, 13 Feb 2018 07:57:13 -0800 (PST) X-Google-Smtp-Source: AH8x225WfL4XukeDuAL7W9y3bNQwbA2wnYk2o7buUngQn5/LBXxmG1ZSCOO95ZASwPZxpTuq3QuK X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr1557075pld.17.1518537433309; Tue, 13 Feb 2018 07:57:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518537433; cv=none; d=google.com; s=arc-20160816; b=EpTEV2K/AuPjKGyc643kcT7R5DcuHy2dQDqvpPn7fS6qbNzRvtj4WJqkcU3UGqEi8D 8vhGXf+zyFds+ddNrJ3Yq8nuFgMdi5LffEyvVyvC12osLfbmmtScG5kRI4zFpzZZgNBe +q7KdLB5jfO9uE4A10vfbN7swnlb4T87kAFPi9kr23dT3DOpQ65elrcuydqbXZvAztDX cG3ZOG4X/YAEaAZ/pmbfA+zk3OdcFPL8ODUA9sM6KC9Q/z3zItKDSCMVBpgblzqlEsky wkFmjK8DDcNMk4R65gruHlDLYhxrus3M9cH76ofJdTlZAoJrq/LZZ/wAOI4ypal14jUW wELg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=OBnuP/IjejmTkm9q7h9AWNKNeYaTEcr+yl4aBJ4Q060=; b=rZWU6gcDO78i+qrfu+rq1bzCqOh7uBD9FHgjpmhhE8IGj7vyX1L753CYuZrlz7+iqL 1l8gCAexjmdShOPnjijZL5jRxNyG4UHt1wxIzDgLmBNKgmbSU/rAPc5jvt/6RljuS+tU TNBirAui/1Rf5oBk1ck0bxNsvka9t/X6gCNLGOrGpUvDgH+Rij1WiI3lznjE2gT0ECQG VV7trqS308lr/St22Q6TmROl1HNfokFhj1zwOeuXCQOQwXFp4mIBFf7ef+x5oxygon5K e7aVcV6RQda0DUvTdThvx6UhufyQyhumRWXYxHS7Pv6z1+lOTAN2rDX8X+cAWlsBbxEQ T15A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ri6uaK46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si861516pgv.486.2018.02.13.07.56.59; Tue, 13 Feb 2018 07:57:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ri6uaK46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934297AbeBMP4K (ORCPT + 99 others); Tue, 13 Feb 2018 10:56:10 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:46556 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933440AbeBMP4J (ORCPT ); Tue, 13 Feb 2018 10:56:09 -0500 Received: by mail-wr0-f194.google.com with SMTP id 34so8830453wre.13 for ; Tue, 13 Feb 2018 07:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OBnuP/IjejmTkm9q7h9AWNKNeYaTEcr+yl4aBJ4Q060=; b=Ri6uaK46F30i0nRclDUI5+Ul3Ewo/ru/7c7dZEG8vPlMwb5JKyh371D7LMU2lLzKgv NUr0jgekYCH4XKk36FlynBVbLqHt0R2peXqE5eFS38q7mkCnvHrrcunubHg/PvjvK/Ix i2fop3b5BoLW66RCkhX4bC+VR5NZWudU1KHpRr4iT7xLhjmI1DYOp0MrEc6zTYKOadsm hP4xSQ25+wUm6znneYKhN0OA1mvf+4A42uFffkQMXwnCRnA458dZmksjpXZ3qqE9Yvzs UYgvbkrsfOdQoO2a02B4WhrkX840/46p9Xx3SJzbNgzbyVo3OdzWZ8jWEIxBz5nXcTyR yv+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=OBnuP/IjejmTkm9q7h9AWNKNeYaTEcr+yl4aBJ4Q060=; b=q+FmSl/GXSRJ3CDmbE19S8TU4YD/Ab55F9DSOo03o+B+iMsakTrPSFIM0CZFwofhQu UqVVQnmPAvCUPaiXVwjaZrspuIhVyRYT0SZxR8g9r8HwQ+Ox4TzMqQaSb0DRqODm7CX2 8I7Q+h+tJjqAqUyMgQ9RA6N+7my5fnLYaeU045NZgRw5qlcGwlLQ8qaCEyKeQrWhrSZs xPxtrwFiX+Q7R13M9HigAb7uJxY69G8x4Ox/c8sOqG6+xajDL2/I3tbxCxXn0ZqB5owq NsaW+PnA/vQ0V6gbLxZkq8Qz2VCzqZhtdQdaY55d98v+7LQcmu309zWQrbIH5uIpB+Uu jSPA== X-Gm-Message-State: APf1xPAUHkO/+Mxd9ibv/m9u69h1w5DTv5neTYtvwGi0UT6SB+gwLKvQ QOXKdBRwQEtg+aefATcHsb4= X-Received: by 10.223.164.158 with SMTP id g30mr1760443wrb.243.1518537367918; Tue, 13 Feb 2018 07:56:07 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id e5sm3152697wre.97.2018.02.13.07.56.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 07:56:07 -0800 (PST) Date: Tue, 13 Feb 2018 16:56:04 +0100 From: Ingo Molnar To: Jia-Ju Bai Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, jgross@suse.com, douly.fnst@cn.fujitsu.com, kkamagui@gmail.com, gregkh@linuxfoundation.org, mka@chromium.org, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] kernel: x86: apic: Replace GFP_ATOMIC with GFP_KERNEL in __add_pin_to_irq_node Message-ID: <20180213155604.62ulolc34snh5n3p@gmail.com> References: <1516758015-7236-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516758015-7236-1-git-send-email-baijiaju1990@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Jia-Ju Bai wrote: > The function __add_pin_to_irq_node is not called in atomic context. > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > Signed-off-by: Jia-Ju Bai > --- > arch/x86/kernel/apic/io_apic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c > index 201579d..665c013 100644 > --- a/arch/x86/kernel/apic/io_apic.c > +++ b/arch/x86/kernel/apic/io_apic.c > @@ -379,7 +379,7 @@ static int __add_pin_to_irq_node(struct mp_chip_data *data, > if (entry->apic == apic && entry->pin == pin) > return 0; > > - entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_ATOMIC, node); > + entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_KERNEL, node); > if (!entry) { > pr_err("can not alloc irq_pin_list (%d,%d,%d)\n", > node, apic, pin); NAK: this is called in an atomic section: with IRQs disabled ... Thanks, Ingo