Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbdITLLf (ORCPT ); Wed, 20 Sep 2017 07:11:35 -0400 Received: from ozlabs.org ([103.22.144.67]:39191 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbdITLLe (ORCPT ); Wed, 20 Sep 2017 07:11:34 -0400 From: Michael Ellerman To: Julia Lawall Cc: Bhumika Goyal , benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: make irq_chip const, __initdata and __initconst In-Reply-To: References: <1505743967-19448-1-git-send-email-bhumirks@gmail.com> <87o9q5lwgq.fsf@concordia.ellerman.id.au> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 20 Sep 2017 21:11:31 +1000 Message-ID: <87efr1lj4s.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 30 Julia Lawall writes: > On Wed, 20 Sep 2017, Michael Ellerman wrote: > >> Bhumika Goyal writes: >> >> > Make ehv_pic_irq_chip, mpic_ipi_chip and mpic_tm_chip const as they are >> > used only as a copy operation. This usage is during init, so make them >> > __initconst too. >> > Make mpic_ipi_chip __initdata as it is only modified during the init >> > phase and there is no reference of it anywhere after init. >> >> The change log doesn't seem to match the code. >> >> It's mpic_tm_chip which you marked __initdata, and that looks wrong, as >> we keep a pointer to it here: >> >> mpic->hc_tm = mpic_tm_chip; > > This looks like a memory copy. Yes you're right. That's pretty horrible given the size of struct irq_chip, but it's not a bug in this patch. There are 5 struct irq_chip's embedded in struct mpic, it must be enormous! cheers