Commit 6f7dde81 authored by Jeremy Kerr's avatar Jeremy Kerr

powerpc/spufs: add sizes for context files

Populate the size member of a few context files. Leave out files that
have different semantics with read vs mmap, or contain a
variable-length hex string.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 23d893f5
...@@ -2609,20 +2609,20 @@ static const struct file_operations spufs_ctx_fops = { ...@@ -2609,20 +2609,20 @@ static const struct file_operations spufs_ctx_fops = {
struct spufs_tree_descr spufs_dir_contents[] = { struct spufs_tree_descr spufs_dir_contents[] = {
{ "capabilities", &spufs_caps_fops, 0444, }, { "capabilities", &spufs_caps_fops, 0444, },
{ "mem", &spufs_mem_fops, 0666, }, { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
{ "regs", &spufs_regs_fops, 0666, }, { "regs", &spufs_regs_fops, 0666, sizeof(struct spu_reg128[128]), },
{ "mbox", &spufs_mbox_fops, 0444, }, { "mbox", &spufs_mbox_fops, 0444, },
{ "ibox", &spufs_ibox_fops, 0444, }, { "ibox", &spufs_ibox_fops, 0444, },
{ "wbox", &spufs_wbox_fops, 0222, }, { "wbox", &spufs_wbox_fops, 0222, },
{ "mbox_stat", &spufs_mbox_stat_fops, 0444, }, { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
{ "ibox_stat", &spufs_ibox_stat_fops, 0444, }, { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
{ "wbox_stat", &spufs_wbox_stat_fops, 0444, }, { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
{ "signal1", &spufs_signal1_fops, 0666, }, { "signal1", &spufs_signal1_fops, 0666, },
{ "signal2", &spufs_signal2_fops, 0666, }, { "signal2", &spufs_signal2_fops, 0666, },
{ "signal1_type", &spufs_signal1_type, 0666, }, { "signal1_type", &spufs_signal1_type, 0666, },
{ "signal2_type", &spufs_signal2_type, 0666, }, { "signal2_type", &spufs_signal2_type, 0666, },
{ "cntl", &spufs_cntl_fops, 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, }, { "lslr", &spufs_lslr_ops, 0444, },
{ "mfc", &spufs_mfc_fops, 0666, }, { "mfc", &spufs_mfc_fops, 0666, },
{ "mss", &spufs_mss_fops, 0666, }, { "mss", &spufs_mss_fops, 0666, },
...@@ -2632,14 +2632,16 @@ struct spufs_tree_descr spufs_dir_contents[] = { ...@@ -2632,14 +2632,16 @@ struct spufs_tree_descr spufs_dir_contents[] = {
{ "decr_status", &spufs_decr_status_ops, 0666, }, { "decr_status", &spufs_decr_status_ops, 0666, },
{ "event_mask", &spufs_event_mask_ops, 0666, }, { "event_mask", &spufs_event_mask_ops, 0666, },
{ "event_status", &spufs_event_status_ops, 0444, }, { "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, }, { "phys-id", &spufs_id_ops, 0666, },
{ "object-id", &spufs_object_id_ops, 0666, }, { "object-id", &spufs_object_id_ops, 0666, },
{ "mbox_info", &spufs_mbox_info_fops, 0444, }, { "mbox_info", &spufs_mbox_info_fops, 0444, sizeof(u32), },
{ "ibox_info", &spufs_ibox_info_fops, 0444, }, { "ibox_info", &spufs_ibox_info_fops, 0444, sizeof(u32), },
{ "wbox_info", &spufs_wbox_info_fops, 0444, }, { "wbox_info", &spufs_wbox_info_fops, 0444, sizeof(u32), },
{ "dma_info", &spufs_dma_info_fops, 0444, }, { "dma_info", &spufs_dma_info_fops, 0444,
{ "proxydma_info", &spufs_proxydma_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, }, { "tid", &spufs_tid_fops, 0444, },
{ "stat", &spufs_stat_fops, 0444, }, { "stat", &spufs_stat_fops, 0444, },
{ "switch_log", &spufs_switch_log_fops, 0444 }, { "switch_log", &spufs_switch_log_fops, 0444 },
...@@ -2649,13 +2651,13 @@ struct spufs_tree_descr spufs_dir_contents[] = { ...@@ -2649,13 +2651,13 @@ struct spufs_tree_descr spufs_dir_contents[] = {
struct spufs_tree_descr spufs_dir_nosched_contents[] = { struct spufs_tree_descr spufs_dir_nosched_contents[] = {
{ "capabilities", &spufs_caps_fops, 0444, }, { "capabilities", &spufs_caps_fops, 0444, },
{ "mem", &spufs_mem_fops, 0666, }, { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
{ "mbox", &spufs_mbox_fops, 0444, }, { "mbox", &spufs_mbox_fops, 0444, },
{ "ibox", &spufs_ibox_fops, 0444, }, { "ibox", &spufs_ibox_fops, 0444, },
{ "wbox", &spufs_wbox_fops, 0222, }, { "wbox", &spufs_wbox_fops, 0222, },
{ "mbox_stat", &spufs_mbox_stat_fops, 0444, }, { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
{ "ibox_stat", &spufs_ibox_stat_fops, 0444, }, { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
{ "wbox_stat", &spufs_wbox_stat_fops, 0444, }, { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
{ "signal1", &spufs_signal1_nosched_fops, 0222, }, { "signal1", &spufs_signal1_nosched_fops, 0222, },
{ "signal2", &spufs_signal2_nosched_fops, 0222, }, { "signal2", &spufs_signal2_nosched_fops, 0222, },
{ "signal1_type", &spufs_signal1_type, 0666, }, { "signal1_type", &spufs_signal1_type, 0666, },
...@@ -2664,7 +2666,7 @@ struct spufs_tree_descr spufs_dir_nosched_contents[] = { ...@@ -2664,7 +2666,7 @@ struct spufs_tree_descr spufs_dir_nosched_contents[] = {
{ "mfc", &spufs_mfc_fops, 0666, }, { "mfc", &spufs_mfc_fops, 0666, },
{ "cntl", &spufs_cntl_fops, 0666, }, { "cntl", &spufs_cntl_fops, 0666, },
{ "npc", &spufs_npc_ops, 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, }, { "phys-id", &spufs_id_ops, 0666, },
{ "object-id", &spufs_object_id_ops, 0666, }, { "object-id", &spufs_object_id_ops, 0666, },
{ "tid", &spufs_tid_fops, 0444, }, { "tid", &spufs_tid_fops, 0444, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment