diff options
Diffstat (limited to 'arch/tile/kernel')
| -rw-r--r-- | arch/tile/kernel/machine_kexec.c | 6 | ||||
| -rw-r--r-- | arch/tile/kernel/pci.c | 26 | ||||
| -rw-r--r-- | arch/tile/kernel/sysfs.c | 61 | 
3 files changed, 38 insertions, 55 deletions
diff --git a/arch/tile/kernel/machine_kexec.c b/arch/tile/kernel/machine_kexec.c index e00d7179989..6255f2eab11 100644 --- a/arch/tile/kernel/machine_kexec.c +++ b/arch/tile/kernel/machine_kexec.c @@ -248,11 +248,11 @@ static void setup_quasi_va_is_pa(void)  } -NORET_TYPE void machine_kexec(struct kimage *image) +void machine_kexec(struct kimage *image)  {  	void *reboot_code_buffer; -	NORET_TYPE void (*rnk)(unsigned long, void *, unsigned long) -		ATTRIB_NORET; +	void (*rnk)(unsigned long, void *, unsigned long) +		__noreturn;  	/* Mask all interrupts before starting to reboot. */  	interrupt_mask_set_mask(~0ULL); diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 9d610d3fb11..a1bb59eecc1 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -395,6 +395,11 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)  	/* Nothing needs to be done. */  } +void pcibios_set_master(struct pci_dev *dev) +{ +	/* No special bus mastering setup handling. */ +} +  /*   * This can be called from the generic PCI layer, but doesn't need to   * do anything. @@ -466,27 +471,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)  	return 0;  } -void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) -{ -	unsigned long start = pci_resource_start(dev, bar); -	unsigned long len = pci_resource_len(dev, bar); -	unsigned long flags = pci_resource_flags(dev, bar); - -	if (!len) -		return NULL; -	if (max && len > max) -		len = max; - -	if (!(flags & IORESOURCE_MEM)) { -		pr_info("PCI: Trying to map invalid resource %#lx\n", flags); -		start = 0; -	} - -	return (void __iomem *)start; -} -EXPORT_SYMBOL(pci_iomap); - -  /****************************************************************   *   * Tile PCI config space read/write routines diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c index 60290826809..f862b005eb7 100644 --- a/arch/tile/kernel/sysfs.c +++ b/arch/tile/kernel/sysfs.c @@ -14,7 +14,7 @@   * /sys entry support.   */ -#include <linux/sysdev.h> +#include <linux/device.h>  #include <linux/cpu.h>  #include <linux/slab.h>  #include <linux/smp.h> @@ -32,55 +32,55 @@ static ssize_t get_hv_confstr(char *page, int query)  	return n;  } -static ssize_t chip_width_show(struct sysdev_class *dev, -			       struct sysdev_class_attribute *attr, +static ssize_t chip_width_show(struct device *dev, +			       struct device_attribute *attr,  			       char *page)  {  	return sprintf(page, "%u\n", smp_width);  } -static SYSDEV_CLASS_ATTR(chip_width, 0444, chip_width_show, NULL); +static DEVICE_ATTR(chip_width, 0444, chip_width_show, NULL); -static ssize_t chip_height_show(struct sysdev_class *dev, -				struct sysdev_class_attribute *attr, +static ssize_t chip_height_show(struct device *dev, +				struct device_attribute *attr,  				char *page)  {  	return sprintf(page, "%u\n", smp_height);  } -static SYSDEV_CLASS_ATTR(chip_height, 0444, chip_height_show, NULL); +static DEVICE_ATTR(chip_height, 0444, chip_height_show, NULL); -static ssize_t chip_serial_show(struct sysdev_class *dev, -				struct sysdev_class_attribute *attr, +static ssize_t chip_serial_show(struct device *dev, +				struct device_attribute *attr,  				char *page)  {  	return get_hv_confstr(page, HV_CONFSTR_CHIP_SERIAL_NUM);  } -static SYSDEV_CLASS_ATTR(chip_serial, 0444, chip_serial_show, NULL); +static DEVICE_ATTR(chip_serial, 0444, chip_serial_show, NULL); -static ssize_t chip_revision_show(struct sysdev_class *dev, -				  struct sysdev_class_attribute *attr, +static ssize_t chip_revision_show(struct device *dev, +				  struct device_attribute *attr,  				  char *page)  {  	return get_hv_confstr(page, HV_CONFSTR_CHIP_REV);  } -static SYSDEV_CLASS_ATTR(chip_revision, 0444, chip_revision_show, NULL); +static DEVICE_ATTR(chip_revision, 0444, chip_revision_show, NULL); -static ssize_t type_show(struct sysdev_class *dev, -			    struct sysdev_class_attribute *attr, +static ssize_t type_show(struct device *dev, +			    struct device_attribute *attr,  			    char *page)  {  	return sprintf(page, "tilera\n");  } -static SYSDEV_CLASS_ATTR(type, 0444, type_show, NULL); +static DEVICE_ATTR(type, 0444, type_show, NULL);  #define HV_CONF_ATTR(name, conf)					\ -	static ssize_t name ## _show(struct sysdev_class *dev,		\ -				     struct sysdev_class_attribute *attr, \ +	static ssize_t name ## _show(struct device *dev,		\ +				     struct device_attribute *attr, \  				     char *page)			\  	{								\  		return get_hv_confstr(page, conf);			\  	}								\ -	static SYSDEV_CLASS_ATTR(name, 0444, name ## _show, NULL); +	static DEVICE_ATTR(name, 0444, name ## _show, NULL);  HV_CONF_ATTR(version,		HV_CONFSTR_HV_SW_VER)  HV_CONF_ATTR(config_version,	HV_CONFSTR_HV_CONFIG_VER) @@ -96,15 +96,15 @@ HV_CONF_ATTR(mezz_description,	HV_CONFSTR_MEZZ_DESC)  HV_CONF_ATTR(switch_control,	HV_CONFSTR_SWITCH_CONTROL)  static struct attribute *board_attrs[] = { -	&attr_board_part.attr, -	&attr_board_serial.attr, -	&attr_board_revision.attr, -	&attr_board_description.attr, -	&attr_mezz_part.attr, -	&attr_mezz_serial.attr, -	&attr_mezz_revision.attr, -	&attr_mezz_description.attr, -	&attr_switch_control.attr, +	&dev_attr_board_part.attr, +	&dev_attr_board_serial.attr, +	&dev_attr_board_revision.attr, +	&dev_attr_board_description.attr, +	&dev_attr_mezz_part.attr, +	&dev_attr_mezz_serial.attr, +	&dev_attr_mezz_revision.attr, +	&dev_attr_mezz_description.attr, +	&dev_attr_switch_control.attr,  	NULL  }; @@ -151,12 +151,11 @@ hvconfig_bin_read(struct file *filp, struct kobject *kobj,  static int __init create_sysfs_entries(void)  { -	struct sysdev_class *cls = &cpu_sysdev_class;  	int err = 0;  #define create_cpu_attr(name)						\  	if (!err)							\ -		err = sysfs_create_file(&cls->kset.kobj, &attr_##name.attr); +		err = device_create_file(cpu_subsys.dev_root, &dev_attr_##name);  	create_cpu_attr(chip_width);  	create_cpu_attr(chip_height);  	create_cpu_attr(chip_serial); @@ -164,7 +163,7 @@ static int __init create_sysfs_entries(void)  #define create_hv_attr(name)						\  	if (!err)							\ -		err = sysfs_create_file(hypervisor_kobj, &attr_##name.attr); +		err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name);  	create_hv_attr(type);  	create_hv_attr(version);  	create_hv_attr(config_version);  |