linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-arch@vger.kernel.org
Subject: Re: ia64 broken by transparent huge pages - other arches too?
Date: Fri, 14 Jan 2011 19:30:58 +0100	[thread overview]
Message-ID: <20110114183058.GN9506@random.random> (raw)
In-Reply-To: <4d308cf5394566ccc@agluck-desktop.sc.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]

On Fri, Jan 14, 2011 at 09:50:45AM -0800, Luck, Tony wrote:
> In file included from /home/aegl/generic-smp/arch/ia64/include/asm/pgtable.h:611,
>                  from include/linux/mm.h:41,
>                  from /home/aegl/generic-smp/arch/ia64/include/asm/uaccess.h:39,
>                  from include/linux/poll.h:14,
>                  from include/linux/rtc.h:117,
>                  from include/linux/efi.h:19,
>                  from /home/aegl/generic-smp/arch/ia64/include/asm/sal.h:40,
>                  from /home/aegl/generic-smp/arch/ia64/include/asm/mca.h:20,
>                  from arch/ia64/kernel/asm-offsets.c:17:
> include/asm-generic/pgtable.h: In function ‘pmdp_get_and_clear’:
> include/asm-generic/pgtable.h:96: error: implicit declaration of function ‘__pmd’
> include/asm-generic/pgtable.h:96: error: incompatible types in return
> make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1
> 
> 
> Looks like arch/*/include/pgtable.h needs to define __pmd() but only x86
> was blessed with it.

So I fixed powerpc build and sparc but broke ia64 with this change
sorry, hard to make all archs build consistent. See the attached mails.

Would you be willing to implement __pmd for ia64 to fix this? Can you
check if this works?

Thanks a lot,
Andrea

========
Subject: fix ia64 build failure in pmdp_get_and_clear

From: Andrea Arcangeli <aarcange@redhat.com>

Implement __pmd macro for ia64 too.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/arch/ia64/include/asm/page.h b/arch/ia64/include/asm/page.h
index 41b6d31..961a16f 100644
--- a/arch/ia64/include/asm/page.h
+++ b/arch/ia64/include/asm/page.h
@@ -189,6 +189,7 @@ get_order (unsigned long size)
 # define pgprot_val(x)	((x).pgprot)
 
 # define __pte(x)	((pte_t) { (x) } )
+# define __pmd(x)	((pmd_t) { (x) } )
 # define __pgprot(x)	((pgprot_t) { (x) } )
 
 #else /* !STRICT_MM_TYPECHECKS */

[-- Attachment #2: Type: message/rfc822, Size: 1212 bytes --]

From: Andrea Arcangeli <aarcange@redhat.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH -mm] fix powerpc/sparc build
Date: Mon, 10 Jan 2011 19:04:25 +0100
Message-ID: <20110110180425.GK9506@random.random>

This would become
thp-add-pmd-mangling-generic-functions-fix-pgtableh-build-for-um-2.patch

=====
Subject: thp: build fix for pmdp_get_and_clear

From: Andrea Arcangeli <aarcange@redhat.com>

__pmd should return a valid pmd_t for every arch.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---


diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -93,7 +93,7 @@ static inline pmd_t pmdp_get_and_clear(s
 				       pmd_t *pmdp)
 {
 	BUG();
-	return (pmd_t){ 0 };
+	return __pmd(0);
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 #endif


[-- Attachment #3: Type: message/rfc822, Size: 5024 bytes --]

[-- Attachment #3.1.1: Type: text/plain, Size: 1458 bytes --]

Hi Andrew,

On Thu, 06 Jan 2011 15:41:14 -0800 akpm@linux-foundation.org wrote:
>
> The mm-of-the-moment snapshot 2011-01-06-15-41 has been uploaded to
> 
>    http://userweb.kernel.org/~akpm/mmotm/

Build results here: http://kisskb.ellerman.id.au/kisskb/head/3605/

Notably:

powerpc pmac32_defconfig:

In file included from arch/powerpc/include/asm/pgtable.h:200,
                 from include/linux/mm.h:41,
                 from include/linux/mman.h:14,
                 from arch/powerpc/kernel/asm-offsets.c:22:
include/asm-generic/pgtable.h: In function 'pmdp_get_and_clear':
include/asm-generic/pgtable.h:96: warning: missing braces around initializer
include/asm-generic/pgtable.h:96: warning: (near initialization for '(anonymous).pud')

sparc defconfig:

In file included from arch/sparc/include/asm/pgtable_32.h:456,
                 from arch/sparc/include/asm/pgtable.h:7,
                 from include/linux/mm.h:42,
                 from arch/sparc/kernel/sys_sparc_32.c:12:
include/asm-generic/pgtable.h: In function 'pmdp_get_and_clear':
include/asm-generic/pgtable.h:96: error: missing braces around initializer
include/asm-generic/pgtable.h:96: error: (near initialization for '(anonymous).pmdv')

Probably a side effect of
thp-add-pmd-mangling-generic-functions-fix-pgtableh-build-for-um.patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #3.1.2: Type: application/pgp-signature, Size: 490 bytes --]

  parent reply	other threads:[~2011-01-14 18:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 17:50 ia64 broken by transparent huge pages - other arches too? Luck, Tony
2011-01-14 17:50 ` Luck, Tony
2011-01-14 18:30 ` Andrea Arcangeli [this message]
2011-01-14 18:50   ` Tony Luck
2011-01-14 19:03     ` Andrea Arcangeli
2011-01-15  7:21 ` Benjamin Herrenschmidt
2011-01-15 15:59   ` Andrea Arcangeli
2011-01-15 16:47     ` James Bottomley
2011-01-15 17:23       ` Andrea Arcangeli
2011-01-15 19:02         ` Geert Uytterhoeven
2011-01-15 21:31         ` Benjamin Herrenschmidt
2011-01-16 21:05   ` Linus Torvalds
2011-01-16 21:10     ` Andrew Morton
2011-01-16 22:06       ` Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110114183058.GN9506@random.random \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).