diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
commit | ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch) | |
tree | d851c923f85566572112d4c0f884cff388a3cc05 /mm | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | ea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff) |
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.
The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/compaction.c | 10 | ||||
-rw-r--r-- | mm/hugetlb.c | 34 | ||||
-rw-r--r-- | mm/vmscan.c | 14 |
3 files changed, 29 insertions, 29 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 899d95638586..1253d7ac332b 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -721,23 +721,23 @@ int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
721 | } | 721 | } |
722 | 722 | ||
723 | #if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA) | 723 | #if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA) |
724 | ssize_t sysfs_compact_node(struct sys_device *dev, | 724 | ssize_t sysfs_compact_node(struct device *dev, |
725 | struct sysdev_attribute *attr, | 725 | struct device_attribute *attr, |
726 | const char *buf, size_t count) | 726 | const char *buf, size_t count) |
727 | { | 727 | { |
728 | compact_node(dev->id); | 728 | compact_node(dev->id); |
729 | 729 | ||
730 | return count; | 730 | return count; |
731 | } | 731 | } |
732 | static SYSDEV_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node); | 732 | static DEVICE_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node); |
733 | 733 | ||
734 | int compaction_register_node(struct node *node) | 734 | int compaction_register_node(struct node *node) |
735 | { | 735 | { |
736 | return sysdev_create_file(&node->sysdev, &attr_compact); | 736 | return device_create_file(&node->dev, &dev_attr_compact); |
737 | } | 737 | } |
738 | 738 | ||
739 | void compaction_unregister_node(struct node *node) | 739 | void compaction_unregister_node(struct node *node) |
740 | { | 740 | { |
741 | return sysdev_remove_file(&node->sysdev, &attr_compact); | 741 | return device_remove_file(&node->dev, &dev_attr_compact); |
742 | } | 742 | } |
743 | #endif /* CONFIG_SYSFS && CONFIG_NUMA */ | 743 | #endif /* CONFIG_SYSFS && CONFIG_NUMA */ |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2316840b337a..7acd12503f73 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1592,9 +1592,9 @@ static void __init hugetlb_sysfs_init(void) | |||
1592 | 1592 | ||
1593 | /* | 1593 | /* |
1594 | * node_hstate/s - associate per node hstate attributes, via their kobjects, | 1594 | * node_hstate/s - associate per node hstate attributes, via their kobjects, |
1595 | * with node sysdevs in node_devices[] using a parallel array. The array | 1595 | * with node devices in node_devices[] using a parallel array. The array |
1596 | * index of a node sysdev or _hstate == node id. | 1596 | * index of a node device or _hstate == node id. |
1597 | * This is here to avoid any static dependency of the node sysdev driver, in | 1597 | * This is here to avoid any static dependency of the node device driver, in |
1598 | * the base kernel, on the hugetlb module. | 1598 | * the base kernel, on the hugetlb module. |
1599 | */ | 1599 | */ |
1600 | struct node_hstate { | 1600 | struct node_hstate { |
@@ -1604,7 +1604,7 @@ struct node_hstate { | |||
1604 | struct node_hstate node_hstates[MAX_NUMNODES]; | 1604 | struct node_hstate node_hstates[MAX_NUMNODES]; |
1605 | 1605 | ||
1606 | /* | 1606 | /* |
1607 | * A subset of global hstate attributes for node sysdevs | 1607 | * A subset of global hstate attributes for node devices |
1608 | */ | 1608 | */ |
1609 | static struct attribute *per_node_hstate_attrs[] = { | 1609 | static struct attribute *per_node_hstate_attrs[] = { |
1610 | &nr_hugepages_attr.attr, | 1610 | &nr_hugepages_attr.attr, |
@@ -1618,7 +1618,7 @@ static struct attribute_group per_node_hstate_attr_group = { | |||
1618 | }; | 1618 | }; |
1619 | 1619 | ||
1620 | /* | 1620 | /* |
1621 | * kobj_to_node_hstate - lookup global hstate for node sysdev hstate attr kobj. | 1621 | * kobj_to_node_hstate - lookup global hstate for node device hstate attr kobj. |
1622 | * Returns node id via non-NULL nidp. | 1622 | * Returns node id via non-NULL nidp. |
1623 | */ | 1623 | */ |
1624 | static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp) | 1624 | static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp) |
@@ -1641,13 +1641,13 @@ static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp) | |||
1641 | } | 1641 | } |
1642 | 1642 | ||
1643 | /* | 1643 | /* |
1644 | * Unregister hstate attributes from a single node sysdev. | 1644 | * Unregister hstate attributes from a single node device. |
1645 | * No-op if no hstate attributes attached. | 1645 | * No-op if no hstate attributes attached. |
1646 | */ | 1646 | */ |
1647 | void hugetlb_unregister_node(struct node *node) | 1647 | void hugetlb_unregister_node(struct node *node) |
1648 | { | 1648 | { |
1649 | struct hstate *h; | 1649 | struct hstate *h; |
1650 | struct node_hstate *nhs = &node_hstates[node->sysdev.id]; | 1650 | struct node_hstate *nhs = &node_hstates[node->dev.id]; |
1651 | 1651 | ||
1652 | if (!nhs->hugepages_kobj) | 1652 | if (!nhs->hugepages_kobj) |
1653 | return; /* no hstate attributes */ | 1653 | return; /* no hstate attributes */ |
@@ -1663,7 +1663,7 @@ void hugetlb_unregister_node(struct node *node) | |||
1663 | } | 1663 | } |
1664 | 1664 | ||
1665 | /* | 1665 | /* |
1666 | * hugetlb module exit: unregister hstate attributes from node sysdevs | 1666 | * hugetlb module exit: unregister hstate attributes from node devices |
1667 | * that have them. | 1667 | * that have them. |
1668 | */ | 1668 | */ |
1669 | static void hugetlb_unregister_all_nodes(void) | 1669 | static void hugetlb_unregister_all_nodes(void) |
@@ -1671,7 +1671,7 @@ static void hugetlb_unregister_all_nodes(void) | |||
1671 | int nid; | 1671 | int nid; |
1672 | 1672 | ||
1673 | /* | 1673 | /* |
1674 | * disable node sysdev registrations. | 1674 | * disable node device registrations. |
1675 | */ | 1675 | */ |
1676 | register_hugetlbfs_with_node(NULL, NULL); | 1676 | register_hugetlbfs_with_node(NULL, NULL); |
1677 | 1677 | ||
@@ -1683,20 +1683,20 @@ static void hugetlb_unregister_all_nodes(void) | |||
1683 | } | 1683 | } |
1684 | 1684 | ||
1685 | /* | 1685 | /* |
1686 | * Register hstate attributes for a single node sysdev. | 1686 | * Register hstate attributes for a single node device. |
1687 | * No-op if attributes already registered. | 1687 | * No-op if attributes already registered. |
1688 | */ | 1688 | */ |
1689 | void hugetlb_register_node(struct node *node) | 1689 | void hugetlb_register_node(struct node *node) |
1690 | { | 1690 | { |
1691 | struct hstate *h; | 1691 | struct hstate *h; |
1692 | struct node_hstate *nhs = &node_hstates[node->sysdev.id]; | 1692 | struct node_hstate *nhs = &node_hstates[node->dev.id]; |
1693 | int err; | 1693 | int err; |
1694 | 1694 | ||
1695 | if (nhs->hugepages_kobj) | 1695 | if (nhs->hugepages_kobj) |
1696 | return; /* already allocated */ | 1696 | return; /* already allocated */ |
1697 | 1697 | ||
1698 | nhs->hugepages_kobj = kobject_create_and_add("hugepages", | 1698 | nhs->hugepages_kobj = kobject_create_and_add("hugepages", |
1699 | &node->sysdev.kobj); | 1699 | &node->dev.kobj); |
1700 | if (!nhs->hugepages_kobj) | 1700 | if (!nhs->hugepages_kobj) |
1701 | return; | 1701 | return; |
1702 | 1702 | ||
@@ -1707,7 +1707,7 @@ void hugetlb_register_node(struct node *node) | |||
1707 | if (err) { | 1707 | if (err) { |
1708 | printk(KERN_ERR "Hugetlb: Unable to add hstate %s" | 1708 | printk(KERN_ERR "Hugetlb: Unable to add hstate %s" |
1709 | " for node %d\n", | 1709 | " for node %d\n", |
1710 | h->name, node->sysdev.id); | 1710 | h->name, node->dev.id); |
1711 | hugetlb_unregister_node(node); | 1711 | hugetlb_unregister_node(node); |
1712 | break; | 1712 | break; |
1713 | } | 1713 | } |
@@ -1716,8 +1716,8 @@ void hugetlb_register_node(struct node *node) | |||
1716 | 1716 | ||
1717 | /* | 1717 | /* |
1718 | * hugetlb init time: register hstate attributes for all registered node | 1718 | * hugetlb init time: register hstate attributes for all registered node |
1719 | * sysdevs of nodes that have memory. All on-line nodes should have | 1719 | * devices of nodes that have memory. All on-line nodes should have |
1720 | * registered their associated sysdev by this time. | 1720 | * registered their associated device by this time. |
1721 | */ | 1721 | */ |
1722 | static void hugetlb_register_all_nodes(void) | 1722 | static void hugetlb_register_all_nodes(void) |
1723 | { | 1723 | { |
@@ -1725,12 +1725,12 @@ static void hugetlb_register_all_nodes(void) | |||
1725 | 1725 | ||
1726 | for_each_node_state(nid, N_HIGH_MEMORY) { | 1726 | for_each_node_state(nid, N_HIGH_MEMORY) { |
1727 | struct node *node = &node_devices[nid]; | 1727 | struct node *node = &node_devices[nid]; |
1728 | if (node->sysdev.id == nid) | 1728 | if (node->dev.id == nid) |
1729 | hugetlb_register_node(node); | 1729 | hugetlb_register_node(node); |
1730 | } | 1730 | } |
1731 | 1731 | ||
1732 | /* | 1732 | /* |
1733 | * Let the node sysdev driver know we're here so it can | 1733 | * Let the node device driver know we're here so it can |
1734 | * [un]register hstate attributes on node hotplug. | 1734 | * [un]register hstate attributes on node hotplug. |
1735 | */ | 1735 | */ |
1736 | register_hugetlbfs_with_node(hugetlb_register_node, | 1736 | register_hugetlbfs_with_node(hugetlb_register_node, |
diff --git a/mm/vmscan.c b/mm/vmscan.c index f54a05b7a61d..11adc890ce30 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -3475,16 +3475,16 @@ int scan_unevictable_handler(struct ctl_table *table, int write, | |||
3475 | * a specified node's per zone unevictable lists for evictable pages. | 3475 | * a specified node's per zone unevictable lists for evictable pages. |
3476 | */ | 3476 | */ |
3477 | 3477 | ||
3478 | static ssize_t read_scan_unevictable_node(struct sys_device *dev, | 3478 | static ssize_t read_scan_unevictable_node(struct device *dev, |
3479 | struct sysdev_attribute *attr, | 3479 | struct device_attribute *attr, |
3480 | char *buf) | 3480 | char *buf) |
3481 | { | 3481 | { |
3482 | warn_scan_unevictable_pages(); | 3482 | warn_scan_unevictable_pages(); |
3483 | return sprintf(buf, "0\n"); /* always zero; should fit... */ | 3483 | return sprintf(buf, "0\n"); /* always zero; should fit... */ |
3484 | } | 3484 | } |
3485 | 3485 | ||
3486 | static ssize_t write_scan_unevictable_node(struct sys_device *dev, | 3486 | static ssize_t write_scan_unevictable_node(struct device *dev, |
3487 | struct sysdev_attribute *attr, | 3487 | struct device_attribute *attr, |
3488 | const char *buf, size_t count) | 3488 | const char *buf, size_t count) |
3489 | { | 3489 | { |
3490 | warn_scan_unevictable_pages(); | 3490 | warn_scan_unevictable_pages(); |
@@ -3492,17 +3492,17 @@ static ssize_t write_scan_unevictable_node(struct sys_device *dev, | |||
3492 | } | 3492 | } |
3493 | 3493 | ||
3494 | 3494 | ||
3495 | static SYSDEV_ATTR(scan_unevictable_pages, S_IRUGO | S_IWUSR, | 3495 | static DEVICE_ATTR(scan_unevictable_pages, S_IRUGO | S_IWUSR, |
3496 | read_scan_unevictable_node, | 3496 | read_scan_unevictable_node, |
3497 | write_scan_unevictable_node); | 3497 | write_scan_unevictable_node); |
3498 | 3498 | ||
3499 | int scan_unevictable_register_node(struct node *node) | 3499 | int scan_unevictable_register_node(struct node *node) |
3500 | { | 3500 | { |
3501 | return sysdev_create_file(&node->sysdev, &attr_scan_unevictable_pages); | 3501 | return device_create_file(&node->dev, &dev_attr_scan_unevictable_pages); |
3502 | } | 3502 | } |
3503 | 3503 | ||
3504 | void scan_unevictable_unregister_node(struct node *node) | 3504 | void scan_unevictable_unregister_node(struct node *node) |
3505 | { | 3505 | { |
3506 | sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages); | 3506 | device_remove_file(&node->dev, &dev_attr_scan_unevictable_pages); |
3507 | } | 3507 | } |
3508 | #endif | 3508 | #endif |