From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760138AbbIWERx (ORCPT ); Wed, 23 Sep 2015 00:17:53 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:37343 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbIWERw (ORCPT ); Wed, 23 Sep 2015 00:17:52 -0400 Subject: Re: [RFC PATCH v5 2/4] genirq: add irq_migrate_all_off_this_cpu() for cpu hotplug To: Thomas Gleixner References: <1442631959-10228-1-git-send-email-yangyingliang@huawei.com> <1442631959-10228-3-git-send-email-yangyingliang@huawei.com> CC: , , Jiang Liu , Marc Zyngier , Mark Rutland , Will Deacon , Russell King - ARM Linux , Hanjun Guo From: Yang Yingliang Message-ID: <56022780.1030308@huawei.com> Date: Wed, 23 Sep 2015 12:16:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.219] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/9/23 2:54, Thomas Gleixner wrote: > On Sat, 19 Sep 2015, Yang Yingliang wrote: > >> Add irq_migrate_all_off_this_cpu() into kernel/irq/migration.c. > > This doesn't make any sense at all. > > You just reuse the existing file to stick your new code into it > without reusing a single bit in that file. Aside of that it's > unconditionally compiled, which means all existing users of > CONFIG_GENERIC_PENDING_IRQ are burdened with pointless code. > > The right thing to do is: > > Add that code to a new file: kernel/irq/cpuhotplug.c and make that > depend on CONFIG_GENERIC_IRQ_MIGRATION. How about add #ifdef CONFIG_CPU_HOTPLUG around new code in kernel/irq/migration.c ? Thanks, Yang