* [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules
@ 2015-01-22 11:43 Juergen Gross
2015-01-22 13:49 ` Steven Noonan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juergen Gross @ 2015-01-22 11:43 UTC (permalink / raw)
To: hpa, x86, tglx, mingo, linux-kernel, toshi.kani, steven; +Cc: Juergen Gross
Commit 281d4078bec366d60990add9d91a952953bd0d72 ("x86: Make page
cache mode a real type") introduced the symbols __cachemode2pte_tbl
and __pte2cachemode_tbl and exported them via EXPORT_SYMBOL_GPL.
This will break building out-of-tree non-gpl modules which need to
set caching mode in ptes.
Change EXPORT_SYMBOL_GPL to EXPORT-SYMBOL for these two symbols.
Reported-by: Stevan Noonan <steven@uplinklabs.net>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/mm/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 08a7d31..079c3b6 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -43,7 +43,7 @@ uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
[_PAGE_CACHE_MODE_WT] = _PAGE_PCD,
[_PAGE_CACHE_MODE_WP] = _PAGE_PCD,
};
-EXPORT_SYMBOL_GPL(__cachemode2pte_tbl);
+EXPORT_SYMBOL(__cachemode2pte_tbl);
uint8_t __pte2cachemode_tbl[8] = {
[__pte2cm_idx(0)] = _PAGE_CACHE_MODE_WB,
[__pte2cm_idx(_PAGE_PWT)] = _PAGE_CACHE_MODE_WC,
@@ -54,7 +54,7 @@ uint8_t __pte2cachemode_tbl[8] = {
[__pte2cm_idx(_PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC_MINUS,
[__pte2cm_idx(_PAGE_PWT | _PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC,
};
-EXPORT_SYMBOL_GPL(__pte2cachemode_tbl);
+EXPORT_SYMBOL(__pte2cachemode_tbl);
static unsigned long __initdata pgt_buf_start;
static unsigned long __initdata pgt_buf_end;
--
2.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules
2015-01-22 11:43 [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules Juergen Gross
@ 2015-01-22 13:49 ` Steven Noonan
2015-01-22 19:38 ` Toshi Kani
2015-01-22 20:55 ` [tip:x86/urgent] x86, mm: Change cachemode exports to non-gpl tip-bot for Juergen Gross
2 siblings, 0 replies; 4+ messages in thread
From: Steven Noonan @ 2015-01-22 13:49 UTC (permalink / raw)
To: Juergen Gross
Cc: H. Peter Anvin, Linux-X86, Thomas Gleixner, Ingo Molnar,
Linux Kernel mailing List, toshi.kani
On Thu, Jan 22, 2015 at 3:43 AM, Juergen Gross <jgross@suse.com> wrote:
> Commit 281d4078bec366d60990add9d91a952953bd0d72 ("x86: Make page
> cache mode a real type") introduced the symbols __cachemode2pte_tbl
> and __pte2cachemode_tbl and exported them via EXPORT_SYMBOL_GPL.
> This will break building out-of-tree non-gpl modules which need to
> set caching mode in ptes.
>
> Change EXPORT_SYMBOL_GPL to EXPORT-SYMBOL for these two symbols.
>
> Reported-by: Stevan Noonan <steven@uplinklabs.net>
Steven, not "Stevan". :)
Otherwise, patch looks good. Already tested an identical change
locally and it unbroke the out-of-tree module builds.
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> arch/x86/mm/init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
> index 08a7d31..079c3b6 100644
> --- a/arch/x86/mm/init.c
> +++ b/arch/x86/mm/init.c
> @@ -43,7 +43,7 @@ uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
> [_PAGE_CACHE_MODE_WT] = _PAGE_PCD,
> [_PAGE_CACHE_MODE_WP] = _PAGE_PCD,
> };
> -EXPORT_SYMBOL_GPL(__cachemode2pte_tbl);
> +EXPORT_SYMBOL(__cachemode2pte_tbl);
> uint8_t __pte2cachemode_tbl[8] = {
> [__pte2cm_idx(0)] = _PAGE_CACHE_MODE_WB,
> [__pte2cm_idx(_PAGE_PWT)] = _PAGE_CACHE_MODE_WC,
> @@ -54,7 +54,7 @@ uint8_t __pte2cachemode_tbl[8] = {
> [__pte2cm_idx(_PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC_MINUS,
> [__pte2cm_idx(_PAGE_PWT | _PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC,
> };
> -EXPORT_SYMBOL_GPL(__pte2cachemode_tbl);
> +EXPORT_SYMBOL(__pte2cachemode_tbl);
>
> static unsigned long __initdata pgt_buf_start;
> static unsigned long __initdata pgt_buf_end;
> --
> 2.1.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules
2015-01-22 11:43 [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules Juergen Gross
2015-01-22 13:49 ` Steven Noonan
@ 2015-01-22 19:38 ` Toshi Kani
2015-01-22 20:55 ` [tip:x86/urgent] x86, mm: Change cachemode exports to non-gpl tip-bot for Juergen Gross
2 siblings, 0 replies; 4+ messages in thread
From: Toshi Kani @ 2015-01-22 19:38 UTC (permalink / raw)
To: Juergen Gross; +Cc: hpa, x86, tglx, mingo, linux-kernel, steven
On Thu, 2015-01-22 at 12:43 +0100, Juergen Gross wrote:
> Commit 281d4078bec366d60990add9d91a952953bd0d72 ("x86: Make page
> cache mode a real type") introduced the symbols __cachemode2pte_tbl
> and __pte2cachemode_tbl and exported them via EXPORT_SYMBOL_GPL.
> This will break building out-of-tree non-gpl modules which need to
> set caching mode in ptes.
>
> Change EXPORT_SYMBOL_GPL to EXPORT-SYMBOL for these two symbols.
>
> Reported-by: Stevan Noonan <steven@uplinklabs.net>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
-Toshi
> ---
> arch/x86/mm/init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
> index 08a7d31..079c3b6 100644
> --- a/arch/x86/mm/init.c
> +++ b/arch/x86/mm/init.c
> @@ -43,7 +43,7 @@ uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
> [_PAGE_CACHE_MODE_WT] = _PAGE_PCD,
> [_PAGE_CACHE_MODE_WP] = _PAGE_PCD,
> };
> -EXPORT_SYMBOL_GPL(__cachemode2pte_tbl);
> +EXPORT_SYMBOL(__cachemode2pte_tbl);
> uint8_t __pte2cachemode_tbl[8] = {
> [__pte2cm_idx(0)] = _PAGE_CACHE_MODE_WB,
> [__pte2cm_idx(_PAGE_PWT)] = _PAGE_CACHE_MODE_WC,
> @@ -54,7 +54,7 @@ uint8_t __pte2cachemode_tbl[8] = {
> [__pte2cm_idx(_PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC_MINUS,
> [__pte2cm_idx(_PAGE_PWT | _PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC,
> };
> -EXPORT_SYMBOL_GPL(__pte2cachemode_tbl);
> +EXPORT_SYMBOL(__pte2cachemode_tbl);
>
> static unsigned long __initdata pgt_buf_start;
> static unsigned long __initdata pgt_buf_end;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:x86/urgent] x86, mm: Change cachemode exports to non-gpl
2015-01-22 11:43 [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules Juergen Gross
2015-01-22 13:49 ` Steven Noonan
2015-01-22 19:38 ` Toshi Kani
@ 2015-01-22 20:55 ` tip-bot for Juergen Gross
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Juergen Gross @ 2015-01-22 20:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: steven, linux-kernel, toshi.kani, jgross, hpa, tglx, mingo
Commit-ID: 31bb7723706ba9660504a6c3903ea46198f98fd1
Gitweb: http://git.kernel.org/tip/31bb7723706ba9660504a6c3903ea46198f98fd1
Author: Juergen Gross <jgross@suse.com>
AuthorDate: Thu, 22 Jan 2015 12:43:17 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 22 Jan 2015 21:50:14 +0100
x86, mm: Change cachemode exports to non-gpl
Commit 281d4078bec3 ("x86: Make page cache mode a real type")
introduced the symbols __cachemode2pte_tbl and __pte2cachemode_tbl and
exported them via EXPORT_SYMBOL_GPL. The exports are part of a
replacement of code which has been EXPORT_SYMBOL before these changes
resulting in build breakage of out-of-tree non-gpl modules.
Change EXPORT_SYMBOL_GPL to EXPORT-SYMBOL for these two symbols.
Fixes: 281d4078bec3 "x86: Make page cache mode a real type"
Reported-and-tested-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Link: http://lkml.kernel.org/r/1421926997-28615-1-git-send-email-jgross@suse.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/mm/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 08a7d31..079c3b6 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -43,7 +43,7 @@ uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
[_PAGE_CACHE_MODE_WT] = _PAGE_PCD,
[_PAGE_CACHE_MODE_WP] = _PAGE_PCD,
};
-EXPORT_SYMBOL_GPL(__cachemode2pte_tbl);
+EXPORT_SYMBOL(__cachemode2pte_tbl);
uint8_t __pte2cachemode_tbl[8] = {
[__pte2cm_idx(0)] = _PAGE_CACHE_MODE_WB,
[__pte2cm_idx(_PAGE_PWT)] = _PAGE_CACHE_MODE_WC,
@@ -54,7 +54,7 @@ uint8_t __pte2cachemode_tbl[8] = {
[__pte2cm_idx(_PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC_MINUS,
[__pte2cm_idx(_PAGE_PWT | _PAGE_PCD | _PAGE_PAT)] = _PAGE_CACHE_MODE_UC,
};
-EXPORT_SYMBOL_GPL(__pte2cachemode_tbl);
+EXPORT_SYMBOL(__pte2cachemode_tbl);
static unsigned long __initdata pgt_buf_start;
static unsigned long __initdata pgt_buf_end;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-22 20:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 11:43 [PATCH] x86: change cachemode symbols to non-gpl to avoid breaking out-of-tree modules Juergen Gross
2015-01-22 13:49 ` Steven Noonan
2015-01-22 19:38 ` Toshi Kani
2015-01-22 20:55 ` [tip:x86/urgent] x86, mm: Change cachemode exports to non-gpl tip-bot for Juergen Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox