Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242350
b: refs/heads/master
c: 401a18e
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Mar 25, 2011
1 parent b68fbf5 commit 4897e0a
Show file tree
Hide file tree
Showing 61 changed files with 713 additions and 888 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: d39dd11c3e6a7af5c20bfac40594db36cf270f42
refs/heads/master: 401a18e92ce32cd0ddfa5738899ca2b8114f2bbf
2 changes: 1 addition & 1 deletion trunk/Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ alloc_inode:
destroy_inode:
dirty_inode: (must not sleep)
write_inode:
drop_inode: !!!inode->i_lock!!!
drop_inode: !!!inode_lock!!!
evict_inode:
put_super: write
write_super: read
Expand Down
16 changes: 5 additions & 11 deletions trunk/Documentation/filesystems/porting
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,11 @@ be used instead. It gets called whenever the inode is evicted, whether it has
remaining links or not. Caller does *not* evict the pagecache or inode-associated
metadata buffers; getting rid of those is responsibility of method, as it had
been for ->delete_inode().

->drop_inode() returns int now; it's called on final iput() with
inode->i_lock held and it returns true if filesystems wants the inode to be
dropped. As before, generic_drop_inode() is still the default and it's been
updated appropriately. generic_delete_inode() is also alive and it consists
simply of return 1. Note that all actual eviction work is done by caller after
->drop_inode() returns.

->drop_inode() returns int now; it's called on final iput() with inode_lock
held and it returns true if filesystems wants the inode to be dropped. As before,
generic_drop_inode() is still the default and it's been updated appropriately.
generic_delete_inode() is also alive and it consists simply of return 1. Note that
all actual eviction work is done by caller after ->drop_inode() returns.
clear_inode() is gone; use end_writeback() instead. As before, it must
be called exactly once on each call of ->evict_inode() (as it used to be for
each call of ->delete_inode()). Unlike before, if you are using inode-associated
Expand Down Expand Up @@ -398,9 +395,6 @@ Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
so the i_size should not change when hole punching, even when puching the end of
a file off.

--
[mandatory]

--
[mandatory]
->get_sb() is gone. Switch to use of ->mount(). Typically it's just
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/filesystems/vfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ or bottom half).
should be synchronous or not, not all filesystems check this flag.

drop_inode: called when the last access to the inode is dropped,
with the inode->i_lock spinlock held.
with the inode_lock spinlock held.

