diff --git a/[refs] b/[refs]
index a22eac8c7aa2..8ec8b43176ad 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: ed62178589929d248a0aaf4018ca3867e2f96d9d
+refs/heads/master: 3f735b76a4e654bee652cbbeb405b9b3ef950316
diff --git a/trunk/CREDITS b/trunk/CREDITS
index 64511e2abc8e..6957ef4efab3 100644
--- a/trunk/CREDITS
+++ b/trunk/CREDITS
@@ -3643,9 +3643,11 @@ S: Cambridge. CB1 7EG
S: England
N: Chris Wright
-E: chrisw@sous-sol.org
+E: chrisw@osdl.org
D: hacking on LSM framework and security modules.
-S: Portland, OR
+S: c/o OSDL
+S: 12725 SW Millikan Way, Suite 400
+S: Beaverton, OR 97005
S: USA
N: Michal Wronski
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 3d7d30dc5439..c39fb20f8589 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -1631,8 +1631,8 @@ S: Supported
LINUX SECURITY MODULE (LSM) FRAMEWORK
P: Chris Wright
-M: chrisw@sous-sol.org
-L: linux-security-module@vger.kernel.org
+M: chrisw@osdl.org
+L: linux-security-module@wirex.com
W: http://lsm.immunix.org
T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git
S: Supported
diff --git a/trunk/Makefile b/trunk/Makefile
index 65a0337bebe0..46eea76bc570 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -905,7 +905,7 @@ define filechk_version.h
)
endef
-include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE
+include/linux/version.h: $(srctree)/Makefile .config FORCE
$(call filechk,version.h)
# ---------------------------------------------------------------------------
diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c
index da677f829f76..9006063e7369 100644
--- a/trunk/arch/alpha/kernel/irq.c
+++ b/trunk/arch/alpha/kernel/irq.c
@@ -151,13 +151,8 @@ handle_irq(int irq, struct pt_regs * regs)
}
irq_enter();
- /*
- * __do_IRQ() must be called with IPL_MAX. Note that we do not
- * explicitly enable interrupts afterwards - some MILO PALcode
- * (namely LX164 one) seems to have severe problems with RTI
- * at IPL 0.
- */
local_irq_disable();
__do_IRQ(irq, regs);
+ local_irq_enable();
irq_exit();
}
diff --git a/trunk/arch/ia64/kernel/ivt.S b/trunk/arch/ia64/kernel/ivt.S
index dcd906fe5749..9f80569a32b0 100644
--- a/trunk/arch/ia64/kernel/ivt.S
+++ b/trunk/arch/ia64/kernel/ivt.S
@@ -561,12 +561,11 @@ ENTRY(dirty_bit)
;; // avoid RAW on r18
mov ar.ccv=r18 // set compare value for cmpxchg
or r25=_PAGE_D|_PAGE_A,r18 // set the dirty and accessed bits
- tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit
;;
-(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only update if page is present
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
mov r24=PAGE_SHIFT<<2
;;
-(p6) cmp.eq p6,p7=r26,r18 // Only compare if page is present
+ cmp.eq p6,p7=r26,r18
;;
(p6) itc.d r25 // install updated PTE
;;
@@ -627,12 +626,11 @@ ENTRY(iaccess_bit)
;;
mov ar.ccv=r18 // set compare value for cmpxchg
or r25=_PAGE_A,r18 // set the accessed bit
- tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit
;;
-(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only if page present
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
mov r24=PAGE_SHIFT<<2
;;
-(p6) cmp.eq p6,p7=r26,r18 // Only if page present
+ cmp.eq p6,p7=r26,r18
;;
(p6) itc.i r25 // install updated PTE
;;
@@ -682,12 +680,11 @@ ENTRY(daccess_bit)
;; // avoid RAW on r18
mov ar.ccv=r18 // set compare value for cmpxchg
or r25=_PAGE_A,r18 // set the dirty bit
- tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit
;;
-(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only if page is present
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
mov r24=PAGE_SHIFT<<2
;;
-(p6) cmp.eq p6,p7=r26,r18 // Only if page is present
+ cmp.eq p6,p7=r26,r18
;;
(p6) itc.d r25 // install updated PTE
/*
diff --git a/trunk/arch/s390/lib/spinlock.c b/trunk/arch/s390/lib/spinlock.c
index b9b7958a226a..60f80a4eed4e 100644
--- a/trunk/arch/s390/lib/spinlock.c
+++ b/trunk/arch/s390/lib/spinlock.c
@@ -2,7 +2,8 @@
* arch/s390/lib/spinlock.c
* Out of line spinlock code.
*
- * Copyright (C) IBM Corp. 2004, 2006
+ * S390 version
+ * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
*/
@@ -43,8 +44,6 @@ _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc)
_diag44();
count = spin_retry;
}
- if (__raw_spin_is_locked(lp))
- continue;
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
return;
}
@@ -57,8 +56,6 @@ _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc)
int count = spin_retry;
while (count-- > 0) {
- if (__raw_spin_is_locked(lp))
- continue;
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
return 1;
}
@@ -77,8 +74,6 @@ _raw_read_lock_wait(raw_rwlock_t *rw)
_diag44();
count = spin_retry;
}
- if (!__raw_read_can_lock(rw))
- continue;
old = rw->lock & 0x7fffffffU;
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
return;
@@ -93,8 +88,6 @@ _raw_read_trylock_retry(raw_rwlock_t *rw)
int count = spin_retry;
while (count-- > 0) {
- if (!__raw_read_can_lock(rw))
- continue;
old = rw->lock & 0x7fffffffU;
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
return 1;
@@ -113,8 +106,6 @@ _raw_write_lock_wait(raw_rwlock_t *rw)
_diag44();
count = spin_retry;
}
- if (!__raw_write_can_lock(rw))
- continue;
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
return;
}
@@ -127,8 +118,6 @@ _raw_write_trylock_retry(raw_rwlock_t *rw)
int count = spin_retry;
while (count-- > 0) {
- if (!__raw_write_can_lock(rw))
- continue;
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
return 1;
}
diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig
index e9b275d90737..e73621d03a28 100644
--- a/trunk/arch/sh/Kconfig
+++ b/trunk/arch/sh/Kconfig
@@ -392,9 +392,9 @@ config SH_TMU
endmenu
-#source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
+source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
-#source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
+source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
config SH_PCLK_FREQ
int "Peripheral clock frequency (in Hz)"
diff --git a/trunk/arch/xtensa/Kconfig b/trunk/arch/xtensa/Kconfig
index e90ef5db8913..7ee4a14ec3b1 100644
--- a/trunk/arch/xtensa/Kconfig
+++ b/trunk/arch/xtensa/Kconfig
@@ -26,10 +26,6 @@ config GENERIC_HARDIRQS
bool
default y
-config RWSEM_GENERIC_SPINLOCK
- bool
- default y
-
source "init/Kconfig"
menu "Processor type and features"
diff --git a/trunk/drivers/edac/Kconfig b/trunk/drivers/edac/Kconfig
index 52f3eb45d2b9..18a455651121 100644
--- a/trunk/drivers/edac/Kconfig
+++ b/trunk/drivers/edac/Kconfig
@@ -6,29 +6,17 @@
# $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $
#
-menu 'EDAC - error detection and reporting (RAS) (EXPERIMENTAL)'
+menu 'EDAC - error detection and reporting (RAS)'
config EDAC
- tristate "EDAC core system error reporting (EXPERIMENTAL)"
- depends on X86 && EXPERIMENTAL
+ tristate "EDAC core system error reporting"
+ depends on X86
help
EDAC is designed to report errors in the core system.
These are low-level errors that are reported in the CPU or
supporting chipset: memory errors, cache errors, PCI errors,
thermal throttling, etc.. If unsure, select 'Y'.
- If this code is reporting problems on your system, please
- see the EDAC project web pages for more information at:
-
-
-
- and:
-
-
-
- There is also a mailing list for the EDAC project, which can
- be found via the sourceforge page.
-
comment "Reporting subsystems"
depends on EDAC
diff --git a/trunk/drivers/edac/edac_mc.c b/trunk/drivers/edac/edac_mc.c
index 262e44544dc8..b10ee4698b1d 100644
--- a/trunk/drivers/edac/edac_mc.c
+++ b/trunk/drivers/edac/edac_mc.c
@@ -132,13 +132,11 @@ static struct kobject edac_pci_kobj;
* /sys/devices/system/edac/mc;
* data structures and methods
*/
-#if 0
static ssize_t memctrl_string_show(void *ptr, char *buffer)
{
char *value = (char*) ptr;
return sprintf(buffer, "%s\n", value);
}
-#endif
static ssize_t memctrl_int_show(void *ptr, char *buffer)
{
@@ -209,9 +207,7 @@ struct memctrl_dev_attribute attr_##_name = { \
};
/* cwrow attribute f*/
-#if 0
MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL);
-#endif
/* csrow control files */
MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store);
@@ -226,6 +222,7 @@ static struct memctrl_dev_attribute *memctrl_attr[] = {
&attr_log_ue,
&attr_log_ce,
&attr_poll_msec,
+ &attr_mc_version,
NULL,
};
@@ -312,8 +309,6 @@ struct list_control {
int *count;
};
-
-#if 0
/* Output the list as: vendor_id:device:id<,vendor_id:device_id> */
static ssize_t edac_pci_list_string_show(void *ptr, char *buffer)
{
@@ -435,7 +430,6 @@ static ssize_t edac_pci_list_string_store(void *ptr, const char *buffer,
return count;
}
-#endif
static ssize_t edac_pci_int_show(void *ptr, char *buffer)
{
int *value = ptr;
@@ -504,7 +498,6 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
.store = _store, \
};
-#if 0
static struct list_control pci_whitelist_control = {
.list = pci_whitelist,
.count = &pci_whitelist_count
@@ -527,7 +520,6 @@ EDAC_PCI_STRING_ATTR(pci_parity_blacklist,
S_IRUGO|S_IWUSR,
edac_pci_list_string_show,
edac_pci_list_string_store);
-#endif
/* PCI Parity control files */
EDAC_PCI_ATTR(check_pci_parity,S_IRUGO|S_IWUSR,edac_pci_int_show,edac_pci_int_store);
@@ -539,6 +531,8 @@ static struct edac_pci_dev_attribute *edac_pci_attr[] = {
&edac_pci_attr_check_pci_parity,
&edac_pci_attr_panic_on_pci_parity,
&edac_pci_attr_pci_parity_count,
+ &edac_pci_attr_pci_parity_whitelist,
+ &edac_pci_attr_pci_parity_blacklist,
NULL,
};
diff --git a/trunk/drivers/firmware/dcdbas.c b/trunk/drivers/firmware/dcdbas.c
index 4652512f7d1a..8ed6ddbb9c5d 100644
--- a/trunk/drivers/firmware/dcdbas.c
+++ b/trunk/drivers/firmware/dcdbas.c
@@ -39,7 +39,7 @@
#include "dcdbas.h"
#define DRIVER_NAME "dcdbas"
-#define DRIVER_VERSION "5.6.0-2"
+#define DRIVER_VERSION "5.6.0-1"
#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
static struct platform_device *dcdbas_pdev;
@@ -581,13 +581,9 @@ static int __init dcdbas_init(void)
*/
static void __exit dcdbas_exit(void)
{
- /*
- * make sure functions that use dcdbas_pdev are called
- * before platform_device_unregister
- */
+ platform_device_unregister(dcdbas_pdev);
unregister_reboot_notifier(&dcdbas_reboot_nb);
smi_data_buf_free();
- platform_device_unregister(dcdbas_pdev);
}
module_init(dcdbas_init);
diff --git a/trunk/drivers/input/mouse/psmouse-base.c b/trunk/drivers/input/mouse/psmouse-base.c
index ad6217467676..19b1b0121726 100644
--- a/trunk/drivers/input/mouse/psmouse-base.c
+++ b/trunk/drivers/input/mouse/psmouse-base.c
@@ -58,7 +58,7 @@ static unsigned int psmouse_resetafter = 5;
module_param_named(resetafter, psmouse_resetafter, uint, 0644);
MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
-static unsigned int psmouse_resync_time;
+static unsigned int psmouse_resync_time = 5;
module_param_named(resync_time, psmouse_resync_time, uint, 0644);
MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never).");
diff --git a/trunk/drivers/md/raid1.c b/trunk/drivers/md/raid1.c
index 5d88329e3c7a..d39f584cd8b3 100644
--- a/trunk/drivers/md/raid1.c
+++ b/trunk/drivers/md/raid1.c
@@ -306,7 +306,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state);
conf_t *conf = mddev_to_conf(r1_bio->mddev);
- struct bio *to_put = NULL;
if (bio->bi_size)
return 1;
@@ -324,7 +323,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
* this branch is our 'one mirror IO has finished' event handler:
*/
r1_bio->bios[mirror] = NULL;
- to_put = bio;
if (!uptodate) {
md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
/* an I/O failed, we can't clear the bitmap */
@@ -377,7 +375,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
/* Don't dec_pending yet, we want to hold
* the reference over the retry
*/
- goto out;
+ return 0;
}
if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
/* free extra copy of the data pages */
@@ -394,11 +392,10 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
raid_end_bio_io(r1_bio);
}
- rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
- out:
- if (to_put)
- bio_put(to_put);
+ if (r1_bio->bios[mirror]==NULL)
+ bio_put(bio);
+ rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
return 0;
}
@@ -860,7 +857,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
atomic_set(&r1_bio->remaining, 0);
atomic_set(&r1_bio->behind_remaining, 0);
- do_barriers = bio_barrier(bio);
+ do_barriers = bio->bi_rw & BIO_RW_BARRIER;
if (do_barriers)
set_bit(R1BIO_Barrier, &r1_bio->state);
diff --git a/trunk/drivers/misc/ibmasm/ibmasm.h b/trunk/drivers/misc/ibmasm/ibmasm.h
index 6aba41954448..1cef2387fa65 100644
--- a/trunk/drivers/misc/ibmasm/ibmasm.h
+++ b/trunk/drivers/misc/ibmasm/ibmasm.h
@@ -101,16 +101,15 @@ struct command {
static inline void command_put(struct command *cmd)
{
unsigned long flags;
- spinlock_t *lock = cmd->lock;
- spin_lock_irqsave(lock, flags);
- kobject_put(&cmd->kobj);
- spin_unlock_irqrestore(lock, flags);
+ spin_lock_irqsave(cmd->lock, flags);
+ kobject_put(&cmd->kobj);
+ spin_unlock_irqrestore(cmd->lock, flags);
}
static inline void command_get(struct command *cmd)
{
- kobject_get(&cmd->kobj);
+ kobject_get(&cmd->kobj);
}
diff --git a/trunk/drivers/net/tulip/de2104x.c b/trunk/drivers/net/tulip/de2104x.c
index d7fb3ffe06ac..9e9e1fe92914 100644
--- a/trunk/drivers/net/tulip/de2104x.c
+++ b/trunk/drivers/net/tulip/de2104x.c
@@ -1362,7 +1362,6 @@ static int de_open (struct net_device *dev)
{
struct de_private *de = dev->priv;
int rc;
- unsigned long flags;
if (netif_msg_ifup(de))
printk(KERN_DEBUG "%s: enabling interface\n", dev->name);
@@ -1376,18 +1375,20 @@ static int de_open (struct net_device *dev)
return rc;
}
- rc = de_init_hw(de);
- if (rc) {
- printk(KERN_ERR "%s: h/w init failure, err=%d\n",
- dev->name, rc);
- goto err_out_free;
- }
+ dw32(IntrMask, 0);
rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev);
if (rc) {
printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
dev->name, dev->irq, rc);
- goto err_out_hw;
+ goto err_out_free;
+ }
+
+ rc = de_init_hw(de);
+ if (rc) {
+ printk(KERN_ERR "%s: h/w init failure, err=%d\n",
+ dev->name, rc);
+ goto err_out_free_irq;
}
netif_start_queue(dev);
@@ -1395,11 +1396,8 @@ static int de_open (struct net_device *dev)
return 0;
-err_out_hw:
- spin_lock_irqsave(&de->lock, flags);
- de_stop_hw(de);
- spin_unlock_irqrestore(&de->lock, flags);
-
+err_out_free_irq:
+ free_irq(dev->irq, dev);
err_out_free:
de_free_rings(de);
return rc;
diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c
index bb96ce1db08c..54ad93daca3c 100644
--- a/trunk/drivers/pcmcia/ds.c
+++ b/trunk/drivers/pcmcia/ds.c
@@ -411,7 +411,7 @@ static int pcmcia_device_probe(struct device * dev)
* pseudo devices, and if not, add the second one.
*/
did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
- if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
+ if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
(p_dev->socket->device_count == 1) && (p_dev->device_no == 0))
pcmcia_add_pseudo_device(p_dev->socket);
diff --git a/trunk/drivers/s390/block/dasd_proc.c b/trunk/drivers/s390/block/dasd_proc.c
index 1aa3c261718a..4c1acc8daa82 100644
--- a/trunk/drivers/s390/block/dasd_proc.c
+++ b/trunk/drivers/s390/block/dasd_proc.c
@@ -94,7 +94,7 @@ dasd_devices_show(struct seq_file *m, void *v)
seq_printf(m, "basic");
break;
case DASD_STATE_UNFMT:
- seq_printf(m, "unformatted");
+ seq_printf(m, "unnformatted");
break;
case DASD_STATE_READY:
case DASD_STATE_ONLINE:
diff --git a/trunk/drivers/serial/ioc4_serial.c b/trunk/drivers/serial/ioc4_serial.c
index a37579ce6d76..f3763d2ccb86 100644
--- a/trunk/drivers/serial/ioc4_serial.c
+++ b/trunk/drivers/serial/ioc4_serial.c
@@ -2301,6 +2301,7 @@ static void receive_chars(struct uart_port *the_port)
int read_count, request_count = IOC4_MAX_CHARS;
struct uart_icount *icount;
struct uart_info *info = the_port->info;
+ int flip = 0;
unsigned long pflags;
/* Make sure all the pointers are "good" ones */
@@ -2312,7 +2313,7 @@ static void receive_chars(struct uart_port *the_port)
spin_lock_irqsave(&the_port->lock, pflags);
tty = info->tty;
- request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS);
+ request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS - 2);
if (request_count > 0) {
icount = &the_port->icount;
@@ -2325,7 +2326,8 @@ static void receive_chars(struct uart_port *the_port)
spin_unlock_irqrestore(&the_port->lock, pflags);
- tty_flip_buffer_push(tty);
+ if (flip)
+ tty_flip_buffer_push(tty);
}
/**
diff --git a/trunk/drivers/video/arcfb.c b/trunk/drivers/video/arcfb.c
index 466042808daf..df8e5667b348 100644
--- a/trunk/drivers/video/arcfb.c
+++ b/trunk/drivers/video/arcfb.c
@@ -253,7 +253,7 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper,
{
unsigned char *src;
unsigned int xindex, yindex, chipindex, linesize;
- int i;
+ int i, count;
unsigned char val;
unsigned char bitmask, rightshift;
@@ -282,6 +282,7 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper,
}
ks108_writeb_data(par, chipindex, val);
left++;
+ count++;
if (bitmask == 0x80) {
bitmask = 1;
src++;
@@ -459,11 +460,11 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou
inode = file->f_dentry->d_inode;
fbidx = iminor(inode);
info = registered_fb[fbidx];
+ par = info->par;
if (!info || !info->screen_base)
return -ENODEV;
- par = info->par;
xres = info->var.xres;
fbmemlength = (xres * info->var.yres)/8;
diff --git a/trunk/drivers/video/aty/aty128fb.c b/trunk/drivers/video/aty/aty128fb.c
index 620c9a934e0e..bfc8a93b2c73 100644
--- a/trunk/drivers/video/aty/aty128fb.c
+++ b/trunk/drivers/video/aty/aty128fb.c
@@ -1326,7 +1326,7 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
unsigned char post_dividers[] = {1,2,4,8,3,6,12};
u32 output_freq;
u32 vclk; /* in .01 MHz */
- int i = 0;
+ int i;
u32 n, d;
vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */
@@ -1340,16 +1340,15 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
/* now, find an acceptable divider */
for (i = 0; i < sizeof(post_dividers); i++) {
output_freq = post_dividers[i] * vclk;
- if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) {
- pll->post_divider = post_dividers[i];
+ if (output_freq >= c.ppll_min && output_freq <= c.ppll_max)
break;
- }
}
/* calculate feedback divider */
n = c.ref_divider * output_freq;
d = c.ref_clk;
+ pll->post_divider = post_dividers[i];
pll->feedback_divider = round_div(n, d);
pll->vclk = vclk;
diff --git a/trunk/drivers/video/aty/radeon_monitor.c b/trunk/drivers/video/aty/radeon_monitor.c
index 98c05bc0de44..7f9838dceab5 100644
--- a/trunk/drivers/video/aty/radeon_monitor.c
+++ b/trunk/drivers/video/aty/radeon_monitor.c
@@ -396,10 +396,6 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
s1[i] = *s;
i++;
}
-
- if (i > 4)
- i = 4;
-
} while (*s++);
if (second)
s2[i] = 0;
diff --git a/trunk/drivers/video/backlight/backlight.c b/trunk/drivers/video/backlight/backlight.c
index 151fda8dded0..bd39bbd88d41 100644
--- a/trunk/drivers/video/backlight/backlight.c
+++ b/trunk/drivers/video/backlight/backlight.c
@@ -172,7 +172,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL);
if (unlikely(!new_bd))
- return ERR_PTR(-ENOMEM);
+ return ERR_PTR(ENOMEM);
init_MUTEX(&new_bd->sem);
new_bd->props = bp;
diff --git a/trunk/drivers/video/backlight/lcd.c b/trunk/drivers/video/backlight/lcd.c
index 86908a60c630..9e32485ee7bb 100644
--- a/trunk/drivers/video/backlight/lcd.c
+++ b/trunk/drivers/video/backlight/lcd.c
@@ -171,7 +171,7 @@ struct lcd_device *lcd_device_register(const char *name, void *devdata,
new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL);
if (unlikely(!new_ld))
- return ERR_PTR(-ENOMEM);
+ return ERR_PTR(ENOMEM);
init_MUTEX(&new_ld->sem);
new_ld->props = lp;
diff --git a/trunk/drivers/video/imsttfb.c b/trunk/drivers/video/imsttfb.c
index 7db42542eb19..ad416ae47596 100644
--- a/trunk/drivers/video/imsttfb.c
+++ b/trunk/drivers/video/imsttfb.c
@@ -1510,8 +1510,6 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
default:
printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
"contact maintainer.\n", pdev->device);
- release_mem_region(addr, size);
- framebuffer_release(info);
return -ENODEV;
}
diff --git a/trunk/drivers/video/intelfb/intelfbdrv.c b/trunk/drivers/video/intelfb/intelfbdrv.c
index 995b47c165a7..6b8bd3cdf9c0 100644
--- a/trunk/drivers/video/intelfb/intelfbdrv.c
+++ b/trunk/drivers/video/intelfb/intelfbdrv.c
@@ -1333,35 +1333,33 @@ intelfb_setcolreg(unsigned regno, unsigned red, unsigned green,
if (regno > 255)
return 1;
- if (dinfo->depth == 8) {
- red >>= 8;
- green >>= 8;
- blue >>= 8;
-
- intelfbhw_setcolreg(dinfo, regno, red, green, blue,
- transp);
- }
+ switch (dinfo->depth) {
+ case 8:
+ {
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
- if (regno < 16) {
- switch (dinfo->depth) {
- case 15:
- dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
- ((green & 0xf800) >> 6) |
- ((blue & 0xf800) >> 11);
- break;
- case 16:
- dinfo->pseudo_palette[regno] = (red & 0xf800) |
- ((green & 0xfc00) >> 5) |
- ((blue & 0xf800) >> 11);
- break;
- case 24:
- dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) |
- (green & 0xff00) |
- ((blue & 0xff00) >> 8);
- break;
+ intelfbhw_setcolreg(dinfo, regno, red, green, blue,
+ transp);
}
+ break;
+ case 15:
+ dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
+ ((green & 0xf800) >> 6) |
+ ((blue & 0xf800) >> 11);
+ break;
+ case 16:
+ dinfo->pseudo_palette[regno] = (red & 0xf800) |
+ ((green & 0xfc00) >> 5) |
+ ((blue & 0xf800) >> 11);
+ break;
+ case 24:
+ dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) |
+ (green & 0xff00) |
+ ((blue & 0xff00) >> 8);
+ break;
}
-
return 0;
}
diff --git a/trunk/drivers/video/kyro/STG4000VTG.c b/trunk/drivers/video/kyro/STG4000VTG.c
index bd389709d234..3690b04190af 100644
--- a/trunk/drivers/video/kyro/STG4000VTG.c
+++ b/trunk/drivers/video/kyro/STG4000VTG.c
@@ -17,7 +17,7 @@
void DisableVGA(volatile STG4000REG __iomem *pSTGReg)
{
u32 tmp;
- volatile u32 count = 0, i;
+ volatile u32 count, i;
/* Reset the VGA registers */
tmp = STG_READ_REG(SoftwareReset);
diff --git a/trunk/drivers/video/neofb.c b/trunk/drivers/video/neofb.c
index b961d5601bd9..a2e201dc40f7 100644
--- a/trunk/drivers/video/neofb.c
+++ b/trunk/drivers/video/neofb.c
@@ -486,8 +486,10 @@ static void vgaHWRestore(const struct fb_info *info,
static inline int neo2200_sync(struct fb_info *info)
{
struct neofb_par *par = info->par;
+ int waitcycles;
- while (readl(&par->neo2200->bltStat) & 1);
+ while (readl(&par->neo2200->bltStat) & 1)
+ waitcycles++;
return 0;
}
diff --git a/trunk/drivers/video/s1d13xxxfb.c b/trunk/drivers/video/s1d13xxxfb.c
index feec47bdd479..e5d0f92eeae3 100644
--- a/trunk/drivers/video/s1d13xxxfb.c
+++ b/trunk/drivers/video/s1d13xxxfb.c
@@ -588,7 +588,6 @@ s1d13xxxfb_probe(struct platform_device *pdev)
goto bail;
}
- platform_set_drvdata(pdev, info);
default_par = info->par;
default_par->regs = ioremap_nocache(pdev->resource[1].start,
pdev->resource[1].end - pdev->resource[1].start +1);
@@ -639,6 +638,8 @@ s1d13xxxfb_probe(struct platform_device *pdev)
goto bail;
}
+ platform_set_drvdata(pdev, info);
+
printk(KERN_INFO "fb%d: %s frame buffer device\n",
info->node, info->fix.id);
diff --git a/trunk/drivers/video/savage/savagefb_driver.c b/trunk/drivers/video/savage/savagefb_driver.c
index 10e6b3aab9ea..ab727eaa7f43 100644
--- a/trunk/drivers/video/savage/savagefb_driver.c
+++ b/trunk/drivers/video/savage/savagefb_driver.c
@@ -2021,8 +2021,8 @@ static int __devinit savagefb_probe (struct pci_dev* dev,
#if defined(CONFIG_FB_SAVAGE_I2C)
savagefb_create_i2c_busses(info);
savagefb_probe_i2c_connector(info, &par->edid);
- fb_edid_to_monspecs(par->edid, &info->monspecs);
kfree(par->edid);
+ fb_edid_to_monspecs(par->edid, &info->monspecs);
fb_videomode_to_modelist(info->monspecs.modedb,
info->monspecs.modedb_len,
&info->modelist);
diff --git a/trunk/drivers/video/tdfxfb.c b/trunk/drivers/video/tdfxfb.c
index 5e5328d682db..3e7baf4c9fa8 100644
--- a/trunk/drivers/video/tdfxfb.c
+++ b/trunk/drivers/video/tdfxfb.c
@@ -786,32 +786,28 @@ static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
if (regno >= info->cmap.len || regno > 255) return 1;
switch (info->fix.visual) {
- case FB_VISUAL_PSEUDOCOLOR:
- rgbcol =(((u32)red & 0xff00) << 8) |
- (((u32)green & 0xff00) << 0) |
- (((u32)blue & 0xff00) >> 8);
- do_setpalentry(par, regno, rgbcol);
- break;
- /* Truecolor has no hardware color palettes. */
- case FB_VISUAL_TRUECOLOR:
- if (regno < 16) {
+ case FB_VISUAL_PSEUDOCOLOR:
+ rgbcol =(((u32)red & 0xff00) << 8) |
+ (((u32)green & 0xff00) << 0) |
+ (((u32)blue & 0xff00) >> 8);
+ do_setpalentry(par, regno, rgbcol);
+ break;
+ /* Truecolor has no hardware color palettes. */
+ case FB_VISUAL_TRUECOLOR:
rgbcol = (CNVT_TOHW( red, info->var.red.length) <<
info->var.red.offset) |
- (CNVT_TOHW( green, info->var.green.length) <<
- info->var.green.offset) |
- (CNVT_TOHW( blue, info->var.blue.length) <<
- info->var.blue.offset) |
- (CNVT_TOHW( transp, info->var.transp.length) <<
- info->var.transp.offset);
- par->palette[regno] = rgbcol;
- }
-
- break;
- default:
- DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
- break;
+ (CNVT_TOHW( green, info->var.green.length) <<
+ info->var.green.offset) |
+ (CNVT_TOHW( blue, info->var.blue.length) <<
+ info->var.blue.offset) |
+ (CNVT_TOHW( transp, info->var.transp.length) <<
+ info->var.transp.offset);
+ par->palette[regno] = rgbcol;
+ break;
+ default:
+ DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
+ break;
}
-
return 0;
}
diff --git a/trunk/fs/ext3/inode.c b/trunk/fs/ext3/inode.c
index 0384e539b88f..3fc4238e9703 100644
--- a/trunk/fs/ext3/inode.c
+++ b/trunk/fs/ext3/inode.c
@@ -1624,14 +1624,15 @@ static int ext3_block_truncate_page(handle_t *handle, struct page *page,
* For "nobh" option, we can only work if we don't need to
* read-in the page - otherwise we create buffers to do the IO.
*/
- if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) &&
- ext3_should_writeback_data(inode) && PageUptodate(page)) {
- kaddr = kmap_atomic(page, KM_USER0);
- memset(kaddr + offset, 0, length);
- flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_USER0);
- set_page_dirty(page);
- goto unlock;
+ if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH)) {
+ if (PageUptodate(page)) {
+ kaddr = kmap_atomic(page, KM_USER0);
+ memset(kaddr + offset, 0, length);
+ flush_dcache_page(page);
+ kunmap_atomic(kaddr, KM_USER0);
+ set_page_dirty(page);
+ goto unlock;
+ }
}
if (!page_has_buffers(page))
diff --git a/trunk/fs/ext3/namei.c b/trunk/fs/ext3/namei.c
index b8f5cd1e540d..8bd8ac077704 100644
--- a/trunk/fs/ext3/namei.c
+++ b/trunk/fs/ext3/namei.c
@@ -2141,8 +2141,7 @@ static int ext3_symlink (struct inode * dir,
* We have a transaction open. All is sweetness. It also sets
* i_size in generic_commit_write().
*/
- err = __page_symlink(inode, symname, l,
- mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
+ err = page_symlink(inode, symname, l);
if (err) {
ext3_dec_count(handle, inode);
ext3_mark_inode_dirty(handle, inode);
diff --git a/trunk/fs/jffs2/nodelist.c b/trunk/fs/jffs2/nodelist.c
index d4d0c41490cd..b635e167a3fa 100644
--- a/trunk/fs/jffs2/nodelist.c
+++ b/trunk/fs/jffs2/nodelist.c
@@ -406,8 +406,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
int err = 0, pointed = 0;
struct jffs2_eraseblock *jeb;
unsigned char *buffer;
- uint32_t crc, ofs, len;
- size_t retlen;
+ uint32_t crc, ofs, retlen, len;
BUG_ON(tn->csize == 0);
diff --git a/trunk/fs/jffs2/readinode.c b/trunk/fs/jffs2/readinode.c
index f1695642d0f7..5f0652df5d47 100644
--- a/trunk/fs/jffs2/readinode.c
+++ b/trunk/fs/jffs2/readinode.c
@@ -112,7 +112,7 @@ static struct jffs2_raw_node_ref *jffs2_first_valid_node(struct jffs2_raw_node_r
* negative error code on failure.
*/
static inline int read_direntry(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref,
- struct jffs2_raw_dirent *rd, size_t read, struct jffs2_full_dirent **fdp,
+ struct jffs2_raw_dirent *rd, uint32_t read, struct jffs2_full_dirent **fdp,
uint32_t *latest_mctime, uint32_t *mctime_ver)
{
struct jffs2_full_dirent *fd;
diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c
index 8dc2b038d5d9..557dcf395ca1 100644
--- a/trunk/fs/namei.c
+++ b/trunk/fs/namei.c
@@ -2613,15 +2613,13 @@ void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
}
}
-int __page_symlink(struct inode *inode, const char *symname, int len,
- gfp_t gfp_mask)
+int page_symlink(struct inode *inode, const char *symname, int len)
{
struct address_space *mapping = inode->i_mapping;
- struct page *page;
+ struct page *page = grab_cache_page(mapping, 0);
int err = -ENOMEM;
char *kaddr;
- page = find_or_create_page(mapping, 0, gfp_mask);
if (!page)
goto fail;
err = mapping->a_ops->prepare_write(NULL, page, 0, len-1);
@@ -2656,12 +2654,6 @@ int __page_symlink(struct inode *inode, const char *symname, int len,
return err;
}
-int page_symlink(struct inode *inode, const char *symname, int len)
-{
- return __page_symlink(inode, symname, len,
- mapping_gfp_mask(inode->i_mapping));
-}
-
struct inode_operations page_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
@@ -2680,7 +2672,6 @@ EXPORT_SYMBOL(lookup_one_len);
EXPORT_SYMBOL(page_follow_link_light);
EXPORT_SYMBOL(page_put_link);
EXPORT_SYMBOL(page_readlink);
-EXPORT_SYMBOL(__page_symlink);
EXPORT_SYMBOL(page_symlink);
EXPORT_SYMBOL(page_symlink_inode_operations);
EXPORT_SYMBOL(path_lookup);
diff --git a/trunk/include/asm-m68k/atomic.h b/trunk/include/asm-m68k/atomic.h
index 862e497c2645..a4a84d5c65d5 100644
--- a/trunk/include/asm-m68k/atomic.h
+++ b/trunk/include/asm-m68k/atomic.h
@@ -55,7 +55,6 @@ static inline int atomic_inc_and_test(atomic_t *v)
}
#ifdef CONFIG_RMW_INSNS
-
static inline int atomic_add_return(int i, atomic_t *v)
{
int t, tmp;
@@ -83,12 +82,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
: "g" (i), "2" (atomic_read(v)));
return t;
}
-
-#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
-#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-
#else /* !CONFIG_RMW_INSNS */
-
static inline int atomic_add_return(int i, atomic_t * v)
{
unsigned long flags;
@@ -116,32 +110,6 @@ static inline int atomic_sub_return(int i, atomic_t * v)
return t;
}
-
-static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
-{
- unsigned long flags;
- int prev;
-
- local_irq_save(flags);
- prev = atomic_read(v);
- if (prev == old)
- atomic_set(v, new);
- local_irq_restore(flags);
- return prev;
-}
-
-static inline int atomic_xchg(atomic_t *v, int new)
-{
- unsigned long flags;
- int prev;
-
- local_irq_save(flags);
- prev = atomic_read(v);
- atomic_set(v, new);
- local_irq_restore(flags);
- return prev;
-}
-
#endif /* !CONFIG_RMW_INSNS */
#define atomic_dec_return(v) atomic_sub_return(1, (v))
@@ -171,6 +139,9 @@ static inline void atomic_set_mask(unsigned long mask, unsigned long *v)
__asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
}
+#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
+
#define atomic_add_unless(v, a, u) \
({ \
int c, old; \
diff --git a/trunk/include/linux/compat_ioctl.h b/trunk/include/linux/compat_ioctl.h
index ae7dfb790df3..8fad50f8e389 100644
--- a/trunk/include/linux/compat_ioctl.h
+++ b/trunk/include/linux/compat_ioctl.h
@@ -696,8 +696,6 @@ COMPATIBLE_IOCTL(MEMLOCK)
COMPATIBLE_IOCTL(MEMUNLOCK)
COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
COMPATIBLE_IOCTL(MEMGETREGIONINFO)
-COMPATIBLE_IOCTL(MEMGETBADBLOCK)
-COMPATIBLE_IOCTL(MEMSETBADBLOCK)
/* NBD */
ULONG_IOCTL(NBD_SET_SOCK)
ULONG_IOCTL(NBD_SET_BLKSIZE)
diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h
index 128d0082522c..51c0c93bdf93 100644
--- a/trunk/include/linux/fs.h
+++ b/trunk/include/linux/fs.h
@@ -1664,8 +1664,6 @@ extern int vfs_follow_link(struct nameidata *, const char *);
extern int page_readlink(struct dentry *, char __user *, int);
extern void *page_follow_link_light(struct dentry *, struct nameidata *);
extern void page_put_link(struct dentry *, struct nameidata *, void *);
-extern int __page_symlink(struct inode *inode, const char *symname, int len,
- gfp_t gfp_mask);
extern int page_symlink(struct inode *inode, const char *symname, int len);
extern struct inode_operations page_symlink_inode_operations;
extern int generic_readlink(struct dentry *, char __user *, int);
diff --git a/trunk/include/linux/gfp.h b/trunk/include/linux/gfp.h
index 7851e6b520cf..20f9148e38d9 100644
--- a/trunk/include/linux/gfp.h
+++ b/trunk/include/linux/gfp.h
@@ -157,9 +157,9 @@ extern void FASTCALL(free_cold_page(struct page *page));
void page_alloc_init(void);
#ifdef CONFIG_NUMA
-void drain_node_pages(int node);
+void drain_remote_pages(void);
#else
-static inline void drain_node_pages(int node) { };
+static inline void drain_remote_pages(void) { };
#endif
#endif /* __LINUX_GFP_H */
diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h
index 62e6314382f0..ff2e09c953b9 100644
--- a/trunk/include/linux/sched.h
+++ b/trunk/include/linux/sched.h
@@ -892,6 +892,7 @@ static inline int pid_alive(struct task_struct *p)
}
extern void free_task(struct task_struct *tsk);
+extern void __put_task_struct(struct task_struct *tsk);
#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
extern void __put_task_struct_cb(struct rcu_head *rhp);
diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c
index a8eab86de7f1..fbea12d7a943 100644
--- a/trunk/kernel/fork.c
+++ b/trunk/kernel/fork.c
@@ -108,10 +108,8 @@ void free_task(struct task_struct *tsk)
}
EXPORT_SYMBOL(free_task);
-void __put_task_struct_cb(struct rcu_head *rhp)
+void __put_task_struct(struct task_struct *tsk)
{
- struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
-
WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE)));
WARN_ON(atomic_read(&tsk->usage));
WARN_ON(tsk == current);
diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c
index 4d46e90f59c3..e82c99f1db64 100644
--- a/trunk/kernel/sched.c
+++ b/trunk/kernel/sched.c
@@ -178,6 +178,13 @@ static unsigned int task_timeslice(task_t *p)
#define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \
< (long long) (sd)->cache_hot_time)
+void __put_task_struct_cb(struct rcu_head *rhp)
+{
+ __put_task_struct(container_of(rhp, struct task_struct, rcu));
+}
+
+EXPORT_SYMBOL_GPL(__put_task_struct_cb);
+
/*
* These are the runqueue data structures:
*/
diff --git a/trunk/mm/memory_hotplug.c b/trunk/mm/memory_hotplug.c
index 1fe76d963ac2..a918f77f02f3 100644
--- a/trunk/mm/memory_hotplug.c
+++ b/trunk/mm/memory_hotplug.c
@@ -130,7 +130,6 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
onlined_pages++;
}
zone->present_pages += onlined_pages;
- zone->zone_pgdat->node_present_pages += onlined_pages;
setup_per_zone_pages_min();
diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c
index 234bd4895d14..791690d7d3fa 100644
--- a/trunk/mm/page_alloc.c
+++ b/trunk/mm/page_alloc.c
@@ -590,20 +590,21 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
}
#ifdef CONFIG_NUMA
-/*
- * Called from the slab reaper to drain pagesets on a particular node that
- * belong to the currently executing processor.
- */
-void drain_node_pages(int nodeid)
+/* Called from the slab reaper to drain remote pagesets */
+void drain_remote_pages(void)
{
- int i, z;
+ struct zone *zone;
+ int i;
unsigned long flags;
local_irq_save(flags);
- for (z = 0; z < MAX_NR_ZONES; z++) {
- struct zone *zone = NODE_DATA(nodeid)->node_zones + z;
+ for_each_zone(zone) {
struct per_cpu_pageset *pset;
+ /* Do not drain local pagesets */
+ if (zone->zone_pgdat->node_id == numa_node_id())
+ continue;
+
pset = zone_pcp(zone, smp_processor_id());
for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
struct per_cpu_pages *pcp;
diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c
index 67f0e20b101f..d8ce5ff61454 100644
--- a/trunk/mm/rmap.c
+++ b/trunk/mm/rmap.c
@@ -537,6 +537,9 @@ void page_add_new_anon_rmap(struct page *page,
*/
void page_add_file_rmap(struct page *page)
{
+ BUG_ON(PageAnon(page));
+ BUG_ON(!pfn_valid(page_to_pfn(page)));
+
if (atomic_inc_and_test(&page->_mapcount))
__inc_page_state(nr_mapped);
}
diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c
index d0bd7f07ab04..61800b88e241 100644
--- a/trunk/mm/slab.c
+++ b/trunk/mm/slab.c
@@ -789,47 +789,6 @@ static void __slab_error(const char *function, struct kmem_cache *cachep, char *
dump_stack();
}
-#ifdef CONFIG_NUMA
-/*
- * Special reaping functions for NUMA systems called from cache_reap().
- * These take care of doing round robin flushing of alien caches (containing
- * objects freed on different nodes from which they were allocated) and the
- * flushing of remote pcps by calling drain_node_pages.
- */
-static DEFINE_PER_CPU(unsigned long, reap_node);
-
-static void init_reap_node(int cpu)
-{
- int node;
-
- node = next_node(cpu_to_node(cpu), node_online_map);
- if (node == MAX_NUMNODES)
- node = 0;
-
- __get_cpu_var(reap_node) = node;
-}
-
-static void next_reap_node(void)
-{
- int node = __get_cpu_var(reap_node);
-
- /*
- * Also drain per cpu pages on remote zones
- */
- if (node != numa_node_id())
- drain_node_pages(node);
-
- node = next_node(node, node_online_map);
- if (unlikely(node >= MAX_NUMNODES))
- node = first_node(node_online_map);
- __get_cpu_var(reap_node) = node;
-}
-
-#else
-#define init_reap_node(cpu) do { } while (0)
-#define next_reap_node(void) do { } while (0)
-#endif
-
/*
* Initiate the reap timer running on the target CPU. We run at around 1 to 2Hz
* via the workqueue/eventd.
@@ -847,7 +806,6 @@ static void __devinit start_cpu_timer(int cpu)
* at that time.
*/
if (keventd_up() && reap_work->func == NULL) {
- init_reap_node(cpu);
INIT_WORK(reap_work, cache_reap, NULL);
schedule_delayed_work_on(cpu, reap_work, HZ + 3 * cpu);
}
@@ -926,23 +884,6 @@ static void __drain_alien_cache(struct kmem_cache *cachep,
}
}
-/*
- * Called from cache_reap() to regularly drain alien caches round robin.
- */
-static void reap_alien(struct kmem_cache *cachep, struct kmem_list3 *l3)
-{
- int node = __get_cpu_var(reap_node);
-
- if (l3->alien) {
- struct array_cache *ac = l3->alien[node];
- if (ac && ac->avail) {
- spin_lock_irq(&ac->lock);
- __drain_alien_cache(cachep, ac, node);
- spin_unlock_irq(&ac->lock);
- }
- }
-}
-
static void drain_alien_cache(struct kmem_cache *cachep, struct array_cache **alien)
{
int i = 0;
@@ -961,7 +902,6 @@ static void drain_alien_cache(struct kmem_cache *cachep, struct array_cache **al
#else
#define drain_alien_cache(cachep, alien) do { } while (0)
-#define reap_alien(cachep, l3) do { } while (0)
static inline struct array_cache **alloc_alien_cache(int node, int limit)
{
@@ -3557,7 +3497,8 @@ static void cache_reap(void *unused)
check_irq_on();
l3 = searchp->nodelists[numa_node_id()];
- reap_alien(searchp, l3);
+ if (l3->alien)
+ drain_alien_cache(searchp, l3->alien);
spin_lock_irq(&l3->list_lock);
drain_array_locked(searchp, cpu_cache_get(searchp), 0,
@@ -3607,7 +3548,7 @@ static void cache_reap(void *unused)
}
check_irq_on();
mutex_unlock(&cache_chain_mutex);
- next_reap_node();
+ drain_remote_pages();
/* Setup the next iteration */
schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC);
}
diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c
index 7ccf763bb30b..b0af7593d01e 100644
--- a/trunk/mm/vmscan.c
+++ b/trunk/mm/vmscan.c
@@ -1883,8 +1883,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
if (!(gfp_mask & __GFP_WAIT) ||
zone->all_unreclaimable ||
- atomic_read(&zone->reclaim_in_progress) > 0 ||
- (p->flags & PF_MEMALLOC))
+ atomic_read(&zone->reclaim_in_progress) > 0)
return 0;
node_id = zone->zone_pgdat->node_id;
diff --git a/trunk/security/selinux/hooks.c b/trunk/security/selinux/hooks.c
index b65c201e9ff5..b7773bf68efa 100644
--- a/trunk/security/selinux/hooks.c
+++ b/trunk/security/selinux/hooks.c
@@ -1262,7 +1262,7 @@ static int selinux_ptrace(struct task_struct *parent, struct task_struct *child)
rc = task_has_perm(parent, child, PROCESS__PTRACE);
/* Save the SID of the tracing process for later use in apply_creds. */
- if (!(child->ptrace & PT_PTRACED) && !rc)
+ if (!rc)
csec->ptrace_sid = psec->sid;
return rc;
}