diff mbox

[PATCHv2,14/14] treewide: Decouple cacheflush.h and set_memory.h

Message ID 1488413706-9739-15-git-send-email-labbott@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laura Abbott March 2, 2017, 12:15 a.m. UTC
Now that all call sites, completely decouple cacheflush.h and
set_memory.h

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
 arch/arm/include/asm/cacheflush.h   | 1 -
 arch/arm64/include/asm/cacheflush.h | 1 -
 arch/s390/include/asm/Kbuild        | 1 +
 arch/s390/include/asm/cacheflush.h  | 8 --------
 arch/x86/include/asm/cacheflush.h   | 1 -
 5 files changed, 1 insertion(+), 11 deletions(-)
 delete mode 100644 arch/s390/include/asm/cacheflush.h

Comments

Russell King (Oracle) March 2, 2017, 12:06 p.m. UTC | #1
On Wed, Mar 01, 2017 at 04:15:06PM -0800, Laura Abbott wrote:
> diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
> index 1cb9d11..d69bebf 100644
> --- a/arch/arm/include/asm/cacheflush.h
> +++ b/arch/arm/include/asm/cacheflush.h
> @@ -16,7 +16,6 @@
>  #include <asm/shmparam.h>
>  #include <asm/cachetype.h>
>  #include <asm/outercache.h>
> -#include <asm/set_memory.h>
>  
>  #define CACHE_COLOUR(vaddr)	((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
>  

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

Thanks.
Mark Rutland March 2, 2017, 2:12 p.m. UTC | #2
On Wed, Mar 01, 2017 at 04:15:06PM -0800, Laura Abbott wrote:
> 
> Now that all call sites, completely decouple cacheflush.h and
> set_memory.h
> 
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
>  arch/arm/include/asm/cacheflush.h   | 1 -
>  arch/arm64/include/asm/cacheflush.h | 1 -
>  arch/s390/include/asm/Kbuild        | 1 +
>  arch/s390/include/asm/cacheflush.h  | 8 --------
>  arch/x86/include/asm/cacheflush.h   | 1 -
>  5 files changed, 1 insertion(+), 11 deletions(-)
>  delete mode 100644 arch/s390/include/asm/cacheflush.h
> 
> diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
> index 1cb9d11..d69bebf 100644
> --- a/arch/arm/include/asm/cacheflush.h
> +++ b/arch/arm/include/asm/cacheflush.h
> @@ -16,7 +16,6 @@
>  #include <asm/shmparam.h>
>  #include <asm/cachetype.h>
>  #include <asm/outercache.h>
> -#include <asm/set_memory.h>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Thanks,
Mark.
Catalin Marinas March 2, 2017, 3:05 p.m. UTC | #3
On Wed, Mar 01, 2017 at 04:15:06PM -0800, Laura Abbott wrote:
> Now that all call sites, completely decouple cacheflush.h and
> set_memory.h
> 
> Signed-off-by: Laura Abbott <labbott@redhat.com>

For arm64:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
kernel test robot March 4, 2017, 10:57 p.m. UTC | #4
Hi Laura,

[auto build test ERROR on linus/master]
[also build test ERROR on next-20170303]
[cannot apply to tip/x86/core drm/drm-next v4.10]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Laura-Abbott/set_memory_-functions-header-refactor/20170305-062939
config: i386-randconfig-x014-201710 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   arch/x86/kernel/machine_kexec_32.c: In function 'machine_kexec_prepare':
>> arch/x86/kernel/machine_kexec_32.c:160:2: error: implicit declaration of function 'set_pages_x' [-Werror=implicit-function-declaration]
     set_pages_x(image->control_code_page, 1);
     ^~~~~~~~~~~
   arch/x86/kernel/machine_kexec_32.c: In function 'machine_kexec_cleanup':
>> arch/x86/kernel/machine_kexec_32.c:174:2: error: implicit declaration of function 'set_pages_nx' [-Werror=implicit-function-declaration]
     set_pages_nx(image->control_code_page, 1);
     ^~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   arch/x86/mm/init_32.c: In function 'set_kernel_text_rw':
>> arch/x86/mm/init_32.c:880:2: error: implicit declaration of function 'set_pages_rw' [-Werror=implicit-function-declaration]
     set_pages_rw(virt_to_page(start), size >> PAGE_SHIFT);
     ^~~~~~~~~~~~
   arch/x86/mm/init_32.c: In function 'set_kernel_text_ro':
>> arch/x86/mm/init_32.c:894:2: error: implicit declaration of function 'set_pages_ro' [-Werror=implicit-function-declaration]
     set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
     ^~~~~~~~~~~~
   arch/x86/mm/init_32.c: In function 'mark_nxdata_nx':
>> arch/x86/mm/init_32.c:911:2: error: implicit declaration of function 'set_pages_nx' [-Werror=implicit-function-declaration]
     set_pages_nx(virt_to_page(start), size >> PAGE_SHIFT);
     ^~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/set_pages_x +160 arch/x86/kernel/machine_kexec_32.c

9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  154   * - Setup page tables
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  155   */
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  156  int machine_kexec_prepare(struct kimage *image)
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  157  {
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  158  	int error;
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  159  
3ab83521 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-07-25 @160  	set_pages_x(image->control_code_page, 1);
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  161  	error = machine_kexec_alloc_page_tables(image);
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  162  	if (error)
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  163  		return error;
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  164  	machine_kexec_prepare_page_tables(image);
9868ee63 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  165  	return 0;
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  166  }
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  167  
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  168  /*
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  169   * Undo anything leftover by machine_kexec_prepare
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  170   * when an image is freed.
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  171   */
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  172  void machine_kexec_cleanup(struct kimage *image)
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  173  {
3ab83521 arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-07-25 @174  	set_pages_nx(image->control_code_page, 1);
92be3d6b arch/x86/kernel/machine_kexec_32.c Huang Ying        2008-10-31  175  	machine_kexec_free_page_tables(image);
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  176  }
5033cba0 arch/i386/kernel/machine_kexec.c   Eric W. Biederman 2005-06-25  177  