This method should be either NULL (normal UNIX filesystem
semantics) or "generic_delete_inode" (for filesystems that do not
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
*/
struct meminfo meminfo;

void show_mem(unsigned int filter)
void show_mem(void)
{
int free = 0, total = 0, reserved = 0;
int shared = 0, cached = 0, slab = 0, i;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/mm/contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static unsigned long max_gap;
* Shows a simple page count of reserved and used pages in the system.
* For discontig machines, it does this on a per-pgdat basis.
*/
void show_mem(unsigned int filter)
void show_mem(void)
{
int i, total_reserved = 0;
int total_shared = 0, total_cached = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ void __cpuinit *per_cpu_init(void)
* Shows a simple page count of reserved and used pages in the system.
* For discontig machines, it does this on a per-pgdat basis.
*/
void show_mem(unsigned int filter)
void show_mem(void)
{
int i, total_reserved = 0;
int total_shared = 0, total_cached = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/parisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ void __init mem_init(void)
unsigned long *empty_zero_page __read_mostly;
EXPORT_SYMBOL(empty_zero_page);

void show_mem(unsigned int filter)
void show_mem(void)
{
int i,free = 0,total = 0,reserved = 0;
int shared = 0, cached = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ cmds(struct pt_regs *excp)
memzcan();
break;
case 'i':
show_mem(0);
show_mem();
break;
default:
termch = cmd;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void __init kmap_init(void)
kmap_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE);
}

void show_mem(unsigned int filter)
void show_mem(void)
{
printk("Mem-info:\n");
show_free_areas();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/tile/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* The normal show_free_areas() is too verbose on Tile, with dozens
* of processors and often four NUMA zones each with high and lowmem.
*/
void show_mem(unsigned int filter)
void show_mem(void)
{
struct zone *zone;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/unicore32/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ early_param("initrd", early_initrd);
*/
struct meminfo meminfo;

void show_mem(unsigned int filter)
void show_mem(void)
{
int free = 0, total = 0, reserved = 0;
int shared = 0, cached = 0, slab = 0, i;
Expand Down
5 changes: 4 additions & 1 deletion trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug)
/*
* rq is already accounted, so use raw insert
*/
__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA))
__elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH);
else
__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
}

if (q) {
Expand Down
51 changes: 0 additions & 51 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,9 +1073,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
uint32_t __user *encoder_id;
struct drm_mode_group *mode_group;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);

/*
Expand Down Expand Up @@ -1247,9 +1244,6 @@ int drm_mode_getcrtc(struct drm_device *dev,
struct drm_mode_object *obj;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);

obj = drm_mode_object_find(dev, crtc_resp->crtc_id,
Expand Down Expand Up @@ -1318,9 +1312,6 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
uint64_t __user *prop_values;
uint32_t __user *encoder_ptr;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo));

DRM_DEBUG_KMS("[CONNECTOR:%d:?]\n", out_resp->connector_id);
Expand Down Expand Up @@ -1440,9 +1431,6 @@ int drm_mode_getencoder(struct drm_device *dev, void *data,
struct drm_encoder *encoder;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, enc_resp->encoder_id,
DRM_MODE_OBJECT_ENCODER);
Expand Down Expand Up @@ -1498,9 +1486,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
int ret = 0;
int i;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, crtc_req->crtc_id,
DRM_MODE_OBJECT_CRTC);
Expand Down Expand Up @@ -1618,9 +1603,6 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
struct drm_crtc *crtc;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

if (!req->flags) {
DRM_ERROR("no operation set\n");
return -EINVAL;
Expand Down Expand Up @@ -1685,9 +1667,6 @@ int drm_mode_addfb(struct drm_device *dev,
struct drm_framebuffer *fb;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

if ((config->min_width > r->width) || (r->width > config->max_width)) {
DRM_ERROR("mode new framebuffer width not within limits\n");
return -EINVAL;
Expand Down Expand Up @@ -1745,9 +1724,6 @@ int drm_mode_rmfb(struct drm_device *dev,
int ret = 0;
int found = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, *id, DRM_MODE_OBJECT_FB);
/* TODO check that we realy get a framebuffer back. */
Expand Down Expand Up @@ -1804,9 +1780,6 @@ int drm_mode_getfb(struct drm_device *dev,
struct drm_framebuffer *fb;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
if (!obj) {
Expand Down Expand Up @@ -1840,9 +1813,6 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
int num_clips;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
if (!obj) {
Expand Down Expand Up @@ -2026,9 +1996,6 @@ int drm_mode_attachmode_ioctl(struct drm_device *dev,
struct drm_mode_modeinfo *umode = &mode_cmd->mode;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);

obj = drm_mode_object_find(dev, mode_cmd->connector_id, DRM_MODE_OBJECT_CONNECTOR);
Expand Down Expand Up @@ -2075,9 +2042,6 @@ int drm_mode_detachmode_ioctl(struct drm_device *dev,
struct drm_mode_modeinfo *umode = &mode_cmd->mode;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);

obj = drm_mode_object_find(dev, mode_cmd->connector_id, DRM_MODE_OBJECT_CONNECTOR);
Expand Down Expand Up @@ -2247,9 +2211,6 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
uint64_t __user *values_ptr;
uint32_t __user *blob_length_ptr;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, out_resp->prop_id, DRM_MODE_OBJECT_PROPERTY);
if (!obj) {
Expand Down Expand Up @@ -2372,9 +2333,6 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
int ret = 0;
void *blob_ptr;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, out_resp->blob_id, DRM_MODE_OBJECT_BLOB);
if (!obj) {
Expand Down Expand Up @@ -2435,9 +2393,6 @@ int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
int ret = -EINVAL;
int i;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);

obj = drm_mode_object_find(dev, out_resp->connector_id, DRM_MODE_OBJECT_CONNECTOR);
Expand Down Expand Up @@ -2554,9 +2509,6 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
int size;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, crtc_lut->crtc_id, DRM_MODE_OBJECT_CRTC);
if (!obj) {
Expand Down Expand Up @@ -2608,9 +2560,6 @@ int drm_mode_gamma_get_ioctl(struct drm_device *dev,
int size;
int ret = 0;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

mutex_lock(&dev->mode_config.mutex);
obj = drm_mode_object_find(dev, crtc_lut->crtc_id, DRM_MODE_OBJECT_CRTC);
if (!obj) {
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/gpu/drm/drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,11 @@ EXPORT_SYMBOL(drm_gem_vm_open);
void drm_gem_vm_close(struct vm_area_struct *vma)
{
struct drm_gem_object *obj = vma->vm_private_data;
struct drm_device *dev = obj->dev;

mutex_lock(&dev->struct_mutex);
mutex_lock(&obj->dev->struct_mutex);
drm_vm_close_locked(vma);
drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
mutex_unlock(&obj->dev->struct_mutex);
}
EXPORT_SYMBOL(drm_gem_vm_close);

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (dev->driver->dumb_create)
req->value = 1;
break;
case DRM_CAP_VBLANK_HIGH_CRTC:
req->value = 1;
break;
default:
return -EINVAL;
}
Expand Down
15 changes: 5 additions & 10 deletions trunk/drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
{
union drm_wait_vblank *vblwait = data;
int ret = 0;
unsigned int flags, seq, crtc, high_crtc;
unsigned int flags, seq, crtc;

if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled))
return -EINVAL;
Expand All @@ -1134,21 +1134,16 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
return -EINVAL;

if (vblwait->request.type &
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK)) {
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK)) {
DRM_ERROR("Unsupported type value 0x%x, supported mask 0x%x\n",
vblwait->request.type,
(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK));
(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK));
return -EINVAL;
}

