2.6.26-rc7: x86 build error

Previous thread: Re: 2.6.26-rc: SPARC: Sun Ultra 10 can not boot by David Miller on Friday, June 20, 2008 - 3:51 pm. (20 messages)

Next thread: [PATCH] alpha: link failure fix by Ivan Kokshaysky on Friday, June 20, 2008 - 4:26 pm. (3 messages)
From: Linus Torvalds
Date: Friday, June 20, 2008 - 4:42 pm

Another week, another -rc.

And as usual, it's mainly drivers and arch updates - over 90% of changes 
are in one or the other. A big part of it (about two thirds of the driver 
update, in fact) is a late-dropping AGP/DRM update that adds support for 
some new Intel and ATI graphics cards. And a big part of the arch update 
is the inevitable def_config updates, of course.

I'm not all that happy about the timing of the support for the new cards, 
but at the same time I also hate delaying new drivers. Obviously the hope 
is that it can't cause any regressions, since the added code is almost 
entirely for stuff that simply wasn't supported at all before.

If you ignore the driver and arch updates, the rest is pretty minor. About 
half is in networking, and half of the remaining is filesystems updates 
(mainly ocfs2). And random smatterings elsewhere, like some scheduler 
updates.

Full shortlog appended.

		Linus

---

Abhijeet Kolekar (1):
      mac80211 : fix for iwconfig in ad-hoc mode

Adrian Bunk (1):
      [POWERPC] Build fix for drivers/macintosh/mediabay.c

Alex Chiang (1):
      [IA64] Update check_sal_cache_flush to use platform_send_ipi()

Alex Deucher (9):
      radeon: add production microcode from AMD
      drm/radeon: IGP clean up register and magic numbers.
      drm/radeon: merge IGP chip setup and fixup RS400 vs RS480 support
      drm/radeon: write AGP_BASE_2 on chips that support it.
      drm/radeon: fix pixcache and purge/cache flushing registers
      drm/radeon: fixup radeon_do_engine_reset
      drm/radeon: init pipe setup in kernel code.
      drm/radeon: switch IGP gart to use radeon_write_agp_base()
      drm/radeon: use DSTCACHE_CTLSTAT rather than RB2D_DSTCACHE_CTLSTAT

Amit Kucheria (1):
      agp: add support for Radeon Mobility 9000 chipset

Andrew G. Morgan (1):
      capabilities: add (back) dummy support for KEEPCAPS

Andrew Morton (1):
      [POWERPC] Fix warning in pseries/eeh_driver.c

Aneesh Kumar K.V (1):
      m68k: ...
From: Adrian Bunk
Date: Saturday, June 21, 2008 - 2:55 am

Commit d3942cff620bea073fc4e3c8ed878eb1e84615ce
(x86: use BOOTMEM_EXCLUSIVE on 32-bit)
causes the following compile error:

<--  snip  -->

...
  CC      arch/x86/kernel/setup_32.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/x86/kernel/setup_32.c: In function 
From: Johannes Weiner
Date: Saturday, June 21, 2008 - 10:01 am

Hi,


Yes, this triggers it since reserve_bootmem() is then defined to be
reserve_bootmem_node() which returns void while the
!CONFIG_HAVE_ARCH_BOOTMEM_NODE version of reserve_bootmem() in bootmem.c
already returns int.

The following fix is needed:

---

From: Bernhard Walle <bwalle@suse.de>
Subject: Add return value to reserve_bootmem_node()

This patch changes the function reserve_bootmem_node() from void to int,
returning -ENOMEM if the allocation fails.


Signed-off-by: Bernhard Walle <bwalle@suse.de>;

---

Actually, there was a discussion to return -EBUSY instead of -ENOMEM but
in the end it does not matter, because callsites just check for negative
return values.  -hannes

 include/linux/bootmem.h |    2 +-
 mm/bootmem.c            |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(p
 				       unsigned long freepfn,
 				       unsigned long startpfn,
 				       unsigned long endpfn);
-extern void reserve_bootmem_node(pg_data_t *pgdat,
+extern int reserve_bootmem_node(pg_data_t *pgdat,
 				 unsigned long physaddr,
 				 unsigned long size,
 				 int flags);
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -442,15 +442,17 @@ unsigned long __init init_bootmem_node(p
 	return init_bootmem_core(pgdat, freepfn, startpfn, endpfn);
 }
 
-void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
+int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
 				 unsigned long size, int flags)
 {
 	int ret;
 
 	ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
 	if (ret < 0)
-		return;
+		return -ENOMEM;
 	reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
+
+	return 0;
 }
 
 void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
--

