search for: bin_attribute

Displaying 18 results from an estimated 18 matches for "bin_attribute".

2018 May 24
3
[PATCH] gpu: Consistently use octal not symbolic permissions
...it a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c index a73e1d418c22..33b8c4f38fd8 100644 --- a/drivers/gpu/drm/i915/gvt/firmware.c +++ b/drivers/gpu/drm/i915/gvt/firmware.c @@ -60,7 +60,7 @@ gvt_firmware_read(struct file *filp, struct kobject *kobj, } static struct bin_attribute firmware_attr = { - .attr = {.name = "gvt_firmware", .mode = (S_IRUSR)}, + .attr = {.name = "gvt_firmware", .mode = 0400}, .read = gvt_firmware_read, .write = NULL, .mmap = NULL, diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 1...
2018 May 25
0
[PATCH] gpu: Consistently use octal not symbolic permissions
....c b/drivers/gpu/drm/i915/gvt/firmware.c > index a73e1d418c22..33b8c4f38fd8 100644 > --- a/drivers/gpu/drm/i915/gvt/firmware.c > +++ b/drivers/gpu/drm/i915/gvt/firmware.c > @@ -60,7 +60,7 @@ gvt_firmware_read(struct file *filp, struct kobject *kobj, > } > > static struct bin_attribute firmware_attr = { > - .attr = {.name = "gvt_firmware", .mode = (S_IRUSR)}, > + .attr = {.name = "gvt_firmware", .mode = 0400}, > .read = gvt_firmware_read, > .write = NULL, > .mmap = NULL, > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gp...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...ci/setup-res.c | 2 +- include/linux/pci.h | 4 +- 7 files changed, 54 insertions(+), 38 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 9c71858..f99160d 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -696,7 +696,7 @@ static struct bin_attribute pci_config_attr = { .name = "config", .mode = S_IRUGO | S_IWUSR, }, - .size = 256, + .size = PCI_CFG_SPACE_SIZE, .read = pci_read_config, .write = pci_write_config, }; @@ -706,7 +706,7 @@ static struct bin_attribute pcie...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...ci/setup-res.c | 2 +- include/linux/pci.h | 4 +- 7 files changed, 54 insertions(+), 38 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 9c71858..f99160d 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -696,7 +696,7 @@ static struct bin_attribute pci_config_attr = { .name = "config", .mode = S_IRUGO | S_IWUSR, }, - .size = 256, + .size = PCI_CFG_SPACE_SIZE, .read = pci_read_config, .write = pci_write_config, }; @@ -706,7 +706,7 @@ static struct bin_attribute pcie...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...i++) { struct resource *res = &pci_dev->resource[i]; @@ -716,10 +716,40 @@ int __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev) return 0; } +static int pci_create_capabilities_sysfs(struct pci_dev *dev) +{ + int retval; + struct bin_attribute *attr; + + /* If the device has VPD, try to expose it in sysfs. */ + if (dev->vpd) { + attr = kzalloc(sizeof(*attr), GFP_ATOMIC); + if (!attr) + return -ENOMEM; + + attr->size = dev->vpd->len; + at...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...i++) { struct resource *res = &pci_dev->resource[i]; @@ -716,10 +716,40 @@ int __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev) return 0; } +static int pci_create_capabilities_sysfs(struct pci_dev *dev) +{ + int retval; + struct bin_attribute *attr; + + /* If the device has VPD, try to expose it in sysfs. */ + if (dev->vpd) { + attr = kzalloc(sizeof(*attr), GFP_ATOMIC); + if (!attr) + return -ENOMEM; + + attr->size = dev->vpd->len; + at...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...ant */ > - unsigned int msi_enabled:1; > - unsigned int msix_enabled:1; > unsigned int ari_enabled:1; /* ARI forwarding */ > unsigned int is_managed:1; > unsigned int needs_freset:1; /* Dev requires fundamental reset */ > @@ -358,7 +356,7 @@ struct pci_dev { > struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for > resources */ > struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file > for WC mapping of resources */ > #ifdef CONFIG_PCI_MSI > - struct list_head msi_list; > + struct msi_irqs *msi; > const struct att...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...ant */ > - unsigned int msi_enabled:1; > - unsigned int msix_enabled:1; > unsigned int ari_enabled:1; /* ARI forwarding */ > unsigned int is_managed:1; > unsigned int needs_freset:1; /* Dev requires fundamental reset */ > @@ -358,7 +356,7 @@ struct pci_dev { > struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for > resources */ > struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file > for WC mapping of resources */ > #ifdef CONFIG_PCI_MSI > - struct list_head msi_list; > + struct msi_irqs *msi; > const struct att...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
.../* device needs IRQ rerouting variant */ - unsigned int msi_enabled:1; - unsigned int msix_enabled:1; unsigned int ari_enabled:1; /* ARI forwarding */ unsigned int is_managed:1; unsigned int needs_freset:1; /* Dev requires fundamental reset */ @@ -358,7 +356,7 @@ struct pci_dev { struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ #ifdef CONFIG_PCI_MSI - struct list_head msi_list; + struct msi_irqs *msi; const struct attribute_group **msi_irq_groups; #en...
2008 Sep 27
0
[PATCH 4/9] dom0 PCI: support SR-IOV capability
.../* address space assigned to buses behind the bridge */ #ifndef PCI_BRIDGE_RES_NUM #define PCI_BRIDGE_RES_NUM 4 @@ -128,6 +134,8 @@ char cap_nr; u32 data[0]; }; + +struct pci_iov; /* * The pci_dev structure is used to describe PCI devices. @@ -200,6 +208,7 @@ struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ int rom_attr_enabled; /* has display of the rom attribute been enabled? */ struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ + struct pci_iov *iov; }; #define pci_dev_g(n...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2012 Nov 19
2
[PATCH 158/493] video: remove use of __devinit
...ts; they are mostly @@ -1868,7 +1868,7 @@ static struct fb_ops radeonfb_ops = { }; -static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) +static int radeon_set_fbinfo (struct radeonfb_info *rinfo) { struct fb_info *info = rinfo->info; @@ -2143,7 +2143,7 @@ static struct bin_attribute edid2_attr = { }; -static int __devinit radeonfb_pci_register (struct pci_dev *pdev, +static int radeonfb_pci_register (struct pci_dev *pdev, const struct pci_device_id *ent) { struct fb_info *info; diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c...
2012 Nov 19
2
[PATCH 158/493] video: remove use of __devinit
...ts; they are mostly @@ -1868,7 +1868,7 @@ static struct fb_ops radeonfb_ops = { }; -static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) +static int radeon_set_fbinfo (struct radeonfb_info *rinfo) { struct fb_info *info = rinfo->info; @@ -2143,7 +2143,7 @@ static struct bin_attribute edid2_attr = { }; -static int __devinit radeonfb_pci_register (struct pci_dev *pdev, +static int radeonfb_pci_register (struct pci_dev *pdev, const struct pci_device_id *ent) { struct fb_info *info; diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c...
2012 Nov 19
2
[PATCH 158/493] video: remove use of __devinit
...ts; they are mostly @@ -1868,7 +1868,7 @@ static struct fb_ops radeonfb_ops = { }; -static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) +static int radeon_set_fbinfo (struct radeonfb_info *rinfo) { struct fb_info *info = rinfo->info; @@ -2143,7 +2143,7 @@ static struct bin_attribute edid2_attr = { }; -static int __devinit radeonfb_pci_register (struct pci_dev *pdev, +static int radeonfb_pci_register (struct pci_dev *pdev, const struct pci_device_id *ent) { struct fb_info *info; diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...ot;pci: warning: could not create legacy I/O port " - "and ISA memory resources to sysfs\n"); + pr_warn("warning: could not create legacy I/O port and ISA memory resources to sysfs\n"); return; } @@ -814,7 +814,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, if (!pci_mmap_fits(pdev, i, vma, PCI_MMAP_SYSFS)) { WARN(1, "process \"%s\" tried to map 0x%08lx bytes " - "at page 0x%08lx on %s BAR %d (start 0x%16Lx, size 0x%16Lx)\n", + "at page 0x%08lx on %s BAR %d (start 0x%16llx, size 0x%16llx)\n",...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...ot;pci: warning: could not create legacy I/O port " - "and ISA memory resources to sysfs\n"); + pr_warn("warning: could not create legacy I/O port and ISA memory resources to sysfs\n"); return; } @@ -814,7 +814,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, if (!pci_mmap_fits(pdev, i, vma, PCI_MMAP_SYSFS)) { WARN(1, "process \"%s\" tried to map 0x%08lx bytes " - "at page 0x%08lx on %s BAR %d (start 0x%16Lx, size 0x%16Lx)\n", + "at page 0x%08lx on %s BAR %d (start 0x%16llx, size 0x%16llx)\n",...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...ot;pci: warning: could not create legacy I/O port " - "and ISA memory resources to sysfs\n"); + pr_warn("warning: could not create legacy I/O port and ISA memory resources to sysfs\n"); return; } @@ -814,7 +814,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, if (!pci_mmap_fits(pdev, i, vma, PCI_MMAP_SYSFS)) { WARN(1, "process \"%s\" tried to map 0x%08lx bytes " - "at page 0x%08lx on %s BAR %d (start 0x%16Lx, size 0x%16Lx)\n", + "at page 0x%08lx on %s BAR %d (start 0x%16llx, size 0x%16llx)\n",...