:::::: The code at line 160 was first introduced by commit
:::::: 3ab83521378268044a448113c6aa9a9e245f4d2f kexec jump

:::::: TO: Huang Ying <ying.huang@intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot March 5, 2017, 12:03 a.m. UTC | #5
Hi Laura,

[auto build test ERROR on linus/master]
[also build test ERROR on next-20170303]
[cannot apply to tip/x86/core drm/drm-next v4.10]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Laura-Abbott/set_memory_-functions-header-refactor/20170305-062939
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   sound/pci/intel8x0.c: In function 'fill_nocache':
>> sound/pci/intel8x0.c:736:3: error: implicit declaration of function 'set_pages_uc' [-Werror=implicit-function-declaration]
      set_pages_uc(virt_to_page(buf), size);
      ^~~~~~~~~~~~
>> sound/pci/intel8x0.c:738:3: error: implicit declaration of function 'set_pages_wb' [-Werror=implicit-function-declaration]
      set_pages_wb(virt_to_page(buf), size);
      ^~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   sound/x86/intel_hdmi_audio.c: In function 'had_pcm_hw_params':
>> sound/x86/intel_hdmi_audio.c:1135:11: error: implicit declaration of function 'set_memory_uc' [-Werror=implicit-function-declaration]
     retval = set_memory_uc(addr, pages);
              ^~~~~~~~~~~~~
   sound/x86/intel_hdmi_audio.c: In function 'had_pcm_hw_free':
>> sound/x86/intel_hdmi_audio.c:1163:3: error: implicit declaration of function 'set_memory_wb' [-Werror=implicit-function-declaration]
      set_memory_wb(addr, pages);
      ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/set_pages_uc +736 sound/pci/intel8x0.c

631dd1a8 Justin P. Mattock 2010-10-18  730   *	http://download.intel.com/design/chipsets/specupdt/24505108.pdf
^1da177e Linus Torvalds    2005-04-16  731   */
^1da177e Linus Torvalds    2005-04-16  732  static void fill_nocache(void *buf, int size, int nocache)
^1da177e Linus Torvalds    2005-04-16  733  {
^1da177e Linus Torvalds    2005-04-16  734  	size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
6d238cc4 Arjan van de Ven  2008-01-30  735  	if (nocache)
6d238cc4 Arjan van de Ven  2008-01-30 @736  		set_pages_uc(virt_to_page(buf), size);
6d238cc4 Arjan van de Ven  2008-01-30  737  	else
6d238cc4 Arjan van de Ven  2008-01-30 @738  		set_pages_wb(virt_to_page(buf), size);
^1da177e Linus Torvalds    2005-04-16  739  }
^1da177e Linus Torvalds    2005-04-16  740  #else
6d238cc4 Arjan van de Ven  2008-01-30  741  #define fill_nocache(buf, size, nocache) do { ; } while (0)

:::::: The code at line 736 was first introduced by commit
:::::: 6d238cc4dc8a36a3915c26202fe49f58a0683fb9 x86: convert CPA users to the new set_page_ API

:::::: TO: Arjan van de Ven <arjan@infradead.org>
:::::: CC: Ingo Molnar <mingo@elte.hu>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 1cb9d11..d69bebf 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -16,7 +16,6 @@ 
 #include <asm/shmparam.h>
 #include <asm/cachetype.h>
 #include <asm/outercache.h>
-#include <asm/set_memory.h>
 
 #define CACHE_COLOUR(vaddr)	((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
 
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h
index 7db6962..5812469 100644
--- a/arch/arm64/include/asm/cacheflush.h
+++ b/arch/arm64/include/asm/cacheflush.h
@@ -20,7 +20,6 @@ 
 #define __ASM_CACHEFLUSH_H
 
 #include <linux/mm.h>
-#include <asm/set_memory.h>
 
 /*
  * This flag is used to indicate that the page pointed to by a pte is clean
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 8aea32f..c0a7057 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -1,4 +1,5 @@ 
 generic-y += asm-offsets.h
+generic-y += cacheflush.h
 generic-y += clkdev.h
 generic-y += dma-contiguous.h
 generic-y += export.h
diff --git a/arch/s390/include/asm/cacheflush.h b/arch/s390/include/asm/cacheflush.h
deleted file mode 100644
index afe2965..0000000
--- a/arch/s390/include/asm/cacheflush.h
+++ /dev/null
@@ -1,8 +0,0 @@ 
-#ifndef _S390_CACHEFLUSH_H
-#define _S390_CACHEFLUSH_H
-
-/* Caches aren't brain-dead on the s390. */
-#include <asm-generic/cacheflush.h>
-#include <asm/set_memory.h>
-
-#endif /* _S390_CACHEFLUSH_H */
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
index 3d7db6f..8b4140f 100644
--- a/arch/x86/include/asm/cacheflush.h
+++ b/arch/x86/include/asm/cacheflush.h
@@ -4,7 +4,6 @@ 
 /* Caches aren't brain-dead on the intel. */
 #include <asm-generic/cacheflush.h>
 #include <asm/special_insns.h>
-#include <asm/set_memory.h>
 
 void clflush_cache_range(void *addr, unsigned int size);