Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[pandora-kernel.git] / arch / powerpc / platforms / cell / spufs / file.c
index d0a497d..99c7306 100644 (file)
@@ -2607,22 +2607,22 @@ static const struct file_operations spufs_ctx_fops = {
        .release        = single_release,
 };
 
-struct tree_descr spufs_dir_contents[] = {
+struct spufs_tree_descr spufs_dir_contents[] = {
        { "capabilities", &spufs_caps_fops, 0444, },
-       { "mem",  &spufs_mem_fops,  0666, },
-       { "regs", &spufs_regs_fops,  0666, },
+       { "mem",  &spufs_mem_fops,  0666, LS_SIZE, },
+       { "regs", &spufs_regs_fops,  0666, sizeof(struct spu_reg128[128]), },
        { "mbox", &spufs_mbox_fops, 0444, },
        { "ibox", &spufs_ibox_fops, 0444, },
        { "wbox", &spufs_wbox_fops, 0222, },
-       { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
-       { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
-       { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
+       { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
+       { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
+       { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
        { "signal1", &spufs_signal1_fops, 0666, },
        { "signal2", &spufs_signal2_fops, 0666, },
        { "signal1_type", &spufs_signal1_type, 0666, },
        { "signal2_type", &spufs_signal2_type, 0666, },
        { "cntl", &spufs_cntl_fops,  0666, },
-       { "fpcr", &spufs_fpcr_fops, 0666, },
+       { "fpcr", &spufs_fpcr_fops, 0666, sizeof(struct spu_reg128), },
        { "lslr", &spufs_lslr_ops, 0444, },
        { "mfc", &spufs_mfc_fops, 0666, },
        { "mss", &spufs_mss_fops, 0666, },
@@ -2632,30 +2632,31 @@ struct tree_descr spufs_dir_contents[] = {
        { "decr_status", &spufs_decr_status_ops, 0666, },
        { "event_mask", &spufs_event_mask_ops, 0666, },
        { "event_status", &spufs_event_status_ops, 0444, },
-       { "psmap", &spufs_psmap_fops, 0666, },
+       { "psmap", &spufs_psmap_fops, 0666, SPUFS_PS_MAP_SIZE, },
        { "phys-id", &spufs_id_ops, 0666, },
        { "object-id", &spufs_object_id_ops, 0666, },
-       { "mbox_info", &spufs_mbox_info_fops, 0444, },
-       { "ibox_info", &spufs_ibox_info_fops, 0444, },
-       { "wbox_info", &spufs_wbox_info_fops, 0444, },
-       { "dma_info", &spufs_dma_info_fops, 0444, },
-       { "proxydma_info", &spufs_proxydma_info_fops, 0444, },
+       { "mbox_info", &spufs_mbox_info_fops, 0444, sizeof(u32), },
+       { "ibox_info", &spufs_ibox_info_fops, 0444, sizeof(u32), },
+       { "wbox_info", &spufs_wbox_info_fops, 0444, sizeof(u32), },
+       { "dma_info", &spufs_dma_info_fops, 0444,
+               sizeof(struct spu_dma_info), },
+       { "proxydma_info", &spufs_proxydma_info_fops, 0444,
+               sizeof(struct spu_proxydma_info)},
        { "tid", &spufs_tid_fops, 0444, },
        { "stat", &spufs_stat_fops, 0444, },
        { "switch_log", &spufs_switch_log_fops, 0444 },
-       { ".ctx", &spufs_ctx_fops, 0444, },
        {},
 };
 
-struct tree_descr spufs_dir_nosched_contents[] = {
+struct spufs_tree_descr spufs_dir_nosched_contents[] = {
        { "capabilities", &spufs_caps_fops, 0444, },
-       { "mem",  &spufs_mem_fops,  0666, },
+       { "mem",  &spufs_mem_fops,  0666, LS_SIZE, },
        { "mbox", &spufs_mbox_fops, 0444, },
        { "ibox", &spufs_ibox_fops, 0444, },
        { "wbox", &spufs_wbox_fops, 0222, },
-       { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
-       { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
-       { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
+       { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
+       { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
+       { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
        { "signal1", &spufs_signal1_nosched_fops, 0222, },
        { "signal2", &spufs_signal2_nosched_fops, 0222, },
        { "signal1_type", &spufs_signal1_type, 0666, },
@@ -2664,11 +2665,15 @@ struct tree_descr spufs_dir_nosched_contents[] = {
        { "mfc", &spufs_mfc_fops, 0666, },
        { "cntl", &spufs_cntl_fops,  0666, },
        { "npc", &spufs_npc_ops, 0666, },
-       { "psmap", &spufs_psmap_fops, 0666, },
+       { "psmap", &spufs_psmap_fops, 0666, SPUFS_PS_MAP_SIZE, },
        { "phys-id", &spufs_id_ops, 0666, },
        { "object-id", &spufs_object_id_ops, 0666, },
        { "tid", &spufs_tid_fops, 0444, },
        { "stat", &spufs_stat_fops, 0444, },
+       {},
+};
+
+struct spufs_tree_descr spufs_dir_debug_contents[] = {
        { ".ctx", &spufs_ctx_fops, 0444, },
        {},
 };