From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbdBIKA3 (ORCPT ); Thu, 9 Feb 2017 05:00:29 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59300 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbdBIKA1 (ORCPT ); Thu, 9 Feb 2017 05:00:27 -0500 Date: Thu, 9 Feb 2017 10:59:56 +0100 From: Heiko Carstens To: Laura Abbott Cc: Russell King , Catalin Marinas , Will Deacon , Martin Schwidefsky , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Kees Cook , Mark Rutland , Arnd Bergmann , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h References: <1486501816-27600-1-git-send-email-labbott@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1486501816-27600-1-git-send-email-labbott@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020910-0020-0000-0000-000003034268 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020910-0021-0000-0000-000040543CB7 Message-Id: <20170209095956.GB4159@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-09_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702090099 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 07, 2017 at 01:10:16PM -0800, Laura Abbott wrote: > The set_memory_* APIs came out of a desire to have a better way to > change memory attributes. Many of these attributes were linked to cache > functionality so the prototypes were put in cacheflush.h. These days, > the APIs have grown and have a much wider use than just cache APIs. To > support this growth, split off set_memory_* and friends into a separate > header file to avoid growing cacheflush.h for APIs that have nothing to > do with caches. > > Signed-off-by: Laura Abbott > --- > This came out of a comment Russell made while reviewing RODATA test cases > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html > While the final result of that series was the rodata code was refactored into > its own header file, the set_memory_* APIs are still out of place. > > This is a simple attempt at moving all the API stubs to their own file. > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic > file since those are commonly used for module setting across all arches. > > This is an RFC to see if this is actually beneficial. The diffstat is not > negative unfortunately due to header guards in newer files. > I have patches to convert call sites over to set_memory.h instead of > cacheflush.h if there is sufficient interest. > --- > arch/arm/include/asm/cacheflush.h | 21 +------- > arch/arm/include/asm/set_memory.h | 32 ++++++++++++ > arch/arm64/include/asm/cacheflush.h | 6 +-- > arch/arm64/include/asm/set_memory.h | 26 ++++++++++ > arch/s390/include/asm/cacheflush.h | 6 +-- > arch/s390/include/asm/set_memory.h | 9 ++++ > arch/x86/include/asm/cacheflush.h | 96 +--------------------------------- > arch/x86/include/asm/set_memory.h | 100 ++++++++++++++++++++++++++++++++++++ > 8 files changed, 171 insertions(+), 125 deletions(-) > create mode 100644 arch/arm/include/asm/set_memory.h > create mode 100644 arch/arm64/include/asm/set_memory.h > create mode 100644 arch/s390/include/asm/set_memory.h > create mode 100644 arch/x86/include/asm/set_memory.h For s390: Acked-by: Heiko Carstens