Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938613AbcKNU3i (ORCPT ); Mon, 14 Nov 2016 15:29:38 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:42552 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932462AbcKNU3g (ORCPT ); Mon, 14 Nov 2016 15:29:36 -0500 From: Chris Metcalf To: Heiko Carstens , Kees Cook , Martin Schwidefsky , linux-kernel@vger.kernel.org Cc: Chris Metcalf Subject: [PATCH v2] tile: handle __ro_after_init like parisc does Date: Mon, 14 Nov 2016 15:29:29 -0500 Message-Id: <1479155369-18074-1-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <20161108071543.GA3528@osiris> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 849 Lines: 25 The tile architecture already marks RO_DATA as read-only in the kernel, so grouping RO_AFTER_INIT_DATA with RO_DATA, as is done by default, means the kernel faults in init when it tries to write to RO_AFTER_INIT_DATA. For now, just arrange that __ro_after_init is handled like __write_once, i.e. __read_mostly. Signed-off-by: Chris Metcalf --- arch/tile/include/asm/cache.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/tile/include/asm/cache.h b/arch/tile/include/asm/cache.h index 6160761d5f61..4810e48dbbbf 100644 --- a/arch/tile/include/asm/cache.h +++ b/arch/tile/include/asm/cache.h @@ -61,4 +61,7 @@ */ #define __write_once __read_mostly +/* __ro_after_init is the generic name for the tile arch __write_once. */ +#define __ro_after_init __read_mostly + #endif /* _ASM_TILE_CACHE_H */ -- 2.7.2