From: Jeff Chua
Date: Sunday, June 22, 2008 - 12:12 am

On Sat, Jun 21, 2008 at 7:42 AM, Linus Torvalds

[89f5b7da2a6bad2e84670422ab8192382a5aeb9f]

This broke vmware 6.0.4.
Jun 22 14:53:03.845: vmx| NOT_IMPLEMENTED
/build/mts/release/bora-93057/bora/vmx/main/vmmonPosix.c:774

Reverting the patch makes vmware runs again. I don't know enough to
fix this, so would be more than test any patches.

Thanks,
Jeff.
--

From: Linus Torvalds
Date: Sunday, June 22, 2008 - 9:29 am

Hmm. Can you see which part of it broke? Was it the "fix XIP" part ot the 
ZERO_PAGE part? The easiest way to test is to apply this patch, and see 
(it just disables the XIP part of fix)

		Linus
---
 mm/memory.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 9aefaae..9056132 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1023,8 +1023,12 @@ out:
 	return page;
 
 bad_page:
+#if 0
 	pte_unmap_unlock(ptep, ptl);
 	return ERR_PTR(-EFAULT);
+#else
+	return NULL;
+#endif
 
 no_page:
 	pte_unmap_unlock(ptep, ptl);
--

From: Linus Torvalds
Date: Sunday, June 22, 2008 - 10:26 am

Side note: considering what the patch fixes, I don't actually think we can 
undo it. But there's a possibility that we've actually uncovered an old 
bug that just was very unusual before, because the FOLL_ANON code was much 
harder to trigger before that patch (it only triggered if you didn't have 
a page table fully set up - now it triggers for even just a single missing 
page rather than a whole page table).

And I do see something pretty iffy in the logic for whether it can use 
FOLL_ANON or not - it had a nonsensical test for VM_LOCKED (which makes no 
sense at all), and it had never been taught about the ->nopfn() way of 
filling page tables.

So assuming it's not the XIP fix, you could try this patch instead. It 
replaces the (insane) use of VM_LOCKED with VM_SHARED (which is a lot more 
meaningful for the case of ZERO_PAGE, but strictly speaking probably 
doesn't matter either), and it teaches it about the fact that 
non-anonymous pages can be populated not just with the "->fault" handler, 
but with "->nopfn" too.

I really don't think it's due to this (nobody sane really uses '->nopfn'), 
but if the XIP disabling patch doesn't make a difference, give it a try.

(Most of the patch is obviously the fact that I moved the conditionals 
into a helper inline function to make the dang thing more readable). The 
actual change is trivial.

		Linus

---
 mm/memory.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 9aefaae..8c5675f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1045,6 +1045,15 @@ no_page_table:
 	return page;
 }
 
+/* Can we do the FOLL_ANON optimization? */
+static inline int use_zero_page(struct vm_area_struct *vma)
+{
+	if (vma->vm_flags & VM_SHARED)
+		return 0;
+	return !vma->vm_ops ||
+		(!vma->vm_ops->fault && !vma->vm_ops->nopfn);
+}
+
 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 		unsigned long start, int len, int write, int force,
 		struct ...
From: Jeff Chua
Date: Monday, June 23, 2008 - 8:21 am

On Mon, Jun 23, 2008 at 1:26 AM, Linus Torvalds

Linus,

This one fixes the problem! So, it's something strange that VMware is
doing, but anyway, glad you fix it!!!

Thanks for the patch.

--

From: Jeff Chua
Date: Monday, June 23, 2008 - 8:18 am

On Mon, Jun 23, 2008 at 12:29 AM, Linus Torvalds

This one doesn't fix it.

Thanks,
--

From: Arjan van de Ven
Date: Sunday, June 22, 2008 - 9:58 am

On Sun, 22 Jun 2008 15:12:27 +0800

is this the open source vmware guest modules, the proprietary vmware
guest modules or the proprietary "vmware as host" kernel stuff ?


--

From: Jeff Chua
Date: Monday, June 23, 2008 - 8:26 am

I believe this is the proprietary "vmware as host" binary since
vmmonPosix.c is no where to be found.

The open source vmware guest module doesn't work with vmware 6.0.4 so
I've to use the proprietary vmware guest module compiled to run on
2.6.26-rc7.

Thanks,
Jeff.
--

Previous thread: Re: 2.6.26-rc: SPARC: Sun Ultra 10 can not boot by David Miller on Friday, June 20, 2008 - 3:51 pm. (20 messages)

Next thread: [PATCH] alpha: link failure fix by Ivan Kokshaysky on Friday, June 20, 2008 - 4:26 pm. (3 messages)