Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98623
b: refs/heads/master
c: a16b4bc
h: refs/heads/master
i:
  98621: ec084e6
  98619: 580bc73
  98615: f927bc8
  98607: 5de2e49
  98591: cd2a8d4
  98559: b15503f
v: v3
  • Loading branch information
Linus Torvalds committed Jul 3, 2008
1 parent 08e7dbd commit d443932
Show file tree
Hide file tree
Showing 100 changed files with 545 additions and 317 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4283e1babe167e0ba856bb5d039465358e90785c
refs/heads/master: a16b4bcd31a73a81b6d2b8ffa6b5f6ed01cf6d64
18 changes: 14 additions & 4 deletions trunk/Documentation/i2c/writing-clients
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,23 @@ routines, and should be zero-initialized except for fields with data you
provide. A client structure holds device-specific information like the
driver model device node, and its I2C address.

/* iff driver uses driver model ("new style") binding model: */

static struct i2c_device_id foo_idtable[] = {
{ "foo", my_id_for_foo },
{ "bar", my_id_for_bar },
{ }
};

MODULE_DEVICE_TABLE(i2c, foo_idtable);

static struct i2c_driver foo_driver = {
.driver = {
.name = "foo",
},

/* iff driver uses driver model ("new style") binding model: */
.id_table = foo_ids,
.probe = foo_probe,
.remove = foo_remove,

Expand Down Expand Up @@ -173,10 +184,9 @@ handle may be used during foo_probe(). If foo_probe() reports success
(zero not a negative status code) it may save the handle and use it until
foo_remove() returns. That binding model is used by most Linux drivers.

Drivers match devices when i2c_client.driver_name and the driver name are
the same; this approach is used in several other busses that don't have
device typing support in the hardware. The driver and module name should
match, so hotplug/coldplug mechanisms will modprobe the driver.
The probe function is called when an entry in the id_table name field
matches the device's name. It is passed the entry that was matched so
the driver knows which one in the table matched.


Device Creation (Standard driver model)
Expand Down
12 changes: 4 additions & 8 deletions trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,23 @@ inet_peer_minttl - INTEGER
Minimum time-to-live of entries. Should be enough to cover fragment
time-to-live on the reassembling side. This minimum time-to-live is
guaranteed if the pool size is less than inet_peer_threshold.
Measured in jiffies(1).
Measured in seconds.

inet_peer_maxttl - INTEGER
Maximum time-to-live of entries. Unused entries will expire after
this period of time if there is no memory pressure on the pool (i.e.
when the number of entries in the pool is very small).
Measured in jiffies(1).
Measured in seconds.

inet_peer_gc_mintime - INTEGER
Minimum interval between garbage collection passes. This interval is
in effect under high memory pressure on the pool.
Measured in jiffies(1).
Measured in seconds.

inet_peer_gc_maxtime - INTEGER
Minimum interval between garbage collection passes. This interval is
in effect under low (or absent) memory pressure on the pool.
Measured in jiffies(1).
Measured in seconds.

TCP variables:

Expand Down Expand Up @@ -794,10 +794,6 @@ tag - INTEGER
Allows you to write a number, which can be used as required.
Default value is 0.

(1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the
Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact
value on your system.

Alexey Kuznetsov.
kuznet@ms2.inr.ac.ru

Expand Down
6 changes: 3 additions & 3 deletions trunk/Documentation/networking/s2io.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ Valid range: Limited by memory on system
Default: 30

e. intr_type
Specifies interrupt type. Possible values 1(INTA), 2(MSI), 3(MSI-X)
Valid range: 1-3
Default: 1
Specifies interrupt type. Possible values 0(INTA), 2(MSI-X)
Valid values: 0, 2
Default: 2

5. Performance suggestions
General:
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/common/dmabounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ EXPORT_SYMBOL(dma_map_sg);
EXPORT_SYMBOL(dma_unmap_sg);
EXPORT_SYMBOL(dma_sync_single_for_cpu);
EXPORT_SYMBOL(dma_sync_single_for_device);
EXPORT_SYMBOL(dma_sync_sg);
EXPORT_SYMBOL(dma_sync_sg_for_cpu);
EXPORT_SYMBOL(dma_sync_sg_for_device);
EXPORT_SYMBOL(dmabounce_register_dev);
EXPORT_SYMBOL(dmabounce_unregister_dev);

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#define GPMC_STATUS 0x54
#define GPMC_PREFETCH_CONFIG1 0x1e0
#define GPMC_PREFETCH_CONFIG2 0x1e4
#define GPMC_PREFETCH_CONTROL 0x1e8
#define GPMC_PREFETCH_CONTROL 0x1ec
#define GPMC_PREFETCH_STATUS 0x1f0
#define GPMC_ECC_CONFIG 0x1f4
#define GPMC_ECC_CONTROL 0x1f8
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-realview/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ static DEFINE_SPINLOCK(boot_lock);

void __cpuinit platform_secondary_init(unsigned int cpu)
{
trace_hardirqs_off();

/*
* the primary core may have used a "cross call" soft interrupt
* to get this processor out of WFI in the BootMonitor - make
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/plat-omap/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,6 @@ static inline void omap_enable_channel_irq(int lch)

/* Enable some nice interrupts. */
OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs;

dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
}

static void omap_disable_channel_irq(int lch)
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ endif
initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
initrd-y := $(patsubst zImage%, zImage.initrd%, \
$(patsubst dtbImage%, dtbImage.initrd%, \
$(patsubst treeImage%, treeImage.initrd%, $(image-y))))
$(patsubst simpleImage%, simpleImage.initrd%, \
$(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
initrd-y := $(filter-out $(image-y), $(initrd-y))
targets += $(image-y) $(initrd-y)

Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/kernel/legacy_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
if (of_get_property(np, "clock-frequency", NULL) == NULL)
return -1;

/* if reg-shift or offset, don't try to use it */
if ((of_get_property(np, "reg-shift", NULL) != NULL) ||
(of_get_property(np, "reg-offset", NULL) != NULL))
return -1;

/* if rtas uses this device, don't try to use it as well */
if (of_get_property(np, "used-by-rtas", NULL) != NULL)
return -1;
Expand Down
14 changes: 13 additions & 1 deletion trunk/arch/powerpc/platforms/52xx/lite5200_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ static struct mpc52xx_sdma __iomem *bes;
static struct mpc52xx_xlb __iomem *xlb;
static struct mpc52xx_gpio __iomem *gps;
static struct mpc52xx_gpio_wkup __iomem *gpw;
static void __iomem *pci;
static void __iomem *sram;
static const int sram_size = 0x4000; /* 16 kBytes */
static void __iomem *mbar;
Expand Down Expand Up @@ -50,6 +51,8 @@ static int lite5200_pm_prepare(void)
{ .type = "builtin", .compatible = "mpc5200", }, /* efika */
{}
};
u64 regaddr64 = 0;
const u32 *regaddr_p;

/* deep sleep? let mpc52xx code handle that */
if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
Expand All @@ -60,8 +63,12 @@ static int lite5200_pm_prepare(void)

/* map registers */
np = of_find_matching_node(NULL, immr_ids);
mbar = of_iomap(np, 0);
regaddr_p = of_get_address(np, 0, NULL, NULL);
if (regaddr_p)
regaddr64 = of_translate_address(np, regaddr_p);
of_node_put(np);

mbar = ioremap((u32) regaddr64, 0xC000);
if (!mbar) {
printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
return -ENOSYS;
Expand All @@ -71,6 +78,7 @@ static int lite5200_pm_prepare(void)
pic = mbar + 0x500;
gps = mbar + 0xb00;
gpw = mbar + 0xc00;
pci = mbar + 0xd00;
bes = mbar + 0x1200;
xlb = mbar + 0x1f00;
sram = mbar + 0x8000;
Expand All @@ -85,6 +93,7 @@ static struct mpc52xx_sdma sbes;
static struct mpc52xx_xlb sxlb;
static struct mpc52xx_gpio sgps;
static struct mpc52xx_gpio_wkup sgpw;
static char spci[0x200];

static void lite5200_save_regs(void)
{
Expand All @@ -94,6 +103,7 @@ static void lite5200_save_regs(void)
_memcpy_fromio(&sxlb, xlb, sizeof(*xlb));
_memcpy_fromio(&sgps, gps, sizeof(*gps));
_memcpy_fromio(&sgpw, gpw, sizeof(*gpw));
_memcpy_fromio(spci, pci, 0x200);

_memcpy_fromio(saved_sram, sram, sram_size);
}
Expand All @@ -103,6 +113,8 @@ static void lite5200_restore_regs(void)
int i;
_memcpy_toio(sram, saved_sram, sram_size);

/* PCI Configuration */
_memcpy_toio(pci, spci, 0x200);

/*
* GPIOs. Interrupt Master Enable has higher address then other
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,8 @@ config NUMA_EMU
number of nodes. This is only useful for debugging.

config NODES_SHIFT
int "Max num nodes shift(1-15)"
range 1 15 if X86_64
int "Max num nodes shift(1-9)"
range 1 9 if X86_64
default "6" if X86_64
default "4" if X86_NUMAQ
default "3"
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/drm/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
RING_LOCALS;

if (sarea_priv->front_tiled) {
if (IS_I965G(dev) && sarea_priv->front_tiled) {
cmd |= XY_SRC_COPY_BLT_DST_TILED;
dst_pitch >>= 2;
}
if (sarea_priv->back_tiled) {
if (IS_I965G(dev) && sarea_priv->back_tiled) {
cmd |= XY_SRC_COPY_BLT_SRC_TILED;
src_pitch >>= 2;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3322,7 +3322,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
msleep_interruptible(duration);
tty->ops->break_ctl(tty, 0);
tty_write_unlock(tty);
if (!signal_pending(current))
if (signal_pending(current))
return -EINTR;
return 0;
}
Expand Down
40 changes: 40 additions & 0 deletions trunk/drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <linux/moduleparam.h>
#include <linux/connector.h>
#include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/spinlock.h>

#include <net/sock.h>

Expand Down Expand Up @@ -403,6 +405,40 @@ static void cn_callback(void *data)
mutex_unlock(&notify_lock);
}

static int cn_proc_show(struct seq_file *m, void *v)
{
struct cn_queue_dev *dev = cdev.cbdev;
struct cn_callback_entry *cbq;

seq_printf(m, "Name ID\n");

spin_lock_bh(&dev->queue_lock);

list_for_each_entry(cbq, &dev->queue_list, callback_entry) {
seq_printf(m, "%-15s %u:%u\n",
cbq->id.name,
cbq->id.id.idx,
cbq->id.id.val);
}

spin_unlock_bh(&dev->queue_lock);

return 0;
}

static int cn_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, cn_proc_show, NULL);
}

static const struct file_operations cn_file_ops = {
.owner = THIS_MODULE,
.open = cn_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release
};

static int __devinit cn_init(void)
{
struct cn_dev *dev = &cdev;
Expand Down Expand Up @@ -434,6 +470,8 @@ static int __devinit cn_init(void)
return -EINVAL;
}

proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);

return 0;
}

Expand All @@ -443,6 +481,8 @@ static void __devexit cn_fini(void)

cn_already_initialized = 0;

proc_net_remove(&init_net, "connector");

cn_del_callback(&dev->id);
cn_queue_free_dev(dev->cbdev);
netlink_kernel_release(dev->nls);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/input/ff-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/sched.h>

/*
* Check that the effect_id is a valid effect and whether the user
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ static int crypt_convert(struct crypt_config *cc,
case 0:
atomic_dec(&ctx->pending);
ctx->sector++;
cond_resched();
continue;

/* error */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3897,8 +3897,10 @@ static void autorun_devices(int part)

md_probe(dev, NULL, NULL);
mddev = mddev_find(dev);
if (!mddev) {
printk(KERN_ERR
if (!mddev || !mddev->gendisk) {
if (mddev)
mddev_put(mddev);
printk(KERN_ERR
"md: cannot allocate memory for md drive.\n");
break;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,8 @@ static int run(mddev_t *mddev)
!test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
if (disk->rdev)
conf->fullsync = 1;
}
}

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2898,6 +2898,8 @@ static void handle_stripe5(struct stripe_head *sh)

for (i = conf->raid_disks; i--; ) {
set_bit(R5_Wantwrite, &sh->dev[i].flags);
set_bit(R5_LOCKED, &dev->flags);
s.locked++;
if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
sh->ops.count++;
}
Expand All @@ -2911,6 +2913,7 @@ static void handle_stripe5(struct stripe_head *sh)
conf->raid_disks);
s.locked += handle_write_operations5(sh, 1, 1);
} else if (s.expanded &&
s.locked == 0 &&
!test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
clear_bit(STRIPE_EXPAND_READY, &sh->state);
atomic_dec(&conf->reshape_stripes);
Expand Down Expand Up @@ -4305,7 +4308,9 @@ static int run(mddev_t *mddev)
" disk %d\n", bdevname(rdev->bdev,b),
raid_disk);
working_disks++;
}
} else
/* Cannot rely on bitmap to complete recovery */
conf->fullsync = 1;
}

/*
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1768,9 +1768,10 @@ vortex_timer(unsigned long data)
case XCVR_MII: case XCVR_NWAY:
{
ok = 1;
spin_lock_bh(&vp->lock);
/* Interrupts are already disabled */
spin_lock(&vp->lock);
vortex_check_media(dev, 0);
spin_unlock_bh(&vp->lock);
spin_unlock(&vp->lock);
}
break;
default: /* Other media types handled by Tx timeouts. */
Expand Down
Loading

0 comments on commit d443932

Please sign in to comment.