flags = vblwait->request.type & _DRM_VBLANK_FLAGS_MASK;
high_crtc = (vblwait->request.type & _DRM_VBLANK_HIGH_CRTC_MASK);
if (high_crtc)
crtc = high_crtc >> _DRM_VBLANK_HIGH_CRTC_SHIFT;
else
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;

if (crtc >= dev->num_crtcs)
return -EINVAL;

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)
seq_printf(m, "Render p-state limit: %d\n",
rp_state_limits & 0xff);
seq_printf(m, "CAGF: %dMHz\n", ((rpstat & GEN6_CAGF_MASK) >>
GEN6_CAGF_SHIFT) * 50);
GEN6_CAGF_SHIFT) * 100);
seq_printf(m, "RP CUR UP EI: %dus\n", rpupei &
GEN6_CURICONT_MASK);
seq_printf(m, "RP CUR UP: %dus\n", rpcurup &
Expand All @@ -908,15 +908,15 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused)

max_freq = (rp_state_cap & 0xff0000) >> 16;
seq_printf(m, "Lowest (RPN) frequency: %dMHz\n",
max_freq * 50);
max_freq * 100);

max_freq = (rp_state_cap & 0xff00) >> 8;
seq_printf(m, "Nominal (RP1) frequency: %dMHz\n",
max_freq * 50);
max_freq * 100);

max_freq = rp_state_cap & 0xff;
seq_printf(m, "Max non-overclocked (RP0) frequency: %dMHz\n",
max_freq * 50);
max_freq * 100);

__gen6_gt_force_wake_put(dev_priv);
} else {
Expand Down
Loading

0 comments on commit 4897e0a

Please sign in to comment.