Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323227
b: refs/heads/master
c: 9795660
h: refs/heads/master
i:
  323225: ba5dbff
  323223: 20a134e
v: v3
  • Loading branch information
Linus Torvalds committed Sep 28, 2012
1 parent a039542 commit b58f64d
Show file tree
Hide file tree
Showing 28 changed files with 267 additions and 100 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: 9429ec96c2718c0d1e3317cf60a87a0405223814
refs/heads/master: 97956605d8f2a0d17706cbd338a6cfe8de1920e9
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ void __init orion5x_wdt_init(void)
void __init orion5x_init_early(void)
{
orion_time_set_base(TIMER_VIRT_BASE);

/*
* Some Orion5x devices allocate their coherent buffers from atomic
* context. Increase size of atomic coherent pool to make sure such
* the allocations won't fail.
*/
init_dma_coherent_pool_size(SZ_1M);
}

int orion5x_tclk;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ static int __init atomic_pool_init(void)
(unsigned)pool->size / 1024);
return 0;
}

kfree(pages);
no_pages:
kfree(bitmap);
no_bitmap:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
for (j = 0; j < nr_channels; j++) {
struct dimm_info *dimm = csrow->channels[j]->dimm;

dimm->nr_pages = nr_pages / nr_channels;
dimm->nr_pages = nr_pages;
dimm->grain = nr_pages << PAGE_SHIFT;
dimm->mtype = MEM_DDR2;
dimm->dtype = DEV_UNKNOWN;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/edac/i5000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,10 @@ static void handle_channel(struct i5000_pvt *pvt, int slot, int channel,
/* add the number of COLUMN bits */
addrBits += MTR_DIMM_COLS_ADDR_BITS(mtr);

/* Dual-rank memories have twice the size */
if (dinfo->dual_rank)
addrBits++;

addrBits += 6; /* add 64 bits per DIMM */
addrBits -= 20; /* divide by 2^^20 */
addrBits -= 3; /* 8 bits per bytes */
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/edac/sb_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ static int get_dimm_config(struct mem_ctl_info *mci)
{
struct sbridge_pvt *pvt = mci->pvt_info;
struct dimm_info *dimm;
int i, j, banks, ranks, rows, cols, size, npages;
unsigned i, j, banks, ranks, rows, cols, npages;
u64 size;
u32 reg;
enum edac_type mode;
enum mem_type mtype;
Expand Down Expand Up @@ -585,10 +586,10 @@ static int get_dimm_config(struct mem_ctl_info *mci)
cols = numcol(mtr);

/* DDR3 has 8 I/O banks */
size = (rows * cols * banks * ranks) >> (20 - 3);
size = ((u64)rows * cols * banks * ranks) >> (20 - 3);
npages = MiB_TO_PAGES(size);

edac_dbg(0, "mc#%d: channel %d, dimm %d, %d Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
edac_dbg(0, "mc#%d: channel %d, dimm %d, %Ld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
pvt->sbridge_dev->mc, i, j,
size, npages,
banks, ranks, rows, cols);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/gpio/gpio-lpc32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ static int lpc32xx_gpio_dir_output_p012(struct gpio_chip *chip, unsigned pin,
{
struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);

__set_gpio_level_p012(group, pin, value);
__set_gpio_dir_p012(group, pin, 0);

return 0;
Expand All @@ -318,6 +319,7 @@ static int lpc32xx_gpio_dir_output_p3(struct gpio_chip *chip, unsigned pin,
{
struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);

__set_gpio_level_p3(group, pin, value);
__set_gpio_dir_p3(group, pin, 0);

return 0;
Expand All @@ -326,6 +328,9 @@ static int lpc32xx_gpio_dir_output_p3(struct gpio_chip *chip, unsigned pin,
static int lpc32xx_gpio_dir_out_always(struct gpio_chip *chip, unsigned pin,
int value)
{
struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);

__set_gpo_level_p3(group, pin, value);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_abi16.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS)
return 0;
} else
if (init->class == 0x906e) {
NV_ERROR(dev, "906e not supported yet\n");
NV_DEBUG(dev, "906e not supported yet\n");
return -EINVAL;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/nvc0_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ nvc0_fb_init(struct drm_device *dev)
priv = dev_priv->engine.fb.priv;

nv_wr32(dev, 0x100c10, priv->r100c10 >> 8);
nv_mask(dev, 0x17e820, 0x00100000, 0x00000000); /* NV_PLTCG_INTR_EN */
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nvc0_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ nvc0_fifo_isr_subfifo_intr(struct drm_device *dev, int unit)
static void
nvc0_fifo_isr(struct drm_device *dev)
{
u32 stat = nv_rd32(dev, 0x002100);
u32 mask = nv_rd32(dev, 0x002140);
u32 stat = nv_rd32(dev, 0x002100) & mask;

if (stat & 0x00000100) {
NV_INFO(dev, "PFIFO: unknown status 0x00000100\n");
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nve0_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ nve0_fifo_isr_subfifo_intr(struct drm_device *dev, int unit)
static void
nve0_fifo_isr(struct drm_device *dev)
{
u32 stat = nv_rd32(dev, 0x002100);
u32 mask = nv_rd32(dev, 0x002140);
u32 stat = nv_rd32(dev, 0x002100) & mask;

if (stat & 0x00000100) {
NV_INFO(dev, "PFIFO: unknown status 0x00000100\n");
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/gpu/drm/udl/udl_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ static int udl_get_modes(struct drm_connector *connector)
static int udl_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct udl_device *udl = connector->dev->dev_private;
if (!udl->sku_pixel_limit)
return 0;

if (mode->vdisplay * mode->hdisplay > udl->sku_pixel_limit)
return MODE_VIRTUAL_Y;

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ int vmw_event_fence_action_create(struct drm_file *file_priv,
}


event = kzalloc(sizeof(event->event), GFP_KERNEL);
event = kzalloc(sizeof(*event), GFP_KERNEL);
if (unlikely(event == NULL)) {
DRM_ERROR("Failed to allocate an event.\n");
ret = -ENOMEM;
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,7 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
unsigned long arg)
{
struct multipath *m = ti->private;
struct pgpath *pgpath;
struct block_device *bdev;
fmode_t mode;
unsigned long flags;
Expand All @@ -1570,12 +1571,14 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
if (!m->current_pgpath)
__choose_pgpath(m, 0);

if (m->current_pgpath) {
bdev = m->current_pgpath->path.dev->bdev;
mode = m->current_pgpath->path.dev->mode;
pgpath = m->current_pgpath;

if (pgpath) {
bdev = pgpath->path.dev->bdev;
mode = pgpath->path.dev->mode;
}

if (m->queue_io)
if ((pgpath && m->queue_io) || (!pgpath && m->queue_if_no_path))
r = -EAGAIN;
else if (!bdev)
r = -EIO;
Expand Down
61 changes: 57 additions & 4 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,41 @@ struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector)
return &t->targets[(KEYS_PER_NODE * n) + k];
}

static int count_device(struct dm_target *ti, struct dm_dev *dev,
sector_t start, sector_t len, void *data)
{
unsigned *num_devices = data;

(*num_devices)++;

return 0;
}

/*
* Check whether a table has no data devices attached using each
* target's iterate_devices method.
* Returns false if the result is unknown because a target doesn't
* support iterate_devices.
*/
bool dm_table_has_no_data_devices(struct dm_table *table)
{
struct dm_target *uninitialized_var(ti);
unsigned i = 0, num_devices = 0;

while (i < dm_table_get_num_targets(table)) {
ti = dm_table_get_target(table, i++);

if (!ti->type->iterate_devices)
return false;

ti->type->iterate_devices(ti, count_device, &num_devices);
if (num_devices)
return false;
}

return true;
}

/*
* Establish the new table's queue_limits and validate them.
*/
Expand Down Expand Up @@ -1354,17 +1389,25 @@ static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev,
return q && blk_queue_nonrot(q);
}

static bool dm_table_is_nonrot(struct dm_table *t)
static int device_is_not_random(struct dm_target *ti, struct dm_dev *dev,
sector_t start, sector_t len, void *data)
{
struct request_queue *q = bdev_get_queue(dev->bdev);

return q && !blk_queue_add_random(q);
}

static bool dm_table_all_devices_attribute(struct dm_table *t,
iterate_devices_callout_fn func)
{
struct dm_target *ti;
unsigned i = 0;

/* Ensure that all underlying device are non-rotational. */
while (i < dm_table_get_num_targets(t)) {
ti = dm_table_get_target(t, i++);

if (!ti->type->iterate_devices ||
!ti->type->iterate_devices(ti, device_is_nonrot, NULL))
!ti->type->iterate_devices(ti, func, NULL))
return 0;
}

Expand Down Expand Up @@ -1396,13 +1439,23 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
if (!dm_table_discard_zeroes_data(t))
q->limits.discard_zeroes_data = 0;

if (dm_table_is_nonrot(t))
/* Ensure that all underlying devices are non-rotational. */
if (dm_table_all_devices_attribute(t, device_is_nonrot))
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
else
queue_flag_clear_unlocked(QUEUE_FLAG_NONROT, q);

dm_table_set_integrity(t);

/*
* Determine whether or not this queue's I/O timings contribute
* to the entropy pool, Only request-based targets use this.
* Clear QUEUE_FLAG_ADD_RANDOM if any underlying device does not
* have it set.
*/
if (blk_queue_add_random(q) && dm_table_all_devices_attribute(t, device_is_not_random))
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, q);

/*
* QUEUE_FLAG_STACKABLE must be set after all queue settings are
* visible to other CPUs because, once the flag is set, incoming bios
Expand Down
Loading

0 comments on commit b58f64d

Please sign in to comment.