aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-02-12 15:19:16 -0500
committerChristoph Lameter <clameter@sgi.com>2008-02-12 15:19:16 -0500
commit9e40ade04c45a46f6b3d647e0bdac1a32bfaa3a9 (patch)
tree17852dd654c37bf86cf3d98c692eef4c6fa73a2c
parent7cc718d56c8297bd3a3c106ca09e8abf9814bb27 (diff)
parent96b5a46e2a72dc1829370c87053e0cd558d58bc0 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
-rw-r--r--MAINTAINERS2
-rw-r--r--arch/ia64/Kconfig7
-rw-r--r--arch/x86/mm/pageattr-test.c7
-rw-r--r--arch/x86/vdso/Makefile22
-rw-r--r--drivers/acpi/wmi.c4
-rw-r--r--drivers/ata/libata-core.c48
-rw-r--r--drivers/ata/pata_amd.c2
-rw-r--r--drivers/ata/pata_legacy.c2
-rw-r--r--drivers/ata/pata_ninja32.c9
-rw-r--r--drivers/ata/pata_via.c6
-rw-r--r--drivers/ata/sata_mv.c50
-rw-r--r--drivers/net/mlx4/alloc.c1
-rw-r--r--include/asm-generic/topology.h10
-rw-r--r--include/asm-ia64/param.h10
-rw-r--r--include/linux/cpuset.h3
-rw-r--r--mm/memory.c2
-rw-r--r--mm/mempolicy.c61
17 files changed, 143 insertions, 103 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index c40f0ae96552..6680ec44779e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3561,6 +3561,8 @@ P: Christoph Lameter
3561M: clameter@sgi.com 3561M: clameter@sgi.com
3562P: Pekka Enberg 3562P: Pekka Enberg
3563M: penberg@cs.helsinki.fi 3563M: penberg@cs.helsinki.fi
3564P: Matt Mackall
3565M: mpm@selenic.com
3564L: linux-mm@kvack.org 3566L: linux-mm@kvack.org
3565S: Maintained 3567S: Maintained
3566 3568
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 2d4fcd01bc91..dff9edfc7465 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -232,7 +232,14 @@ config PGTABLE_4
232 232
233endchoice 233endchoice
234 234
235if IA64_HP_SIM
236config HZ
237 default 32
238endif
239
240if !IA64_HP_SIM
235source kernel/Kconfig.hz 241source kernel/Kconfig.hz
242endif
236 243
237config IA64_BRL_EMU 244config IA64_BRL_EMU
238 bool 245 bool
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index ed8201600354..75f1b109aae8 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -40,7 +40,6 @@ struct split_state {
40static int print_split(struct split_state *s) 40static int print_split(struct split_state *s)
41{ 41{
42 long i, expected, missed = 0; 42 long i, expected, missed = 0;
43 int printed = 0;
44 int err = 0; 43 int err = 0;
45 44
46 s->lpg = s->gpg = s->spg = s->exec = 0; 45 s->lpg = s->gpg = s->spg = s->exec = 0;
@@ -53,12 +52,6 @@ static int print_split(struct split_state *s)
53 52
54 pte = lookup_address(addr, &level); 53 pte = lookup_address(addr, &level);
55 if (!pte) { 54 if (!pte) {
56 if (!printed) {
57 dump_pagetable(addr);
58 printk(KERN_INFO "CPA %lx no pte level %d\n",
59 addr, level);
60 printed = 1;
61 }
62 missed++; 55 missed++;
63 i++; 56 i++;
64 continue; 57 continue;
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index d28dda574700..f385a4b4a484 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -7,7 +7,7 @@ VDSO32-$(CONFIG_X86_32) := y
7VDSO32-$(CONFIG_COMPAT) := y 7VDSO32-$(CONFIG_COMPAT) := y
8 8
9vdso-install-$(VDSO64-y) += vdso.so 9vdso-install-$(VDSO64-y) += vdso.so
10vdso-install-$(VDSO32-y) += $(vdso32-y:=.so) 10vdso-install-$(VDSO32-y) += $(vdso32-images)
11 11
12 12
13# files to link into the vdso 13# files to link into the vdso
@@ -63,6 +63,8 @@ vdso32.so-$(CONFIG_X86_32) += int80
63vdso32.so-$(CONFIG_COMPAT) += syscall 63vdso32.so-$(CONFIG_COMPAT) += syscall
64vdso32.so-$(VDSO32-y) += sysenter 64vdso32.so-$(VDSO32-y) += sysenter
65 65
66vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
67
66CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) 68CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
67VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 69VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
68 70
@@ -71,21 +73,21 @@ VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
71override obj-dirs = $(dir $(obj)) $(obj)/vdso32/ 73override obj-dirs = $(dir $(obj)) $(obj)/vdso32/
72 74
73targets += vdso32/vdso32.lds 75targets += vdso32/vdso32.lds
74targets += $(vdso32.so-y:%=vdso32-%.so.dbg) $(vdso32.so-y:%=vdso32-%.so) 76targets += $(vdso32-images) $(vdso32-images:=.dbg)
75targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o) 77targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o)
76 78
77extra-y += $(vdso32.so-y:%=vdso32-%.so) 79extra-y += $(vdso32-images)
78 80
79$(obj)/vdso32.o: $(vdso32.so-y:%=$(obj)/vdso32-%.so) 81$(obj)/vdso32.o: $(vdso32-images:%=$(obj)/%)
80 82
81KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS)) 83KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
82$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) 84$(vdso32-images:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
83$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32 85$(vdso32-images:%=$(obj)/%.dbg): asflags-$(CONFIG_X86_64) += -m32
84 86
85$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): $(obj)/vdso32-%.so.dbg: FORCE \ 87$(vdso32-images:%=$(obj)/%.dbg): $(obj)/vdso32-%.so.dbg: FORCE \
86 $(obj)/vdso32/vdso32.lds \ 88 $(obj)/vdso32/vdso32.lds \
87 $(obj)/vdso32/note.o \ 89 $(obj)/vdso32/note.o \
88 $(obj)/vdso32/%.o 90 $(obj)/vdso32/%.o
89 $(call if_changed,vdso) 91 $(call if_changed,vdso)
90 92
91# Make vdso32-*-syms.lds from each image, and then make sure they match. 93# Make vdso32-*-syms.lds from each image, and then make sure they match.
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
index 36b84ab418dd..457ed3d3f51c 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -673,11 +673,11 @@ static int __init acpi_wmi_init(void)
673{ 673{
674 acpi_status result; 674 acpi_status result;
675 675
676 INIT_LIST_HEAD(&wmi_blocks.list);
677
676 if (acpi_disabled) 678 if (acpi_disabled)
677 return -ENODEV; 679 return -ENODEV;
678 680
679 INIT_LIST_HEAD(&wmi_blocks.list);
680
681 result = acpi_bus_register_driver(&acpi_wmi_driver); 681 result = acpi_bus_register_driver(&acpi_wmi_driver);
682 682
683 if (result < 0) { 683 if (result < 0) {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3011919f3ec8..004dae4ea5bc 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3048,6 +3048,8 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel)
3048static int ata_dev_set_mode(struct ata_device *dev) 3048static int ata_dev_set_mode(struct ata_device *dev)
3049{ 3049{
3050 struct ata_eh_context *ehc = &dev->link->eh_context; 3050 struct ata_eh_context *ehc = &dev->link->eh_context;
3051 const char *dev_err_whine = "";
3052 int ign_dev_err = 0;
3051 unsigned int err_mask; 3053 unsigned int err_mask;
3052 int rc; 3054 int rc;
3053 3055
@@ -3057,41 +3059,57 @@ static int ata_dev_set_mode(struct ata_device *dev)
3057 3059
3058 err_mask = ata_dev_set_xfermode(dev); 3060 err_mask = ata_dev_set_xfermode(dev);
3059 3061
3062 if (err_mask & ~AC_ERR_DEV)
3063 goto fail;
3064
3065 /* revalidate */
3066 ehc->i.flags |= ATA_EHI_POST_SETMODE;
3067 rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0);
3068 ehc->i.flags &= ~ATA_EHI_POST_SETMODE;
3069 if (rc)
3070 return rc;
3071
3060 /* Old CFA may refuse this command, which is just fine */ 3072 /* Old CFA may refuse this command, which is just fine */
3061 if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id)) 3073 if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id))
3062 err_mask &= ~AC_ERR_DEV; 3074 ign_dev_err = 1;
3063 3075
3064 /* Some very old devices and some bad newer ones fail any kind of 3076 /* Some very old devices and some bad newer ones fail any kind of
3065 SET_XFERMODE request but support PIO0-2 timings and no IORDY */ 3077 SET_XFERMODE request but support PIO0-2 timings and no IORDY */
3066 if (dev->xfer_shift == ATA_SHIFT_PIO && !ata_id_has_iordy(dev->id) && 3078 if (dev->xfer_shift == ATA_SHIFT_PIO && !ata_id_has_iordy(dev->id) &&
3067 dev->pio_mode <= XFER_PIO_2) 3079 dev->pio_mode <= XFER_PIO_2)
3068 err_mask &= ~AC_ERR_DEV; 3080 ign_dev_err = 1;
3069 3081
3070 /* Early MWDMA devices do DMA but don't allow DMA mode setting. 3082 /* Early MWDMA devices do DMA but don't allow DMA mode setting.
3071 Don't fail an MWDMA0 set IFF the device indicates it is in MWDMA0 */ 3083 Don't fail an MWDMA0 set IFF the device indicates it is in MWDMA0 */
3072 if (dev->xfer_shift == ATA_SHIFT_MWDMA && 3084 if (dev->xfer_shift == ATA_SHIFT_MWDMA &&
3073 dev->dma_mode == XFER_MW_DMA_0 && 3085 dev->dma_mode == XFER_MW_DMA_0 &&
3074 (dev->id[63] >> 8) & 1) 3086 (dev->id[63] >> 8) & 1)
3075 err_mask &= ~AC_ERR_DEV; 3087 ign_dev_err = 1;
3076 3088
3077 if (err_mask) { 3089 /* if the device is actually configured correctly, ignore dev err */
3078 ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " 3090 if (dev->xfer_mode == ata_xfer_mask2mode(ata_id_xfermask(dev->id)))
3079 "(err_mask=0x%x)\n", err_mask); 3091 ign_dev_err = 1;
3080 return -EIO;
3081 }
3082 3092
3083 ehc->i.flags |= ATA_EHI_POST_SETMODE; 3093 if (err_mask & AC_ERR_DEV) {
3084 rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0); 3094 if (!ign_dev_err)
3085 ehc->i.flags &= ~ATA_EHI_POST_SETMODE; 3095 goto fail;
3086 if (rc) 3096 else
3087 return rc; 3097 dev_err_whine = " (device error ignored)";
3098 }
3088 3099
3089 DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", 3100 DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n",
3090 dev->xfer_shift, (int)dev->xfer_mode); 3101 dev->xfer_shift, (int)dev->xfer_mode);
3091 3102
3092 ata_dev_printk(dev, KERN_INFO, "configured for %s\n", 3103 ata_dev_printk(dev, KERN_INFO, "configured for %s%s\n",
3093 ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode))); 3104 ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)),
3105 dev_err_whine);
3106
3094 return 0; 3107 return 0;
3108
3109 fail:
3110 ata_dev_printk(dev, KERN_ERR, "failed to set xfermode "
3111 "(err_mask=0x%x)\n", err_mask);
3112 return -EIO;
3095} 3113}
3096 3114
3097/** 3115/**
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 761a66608d7b..ea567e2b1703 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -772,7 +772,7 @@ static void __exit amd_exit(void)
772} 772}
773 773
774MODULE_AUTHOR("Alan Cox"); 774MODULE_AUTHOR("Alan Cox");
775MODULE_DESCRIPTION("low-level driver for AMD PATA IDE"); 775MODULE_DESCRIPTION("low-level driver for AMD and Nvidia PATA IDE");
776MODULE_LICENSE("GPL"); 776MODULE_LICENSE("GPL");
777MODULE_DEVICE_TABLE(pci, amd); 777MODULE_DEVICE_TABLE(pci, amd);
778MODULE_VERSION(DRV_VERSION); 778MODULE_VERSION(DRV_VERSION);
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 333dc15f8ccf..6c59969fd50b 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -127,7 +127,7 @@ static int opti82c611a; /* Opti82c611A on primary 1, sec 2, both 3 */
127static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */ 127static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */
128static int qdi; /* Set to probe QDI controllers */ 128static int qdi; /* Set to probe QDI controllers */
129static int winbond; /* Set to probe Winbond controllers, 129static int winbond; /* Set to probe Winbond controllers,
130 give I/O port if non stdanard */ 130 give I/O port if non standard */
131static int autospeed; /* Chip present which snoops speed changes */ 131static int autospeed; /* Chip present which snoops speed changes */
132static int pio_mask = 0x1F; /* PIO range for autospeed devices */ 132static int pio_mask = 0x1F; /* PIO range for autospeed devices */
133static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */ 133static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 1c1b83541d13..15dd649f89ee 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -17,6 +17,7 @@
17 * Base + 0x00 IRQ Status 17 * Base + 0x00 IRQ Status
18 * Base + 0x01 IRQ control 18 * Base + 0x01 IRQ control
19 * Base + 0x02 Chipset control 19 * Base + 0x02 Chipset control
20 * Base + 0x03 Unknown
20 * Base + 0x04 VDMA and reset control + wait bits 21 * Base + 0x04 VDMA and reset control + wait bits
21 * Base + 0x08 BMIMBA 22 * Base + 0x08 BMIMBA
22 * Base + 0x0C DMA Length 23 * Base + 0x0C DMA Length
@@ -174,8 +175,12 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
174 ata_std_ports(&ap->ioaddr); 175 ata_std_ports(&ap->ioaddr);
175 176
176 iowrite8(0x05, base + 0x01); /* Enable interrupt lines */ 177 iowrite8(0x05, base + 0x01); /* Enable interrupt lines */
177 iowrite8(0xB3, base + 0x02); /* Burst, ?? setup */ 178 iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */
178 iowrite8(0x00, base + 0x04); /* WAIT0 ? */ 179 iowrite8(0x01, base + 0x03); /* Unknown */
180 iowrite8(0x20, base + 0x04); /* WAIT0 */
181 iowrite8(0x8f, base + 0x05); /* Unknown */
182 iowrite8(0xa4, base + 0x1c); /* Unknown */
183 iowrite8(0x83, base + 0x1d); /* BMDMA control: WAIT0 */
179 /* FIXME: Should we disable them at remove ? */ 184 /* FIXME: Should we disable them at remove ? */
180 return ata_host_activate(host, dev->irq, ata_interrupt, 185 return ata_host_activate(host, dev->irq, ata_interrupt,
181 IRQF_SHARED, &ninja32_sht); 186 IRQF_SHARED, &ninja32_sht);
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 39627ab684bf..d119a68c388f 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -84,6 +84,7 @@ enum {
84 VIA_BAD_ID = 0x100, /* Has wrong vendor ID (0x1107) */ 84 VIA_BAD_ID = 0x100, /* Has wrong vendor ID (0x1107) */
85 VIA_BAD_AST = 0x200, /* Don't touch Address Setup Timing */ 85 VIA_BAD_AST = 0x200, /* Don't touch Address Setup Timing */
86 VIA_NO_ENABLES = 0x400, /* Has no enablebits */ 86 VIA_NO_ENABLES = 0x400, /* Has no enablebits */
87 VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */
87}; 88};
88 89
89/* 90/*
@@ -100,7 +101,7 @@ static const struct via_isa_bridge {
100 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 101 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
101 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 102 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
102 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 103 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
103 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 104 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA },
104 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, 105 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES},
105 { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 106 { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
106 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 107 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -172,6 +173,9 @@ static int via_cable_detect(struct ata_port *ap) {
172 if (via_cable_override(pdev)) 173 if (via_cable_override(pdev))
173 return ATA_CBL_PATA40_SHORT; 174 return ATA_CBL_PATA40_SHORT;
174 175
176 if ((config->flags & VIA_SATA_PATA) && ap->port_no == 0)
177 return ATA_CBL_SATA;
178
175 /* Early chips are 40 wire */ 179 /* Early chips are 40 wire */
176 if ((config->flags & VIA_UDMA) < VIA_UDMA_66) 180 if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
177 return ATA_CBL_PATA40; 181 return ATA_CBL_PATA40;
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 080b8362f8d6..04b571764aff 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1716,14 +1716,16 @@ static void mv_host_intr(struct ata_host *host, u32 relevant, unsigned int hc)
1716 VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n", 1716 VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n",
1717 hc, relevant, hc_irq_cause); 1717 hc, relevant, hc_irq_cause);
1718 1718
1719 for (port = port0; port < port0 + last_port; port++) { 1719 for (port = port0; port < last_port; port++) {
1720 struct ata_port *ap = host->ports[port]; 1720 struct ata_port *ap = host->ports[port];
1721 struct mv_port_priv *pp = ap->private_data; 1721 struct mv_port_priv *pp;
1722 int have_err_bits, hard_port, shift; 1722 int have_err_bits, hard_port, shift;
1723 1723
1724 if ((!ap) || (ap->flags & ATA_FLAG_DISABLED)) 1724 if ((!ap) || (ap->flags & ATA_FLAG_DISABLED))
1725 continue; 1725 continue;
1726 1726
1727 pp = ap->private_data;
1728
1727 shift = port << 1; /* (port * 2) */ 1729 shift = port << 1; /* (port * 2) */
1728 if (port >= MV_PORTS_PER_HC) { 1730 if (port >= MV_PORTS_PER_HC) {
1729 shift++; /* skip bit 8 in the HC Main IRQ reg */ 1731 shift++; /* skip bit 8 in the HC Main IRQ reg */
@@ -2879,6 +2881,26 @@ done:
2879 return rc; 2881 return rc;
2880} 2882}
2881 2883
2884static int mv_create_dma_pools(struct mv_host_priv *hpriv, struct device *dev)
2885{
2886 hpriv->crqb_pool = dmam_pool_create("crqb_q", dev, MV_CRQB_Q_SZ,
2887 MV_CRQB_Q_SZ, 0);
2888 if (!hpriv->crqb_pool)
2889 return -ENOMEM;
2890
2891 hpriv->crpb_pool = dmam_pool_create("crpb_q", dev, MV_CRPB_Q_SZ,
2892 MV_CRPB_Q_SZ, 0);
2893 if (!hpriv->crpb_pool)
2894 return -ENOMEM;
2895
2896 hpriv->sg_tbl_pool = dmam_pool_create("sg_tbl", dev, MV_SG_TBL_SZ,
2897 MV_SG_TBL_SZ, 0);
2898 if (!hpriv->sg_tbl_pool)
2899 return -ENOMEM;
2900
2901 return 0;
2902}
2903
2882/** 2904/**
2883 * mv_platform_probe - handle a positive probe of an soc Marvell 2905 * mv_platform_probe - handle a positive probe of an soc Marvell
2884 * host 2906 * host
@@ -2932,6 +2954,10 @@ static int mv_platform_probe(struct platform_device *pdev)
2932 hpriv->base = ioremap(res->start, res->end - res->start + 1); 2954 hpriv->base = ioremap(res->start, res->end - res->start + 1);
2933 hpriv->base -= MV_SATAHC0_REG_BASE; 2955 hpriv->base -= MV_SATAHC0_REG_BASE;
2934 2956
2957 rc = mv_create_dma_pools(hpriv, &pdev->dev);
2958 if (rc)
2959 return rc;
2960
2935 /* initialize adapter */ 2961 /* initialize adapter */
2936 rc = mv_init_host(host, chip_soc); 2962 rc = mv_init_host(host, chip_soc);
2937 if (rc) 2963 if (rc)
@@ -3068,26 +3094,6 @@ static void mv_print_info(struct ata_host *host)
3068 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); 3094 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx");
3069} 3095}
3070 3096
3071static int mv_create_dma_pools(struct mv_host_priv *hpriv, struct device *dev)
3072{
3073 hpriv->crqb_pool = dmam_pool_create("crqb_q", dev, MV_CRQB_Q_SZ,
3074 MV_CRQB_Q_SZ, 0);
3075 if (!hpriv->crqb_pool)
3076 return -ENOMEM;
3077
3078 hpriv->crpb_pool = dmam_pool_create("crpb_q", dev, MV_CRPB_Q_SZ,
3079 MV_CRPB_Q_SZ, 0);
3080 if (!hpriv->crpb_pool)
3081 return -ENOMEM;
3082
3083 hpriv->sg_tbl_pool = dmam_pool_create("sg_tbl", dev, MV_SG_TBL_SZ,
3084 MV_SG_TBL_SZ, 0);
3085 if (!hpriv->sg_tbl_pool)
3086 return -ENOMEM;
3087
3088 return 0;
3089}
3090
3091/** 3097/**
3092 * mv_pci_init_one - handle a positive probe of a PCI Marvell host 3098 * mv_pci_init_one - handle a positive probe of a PCI Marvell host
3093 * @pdev: PCI device found 3099 * @pdev: PCI device found
diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c
index 521dc0322ee4..75ef9d0d974d 100644
--- a/drivers/net/mlx4/alloc.c
+++ b/drivers/net/mlx4/alloc.c
@@ -34,6 +34,7 @@
34#include <linux/slab.h> 34#include <linux/slab.h>
35#include <linux/bitmap.h> 35#include <linux/bitmap.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/vmalloc.h>
37 38
38#include "mlx4.h" 39#include "mlx4.h"
39 40
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 5d9d70cd17fc..342a2a0105c4 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -30,19 +30,19 @@
30/* Other architectures wishing to use this simple topology API should fill 30/* Other architectures wishing to use this simple topology API should fill
31 in the below functions as appropriate in their own <asm/topology.h> file. */ 31 in the below functions as appropriate in their own <asm/topology.h> file. */
32#ifndef cpu_to_node 32#ifndef cpu_to_node
33#define cpu_to_node(cpu) (0) 33#define cpu_to_node(cpu) ((void)(cpu),0)
34#endif 34#endif
35#ifndef parent_node 35#ifndef parent_node
36#define parent_node(node) (0) 36#define parent_node(node) ((void)(node),0)
37#endif 37#endif
38#ifndef node_to_cpumask 38#ifndef node_to_cpumask
39#define node_to_cpumask(node) (cpu_online_map) 39#define node_to_cpumask(node) ((void)node, cpu_online_map)
40#endif 40#endif
41#ifndef node_to_first_cpu 41#ifndef node_to_first_cpu
42#define node_to_first_cpu(node) (0) 42#define node_to_first_cpu(node) ((void)(node),0)
43#endif 43#endif
44#ifndef pcibus_to_node 44#ifndef pcibus_to_node
45#define pcibus_to_node(node) (-1) 45#define pcibus_to_node(bus) ((void)(bus), -1)
46#endif 46#endif
47 47
48#ifndef pcibus_to_cpumask 48#ifndef pcibus_to_cpumask
diff --git a/include/asm-ia64/param.h b/include/asm-ia64/param.h
index 49c62dd5eccf..0964c32c1358 100644
--- a/include/asm-ia64/param.h
+++ b/include/asm-ia64/param.h
@@ -19,15 +19,7 @@
19#define MAXHOSTNAMELEN 64 /* max length of hostname */ 19#define MAXHOSTNAMELEN 64 /* max length of hostname */
20 20
21#ifdef __KERNEL__ 21#ifdef __KERNEL__
22# ifdef CONFIG_IA64_HP_SIM 22# define HZ CONFIG_HZ
23 /*
24 * Yeah, simulating stuff is slow, so let us catch some breath between
25 * timer interrupts...
26 */
27# define HZ 32
28# else
29# define HZ CONFIG_HZ
30# endif
31# define USER_HZ HZ 23# define USER_HZ HZ
32# define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ 24# define CLOCKS_PER_SEC HZ /* frequency at which times() counts */
33#else 25#else
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index f8c9a2752f06..0a26be353cb3 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -26,8 +26,6 @@ extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
26#define cpuset_current_mems_allowed (current->mems_allowed) 26#define cpuset_current_mems_allowed (current->mems_allowed)
27void cpuset_init_current_mems_allowed(void); 27void cpuset_init_current_mems_allowed(void);
28void cpuset_update_task_memory_state(void); 28void cpuset_update_task_memory_state(void);
29#define cpuset_nodes_subset_current_mems_allowed(nodes) \
30 nodes_subset((nodes), current->mems_allowed)
31int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); 29int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
32 30
33extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); 31extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask);
@@ -103,7 +101,6 @@ static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
103#define cpuset_current_mems_allowed (node_states[N_HIGH_MEMORY]) 101#define cpuset_current_mems_allowed (node_states[N_HIGH_MEMORY])
104static inline void cpuset_init_current_mems_allowed(void) {} 102static inline void cpuset_init_current_mems_allowed(void) {}
105static inline void cpuset_update_task_memory_state(void) {} 103static inline void cpuset_update_task_memory_state(void) {}
106#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
107 104
108static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) 105static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
109{ 106{
diff --git a/mm/memory.c b/mm/memory.c
index e5628a5fd678..717aa0e3be2d 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -989,6 +989,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
989 int i; 989 int i;
990 unsigned int vm_flags; 990 unsigned int vm_flags;
991 991
992 if (len <= 0)
993 return 0;
992 /* 994 /*
993 * Require read or write permissions. 995 * Require read or write permissions.
994 * If 'force' is set, we only require the "MAY" flags. 996 * If 'force' is set, we only require the "MAY" flags.
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 83c69f8a64c2..8d246c3b340f 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -116,22 +116,51 @@ static void mpol_rebind_policy(struct mempolicy *pol,
116/* Do sanity checking on a policy */ 116/* Do sanity checking on a policy */
117static int mpol_check_policy(int mode, nodemask_t *nodes) 117static int mpol_check_policy(int mode, nodemask_t *nodes)
118{ 118{
119 int empty = nodes_empty(*nodes); 119 int was_empty, is_empty;
120
121 if (!nodes)
122 return 0;
123
124 /*
125 * "Contextualize" the in-coming nodemast for cpusets:
126 * Remember whether in-coming nodemask was empty, If not,
127 * restrict the nodes to the allowed nodes in the cpuset.
128 * This is guaranteed to be a subset of nodes with memory.
129 */
130 cpuset_update_task_memory_state();
131 is_empty = was_empty = nodes_empty(*nodes);
132 if (!was_empty) {
133 nodes_and(*nodes, *nodes, cpuset_current_mems_allowed);
134 is_empty = nodes_empty(*nodes); /* after "contextualization" */
135 }
120 136
121 switch (mode) { 137 switch (mode) {
122 case MPOL_DEFAULT: 138 case MPOL_DEFAULT:
123 if (!empty) 139 /*
140 * require caller to specify an empty nodemask
141 * before "contextualization"
142 */
143 if (!was_empty)
124 return -EINVAL; 144 return -EINVAL;
125 break; 145 break;
126 case MPOL_BIND: 146 case MPOL_BIND:
127 case MPOL_INTERLEAVE: 147 case MPOL_INTERLEAVE:
128 /* Preferred will only use the first bit, but allow 148 /*
129 more for now. */ 149 * require at least 1 valid node after "contextualization"
130 if (empty) 150 */
151 if (is_empty)
152 return -EINVAL;
153 break;
154 case MPOL_PREFERRED:
155 /*
156 * Did caller specify invalid nodes?
157 * Don't silently accept this as "local allocation".
158 */
159 if (!was_empty && is_empty)
131 return -EINVAL; 160 return -EINVAL;
132 break; 161 break;
133 } 162 }
134 return nodes_subset(*nodes, node_states[N_HIGH_MEMORY]) ? 0 : -EINVAL; 163 return 0;
135} 164}
136 165
137/* Generate a custom zonelist for the BIND policy. */ 166/* Generate a custom zonelist for the BIND policy. */
@@ -188,8 +217,6 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes)
188 switch (mode) { 217 switch (mode) {
189 case MPOL_INTERLEAVE: 218 case MPOL_INTERLEAVE:
190 policy->v.nodes = *nodes; 219 policy->v.nodes = *nodes;
191 nodes_and(policy->v.nodes, policy->v.nodes,
192 node_states[N_HIGH_MEMORY]);
193 if (nodes_weight(policy->v.nodes) == 0) { 220 if (nodes_weight(policy->v.nodes) == 0) {
194 kmem_cache_free(policy_cache, policy); 221 kmem_cache_free(policy_cache, policy);
195 return ERR_PTR(-EINVAL); 222 return ERR_PTR(-EINVAL);
@@ -421,18 +448,6 @@ static int mbind_range(struct vm_area_struct *vma, unsigned long start,
421 return err; 448 return err;
422} 449}
423 450
424static int contextualize_policy(int mode, nodemask_t *nodes)
425{
426 if (!nodes)
427 return 0;
428
429 cpuset_update_task_memory_state();
430 if (!cpuset_nodes_subset_current_mems_allowed(*nodes))
431 return -EINVAL;
432 return mpol_check_policy(mode, nodes);
433}
434
435
436/* 451/*
437 * Update task->flags PF_MEMPOLICY bit: set iff non-default 452 * Update task->flags PF_MEMPOLICY bit: set iff non-default
438 * mempolicy. Allows more rapid checking of this (combined perhaps 453 * mempolicy. Allows more rapid checking of this (combined perhaps
@@ -468,7 +483,7 @@ static long do_set_mempolicy(int mode, nodemask_t *nodes)
468{ 483{
469 struct mempolicy *new; 484 struct mempolicy *new;
470 485
471 if (contextualize_policy(mode, nodes)) 486 if (mpol_check_policy(mode, nodes))
472 return -EINVAL; 487 return -EINVAL;
473 new = mpol_new(mode, nodes); 488 new = mpol_new(mode, nodes);
474 if (IS_ERR(new)) 489 if (IS_ERR(new))
@@ -915,10 +930,6 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len,
915 err = get_nodes(&nodes, nmask, maxnode); 930 err = get_nodes(&nodes, nmask, maxnode);
916 if (err) 931 if (err)
917 return err; 932 return err;
918#ifdef CONFIG_CPUSETS
919 /* Restrict the nodes to the allowed nodes in the cpuset */
920 nodes_and(nodes, nodes, current->mems_allowed);
921#endif
922 return do_mbind(start, len, mode, &nodes, flags); 933 return do_mbind(start, len, mode, &nodes, flags);
923} 934}
924 935